Android/myself2011/08/29 17:01
スライドパズル

幅が 3 マスから 6 マスで、高さが 3 マスから 6 マスのボードが与えられます。 各マスは、パネルが置かれているか、壁があるか、空白であるかのいずれかです。 パネルには 1 から 9 あるいは A から Z のいずれかの文字が書かれており、同じ文字の書かれたパネルは存在しません。 壁は 0 個以上存在し、空白のマスはただ 1 つだけ存在します。 例えば、次のようなボードが与えられます。ここで、壁は = で、空白は 0 で表されています。

40=

215

=86


空白は、上下左右のマスのパネルと入れ替えることができます。上のマスのパネルと入れ替えることを U とよび、同様に、下左右のマスのパネルと入れ替えることをそれぞれ D, L, R とよぶものとします。壁を空白やパネルと入れ替えることはできません。

パズルを解くというのは、与えられたボードの各マスを操作して、ゴール状態に持っていくことです。

ゴール状態とは、上の行から各行順番に、左から右に 1, 2, 3, 4, ..., 9, A, ..., Z という順にパネルが並び、最も右下のマスに空白が配置された状態のことです。壁のあるマスに対応するパネルは存在しません。例えば、左上のマスが壁であれば、ボード上に 1 のパネルは存在しません。

例えば、上で与えられたボードのパズルを解くと以下のようになります。

4 0 =                      1 2 =
2 1 5         ->          4 5 6
= 8 6                      = 8 0

いま、使うことができる L, R, U, D それぞれの総数があたえられます。 この総数は全パズルで共有されています。 例えばあるパズルを解くために L を使い切ってしまった場合、 他のパズルでは L を使うことはできません。 この総数を超えないようにしながら、なるべくたくさんのパズルを解いてください。

得点
パズルをひとつ解くごとに 0.01 点が加算されます。全問解くと 50 点になります。 あるパズルが不正解だった場合、またはスキップした場合は、そのパズルに関する得点は加算されません。L, R, U, D いずれか一つでも使うことができる総数を超えていた場合は、各パズルの正解不正解にかかわらず 0 点となります。

入力と解答
入力フォーマット

LX RX UX DX
N
w1,h1,b1
w2,h2,b2
...
wN,hN,bN


LX, RX, UX, DX: 使うことができる L, R, U, D それぞれの総数
N: 総ボード数 (整数)
wi: ボードの幅 [3-6]
hi: ボードの高さ [3-6]
bi: ボード初期状態 [0-9A-Z=] からなる文字列

ボードは
0: 空白
=: 壁
1-9 A-Z: それぞれのパネル。
ボードは行を上から下の順に一列に並べた文字列として与えられます。すなわち、

40=
215
=86


は、文字列 40=215=86 として与えられます。

ゴールは左上隅が 1。空白は右下隅。壁になっているところに対応するパネルは存在しません。

ゴール例:

1234
5678
9ABC
DEF0

123=
5=78
9=BC
DEF0


こちら から入力データをダウンロードできます

解答フォーマット
各行はそれぞれの問題に対応する LRUD の列。

解答例:

URRD
DDRRRRULLULLDDDRRRR

RRUULLD


- 特定の問題の解答を飛ばしたい場合は、対応する行に空行を出力してください。

Google 번역


저작자 표시 비영리 동일 조건 변경 허락
Posted by mirwing
Android/myself2011/08/29 15:33
一人ゲームをしましょう。

ルール
数がいくつか与えられます。なるべく少ない手数で数を全て取り除いてください。
あなたは 1 手で、
- 全ての数を半分にする(端数は切り捨て)
- 5 の倍数 (0 を含む) を全て取り除く
のどちらかの操作をすることができます。

入力データの形式
1 行目にテストケースの数 T (1 ≤ T ≤ 100) が整数で与えられます。
2 行目からがテストケースです。各テストケースは 2 行から構成されます。

テストケースの 1 行目には、数の個数 N (1 ≤ N ≤ 10) が整数で与えられます。 テストケースの 2 行目には、整数が N 個与えられます。整数同士の間は 1 つの空白で区切られています。 全ての数は 0 以上 1,000,000 以下です。同じ数が複数含まれる場合があります。

入力データは全体として次のような形式になります。

T

N

a1 a2 ... aN

N

a1 a2 ... aN

...


出力データの形式

各テストケースごとに、全ての数を取り除くための最短手数を 1 行で出力します。余計な空白や空行を入れてはいけません。最後のテストケースの行末にも改行が必要です。余計な空白や改行を入れたり、行末の改行がなかった場合は不正解と判定されることがあります。改行コードは CR, LF, CRLF のいずれでもかまいません。

入力例

4

2

10 21

3

0 9 9

4

81 67 83 86

3

11 22 30


入力例に対する回答

2

5

8

4


 1 つめのテストケースでは、まず全ての数を半分にします (10, 21 → 5, 10) 。次に、5 の倍数を全て取り除きます。これで 2 手で全ての数を取り除けます。
2 つめのテストケースでは、全ての数を半分にする操作を 4 回行います。
0, 9, 9 → 0, 4, 4 → 0, 2, 2 → 0, 1, 1 → 0, 0, 0 
その後、5 の倍数を全て取り除きます。これで 5 手で全ての数を取り除けます。

入力と回答
解答フォームの下の入力データに対する回答、およびその回答を出力したソースコードを提出してください。仮にコンピューターに頼らない方法で計算した場合、その方法を記述したテキストファイルをソースコードとして提出してください。

回答:  
ソースコード:  

入力データ

100

2

10 11

3

0 9 9

4

81 67 83 86

3

11 22 30

1

0

1

5

1

999999

1

1000000

2

5 10

3

0 10 11

5

10 20 21 22 23

5

422808 211404 761062 845625 491519

5

27 13 90 99 64

5

67 2 57 37 67

5

95 37 89 76 64

5

47 14 59 50 87

5

3 40 37 51 96

5

61 31 30 19 18

5

63 35 57 83 17

5

12 28 85 22 29

5

52 14 28 11 19

5

74 77 77 41 76

10

41 19 51 60 19 55 3 12 9 2

10

63 67 77 82 10 68 50 91 77 20

10

30 43 86 79 24 96 9 97 25 51

10

32 61 67 46 94 0 81 3 5 34

10

34 21 11 59 43 14 91 62 79 75

10

9 59 85 91 83 80 86 94 80 40

10

72 19 80 80 1 44 44 37 4 59

10

31 72 24 88 43 70 63 82 49 35

10

100 63 26 82 2 22 7 13 97 24

10

96 64 99 72 38 74 77 22 96 75

5

838606 863240 884690 917147 947645

5

944436 958307 892536 926207 872867

5

818042 954117 845194 881836 807692

5

861881 819526 973015 903444 829313

5

964932 961556 994739 827545 891188

5

947201 901027 890300 808137 850288

5

916398 927746 905525 877027 942644

5

817475 801287 979620 812560 851238

5

925269 885356 886992 890802 821467

5

914386 984849 807953 931696 845089

10

959063 898538 806008 914641 921488 823255 971853 825394 950743 879499

10

846510 935395 929978 964649 909028 967071 910153 995506 840399 923217

10

933391 972663 818940 849680 866777 942892 843302 837110 832555 850715

10

968417 849301 907112 847192 873792 990996 872319 946687 837306 860828

10

995012 812006 923912 948745 974503 949313 830266 895451 885844 954131

10

829784 901004 849926 834557 989986 858349 865154 952798 872702 986919

10

892796 945301 972838 878146 911230 996957 856365 877290 851455 916473

10

815810 846362 858607 993513 941346 895705 842317 974505 960285 857518

10

897627 963518 969827 865499 887420 886326 871944 998834 841347 877372

10

892073 962888 837156 950912 958946 916531 968654 892101 859049 857011

10

40 818985 802242 51 937791 46 825623 77 49 957395

10

93 891589 70 51 836672 937800 9 959161 41 936944

10

3 2 75 60 960721 32 977468 964720 947223 987691

10

944867 93 913044 39 98 891300 884150 76 70 944323

10

55 74 42 915361 972024 10 903628 911328 903671 60

10

70 860007 56 71 954543 74 894096 807336 802322 57

10

33 896967 833568 805290 86 87 6 16 971773 854380

10

975041 930114 41 994624 38 42 855120 31 71 816953

10

23 99 2 803160 820368 948644 25 5 892215 974924

10

12 907919 53 74 13 976344 932887 34 965677 997068

10

54 948398 65 39 955671 52 818315 901897 38 980424

10

820257 53 62 15 955880 813603 36 800360 864340 13

10

943092 30 938550 847328 31 30 97 985092 94 809900

10

960928 875334 100 81 881720 32 77 944446 12 851302

10

859772 914845 30 978192 2 68 892517 851282 71 88

10

921249 955882 9 54 50 79 899608 819673 870838 31

10

989502 8 807937 53 930588 65 982505 979141 100 82

10

997199 43 93 999256 94 918642 70 52 880110 855773

10

995107 100 813495 813816 13 942014 57 66 72 969879

10

35 4 56 57 968608 816584 819850 832314 38 993257

8

400580 282120 309934 253810 73055 865063 767665 114594

10

624507 232765 755604 71310 60135 734041 147300 81030 235552 799816

8

146005 332605 657710 867165 232520 751166 932780 642910

10

399015 640336 592726 418450 611602 561990 559370 760320 397829 364855

8

191330 88892 501744 232625 202090 60990 35865 201450

9

111525 532487 275881 771030 746930 437476 770100 1956 83210

9

222735 109040 352870 508925 155004 481765 828781 658905 211830

7

886660 158255 64902 747155 292560 858110 621305

8

661305 569080 915065 478050 387727 942425 263065 788720

9

854932 699425 448275 94395 48988 636250 857505 309075 65250

8

621595 859799 339425 428835 580190 140800 631610 670875

9

171715 942815 560060 2658 514974 300420 607115 646390 821454

8

515190 330535 884295 54200 511345 659195 970110 525506

10

581005 446990 3157 312725 196020 479085 973845 66875 416745 642405

10

243685 964 713968 734495 666637 593145 466030 311453 978865 113240

8

796908 567985 533610 290410 436625 720535 287745 100540

8

444755 104322 490980 969190 811200 544625 436730 3015

7

83234 917635 490458 779805 972214 971875 489200

8

728450 332810 413540 257970 725680 743460 220108 952770

8

21085 472455 527864 465555 154265 581996 442845 782225

9

920438 242870 423392 585969 819012 561564 353240 777001 879663

10

706657 164998 814087 305742 131170 456185 451735 529939 747761 570299

10

872717 861822 556612 943485 19439 156622 314293 109471 200797 487588

10

594437 515117 966922 977169 455402 524506 190177 562295 594147 819805

4

603616 734195 997899 211769

1

728250

9

656861 598831 137488 254331 768842 621460 416296 832139 804484

9

193806 302987 946788 983666 725308 273332 758047 448855 682564

Google 번역


저작자 표시 비영리 동일 조건 변경 허락
Posted by mirwing
Android/myself2011/08/29 15:24
問題
ある都市(複数)における日別の供給電力と最大消費電力に関する記録が以下のような JSON の形式で与えられます。 この記録を Google SpreadSheets 上に展開してください。

[

  {

    "city_name": "Oykot",

    "data": [

      {

        "capacity": 1000,

        "usage": 750,

      },

      {

        "capacity": 1200,

        "usage": 1000,

      },

      ...

    ]

  },

  {

    "city_name": "Akaso",

    "data": [

      {

        "capacity": 1000,

        "usage": 800,

      },

      ...

    ]

  },

  ...

]

上の例では、最初のオブジェクトには Oykot という都市における記録が含まれています。1 日目には 1000W の供給能力があり、ピーク時に 750W が消費されました。
実際のデータはこちらから取得できます。

以下の条件に従って、ひとつの Google Spreadsheets を作ってください。JSON 内の各都市ごとにシートを分けて生成していただくことになります。 条件は以下の通りです。

シートの名前は都市名にしてください。上の例では、最左のシートの名称は「Oykot」とします。
データは 1 行目の A 列目から順番に埋めます。ヘッダ(タイトル行)は付けないでください。
n 行目の A 列に n 日目の供給電力(capacity)を入れます。
n 行目の B 列に n 日目の消費電力(usage)を入れます。
n 行目の C 列に n 日目の電力の消費割合を入れます。上の例の 1 日目では 1000W の供給力のうち 750W が消費されたので、セル C1 の値は 75.00% とします。 同様にセル C2 の値は 83.33%(1000 / 1200 = 0.8333...)になります。 小数点以下の桁数は問いませんが、値の誤差が 0.01 以内となるようにしてください。 たとえば、75.00% を 75% としたり、83.33% を 83.33333% としても差し支えありませんが、 83.33% を丸めて 83% とはしないでください。
作成したスプレッドシートは、gdd2011jp@gmail.com のアカウントと共有してください。


解答例
この問題例 からデータを取得した場合、作成する Google Spreadsheets は この解答例 のようになります。

解答
作成した Google Spreadsheets の URL を入力してください。


ヒント
Google Apps Script を使うと、Google Spreadsheets を操作する事ができます。 詳しくは http://code.google.com/intl/ja/googleapps/appsscript/guide.html をご覧ください。

Google 번역


 
저작자 표시 비영리 동일 조건 변경 허락
Posted by mirwing
Android/myself2011/08/29 15:18
以下の AIDL で定義されるサービスを持つ Android アプリケーションを配布します。インターフェースを利用し、解答コードを手に入れてください。

1. 以下の Android アプリケーションを Android エミュレータあるいは、お手持ちの Android 携帯にインストールしてください。
2. Google Developer Day 2011 に登録したeメールアドレス XXXX@XXXXXXXX と、 パスコードとして XXXXXXXXXX をアプリに入力して保存してください。
3. サービスにアクセスするアプリケーションを作成し、解答コードを手に入れ、サーバーに登録してください。

AIDL

package com.google.android.apps.gddquiz;

interface IQuizService {
  String getCode();
}


アプリケーションはこちらからダウンロードして下さい。

解答
以下の入力欄に解答コードを入れて、提出ボタンを押してください。
解答コード: 

Google 번역

 
저작자 표시 비영리 동일 조건 변경 허락
Posted by mirwing
Android/myself2011/08/29 15:09
Go 言語で、PNG 画像を入力として受け取り、その画像が何色使っているかを返す関数
func CountColor(png io.Reader) int
を実装してください。PNG 画像は io.Reader 型で与えられます。
なお、入力の画像は R G B の各色の値が 0 から 255 までの 256 段階のいずれかであり、不透明(アルファチャンネルの値が常に 255)であることが保証されています。

サンプル画像


サンプルの答え
5

Go言語のドキュメント
注)日本語版は非公式サイトであり、情報が最新でない場合や不正確である可能性があります。

package main


import (

    "fmt"

    "io"

    "strings"

    /* add more */

)


func CountColor(png io.Reader) int {

    /* modify here */

    return 0

}



/* これらの関数は提出時に自動挿入されます。 */

func main() {

    png := GetPngBinary()

    cnt := CountColor(png)

    fmt.Println(cnt)

}


func GetPngBinary() io.Reader {

    // img_strの中身は提出するたびに変化します。

    img_str := "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x08\x08\x06\x00\x00\x00\xe3\xa1?c\x00\x00\x02\xeeiCCPICC Profile\x00\x00x\x01\x85T\xcfk\x13A\x14\xfe6n\xa9\xd0\"\x08Zk\x0e\xb2x\x90\"IY\xabhE\xd46\xfd\x11bk\x0c\xdb\x1f\xb6E\x90d3I\xd6n6\xeb\xee&\xb5\xa5\x88\xe4\xe2\xd1*\xdeE\xed\xa1\x07\xff\x80\x1ez\xf0d/J\x85ZE(\xde\xab(b\xa1\x17-\xf1\xcdnL\xb6\xa5\xea\xc0\xce~\xf3\xde7\xef}ov\xdf\x00\rr\xd24\xf5\x80\x04\xe4\r\xc7R\xa2\x11il|Bj\xfc\x88\x00\x8e\xa2\tA4%U\xdb\xecN$\x06A\x83s\xf9{\xe7\xd8z\x0f\x81[V\xc3{\xfbw\xb2w\xad\x9a\xd2\xb6\x9a\x07\x84\xfd@\xe0G\x9a\xd9*\xb0\xef\x17q\nY\x12\x02\x88<\xdf\xa1)\xc7t\x08\xdf\xe3\xd8\xf2\xec\x8f9Nyx\xc1\xb5\x0f+=\xc4Y\"|@5-\xce\x7fM\xb8S\xcd%\xd3@\x83H8\x94\xf5qR>\x9c\xd7\x8b\x94\xd7\x1d\x07inf\xc6\xc8\x10\xbdO\x90\xa6\xbb\xcc\xee\xabb\xa1\x9cN\xf6\x0e\x90\xbd\x9d\xf4~N\xb3\xde>\xc2!\xc2\x0b\x19\xad?F\xb8\x8d\x9e\xf5\x8c\xd5?\xe2a\xe1\xa4\xe6\xc4\x86=\x1c\x185\xf4\xf8`\x15\xb7\x1a\xa9\xf85\xc2\x14_\x10M'\xa2Tq\xd9.\r\xf1\x98\xae\xfdV\xf2J\x82p\x908\xcada\x80sZHO\xd7Ln\xf8\xba\x87\x05}&\xd7\x13\xaf\xe2wVQ\xe1y\x8f\x13g\xde\xd4\xdd\xefE\xda\x02\xaf0\x0e\x1d\x0c\x1a\x0c\x9a\rHP\x10E\x04a\x98\xb0P@\x86<\x1a14\xb2r?#\xab\x06\x1b\x93{2u$j\xbbtbD\xb1A{6\xdc=\xb7Q\xa4\xdd<\xfe(\"q\x94C\xb5\x08\x92\xfcA\xfe*\xaf\xc9O\xe5y\xf9\xcb\\\xb0\xd8V\xf7\x94\xad\x9b\x9a\xba\xf2\xe0;\xc5\xe5\x99\xb9\x1a\x1e\xd7\xd3\xc8\xe3sM^|\x95\xd4v\x93WG\x96\xacyz\xbc\x9a\xec\x1a?\xecW\x971\xe6\x825\x8f\xc4s\xb0\xfb\xf1-_\x95\xcc\x97)\x8c\x14\xc5\xe3U\xf3\xeaK\x84uZ17\xdf\x9fl\x7f;=\xe2.\xcf.\xb5\xd6s\xad\x89\x8b7V\x9b\x97g\xfdjH\xfb\xee\xaa\xbc\x93\xe6U\xf9O^\xf5\xf1\xfcg\xcd\xc4c\xe2)1&v\x8a\xe7!\x89\x97\xc5.\xf1\x92\xd8K\xab\x0b\xe2`m\xc7\x08\x9d\x95\x86)\xd2m\x91\xfa$\xd5``\x9a\xbc\xf5/]?[x\xbdF\x7f\x0c\xf5Q\x94\x19\xcc\xd2T\x89\xf7\x7f\xc2*d4\x9d\xb9\x0eo\xfa\x8f\xdb\xc7\xfc\x17\xe4\xf7\x8a\xe7\x9f(\x02/l\xe0\xc8\x99\xbamSq\xef\x10\xa1e\xa5ns\xae\x02\x17\xbf\xd1}\xf0\xb6nk\xa3~8\xfc\x04X<\xab\x16\xadR5\x9f \xbc\x01\x1cv\x87z\x1e\xe8)\x98\xd3\x96\x96\xcd9R\x87,\x9f\x93\xba\xe9\xcabR\xccP\xdbCRR\xd7%\xd7eK\x16\xb3\x99Ub\xe9v\xd8\x99\xd3\x1dn\x1c\xa19B\xf7\xc4\xa7Je\x93\xfa\xaf\xf1\x11\xb0\xfd\xb0R\xf9\xf9\xacR\xd9~N\x1a\xd6\x81\x97\xfao\xc0\xbc\xfdE\xc0x\x8b\x89\x00\x00\x00\x97IDAT(\x15\x9d\x92\x81\x0e\x80 \x08D\xa5\xf9m\xf5Y\xad\xcf\xaa\x9f#nz$\xba\xb9\xca\xad\x85\xc1\xbd\x03S\xd4\x96H\xf2\xa5\xea\xe1\xeb@\x8e\x02\xd0}\x14/\x80\x03\xca\xa75{\xeb0\x80\x01\xa9\xa0\xdcC|\x02:\xf1\xc3U\xc7\\K\x97}\xda9HPcq0pQ\x8aE\xe94y\x05'3\x92M[\x86\xc7\xc1\xa4n\x82\x01\x8ci\xe2\xc5\x7f\x02N`\xda\xdcCK\xaeqbqsD\xbd\x86=\xe0g\xdb\x9dy\xba\xb4Xp\x8bX\xf0\xe7\x8d\x89g\x84pD_\x0cx\x9438x7\xa4yC\r7\x04z\xae\x00\x00\x00\x00IEND\xaeB`\x82"

    return strings.NewReader(img_str)

}


Google 번역

저작자 표시 비영리 동일 조건 변경 허락
Posted by mirwing
Android/myself2011/08/29 14:56
ゲームを始める

ルール
シンプルな神経衰弱ゲームです。カードはクリックすることでめくることができます。全 64 セットを解くことで問題クリアとなります。

ヒント
1 枚目のカードを開いてその色を取得する Chrome Extension の サンプルをダウンロード できます。 (もちろん、Chrome Extension 以外の方法を使って解いてもかまいません。)
 

バックグラウンド
Web アプリケーションを使っていて、自分向けにカスタマイズしたいと思ったことはありませんか? そんな時、Chrome Extension が力になります。例えば、入力を補完する、特定のテキストをハイライトする、といったことも思いのままです。

この神経衰弱ゲームでは、人間が到底解けないような枚数の神経衰弱が与えられますが、 Chrome Extension を作ればそれらを迅速に処理することができます。

この機会に Chrome Extension の書き方を学んで、日々のタスクの改善に生かしてみませんか?

Google 번역

 
저작자 표시 비영리 동일 조건 변경 허락

'Android > myself' 카테고리의 다른 글

GDD 2011 Japan 분야별 퀴즈 - Android  (0) 2011/08/29
GDD 2011 Japan 분야별 퀴즈 - GO!  (0) 2011/08/29
GDD 2011 Japan 분야별 퀴즈 - Web Game  (0) 2011/08/29
GDD 2011 Japan 워밍업 퀴즈  (0) 2011/08/29
GDD 2011 Japan 도전 시작!...  (0) 2011/08/29
Implementing IPC Using AIDL  (0) 2009/06/09
Posted by mirwing
Android/myself2011/08/29 14:47

우선 제일 처음 저를 맞이 해주던 워밍업 퀴즈 입니다.

Google Web Font API
Google Web Font API に text= パラメータを指定すると何が起こるでしょうか?
パラメータの内容に応じてフォントをサジェストして返してくれる
何も起こらない
必要なグリフのみを含むフォントを返してくれる

Google 번역



gmail
Google Chrome、Firefox、Safari において、Gmail のメール作成画面など文字修飾が可能な編集領域で、 修飾を無視してテキストだけをペーストするにはどのようにすればよいでしょうか?
Alt + V (Option + V) を押す
Ctrl + Shift + V (Command + Shift + V) を押す
Ctrl + X を押してから Ctrl + V (Command + X Command + V) を押す

Google 번역



Android
Android 3.x (Honeycomb)についての次の記述のうち、間違っているものはどれでしょう?
Fragment, Action Bar などの考え方は今後 一般の携帯電話用にもリリースされる Ice Cream Sandwich のアプリケーション開発においてもそのまま継承される
ドラッグ & ドロップ(ドラッグ中の半透明 UI 表示など)の実装が簡単にできる API が提供されている
画面描画を高速化するハードウェアアクセラレーションを活用するには Java では足りず、C/C++ を活用した JNI プログラミングが必要である

Google 번역



Google Apps Script
Google Apps Script で、できないものはどれでしょうか? ただし、Google が提供するものを除き、外部の Web API やサービス等は使わないものとします。
Google Docs の表計算で使える関数を追加する
表計算に地図を表示して、セルにある住所にマーカーを表示する
OAuth 認証を使って GData API にアクセスする
30KB のファイルを添付したメールを送信する

Google 번역



maps API
Google Maps JavaScript API V3 にて以下のコードのように定義した gddMapType では、 通常の地図と比べてどのように見た目が変化するでしょうか? 間違っているものを選択してください。

var map = new google.maps.Map(document.getElementById("map_canvas"),

  { center: new google.maps.LatLng(35.660482, 139.729217),

    zoom: 13,

    mapTypeControlOptions: {

      mapTypeIds: [ google.maps.MapTypeId.ROADMAP, "gdd" ]

    }

  });

var gddMapType = new google.maps.StyledMapType(

  [ {

      featureType: "road",

      elementType: "all",

      stylers: [ { saturation: -100 } ]

    },{

      featureType: "poi.school",

      elementType: "geometry",

      stylers: [ { hue: "#ff0000" } ]

    },{

      featureType: "transit.line",

      elementType: "all",

      stylers: [ { visibility: "off" } ]

    },{

      featureType: "administrative.locality",

      elementType: "labels",

      stylers: [ { invert_lightness: true } ]

    } ], { name: "GDD" });

map.mapTypes.set("gdd", gddMapType);

map.setMapTypeId("gdd");

学校の敷地が赤っぽい色になる。
市区町村名が白抜き文字になる。
鉄道の線路が地図上から消える。
全ての道路が黒く塗りつぶされる。 

Google 번역



저작자 표시 비영리 동일 조건 변경 허락

'Android > myself' 카테고리의 다른 글

GDD 2011 Japan 분야별 퀴즈 - GO!  (0) 2011/08/29
GDD 2011 Japan 분야별 퀴즈 - Web Game  (0) 2011/08/29
GDD 2011 Japan 워밍업 퀴즈  (0) 2011/08/29
GDD 2011 Japan 도전 시작!...  (0) 2011/08/29
Implementing IPC Using AIDL  (0) 2009/06/09
Calling an IPC Method  (8) 2009/06/09
Posted by mirwing
Android/myself2011/08/29 14:35
Google Developer Day 2011 Japan은 11월 1일 요코하마에서 있습니다.

자세한 내용은 http://www.google.com/events/developerday/2011/ 를 참조 바랍니다.

한국어 이외에는 어리버리한 저에게는 GDD Japan을 등록 신청 하는 것 조차 어렵게....모두 일본어 질문이더군요.ㅠ

한국어로 번역한 뒤에 영어로 적어뒀습니다.


얼마 지나지 않아 메일을 받았습니다.

GDD 2011 Japan에 참여를 하려면 퀴즈를 풀어 점수로 참가증을 보내준다는 내용의 메일...

뭐...참가를 기대하지는 않지만!

퀴즈라니!....막막 풀어 보고 싶어 지네요.... 차례차례 시작하겠습니다!.ㅋ

 


위의 사진 처럼 워밍업 퀴즈로 시작하여 분야별 퀴즈(Web Game, GO!, Android, Apps Script, 一人ゲーム), 도전 퀴즈 항목이 있습니다.

각각 항목별 퀴즈는 별도로 만들어 알려 드리겠습니다. 

저작자 표시 비영리 동일 조건 변경 허락

'Android > myself' 카테고리의 다른 글

GDD 2011 Japan 분야별 퀴즈 - Web Game  (0) 2011/08/29
GDD 2011 Japan 워밍업 퀴즈  (0) 2011/08/29
GDD 2011 Japan 도전 시작!...  (0) 2011/08/29
Implementing IPC Using AIDL  (0) 2009/06/09
Calling an IPC Method  (8) 2009/06/09
Android Study 1  (0) 2009/04/24
Posted by mirwing
Android/NEWS2011/07/17 09:25

API Level: 13

Welcome to Android 3.2!

Android 3.2 is an incremental platform release that adds new capabilities for users and developers. This sections below provide an overview of the new features and developer APIs.

For developers, the Android 3.2 platform is available as a downloadable component for the Android SDK. The downloadable platform includes an Android library and system image, as well as a set of emulator skins and more. The downloadable platform includes no external libraries.

To get started developing or testing against Android 3.2, use the Android SDK Manager to download the platform into your SDK. For more information, see Adding SDK Components. If you are new to Android, download the SDK Starter Package first.

Reminder: If you've already published an Android application, please test and optimize your application on Android 3.2 as soon as possible. You should do so to be sure your application provides the best experience possible on the latest Android-powered devices. For information about what you can do, read Optimizing Apps for Android 3.x.

Revisions

To determine what revision of the Android 3.2 platform you have installed, refer to the "Installed Packages" listing in the Android SDK and AVD Manager.

 Android 3.2, Revision 1 (July 2011)

Initial release. SDK Tools r12 or higher is recommended.

Platform Highlights

New user features

  • Optimizations for a wider range of tablets

    Android 3.2 includes a variety of optimizations across the system to ensure a great user experience on a wider range of tablet devices.

  • Compatibility zoom for fixed-sized apps

    Android 3.2 introduces a new compatibility zoom mode that gives users a new way to view fixed-sized apps on larger devices. The new mode provides a pixel-scaled alternative to the standard UI stretching for apps that are not designed to run on larger screen sizes, such as on tablets. The new mode is accessible to users from a menu icon in the system bar, for apps that need compatibility support.

  • Media sync from SD card

    On devices that support an SD card, users can now load media files directly from the SD card to apps that use them. A system facility makes the files accessible to apps from the system media store.

New developer features

  • Extended API for managing screens support

    Android 3.2 introduces extensions to the platform's screen support API to give developers additional ways to manage application UI across the range of Android-powered devices. The API includes new resource qualifiers and new manifest attributes that give you more precise control over how your apps are displayed on different sizes, rather than relying on generalized size categories.

    To ensure the best possible display for fixed-sized apps and apps with limited support for various screen sizes, the platform also provides a new zoom compatibility mode that renders the UI on a smaller screen area, then scales it up to fill the space available on the display. For more information about the screen support API and the controls it provides, see the sections below.

API Overview

Screens Support APIs

Android 3.2 introduces new screens support APIs that give you more control over how their applications are displayed across different screen sizes. The API builds on the existing screens-support API, including the platform's generalized screen density model, but extends it with the ability to precisely target specific screen ranges by their dimensions, measured in density-independent pixel units (such as 600dp or 720dp wide), rather than by their generalized screen sizes (such as large or xlarge)

When designing an application's UI, you can still rely on the platform to provide density abstraction, which means that applications do not need to compensate for the differences in actual pixel density across devices. You can design the application UI according to the amount of horizontal or vertical space available. The platform expresses the amount of space available using three new characteristics: smallestWidthwidth, and height.

  • A screen's smallestWidth is it's fundamental minimum size, measured in density-independent pixel ("dp") units. Of the screen's height or width, it is the shorter of the two. For a screen in portrait orientation, the smallestWidth is normally based on its width, while in landscape orientation it based on its height. In all cases, the smallestWidth is derived from a fixed characteristic of the screen and the value does not change, regardless of orientation. The smallestWidth is important for applications because it represents the shortest possible width in which the application UI will need to be drawn, not including screen areas reserved by the system.
  • In constrast, a screen's width and height represent the current horizontal or vertical space available for application layout, measured in "dp" units, not including screen areas reserved by the system. The width and height of a screen change when the user switches orientation between landscape and portrait.

The new screens support API is designed to let you manage application UI according to the smallestWidth of the current screen. You can also manage the UI according to current width or height, as needed. For those purposes, the API provides these tools:

  • New resource qualifiers for targeting layouts and other resources to a minimum smallestWidth, width, or height, and
  • New manifest attributes, for specifying the app's maximum screen compatibility range

Additionally, applications can still query the system and manage UI and resource loading at runtime, as in the previous versions of the platform.

Since the new API lets you target screens more directly through smallestWidth, width, and height, it's helpful to understand the typical characteristics of the different screen types. The table below provides some examples, measured in "dp" units.

Table 1. Typical devices, with density and size in dp.

TypeDensity (generalized)Dimensions (dp)smallestWidth (dp)
Baseline phone mdpi 320x480 320
Small tablet/large phone mdpi 480x800 480
7-inch tablet mdpi 600x1024 600
10-inch tablet mdpi 800x1280 800

The sections below provide more information about the new screen qualifiers and manifest attributes. For complete information about how to use the screen support API, see Supporting Multiple Screens.

New resource qualifiers for screens support

The new resource qualifiers in Android 3.2 let you better target your layouts for ranges of screen sizes. Using the qualifiers, you can create resource configurations designed for a specific minimum smallestWidth, current width, or current height, measured in density-independent pixels.

The new qualifiers are:

  • swNNNdp — Specifies the minimum smallestWidth on which the resource should be used, measured in "dp" units. As mentioned above, a screen's smallestWidth is constant, regardless of orientation. Examples: sw320dpsw720dpsw720dp.
  • wNNNdp and hNNNdp — Specifies the minimum width or height on which the resource should be used, measured in "dp" units. As mentioned above, a screen's width and height are relative to the orientation of the screen and change whenever the orientation changes. Examples: w320dpw720dph1024dp.

You can also create multiple overlapping resource configurations if needed. For example, you could tag some resources for use on any screen wider than 480 dp, others for wider than 600 dp, and others for wider than 720 dp. When multiple resource configurations are qualified for a given screen, the system selects the configuration that is the closest match. For precise control over which resources are loaded on a given screen, you can tag resources with one qualifier or combine several new or existing qualifiers.

Based on the typical dimensions listed earlier, here are some examples of how you could use the new qualifiers:

res/layout/main_activity.xml   # For phones
res
/layout-sw600dp/main_activity.xml   # For 7” tablets
res
/layout-sw720dp/main_activity.xml   # For 10” tablets
res
/layout-w600dp/main_activity.xml   # Multi-pane when enough width
res
/layout-sw600dp-w720dp/main_activity.xml   # For large width

Older versions of the platform will ignore the new qualifiers, so you can mix them as needed to ensure that your app looks great on any device. Here are some examples:

res/layout/main_activity.xml   # For phones
res
/layout-xlarge/main_activity.xml   # For pre-3.2 tablets
res
/layout-sw600dp/main_activity.xml   # For 3.2 and up tablets

For complete information about how to use the new qualifiers, see Using new size qualifiers.

New manifest attributes for screen-size compatibility

The framework offers a new set of <supports-screens> manifest attributes that let you manage your app's support for different screen sizess. Specifically, you can specify the largest and smallest screens on which your app is designed to run, as well as the largest screen on which it is designed run without needing the system's newscreen compatibility mode. Like the resource qualifiers described above, the new manifest attributes specify the range of screens that the application supports, as specified by the smallestWidth.

The new manifest attributes for screen support are:

  • android:compatibleWidthLimitDp="numDp" — This attribute lets you specify the maximum smallestWidth on which the application can run without needing compatibility mode. If the current screen is larger than the value specified, the system displays the application in normal mode but allows the user to optionally switch to compatibility mode through a setting in the system bar.
  • android:largestWidthLimitDp="numDp" — This attribute lets you specify the maximum smallestWidth on which the application is designed to run. If the current screen is larger than the value specified, the system forces the application into screen compatibility mode, to ensure best display on the current screen.
  • android:smallestWidthLimitDp="numDp" — This attribute lets you specify the minimum smallestWidth on which the application can run. If the current screen is smaller than the value specified, the system considers the application incompatible with the device, but does not prevent it from being installed and run.

Note: Android Market does not currently filter apps based on any of the attributes above. Support for filtering will be added in a later platform release. Applications that require filtering based on screen size can use the existing <supports-screens> attributes.

For complete information about how to use the new attributes, see Declaring screen size support.

Screen compatibility mode

Android 3.2 provides a new screen compatibility mode for applications explicitly declaring that they do not support screens as large as the one on which they are running. This new "zoom" mode is a pixel-scaled — it renders the application in a smaller screen area and then scales the pixels to fill the current screen.

By default, the system offers screen compatibility mode as an user option, for apps that require it. Users can turn the zoom mode on and off using a control available in the system bar.

Because the new screen compatibility mode may not be appropriate for all applications, the platform allows the application to disable it using manifest attributes. When disabled by the app, the system does not offer "zoom" compatibility mode as an option for users when the app is running.

Note: For important information about how to control compatibility mode in your applications, please review the New Mode for Apps on Large Screens article on the Android Developers Blog.

New screen density for 720p televisions and similar devices

To meet the needs of applications running on 720p televisions or similar with moderate density screens, Android 3.2 introduces a new generalized density, tvdpi, with an approximate dpi of 213. Applications can query for the new density in densityDpi and can use the new tvdpi qualifier to tag resources for televisions and similar devices. For example:

res/drawable-tvdpi/my_icon.png   # Bitmap for tv density

In general, applications should not need to work with this density. For situations where output is needed for a 720p screen, the UI elements can be scaled automatically by the platform.

UI framework

  • Fragments
  • Screen size information in ActivityInfo and ApplicationInfo
    • ActivityInfo adds {android.content.pm.ActivityInfo#CONFIG_SCREEN_SIZE} and {android.content.pm.ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE} as bit masks in configChanges. The bits indicate whether an Activity can itself handle the screen size and smallest screen size.
    • ApplicationInfo adds {android.content.pm.ApplicationInfo#largestWidthLimitDp}, {android.content.pm.ApplicationInfo#compatibleWidthLimitDp}, and {android.content.pm.ApplicationInfo#requiresSmallestWidthLimitDp} fields, derived from the corresponding <supports-screens> attributes in the application manifest file.
  • Helpers for getting display size from WindowManager
  • New public "holographic" styles
    • The platform now exposes a variety of public "holographic" styles for text, actionbar widgets and tabs, and more. See R.style for a full list.
  • LocalActivityManagerActivityGroup, and LocalActivityManager are now deprecated
    • New applications should use Fragments instead of these classes. To continue to run on older versions of the platform, you can use the v4 Support Library (compatibility library), available in the Android SDK. The v4 Support Library provides a version of the Fragment API that is compatible down to Android 1.6 (API level 4).
    • For apps developing against Android 3.0 (API level 11) or higher, tabs are typically presented in the UI using the new ActionBar.newTab() and related APIs for placing tabs within their action bar area.

Media framework

  • Applications that use the platform's media provider (MediaStore) can now read media data directly from the removeable SD card, where supported by the device. Applications can also interact with the SD card files directly, using the MTP API.

Graphics

IME framework

  • New getModifiers() method for retrieving the current state of the modifier keys.

USB framework

  • New getRawDescriptors() method for retrieving the raw USB descriptors for the device. You can use the method to access descriptors not supported directly via the higher level APIs.

Network

Telephony

Core utilities

New feature constants

The platform adds new hardware feature constants that you can declare in their application manifests, to inform external entities such as Android Market of required hardware and software capabilities. You declare these and other feature constants in <uses-feature> manifest elements.

Android Market filters applications based on their <uses-feature> attributes, to ensure that they are available only to devices on which their requirements are met.

  • Feature constants for landscape or portrait requirements

    Android 3.2 introduces new feature constants that let applications specify whether they require display in landscape orientation, portrait orientation, or both. Declaring these constants indicates that the application must not be installed on a device that doesn't offer the associated orientation. Conversely, if one or both of the constants are not declared, it indicates that the application does not have a preference for the undeclared orientations and may be installed on a device that doesn't offer them.

    A typical application that functions properly in both landscape and portrait orientations would not normally need to declare an orientation requirement. Rather, an application designed primarily for one orientation, such as an app designed for a television, could declare one of the constants to ensure that it isn't available to devices that don't provide that orientation.

    If the application is targeting API level 12 or lower, the platform assumes that if app has not specified whether it requires portrait or landscape, both orientations are required.

  • Other feature constants

API Differences Report

For a detailed view of all API changes in Android 3.2 (API Level 13), see the API Differences Report.

저작자 표시 비영리 동일 조건 변경 허락

'Android > NEWS' 카테고리의 다른 글

Android 3.2 Platform  (0) 2011/07/17
Open Accessory Library  (0) 2011/05/11
Android 3.1 Platform Highlight  (0) 2011/05/11
Android 3.1 Platform  (0) 2011/05/11
Android: momentum, mobile and more at Google I/O  (1) 2011/05/11
Update Android Developer Guide  (0) 2011/04/01
Posted by mirwing
Android/APP&SDK2011/07/12 14:24
[Android Developer]
 

SDK Tools, Revision 12


Dependencies:
If you are developing in Eclipse with ADT, note that the SDK Tools r12 is designed for use with ADT 12.0.0 and later. If you haven't already, we highly recommend updating your ADT Plugin to 12.0.0.
If you are developing outside Eclipse, you must have Apache Ant 1.8 or later.
General notes:
The AVD manager and emulator can now use system images compiled for ARM v7 and x86 CPUs. 


ADT 12.0.0

Dependencies:
ADT 12.0.0 is designed for use with SDK Tools r12. If you haven't already installed SDK Tools r12 into your SDK, use the Android SDK and AVD Manager to do so.
Visual Layout Editor:
  • New RelativeLayout drop support with guideline suggestions for attachments and cycle prevention (more info).
  • Resize support in most layouts along with guideline snapping to the sizes dictated by wrap_content and match_parentPreviews of drawables and colors in the resource chooser dialogs (more info).
  • Previews of drawables and colors in the resource chooser dialogs (more info).
  • Improved error messages and links for rendering errors including detection of misspelled class names (more info).
Build system
  • A new option lets you disable the packaging step in the automatic builders. This improves performance when saving files by not performing a full build, which can take a long time for large projects. If the option is enabled, the APK is packaged when the application is deployed to a device or emulator or when the release APK is exported (more info).
Bug fixes
Many bug fixes are part of this release (more info). 


NDK, Revision 6

This release of the NDK includes support for the x86 ABI and other minor changes. For detailed information describing the changes in this release, read the CHANGES.HTML document included in the NDK package.

General notes:
  • Adds support for the x86 ABI, which allows you to generate machine code that runs on compatible x86-based Android devices. Major features for x86 include x86-specific toolchains, system headers, libraries and debugging support. For all of the details regarding x86 support, see docs/CPU-X86.html in the NDK package.

    By default, code is generated for ARM-based devices, but you can add x86 to your APP_ABI definition in your Application.mk file to build for x86 platforms. For example, the following line instructs ndk-build to build your code for three distinct ABIs:

    APP_ABI := armeabi armeabi-v7a x86


    Unless you rely on ARM-based assembly sources, you shouldn't need to touch your Android.mk files to build x86 machine code. 
  • You can build a standalone x86 toolchain using the --toolchain=x86-4.4.3 option when calling make-standalone-toolchain.sh. See docs/STANDALONE-TOOLCHAIN.html for more details.
  • The new ndk-stack tool lets you translate stack traces in logcat that are generated by native code. The tool translates instruction addresses into a readable format that contains things such as the function, source file, and line number corresponding to each stack frame. For more information and a usage example, see docs/NDK-STACK.html.
Other changes:
arm-eabi-4.4.0, which had been deprecated since NDK r5, has been removed from the NDK distribution. 
 
저작자 표시 비영리 동일 조건 변경 허락

'Android > APP&SDK' 카테고리의 다른 글

SDK Tools, r12 & ADT 12.0.0 & NDK r6  (0) 2011/07/12
ADT Plugin for Eclipse 11.0.0  (0) 2011/06/07
ADT 10.0.1  (0) 2011/03/17
SDK Tools r10 & ADT 10.0.0  (0) 2011/03/11
SDK Tools r9 & ADT 9.0.0 & NDK r5b  (0) 2011/01/27
SDK Tools, r8 & ADT 8.0.0 & NDK, r5 for Gingerbread  (0) 2010/12/07
Posted by mirwing