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
'use strict'; | |
const prompt = require('prompt'); | |
prompt.start(); | |
let accepted = false; | |
while(!accepted) { | |
prompt.get([{ | |
name: 'host', |
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
const dropAllTables = async () => { | |
const tables = requireDir('./database/tables'); | |
const sortedTables = _.sortBy(tables, table => -table[0].order); | |
_.forEach(sortedTables, async table => { | |
await bookshelf.knex.schema.dropTableIfExists(table[0].name); | |
console.log(`dropping ${table[0].name}`); | |
}); | |
}; | |
dropAllTables(); | |
console.log('done dropping'); |
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
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'login-form', | |
templateUrl: 'app/login-form.html' | |
}) | |
export class LoginFormComponent { | |
submitted = false; | |
error = ''; | |
model = { |
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
src/main.rs:1:1: 1:1 error: type name `Citext` is undefined or not in scope [E0412] | |
src/main.rs:1 #![feature(custom_derive, custom_attribute, plugin)] | |
^ | |
<diesel macros>:5:1: 5:71 note: in this expansion of table_body! (defined in <diesel macros>) | |
src/database/schema.rs:1:1: 1:40 note: in this expansion of table! (defined in <diesel macros>) | |
src/database/schema.rs:1:1: 1:40 note: in this expansion of infer_schema! (defined in src/main.rs) | |
src/main.rs:1:1: 1:1 help: run `rustc --explain E0412` to see a detailed explanation | |
src/main.rs:1:1: 1:1 help: no candidates by the name of `Citext` found in your project; maybe you misspelled the name or forgot to import an external crate? | |
src/main.rs:1:1: 1:1 error: type name `Citext` is undefined or not in scope [E0412] | |
src/main.rs:1 #![feature(custom_derive, custom_attribute, plugin)] |
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
vertexData = { | |
x, y, 0.0f, 0.0f, | |
x+w, y, 1.0f, 0.0f, | |
x, y+h, 0.0f, 1.0f, | |
x+y, y+h, 1.0f, 1.0f | |
}; | |
LOG(INFO) << "[sprite] " << x << " " << y << " " << w << " " << h << endl; | |
// example: [sprite] 288 288 32 32 |
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
Tests performed 100 times for each TestData + Serializer pair | |
################################################################################ | |
Test Data: Person | |
Serializer: Ops/sec Avg: Ser Deser Ser+Deser Size: Avg | |
=============================================================================== | |
MessageShark Stream 354.808 373.007 181.495 642 | |
NetSerializer Stream 344.589 352.864 173.695 647 | |
ProtoBuf Stream 316.466 227.366 131.948 687 | |
NetSerializer string 300.554 219.123 126.668 864 |
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
99999 | |
199999 | |
299999 | |
399999 | |
499999 | |
599999 | |
699999 | |
799999 | |
899999 | |
999999 |
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
average xs = div (fromInteger (sum xs)) (fromInteger (length xs)) | |
Couldn't match expected type ‘Integer’ with actual type ‘Int’ | |
In the first argument of ‘fromInteger’, namely ‘(length xs)’ | |
In the second argument of ‘div’, namely ‘(fromInteger (length xs))’ | |
Failed, modules loaded: none. | |
average xs = div (fromInteger (sum xs)) ((length xs)) |
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
board schrodingerscat { | |
ownable card { | |
type enum alive | dead | empty | heisenberg | |
} | |
global gamble { | |
integer count_normal 0 | |
integer count_empty 0 | |
type enum alive | dead | empty | |
} |
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
import itertools | |
from multiprocessing import Queue, Value | |
import MainConfig | |
from Tasks.ITask import ITask | |
from typing import List, Iterator, Tuple | |
from BenchmarkConfig import Benchmark, Task | |
from Tasks.RunSingleSimulationTask import RunSingleSimulationTask |
OlderNewer