2013-03-01から1ヶ月間の記事一覧
SSL証明書とかの設定が必要。
http://www.1stwebdesigner.com/tutorials/web-design-photoshop-tips-tutorial-screencasts/これが参考になった PhotoshopでPhotoshopのロゴのエンボス加工っぽいのをつくる LetterPress Tutorial Letterpress text tutorial from che mcpherson on Vimeo. …
iOS6からはTwitter frameworkは廃止になるらしく、Social frameworkを使うhttp://d.hatena.ne.jp/h_mori/20121011/1349910121
http://stackoverflow.com/questions/13793162/setvalueforundefinedkey-this-class-is-not-key-value-coding-compliant-for-the StoryboardにおけるOutletとかActionとの接続の関係性がまずい時に起こる。 右クリックして接続関係を出し、!が出てる所を削…
iOS6ユーザーインターフェースのカスタマイズ http://www.raywenderlich.com/ja/26033/ios-6-ユーザーインターフェースのカスタマイズ UIKitでシンプルなお絵かきアプリ http://www.raywenderlich.com/ja/27435/uikitでシンプルなお絵かきアプリ一覧 http://…
初級から中級に上がる際に気になること ・@は何を意味するのか(@protocolとか@interfaceとか) @""が文字列を表すのは知っている ・メモリ管理がよくわからない ARCとかRetainとかNonatomicとか ・ポインタを使うタイミングがいまいちわからない UILabelと…
インスタンスをストップ →EBSをインスタンスからデタッチ →別のインスタンスにアタッチ →別のインスタンスをスタート →当該EBSドライブをマウント →sudoersを編集 →別インスタンスを停止 →EBSをデタッチ →EBSをもとのインスタンスにアタッチ →もとのインスタ…
http://blog.genies-ag.jp/2011/07/amazon-ec2-amazon-linux-vsftpd.html
http://ultrah.zura.org/?p=3072
ダブルクオーテーションやシングルクォーテーションが多い時に使える。 http://www.rubylife.jp/ini/string/index3.html%Q,%qなど。
html_optionsで指定する。 <%= o.select :weighting, options_for_select([ ["Correct", "4", {:class=>"bold"}], ["Good", "3"], ["Average", "2"], ["Poor", "1"], ["Incorrect", "0", {:class=>"bold"}] ], @whatever.weighting.to_s), {}, html_options …
http://stackoverflow.com/questions/12201835/form-inline-inside-a-form-horizontal-in-twitter-bootstrap <form class="form-horizontal"> <div class="control-group"> <label class="control-label" for="inputType">Type</label> <div class="controls"> <input type="text" id="inputType" placeholder="Type"> </div></div></form>
<button class="pull-right"></button>
# coding: utf-8 require 'date' today = Date.today target = Date.parse('2013-06-01') p today.to_s p target.to_s if today < target p "EARLY BIRD" else p "NORMAL REGISTRATION" end
Sauce http://coliss.com/articles/build-websites/verification/software-sauce-all-browser-chcek-for-osx.html
前回のエントリの結末。 sessionにアクセスできるのはコントローラだけで、 モデルとかヘルパーからはsessionにアクセスできないとのこと。数時間格闘した結果、判明した解決策は ヘルパーメソッドに引数を付ける ことだった。ビューではcurrent_userが取れ…
その際にヘルパーからcurernt_userメソッドを呼ぶ方法が知りたい。 curernt_userメソッドをヘルパーメソッドに記述する方法があるけど そうするとsessionにアクセス出来ない。。。事態を整理するとこんな感じ。
http://d.hatena.ne.jp/apo-co/20090928/p1include ApplicationHelper helper :applicationの宣言を追加する。 http://stackoverflow.com/questions/4937208/access-helpers-from-mailer http://stackoverflow.com/questions/1416978/how-to-use-my-view-hel…
http://tobysoft.net/wiki/index.php?Ruby%2FRuby%20on%20Rails%2F%A5%B3%A5%F3%A5%C8%A5%ED%A1%BC%A5%E9%A1%BC%A4%CE%A5%E1%A5%BD%A5%C3%A5%C9%A4%F2%A5%D3%A5%E5%A1%BC%A4%AB%A4%E9%B8%C6%A4%D3%BD%D0%A4%B9%CA%FD%CB%A1今わかったけど コントローラのメソ…
http://blog.scimpr.com/2012/09/15/railsでメール送信をテスト〜actionmailer/ $ rails new mailtest $ rails g scaffold user name email $ rails g mailer my_mailer helloconfig/environments/develompent.rb 以下はGmailを使う時の設定(メールアドレス…
Permission denied (publickey). fatal: The remote end hung up unexpectedlyssh-addというのが必要らしい。 $ ssh-add ~/.ssh/id_rsa.bitbucket.orgしてみると、 Could not open a connection to your authentication agent.というエラーが出た。調べてみ…
強制的にエージェントをスタートする方法 https://newrelic.com/docs/ruby/forcing-the-ruby-agent-to-startconfig/newrelic.yml - :agent_enabled => auto + :agent_enabled => trueまだうまくいかない。
#! /usr/bin/env python # -*- coding: utf-8 -*- import re fin = open("country.txt").readlines() fout = open("output.txt","w") for line in fin: country_name = re.findall("\>.+?\<",line) coutnry_name = [c[1:-1] for c in country_name] name = […
http://www.webmasterworld.com/html/3018309.htm <select> <option value="AF">Afghanistan</option> <option value="AX">ÅLand Islands</option> <option value="AL">Albania</option> <option value="DZ">Algeria</option> <option value="AS">American Samoa</option> <option value="AD">Andorra</option> </select>
Railsサーバーの再起動が必要。 Unicornを使っていたので、 $ killall unicorn_rails $ unicorn_rails -c config/unicorn.rb -Dしたら動いた。
Gemfileに以下を追加してbundle install gem 'twitter-bootstrap-rails' gem 'less-rails' gem 'therubyracer' $ rails g bootstrap:install $ rails g bootstrap:layout application fixed
IMFのWorld Economic Outlook Databasesが公開してる http://www.imf.org/external/pubs/ft/weo/2012/02/weodata/index.aspx GDPにはMERとPPPの2種類がある 実力差を反映させたままでよいときはMERでいいみたい http://detail.chiebukuro.yahoo.co.jp/qa/qu…
国連の統計 DESA 経済社会局の公開しているデータ http://esa.un.org/unpd/wpp/unpp/panel_population.htm 5つまで地域を選んでCSVでダウンロードできる
checkoutで飛ばしてもInvalidとか言われる どうやらTokenが生成されていないこうやってデバッグするらしい logger.debug "The object is #{setup_response.to_yaml}"してみたら ReturnURL is invalidってログ(log/development.log)に書いてあった。よく見…
$ rails c /home/ec2-user/.gem/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- minitest/unit (LoadError)gem install minitestしてからGemfileに gem "minitest"してbundle instal…