2011. 12. 14.

insert file list into sqlite-db table by python


~                                                                                                        import os,sqlite3

con = sqlite3.connect("sqlite_test.db")
cur = con.cursor()

flist = os.listdir("/Users/path/")
for ff in flist:
        f = (ff,)
        cur.execute('insert into tbl_local (vcpath) values(?)' , f )  # watch out, question-mark.  there is no quotation mark
con.commit()
con.close()

2011. 11. 2.

VS error PRJ0050 and RegSetKeyValue

I met the visual studio error :prj0050 suddenly.  ( regist DLL error )
I didn't change any compile option or link.
I checked source codes.  I found  the reason.     I used the function  'RegSetKeyValue'.


Read MSDN-explains  more detail.(attention to remark section)
  http://msdn.microsoft.com/en-us/library/windows/desktop/ms724921(v=vs.85).aspx

2011. 11. 1.

InternetSetOption TIMEOUT option

I found  InternetSetoption with 'CONNECT_TIMEOUT' flag.
In my case.  when I used timeout option , I got a error code which is 'only query option'
Googling shows answer. It is that using thread.
But  I resolve problem by using 'CONTROL_RECEIVE_TIMEOUT' option .  because my case is that server response is too slow not connect -error-problem.

If you want to set option 'connect-timeout'  you must use thread-trick.

MSDN : http://support.microsoft.com/kb/224318

In my case :
 
DWORD dTimeout = 3000; // milisec.   
BOOL res = InternetSetOption(m_hInternet, INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT, (void*) &dTimeout, sizeof(dTimeout));
// Check res value. If your function call is success or not. 

2011. 10. 24.

creating new internet explorer window by shell exec

If you want to create a new I.E window  not tab-window in program code.


In program code, 


ShellExecute(NULL, NULL, URL, NULL, SW_SHOW); //--> new tab  will be created.
ShellExecute(NULL,"open","iexplore",URL,NULL,SW_SHOW); // --> new window will be created.


// test in  I.E.  8.0.xxxx




ref : http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx

2011. 10. 10.

Removing javascript security warning of local html :MOTW(mark of the web)

When loading local html file, if  it has a script   IE shows the security warning bar( yellow bar).
It can be fixed by changing configuration.  but  I found another solution which  is provide by MS.

Mark of the Web  (MOTW)  :
 original link http://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx

Simply.   Just add  below line  at the top of html file.


< !-- saved from url=(0013)http://a.b.c -->

** 0013 means number of characters of follow url.

--- check position --

<!doctype html>
<!-- saved from url=(0013)http://a.b.c -->
<html>
  <head>
    <title>A Mark of the Web Example.</title>
  </head>
  ...

2011. 6. 28.

Changing Ime mode ImeMode

http://www.kawada.kr/xe/?document_srl=3894

한글입력을 기본으로 하고 싶을때 ,


클래스 속성중 imeMode라는 것을 'active'바꾸면 기본적으로 한글 입력이 된다. 대부분의 포털들이 이렇게 설정이 되어 있다.

//자바스크립트에서

document.all.txtInput.style.imeMode="active"; //한글
document.all.txtInput.style.imeMode="inactive"; //반자
document.all.txtInput.style.imeMode="disabled"; // 영문


// 스타일로

style=" ime-mode: active"
style=" ime-mode: inactive"
style=" ime-mode: disabled"

...........


// 아래는 html본문에 다음과 같은 input 요소가 있다고 가정.





2011. 5. 31.

WIS 2011 (World IT Show 2011 in Seoul ) : It's 3D life.

WIS 2011 : world it show 2011
장소: coex

두개의 층으로 전시 되었으며, 1층에과 3층에서 전시

** LG와 삼성의 3D TV 대결로 압축!

3디 컨텐츠, 스트리밍, 모바일, 
3디 안경, - LG 삼성. 


모든곳에서 3입체에 대해서 연구, 
3차원에 대한 컨텐츠 수급도 하나의 과제인듯. 
증강현실이 일부 소개
전자칠판과 협업시스템은 단골 메뉴, 
로봇이 일부 전시됨. -- 느리지만 조금씩 규모를 더해가고 있음. 
클라우드 - 그러나 크지 않음. 
 SNS - 는 대세. 피해갈수 없음. 
핸드폰- 다양한 크기, 다양한 모델 그러나 플랫폼은 구글과 아이폰. 
아이폰은 KT에서 자사서비스를 위한 도구로만 할용,...
앱들을 다양한 방향으로 접목시도 - 컨버전스 당연한 방향으로 생각됨.

http://www.kawada.kr/xe/?mid=free&document_srl=3841 ( Photo Link)

2011. 5. 25.

Kill process by c++ at XP

Many program examples have  a non-proper parameter in privaliage parameters

I replaced parameter. //   PROCESS_ALL_ACCESS -->PROCESS_TERMINATE
// Although you have done, some processes don't be killed.

hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);

//when process_all_access is used,  functions returns error ( access denied)
hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pe32.th32ProcessID);

2011. 4. 15.

따뜻한 주말나들이 어디로 갈까? -당일치기

주말 봄나들이 가볍게 갈수 있는곳 정리했습니다.
모두 가본곳들입니다.. 추가 추천도 해주세요 ~~~
http://www.kawada.kr/xe/?document_srl=3769

* 좌대낚시, 양평딸기체험, 헤이리,도자기체험

2011. 3. 31.

Bit Torrent - optimistic unchoking

Bit Torrent

Optimistic Unchoking :  file sharing or distributing algorithm
search bit torrent  Bittorrent Protocol Specification v1.0

2011. 3. 14.

objective-C protocol concept

* ex)
// 1) you called presentModal method
[controlClassObject presentModalViewController:uiClassObject animated:YES];
// 2) If you want to close uiClassObject,  you use delegate mechanism like above .
//3) when cancel or ok event is occured in UIClass.  call delegate.Method1  and then
      controlmethod call '  [self dismissModalViewControllerAnimated:YES];

2011. 3. 10.

What kind of networks are connected in my pc ?

I run command window. and type netstat 
I got a interesting result.
this is result.
I found that akami, amazonaws, facebook. 
The networks of  the most famous companies are connected with my pc.
I am not alone ~

-------------------------------------
C:>\netstat

Active Connections

Proto Local Address Foreign Address State

TCP my-pc:1155 baymsg1020416.gateway.edge.messenger.live.com:1863 ESTABLISHE
TCP my-pc:1159 a118-214.79-139.deploy.akamaitechnologies.com:http ESTABLISHE
TCP my-pc:1170 a125-56.214-42.deploy.akamaitechnologies.com:http ESTABLISHED
TCP my-pc:1222 a125-56.214-98.deploy.akamaitechnologies.com:http ESTABLISHED
TCP my-pc:1233 a125-56.214-75.deploy.akamaitechnologies.com:http ESTABLISHED
TCP my-pc:1241 a125-56.214-75.deploy.akamaitechnologies.com:http ESTABLISHED
TCP my-pc:1246 a125-56.214-42.deploy.akamaitechnologies.com:http ESTABLISHED
TCP my-pc:1384 ec2-75-101-142-23.compute-1.amazonaws.com:http ESTABLISHED
TCP my-pc:4928 www-10-02-snc5.facebook.com:http ESTABLISHED
TCP my-pc:4963 channel3-02-01-snc4.facebook.com:http ESTABLISHED

iPhone App Calculator -1 review

기본계산기로는 좀 부족하고 그래서 앱스토어에서 뒤지다가 찾은 계산기 어플. 디자인도 깔끔하고 모양도 단순하고 그렇지만, 다 되는 유용한 계산기 이다.

카테고리: 생산성
이름 : Calculator +   ( 무료  )
회사: http://www.xneat.com/  Sarah Ragab

  • 특징:  괄호를 이용한 계산이 가능하고,  필기인식이 된다. 
  • 단점: 필기인식이 썩 유용해 보이지는 않는다.  (도움말에서 어떤 제스쳐가 어떤 기호인지는 알려 준다.)

기본 UI 는 아래 그림처럼 보인다. 앱소개에는 polishing UI라고 소개되어 있다. 숫자를 치면 LED처럼 주황색으로 표시된다. 그러면 기능이 끝인가? 라고 생각하기 전에  (2nd)버튼을 누르면, 키패드에 함수가 표시된다.  switch버튼을 누르면 필기채 인식화면으로 변환된다.
그리고 숫자사이를 왔다 갔다 하기 위해서는 화살표 버튼을 누르면 커서를 옮길수 있다.

(=)를 누르면 결과가 흰색으로 표시되고, 입력식은 윗줄로 글씨가 작아지면서 이동이 된다.

2011. 3. 9.

Google changes rule.

I found the news about chaging rules of google search ranks.
Many internet companies are affected by google ranks.
Google has more an more  big invisible powers.
Although Google says  "Don't be evil." .   As Google has more and more powers  people are afraid of google.   I think  that because google predicts such situations ,   Google's motto   would be such  that to prevent people from fearing them.

TED: Derek Sivers: Weird, or just different?


다양성을 인정하자 정도 일까요?

2011. 3. 4.

Who is the winner in the cloud computing ?

Who is the winner in the cloud computing ?  

hardware company ?
Isp (internet service provider) ?
infra service provider ?

let's change  point of view.

who doest get big money?

2011. 2. 11.

Chagall ( Magican of Color ) : Chagall exhibit in Seoul 2010~

I visited Chagall exhibit in Seoul  on last day of long holidays.
His pictures are easier than others who I have experienced.
My daughter said that ' His pictures have explicit feelings.   I am not sure that this expression is correct or not.  but  I agree.


보낸 사람 0206-샤갈전시회-정동

2011. 1. 4.