'2010/12'에 해당되는 글 5건

  1. 2010.12.24 믹사리 증강현실엔진에 데이타 넣기
  2. 2010.12.21 구글멥 파라메터
  3. 2010.12.14 DefaultHttpClient로 SSL싸이트 접근하기
  4. 2010.12.13 2011년도 도플광어 게임엔진 연구소 문하생 모집합니다.(AGPT과정)
  5. 2010.12.04 java 의 스트링 인코딩이해( 자바 한글 깨짐해법을 위한연구)

믹사리 증강현실엔진에 데이타 넣기

|
출처: http://code.google.com/p/mixare/wiki/DisplayYourOwnData
믹사리 엔진에서 처리할수있는 트윗 jSON 스트림 포멧 예제입니다.
{
   
"status": "OK",
   
"num_results": 3,
   
"results": [
       
{
           
"id": "2827",
           
"lat": "46.43893",
           
"lng": "11.21706",
           
"elevation": "1737",
           
"title": "Penegal",
           
"distance": "9.756",
           
"has_detail_page": "1",
           
"webpage": "http%3A%2F%2Fwww.suedtirolerland.it%2Fapi%2Fmap%2FgetMarkerTplM%2F%3Fmarker_id%3D2827%26project_id%3D15%26lang_id%3D9"
       
},
       
{
           
"id": "2821",
           
"lat": "46.49396",
           
"lng": "11.2088",
           
"elevation": "1865",
           
"title": "Gantkofel",
           
"distance": "9.771",
           
"has_detail_page": "0",
           
"webpage": ""
       
},
       
{
           
"id": "2829",
           
"lat": "46.3591",
           
"lng": "11.1921",
           
"elevation": "2116",
           
"title": "Roen",
           
"distance": "17.545",
           
"has_detail_page": "1",
           
"webpage": "http%3A%2F%2Fwww.suedtirolerland.it%2Fapi%2Fmap%2FgetMarkerTplM%2F%3Fmarker_id%3D2829%26project_id%3D15%26lang_id%3D9"
       
}
   
]
}
And

구글멥 파라메터

|
출처: http://gaspotion.tistory.com/


http://maps.google.co.kr/maps?
--General--
&q=(카테고리) 
&near=(주소)  
&g=(내 위치정보 저장 관련인듯) 

-- Search Mode --
&mrt= (검색옵션 보기 )
       =all (모든 검색결과)
       =loc (위치정보)
       =yp(업체)
       =websearch(??)
       =realestae(부동산??)
       =ds(사용자 제작 콘텐츠??)

--  Location --
&ll=(??)
&sll=(??)
&spn=(??)
&latlng=(??)
&cid=(??)
&geocode=(??)
&radious=(왼쪽패널에 표시되는 검색범위)

-- Map Display --
&t= (맵 종류)
    =m(지도)
    =k(위성)
    =h(혼합)
    =p(지형)
    =e(구글어스)
&z= (줌 레벨 설정(범위1-20))
&layer= (건물사진 위키피아 등등 )
&lci=com.panoramio.all Photos (from Panoromio) 
      =com.youtube.all Videos (from YouTube)
      =org.wikipedia.en Wikipedia (English) 
      =com.google.ugc.c752d13e87c4fbd7 Webcams (from Webcams.travel
     =transit Transit
      =bike Bike Routes
  e.g. lci=com.panoramio.all,org.wikipedia.en for Photos and Wikipedia English.
&view= (view=text???  view=map????).

-- Directions --
&saddr= (출발지). 
&daddr= (목적지)
&mra ?? what does mean this route parameter? known possible values=dm, dpe, cc, ls, ...
&mrcr ?? what does mean this route parameter? known possible values=0
&mrsp (
          =0 Switches on resolving street names from coordinates.
          =1 Switches off resolving street names from coordinates.
&mrad= (목적지 추가).
          If you've got three points in your trip you can use saddr=, daddr= and mrad= instead of "+to:" clauses.

&dirflg (경로).
         =h Switches on "Avoid Highways" route finding mode. 
         =t Switches on "Avoid Tolls" route finding mode.
         =r Switches on "Public Transit" - only works in some areas.
         =w Switches to walking directions - still in beta.
         =b Switches to biking directions - only works in some areas and still in beta.

&via= Comma separated list of intermediate addresses for directions, that should be 'via points'. In the example via=1,3 addresses 1 and 3 will be via points without their own entry in the sidebar. The start (0), the 2nd intermediate (2) and the end (4) will be full addresses.

&doflg= Distance Units. (Defaults to prevalent units in country of origin.)
          =ks ??
          =ptk Outputs directions in metric (km).
          =ptm Outputs directions in imperial (miles).

--  Street View --
&cbll= Latitude,longitude for Street View.
&cbp= Street View window that accepts 5 parameters:

  1. Street View/map arrangement, 11=upper half Street View and lower half map, 12=mostly Street View with corner map
  2. Rotation angle/bearing (in degrees)
  3. Tilt angle, -90 (straight up) to 90 (straight down)
  4. Zoom level, 0-2
  5. Pitch (in degrees) -90 (straight up) to 90 (straight down), default 5

&panoid= Panorama ID. The ID of the current nearby panorama object. Panorama objects ids are used in the little arrows you can click on in Street View to move you to the next object/property. Eg panoid=eTnPNGoy4bxR9LpjjfFuOw

-- Output Control  --
&hl= (??)
&om= (오른쪽 아래 오버뷰맵).
&ie= (입력 인코딩) e.g. ie=UTF8
&oe= (출력 인코딩) e.g. oe=UTF8.
&output= 출력 포멧
&output=html
&output=js Outputs JavaScript object literals and function calls used by Google Maps, including encoded polyline data for driving directions, and stage information in HTML format.
&output=kml ( 검색결과 10를 kml화일로 저장. )
&output=mobile(맵, 이미지 등 생략). 
&output=nl Outputs a small KML file containing a NetworkLink wrapper linking to a URL from which Google Earth and Google Maps can obtain the information (only known to work with MyMaps).
&output=embed Outputs HTML suitable for embedding in third party sites, only works with the presence of the encrypted s= param, presumably to stop arbitrary content being included.
&output=dragdir returns a JSON object that contains the reverse geocode and a an encoded polyline for a given saddr (start point of the route) and daddr (endpoint of the route)
&output=georss (Geo)RSS output for the current map - probably only MyMaps
&f= Controls the style of query form to be displayed.
&f=d Displays the "directions" form (two input boxes: from, to).
&f=l Displays the "local" form (two input boxes: what, where).
&f=q (or no parameter) The default search form is displayed (single input).
&pw= Activates print mode and initiates printing. There seems to be a problem at the moment with pw=1, but using settings like pw=2 is OK.
&v= When output=kml is selected specifies the kml version. Defaults to 2.0. Version 2.2 can be specified: v=2.2. 

And

DefaultHttpClient로 SSL싸이트 접근하기

|

  1. Grab all required certificates (root and any intermediate CA’s)
  2. Create a keystore with keytool and the BouncyCastle provider and import the certs
  3. Load the keystore in your android app and use it for the secured connections
    • Don’t use the standard java.net.ssl.HttpsURLConnection for the secure connection. Use the Apache HttpClient (Version 4 atm) library, which is already built-in in android. It’s built on top of the java connection libraries and is, in my opinion, faster, better modularized and easier to understand.

대략 번역해보면 
안드로이드sdk에서 keytool이라는 유틸리티로 keystore 파일을 만든후
그것을 res/raw 에다가 넣고 앱에서 쓰는 형식이군요.

자세한 내용은 아래 출처에 있습니다.

출처 : http://blog.antoine.li/index.php/2010/10/android-trusting-ssl-certificates/
And

2011년도 도플광어 게임엔진 연구소 문하생 모집합니다.(AGPT과정)

|

-지원자격 -

컴퓨터 프로그래밍 가능하신분

 

-전형방법-

gbox2@naver.com 으로 자기 소개서 보내주세요.(본명,연락처,프로그래밍 스킬위주로)

개별연락후 면접후 합격여부 결정

 

-기한-

2011년 2월말까지

 

-관련 내용-

교육은 오프라인으로 제 사무실에서 문하생 형식으로 진행합니다.(지역은 전북 전주시)

인원은 총 3명만 모집합니다.

수강료는 기본 6개월 100만원이며 취업시까지 진행됩니다.

기간 연장은 1개월 20만원입니다.

http://cafe.naver.com/jcga/435


And

java 의 스트링 인코딩이해( 자바 한글 깨짐해법을 위한연구)

|
먼저 그동안 자바의 스트링 포멧에 대한 이해가 부족했었다.
안드로이드를 써서 euc-kr로 되어있는 한글홈페이지를 접근했었는데....
한글이 모두깨져 나왔다.

그래서 주로 c로 개발을 했던나로써는 바이트 문자열에 접근해서 코드체계를 직접 바꾸려는 시도를 하려고했었다.

그러나 나중에 자바의 스트링은 c언어의 문자열과는 차원이 다르게 고차원이라는것을 알았다.

 
new String("문자열","euc-kr"); 
최초 생성할때 이런식으로 인코딩자체를 지정해줄수도있다.

그래서 깨지는 문자열을

byte[] bytes = str.getBytes("euc-kr");
String newStr = new String(bytes,"utf-8");
TextVw.setText(newStr);

이와 같이 utf-8로 복원을 시키면 어떨까 생각하고 시도를 해봤지만 결과는 카오스.... ㅡ.ㅡ;;

무엇이 잘못됐을까 곰곰히 생각해보니 입력받을 당시에도 코드를 지정할수있다는 것을 발견할수있었다.
입력스트림 대상이 파일건 인터넷 http든 결국 inputstream으로 받아오는데...

InputStreamReader(InputStream in, String enc)
Constructs a new InputStreamReader on the InputStream in.

이런게 있다는 사실 발견!!

그렇다 처음부터 잘못받아온걸 다시 수정하려니 그게 문제였던거다.

그래서 스트림에서 받아올 시점에 아래와같이 두번째 인자를 "euc-kr" 로 줘서 해결 해줬다.

BufferedReader br = new BufferedReader(
new InputStreamReader(Httpconn.getInputStream(),"euc-kr"));

Httpconn 의 데이터 형은 HttpURLConnection이다.

-전체 소스-

public static String DownloadHtml(String addr) {
StringBuilder html = new StringBuilder(); 
try {
URL url = new URL(addr);
//HttpURLConnection conn = (HttpURLConnection)url.openConnection();
HttpURLConnection conn = null; 
            
            if (url.getProtocol().toLowerCase().equals("https")) { 
             //   trustAllHosts(); 
             //   HttpsURLConnection https = (HttpsURLConnection) url.openConnection(); 
              //  https.setHostnameVerifier(DO_NOT_VERIFY); 
              //  conn = https; 
            } else { 
             conn = (HttpURLConnection) url.openConnection(); 
            } 
if (conn != null) {
conn.setConnectTimeout(10000);
conn.setUseCaches(false);
int resultcode = conn.getResponseCode();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream(),"euc-kr"));
for (;;) {
String line = br.readLine();
if (line == null) break;
html.append(line + '\n'); 
}
br.close();
}
conn.disconnect();
}
catch (Exception ex) {
Log.i("error",ex.getMessage());
return ex.getMessage();
//System.out.println(ex.getMessage());
}
return html.toString();
}


And
prev | 1 | next