今日から大型連休ですね~
世間では10連休の人もいるかと思います。

こんな時にシステムに障害が発生し、
わざわざ職場に向かって復旧作業に当たるのも面倒な話です。
そんなあなたに。今では非常に便利なソフトがあります!
VNCというもので、どのOSでもリモートで操作できるソフトウェアです。
これをVineLinuxに入れておけば、
どこからでもリモートで、しかもWindowsからXwindowを利用できます。

#apt-get install vnc-server

と打ってインストールしてください。
その後、#vncserver と入力するとログイン時のパスワードを聞かれます。
パスワードを2回入力し、インストールは完了です。

次にエディタで /root/.vnc/xstartup を編集します。

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

赤部分をコメントアウトしてください。

#vncserver -kill :1 でサーバーを終了させます。

あとはクライアントとなるウィンドウズマシンにVNC Viewerをインストールしてください。
http://www.realvnc.com/download.html
↑からフリー版を落とします。
これで準備は整いました。

使用法
1.サーバー側のVineLinuxで#vncserver と打ちサーバー起動
2.クライアントマシンでVNC Viewerを起動し、接続先のIPアドレスを入力し接続
What business that began with one eating place in the American Midwest now has thirty thousand fast-food restaurants all over the world?
アメリカの中西部の食事どころで始まり、現在世界に3万のファーストフード店舗を構えている企業は何でしょう?

The answer is McDonald’s, which celebrated its fiftieth anniversary earlier this month.
答えはマクドナルドです。今月はじめに50周年を迎えました。

Barbara Klein has more.
バーバラクラインさんお願いします。

Ray Kroc opened the first McDonald’s in Des Plaines, Illinois, near Chicago, on April fifteenth, nineteen fifty-five.
レイクロックは、1955年の4月15日、シカゴの近くのイリノイのデルプレインズに最初のマクドナルドの店舗をオープンさせました。

Before starting McDonald’s, Mister Kroc sold machines that mixed milk and ice cream to make a popular drink called a milkshake.
マクドナルドを始める前は、クロック氏はミルクセーキと呼ばれる人気の飲み物を作るためのミルクとアイスクリームを混ぜる機械を売っていました。

The new restaurant sold hamburgers and fried potatoes called French fries also.
その新しいレストランは、ハンバーガーやフレンチフライと呼ばれるあげたジャガイモも売っていた。

McDonald’s workers prepared this food very quickly.
マクドナルドの従業員は非常に早くこの食べ物を準備しました。

People waited only a few minutes for their food.
人々は食べ物を待つのにたった数分しか待たされませんでした。

That first McDonald’s was torn down in nineteen eighty-four.
最初のマクドナルドの店舗は1984年に取り壊されました。

The company built a copy of it in the same place to serve as a McDonald’s Museum.
マクドナルド社は、同じ場所にマクドナルド博物館を開くため、その店舗と同じものを立てました。

It contains the equipment used to prepare food during the restaurant’s first days of operation.
博物館はそのレストランの初期に食べ物を準備するために使われた道具を置いています。

<Words>
anniversary:~周年 tear down~:~を取り壊す

音声のダウンロードはこちらから
今日も昼過ぎに研究室へ。
C言語でカレンダーを表示させるプログラムを作った。
祝日も対応のなかなか便利なカレンダーです!
使い方は第一引数に年、第二引数に月を入れて実行

#include <stdio.h>
#include <string.h>

int main();
int zeller(int,int,int);

/* 第1引数:年 第2引数:月 */
int main(int argc,char *argv[]){
  int i,youbi,day,y = atoi(argv[1]),m = atoi(argv[2]);
  int flag=0; // 連休判定Flag

  printf("\n\t\tYear:%d Month:%d\n\n\x1b[;31mSun\x1b[;0m\tMon\tTue\tWed\tThu\tFri\t\x1b[;34mSat\x1b[;0m\n",y,m);

  /* 日数を設定 */
  if(m == 2){
    if(y%400 == 0 || (y%100 != 0 && y%4 == 0)){
      day = 29;
    }
    else{
      day = 28;
    }
  }
  else if(m == 4 || m == 6 || m == 9 || m == 11){
    day = 30;
  }
  else{
    day = 31;
  }

  /* 1日の曜日を求めます */
  if(m == 1 || m == 2){
    youbi = zeller(y-1,m+12,1);
  }
  else{
    youbi = zeller(y,m,1);
  }

  for(i=1;i<=day+youbi;i++){ //day+youbi回ループさせる    // (i-youbi)が日付、(i-1)%7が曜日となる
    if(i-youbi<1){printf("\t");} //1日までタブ    else{
      if(hantei(y,m,i-youbi,(i-1)%7) == 2){
        printf("\x1b[;31m");
        printf("(%d)\t",i-youbi);
        printf("\x1b[;0m");
      flag = 1; // 日曜と祝日が重なったらflagをたてる
      }
      else if(hantei(y,m,i-youbi,(i-1)%7) == 1 || flag == 1){
        printf("\x1b[;31m");
        printf("(%d)\t",i-youbi);
        printf("\x1b[;0m");
        flag = 0;
      }
      else if((i-1)%7 == 6){ // 土曜日
        printf("\x1b[;34m");
        printf("%d\t",i-youbi);
        printf("\x1b[;0m");
      }
      else{
        printf("%d\t",i-youbi); //日付を出力
        flag = 0;
      }
      if((i-1)%7 == 6){printf("\n");} //土曜のあとは改行
    }
  }
  return 0;
}

/* Zellerの公式 */
int zeller(int y,int m,int d){
  return ((y + (int)(y/4) - (int)(y/100) + (int)(y/400) + (int)(2.6*m + 1.6) + d) % 7);
}

/* 祝日判定関数(祝日なら0以外を返す) */
int hantei(int y,int m,int d,int youbi){

  if((m==3 && d== (int)(20.8431 + 0.242194*(y-1980) - (y-1980)/4)) // 春分の日
     || (m==9 && d== (int)(23.2488 + 0.242194*(y-1980) - (y-1980)/4)) // 秋分の日
     || (m==1 && d==1) // 元旦
     || (m==1 && d>7 && d<15 && youbi==1) // 成人の日
     || (m==2 && d==11) // 建国記念日
     || (m==4 && d==29) // みどりの日
     || (m==5 && d==3) // 憲法記念日
     || (m==5 && d==4) // 国民の祝日
     || (m==5 && d==5) // 子供の日
     || (m==7 && d>14 && d<22 && youbi==1) // 海の日
     || (m==9 && d>14 && d<22 && youbi==1) // 敬老の日
     || (m==10 && d>7 && d<15 && youbi==1) // 体育の日
     || (m==11 && d==3) // 文化の日
     || (m==11 && d==23) // 勤労感謝の日
     || (m==12 && d==23))// 天皇誕生日
  {
    if(youbi == 0){// 日曜と休日が重なった処理
      return 2;
    }
    else{
      return 1;
    }
  }
  if(youbi == 0){ // 日曜日
    return 1;
  }
  return 0;
}
貯金をそのまま銀行に預けておくのももったいないので、株を買うことにする。
インターネットが普及した現在、誰でも容易に株を買えるようになった。
ペイオフなどの施行により、個人投資家の資金の流入にも期待!
E*トレード証券は口座開設は無料で、取引手数料は735円である。
手数料が安いのでお勧めです!

今日は、日産自動車(7201)1049円で指値注文を入れる。
大企業ながらPER8倍とかなりの割安感が。
過去最高益を更新し今後も期待できる点にも注目。
取引開始直後に取引成立。

とりあえず長期保有目的で待ってみたいと思います。
神戸で大惨事が起こりました。
死者50人を超す列車事故です。
アメリカのニュースでも取り上げられているようですね。
電車は安全だという思い込みがあるのですが、その考えは変わりましたね。
あのような激しい事故が起こるとは思いもよらなかった。
同年代の大学生の方々が亡くなられていることを思うと心が痛いです。

050425.jpg

「Japan's worst rail accident in more than four decades has left at least 50 people dead and as many as 300 injured. 」
『日本の過去40年で最悪の列車事故は、少なくとも50人の死者と300人の負傷者を出した』


The seven-car express train carrying nearly 600 commuters derailed near Kobe Monday morning, slamming into an automobile before the front of the train hit a high-rise apartment building.
600人近くの通勤客を運んでいた7両編成の快速電車は、月曜の朝の神戸付近で脱線し、電車の正面が高層マンションに突っ込む前に自動車にぶつかった。

Japan's Self Defense Forces were called in to help free the injured, some of whom were still trapped inside the crumpled cars hours after the accident.
日本の自衛隊は負傷者を救出するために派遣されたが、負傷者の何人かは事故の数時間後もいまだにつぶされた車内に閉じ込められている。

The cause was not immediately known, but investigators said they were focusing on the speed of the train.
原因は直接にはわからないが、調査官は乗客たちが電車のスピードを気にしていたと言った。

A woman passenger says the train seemed to be traveling much faster than usual before the crash, and that scared her.
女性の乗客は、電車が衝突の前いつもより速いスピードで運行していたようで、それが怖かったと言っている。

<Words>
decade:10年 derail:脱線する slam:ぶつかる
trap:閉じ込める crumple:つぶす focus on~:~に集中する

音声のダウンロードはこちらから