显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]
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
-- Api Effect Manager | |
effect module Api where { command = MyCmd } exposing (request, Response) | |
import Task exposing (..) | |
import Http | |
import Process | |
import Json.Decode as Json exposing ((:=)) | |
import Native.Api |
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 isArray = (a) => { | |
return (!!a) && (a.constructor === Array); | |
}; | |
const isObject = (a) => { | |
return (!!a) && (a.constructor === Object); | |
}; | |
const gunToObj = (obj,getKey,putKey) => { | |
getKey = (typeof(getKey) === 'undefined') ? '_title' : getKey; | |
putKey = (typeof(putKey) === 'undefined') ? 'title' : putKey; |
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
// usage: promisify(function([args..., cb]) { /* do stuff with args then cb */ })() | |
exports.promisify = function(fn) { | |
return function(...args) { | |
return new Promise((resolve, reject) => { | |
fn(...args, (err, result) => { | |
if (err) return reject(err); | |
resolve(result); | |
}); | |
}); | |
}; |
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
/* AVL Tree */ | |
/* A balanced Binary Search Tree */ | |
exception Undefined; | |
module type AvlTree = { | |
type t = int; | |
type height = int; | |
type tree('t) = | |
| Leaf | |
| Node(height, tree('t), 't, tree('t)); |
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
/* Graph */ | |
exception Not_found; | |
type nodes = list(int); | |
type edges = list((int, int)); | |
type graph = | |
| Empty | |
| Graph(nodes, edges); |
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
/* | |
remote-data ported to ReasonML | |
See also https://github.com/krisajenkins/remotedata | |
Tools for fetching data from remote sources (incl. HTTP). | |
*/ | |
type remoteData 'e 'a | |
= NotAsked | |
| Loading |