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
require "csv" | |
MAX = 50 | |
EXISTING = 18 | |
EMAILCOLNUM = 5 | |
DUPLICATE = 1 | |
def create_data | |
result = [] | |
#csv取得 |
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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<select id="select1"> | |
<option value="">-----</option> | |
<option value="00110">親さくらい</option> |
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
# blank project | |
rails new app_name -T -J -d mysql | |
cd app_name | |
bundle | |
# rails g jquery:install #3.1、3.2から不要? | |
rails g rspec:install | |
rails g controller sample index | |
rails g model book name:string hoge:integer user:references | |
rake db:migrate |
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
people[:name] ||= 'sakurai' | |
unless people[:name] | |
people[:name] = 'sakurai' | |
end |
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
# Railsプロジェクトの作成 | |
rails new book_memo | |
# Railsプロジェクトフォルダへ移動 | |
cd book_memo | |
# 必要なGemのインストール | |
bundle | |
# モデルの作成 |
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
class User | |
def set_name(str) | |
@name = str | |
end | |
def name() | |
p @name | |
end | |
end |
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
// Sample | |
// http://aaronsaray.com/blog/2010/10/19/jquery-show-password-toggle/ | |
// HTML | |
// <input type="password" name="password" id="password" class="showpassword" /> | |
// <input type="password" name="password_confirmation" id="password_confirmation" class="showpassword" /> | |
// <input type="checkbox" value="1" name="show_password" id="show_password"> | |
// js | |
$(function(){ |
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
# 1 | |
(rand(900000000)+10 ** 9).to_s | |
# 2 | |
([(0..9).to_a]*9).map{|i|i.sample}.join | |
# 3 | |
sprintf("%09d", rand(10 ** 9)) | |
# 4 | |
Array.new(9){ Array(0..9).sample }.join | |
# 5 | |
9.times.map{rand 10}.join |
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
"MailCatcher" http://mailcatcher.me/ | |
mocksmtpd |
OlderNewer