Code Golf: 1×1 black pixel
Data URI, 83 characters data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==
Data URI, 83 characters data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==
LabVIEW 7.1 ONE character and that is the blue constant ‘1‘ in the block diagram. I swear, the input was copy and paste 😉 http://i25.tinypic.com/hvc4mp.png http://i26.tinypic.com/5pnas.png
Perl, 99 characters @P=map{$/.substr$”.’__/ \\’x99,$_,$W||=1+3*pop}0,(3,6)x pop; chop$P[0-$W%2];print” __”x($W/6),@P Last edit: Saved one character replacing -($W%2) with 0-$W%2 (thanks A. Rex) Explanation: For width W and height H, the output is 2+2 * H lines long and 3 * W+1 characters wide, with a lot of repetition in the middle of the output. For convenience, we … Read more
Perl 130 chars So long as external libraries are permitted: use Algorithm::Permute”permute”; permute{for$x(@a=qw(+ – / *)){for$y(@a){$_=”@ARGV”;s/ /$x/;s/ /$y/;printf” $_ = %.0f”,eval}}}@ARGV 2nd newline is significant. Without a module, and assuming that all three inputs are distinct, here’s another solution: @n=& ARGV; @o=( q[+], “-“, q{/}, ‘*’ );; for$ {a}(@ n){ for $b(@n){for$c(@ {n}){ for $x( … Read more
J, 14 chars 4*-/%>:+:i.1e6 Explanation 1e6 is number 1 followed by 6 zeroes (1000000). i.y generates the first y non negative numbers. +: is a function that doubles each element in the list argument. >: is a function that increments by one each element in the list argument. So, the expression >:+:i.1e6 generates the first … Read more
Python 2.7+, 201 192 187 181 179 175 171 chars PS. After the problem was relaxed (no need to output state line on empty input), here is new code that’s notably shorter. If you are on version <2.7, there is no dict comprehension, so instead of {c+o:s for o,c,s in i[1:-1]} try dict((c+o,s)for o,c,s in … Read more
Python Number of characters: 548 482 425 421 416 413 408 from operator import * n=len def C(N,T): R=range(1<<n(N));M=[{}for i in R];p=1 for i in range(n(N)):M[1<<i][1.*N[i]]=”%d”%N[i] while p: p=0 for i in R: for j in R: m=M[i|j];l=n(m) if not i&j:m.update((f(x,y),”(“+s+o+t+”)”)for(y,t)in M[j].items()if y for(x,s)in M[i].items() for(o,f)in zip(‘+-*/’,(add,sub,mul,div))) p|=l<n(m) return min((abs(x-T),e)for t in M for(x,e)in t.items())[1] … Read more
J, 133 135 79 83 84 88 characters (utf-8 encoding) ;/5 3$”1(‘ ‘,.s){~”1#:3 u:(ucp’翇篭篯礧歮禧禤祯寭璗牯宭䤧彭忭筯篤筿殭秏璒孯孪寿咕寏犧’){~0>.64-~a.i.s=: Usage: ;/5 3$”1(‘ ‘,.s){~”1#:3 u:(ucp’翇篭篯礧歮禧禤祯寭璗牯宭䤧彭忭筯篤筿殭秏璒孯孪寿咕寏犧’){~0>.64-~a.i.s=:’ABCDEFGHIJKLMNOPQRSTUVWXYZ !’ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ │AAA│BBB│CCC│DD │EEE│FFF│GGG│H H│III│JJJ│K K│L │M M│N N│OOO│PPP│QQQ│RR │SSS│TTT│U U│V V│W W│X X│Y Y│ZZZ│ │!!!│ │A A│B B│C │D D│E │F │G │H H│ I │ J│K K│L │MMM│NNN│O O│P P│Q Q│R R│S │ T … Read more
Perl, 164 chars 195 184 171 167 164 print@o=((map{$z=_ x($x=1+$N-$_);$”x$x.”https://stackoverflow.com/”x$_.”\\$z|$z/”.’\ ‘x$_.$/}0..($N=<>)), “_/”x++$N.” “.’\_’x$N.$/); y’/\\’\/’,@o||y#_# #,$t++||y#_ # _#,print while$_=pop@o First statement prints out the top half of the spider web. Second statement uses transliteration operations to create a reflection of the top half. This next one weighs in closer to 314 chars (of productive code), but … Read more
Golfscript (112 characters) ‘ ‘%:A;10,{):y;A{2/.0~|1=~:r;0=0=5\- 7% 4y@–:q’ ” O’if-4q&!q*r*{16q/r<‘|\\’ ‘| ‘if}’ ‘if+{.32=y~&{;45}*}%}%n}%