Click here to Skip to main content

Clever Code

RSS Feed RSS feed

Showcase your best code, your most elegant solution, or your most hard fought subtle bug you've found and fixed. Please, do not post programming questions in this forum - they will be removed.

 
GeneralRe: Hard to find bugs PinmvpLuc Pattyn4-Jun-09 13:49 
GeneralRe: Hard to find bugs Pinmembersupercat95-Jun-09 9:48 
GeneralRe: Hard to find bugs PinmvpLuc Pattyn5-Jun-09 10:06 
GeneralRe: Hard to find bugs Pinmembersupercat95-Jun-09 11:24 
GeneralRe: Hard to find bugs PinmemberGary R. Wheeler14-Jun-09 2:32 
GeneralRe: Hard to find bugs PinmemberMaxxx_14-Jun-09 20:28 
GeneralRe: Hard to find bugs PinmemberMaxxx_14-Jun-09 20:08 
GeneralFun Perl one-liner PinsitebuilderMichael Dunn20-May-09 19:45 
Some time ago, there were some puzzle posts in the Lounge where the content was the ASCII values, in hex, of text. So instead of "Hello!" it was "48 65 6C 6C 6F 21". Of course, the talk turned to how to decipher the posts using code. After a few iterations with some other folks who knew Perl, I ended up with:
print map { chr hex } split foreach( <> )
Complicated, elegant, and subtle... all at once!
 
(I only later remembered that foreach and for do the same thing, so I could've made it even shorter!)
 
--Mike--
Dunder-Mifflin, this is Pam.

GeneralRe: Fun Perl one-liner Pinmvpleppie25-May-09 0:33 
GeneralRe: Fun Perl one-liner Pinmemberdpminusa8-Jun-09 1:57 
GeneralRe: Fun Perl one-liner PinsitebuilderMichael Dunn9-Jun-09 16:57 
GeneralRe: Fun Perl one-liner Pinmemberdpminusa9-Jun-09 21:09 
GeneralNothing big, just a small LINQ query [modified] PinmemberComputafreak15-May-09 10:36 
GeneralRe: Nothing big, just a small LINQ query PinmemberRobert Rohde16-May-09 23:27 
GeneralRe: Nothing big, just a small LINQ query [modified] PinmemberComputafreak17-May-09 2:39 
GeneralRe: Nothing big, just a small LINQ query PinmemberPIEBALDconsult17-May-09 6:41 
GeneralRe: Nothing big, just a small LINQ query PinmemberComputafreak17-May-09 6:58 
GeneralRe: Nothing big, just a small LINQ query PinmemberPIEBALDconsult17-May-09 11:54 
GeneralRe: Nothing big, just a small LINQ query PinmemberComputafreak17-May-09 22:55 
GeneralRe: Nothing big, just a small LINQ query PinmemberPIEBALDconsult18-May-09 4:45 
GeneralRe: Nothing big, just a small LINQ query PinmemberComputafreak18-May-09 5:10 
GeneralRe: Nothing big, just a small LINQ query PinmemberPIEBALDconsult18-May-09 5:15 
Generallocal variables in EF Linq query PinmemberMark Nischalke1-Apr-09 3:39 
GeneralRe: local variables in EF Linq query PinmemberJudah Himango17-Apr-09 8:12 
GeneralRe: local variables in EF Linq query PinmemberMark Nischalke17-Apr-09 8:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 21 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid