vi /etc/init.d/tomcat

#!/bin/sh
#
# /etc/init.d/tomcat

# chkconfig: 234 20 80

#
# This is the init script for starting up the
#  Jakarta Tomcat server
#
# description: Starts and stops the Tomcat daemon.
#

tomcat=/opt/apache-tomcat-6.0.18
startup=$tomcat/bin/startup.sh
shutdown=$tomcat/bin/shutdown.sh

start() {
  echo -n $"Starting Tomcat service: "
  sh $startup
  echo $?
}

stop() {
  echo -n $"Stopping Tomcat service: "
  sh $shutdown
  echo $?
}

restart() {
  stop
  start
}

status() {
  ps -aef | grep apache-tomcat | grep -v tomcat6 | grep -v grep
}

# Handle the different input options
case "$1" in
start)
  start
  ;;
stop)
  stop
  ;;
status)
  status
  ;;
restart)
  restart
  ;;
*)
  echo $"Usage: $0 {start|stop|restart|status}"
  exit 1
esac

exit 0


Note that when you run a process as a service, its environment may be different from the environment you see when you log in.

  • Under SUSE Linux, you may wish to add the line below to the top of the tomcat script to ensure that the tomcat process will run with the environmental variables that you have set in “/etc/profile”.
    source /etc/profile
  • To see what environment a process is running under, you can use the following commands:
    ps -aef | grep tomcat
    ... you will get a process id number like 5054 ...
    cat /proc/5054/environ

cd /etc/init.d

chmod u+x tomcat


cd /etc/init.d

./tomcat status


service tomcat start

service tomcat stop

service tomcat restart

service tomcat status


chkconfig tomcat on


Posted by [czar]
,
Posted by [czar]
,

 



openssl-0.9.8e_X64.zip


openssl 은 압축을 풀어서 c:\openssl 폴더에 파일을 넣어 두었음.


페이스북 안드로이드 app 개발시 에러

remote_app_id does not match stored id 


페이스북에 등록하는 key hashes 값은 디버그용

디버그용 코드 등록

C:\Users\jm>"c:\Program Files\Java\jdk1.6.0_31\bin\keytool" -exportcert -alias androiddebugkey -keystore "c:\Users\jm\.android\debug.keystore" | "c:\openssl\bin\openssl" sha1 -binary | "c:\openssl\bin\openssl" base64

keystore 암호를 입력하십시오:  android

[여기에 나오는 코드를 페이스북에 입력]


실제 apk용 코드 생성

C:\Users\jm>"c:\Program Files\Java\jdk1.6.0_31\bin\keytool" -exportcert -alias [real alias] -keystore "C:\keystore\keystore.keystore" | "c:\openssl\bin\openssl" sha1 -binary | "c:\openssl\bin\openssl" base64

keystore 암호를 입력하십시오:  [비밀번호 입력]

[실제apk용 key hashes]



빨간색 부분 설명

[real alias] : 실제 apk생성시 사용하는 alias

"C:\keystore\keystore.keystore" : keystore 파일 위치

[비밀번호 입력] : keystore 비밀번호

[실제apk용 key hashes] : 실제 key hashes 코드임. 페이스북에 등록하면 됩니다.



https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/



Posted by [czar]
,

http://www.lgforum.com/resources


http://s3.amazonaws.com/lgforum.com/resources/assets/885/original/LGUnitedMobileDriver_S4981MAN38AP22_ML_WHQL_Ver_3.8.1_(25).exe


이거 받아서 설치하니 잘 되네!!!

이클립스

옵티머스G프로 드라이버

옵지프로 드라이버

Posted by [czar]
,



cd %windir%\system32\inetsrv

http://technet.microsoft.com/ko-kr/library/cc730918.aspx


http://technet.microsoft.com/ko-kr/library/cc725608.aspx

appcmd set config /section:staticContent /+"[fileExtension='.apk',mimeType='application/octet-stream']"


UI를 사용하려면

  1. IIS 관리자를 열고 관리하려는 수준으로 이동합니다. IIS 관리자를 여는 방법에 대한 자세한 내용은 IIS 관리자 열기(IIS 7)를 참조하십시오. UI에서 위치를 탐색하는 방법에 대한 자세한 내용은 IIS 관리자 탐색(IIS 7)을 참조하십시오.

  2. 기능 보기에서 MIME 형식을 두 번 클릭합니다.

  3. 작업 창에서 추가를 클릭합니다.

  4. MIME 형식 추가 대화 상자의 파일 이름 확장명 텍스트 상자에 파일 확장명을 입력합니다. 예를 들어 .xyz를 입력합니다.

  5. MIME 형식 텍스트 상자에 MIME 형식을 입력합니다. 예를 들어 application/octet-stream을 입력합니다.

  6. 확인을 클릭합니다.


    UI가 안보인다........

Posted by [czar]
,

private void setDesktopWallpaper() { try { WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); wallpaperManager.setResource(R.drawable.my_wallpaper); } catch (IOException e) { SLog.e(TAG, "Error changing wallpaper: " + e.getMessage()); } }    

Posted by [czar]
,

rror code 5 will be an access denied issue, most likely. To what the access denied error explicitly refers, I'm not sure at this point, however, if you've replaced the Security subkey, then that might have something do to with it.

Try using the Security Configuration and Analysis Wizard to resolve this. This is going to be a lengthy process (at least to read - it's not that long once you get into it), so get comfortable.

Part 1: Creating the policy template.
1. Open a command prompt.
2. Run mmc.exe.
3. File menu > Add/remove snap-in > Security Templates > Add button > OK button.
4. Right-click on the Security Templates > New Template Search Path > Select C:\Windows\Security\Templates as the destination.
5. Right-click the C:\Windows\Security\Templates directory > New Template > specify the name as Server 2008 Firewall > OK button.
6. Expand the Server 2008 Firewall node > click on the System Services node.
7. Right-click the Windows Firewall service > Properties.
8. Put a check in the "Define this policy" checkbox.
9. Select the Automatic radio button.
10. Select the Edit Security button.
11. Ensure the following entries are listed. If they aren't, then add them:
- SYSTEM: Full Control
- Administrators: Full Control
- INTERACTIVE: Read
12. Click OK, and OK again to close the Windows Firewall Properties dialog window.
13. Right-click on the Server 2008 Firewall node again on the left-hand side, and choose Save.

Part 2: Applying the template security.
1. In the same mmc, select the File manu > Add/remove snap-in > Security and Configuration Analysis > Add button > OK button.
2. Right-click the Security Configuration Node > Open Databse (think of this as Create Database).
3. Specify a database name > Open button.
4. In the Template window, open the C:\Windows\Security\Templates\Server 2008 Firewall.inf.
5. Right-click on the Security Configuration node > Configure Computer Now.

That's it. You've reset the security on the service to what it should be after building the OS, so try starting the service. If this does not succeed, then you'll know it's not the security on the service that is the issue.

Cheers,
Lain


http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/f2f45412-8755-4fdd-b070-19d1c60cb6ff/

Posted by [czar]
,
android 

gravity:center 인 경우 hint 적용

android:ellipsize="start"    

http://stackoverflow.com/questions/6136054/android-edittext-with-gravity-center-not-working-on-device



<EditText 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:inputType="numberDecimal" 
    android:digits="0123456789.,"
    android:ellipsize="start" 
    android:maxLines="1"
    android:gravity="center"
    android:hint="Some hint text"
></EditText>

Posted by [czar]
,


http://worknote.tistory.com/category/%EC%A0%95%EA%B7%9C%EC%8B%9D

AAA123
BBB456
CCC145
CCC122
DDD344
CCC432
EEE333
FFF135
GGG333

CCC포함 문자열 삭제

[에디트 플러스]
컨트롤 + H 
찾을 말 : ^CCC(.*)$  또는 ^(.*)CCC(.*)$
바꿀말 : 빈공간 
정규식 체크해야함.

[VI]
:%g/CCC/d



http://5oct2009.tistory.com/5

1.ctrl+H.
2. ex)00:01:52,585 --> 00:01:55,955 형식의 라인을 삭제 하려면→editplus의 검색에서 와일드카드는 '*' 가 아닌 '.' 임.
   즉 00:01:52,585 --> 00:01:55,955 는 0.:..:..,... --> 0.:..:..,...으로 입력하고 아래는 공란으로 놓아두고.옵션에 검색식 체크 → 모두 바꿈 체크 
결과: 00:01:52,585 --> 00:01:55,955 형식으로 되어 있는 라인은 모두 공라인으로 변경됨.   

3.공라인 일괄제거.
줄바꿈이 두번 되어 있는걸 한번으로 바꿔서 공백줄을 없애주기.

Ctrl+H
하단의 정규식 앞 체크박스에 체크
찾을 말에 "\n\n" 
바꿀 말에 "\n" 
으로 한 후 모두바꾸기:

혹시 3줄씩의 공백에 스페이스 같은 것이 있다면, 
편집 > 모양 > 줄끝공백제거 
한번 해준후 윗 공백줄 삭제 실시!

4.공라인 일괄제거 2. ←이게 더 편함.
Ctrl+H
찾을말 : [\n]+
바꿀말 : \n

해리포터 영문자막 srt 파일을 번호와 자막만 나오도록 편집함.

형식: 
1330
02:20:10,025 --> 02:20:17,400
...I award Gryffindor house 60 points.

1331
02:20:23,210 --> 02:20:25,275
We're tied with Slytherin!

1332
02:20:25,310 --> 02:20:28,185
Finally, it takes a great deal of

solution:
Ctrl+H
1.찾을말 : 0.:..:..,... --> 0.:..:..,...
  바꿀말 : 삭제
2.찾을말 : 삭제\n
   바꿀말 : 

결과
1330
...I award Gryffindor house 60 points.

1331
We're tied with Slytherin!

1332
Finally, it takes a great deal of

Posted by [czar]
,
yum install php-mssql

yum install freetds


vi /etc/freetds.conf


[TDS]

host = <ip of the Server with Sql>
port = 1433
tds version = 8.0

client charset = UTF-8                #한글 문제 발생시


Note: If you use SQL 2000 then tds version = 8.0, if you use SQL 7.0 then tds version = 7.0


conf 안에 샘플이 있음.




 tsql -H <ip> -p 1433 -U <id> -P <pw>


로 연결 테스트



실제 php 코드

connnect.php

<?

     $con = mysql_connect("TDS, "id", "pwd") 

          or die("Could not connect");

     echo ("Connected Successfully");


$sql = "select count(*) from data";

$rs = mssql_query($sql, $con);

echo "result";

echo mssql_result($rs, 0, 0);

     mysql_close($con);

     ?>


연결 테스트


http://webscholar.net/2008/02/19/php-mssql-freetds/

http://blog.naver.com/PostView.nhn?blogId=leons78&logNo=130086441995


한글 문제



Posted by [czar]
,