- Information
- Schedule
- Download
- Documents
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
<VirtualHost *:80> | |
ServerName hoge.alea12.net | |
DocumentRoot /home/alea12/rails/app/public/ | |
<Directory "/home/alea12/rails/app/public"> | |
Options -MultiViews | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> |
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
public class hoge { | |
public static void main (String[] args) { | |
System.out.println("Starting function main."); | |
System.out.println("Creating instance from Fuga class."); | |
Fuga fuga = new Fuga(); | |
System.out.println("Ending function main."); | |
} |
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 VendingMachine { | |
private int inserted_money; | |
private int cola_price; | |
// Constructor | |
VendingMachine() { | |
inserted_money = 0; | |
cola_price = 100; | |
menu(); |
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
<?php | |
/** | |
* 降水量をもとに、雨の強さを気象庁風に表現する | |
* 参考: 気象庁 | 雨と風の表 http://www.jma.go.jp/jma/kishou/know/yougo_hp/amehyo.html | |
* | |
* @example | |
* <code> | |
* echo getRainstatus(15); // => 'やや強い雨' | |
* </code> |
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 Post < ActiveRecord::Base | |
# posts table から、public が 1 なレコードの id 一覧を取得する | |
def self.public_post_id_list | |
Array(select('id').where(public:1).order('id desc')).map{|a| a.id.to_i} | |
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
# Global configuration has been removed, as it was not threadsafe. | |
# Without this, you will face an error saying: NoMethodError: undefined method `configure' for Twitter:Module | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "YOUR_CONSUMER_KEY" | |
config.consumer_secret = "YOUR_CONSUMER_SECRET" | |
config.access_token = "YOUR_ACCESS_TOKEN" | |
config.access_token_secret = "YOUR_ACCESS_SECRET" | |
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
gem 'sass-rails', '~> 4.0.0' | |
gem 'compass-rails', github: 'Compass/compass-rails', branch: 'rails4-hack' |
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
@import 'compass'; | |
* { | |
@include box-shadow(0px 0px 10px black, 0px 0px 10px black); | |
} |
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
mysql_config --socket |