본문 바로가기
[Facebook] 그래프 API ( Graph API ) Overview [Facebook] 그래프 API ( Graph API ) Overview https://developers.facebook.com/docs/graph-api/overviewhttps://developers.facebook.com/docs/graph-api/using-graph-api-노드, 에지, 필드 라는 component 로 구성된다. 노드 : 사용자, 사진, 페이지, 댓글 같은 항목에지 : Node 간의 연결필드 : Node 에 대한 정보 -대부분의 그래프 API 요청에는 엑세스 토큰을 사용해야 한다. -각 Node 에는 고유한 ID 가 있고, Graph API 를 통해 해당 ID 를 접근하면 Node 에 대한 정보가 나온다.노드 ID 구조나 형식은 변경 가능성이 높기 때문에 해당 form 을 f.. 2018. 2. 26.
[Kotlin Tutorial] Annotation 과 Reflection #1 - Chap 10. Annotations and reflection [Kotlin Tutorial] Annotation 과 Reflection #1 - Chap 10. Annotations and reflection 참조 : Kotlin in action 10.1. Declaring and applying annotations. 10.1.1. Applying annotations -Annotation 사용법은 Java 와 동일하다. @ 를 prefix 로 하고 annotation name 을 써주면 된다. -@Deprecated 의 경우 Kotlin 은 Java 의 것에서 향상되었다.replaceWith parameter 가 추가되어, 새로운 version 의 API 에 연결될 수 있다.@Deprecated(“Use removeAt(index) instead.”, Rep.. 2017. 9. 7.
[Django] 파이썬 웹 프로그래밍 - Django 의 핵심 기능 #2 [Django] 파이썬 웹 프로그래밍 - Django 의 핵심 기능 #2 * 4.4.1. HTML 에서의 폼 -HTTP 프로토콜 중 폼에서 사용할 수 있는 HTTP 메소드는 GET 과 POST 뿐이다.장고는 이 중에서도 폼 처리에는 POST 방식만을 사용하고 있다.추가적으로 장고는 보안을 강화하기 위해 CSRF 방지 기능을 제공한다. * 4.4.2. 장고의 폼 기능 -장고는 폼 처리를 위해 다음 3가지 기능을 제공한다. 폼 생성에 필요한 데이터를 폼 클래스로 구조화하기 폼 클래스의 데이터를 랜더링하여 HTML 폼 만들기 사용자로부터 제출된 폼과 데이터를 수신하고 처리하기 -장고의 모델 클래스가 데이터베이스 테이블의 논리적인 구조 및 동작 기능, 우리에게 보여지는 방식들을 기술.. 2016. 12. 15.
[android] Bitmap 변환시 exif 정보 유지시키기 [android] Bitmap 변환시 exif 정보 유지시키기 -Bitmap.createScaledBitmap 을 사용해서 이미지 크기를 변경하면 exif 정보가 날아간다. -exif 정보는 Exchangeable Image File Format ( 교환 이미지 파일 형식 ) 의 약자로, 이미지 파일에 이미지에 대한 정보를 포함하는 메타데이터가 들어있다. jpeg, tiff, riff, wav 포맷에 사용되며, png, gif 에서는 지원되지 않는다. -보통의 exif 정보는 날짜, 시간, 카메라 설정, 저작권, 위치 등의 정보가 저장된다. -여튼 exif 를 유지시켜주려면 아래와 같이 하면 된다.ExifInterface srcExif = new ExifInterface(srcFile.getAbsolut.. 2015. 11. 9.
@SerialzedName 어노테이션 @SerialzedName 어노테이션 - field 에 마킹하는 어노테이션으로, JSON 으로 serialize 될 때 매칭되는 이름을 명시하는 목적으로 사용한다. ex) @SerializedName("name")private final String name; @serializedname, annotation, field, GSON, JSON, Serialize, serialized, 어노테이션 2015. 6. 20.
[Android] save POJO to SharedPreferences [Android] save POJO to SharedPreferences POJO 를 SharedPreference 에 저장하려면 GSON 을 쓰는 방법도 괜찮다.POJO params 에 대한 encoding, decoding 등을 지원하므로.. Android, decoding, Encoding, field, GSON, member field, Param, POJO, SharedPreference, [Android] save POJO to SharedPreferences 2014. 3. 25.
[Java] Reflection Tutorial - Generics Java, Reflection Tutorial - Generics 일반적으로 Generics 정보는 runtime 에 사라진다고 알고 있지만 꼭 그렇지만은 않다. The Generics Reflection Rule of Thumb 일반적으로 List 와 같은 녀석들은 어떤 Generic 이 쓰였는지 알기 어렵다.하지만 parameterized 된 method 나 field 를 조사해보면,어떤 generic 이 사용되었는지 알 수 있다. Generic Method Return Types Method method = TestClass.class.getMethod( "getStringList", null );Type returnType = method.getGenericReturnType(); if ( ret.. 2013. 12. 27.
[Java] Reflection Tutorial - Annotations. [Java] Reflection Tutorial - Annotations. What are Java Annotations Java5 에 소개된 기능으로, meta data 를 코드형태로 담을 수 있고, runtime 에 이 meta data 에 접근할 수 있다. pre-compiler 가 코드를 conversion 할 때 사용되기도 한다. Annotation 은 interface 형태이다. @Retention( RetentionPolicy.RUNTIME );@Target( ElementType.TYPE )public @interface TestAnnotation{public String name();public String value();} @TestAnnotation(name="variable", va.. 2013. 12. 23.
[Java] Reflection Tutorial - Field. Java, Reflection Tutorial - Field. Obtaining Field Objects Field[] fields = aClass.getFields(); // only for publicField field = aClass.getField( "fieldName" ); getField() 는 없는 field 를 가져오려 하면 NoSuchFieldException 를 던진다. Field Name String fieldName = field.getName(); Field Type Object fieldType = field.getType(); Getting and Setting Field Values Class aClass = TestClass.class;Field field = aClass.. 2013. 11. 22.
반응형