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
#============================================================================== | |
# ■ Game_Temp | |
#------------------------------------------------------------------------------ | |
# セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン | |
# スタンスは $game_temp で参照されます。 | |
#============================================================================== | |
class Game_Temp | |
#-------------------------------------------------------------------------- | |
# ● 公開インスタンス変数 |
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
package net.sue445.jubeatplusplus.comparator; | |
import java.io.Serializable; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* ひらがなをソートするためのコンパレータ | |
* @author sue445 |
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
sql = <<SQL | |
SELECT * FROM employees | |
SQL | |
sql = <<EOS | |
SELECT * FROM employees | |
EOS | |
html = <<HTML | |
<div> |
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
-- カンマ前置き派 | |
SELECT name | |
, title | |
FROM precures p | |
WHERE p.color = 'yellow' | |
AND p.title = 'smile_precure' | |
ORDER BY name | |
-- カンマ後ろ置き派 | |
SELECT name, |
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
# -*- encoding: utf-8 -*- | |
=begin | |
railsプロジェクトの不要ファイルを削除する | |
usage: | |
/path/to/workspace/ | |
├── app1 | |
└── app2 |
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 Array | |
# ruby 1.9系と2.0系で Array#shuffle の結果が異なるため独自実装 | |
# ref. | |
# * https://github.com/ruby/ruby/blob/e3efce6df1aa691e17c59f442b35b4fd129d3a13/array.c#L4012 | |
# * https://github.com/ruby/ruby/blob/ruby_2_0_0/NEWS#L35-L36 | |
# * https://github.com/ruby/ruby/commit/e3efce6df1aa691e17c59f442b35b4fd129d3a13 | |
def my_shuffle(random) | |
i = self.length | |
dst_array = self.clone |
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
#!/bin/bash | |
readonly JENKINS_RAILS_ENV="test" | |
export LANG=ja_JP.UTF-8 | |
# Jenkins build script | |
run() | |
{ | |
command=$1 |
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.9.3p194 :001 > (1..10).each_cons(3){|a, b, c| puts "#{a}, #{b}, #{c}" } | |
1, 2, 3 | |
2, 3, 4 | |
3, 4, 5 | |
4, 5, 6 | |
5, 6, 7 | |
6, 7, 8 | |
7, 8, 9 | |
8, 9, 10 | |
=> nil |
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
def heart(){ | |
println "Heart" | |
throw new Exception() | |
} | |
def precure(){ | |
println "Precure!" | |
} | |
try{ |
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
describe("num", function(){ | |
var num = 0; | |
it("should == 1 (1st)", function(){ | |
num++; | |
expect(num).toEqual(1); | |
}); | |
it("should == 1 (2nd)", function(){ | |
// 毎回初期化されてるならこのテストも通るはず |