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
相関クエリ | |
select T1.shop_id, | |
T1.sales_date, | |
( select sum(cash_amount) | |
from shop_sales_details T2 | |
where T2.shop_id = T1.shop_id | |
and T2.sales_date between T1.sales_date + cast('-1 year' as interval) and T1.sales_date | |
) as cash_amount, | |
( select sum(other0) | |
from shop_sales_details T2 |
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 -*- | |
task :backup do | |
FILES = 3 | |
path = "config/database.yml" | |
info = YAML.load_file(path)["production"] | |
backup_dir = "/backup" | |
unless File.exists?(backup_dir) | |
Dir::mkdir(backup_dir) | |
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
sudo mkdir /usr/local | |
sudo chown -R (ログインユーザー) /usr/local | |
cd /usr/local | |
ln -s /usr/local/homebrew/bin/brew /usr/local/bin/brew |
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
gem "twitter-bootstrap-rails" |
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
/output |
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
package com.luckofwise.accountcall; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.provider.Settings; | |
public class AccountCallActivity extends Activity { | |
/** Called when the activity is first created. */ | |
@Override |
NewerOlder