引き続きruby関係をやって行きたいと思いますので、
どうぞよろしくお願いします。しょぼいですが。。頑張ります!
write down to achieve the goal... this blog for personal use only to study english and programming. sorry...
require 'rubygems'
require 'twitter'
#dev.twitter.comで取得した情報を入力して下さい
YOUR_CONSUMER_KEY = "AAAA"
YOUR_CONSUMER_SECRET = "BBBB"
YOUR_OAUTH_TOKEN = "CCCC"
YOUR_OAUTH_TOKEN_SECRET = "DDDD"
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end
# Initialize your Twitter client
client = Twitter::Client.new
#以下は好きなようにソースを組み込んで下さい
# タイムライン取得(大量にフォローしている場合は実行前に注意!)
client.home_timeline.each do |status|
puts "#{status['text']}"
end
/* "struct Car" Declaration */
typedef struct Car {
int num;
double gas;
} Car;
int main(void) {
printf("the size of integer is %ld.\n", sizeof(int));
printf("the size of double is %ld.\n", sizeof(double));
printf("the size of struct Car is %ld.\n", sizeof(Car));
printf("the size of pointer of struct Car is %ld.\n", sizeof(Car *));
return 0;
}