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
; unless macro | |
(define-syntax unless | |
(syntax-rules () | |
((_ pred b1 ...) | |
(if (not pred) (begin b1 ...))))) | |
; 動作テスト | |
(let ((i 0)) | |
(unless (= i 1) | |
(display "i != 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
<doctype html> | |
<html> | |
<head> | |
<script src="processing-1.0.0.min.js"></script> | |
<script type="application/javascript"> | |
/* | |
* This code searches for all the <script type="application/processing" target="canvasid"> | |
* in your page and loads each script in the target canvas with the proper id. |
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
runTime=function(func){ | |
var before = (new Date()).getTime(); | |
func(); | |
return ((new Date()).getTime() - before); | |
} | |
function heikin(arr){ | |
var sum=0; | |
var n = arr.length; | |
for (var i =0; i < n; i++) sum += arr[i]; |
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
var a = 1; | |
(function(num){ | |
var a = 10; | |
// function literal | |
//var f = function(b){return a + b;}; | |
// eval | |
//eval("var f = function(b){return a + b;}"); |
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
/* | |
* jquery.smarthistory.js | |
* | |
* Copyright (c) 2010 Kazuhito Hokamura | |
* Licensed under the MIT License: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* @author Kazuhito Hokamura (http://webtech-walker.com/) | |
* @version 0.0.1 | |
* |
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
# -*- coding: utf-8 -*- | |
import urllib | |
import time | |
def wbs_request(method_string, url, args={}): | |
params = urllib.urlencode(args) | |
method = method_string.lower() | |
if method == ':get': | |
resp = urllib.urlopen( "%s?%s" % (url, params) ) |
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
[buildout] | |
parts = pq | |
[pq] | |
recipe = z3c.recipe.scripts | |
eggs = pyquery | |
interpreter=py |
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
[buildout] | |
parts = demo | |
[demo] | |
recipe = zc.recipe.egg | |
eggs = docutils | |
pygments | |
sphinx | |
rstspreadsheet | |
interpreter = py |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
from multiprocessing import cpu_count, Process, Queue | |
from os import getpid | |
from time import sleep | |
from random import randint | |
def put_queue(queue, num): | |
sleep(num) | |
queue.put(num) |
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
// 今開いてるページに変更があったらリロード | |
var ypos = location.hash.replace(/^[#]/,""); | |
(!!ypos && (typeof ypos === "number"))&&window.scroll(0,ypos); | |
setInterval(function(){ | |
var self = arguments.callee; | |
var req = new XMLHttpRequest; | |
req.open("GET",location.href,true); | |
req.onload = function(){ |