2013年6月9日日曜日

Robot Scout Finds Fires With 3D Thermal Imaging

Robot Scout Finds Fires With 3D Thermal Imaging

"The robot uses a stereo camera and a thermal camera to generate 3D pointclouds with thermal overlays, allowing the robot to autonomously generate maps showing hot spots and humans even through smoke."

2011年12月4日日曜日

Redmineインストールログ

インストール先はCentOS5.5.基本的には丁寧にインストールガイドがあるのでこれに従う.
http://blog.redmine.jp/articles/redmine-1_2-installation_centos/

「SELinuxを無効にする」とか「iptablesでHTTPを許可」とかは,CentOSインストール時にセキュリティ関連の設定をほぼ無効にしたので設定せず.

その後,必要なパッケージインストールの際,社内サーバに構築したのでyumはプロキシ超えできるようにしないと…ということで,次のように入力してなんとかした.

yum については /etc/yum.conf に以下のような行を追加 (設定ファイルにパスワードを残すのは正直いやなのだが)

proxy=http://proxy.hoge.co.jp:8080
proxy_username=myaccount
proxy_password=my password

Rubyインストール後,やはりgemでgemパッケージを入手する必要があるが,gemはコ
マンドラインからプロキシを指定可能.(こっちのほうが精神衛生上好き)

gem install package_name --http-proxy
http://username:password@proxy.example.com:PORT

みたいな感じ.(やったときの記録を消してしまってうろ覚え…)

資料:http://docs.rubygems.org/read/chapter/13 (--http_proxy は -P でもいいみたい)


あとはガイド通りにRedmine入れて,Passengerとかいうの入れて,Apacheでは"http://サーバIPアドレスまたはホスト名/redmine/"でアクセスできるように設定して,以上!

とりあえず,これで http://サーバIPアドレス/redmine でRedmineが触れるようになったと.


Redmineメール通知設定

多分普通ここはそんなに手間取らないはずだが,自分の経験不足?とかで手間取ったので記録を残そうかと・・・

とりあえず

mail me@hoge.co.jp

とかmailコマンドを使ってタイトル,本文,Cc 先を指定したら me@hoge.co.jp のアカウントでメール受信できた.

「そうか hoge.co.jp がSMTPサーバなんだな?」などと勝手に思い込んだのが全ての間違い.

(redmineインストール先ディレクトリ)/redmine/config/configuration.yml にて以下のように設定したのだがメールが送れない模様…

# default configuration options for all environments
default:
 # Outgoing emails configuration (see examples above)
 email_delivery:
   delivery_method: :smtp
   smtp_settings:
     address: hoge.co.jp
     port: 25
     domain: テキトードメイン名

なぜかと思い,(redmineインストール先ディレクトリ)/redmine/log/production.log を見たら,以下のようなメッセージが.

The following error occured while sending email notification: "execution
expired". Check your configuration in config/configuration.yml.

うーん?と思い telnet hoge.co.jp 25 とSMTPサーバにtelnetで直接つなげるかどうか確かめてみたら,つながらない…
なんでmailコマンドでメール送れて,メールサーバ(hoge.co.jp)を直接指定するとダメなんだ…

こうなったらうまく動いている場合について,きちんと解析するしかない,ということでtcpdump でログをとりながら再度 mail コマンドでメール送信してみて,どんなルートでメールが送られているか確認した.そしたらこんなログが・・・

[Wed Oct 19 12:38:35.263 2011] 12:38:31.992942 IP SRC_IP.45666 >
DST_IP.smtp: P 701:707(6) ack 433 win 54 <nop,nop,timestamp 17697146
342359529>
[Wed Oct 19 12:38:35.263 2011] 12:38:32.002190 IP SRC_IP.45666 >
DST_IP.smtp: F 707:707(0) ack 505 win 54 <nop,nop,timestamp 17697148
342359529>

nslookupで調べたらDST_IPはhoge.co.jpサーバではなく,mta.hoge.co.jp というも
のだった.
要するに指定するSMTPサーバ間違っていた!


(redmineインストール先ディレクトリ)/redmine/config/configuration.yml を

# default configuration options for all environments
default:
 # Outgoing emails configuration (see examples above)
 email_delivery:
   delivery_method: :smtp
   smtp_settings:
     address: mta.hoge.co.jp
     port: 25
     domain: テキトードメイン名
として,redmineを再起動して,これでredmineからメール通知ができるようになっ


ちなみにredmineの再起動はあまり細かいことはしたくないので
apacheごと再起動で ^^;;

[root@localhost ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

2011年2月20日日曜日

日本の和って…

真面目に思ったことを忘れぬうちに…

営利企業の現場は冷酷なまでに投資とリターンの場だと思ってる。でもそれが世界標準になってきているなら、それを真似したって横並びかもしれない。だから日本の和の精神とかが今後重要になるんじゃないかと思っている。

でも勘違いしちゃいけない、やっちゃいけないと思っていることは、和の精神を尊ぶ気持ちが結果としてでも自己犠牲を強制するような構造になってしまうこと。

高度成長期を支えたおじさんたちは猛烈に働いたんだと思う。苦しいながらもやってきた理由の一つには、そういう仲間との和があったからだと思う。それを次の世代に教えてほしい。そして自分を含め今の30、20代の世代はそれを学ぶ必要があるんじゃないかと思う。

そして日本の和も昔のものから進化する必要があるのかもしれない。そしてそれが出来るのも今の世代だけなんだろう。

本当はそんなことを頭でうだうだ考えるのではなくて、働きながら、市場・会社に揉まれながら必要に応じて編み出していくべきなんだろうけど…というわけで泥まみれになって働いてもいない輩のウンチクなのかもね。

2011年2月19日土曜日

My minutes "Tutorials:How jQuery Works"

Learning "Tutorials:How jQuery Works", so here is my minute and code. My minutes are written in comment area.
There seems be no function like "sleep" in Javascript or jQuery, is this because of Javascript doesn't intend to run threads? mmh, I don't know why currently, but I will find it later.


<!DOCTYPE html>
 <html lang="en">

 <script type="text/javascript">
 // from http://www.devcheater.com/
 function sleep(milliSeconds){
  var startTime = new Date().getTime(); // get the current time
  while (new Date().getTime() < startTime + milliSeconds); // hog cpu
 }
</script>

 <style>
    a.test { font-weight: bold; }
 </style>

 <head>
   <meta charset="utf-8">
   <title>jQuery demo</title>
 </head>
 <body>
   <a href="http://jquery.com/">jQuery</a>
   <!--
    jQuery can be downloaded from jQuery downloading page,
    but we can use it on CDN.
    jQuery download page : http://docs.jquery.com/Downloading_jQuery
    what is CDN : http://en.wikipedia.org/wiki/Content_delivery_network
   -->
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
   <script>
     /*
      window.onload() waits all documents and images loaded.
      it might include ads.
      .ready() event means that the DOM object is loaded and can be manipulated.
      Events are listed in http://api.jquery.com/category/events/.
     */
     $(document).ready(function(){
       $("a").click(function(event){
         alert("As you can see, the link no longer took you to jquery.com");
         /*
          Dynamically, we can add class to the DOM object.
         */
         $("a").addClass("test");
         /*
          wait for 3 secs, before the next alert dialog.
          addClass behaviour cannot be observated without this sleep.
         */
         sleep(3000);
         alert("Check the object added the class");

         /*
          Remove the class dynamically that is added just before.
         */
         $("a").removeClass("test");
         sleep(3000);
         alert("Check the object removed the class");

         /*
           "a" tag is for navigating a user to the location where "url" specifes.
          but "event.preventDefault()" disables such default behavior.
           Therefore,navigation to the next location does not happen.
          */ 
         event.preventDefault();

         /*
          Finally, this object("a") will hide. this is a special effect.
         */
         $(this).hide("slow");
       });
     });
   </script>
 </body>
 </html>

2011年2月12日土曜日

Starting JQuery with Twitter

Here is the first my code referencing to below URL.
http://www.atmarkit.co.jp/fwcr/rensai/ajaxrecipe01/ajaxrecipe01_1.html

Onload, this page tries to get Twitter's public_timeline with JSON format.
Then, shows  some values of the first element by JavaScript alert dialog.

<html>
<head>
  <script type="text/javascript">
    function foo(json) {
      alert(json[0].user.name);
      alert(json[0].user.location);
      alert(json[0].user.url);

    }
  </script>

  <script type="text/javascript"             
    src="http://api.twitter.com/1/statuses/public_timeline.json?callback=foo">

  </script>
</head>
<body>
</body>
</html>

* Code-Prettify (a tool for highlighting codes made by Google)
* Twitter API doc