2013. 12. 26.

숭례문 복원현장 방문기(2008-08-17) - 재등록

2008년 여름날, 숭례문 복원현장에 다녀 왔었는데요..., 
요즘 부실재건 공사 논란이 있어서  싸이월드 블로그에 올렸던 글을  한번 스크랩 해봤습니다.  글 마지막에  보시면, 
자주 방문해서 현장을 지켜보라.' 했는데 그러지 못했네요... -_-)
원본 방문해보시면, 댓글을 보실수 있는데요 그 때 사람들의 느낌을 아실수 있을듯....


--------------------------------------------------------------------------------------------------------


숭례문 복원현장을 다녀왔다. 
인터넷으로 예약을 하고 정해진 시간에 안내자의 소개로 입장을 해서 설명을 듣고 현장을 둘러볼수 있다.
인터넷 예약은 문화재청 홈페이지(http://www.cha.go.kr/)를 통해서 할수 있다.

2시에 예약을 했으나 늦은 관계로 부랴 부랴 주차를 하고 도착해서 다행히도  가이드의 설명이 막 시작 된 참이라, 입장 할 수 있었다.

 우선 들어가기전  숭례문의 일반적인 설명을 듣고, 높은 담장 안으로 들어 갈 수 있었다. 각 개인들에게는 출입증이 지급되었다.  들어가기전 가이드의 한말씀 " 여기 들어가서는 돌맹이 하나라도 들고 나오시면 안됩니다. 모두 유물이라, 주의해 주십시요. CCTV가 모두 녹화되고 있습니다.' ^^;

  [그림1] 입구에서 옛날에 찍은 사진을 설명하고 있다. 숭례문 주위를 돌아 가는 전차, 앞에서 손수레를 끌고 가는 상인등...)

2층 공사계단을 통해서 위로 올라가서 가이드는 전체적인 상황을 설명했다. 불이 나서 화재를 진압하고, 이때 우리가 알고 있다시피,  건물구조 미파악으로 인해 2차적 피해가 발생 했다는 설명도 함께 덧붙여 졌다.

  
2층 공사 현장에서 본 숭례문.  온통 절체 프레임으로 둘러 싸져 옛날의 모습은 짐작으로만 가늠할수 있다.

   화재초기, 2차 화재 , 진화후,  향후 복구 가상도 등을 같이 전히 해놓았다.

일제시대는 문으로 전차가 다녔었고, 일본의 황태자비가 올때 누추한 문으로 전차를 타고 갈수 없다하여, 문 옆의 성벽을 허물고 전차를 돌아 가게 했다고 한다. 그래서, 복구현장에 약간 남아 있는 성벽의 흔적도 역시 일제시대의 구성된 것이라 한다. 그러나, 자세히 보면 둥글게 되어 있는 돌로 구성된 성벽은 세종시대때 쌓은거라고 한다.

 복원현장으로 내려 가는길...에서

  아래는 성벽의 사진인데, 군데 군데 패인것은 총알 자국이란다.

아래 사진은 얼마전 뉴스에도 나왔었는데 6.25때 만든 지하벙커의 모습니다. 추석전까지 철거된 예정이란다.

아래는 공사 관련 알림판이다. 소요비용 , 기간등이 설명이 자세히 되어 있다. 내부 상태 조사에 따라서 기간은 더 걸릴수도 있다고 한다.  누가 질문했는데, '비용은 어디서 나오나요?'  - 세금이란다. -_-; 


공사 현장 철문 밖에서 본 남대문이다...  유구무언이다.

입구에 있는 정보판이다. 성벽의 모습도 보이고, 전차 부설전 모습도 보인다.  일제 치하에서 우리는 참 많은것을 잃었다.

** 가이드 말씀 한번 으로 끝나지 말고 종종 방문해서 공사가 진행되는 상황에 관심을 가지고 지켜봐 달라고 한다.  그분이 부탁 하실 말은 아니지만 그래야 할 것 같다.  이전에 날림으로 복원된 것이 여러건 있다고 한다.

이글을 혹시 지나다가 보시는 분도 신청하셔서 그 현장을 한번 방문해 보시기 바란다.

2013. 12. 23.

remove FIN_WAIT_2 from connection ( windows) by JAVA


when close socket at server side. although socket.close is called  FIN_WAIT_2 is not disappeared.

c:\netstat -an |find "FIN_WAIT_2"

  TCP    127.0.0.1:1234         127.0.0.1:61234        FIN_WAIT_2
  TCP    127.0.0.1:61234        127.0.0.1:1234         CLOSE_WAIT



In your code,

you must call this function before close socket.

setSoLinger(true, 2000); 
Enhanced by Zemanta

2013. 12. 16.

Busy Pleco

좀 처럼 모습을 안보이는 우리집 플레코가 오늘은 왠일인지, 열심히 입을 움직인다.

2013. 12. 3.

Redmine - Register Issue by e-mail.

I have searched internet  to register issue by -mail.
but  I have failed.  After more digging,  I found  that  I must prepare something to enable it.

It is that  system requires certification file.

If you follow steps. you can success to register issue by e-mail in redmine.



curl http://curl.haxx.se/ca/cacert.pem -O c:\pem\cacert.pem 


In get_mail.bat 

rem set certification file path variable. 
set  SSL_CERT_FILE=c:\perm\cacert.pem

c:\BitNami\ruby\bin\rake.bat -f c:\BitNami\apps\redmine\htdocs\Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com username=email-id@gmail.com password=emailpassword port=993 project=PRJID tracker=issue allow_override=priority ssl=true



mail body must be contain as below...


Project: projectid
Tracker: Issue(issue type ...)

Priority:
Status:
Assigned To: name or id
Enhanced by Zemanta

2013. 11. 22.

How to Configure firewalls by command line in windows

When your application use network,  user will meet the 'Firewall warning messages' . If user ignores it, your application cannot work properly.   Even if your program is used by many people and  it is distirbuted automatically.  You must make firewall allows your application.

This batch file is about configure firewall.


1) XP Case 

firewall.bat  file

rem delete previous configuration to prevent duplicate2)
netsh firewall delete allowedprogram c:\myapp\myapp.exe
rem add myapp.exe to allow list.
netsh firewall add allowedprogram c:\myapp\myapp.exe Myapp-firewall enable



2) Windows 7 Case


REM *** Delete previous firewall config. ***
netsh advfirewall firewall delete rule name=MyAppfirewall

REM *** allow inbound ***
netsh advfirewall firewall add rule name="MyAppfirewall" dir=in protocol=tcp action=allow program="c:\MyApp\MyApp.exe"
netsh advfirewall firewall add rule name="MyAppfirewall" dir=in protocol=udp action=allow program="c:\MyApp\MyApp.exe"

REM  *** allow inbound  ***
netsh advfirewall firewall add rule name="MyAppfirewall" dir=out protocol=tcp action=allow program="c:\MyApp\MyApp.exe"
netsh advfirewall firewall add rule name="MyAppfirewall" dir=out protocol=udp action=allow program="c:\MyApp\MyApp.exe"

2013. 11. 21.

Verify OS Version in Windows System by command line

ver | find "XP" > nul
if %ERRORLEVEL%==0 goto _XP

:_XP 
   echo "this is XP" 
   goto end

: NONXP
   echo "this is not XP"

: end


Line 1:  ver  displays version 

       win7 case -->  Microsoft Windows [Version 6.1.7601]
       winxp case  -->Microsoft Windows XP [Version 5.1.2600]

Line 2:  dedepends of result,   do somthing,.  

2013. 11. 10.

Changing Metadirectory _svn to .svn in subversion client (ASPDOTNETHACK / SVN_ASP_DOT_NET_HACK)

While copying  repository , I found that _svn and .svn directories are same folder.
_svn is created automatically. So, I remove it but it was created by something...

Because I know that this is alternative way  for .net web servers.  
I did googling. and  I found it that How to fix it.

1) check system environment varialbes
    - run command prompt.
    - type set
    - you will find  ASPDOTNETHACK or  SVN_ASP_DOT_NET_HACK

2) remove it form 'my computer properties'
       --> advanced system configuration
               --> environment variables
               --> remove this variable

3) reboot your computer.

4) try again copy svn-directory
Enhanced by Zemanta

2013. 11. 1.

How to use CX_oracle module at Pyhon in Windows64

Four components to use oracle module in pythone of window.

1) python
2) oracle module
3) windows.
4) oracle Driver (Oracle clients)

You will meet errors on using oracle module at  python2.7, if you run it in windows64 because of some reason.

You must consider something...

Follow below step

1) install python 2.7.x  32bit
2) install oracle module  32bit
3) install oracle driver 32bit
    - At this step  I had troubles.  Becuase I 've installed 64bit oracle drivers for other programs.
   - You don't need to uninstall it but you must change environment variables.
   - ORACLE_HOME  : change to 32bit oracle client root
   - PATH : change to 32bit oracle client root . You must changed both of them.

4) window os 32 bit or 64 bit  , anything is OK.

I wish You could run it.

Breakfast in the aquarium

My House,
In the morning.~


2013. 10. 2.

Oracle Default insert

INSERT ALL
    INTO tblname (f1,f2) VALUES ('v1', 'v2')
    INTO tblname (f1,f2) VALUES ('v1', 'v2')
SELECT * FROM dual;

2013. 9. 10.

Load non utf-8 file and display QTextEdit at pyhon



1) declare coding

    # -*- coding: utf-8 -*-

2) load file  ( let's asume file is  'euc-kr')
   
     fileData = f.read()  # read from file


3) decode  to unicode
    unicodedata = unicode(fileData,"euc-kr")

4) encode 'utf-8'

    utf8data = unicodedata.encode("utf-8")

5) set text
    editor.setPlainText(utf8data)  # editor is QTextEdit


** summary ** : converting flow

    EUC-KR --->   UNICODE --> UTF-8

Enhanced by Zemanta

2013. 9. 6.

Sending Data Between Threads by using QThread, at pyhon (QT version)

##  Do Asynchronously and return result to main Thread
##
##  step 1:  Define thread class
##  step 2:  Call 'emit' to send notify+data to Main thread  
##  step 3:  Connect event and method
##  step 4:  Implement method 


from time import sleep
from PyQt4 import QtCore

class ParentThread(QtCore.QThread):
    def __init__(self):
        QtCore.QThread.__init__(self)
        self.exiting = False

    def __del__(self):
        self.exiting = True     # used for exit in whilie loop.
        self.wait()



class ChildThread(ParentThread):

    def __init__(self):
        ParentThread.__init__(self)
 
    def run(self): # this method does not use loop code, it run once.
        
        # get server version data
        conn = httplib.HTTPConnection("webserveraddress")
        conn.request("GET", "/data.htm")
        connResponse = conn.getresponse()  # reason, status
        resData = connResponse.read()

        #send message + event
        # resdata is passed as parameter of onComplete
        self.emit( QtCore.SIGNAL('onComplete(QString)') , resData)  



class MainClass:

    def __init__(self, parent=None):    
        self.childThread= ChildThread()

       #connect event
        self.connect( self.childThread, QtCore.SIGNAL('onComplete(QString)'), self.onComplete)
        
        #start Thread
        self.versionThread.start()  

   def onComplete(self, resData):
        print resData


        


Enhanced by Zemanta

2013. 8. 28.

How to resolve "svn: E155017: Checksum mismatch "

while update,
if this error occurs  by  some reason ,  you must follow process.



svn: E155017: Checksum mismatch for '/aa/aa.file':
   expected:  7432edcbdbc1a10fd200000
   recorded:  7b7860484ee5a144c200001


1) svn delete aa.file
2) svn add aa.file
3) svn commit aa.file

this process can resolve svn error .

**** This process cannot cover all case of E155017 ****



Enhanced by Zemanta

Ftp batch script without interface

to run ftp without interface  is needed two files.

[** This is for unix series os.]
1) batch ftp command file
2) script to call batch file( #1)


ftp.cmd   # command file
ftp.sh  # shell file.



## command file ####
# let's assume   userid : aaa   password : bbb
# remote directory  : cccc
# local directory : dddd
# this command list  can get multiple files.

open 111.111.111.111
user aaa bbb
lcd   dddd
cd   cccc
hash
bell
mget *


## shell file. 

ftp -i -n < ftp.cmd

Enhanced by Zemanta

2013. 8. 22.

Create exe from python script. ( py2exe)

1) install py2exe

    url: www.py2exe.org
    you must check your python version(2.*/ 3.*) and window os bit (32/64).
    although your os is 64bit, if you installed 32bit pythone, you need to select  32bit version.  

2) make setup.py
    i: simple case
    setup.py 
   
     from distutils.core import setup
     import py2exe
     setup(console=['yourapp.py'])  # very simple !!

 3) run setup.
    setup.py py2exe

  4) check directory dist, you can find yourapp.exe ~


** summary ***
   0) install py2exe
   1) prepare your python script
   2) make setup.py
   3) python setup.py py2exe
    
Enhanced by Zemanta

2013. 8. 13.

강원도 고성 여행. -2013.8

출발
   - 5시반
도착
   - 강원도 고성. 대진항
     동해 최북단의 항구 이자, 해수욕장.
     여름기간에만 개방.
1박
    -  회센타 회먹기

2박
 -

  대진 등대 방문
  - 소장님 의 관리시스템 소개
  -

도착

python BoxSizer concept ( Basic )


  • Horizontal Sizer
    • Elements are arranged by horizontal direction.





  • Vertical Sizer 
    • elements are arranged by vertial direction 

Sizer can be nested.  so, Various layout can be made by combination of sizers.

2013. 7. 29.

2013. 7. 10.

SVN add new file list and commit by command line

svn add --force .     # add unversioned file  at current directory
svn  --editor-cmd notepad *.*      # commit and launch notepad to comment

2013. 6. 27.

Running multiple batch command at the same time by dos command.

Each batch file runs without waiting for ending previous batch commands.

(sample1)
Multi_run.bat

   start cmd.exe /C  bat_comm1.bat 
   start cmd.exe /C  bat_comm2.bat 
   start cmd.exe /C  bat_comm3.bat 

2013. 6. 14.

Kill specified process list

kill `ps aux | grep keyword| grep -v grep | awk '{print $2}'`

# check keyword and kill processes by pid from awk

2013. 6. 11.

When creating process in java , If it does not worked.

check 1:
 - close all stream

    ProcessBuilder pb = new ProcessBuilder("app.exe");
    Process prs = pb.start();

   prs.getErrorStream.close();
   prs.getInputStream.close();
   prs.getOutputStream.close();
 

check2 :
  - check working directory or path
  - some application checks files in current directory.
  - parent working directory is different from sub application.

 
    ProcessBuilder pb = new ProcessBuilder("app.exe");
 
    pb.directory("location of app.exe");

    Process prs = pb.start();
    prs.getErrorStream.close();
   prs.getInputStream.close();
   prs.getOutputStream.close();




 

2013. 5. 29.

How to position dialog box on center of window?

final JDialog d = new JDialog();
d.setSize(200,200);
d.setLocationRelativeTo(null); // <====== USE THIS CODE !!!!
d.setVisible(true);

2013. 5. 24.

Removing style from html to simplify HTML code

1)  using regular expression

style=["|'][^('|")]*["|']    # find style attributes.  and replace with space.

2013. 5. 2.

how to assign date to variable on command prompt of MS windows.

I need to make batch file which generates some logs. File names must be based on date_time



1) new file from text editor  (ex: file name is make_log.bat) 
     type below.

 SET DT=%date%     REM we can get current date from %data%
 SET LOG_NAME = %date%_.log   REM  2013-01-01_.log 
 DIR > %LOG_NAME%


2) save
3) click  make_log.bat 


Enhanced by Zemanta

2013. 2. 18.

When authorize information is not saved at subversion in window sytem

1) remove auth info
2) re authorize.
---------------

1) To remove authorize information ,

 very simple,

  step 1- 1 : You must remove some data. (Refer previous post.)
  step 1- 2 : remove sub directories ( in below auth)
                 svn.simple
                 svn.ssl.client-passphrase
                 svn.ssl.server
                 svn.username
               
notice:  before removing, if you have some critical password data to remember,  Keep them all. 

step 2-1: re-auth
             
           

place which subversion saved authentication data in window system

%APPDATA%\Subversion\auth\  


2013. 1. 28.

import csv into mysql by load data (skip some column)

It's very general , well known topic.but when we need time to find and use it.
I blogged it to remember. 




load data infile 'aa.csv' into table tbl_name
character set 'UTF8'
fields terminated by ','  optionally enclosed by '"' escaped by '\\'
lines terminated by '\r\n'  starting by ''
ignore 1 lines

 (col1, col2, col3
;


case 2: when number of column of table and csv data
  1- when you want drop some column of csv.  ( drop v4, v5)
     ex) csv contents : v1, v2, v3, v4, v5

 load data infile 'aa.csv' into table tbl_name
character set 'UTF8'
fields terminated by ','  optionally enclosed by '"' escaped by '\\'
lines terminated by '\r\n'  starting by ''
ignore 1 lines

 (col1, col2, col3, @dummy1, @dummy2)   -- @dummy just read and drop




Enhanced by Zemanta