int count = 0;
Dictionary<string,int> headers = line.Split(',').ToDictionary(y => y, y => count++);

C# Comma separated string to D...

by neiled, October 08, 2009 16:07, 3 refactorings, tagged with oneliner, Todictionary

Anyone up for the challenge...

Fe2f7a39fccc30dc84a2ccd79dae2bc5 Talk
#!/usr/bin/env ruby

files = ARGV.collect { |fname| File.new(fname, 'w') }
...

Ruby Randomly split input lines.

by Scott Robinson, November 15, 2007 08:56, 2 refactorings, tagged with functional, short, oneliner, one-liner

My first Ruby script. I'm c...

1945ab4cdb87eaf5a5c906fa884c29f1 Talk
curl http://www.cnn.com | perl -ne 'm/>([^<].*?[^>])<\// && print$1."\n"'

Perl Perl one-liner to extract x...

by griflet, November 13, 2007 17:19, 4 refactorings, tagged with xml, perl, oneliner, one-liner, tags, html, xhtml

Hello,
I'm a web-scrapping...

Aae34a7973a8d98e53764a1c89090c55 Talk