Rob Audenaerde
  • Member for 8 years, 11 months
  • Last seen this week
4 answers
votes
3k views
Worst Abuse of CSS?
13 votes

Changing images on the fly I won't necessarily call it abuse, but you can use CSS to replace an IMG with a given SRC to show a completely different image. @media print { IMG { ...

View answer
57 answers
votes
41k views
Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”
10 votes

CoffeeScript / NodeJS require('http').get 'http://www.stroustrup.com/C++.html', (r) -> dt = ''; r.on 'data', (d) -> dt += d r.on 'end' , (d) -> console.log dt.match /"((http)...

View answer
36 answers
votes
69k views
American Gothic in the palette of Mona Lisa: Rearrange the pixels
9 votes

Java Inspired by the previous java answer from Quincunx package paletteswap; import java.awt.Point; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import ...

View answer
120 answers
votes
16k views
Print the alphabet without using each vowel
8 votes

Haskell, 12 ['\97'..'z'] Or is this cheating? :)

View answer
19 answers
votes
6k views
Shortest Unique Substrings
3 votes

Haskell, 169 162 155 153 151 138 120 115 import Data.List l=length q k=filter$(==)k.l p y=q(minimum.map l$y)$y f x=p$concat$q 1$group$sort$(tails x>>=inits) To use it: f "...

View answer
110 answers
votes
87k views
Most creative way to display 42
3 votes

Haskell h2g2 = fromIntegral douglasAdams = length l x = 1 / h2g2 (douglasAdams x) the x = h2g2 $ sum $ zipWith (*) (map douglasAdams x) [0,1,-1] theanswerisfoundin ...

View answer
43 answers
votes
5k views
Death By Shock Probe: That's a lot of dice
2 votes

Java (Java 8) - 52 int f(){return new Random().ints(1<<20,1,5).sum();}

View answer
33 answers
votes
88k views
Make it look like I'm working
2 votes

xdotool and an IDE (for example eclipse) For X11 users. Use this script and make sure you just Alt+tab'ed from Eclipse. You need a java file. For example here: https://raw.githubusercontent.com/...

View answer
16 answers
votes
16k views
Undefined Behavior Killed My Cat
1 votes

Java According to spec java.util.Date will have undefined behaviour. So try your luck: import java.util.Date; public class App3 { public static void main (String args[]) { String ...

View answer
50 answers
votes
12k views
Most creative way to reverse a positive integer
1 votes

Java public class Reverser { public static long reverse(long x) { long n = (long) Math.floor(Math.log(x)/Math.log(10)); long c = 0; for (long k=1; k<=n; k++) ...

View answer
69 answers
votes
21k views
Sort numbers by binary 1's count
1 votes

Haskell - 107100 (including sample list and main call) else 100-22=78 import Data.List b 0=0 b n=mod n 2+b(div n 2) c q=map snd$ sort$ zip(map b q)q main=print$ c [1..100] Result: [1,2,4,8,16,32,64,...

View answer
41 answers
votes
17k views
Obfuscated FizzBuzz Golf
1 votes

Haskell 226 bytes, including the whitespace for layout ;) z=[fI$ (++) \ (fi zz 1 "Fi" ) \ (fi zz 2 "Bu" ) \ :[show zz] | zz<-[1..]] fI (zZ:zz) | zZ==[] \ = concat ...

View answer
73 answers
votes
18k views
Why isn't it ending?
0 votes

Java, equal but not? import java.util.HashMap; import java.util.Map; public class Endless { static class A { public A(int a) { b = a; } int b; @...

View answer