Developer only event at SXSW (code puzzle gets harder with more tweets)
hackerunderground.com
hackerunderground.com
$data = "http://hackerunderground.com/solution/blank;
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$base = curl_exec($ch);
for($i=0;$i<10000;$i++)
{
$data = "http://hackerunderground.com/solution/$i;
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if($response != $base)
{
echo $i;
}
}
I like my solution best. Everyone should try it!It's called stay home and get shit done.
Sorry for the meta, but I am missing the old HN.
I doubt we would be able to have the whole front page dedicated just to Erlang news if the need appeared.
It seems that the problem of maintaining quality of discussion in an open forum remains unsolved.
Maybe limits to entry (like the problem in the link) or ability to provide negative feedback to posters would help.
I would rather work an effective 4 hours a day (which you end up doing, or less, anyway, between all the web surfing and snarky comments on HN), take a few weeks off a year, take the odd year off, and actually enjoy life through meeting and interacting with other people.
The impression that I get is that the program is full of self-proclaimed experts who pack themselves and their 2 page bio's onto panels to talk about subjects that nobody outside of that room cares about, and that nobody in the room will ever actually implement or do anything about.
I applaud the effort of setting up an area of sxsw that is more hackerish - but it would probably be better to just organize something separately, preferably in a different city and at a different time.
Edit: relevant: http://ttk.me/t4AY6
Elite 'hacker' group claims to hate marketing guru/bullshit tactics, then proceeds to ply the hell out of everyone to spread their concept in a viral Twitter hashtag manner.
Granted, I totally just did it because that puzzle was way too easy, but c'mon now.
... but I still did the puzzle.
[edit] And everyone else is doing it too, and posting their solutions here! "Blazing guitarpocalypse"[1] indeed.
I might attend the event, but that's mostly because I'm in Austin and feeling curious, and not because the website convinces me the event will have a high quality.
[1]http://www.codinghorror.com/blog/2007/02/fizzbuzz-the-progra...
This reminds me of this awesome thread on Sitepoint (5 pages of different ways to output the numbers 0-9): http://www.sitepoint.com/forums/php-34/write-loop-php-prints...
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?}
dpvar numbers = [];
require("./underscore-min.js"); var dupe = _.reject(numbers, function(number) { return _.lastIndexOf(numbers, number) == _.indexOf(numbers, number); }); console.log(dupe);
var arr = (paste)
arr.sort()
for(var i = 0;i<arr.length;i++){if(arr[i+1] == arr[i]){console.log(arr[i])}}
function find_dupe(a){ if(a.length==0) return -1;
if (a[0]==a[1]) return a[0]; else return find_dupe(a.slice(1,a.length)); }
BTW, are loops more efficient than recursion in JS? It sure seems like a lot of JS libraries out there including jQuery avoid recursion like plague.In this case, the loop will outperform recursion because of all of the slice calls in the recursive version.
Is is each number delimited by a (random?) alphabetic letter? Is this to make parsing into Excel/an array harder?
Also, even the new 'harder' puzzle is easy to solve in Excel. Maybe that isn't a bad thing, however.