본문 바로가기

전체 글170

setRetainInstance setRetainInstance(false) 일때 회전 시킨 경우 -객체 새로 생성됨onCreateonCreateViewonActivityCreated호출됨 setRetainInstance(true) 일때 회전 시킨 경우- 객체 유지함, 따라서 모든 필드값 유지됨onCreateViewonActivityCreated 호출됨- view는 그래도 새로 생성됨 2014. 5. 10.
Linux 간략한 명령어 모음 - cat 선택한 파일의 내용을 확인한다. 사용예) cat mapred-site.xml - ls 현재 디렉토리의 내용을 보여준다. 사용예) ls - ls -al 현재 디렉토리의 숨겨진 파일까지 보여준다. 사용예) ls -al - tar -zxvf [파일명] 현재 디렉토리에 압축해제 한다. 사용예)tar -zxvf test.tar.gz - rm -rf [name] 삭제 명령 2014. 5. 9.
PendingIntent PendingIntent는 특정 Component(Activity / Service 등)가 Intent를 생성한 후, 해당 Intent를 바로 사용하는 대신, 나 대신 다른 Component가 해당 Intent를 사용 할 수 있도록 할 때 사용하는 클래스입니다. Service를 이용한 예제 int POLL_INTERVAL = 1000 * 15; //15초 Intent i = new Intent(context, PollService.class); PendingIntent pi = PendingIntent.getService(context, 0, i, 0);AlarmManager alarmManager =(AlarmManager)context.getSystemService(Context.ALARM_SERVI.. 2014. 5. 8.
참조예제와 ICloneable suing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms; namespace RefTest{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { int[] scores = new int[5]; SetByte(scores); for (int x = 0; x < sco.. 2014. 5. 8.