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
Xzibit = Object clone do( | |
dawg = method(what, | |
"yo dawg" print. | |
what print. | |
"clone" print. | |
self | |
). | |
so_you_can = method( | |
"so you can print" print. |
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
Xzibit = Object clone do( | |
dawg = method(what, | |
"yo dawg" print. | |
what print. | |
"clone" print. | |
self | |
). | |
so_you_can = method( | |
"so you can print" print. |
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
jsPDF - Create PDFs with HTML5 JavaScript Library | |
http://jspdf.com/ | |
の練習 | |
htmlをpdfにしてみます |
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
body { | |
background: #000; | |
} |
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
* { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
} | |
body { | |
background: #dff; | |
font: 30px sans-serif; | |
} |
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
参考: | |
夏休みに息子とゲームを作ることにした | |
http://black.ap.teacup.com/akiyah/1810.html | |
TODO: | |
・3キャラごとに耐久力を変える | |
・ステージクリアして次のステージに行けるようにする | |
・Nexus7のSleipnirでダブルタッチしても拡大縮小が動かないようにする | |
・blogに張った時にタッチできないようなので何とかする |
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
* { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
} | |
body { | |
background: #fdd; | |
font: 30px sans-serif; | |
} |
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
# install.packages('httpRequest') # 未インストールの場合 | |
require('httpRequest') | |
dau <- function(date) { | |
# 本当はデータベースなどから集計してDAUを出すが、ここではサンプルのため乱数にしている | |
value <- floor(runif(1) * 1000) | |
} | |
plot_dau <- function(date) { | |
value <- dau(date) |
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
x <- rnorm(mean=0,sd=1,n=10000) | |
mean(x) # 平均 | |
sd(x) # 標準偏差 | |
var(x) # 分散(varは実は不偏分散) | |
sum((x - mean(x)) ** 2) / (length(x) - 1) # varはこれと一致する | |
vx <- sum((x - mean(x)) ** 2) / length(x) # 母分散(不偏分散で無い方の分散)。varとほとんど同じ。 | |
n <- 10 # サンプルサイズ | |
vy1s <- c() |
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
x <- c(53,46,55,53,61,58,40,56,49,42) | |
var(x) # 不偏分散 | |
# => 47.56667 | |
mean(x) # 平均 | |
# => 51.3 | |
std <- function(x) sd(x)/sqrt(length(x)) | |
std(x) # 標本標準誤差 |
OlderNewer