Ubuntu 11.10に sun-javaを入れる

11.10からsun-java-jdkがpartnerリポジトリからはずされてんの・・・・(´;ω;`)

インストール的

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

どのjava使うか的な

sudo update-alternatives --config java

確認

java -version

Google IOのあれ

Honeypad Tutorial
http://android-codelabs.appspot.com/resources/tutorials/honeypad/index.html

  • 「 Intro to Honeycomb」の「Session presentation」

http://www.google.com/events/io/2011/sessions/honeycomb-highlights.html

  • bootcamp

https://docs.google.com/document/pub?id=1p5-wnxA3M-LvVI2cUH5p6XltP8LUL8RFrUWGveVr3UQ&pli=1よりLab Materialsの[ Download Codelab Project Files ]
https://sites.google.com/site/iobootcamphclab/homeより1. Download the ZIP: j.mp/hcintro

http://www.google.com/events/io/2011/index-live.html

MultiChoiceDialog

checkboxで選択可能なAlertDialogの作り方

public class AlertDialogMultipulChoiceActivity extends Activity {

	String[] ar = { "red", "green", "bule", "white" , "apple" };
	boolean[] bs = new boolean[ar.length];

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    
    public void onCLickButton(View v){
    	AlertDialog.Builder builder = new AlertDialog.Builder(this);
    	builder.setTitle("choice");
    	
    	builder.setMultiChoiceItems(ar, bs, new OnMultiChoiceClickListener() {
			
			@Override
			public void onClick(DialogInterface dialog, int which, boolean isChecked) {
				Toast.makeText(AlertDialogMultipulChoiceActivity.this, ar[which] + ":" + isChecked, Toast.LENGTH_SHORT).show();
			}
		});
    	
    	builder.setPositiveButton("ok", new OnClickListener() {
			
			@Override
			public void onClick(DialogInterface dialog, int which) {
				StringBuilder sb = new StringBuilder();
				for (boolean b : bs) {
					sb.append("" + b + System.getProperty("line.separator"));
				}
				TextView text = (TextView)findViewById(R.id.textview);
				text.setText(sb.toString());
				
			}
		});
    	AlertDialog alert = builder.create();
    	alert.show();
    }
}

hython hack-a-thonに行ってきた

@Surgoと@hirokinkoと@rokujouhitomaと奥多摩の川乗山の廃村に行ってきた。
→廃村見つからず敗北orz

収穫

  • 電波の入らない場所にはPCは持参しないこと
  • と思いつつも持ってってしまうこと
  • 登山靴とか基本過ぎて困る
  • カエルでかい
  • 蜂やばい
  • カップ麺うまい
  • 急斜面は無理に登らず獣道使え
  • [::-1]でリバース配列
続きを読む