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 sum(number) { | |
return (1 + number) * number / 2; | |
} | |
sum(1000); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Title</title> | |
<link href="stylesheets/main.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<header> | |
<hgroup> |
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
SELECT G.Home, G.Away, | |
C1.CountryName, C2.CountryName | |
FROM Game G | |
JOIN Country C1 ON C1.CountryID = G.Home | |
JOIN Country C2 ON C2.CountryID = G.Away; | |
--http://stackoverflow.com/questions/4267929/whats-the-best-way-to-join-on-the-same-table-twice |
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 set_time_limit(0); ?> | |
<!DOCTYPE html> | |
<html lang="zh-tw"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>BigPipe Demo</title> | |
</head> | |
<body id="main"> | |
<div> | |
Hello world |
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
/* | |
* This is Official API Note, use mongojs! | |
*/ | |
var mongojs = require('mongojs'); | |
var db = mongojs('test',['table']); //test 是db的名稱,不需要create. table是集合的名稱 | |
/** | |
* Search All(Find()) | |
* @class |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello World</title> | |
<script type="text/javascript" src="./socket.io/socket.io.js" ></script> | |
<script> | |
var socket = io('http://localhost'); | |
socket.on('connect',function(){ | |
console.log("Hello World"); |
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
// success callback when requesting audio input stream | |
function gotStream(stream) { | |
window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
var audioContext = new AudioContext(); | |
var analyser = audioContext.createAnalyser();//x | |
// Create an AudioNode from the stream. | |
var mediaStreamSource = audioContext.createMediaStreamSource( stream ); | |
// Connect it to the destination to hear yourself (or any other node for processing!) |
NewerOlder