This file contains hidden or 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
| hogehoge |
This file contains hidden or 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 -*- | |
| # 2012/6/3 tddbc大阪2.0 課題の回答 | |
| # 言語: Ruby | |
| # 自動販売機クラス | |
| # インタフェイス | |
| # add_amount : コイン投入(状態変更) | |
| # haraimodosi : 払い戻しする(状態変更) | |
| # total_amount : 投入金額返す |
This file contains hidden or 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
| // ルート要素以下しか検索しないjQueryオブジェクトを作る | |
| // | |
| // 使い方: | |
| // var $part = $.partJQuery('#dialog'); | |
| // $part('#hogehoge'); // #dialogの子孫要素しか検索しない | |
| // | |
| // jQuery.fn.sub() の実装をほぼパクった。 | |
| jQuery.partJQuery = function(root) { | |
| function PartJQuery( selector, context ) { | |
| return new PartJQuery.fn.init( selector, context ); |
This file contains hidden or 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
| export MYSQL_PS1="[\\u.\\d@開発]>\\_" | |
This file contains hidden or 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
| ## RDBMSでのツリー表現 | |
| RDBMSでツリーデータを表現するためには大きく4つの手法がある | |
| * Adjacency relation | |
| * Nested sets | |
| * Materialized path | |
| * Nested intervals | |
| ## ツリーデータはいつ使う? |
This file contains hidden or 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 -*- | |
| require 'spec_helper' | |
| describe Hoge do | |
| shared_examples_for "shared" do | |
| it "validate_amount!" do | |
| hoge.should be_moge | |
| end | |
| end |
This file contains hidden or 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
| # ':/?*[]\ は削除する | |
| # 31文字以内に切り詰める | |
| # http://support.microsoft.com/kb/436482/ja | |
| def normalize_excel_sheet_name(str) | |
| str.gsub(/[':\/?*\[\]]/, '').slice(0, 31) | |
| end |
This file contains hidden or 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
| Hilite = { | |
| exact: false, | |
| style_name: 'hilite', | |
| style_name_suffix: true | |
| }; | |
| Hilite.hiliteHTML = function(html, query) { | |
| var re = new Array(); | |
| for (var i = 0; i < query.length; i ++) { | |
| query[i] = query[i].toLowerCase(); |
This file contains hidden or 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 check_list | |
| file = Tempfile.new("scl") | |
| temp_siwake = ::TempSiwake.find(params[:id]) | |
| output_csv_file_path = "fname.csv" | |
| pid = Process.fork { | |
| @rows = load_rows(params[:id]) | |
| CSV.open(file.path, "w+") {|csv| | |
| @rows.each_with_index {|row, i| |