Not going to SXSW, but...
tr ',' '\n' | sort -n | uniq -d tr ',' '\n' | sort -n | uniq -d asort($data);
$duplicate = function ($val) use (&$data) {
$count = 0;
foreach ($data as $i => $entry)
if ($val == $entry) $count++;
return $count;
};
foreach ($data as $v)
if (($count = $duplicate($v)) > 1) {
printf("%d, Count %d\n", $v, $count);
break;
}
I assume it would be possible to use a sort+callback to return the value as well. .sort(function(a,b){if(a==b){throw a;}return a-b;}); JSON.parse(p.innerHTML.split('\n')[2])I'd consider your mention of Excel to be a hack, as I honestly don't have a clue with it beyond the basics.
x = File.read('puzle.txt')
y = x.split(/ \w /)
module Enumerable
def dups
inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
end
end
d = y.dups
require 'mathn'
dp = []
d.each {|z| z = z.to_i; dp << z if z.prime?}
dp