Welcome Guest ( Log In | Register )

53 Pages V   1 2 3 > » 

Mashup - Traffic Monitor

Posted by Patrickz, Nov 14 2008, 09:27 AM in PatrickzIdeas

อันนี้เ็ป็นตัวอย่างการนำเอา GoogleMaps มา้ใช้ร่วมกับข้อมูลการจราจรของรัฐ Utah มีพิกัดของกล้องวงจรปิด สถานะการจราจร และดูภาพจากกล้องวงจรปิดไดด้วย



สนใจลองดูได้ที่ http://168.178.125.221/Commuterlink/default.aspx

keyword: GoogleMaps, Gmaps, Mashup, Traffic, Monitor


บริการ English - Japanese แบบง่ายๆ

Posted by Patrickz, Nov 12 2008, 12:01 PM

พอดีมีพนักงานเข้ามาใหม่ เป็นชาวญี่ปุ่นสองคน เกิดอยากพูดภาษาญี่ปุ่นมั้ง เลยทำ Dictionary ขึ้นมาง่ายๆ ยิงไปถามที่ http://www.lingvozone.com ไว้มีเวลา จะยิงไปที่ google language tool มั่ง

ทิ้ง code ใว้ให้ สำหรับมือใหม่ หวังว่าจะมีประโยชน์มั่ง

CODE
       <html>
           <head>
            <title>simple en-jp</title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
           </head>
           <body>
          <form method="GEt">
              <input type="text" name="word"/>
              <input type="submit"/>
          </form>
          <?php
          $word = urlencode($_REQUEST['word']);
          if ($word != ""){
              $contents =  stream_get_contents(fopen("http://www.lingvozone.com/dictionary?action=translation_ajax&do=dictionary&language_id_from=23&language_id_to=35&word=$word&t.x=0&t.y=0", "r"));
              preg_match_all('/<a target="_parent" class="black".*>(.*?)<\/a>/mi', $contents, $matches, PREG_OFFSET_CAPTURE);
              foreach($matches[1] as $value){
                  echo $value[0] . ", \n";
              }
          }
          ?>
           </body>
          </html>


Shebang Line

Posted by Patrickz, Nov 12 2008, 09:02 AM

Shebang Lineคือ บรรทัดที่ใช้ในการระบุ interpreter ใช้ในระบบ Unix เช่น #!/usr/bin/perl, #!/usr/bin/php, #!/usr/bin/ruby เป็นต้น


ubuntu กับ bug ของ NetworkManager

Posted by Patrickz, Oct 14 2008, 10:32 AM

ผมใช้ Ubuntu มาทำเป็น gateway พบว่ามีปัญหาที่บางคนก็ออกเน็ตได้บ้างไม่ได้บ้าง
ตรวจๆ ดูพบว่า เป็น bug ของ NetworkManager ใช้ CPU ไป 95 - 100% เลยทีเดียว

ก็เลยลองหยุดด้วย

QUOTE
sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher stop
sudo /etc/dbus-1/event.d/25NetworkManager stop


และใส่ "exit" ใน
QUOTE
/etc/default/NetworkManager
/etc/default/NetworkManagerDispatcher


ปัญหาก็เรียบร้อย ตอนนี้ก็ใช้ไปประมาณ 1 - 2% เท่านั้นเอง
ต้นตอเกิดจาก Gateway ใช้ CPU มาก จนไม่สามารถให้บริการอื่นๆ ได้

ถ้าจะเอาโปรแกรมนี้ออกเลย ก็ใ้ช้คำสั่ง sudo aptitude remove network-manager ก็ได้

Links
NetworkManager
Disable NetworkManager


ค่า netmask ที่นิยมใช้

Posted by Patrickz, Oct 2 2008, 06:36 AM

Short Form, Full Form, Maximum number of machines, Comment
/8 /255.0.0.0 16, 777, 215 Class A address
/16 /255.255.0.0 65, 535 Class B address
/17 /255.255.128.0 32, 767
/18 /255.255.192.0 16, 383
/19 /255.255.224.0 8, 191
/20 /255.255.240.0 4, 095
/21 /255.255.248.0 2, 047
/22 /255.255.252.0 1, 023
/23 /255.255.254.0 511
/24 /255.255.255.0 255 Class C address
/25 /255.255.255.128 127
/26 /255.255.255.192 63
/27 /255.255.255.224 31
/28 /255.255.255.240 15
/29 /255.255.255.248 7
/30 /255.255.255.252 3

ref:
Network Masks / Netmasks for Dummies


phoneME on Windows Mobile

Posted by Patrickz, Sep 27 2008, 10:30 AM

phoneME

QUOTE
The phoneME Advanced project open source repository contains a Java SE 1.4.2-compatible stack running on Windows Mobile. To be precise, it is CDC 1.1.1/FP 1.1.1/PBP 1.1.2/PP 1.1.2 which is the equivalent of Java SE 1.4.2 - including AWT and Applet support. This has been available for some time now (see MR2 announcement) and is being actively developed and improved. The screen shot shows JBenchmark2 running on phoneME Advanced on Windows Mobile 5.


QUOTE
The objective of the phoneME project is to further expand the usage of Java™ Platform, Micro Edition (Java ME platform) technology in the mobile handset market. The project scope includes a focus on the mainstream feature phone segment with phoneME Feature software, and the emerging advanced phone segment with phoneME Advanced software. Our goal in making these technologies available to the Mobile & Embedded Community is to reduce implementation variation, increase the rate of innovation and enable new devices to leverage the power of the Java ME platform. For more information, see the phoneME Project Vision.


Links
Java บน Windows Mobile
Java Mobile & Embedded Community
Alive and kickin': Java on Windows Mobile


ปัญหา XP ถอยหลังแล้ว Restart เอง

Posted by Patrickz, Sep 27 2008, 08:26 AM

เล่นเน็ตอยู่ดีๆ XP ก็นับเวลาถอยหลัง แล้วก็ restart ตัวเอง

ตรวจสอบใน Event Viewer แล้วพบปัญหาจาก RPC ดังนี้
The Remote Procedure Call (RPC) service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 60000 milliseconds: Reboot the machine.

วิธีแก้
แก้ง่ายๆ เลย ปกติเวลามีข้อผิดพลาดนี้เกิดขึ้น ค่า default ของ RPC มันจะ restart ให้ เราก็กำหนดไม่ให้มันทำอะไร หรือไม่ก็ restart service นี้ซะ
อันนี้เจอมาจาก http://kb.wisc.edu/helpdesk/page.php?id=2048

QUOTE
    1. Right-click the My Computer icon on the Windows desktop or in the Start menu.
    2. Select Manage. The Computer Management window will open.
    3. In the left pane, double-click on Services and Applications.
    4. Select Services and a list of services should appear.
    5. In the right pane, locate the Remote Procedure Call (RPC) service, it will have a Status of "Started". Note: This will be the first in a listing of two Remote Procedure Call (RPS) services.
    6. Right-click on the first Remote Procedure Call (RPC) service listed.
    7. Select Properties.
    8. Select the Recovery tab.
    9. Using the drop-down lists, change First failure, Second failure, and Subsequent failures from Restart the Computer to Take No Action.
    10. Click on Apply and then OK.


video 360 องศา คืออะไร

Posted by Patrickz, Sep 14 2008, 08:43 AM

เป็นตัวอย่างของ immersive นะครับ
วิธีการดูก็กดไปที่ link ด้านล่าง แล้วรอสักครู่ ถ้า net ช้าๆ ก็ทำใจหน่อย (ผมว่า title มันนานไปนิด)

http://www.immersivemedia.com/intro_vd.php?market=vid2
จากตัวอย่างนี้จะเป็น video บนท้องถนน ลองหมุนไปรอบๆ ดูครับ คุณจะเห็นภาพรอบทิศทาง ในขณะที่รถวิ่ง

http://www.immersivemedia.com/intro_vd.php?market=vid1
อันนี้เค้าไปเก็บภาพจากใต้ท้องทะล เสมือนว่าเราไปดำน้ำดูประการังด้วยตนเองเลยจริงๆ

http://www.immersivemedia.com/intro_vd.php?market=vid4
อันนี้พาขึ้นเรือไปเที่ยว

ลองดู demo อื่นๆ ได้อีก

เอาไปทำอะไรได้บ้าง
เอาไปเก็บภาพ เพื่อเอาไปทำแบบ Google StreetView หรืออย่างของ MapJack ก็ได้
เอาไปเก็บภาพ video เพื่อการโปรโมทการท่องเที่ยว กีฬา ก็ได้
เก็บภาพในงานคอนเสริต์
และอื่นๆ... (แหม เล่นง่ายดี)

Links
ความเป็นจริงเสมือน (VIRTUAL REALITIES)
Slide GeoWeb 2.0 โดยคุณ ชัยภัทร เนื่องคำมา


Ajax library

Posted by Patrickz, Sep 6 2008, 10:13 AM

Update อีกที ว่าตอนนี้ ajax library ไหนที่นิยมกันบ้าง พอดีจะเอาไปทำเวบเกี่ยวกับ gis

  • Adobe Spry
  • AFlax
  • Ext
  • jQuery
  • Microsoft Ajax
  • MochiKit
  • Mootools
  • Prototype
  • Rico
  • YUI
  • Scriptaculous
ผมเล็ง extjs, yui เอาไว้

ผมเอียงไปทาง extjs เพราะว่า production ดี แต่เรื่อง productivity ห่วยเอาเรื่อง ใช้งานยาก ยากจริงๆ นะ
ผมลองอยู่สองวัน ทำไม่ได้ดั่งใจเลย เลยลองใช้ jQuery ปรากฏว่า 10 นาทีเสร็จ ได้อย่างที่ต้องการ (แม้ไม่สวยโดนตา)

dojo นี่ผมไม่มองเลยนะ สมัยออกใหม่ๆ นี่เข็ดกะ document เลยไม่ค่อยอยากใช้ แต่ก็ต้องสะดุด เพราะ ESRI เค้าเลือกใช้ (อย่างน้อยก็ตอนนี้ล่ะ อนาคตไม่แน่)

อืมส์ เอาล่ะ เพิ่มไปอีกหนึ่งตัวล่ะกัน extjs, yui, dojo ที่ผมสนใจ