This file contains hidden or 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
function firstNPrime(n){ | |
var i = 1, j = 0, k = 0; | |
var result = [] | |
while(++i && result.length != n){ | |
k = i | |
j = 0 | |
while(--k){ | |
if(i % k == 0) j++ | |
} | |
if(j == 1)result.push(i) |
This file contains hidden or 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
payload: [ | |
%{ | |
from: %Hedwig.JID{resource: "", server: "iot.net", user:""}, | |
name: "delay", | |
payload: ["Offline Storage"], | |
stamp: "2015-08-28T10:01:23.226677Z", | |
xmlns: "urn:xmpp:delay"}, | |
%{ |
This file contains hidden or 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
int int_to_bin (unsigned int n){ | |
unsigned char bytes[4]; | |
bytes[0] = (n >> 24) & 0xFF; | |
bytes[1] = (n >> 16) & 0xFF; | |
bytes[2] = (n >> 8) & 0xFF; | |
bytes[3] = n & 0xFF; | |
return bytes; | |
} |
This file contains hidden or 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
{'iphone': 'resources/splash/splash-320x480.png', | |
'iphone_2x': 'resources/splash/[email protected]', | |
'iphone5': 'resources/splash/[email protected]', | |
'ipad_portrait': 'resources/splash/splash-768x1024.png', | |
'ipad_portrait_2x': 'resources/splash/[email protected]', | |
'ipad_landscape': 'resources/splash/splash-1024x768.png', | |
'ipad_landscape_2x': 'resources/splash/[email protected]', | |
This file contains hidden or 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
znajdz_3 ( [A, A, A | Rest] = T) -> T | |
znajdz_3 ( [ _ | Rest] ) -> znajdz_3 ( Rest ) |
This file contains hidden or 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
function test_s(times){ | |
var i = times; | |
var t = Date.now() | |
while(i--){ | |
var a = 1 | |
var b = 2 | |
var c = 3 | |
var d = 4 | |
var e = 5 | |
a = a * 5 |
This file contains hidden or 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
sp.prop = () -> | |
This file contains hidden or 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
gen_query(git, Data = #git{}) -> | |
Query_Git = "insert into erlproject_git " ++ | |
" (id, name, full_name, owner_id, html_url, description," ++ | |
" created_at, updated_at, pushed_at , clone_url," ++ | |
" stars, open_issues, forks, source) values ('" ++ | |
integer_to_list(Data#git.id) ++ "' , '" ++ | |
Data#git.name ++ "' , '" ++ | |
Data#git.full_name ++ "' , '" ++ | |
integer_to_list(Data#git.owner#owner.id) ++ "' , '" ++ | |
Data#git.html_url ++ "' , '" ++ |
This file contains hidden or 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
.run ($location, $rootScope) -> | |
$rootScope.isActive = (path) -> | |
$location.path().replace(/\?.*/,"") == path |