4 ms·
It's also pretty easy to do in Excel, favored tool of "marketing gurus". Find/replace, import, pivot.
by RodgerTheGreat 16y ago
It's also pretty easy to do in Excel, favored tool of "marketing gurus". Find/replace, import, pivot.
- josegonzalez 16y agoI actually found a solution for it in excel before writing the following: 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.
- jeresig 16y agosort + callback is what I did in JavaScript: .sort(function(a,b){if(a==b){throw a;}return a-b;});
- josegonzalez 16y agoDid you eval the dom to get the dataset?
- false 16y agoI did :) JSON.parse(p.innerHTML.split('\n')[2])
- zdw 16y agoThe point was posting a hack. "most" people don't know unix shell. I'd consider your mention of Excel to be a hack, as I honestly don't have a clue with it beyond the basics.