Skip to content

Instantly share code, notes, and snippets.

@imaz
imaz / ===について
Created January 22, 2012 13:34
ハーイみんなみてるー?ここわからなかったからだれか理由おしえてくんなそ!(^o^)/
case式は===演算子を使ったif式と等価な処理を行う
[14] pry(main)> (1..3) === 3
=> true
[15] pry(main)> (1..3) === 4
=> false
[19] pry(main)> obj = []
[19] pry(main)> case obj
[19] pry(main)* when Array
[19] pry(main)* puts "array"
@imaz
imaz / codebreaker.css
Created August 5, 2011 09:13
CodeBreaker(4桁とれたとこまで)
body {
background-color : #cccccc;
color : #000000;
width : 400px;
}
div{
float:left;
width:200px;
}
@imaz
imaz / SQL_newline.sql
Created August 1, 2011 03:01
正規表現(regular expression)
/* ★SELECT|★FROM|★WHERE|★GROUP BY|★ORDER BY|★UNION */
/* SELECT ★ */
/* column_alias,★ */
/* table_alias,★ */
/* ★(!BETWEEN)AND */
--before
(?=SELECT)|(?=FROM)|(?=WHERE)|(?=GROUP\sBY)|(?=ORDER\sBY)|(?=UNION)
(?<=SELECT\s)
(?<=AS\s(\w\d)+,)
@imaz
imaz / pomodoro.css
Created July 20, 2011 02:11
pomotimer作ってみた
body {
background-color:#ccffdd;
color:#000000;
}
@imaz
imaz / fade.html
Created July 20, 2011 02:03
js fade in/out
<html>
<head>
<title>js study fade</title>
<script language="JavaScript">
<!--
itv = 50;
cnt = 0;
function strFade(str){
c = str.charAt(cnt++);
@imaz
imaz / textWrite.html
Created July 20, 2011 01:45
pomotimer作る時にinnerHTMLを練習したもの
<html>
<head>
<title>js study innerHTML</title>
<script language="JavaScript">
<!--
function strWrite(str){
document.getElementById("ID").innerHTML = str;
}
function strCount(){
@imaz
imaz / pomodoro.html
Created July 13, 2011 16:31
pomoの中身(うろ覚え)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<meta http-equiv="Content-Script-Type" content="text/javascript" charset="UTF-8">
<title>pomodoro timer</title>
<script type="text/javascript" src="./pomodoro.js"></script>
</head>
<body>