Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
For challenges that involve the physical layout or physical manipulation of source-code.
2
votes
The reversible reverser
JavaScript, 62 * 1.25 = 78
i.split('').reverse().join('')//)''(nioj.)(esrever.)''(tilps.i
Not too creative, but the best I could come up with. (assumes that the input is stored in variable i)
I di …
6
votes
Program that prints mirror images of it's own self
Ruby
UPDATE: Check out my new answer, based on the same idea as this one!
$, |
e="s= open( $0).r ead.s pli |
t ( 1 0 . ch r); |
$ …
3
votes
Program your favorite phrase
Golfscript, 53
This one was fun.
{'1'-print}:puts;.'You; are; not; a; duck.'';'/\,=\1+
Phrase: "You are not a duck." (which is completely true; entropy 3.5110854081804286)
Explanation:
The stack …
11
votes
Double-time is not double time
vim, 5
i1<esc>X<C-a>
Without doubling:
i1<esc> insert the literal text "1"
X delete backwards - a no-op, since there's only one character
<C-a> increment, giving 2
With doubling:
ii1 …
7
votes
Program that prints mirror images of it's own self
Ruby
This one definitely took me a while. But it was really fun!
#
e=
"/+
+d.f …
4
votes
Write a function that tells you which TWO of its lines has been removed
JavaScript, 152 characters golfed
function t() {
var fa = (f + '').match(/\d/g)
var ra = []
for (var i = 0; i < 5; i++) {
if (fa.indexOf(i + '') < 0) ra.push(i + 1)
}
retu …
17
votes
Beatles Songs and Hexagons
Snowman 1.0.2, width = 13
}?}///////////}
///"Get Back"////
///////////////////
/////////////////////
"Sun King//"[["Sun King
"*"BirthdaysP/"*"Birthday
"]]8AaLsP[[///"]]8AaLsP[[/ …
8
votes
Self-Validating Triangular Checkerboard Program
C (gcc), 189 bytes
j
;l
;b;
d;f␉
(char
␉*␉t)
{b=*␉t%
2;for␉(␉
j=d=0;j=j
+ 1,␉l=j+
1,␉*␉t; ) {
for␉(;l=l- 1
;t=t+ 1 )b=
!b␉,␉d=d+ !(␉*
␉t␉*␉(␉*␉t- 10)
*␉(␉*␉t%2-b) ) ;
d␉|=*␉t- 10;t=t+
1 ; }b= !d …
73
votes
What did we forget?
zsh, 603 594 566 561 548 440 415 399 378 370 bytes
ec
ho \\n;ca t<<<$'\x20';exi t
d$c -e8BC6P
d0c -eKp
$'\172\163\150' $'\055\143' $'\146\157\162 v \151\156 \173\043\056\056\134\175\175\073\173 \14 …
10
votes
Palindrome Hello, World
Macaroni 0.0.2, 52 bytes
print "Greetings, Planet!""!tenalP ,sgniteerG" tnirp
A solution that doesn't use comments. (Mostly because Macaroni doesn't have comments...)
11
votes
A well linked challenge
Jelly, 20 bytes
ĠẈḂẸẆṖÇ€Ạ
ĠẈḂẸ
ẆṖÇ€Ạ
Try it online!
The first line is ignored. It's only there to satisfy the condition that every character appear an even number of times.
The next line first Ġr …