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 xhr; | |
function requestFile( data , method , fileName , async ){ | |
xhr = new XMLHttpRequest(); | |
xhr.open( method , fileName , async ) ; | |
xhr.onreadystatechange = function(){ | |
if (xhr.readyState==4){ | |
//alert("hello!") | |
} | |
}; |
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
pre { | |
font-size: 12px; | |
background: #000; | |
color:white; | |
line-height: 20px; | |
overflow: auto; | |
-moz-border-radius: 4px; | |
-webkit-border-radius: 4px; | |
opacity:0.9; | |
} |
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 WIDTH=600; | |
const HEIGHT=450; | |
//canvas context | |
var ctx; | |
//キー入力 | |
var key=[0,0,0,0,0]; // left, right, up, down | |
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 RIGHT=0; | |
const LEFT=1; | |
const UP=2; | |
const DOWN=3; | |
const START_POS=-1; | |
const GOAL_POS=-2; | |
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
# -*- coding: utf-8 -*- | |
class DataObj | |
attr_accessor :score | |
def initialize | |
@score=0 | |
end | |
end | |
class SaveData |
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
#-*- coding: utf-8 -*- | |
# 今までのインスンタンス変数を引き継ぎながら | |
# オブジェクトにインスタンス変数を追加するには | |
# どのようしたらいいでしょうか | |
class DataObj | |
attr_accessor :ver,:a,:b,:c | |
def initialize(obj) # | |
@ver=0 | |
@a,@b,@c=0,1,2 |
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
#! /usr/bin/python | |
#coding:utf-8 | |
import MeCab | |
import twitter | |
import os | |
import re | |
username="" | |
password="" |
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
#/usr/bin/python | |
# -*- encoding:utf8 -*- | |
import mechanize | |
br = mechanize.Browser() | |
br.set_handle_robots(False) | |
url='http://mixi.jp' | |
username="<your email>" | |
password="<your password>" |
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
#/usr/bin/python | |
# -*- encoding:utf8 -*- | |
import sqlite3 , twitter | |
from time import strftime ,sleep | |
""" | |
Twitterのログをとる | |
要:Python-Twitter | |
$sudo easy_install twitter などする |
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
<!-- | |
Togetterがなんか気持ち悪いので書き直した。 | |
stylish @Firefox用 | |
--> | |
@namespace url(http://www.w3.org/1999/xhtml); |
OlderNewer