Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
8 votes
1 answer
3k views

I use the following very often: New-Object psobject -Property @{a=1; b=2; c=3; d=4} I would like to make this as short as possible, perhaps even 1 character? What's the shortest way to create a new ...
0 votes
7 answers
4k views

if x < change.pageX # pageX is cross-browser normalized by jQuery val = Number(elem.text()) return elem.text(o.max) if val + o.step > o.max return elem.text(o....
2 votes
2 answers
570 views

In golfing, one tries to complete a puzzle in as few characters as possible, generally using the base language only. One trick for golfing in R is to use partial completion so that e.g. rle(...)$...
20 votes
4 answers
19k views

I am kind of a newbie to Ruby, I am working out some katas and I stuck on this silly problem. I need to copy the content of 1 file to a new file in 1 line of code First try: File.open(out, 'w')....
Calin's user avatar
  • 6,907
10 votes
2 answers
3k views

The following 32bit x86 Linux program prints a string of arbitrary length (as long as a program can be, anyway) and does exit(0) afterwards: .global _start ; notice on entry here, all ...
FrankH.'s user avatar
  • 18.4k
4 votes
2 answers
4k views

Challenge: convert a 'modified date' DateTime of an image file to a version number / string suitable for maintaining uniqueness in a url, so each modification of the image generates a unique url, the ...
Myster's user avatar
  • 18.2k
2 votes
2 answers
263 views

I'm writing a function IsAlive to take an IObservable<T>, and a timespan, and return an IObservable<bool> The canonical use case is to detect if a streaming server is still sending data. ...
6 votes
4 answers
3k views

I was trying to solve this problem here :- https://www.spoj.pl/problems/PHIVAL/ The questions asks you to output as many decimal digits of the golden ratio (1+sqrt(5))/2 as possible and also try to ...
1 vote
5 answers
742 views

I have a code like that: #!/usr/bin/perl use strict; use warnings; my %proteins = qw/ UUU F UUC F UUA L UUG L UCU S UCC S UCA S UCG S UAU Y UAC Y UGU C UGC C UGG W CUU L CUC L CUA L CUG ...
kamaci's user avatar
  • 75.9k
18 votes
4 answers
2k views

Remember that away message on aim that said how: Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the ...
35 votes
20 answers
11k views

Finite state machine A deterministic finite state machine is a simple computation model, widely used as an introduction to automata theory in basic CS courses. It is a simple model, equivalent to ...
17 votes
8 answers
2k views

Challenge Compactify a long list of numbers by replacing consecutive runs with ranges. Example Input 1, 2, 3, 4, 7, 8, 10, 12, 13, 14, 15 The input is guaranteed to be in ascending order and will not ...
36 votes
4 answers
7k views

Challenge Here is the task, inspired by the well-known British TV game show Countdown. The challenge should be pretty clear even without any knowledge of the game, but feel free to ask for ...
19 votes
9 answers
2k views

Here's a pretty simple idea, in this pastebin I've posted some pair of numbers. These represent Nodes of a directed graph. The input to stdin will be of the form, (they'll be numbers, i'll be using an ...
0 votes
3 answers
787 views

I had to make a really small and simple script that would fill a table with string values according to these criteria: 2 characters long 1st character is always numeric (0-9) 2nd character is (0-9) ...

15 30 50 per page
1
2 3 4 5
...
9

AltStyle によって変換されたページ (->オリジナル) /