This file contains 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
<?php | |
function randomId($length) { | |
$chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
$max = strlen($chars) - 1; | |
$id = ""; | |
for($i = 0; $i < $length; $i++) { | |
$id .= $chars[random_int(0, $max)]; | |
} |
This file contains 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
/* jshint ignore:start */ | |
/* jshint ignore:end */ | |
define('my-new-app/adapters/application', ['exports', 'ember-data', 'my-new-app/config/environment'], function (exports, DS, ENV) { | |
'use strict'; | |
var Adapt = DS['default'].ActiveModelAdapter.extend({ | |
namespace: "api/v1", |
This file contains 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
/* previous code */ | |
app.post("/signup", (req, res) => { | |
var check = client.exists(req.body.username); | |
if(check == 0) { | |
res.send("sorry that name already exists"); | |
//res.render("exists", { | |
// name : req.body.username | |
// }); |
This file contains 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
0x5acba08bf9a325bf8fedbde120f3a375b349d5ff |
This file contains 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 mix(streams) { | |
const length = Math.max(...streams.map(s => s.length)); | |
const numberOfChannels = Math.max(...streams.map(s => s.numberOfChannels)); | |
const sampleRate = streams[0].sampleRate; | |
// assume all streams have the same sample rate for now | |
const result = new AudioBuffer({ | |
length, | |
numberOfChannels, | |
sampleRate |
This file contains 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
pragma solidity ^0.4.10; | |
contract OliverDollar { | |
mapping(address => uint) balances; | |
function OliverDollar() { | |
balances[msg.sender] = 1000000; | |
} | |
function balanceOf(address owner) constant returns (uint256) { |
This file contains 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
pragma solidity ^0.4.10; | |
contract JesseCoin { | |
address jesse; | |
mapping(address => uint) balance; | |
function JesseCoin() { | |
jesse = msg.sender; | |
} | |
This file contains 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
{ | |
"nonce": "0x0000000000000042", | |
"timestamp": "0x0", | |
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"extraData": "0x0", | |
"gasLimit": "0x8000000", | |
"difficulty": "0x400", | |
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"coinbase": "0x3333333333333333333333333333333333333333", | |
"alloc": { |
This file contains 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
{ | |
"config": { | |
"chainId": 113, | |
"homesteadBlock": 0, | |
"eip155Block": 0, | |
"eip158Block": 0 | |
}, | |
"difficulty": "200000", | |
"gasLimit": "0xffffffff", | |
"alloc": { }, |