Javascript benchmark idea
function fib(n) {
if (n < 2) return n;
return fib(n - 2) + fib(n - 1);
}
console.log(fib(35));
// Add an URL parser to JQuery that returns an object | |
// This function is meant to be used with an URL like the window.location | |
// Use: $.parseParams('http://mysite.com/?var=string') or $.parseParams() to parse the window.location | |
// Simple variable: ?var=abc returns {var: "abc"} | |
// Simple object: ?var.length=2&var.scope=123 returns {var: {length: "2", scope: "123"}} | |
// Simple array: ?var[]=0&var[]=9 returns {var: ["0", "9"]} | |
// Array with index: ?var[0]=0&var[1]=9 returns {var: ["0", "9"]} | |
// Nested objects: ?my.var.is.here=5 returns {my: {var: {is: {here: "5"}}}} | |
// All together: ?var=a&my.var[]=b&my.cookie=no returns {var: "a", my: {var: ["b"], cookie: "no"}} | |
// You just cant have an object in an array, ?var[1].test=abc DOES NOT WORK |
var request = require('superagent'); | |
var stores = {}; | |
var models = { | |
'MGA82ZP/A': 'iPhone 6 Plus 16G Grey ', | |
'MGA92ZP/A': 'iPhone 6 Plus 16G Silver', | |
'MGAA2ZP/A': 'iPhone 6 Plus 16G Gold ', | |
'MGAH2ZP/A': 'iPhone 6 Plus 64G Grey ', | |
'MGAJ2ZP/A': 'iPhone 6 Plus 64G Silver', | |
'MGAK2ZP/A': 'iPhone 6 Plus 64G Gold ', |
Javascript benchmark idea
function fib(n) {
if (n < 2) return n;
return fib(n - 2) + fib(n - 1);
}
console.log(fib(35));
package main
import (
"fmt"
"time"
)
func main() {
concurrency := 2
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/hex" | |
"fmt" | |
"io" | |
) |