2015년 3월 27일 금요일

[JaVa] 디렉터리의 파일 목록


File path = new File("c:\\logs\\");
  
String fileList[] = path.list(new FilenameFilter() {
    
@Override
    public boolean accept(File dir, String fname) { 
        return fname. startsWith("test.log.");        // test.log. 으로 시작하는 파일들만 리턴
    }
});

2015년 3월 26일 목요일

[EtC] 이클립스에서 특정 확장자의 인코딩 설정








[EtC] Classic ASP 에서 외부링크의 JSON 결과 가지고 오기

Dim result
Dim xmlhttp
Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
 
xmlhttp.Open "GET", "http://test.url?idx=" & session("idx"), false
xmlhttp.setRequestHeader "Content-Type", "application/json; charset=utf-8"
xmlhttp.send
result = xmlhttp.responseText
Set xmlhttp = Nothing
Response.Write result

참고 : Classic ASP 용 JSON Parser http://www.aspjson.com/

2015년 3월 19일 목요일

[AnDrOiD] 카카오톡 텍스트 메세지 전송

String sendMsg = "Hello World!!";

 Intent intent = new Intent(Intent.ACTION_SEND); 
 intent.setType("text/plain"); 
 intent.putExtra(Intent.EXTRA_SUBJECT, "[메세지]\n"); 
 intent.putExtra(Intent.EXTRA_TEXT, sendMsg);
 intent.setPackage("com.kakao.talk");
         
 startActivity(intent);

2015년 3월 9일 월요일

[AnDrOiD] adb 명령을 이용한 앱 구동 화면 녹화



c:\> adb shell screenrecord --time-limit 60 /sdcard/app_movie.mp4

WARNING: linker: libdmb_MPEG4SL.so has text relocations. This is wasting memory
and is a security risk. Please fix.


--time-limit : 녹화할 시간. 초단위.
/sdcard/app_movie.mp4 : 저장할 경로 및 파일 이름.

에러메세지에 대해서는 찾아 보는중...





2015년 3월 4일 수요일

[AnDrOiD] TableLayout의 stretchColumns 때문에 늘어난 TextView의 줄바꿈


출처 : http://susemi99.tistory.com/1340

 <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:stretchColumns="1" >

        <TableRow
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >
            <TextView
                android:layout_width="70dp"
            android:layout_height="match_parent"
            android:text="@string/msg_name" />
            <TextView
                android:id="@+id/tvLoc"
                android:width="0dp"
                android:layout_width="match_parent"
            android:layout_height="match_parent" />
        </TableRow>
 </TableLayout>