export const calculateAge = (
dateOfBirth: Date,
referenceDate: Date = new Date()
) => {
const referenceYear = referenceDate.getFullYear()
const referenceMonth = referenceDate.getMonth()
const referenceDay = referenceDate.getDate()
const birthYear = dateOfBirth.getFullYear()
#####使ってわかったScalaのここがダメ!Play2によるシステム開発事例 のメモ
##scalaの利点
- ソースコードが50%くらいになる
- バグが減った
- javaとの共用が出来る
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
// ↓ こんなのあるんだってやつ ↓ // | |
/* テーブル情報を一括で取得 */ | |
db.execute("PRAGMA table-info(table-name)"); | |
/* テーブルのユーザーバージョンを取得 */ | |
db.execute("PRAGMA user-version"); | |
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
###titanium CLIで実機転送 | |
ti build -T device --platform iphone -V "証明書名" -P "Provisioning Profile UUID" | |
指定するのは"証明書名"と"UUID"だけど、ようわからん時は | |
以下のように何も指定しないと色々ヒントくれる。 | |
ti build -T device --platform iphone |
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
/**rowに突っ込んだオブジェクトをコールバックイベントで取得する方法**/ | |
var lOnSelected = Ti.UI.createLabel({ | |
width:100, | |
height:50, | |
left:495, | |
textAlign:'center', | |
opacity:0.5, | |
text:'選択' | |
}); |