2008 09 03 I met Kobbang

2008. 9. 3. 23:11
영훈이를 네이트온을 통해 만났다.

애들이야기를 해줘서 재밌겠들었다

진철이는 홍콩에서 디자인하고 있고
세욱이는 작곡 계속하고 있다고 하면서
녀석의 노래도 보내줬다.
"나몰라 패밀리"앨범을 프로듀스 했다고

빨리 한 번 보고 싶다.

시간되면 영훈이가 올라와서 얼굴한번 볼 수 있을 것 같기도 하고
아니면 10월중에 한 번 내려가서 애들얼굴 한번 보는것도 괜찮을 것 같다.

회사에서 해야할 일이 좀 생겼다
게시판을 좀 만들어야 할 것 같네 ^^
정렬기능이랑 엑셀다운기능을 포함해서 ㅋㅋㅋ

원래 정성택 과장이 오기로 해서 오늘 자유수영 안가려고 했었는데
바쁘다고 해서 자유수영 왔다.
열심히 하고 나왔는데 깜박하고 수건을 안가져와서 열심히 털고 나온뒤에
아저씨한테 미안하다고 물을 좀 흘릴 것 같다고 했더니
아저씨가 수건을 빌려줘서 닦고 나왔다.

728x90
<html>
    <head>
        <title>sorting a Table</title>
        
        <script type="text/javascript">
        var dataset = new Array();// 모든 data를 가지고 있고 정렬시 사용.
        
        /*
             작은것이 가장 위로 정렬
            colIndex : 원하는 columnIndex
        */
        function asc(colIndex){
            var sortArray = new Array();
            // 정렬을 수행 할 수 있는 행을 추출
            for(var i = 0; i < dataset.length; i++){
                sortArray[i] = dataset[i][colIndex];
            }

            // 해당 행으로 정렬을 수행
            var first, second, min;
            for(first = 0; first < sortArray.length-1; first++){
                //a[j]...a[a.length]사이에 가장작은 원소의 인덱스를 찾음
                for(second = first+1, min = first; second < sortArray.length; second++){
                    if(sortArray[second] < sortArray[min])
                        min = second;
                }
                swap(sortArray, min, first, min, first);
            }
        }
        // 정렬 중 필요한 인자들의 위치를 바꿔줌
        function swap(array, first, second, arrayIndexA, arrayIndexB){
            var temp = array[first];
                array[first] = array[second];
                array[second] = temp;

            var tempDataSet = dataset[arrayIndexA];
            dataset[arrayIndexA] = dataset[arrayIndexB];
            dataset[arrayIndexB] = tempDataSet;
        }
        /*
             큰것이 가장 위로 정렬
             colIndex : 원하는 columnIndex
        */
        function desc(colIndex){
            var sortArray = new Array();
            // 정렬을 수행 할 수 있는 행을 추출
            for(var i = 0; i < dataset.length; i++){
                sortArray[i] = dataset[i][colIndex];
            }
            // 해당 행으로 정렬을 수행
            var first, second, max;
            for(first = 0; first < sortArray.length-1; first++){
                //a[j]...a[a.length]사이에 가장큰  원소의 인덱스를 찾음
                for(second = first+1, max = first; second < sortArray.length; second++){
                    if(sortArray[second] > sortArray[max])
                        max = second;
                }
                swap(sortArray, first, max, first, max);
            }
        }

        /*
            List 생성 : 실제로는 가져온 Data를 뿌려 줄 때 JSP등에서 직접 생성하므로 필요 없을 듯 함.
        */
        function create(tName, tBodyId){
            //var tbody = document.getElementById(id).getElementsByTagName("TBODY")[1];
            var tbody = document.getElementById(tBodyId);
                          
                  for(var i = 1; i < 14; i++){
                      var row = document.createElement("TR");
                      var td1 = document.createElement("TD");
                      var td2 = document.createElement("TD");
                      var td3 = document.createElement("TD");
                      var td4 = document.createElement("TD");
                      var td5 = document.createElement("TD");
                      
                      td1.appendChild(document.createTextNode(i));
                    td2.appendChild(document.createTextNode("id " + i));
                    td3.appendChild(document.createTextNode("title "+ i));
                    td4.appendChild(document.createTextNode("name " + i));
                    td5.appendChild(document.createTextNode("date " + i));
                    
                    row.appendChild(td1);
                    row.appendChild(td2);
                    row.appendChild(td3);
                    row.appendChild(td4);
                    row.appendChild(td5);
                              
                    tbody.appendChild(row);

                    // rowData create
                    var rowDatas = new Array();
                    rowDatas[0] = i;
                    rowDatas[1] = "id" + i;
                    rowDatas[2] = "title" + i;
                    rowDatas[3] = "name" + i;
                    rowDatas[4] = "date" + i;

                    dataset.push(rowDatas);
                  }
        }
        /*
        List 생성
        필요인자 :
            tBodyId : List할 table 아래에 <TBODY>로 이름지은 elementID
            colNum  : number of columns
        */
        function update(tName, tBodyId, colNum){
            clearTable(tName);
                
            for(var i = 0; i < dataset.length; i ++){
                var row = document.createElement("tr");
                var rowArray = dataset[i];

                for(var j = 0; j < colNum; j++){
                    row.appendChild(createCellWithText(rowArray[j]));                    
                }

                document.getElementById(tBodyId).appendChild(row);
            }
        }

        function createCellWithText(text){
            var cell = document.createElement("td");
            cell.appendChild(document.createTextNode(text));
            return cell;
        }
        /*
            해당 Table의 주어진 index의 Row를 삭제
        */
        function deleteRow(tName, rowIndex){
            var tbody = document.getElementById(tName).getElementsByTagName("TBODY")[1];
            tbody.removeChild(rowIndex);
        }
        /*
            해당Table 의 첫번째 Row를 제외한 나머지 Row 모두 제거
        */
        function clearTable(tName){            
              var tbody = document.getElementById(tName).getElementsByTagName("TBODY")[1];
            var trows = tbody.rows.length;
            //for(var i = trows ; i > 1; i--){
            while(tbody.rows.length > 0){
                tbody.removeChild(tbody.lastChild);
            }            
        }

        /*
            엑셀출력.
            1. Title
            2. Body
             - 실제 Data는 표에 있는 내용이 아니라 이미 저장해 놓은 dataset으로 뿌려줌.
        */
        function AutomateExcel(xTitle, xColumns){
            if(xTitle == null){
                xTitle = "Excel download";
            }
            if(xColumns == null){
                xColumns = "Num,ID,Title,Writer,Date";
            }
            var cols = xColumns.split(",");

            var left = "A";
            var top = 3;
            var right = indexToAlphabet(cols.length);
            var bottom = dataset.length + top;
            
            

            
            // Start Excel and get Application object.//
            try{
                var oXL = new ActiveXObject("Excel.Application");

                oXL.Visible = true;

                // Get a new workbook.
                var oWB = oXL.Workbooks.Add();
                var oSheet = oWB.ActiveSheet;

                //Format Title as bold, vertical alignment = center.
                //Title --------------------------------------------------------
                oSheet.Range("A1", "E1").Font.Bold = true;
                oSheet.Range("A1", "E1").VerticalAlignment =  -4108; //xlVAlignCenter
                oSheet.Cells(1, 1).Value = xTitle;
 
                //BODY  --------------------------------------------------------
                //Format Table header
                oSheet.Range("A2", "E2").Font.Bold = true;
                oSheet.Range("A2", "E2").VerticalAlignment =  -4108; //xlVAlignCenter
 
                // Add table headers going cell by cell.
                for(var i = 0; i < cols.length; i++){
                    var j = i+1;
                    oSheet.Cells(2, j).Value = cols[i];
                }
 
                // Create an array to set multiple values at once.
                // Range
                
                //oSheet.Range(left + top + "," + right + bottom).Font.Bold = true;
                //oSheet.Range(left + top + "," + right + bottom).VerticalAlignment = -4108;
 
                for(var m = 0; m < (bottom-top); m++){
                    var nowCol = indexToAlphabet(m);
                    var c = m + 3;

                    for(var l = 0; l < cols.length; l++){
                        var r = l + 1;
                        //oSheet.Cells(c, r).Value = m + " : " + r;
                        oSheet.Cells(c, r).Value = dataset[m][l];
                    }
                }

                ///////////////// options of saving //////////////////////////
                // Make sure Excel is visible and give the user control
                // of Excel's lifetime.
                //oXL.Visible = true;
                //oXL.UserControl = true;

                // save as a file directly
                oWB.SaveAs("c:\\test.xls");
                oXL.Quit();
            }catch(e){
                alert("브라우저 옵션 > 도구 > 인터넷옵션 > 보안 > 안전하지 않는 것으로 표시된 ActivX 컨트롤 초기화 및 스크립트 > 확인 ");
            }
        }
        /*
            원하는 칼럼의 알파벳을 찾기위한 function
        */
        function indexToAlphabet(idx){
            var alphabet = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
            return alphabet[idx];
        }
        </script>
        
        
    </head>
    
    <body>
        <input type="button" value="asc" onClick="asc(0);"/>
        <input type="button" value="desc" onClick="desc(0);"/>
        <input type="button" value="create" onClick="create('tblMain', 'employeeList');"/>
        <input type="button" value="update" onClick="update('tblMain', 'employeeList', 5);"/>
        <input type="button" value="clear" onClick="clearTable('tblMain');"/>
        <input type=button value="Download Excel" onclick="AutomateExcel();">
        
        <p>
        <span id="employeeListSpan">
    
        <h2>게시판Test : </h2>
        
        <table id="tblMain" border="1" width="80%">
        
            <tr>
                <td>Num</td>
                <td>ID</td>
                <td>Title</td>
                <td>Writer</td>
                <td>Date</td>
            </tr>
            <tbody id="employeeList"></tbody>
        </table>
        </span>
        
        
        
    </body>

</html>
728x90

2008 09 02 I signed.

2008. 9. 2. 23:29
오늘 영훈이랑 메신저를 통해서 오랜만에 얘기를 했다.
이녀석 잘 지내고 있는 것 같더군
원주에 있다는데 거기에는 해규랑 해용이도 있다고
성진이는 결혼해서 애기도 ^^
광택이는 아직 중국에서 안들어왔고

오늘 갑자기 애들이 무척이나 보고싶은게

얘기 열심히 하고 있는데
입사관련 이야기 해 준다고 해서 회의실가서
전반적이 내용을 1시간여에 걸쳐 듣고 나왔다.

박부장이 해보라고 한 일의 실마리를 잡아서 그거 좀 하고
아마 내일이면 할 수 있지 않을까하는 생각을 해 본다. ㅋㅋ

수영장도 점점 재밌어 진다.
사실 어제 쥐가난 것이 아직까지 안풀려서 걱정을 조금했었는데
다행이 쥐는 다시 안났다.

인자는 등록한다고 했는데 아마 목요일쯤에나 등록할 것 같고
강사가 오리발을 보관해둘 것을 준비해와서 이제는 오리발 안들고 다녀도 될 것 같다 ^^
요새 치영씨가 바빠서 며칠 안보인다 했는데 오늘 나왔다.

스타트할 때, 오늘은 점프하는것을 가르쳐줬다.
종진이는 자꾸 배치기 한다. 배가 많이 나왔나? ㅋㅋ
수업이 끝나고 치영씨랑 50미터 자유영 경기를 했는데
아쉽게도 내가 졌댄다. 난 꽤 차이가 나는 줄 알았는데
아무튼 음료수 내기여서 우리 3명외에 그자리에 있던 3명꺼까지 더해서 음료수를 샀다.
기다리는 도중 강사가 지나가서 음료수 하나 더 사주고

치영씨가 밥사준다고 해서 순대국을 먹으러 갔다.
이것저것 얘기를 하는데 영화이야기도 하고 음식이야기도 하고
연예인 얘기들도 하고 ^^
그쪽이 방송쪽에 관계가 조금 있다보니 좀더 가까운 시각에서 본다고나 할까?
암튼 재미있었다.
728x90

2008 9 1 첫 출근(?)

2008. 9. 2. 00:12
It has been raining all day.
I was late just a little.

I expected that there were a lot of information but
I usually sat down in a chair.

I talked to Windy and Aubrey.

출근해서 전 회사를 돌며 한사람씩 인사하고 ㅠ.ㅠ
공부 좀 할 것 찾고
아마 추석뒤에나 프로젝트가 시작될 것 같다.

728x90
도쿄 도청

날이 흐려서 바깥풍경은 제대로 못 찍었지만...

에비수
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
도쿄의 골목길1
도쿄의 골목길 2
728x90
I got a trial lesson.
frankly speaking, I wasn't as good as "G.I.U" class.
so I made my mind to take "G.I.U" class.
I still need grammar. even it seem like easy for me.

after class I went to 여의도
Nobody wouldn't come.

I saw  an accident.
A guy was running the track.
when I saw that guy, he was felling down and sliding.
he got injured.
I went to him and asked "are you alright?"
he seemed saying he was O.K
few minutes later he was bleeding.
finally somebody called 119.

I had skated for 3 hours. I was exhausted, the weather was very good though.

anyway It was pretty good.
I have muscle pain a lot ^^;
728x90

2008 08 28 I'm full

2008. 8. 28. 23:01
while I was swimming I drank water a lot.
after the lesson, I and Jong-jin had pizza.
he bought it for me ^^
it was pretty good.

when I got home. my mother prepared Korean rice cake to have it.
actually I was full, but I couldn't say I had something.
so I ate almost all

I'm really full.

오늘 투입되기로 했던 프로젝트가 다시 제대로 되지않아
결국 가지 못하게 되었다.
그래서 잠시 고민을 좀 하고 있다가
결국 NicsTech에 가기로 했다.
일단 연봉협상 등이 남기는 했지만....
연봉이 어느정도 된다면 더이상 쉴 수는 없으니...

9월 1일에 가서 매듭짓기로 했다.

좀 속상하다. bpm에 좀 미련이 있어서 여지껏 기다렸는데...
그것도 못하게 되었고 수입도 좀 줄어들 것 같고
아무튼 예상했던 것 이하로 진행되니 좀... 속상하다

728x90
I'm crazy about 24
this story follows 24 hours
every season is happening during a day.
it means if you watch this drama from the start to the end
it takes 24 hours.

unfortunately I started it.
I have to finish it. it's getting exiting.

I've watched it until 3 A.M

I wrote some letter to some people who are in another country.
I want to see them. everyone.
but now I can't get there.

I really want doing everything that I want.
someday I will. and I hope I make the day sooner as fast as I can.
728x90

2. Day 1

2008. 8. 26. 12:37
사용자 삽입 이미지

We visited the Sony building
사용자 삽입 이미지
사용자 삽입 이미지

We had lunch. It was little late
사용자 삽입 이미지
We went to a hotel for staying
사용자 삽입 이미지

We visited a government building
728x90
after swimming lesson.
I treat Jong-jin and chi-young with beverage.
while we are walking to a bus stop, chi-young asked us to take us to home.
but it took not so long so we walked to the bus stop.

I met 프리실라(?) on MSN messanger.
she had a plan to go to Turkey to visit Gocke but couldn't

I was very pleasant to see her.
we chatted for a while.
728x90
BLOG main image
"그게 뭐 어쨌다는 거냐?" 늘 누가 나에게 나에대한 말을할 때면 이말을 기억해라. by nobang

카테고리

nobang이야기 (1933)
Life With Gopro (7)
Life With Mini (79)
Diary (971)
너 그거 아니(do you know) (162)
난 그래 (159)
Study (290)
속지말자 (10)
Project (34)
Poem (15)
Song (0)
Photo (113)
낙서장 (45)
일정 (0)
C.A.P.i (2)
PodCast (0)
nobang (27)
고한친구들 (4)
recieve (0)
History (0)
android_app (2)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

Total :
Today : Yesterday :