Before getting to the winners of the coding competition for 1 free ticket and numerous tickets with a 30% discount to the GeeCon, Prague event, I would like to thank Tim Cooke, Campbell Ritchie and Paweł Baczyński for coming up with this idea of the coding contest. Also, a big thanks to all the participants who made this a success!
Free ticket winner
We, the moderators, had a discussion about whose post was the best from among the entries submitted and Adam Czysciak was the unanimous choice. Congratulations to Adam for winning a free ticket to the GeeCon, Prague event. I'll be sending you a purple mooseage with the details of the free ticket.
and his entry with the "moose art" was very popular within the moderators http://www.coderanch.com/forums/posts/list/80/640281#2941279. Adam, that was a great post and rightly deserved to win the contest! Congratulations again. The organizers have decided that you too can get an additional ticket with a 30% discount (along with the free one) if you want to take a friend to the event! I'll get in touch with you privately to take this further.
30% discount winners
As noted during the contest, the organizers are giving away all participants, who submitted a valid entry, a ticket with a 30% discount. The following are those who have won the discount coupons:
I'll be sending out purple mooseages to each one of these winners with the discount code details, in the next 24 hours. Congratulations to all the winners and have fun at the event! Remember, our Marshal Ulf Dittmer will be there too and you get a chance to meet him
Congratulations, and thank you everybody who took part
AC: Please explain the text behind the moose art. You obscured it so well, we couldn't understand it. I know you are creating a class which incorporates a λ but haven't got farther than that!
posted 4 years ago
Well, this moose art is a compiled version of sample class doing all the calculations (in fact this class is a contest solution itself). I took .class file, gzipped it and Base64-encoded. So the main code first decodes and decompresses the String to get byte representation of .class file. Then I create inner anonymous class extending ClassLoader to be able to defineClass() - so that jvm is aware of my Class called '$'. Last step is creating an instance and calling the method '$' plus casting the result to desired Map.
some tricks used:
$: java identifier for byte array
__ = '7' >> 8: __ is an identifier for total class length, the initialization expression is simply 0, it is incremented when reading decompressed stream chunks
1<<('0'>>2) means 1 << (48 / 4) = 1<< 12 = 4096 bytes allocated
$0x7F - ordinary Java identifier starting with $, could be "is" as well
$.length>>0b1111 when calling defineClass means 4096 >> 15 = 0 (look at defineClass signature, this is starting offset)
The .class file is a compiled version of this code:
This "hidden" class could have been retrieved by decompiling the byte representation (althought I'm not sure if there are any jdk8 compatible decompilers yet).
Adam: you definitely deserve another cow! (my brain gave up reading your solution...)
posted 4 years ago
Thanks for all the cows folks The good news to all the other participants is that one of you still has the chance to get this free ticket Unfortunatelly I won't be able to attend GeeCON @Prague (I already miss that mug ), so one of you will be the lucky one. Enjoy!
SCJA, SCJP 5.0, SCWCD 1.4, SCBCD 5, SCEA 5
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
create, convert, edit or print DOC and DOCX in Java