본문 바로가기
android generate parcelable open source library android generate parcelable open source library https://github.com/frankiesardo/android-auto-value Serializable 처럼 아주 간단하게 Parcelable 을 만들 수 있다. @AutoValueabstract class SomeModel implements Parcelable { abstract String name(); abstract List subModels(); abstract Map modelsMap(); static SomeModel create(String name, List subModels, Map modelsMap) { return new AutoValue_SomeModel(name, subModels,.. 2014. 8. 12.
[PHP Tutorial] 예외처리. PHP TUtorial, 예외 처리 ===try-catch 문 이용 ===Exception 클래스 - Exception 클래스는 message 와 code 두 파라미터를 받는다. 그리고 여러가지 함수들을 지원한다. - getCode()- getMessage()- getFile() : 에러 일어난 코드 파일 전체 경로 리턴- getLine() : 에러 일어난 줄 번호 리턴- getTrace() : 예외가 일어난 곳에 대한 역추적 정보 배열 리턴- getTraceAsString() : getTrace 와 같으나 string 으로 바꾸어 리턴- __toString() catch, CODE, exception, Exception Class, getcode, getfile, getline, getmessage, .. 2014. 1. 6.
[android] CharSequence.equlas( CharSeqence ) 이야기 안드로이드, CharSequence.equals( CharSequence ) edittext 의 내용을 비교하기 위해 CharSeqeucne.equals( CharSequence ) 를 했는데,항상 false 를 내뿜는다. ex)edittext1.getText().equals( edittext2.getText() ) // return false always. 이번에는 같은 내용의 string 과 비교했지만 항상 false 를 내뱉는다. ex)edittext1.getText().equals( "Gamza" ) // return false always 같은 reference 를 가르키는 것이 아니라면 항상 false 를 내뱉는다. 그럼 어떻게 비교할까? 1. Charsequence 에 toString 값을 .. 2013. 8. 8.
[JavaScript/Tutorial] typeof 사용시의 주의사항, array type 판별코드. typeof 사용시 주의사항, array type 판별코드 [이전강좌] Function 정의 방법 typeof 사용시 주의사항 typeof operator 를 사용하면, 그 값이 string type 으로 return 된다.이 중에서 조심해야 할 data type 은 array 와 null type 이다. typeof function // "function"typeof object // "object"typeof array // "object" - 주의!!typeof string // "string"typeof number // "number"typeof null // "object" - 주의!! array 판별 코드 typeof operator 만 이용해서는, 검사하는 변수가 object 인지, arr.. 2013. 5. 23.
반응형