This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on http://nichol.as/zeromq-an-introduction | |
package main | |
import ( | |
"fmt" | |
zmq "github.com/pebbe/zmq4" | |
"log" | |
"math/rand" | |
"os" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
# My first Ruby program | |
require "json" | |
if ARGV.empty? | |
puts "Usage gpx2json.rb filename" | |
exit | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *a = [NSArray arrayWithObjects:@"a", @"c", @"d", @"b", @"k", nil]; | |
NSArray *b = [NSArray arrayWithObjects:@"z", @"a", @"d", @"b", @"m", nil]; | |
NSComparator comparator = ^NSComparisonResult(id obj1, id obj2) { | |
return [obj1 caseInsensitiveCompare:obj2]; | |
}; | |
NSArray *sortedA = [a sortedArrayUsingComparator:comparator]; | |
NSArray *sortedB = [b sortedArrayUsingComparator:comparator]; |