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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/handsontable/0.38.1/handsontable.full.min.css" integrity="sha256-e7GfXjCNVdZOjk1j8xbbZKQ9yDgx1acnLPTOOuPRJso=" crossorigin="anonymous" /> | |
</head> | |
<body> |
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 addScript(attribute, text) { | |
return new Promise(function(resolve, reject) { | |
var script = document.createElement('script'); | |
for (var attr in attribute) { | |
var value = attribute[attr]; | |
if (value) { | |
script.setAttribute(attr, value); | |
} | |
} |
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
import tkinter | |
import random | |
import time | |
tk=tkinter.Tk() | |
tk.title("Game") #窗口名稱 | |
tk.resizable(0,0) #表示畫面大小不能被拉 | |
tk.wm_attributes("-topmost",1) #視窗移到最上層 | |
canvas=tkinter.Canvas(tk,width=700,height=700,bd=0) |
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
/* Atomic boolean for golang | |
A process-atomic boolean that can be used for signaling between goroutines. | |
Default value = false. (nil structure) | |
*/ | |
package main | |
import "sync/atomic" |
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
const { Left, Right } = require('fantasy-eithers') | |
const daggy = require('daggy') | |
Function.prototype.map = function (f) { | |
return x => f(this(x)) | |
} | |
//- Where everything changes... | |
const login = user => | |
user.name == 'Tom' |
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
{ | |
"name": "webpack-sass", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "webpack-dev-server --open --mode development", | |
"build": "webpack -p" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.26.0", | |
"babel-loader": "^7.1.4", |
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
/* Pulled from https://github.com/joyent/node/blob/master/deps/uv/include/uv.h */ | |
/* Expand this list if necessary. */ | |
#define UV_ERRNO_MAP(XX) \ | |
XX(E2BIG, "argument list too long") \ | |
XX(EACCES, "permission denied") \ | |
XX(EADDRINUSE, "address already in use") \ | |
XX(EADDRNOTAVAIL, "address not available") \ | |
XX(EAFNOSUPPORT, "address family not supported") \ | |
XX(EAGAIN, "resource temporarily unavailable") \ | |
XX(EAI_ADDRFAMILY, "address family not supported") \ |
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 fibonacci(n) { | |
return Math.round((Math.pow((1 + Math.sqrt(5)) / 2, n) - Math.pow(-2 / (1 + Math.sqrt(5)), n)) / Math.sqrt(5)); | |
} | |
function trampoline(f) { | |
return function (...args){ | |
var result = f( ...args ) | |
while (typeof result === "function") { | |
result = result() | |
} |
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
while { | |
let x = foo(); | |
bar(x); | |
x != 0 | |
} {} | |
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
<canvas id="sakura"></canvas> | |
<div class="btnbg"> | |
<button type="button" onclick="toggleAnimation(this)">Stop</button> | |
</div> | |
<!-- sakura shader --> | |
<script id="sakura_point_vsh" type="x-shader/x_vertex"> | |
uniform mat4 uProjection; | |
uniform mat4 uModelview; | |
uniform vec3 uResolution; |