This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one
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
package main | |
import ( | |
"code.google.com/p/go-tour/tree" | |
"fmt" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
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
package main | |
import ( | |
"code.google.com/p/go-tour/wc" | |
"strings" | |
) | |
func WordCount(s string) map[string]int { | |
a := strings.Split(s, " ") | |
res :=make(map[string]int) |
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
// ==UserScript== | |
// @name FlandreFaveriteSubclub | |
// @namespace FlandreDaisuki | |
// @description 註冊字幕組 | |
// @include http://share.dmhy.org/* | |
// @include https://share.dmhy.org/* | |
// @match http://share.dmhy.org/* | |
// @match https://share.dmhy.org/* | |
// @version 2015.09.28 | |
// @grant none |
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
var question = [9, 4, 7, 20, 8, 11, 3]; | |
var q = question.map(function(e){ | |
return {left:null, right:null, num:e} | |
}) | |
// {}是一個有左右樹的結構,若節點左右皆為null為葉節點 | |
for(var i = 0; i < question.length-1; i++) { | |
//迴圈 n-1 次 | |
q.sort(function(a, b){return a.num-b.num}); |
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
/** | |
* Definition for a binary tree node. | |
* function TreeNode(val) { | |
* this.val = val; | |
* this.left = this.right = null; | |
* } | |
*/ | |
/** | |
* @param {TreeNode} root | |
* @return {TreeNode} |
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 repImg( tar ) { | |
var div = document.createElement( 'div' ); | |
div.style.height = tar.height + 'px'; | |
div.style.width = tar.width + 'px'; | |
div.style.display = 'inline-block'; | |
div.style.backgroundColor = 'transparent'; | |
// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
var isFirefox = typeof InstallTrigger !== 'undefined'; |
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
// ==UserScript== | |
// @name Flanico | |
// @namespace FlandreDaisuki | |
// @description A HTML5 based niconico player | |
// @include http://www.nicovideo.jp/watch/* | |
// @match http://www.nicovideo.jp/watch/* | |
// @exclude | |
// @version 2015.07.14 | |
// @grant none | |
// ==/UserScript== |
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
#include <GL/glut.h> | |
#include <cstdio> | |
#include <cmath> | |
GLfloat rot = 0.0; | |
GLfloat PI = (GLfloat)3.14159265; | |
GLfloat seed_2 = 0.0; | |
enum EXAMPLE{ NORMAL, ROTATE, TRANSLATE, SCALE }; | |
EXAMPLE mode = SCALE; |
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 fetch from "/Users/dannvix/node_modules/node-fetch"; | |
import Promise from "/Users/dannvix/node_modules/promise"; | |
const urls = [ | |
"http://www.google.com", | |
"http://www.yahoo.com", | |
"http://www.microsoft.com", | |
]; | |
(function fetchUrl(urlIdx) { |
OlderNewer