Subscribe to RSS Subscribe to Comments

mogri : network

Reading a text file without locking the file.

Often time, we want to read a text file that other process is writing onto. In C#, FileStream attempts to lock the file by default. This is not desirable if there is a process put a lock on the file already; FileStream won’t be able to read the file. Here is a simple code to read a text file while other process is writing onto it.


FileStream fs = null;
StreamReader sr = null;
try {
    fs = new FileStream(string_file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
    sr = new StreamReader(fs);
} catch (FileNotFoundException e){
    // exception handling
}

writing c++…

I am attempting to write my first c++ code in years. I expect a lot of ramp-up time.

Let’s see how it goes.

건강 챙기자. ㅡ.ㅡ

지난주부터 계속 하루에 10시간 이상씩 일하고 주말에도 일했더니 몸이 말이 아니다.
일단 오른쪽 손바닥부터 시작해서 팔 전체가 다 아퍼서 마우스도 고통을 무릅쓰고(?) 써야할 상황이다. ㅡ.ㅡ;;;
책상에 계속 앉아 있다보니 등도 아프고 피곤한지 입몸이 다 부었다.
인제 30대인데 벌써 몸이 이 모양이냐.. 내가 6살때 기억한 아버지 (36)는 이 것보다 나았는데. ㅡ.ㅡ;
역시 우리 세대는 역시 아버지 세대때보다 덜 절실해서 정신력이 이 것밖에 안되나보다.
아.. 아무래도 3월 말까지 계속 이럴꺼 같은데…
헤이해졌다.. 정신력 올리자.. 정신력 없으면 가죽껍데기다. ㅡ.ㅡv

건강 챙기자!!
검도 안한지도 벌써 2년이 되어가고 있는데 다른 운동거리를 찾지 못하고 (아니 안하고) 있다. ㅡ.ㅡ;
뭔가를 해야겠다.. 마당에 흙을 바꾸는 노가다라도. ㅡ.ㅡ;

Canton Road (廣東道)

Canton Road

Canton Road

signs

낙서

Reflection

old building

No Parking?

Canton Street Ad

우린 이러고 놀아요.

우린 이러고 놀아요.
쭈쭈랑 아빠는 맨날 이러고 논다. ㅡ.ㅡ;

Next Page »

Based on Fluidity©2006-2007 mogri.net | Theme Redesigned by Kaushal Sheth Sponsored by Web Hosting Bluebook