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: Simulating C++0x literals - with enums! Pinmemberexyyle4-Jul-09 20:33 
GeneralUbiquitous apr_bucket errors. [modified] Pinmemberdpminusa8-Jun-09 2:34 
GeneralHard to find bugs PinmemberRomTibi30-May-09 12:44 
GeneralRe: Hard to find bugs PinmemberWalt Fair, Jr.30-May-09 18:34 
GeneralRe: Hard to find bugs PinmemberRomTibi30-May-09 20:05 
GeneralRe: Hard to find bugs Pinmembersupercat94-Jun-09 6:43 
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 
GeneralRe: local variables in EF Linq query PinmemberJudah Himango17-Apr-09 8:25 
GeneralSolution PinmemberMark Nischalke21-Apr-09 14:20 
GeneralMemory allocation woes PinmemberComputafreak31-Mar-09 10:45 
GeneralRe: Memory allocation woes Pinmvpleppie6-Apr-09 2:52 
GeneralRe: Memory allocation woes PinmemberPhil J Pearson7-Apr-09 3:39 
GeneralRe: Memory allocation woes PinmemberhopingToCode7-Apr-09 6:35 
GeneralRe: Memory allocation woes PinmemberComputafreak7-Apr-09 7:23 
GeneralRe: Memory allocation woes PinmemberGary R. Wheeler16-Apr-09 1:20 
GeneralRe: Memory allocation woes PinmemberChris Losinger19-Apr-09 10:29 
GeneralRe: Memory allocation woes Pinmembersupercat928-May-09 9:54 
GeneralRe: Memory allocation woes PinmemberGary R. Wheeler28-May-09 13:27 
GeneralRe: Memory allocation woes Pinmembersupercat929-May-09 6:42 
GeneralRe: Memory allocation woes PinmemberJörgen Sigvardsson28-Apr-09 7:50 
GeneralRe: Memory allocation woes PinmemberComputafreak28-Apr-09 8:02 
RantSilverlight huh? PinmemberTodd Smith31-Mar-09 8:19 
GeneralRe: Silverlight huh? Pinmemberdan neely31-Mar-09 9:22 
GeneralRe: Silverlight huh? PinmemberComputafreak31-Mar-09 9:36 
GeneralRe: Silverlight huh? PinmemberTodd Smith31-Mar-09 9:58 
GeneralRe: Silverlight huh? PinmemberComputafreak31-Mar-09 10:07 

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
Web04 | 2.8.1411028.1 | Last Updated 29 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid