'KOREA University'에 해당되는 글 102건

  1. 2009.09.20 A Whale of a Wheel (3/4)
  2. 2009.09.20 A Whale of a Wheel (2/4)
  3. 2009.09.20 A Whale of a Wheel (1/4)
  4. 2009.09.18 Hello, Windows!
  5. 2009.06.14 Dining Philosopher
  6. 2009.06.12 OpenAPI를 이용한 동영상 서비스
  7. 2009.06.11 기말프로젝트 제안
  8. 2009.05.21 Process Scheduling 13
  9. 2009.05.12 지지벡터머신(JVM)
  10. 2009.05.01 두 프로그램 간 파이프 통신 6
The wheel was supported by two 140-foot(43-meter) steel towers.
그 휠은 140피트(43미터)짜리 두개의 쇠봉에 지탱되어진다.

The 45-foot(14-meter) axle was the largest single piece of forged steel at the time in the world.
45피트(14미터)짜리 축은 그 당시 세계에서 가장 단련된 하나의 쇳덩이였다.

The wheel itself had a diameter of 250 feet (72 meter), a circumference of 825 feet (251 meters), and a maximum height of 264 feet (80 meter).
휠 스스로 가졌다 지름이 25피트(72미터), 둘레가 825피트(251미터), 최대높이가 264피트(80미터).

Between the two rims of the wheel, Ferris hung 36 wooden carriages, like railroad car, that could hold 60 people each.
휠의 두개의 테 사이에, 페리스휠은 36개의 객실을 매달았다, 기차의 객실처럼, 그것은 각각 60명을 태울 수 있었다.

Every car hung from its own axle.
모든 객실은 축에 매달려있다.

This meant that the cars wold swing slightly back and forth as the wheel slowly rotated, but they, and the people inside them, always stayed upright.
이것은 의미했다 객실은 조금씩 앞뒤로 천천히 움직인다, 그러나 그들(객실들), 그리고 사람들은 그들(객실)안에서, 언제나 똑바로 머무른다.

The Ferris wheel turned by the power of steam.
페리스휠은 증기의 힘에 의해 돌아갔다.

Two huge boilers, located off the main fairgrounds, generated steam and kept it under high pressure.
두개의 존나 큰 보일러, 메인 박람회장 근처에, 증기를 뿜어내고 그것(증기)을 높은 압력으로 유지했다.

A system of underground pipes delivered the high-pressure steam to a large wheel on the ground under the Ferris wheel.
땅속 파이프로 높은 압력의 증기가 전달되면 아래 큰 휠이 움직여 페리스휠(위에 있는)을 작동시키는 시스템이다.

The energy input from the steam caused the ground wheel to rotate, which drove the movement of the whold structure.
그 증기로부터 가해지는 에너지는 땅속 휠을 돌아가게끔 했고, 땅속 휠은 모든 구조를 움직임을 가동시켰다.

The ground wheel and the axle of the Ferris wheel were connected to each other by a massive chain that wrapped around them both.
땅속 휠과 위의 페리스 휠의 축은 서로 존나 큰 체인으로 둘러쌓여 연결되어있다.

The ground wheel and the axle both had a band of raised pieces around them, called sprockets.
땅속 휠과 위의 축은 서로 수많은 부분이 서로 들어올려진다, (그 부분은)톱니라고 불린다.

The links of the chain fit over the sprokets and held the chain in place.
톱니들의 꼭맞는 연결은 체인을 제자리에 있게끔 한다.

As the steam from the boilers forces the ground wheel to rotate, the chain was pilled along the sprockets.
보일러로부터의 증기는 땅속휠을 움직이게 하고, 그 체인은 톱니를 따라서 이끌렸다.

This caused the axle above to rotate as well.
그것은 축 역시 돌아가게끔 초래했다.

The axle then turned the Ferris wheel.
그러면 그 축은 페리스휠을 돌게 했다.

A series of brakes and other control devices regulated the energy input to keep the wheel's movement smooth and steady.
여러개의 브레이크와 다른 제어장치들은 조절했다 휠이 부드럽고 안정적으로 이동되기 위해 입력된는 에너지를.


Posted by 정훈승

Ferris proposed building a gigantic wheel that people could ride on as it turned.
페리스는 존나 큰 바퀴를 만들자고 제안했다 사람들이 타고 돌 수 있게.

Burnham rejected Ferris's proposal.
번햄(책임자)은 페리스의 제안을 거절했다.

He could not believe that such a thing could be safe.
그는 믿을 수 없었다 그러한게 안전할런지.

It must violate the laws of physics.
그것은 반드시 위배된다 물리의 법칙에.

Its own weight would surely distort the metal breams, causing it to turn irregularly and eventually collapse.
그것의 자체 무게만으로 반드시 철막대기를 비틀것이며, 그리하여 그것은 불규칙적이게 되고 결국 붕괴될 것이다.

Despite Burnham's fears, Ferris knew his design was sound.
번햄의 걱정에도 불구하고, 페리스는 알았다 그의 설계가 안전하다는 것을.

He knew that equal pressure applied to every spot on the wheel would balance the forces acting on it.
그는 알았다 같은 압력이 모든 지점의 휠에 가해지면 힘이 균형있게 전달된다는 것을.

Physics was on his side.
물리
학은 그의 편이었다.

Ferris revised the proposal three times and drew up many more drafts of engineering plan.
페리스는 개정했다 제안서를 3번 그리고 기술적 계획의 초안을 더욱 더 많이 그렸다.

He added countless paragraphs of detailed explanation on the engineering required.
그는 덧붙혔다 수없이 많은 기술적으료 필요한 자세한 설명구(단락)를.

He got other engineers to inspect his plans and confirm their soundness.
그는 다른 기술자들로 부터 그의 계획을 점검받았고 그들의 의견을 확인했다.

Ferris finally obtained Burnham's approval in December 1892 and began construction immediately.
페리스는 마침내 1892년 12월에 번햄의 승인을 받았고 곧바로 건설을 시작했다.

Soon the wheel towered over the city.
곧 휠이 도시에 우뚝 솟았다.

By opening day in May 1893, the Ferris wheel was already the star of the Chicago's World Fair.
1983년 5월에 개최, 페리스 휠은 이미 시카고 세계박람회의 스타였다.

Robert Graves was a reporter for the newspaper, The Alleghenian.
로버트 그레이브는 The Alleghenian의 신문기자였다.

He visited the World's Fair and described the Ferris wheel for readers:
그는 세계박람회를 방문했고 페리스
독자들을 위해 페리스휠을(다음과 같이) 묘사했다:

What is the principle, the chief principle, in which the wheel is constructed?
원리가 뭘까, 중요원리가, 무엇으로 휠이 건설되었나?

It is that of a bicycle wheel.
그것은 자전거휠의 그거(원리)다.

The lower half of the wheel simply hangs from the mighty axle [center bar], and this lower half supports the upper half by means of the steel framework of its two rims [sides].
휠의 하반부는 단순히 강력한 축[센터바]으로부터 지탱되고, 그리고 이 하반부는 상단부를 지탱한다 상단부는 쇠 뼈대로 두개의 테두리[양 사이드]. 해석 복잡하네 ㅠㅠ

The wheel, though apparently rigid in its construction, has just enough elasticity to make this method of support possible, and yet not enough elasticity to produce any appreciable trembling or slipping effect.
그 휠은, 겉보기에 경직된 구조임에도 불구하고, 존나 충분히 탄력있게 하는 법의 지원을 받았다, 하지만 그럼에도 불구하고 감지할 수 없을 정도의 탄력성이라서 흔들리거나 미끄러지는 결과가 없다.

Posted by 정훈승

A Whale of a Wheel
고래같은 바퀴

In 1889, France hosted the first Exposition Universelle, or World's Fair, in Paris.
1889년에, 프랑스는 주최했다 무역박람회를, 즉 세계박람회를, 파리에서.

In every way, the Exposition was so big, so glamorous, so exotic that no one believed anything could ever surpass it.
모든점에 있어서, 그 박람회는 매우 크고, 매우 거창하고, 매우 이국적이어서 아무도 그 것(박람회)을 능가하는 것은 없다고 믿었다.

The city of Chicago, Illinois, decided to try.
시카고라는 도시에, 일리노이주(州), 개최키로 결정했다.

The chicago World's Fair was held in 1893, but planning and building started much sooner.
시카고 세계박람회는 1893년에 개최했다, 하지만 계획과 설계는 훨씬 일찍 시작되었다.

The Fair's organizers wanted to show the world that the United States, and specifically Chicago, was just as capable of gfand artistic and technological wonders as France.
그 박람회(시카고) 주최측은 원했다 미국을 보여주기를, 특히 시카고를, 바로 프랑스만큼이나 존나 예술적이고 기술적으로 놀랄만하게.

The centerpiece of the Paris Exposition was en elegent tower of steel tapering up to the sky.
파리박람회의 주요작품은 하늘을 향에 끝이 위로 갈 수록 끝이 가늘어지는 우아한 철탑이었다.

It was designed by Gustav Eiffel and gave daring visitor a view of Paris that took their breath away.
그것은 구스타브 에펠이 설계했고 겁없는 방문객들에게 숨이 막힐정도로 쩌는 파리의 전경을 주었다.(보게 해주었다)

The organizers of the Chicago World's Fair had to come up with something even more magnificent.
시카고 세계박람회 주최측은 생각해내야만 했다 무언가 더욱 더 웅장한 것을

Finding a suitable design to rival the Eifeel Tower proved difficult.
에펠탑과 대등할 정도의 적합한 설계는 어렵다는 것이 입증되었다.

Architect Daniel H.Burnham was in charge of the project for the Chicago World's Fair.
건축가 다니엘 H.번햄은 시카고 세계박람회 프로젝트를 책임지고 있다.

He received dozens of proposals from engineers and architects around the country to build various kinds of towers.
그는 받았다 수십개의 제안서를 기술자들과 건축가들로부터 나라(미국) 전역에서 다양한 종류의 타워 설계.

One day, he received a brief proposal and rough draft of plans for something more unbelievable and outrageous than any prior porpsal.
어느날, 그는 받았다 한 간단한 제안서와 대충그린 무언가의 초안을 이전의 제안보다 더 믿을 수 없고 터무니없는.

The author of this proposal was George Washington Gale Ferris Jr.
제안서의 저자는 죨지 워싱턴 게일 페리스 주니어였다.

Posted by 정훈승
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                   PSTR szCmdLine, int iCmdShow)
{
    MessageBox(NULL, TEXT("Hello, Windows!"), TEXT("First Message"), 0);
    return 0;
}


프로젝트 생성할때는 반드시 윈도우즈 응용프로그램(Windows 어플리캐이션)으로 해야한다. 1학년때 배우는 C 혹은 C++을 할때, 윈도우즈 콘솔로 프로젝트 생성하는게 버릇이 된사람은 주의를 하도록 하자. PC환경에 따라 상관없을 수도 있겠지만 정석대로 하는게 아무래도 좋지 아니한가
(비주얼6.0, 2005, 2008 상관없다)

가장 기초적인 윈도우즈 프로그래밍을 위한 소스다. 위 소스를 다 입력하면 메시지막스가 튀어나온다. 콘솔창에서만(도스창) 프로그래밍하다가 윈도우로 오면 느낌이 아주 신선하다.

마지막학기에 듣는 윈도우즈프로그래밍 수업이다.
어느정도 할 줄 안다고 자만하지 않고, 최선을 다하겠다. (사실 따지고보면 존나 허접)


교재는 찰스 페졸드의 Programming Windows (5th Edition) 이다. 존나 비싸고 존나 무겁다.
찰스페졸드라는 사람은 빌게이츠와 더불어 실질적인 윈도우즈 개발자라 한다.
실제 윈도우즈 만든 사람이 쓴 책이고, 거기다 출판사도 Microsoft 다. 이 두가지 사실만으로도 간지가 흐르지 아니한가
Posted by 정훈승
고려대 컴퓨터정보학과
Operating System Programming Assignment 마지막~!

Dining Philosopher

사실 내가 백프로 짠 쏘스도 아니고
마지막이기도 하고
걍 소스코드 전부다 공개


 
dp.h 소스코드
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <tchar.h>
#include <windows.h>

#ifndef __Dining_Philosopher_h
#define __Dining_Philosopher_h

#define MAXLIST  256
#define MAXNAME  32

class Dining_Philosopher
{
private:
 int    m_id;
public:
 Dining_Philosopher(int id);
 ~Dining_Philosopher();
 void print();
 void eat();
 void think();
protected:
};

#endif


dp.cpp 소스코드
#include "dp.h"
Dining_Philosopher::Dining_Philosopher(int id)
{
 memset(this, 0, sizeof(Dining_Philosopher) );
 srand( (unsigned int)time(NULL) );
 this->m_id = id;
 this->print();
}

Dining_Philosopher::~Dining_Philosopher(void)
{
 
}

void Dining_Philosopher::print()
{
 printf("philosopher DI: %3d\n", m_id);
}

void Dining_Philosopher::eat()
{
 int eat_time = 1 + rand() % 10;
 printf("[%1d:", m_id);
 Sleep( eat_time );
 printf(":%1d]\n", m_id);
}

void Dining_Philosopher::think()
{
 int think_time = 1 + rand() % 10;
 Sleep( think_time );
}


jhs.cpp 소스코드 (메인파일)
#include "dp.h"
#include <iostream>
using namespace std;
typedef struct Man // Sitdown Man Information Struct
{
 int id;
 Dining_Philosopher *dp;
 HANDLE left,right;
} Man;

DWORD WINAPI WriteToDatabase( LPVOID );
void main() // 5 is Maz Size
{
 HANDLE ghMutex[5];
 HANDLE aThread[5];
 DWORD ThreadID;
 struct Man DP[5];
 int i,j,temp;
 bool random_check; // If Event Random is coming, Same Number is interception
 
 for(i=0;i<5;i++) // Create a mutex with no initial owner
 {
  ghMutex[i] = CreateMutex(
   NULL,              // default security attributes
   FALSE,             // initially not owned
   NULL);             // unnamed mutex
  if (ghMutex == NULL)
  {
   printf("CreateMutex error: %d\n", GetLastError());
   return;
  }
 }
 // Setting each Man Number, Setting Left, Right
 srand( (unsigned int)time(NULL) );
 for(i=0;i<5;i++)
 {
  while(1)
  {
   temp=rand()%5+1;
   random_check=true;
   for(j=0;j<5;j++)
   {
    if(temp==DP[j].id) random_check=false;
   }
   if(random_check==true)
   {
    DP[i].id=temp;
    DP[i].dp= new Dining_Philosopher(temp);
    DP[i].right = ghMutex[i];
    if(i==0) DP[i].left=ghMutex[4]; 
    else DP[i].left=ghMutex[i-1];
    break;
   }
  }
 }
    // Create worker threads
 for( i=0; i < 5; i++ )
 {
  aThread[i] = CreateThread(
     NULL,       // default security attributes
     0,          // default stack size
     (LPTHREAD_START_ROUTINE) WriteToDatabase,
     &DP[i],       // thread function arguments
     0,          // default creation flags
     &ThreadID); // receive thread identifier
  if( aThread[i] == NULL ){
  printf("CreateThread error: %d\n", GetLastError());
  return;
  }
 }
    // Wait for all threads to terminate
 WaitForMultipleObjects(5, aThread, TRUE, INFINITE);
    // Close thread and mutex handles
 for( i=0; i < 5; i++ ) CloseHandle(aThread[i]);
    for( i=0; i < 5; i++ ) CloseHandle(ghMutex[i]);
}
 
DWORD WINAPI WriteToDatabase( LPVOID lpParam  )
{
 Man *temp = (Man *)lpParam;
 DWORD dwCount=0, LWait,RWait;
 //If Eating Counting Numbers are 5, End
 while( dwCount < 5 )
 {
  // Waiting eat
  temp->dp->think();
 
  // Waiting Part. Ror Left and Right Catching
  LWait=WaitForSingleObject(temp->left,INFINITE);
  RWait=WaitForSingleObject(temp->right,INFINITE);
  switch(LWait & RWait)
  {
   // If left and right empty
   case WAIT_OBJECT_0: __try
   {
    temp->dp->eat();
    dwCount++;
   }
   __finally
   {
    ReleaseMutex(temp->left);
    ReleaseMutex(temp->right);
   }
   break;
 
   case WAIT_ABANDONED:
   return FALSE;
  }
 }
 return TRUE;
}


이건 실행화면

사용자 삽입 이미지
Posted by 정훈승
이 프로젝트의 가장 큰 핵심은
xml 데이터를 php로 불러오기라 할 수 있겠다.

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지
Posted by 정훈승
고려대 컴퓨터정보학과 지능형웹서비스 기말프로젝트
OpenAPI를 이용한 동영상 서비스

1. 다음(daum.net)에서 제공한 오픈API를 사용
2. 검색폼에 검색어 입력하면 다음이랑 똑같이 나옴
3. 클릭하면 팝업창이 뜨고 거기서 동영상 볼 수 있음
4. swf로 된 동영상 스트리밍에서 flv를 추출하여 다운로드 가능


사실 OpenAPI를 들어나 봤지, 직접 해보게 되리라곤 상상도 못했다.
뭐...상상도 못했다는건 구라고~~

웹프로그래밍의 최고급 단계를 배우고있는 입장이지만,
실력은 시궁창인 내가...
과연 할 수 있을까? 의문점이 앞섰다. 자신감도 없었고...

처음에 존나 해맸다.
오픈API를 제공하는 사이트는 다 뒤져봤다. 네이버 다음 구글 옥션 할꺼 없이 모두 다...

뭐 어쨋든 이 프로젝트의 핵심은!
swf로 된 실시간 동영상 스트리밍에서 원본 flv를 뽑아내는 것이다.

시발 아무도 소스를 공개 안해서
이거 알아내는데 진짜 뒤지는 줄 알았다.
완전 지대로 똥줄타는줄알았다. 될듯 될듯 될듯 하면서 마지막에 안되는 그 짜릿함!

프로젝트 발표때도 다른 소스는 다 공개해도 이 소스만은 공개 안할꺼임

(알고보면 원리는 존나 간단하더라 ㅋㅋㅋ)
Posted by 정훈승
제대로 똥줄타는 숙제였다.
문제는 SJF알고리즘을 사용해서 프로세스 스케줄링 하는거다.
결론부터 말하자면 정답을 못구했다.
왜냐면 나 스스로 SJF알고리즘을 제대로 이해하지 못했다 ㅠㅠ

왠만한 학생들은 정말 제대로 똥줄탈 것이다.
제대로 똥줄타는 숙제이므로 소스는 공개하지 않겠다.

고려대 컴퓨터정보학과 학생중 진짜 진정으로 진심으로 똥줄이 팍팍 탄다면!!!
과기대에서 저를 만난다면!!! 커피한잔 사주세용^^ (꽁짜는 없씀)


사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
Posted by 정훈승

사용자 삽입 이미지

지능형 웹서비스 발표자료

Posted by 정훈승
이번 꺼는 두 프로그램 간 파이프를 이용한 통신입니다.
클라이언트 프로그램에서 정렬되지 않은 숫자가 내용인 텍스트파일을 읽으면
서버 프로그램에서 그 텍스트파일 안에 있는 숫자들을 정렬합니다.
그리고 다시 클라이언트 프로그램에 정렬된 결과를 출력합니다.

두개의 프로젝트를 생성해야겠지요...
클라이언트와 서버

이번 과제 고생을 좀 해서....소스코드는 공개하지 않습니다ㅠㅠ
진짜 진짜 완전 똥줄타는 사람은 이메일보내시던지, 학교에서 나 만나면 음료수 사주시던지...

사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지


사용자 삽입 이미지

 

assignment-04.zip

하도 소스파일 보내달라고 징징거리는 후배들때문에 이렇게 소스코드 공개합니다.

모름지기 싸나이라면 해도해도 안되면 그때 퍼가시길 바랍니다.

Posted by 정훈승