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
* ルール | |
** ゲームの目的 | |
** ゲームの内容物 | |
*** 十二支カード 12枚 | |
カード右上に表示されている数字が獲得ポイント。カード下部には、十二支フェイズで発動する特殊能力が表示されています。 | |
*** 戦闘カード 44枚 | |
4種類の色(赤、青、黄、緑)事に、0から11の数値が表示された計11枚の戦闘カードがあります。戦闘カードに表示されている数値は、強さを表します。 | |
*** コマ 4個 | |
各色1個。 |
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
### | |
GoogleShpreadsheetのシートに記述されたデータをDBのテーブルに見立て取得し、 | |
JSONに変換するスクリプト。 | |
このソースはTitanium Mobileを想定しているが、コンバートの処理は流用できる。 | |
テストに使用しているShpreadsheetは以下 | |
https://docs.google.com/spreadsheet/ccc?key=0AuCUD7G5hGZrdGlBbHBDVElfUXdsbWRkRThVcmdCalE | |
条件:1行目をカラム名にすること | |
LEFT JOINなどの処理は別途本気出して実装する必要あり。 |
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
#ユーザーがユーザーにタグ付をするサービス | |
#ユーザーモデル | |
User = sequelize.define 'User' | |
id: | |
type: Sequelize.INTEGER | |
primaryKey: true | |
autoIncrement: true | |
socialId: Sequelize.TEXT # facebookなどの外部ソーシャルネットワークのID | |
name: Sequelize.STRING # 名前 |
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
//http://umikappa.main.jp/20110708-148 | |
#define LED 13 //デジタルピン13番をLEDという名前にする | |
//初期化メソッド | |
void setup(){ | |
Serial.begin(115200);//シリアルポートは9600bpsに | |
pinMode(LED,OUTPUT);//LEDピンを出力モードに | |
} | |
//繰返し処理されるメインのメソッド |
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 java.util.Arrays; | |
public class Main { | |
public static void main(String[] args) { | |
// 省略可能 | |
// int[] numbers = {10, 21, 1, 15}; | |
int[] numbers = new int[] { 10, 21, 1, 15 }; | |
// 昇順に並び替える | |
Arrays.sort(numbers); | |
for (int i : numbers) { |
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
//Calcクラス | |
package com.example.watanabe.calc; | |
//計算に特化したクラス | |
public class Calc { | |
public static int add(int x, int y) { | |
return x + y; | |
} | |
} |
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 Methods { | |
public static void main(String[] args) { | |
hello("しかじろう"); | |
hello("たなか"); | |
hello("やまだ"); | |
int answer = add(3, 4); | |
System.out.println("戻り値は" + answer); | |
} |
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
//Mainクラス | |
import com.example.watanabe.calc.Calc; | |
public class Main { | |
public static void main(String[] args) { | |
int ans = Calc.add(10, 20); | |
System.out.println("答えは" + ans); | |
} | |
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 HomeWork { | |
public static void main(String[] args) { | |
int[] menu = new int[3]; | |
menu[0] = 320; | |
menu[1] = 320; | |
menu[2] = 210; | |
int total = 0; | |
for (int i = 0; i < menu.length; i++) { |
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 HomeWork { | |
public static void main(String[] args) { | |
int[] menu = new int[3]; | |
menu[0] = 320; | |
menu[1] = 320; | |
menu[2] = 210; | |
int total = 0; | |
for (int i : menu) { |
OlderNewer