2016年10月18日 星期二

3D printing knowledge

What is 3d printing?
https://www.3dhubs.com/what-is-3d-printing

3d printing material - Proto Labs.
https://www.protolabs.com/documents/united-states/3D-Printing-Decision-Tree-Infographic-Horizontal-us-Full-Final.pdf

http://www.appliancedesign.com/ext/resources/WhitePapers/2016/3D-Printing-Materials-WP-US-Final.pdf

2015年8月19日 星期三

RoR installation on Ubuntu 14.04


  1. sudo apt-get install rbenv
  2. rbenv install [Ruby version]
    This step takes a while...It took 5 minutes on my i7 machine
  3. add system variable to your startup script
    ~/.bashrc in Ubuntu
    add these two lines
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"


That's it. Easier than I expected....


2015年2月25日 星期三

Flights between Tokyo and Taiwan(TPE) and transportation between Tokyo and Narita Airport

Tokyo (Narita Airport, NRT) -> Taipei (Taoyuan Airport, TPE)

Vanilla air
JW 101 07:35 -> 10:30
JW 103 14:25 -> 17:25
JW 105 21:20 -> 00:20

Scoot
TZ 201 11:45 -> 14:20


Taipei ( Taoyuan Airport, TPE) -> Tokyo (Narita Airport, NRT)


Vanilla air
JW 102 03:00 -> 07:00
JW 104 11:10 -> 15:30
JW 106 18:05 -> 22:00

Scoot
TZ 202 06:40 -> 10:35


Accessing Narita Airport
Bus:
Keisei: http://www.keiseibus.co.jp/global/en/index.html
Heiwa: http://accessnarita.jp/en/home/

Trains:
Keisei: http://www.keisei.co.jp/keisei/tetudou/skyliner/us/index.html
NEX JREast: http://www.jreast.co.jp/e/

2015年2月24日 星期二

make your own cluster computer from raspberry pi 2

http://www.tinkernut.com/2014/04/27/make-cluster-computer/

setting up bluetooth device at raspberry pi 2

http://d.hatena.ne.jp/yunoya/20140330/1396114048
http://www.correlatedcontent.com/blog/bluetooth-keyboard-on-the-raspberry-pi/

2014年7月22日 星期二

JUnit+Jenkins CI

設定環境參數
JAVA_HOME=`which java`
JUNIT_HOME=/path_to_junit/
CLASSPATH=/path_to_TaskRunner/:/path_to_junit/junit-4.10.jar

設定 jenkins plugins
https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin

2014年5月21日 星期三

開發環境設定檔&設定指令

0. install essential packages in ubuntu(lubuntu)

sudo apt-get update;apt-get upgrade;sudo apt-get -y install vim build-essential git-core subversion python openjdk-7-jdk autoconf libtool pkg-config libevent-dev libssl-dev


1. git

http://ihower.tw/blog/archives/5436

2. vim

3. shell& bash


2013年7月17日 星期三

Expert C Programming reading




1. Both operands are pointers to qualified or unqualified versions of compatible types, and the type pointed to by the left has all the qualifiers of the type pointed to by the right. 

char * cp;
const char *ccp;
ccp = cp;

cp = ccp; /* results in a compilation warning */

2.The one "l" NUL ends an ASCII string, The two "l" NULL points to no thing. 

2013年4月28日 星期日

arch linux on IBM X61

https://wiki.archlinux.org/index.php/IBM_ThinkPad_X60s


2013年1月23日 星期三

2012年11月14日 星期三

PHP web crawler&parser

談談以前寫過的一個小程式好了, 這是之前(2008)年在看股票的時候寫的, 那時候3G網路剛剛開始, 手邊也沒有智慧型手機, 有一個sont ericsson的feature phone, 裡面有web瀏覽器, 也可以安裝Opera mini, 於是我就想用這手機裡的瀏覽器來關心股價.
但遇到的一個問題就是, 我常看的奇摩股市一個頁面實在太大, 以前窮學生根本沒錢去辦個3G網路吃到飽, 於是想說我寫一個頁面只有顯示我要看的資訊就好, 廣告一律濾掉.
於是我就寫了一個頁面有這樣的功能:

  1. 根據使用者輸入的股號, 抓取相對應的奇摩的股市資料頁面
  2. 解析該頁面, 拆出成交價, 買進賣出, 漲跌幅
  3. 輸出結果
當時也只會php, 就拿了網路上的php parser library來作

過了一陣子開始當研替的時候, 辦了3G網路吃到飽, 於是就冷落了這個頁面, 直到最近又開始辦有限流量的網路方案才又想到這個頁面, 哈.

有時間的話也想用Google App Engine的架構來重新整理一下這個code...

2012年11月13日 星期二

UVa online judge 540 - Team Queue

寫了好幾天的題目, 終於AC了...Run Time 0.108
順便拿這題來練習 1. pointer 2. linked list組成的queue 3. malloc/free的檢查




2012年11月8日 星期四

UVa online judge 10055 - Hashmat the Brave Warrior

UVa online judge 10300 - Ecological Premium

題目要看懂就ok

UVa online judge 401 - Palindromes

簡單來說就是 1. 有一個 function(或者寫成 array也行)來判斷是否有mirror字元 2. 判斷是否有回文(palindrome) 最後, 輸出的時候要多一個'\n'...因為這個原因, 我多了三次WA...

2011年12月13日 星期二

SVN server on Ubuntu Desktop

http://blog.chinson.idv.tw/2009/12/subversion-server-on-ubuntu.html

第一步照做, 第二步創使用者權限的可以這樣

新增使用者資訊
$sudo htpasswd [-參數] /opt/svnroot/htpasswd username
依照指示輸入使用者密碼即可。
/opt/svnroot/htpasswd 這個可以自己改成想要的路徑與檔名
參數:
-c:表示是否要新建檔案,舊有檔案內容會完全刪除,適用於第一次建立檔案時
-m:密碼以 MD5 進行編碼

2011年8月23日 星期二

於ubuntu 10.04下安裝Java JDK 1.5 續

由於前一篇文章的apt source site現在已經找不到sun的JDK package, 所以目前只能去oracle網站下載JDK還有JRE所需要的軟體.

安裝所需要的軟體如下
JDK http://www.oracle.com/technetwork/java/javase/install-139487.html
JRE http://www.oracle.com/technetwork/java/javase/install-138789.html

這兩個檔案其實就是自解檔, 下載之後加個執行屬性,執行之後就會解開來.
把自己的/etc/profile裡面加個PATH, 指到 [path to JDK]/bin 以及 [path to JDK]/jre/bin 即可

2011年4月13日 星期三

於ubuntu 10.04下安裝java jdk 1.5

因為Android source 必須使用java5才可以編譯,但是Unbuntu10.04 已經沒有再提供java5的版本

所以才會有此文教學如何在Unbuntu 10.04下安裝java5版本,並且將java版本降至java5才能編譯Android source

方法如下:

1、在/etc/apt/sources.list中加入java5 deb連結

sudo gedit /etc/apt/sources.list

於此檔案最後面加上如下文字:

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

2、更新apt-get連結

sudo apt-get update

3、安裝java5 jdk

sudo apt-get install sun-java5-jdk

4、將java版本降為java5

sudo update-java-alternatives -s java-1.5.0-sun

若想改為其他java版本可以使用

sudo update-java-alternatives -l

來查看所有安裝java的版本

ex:

java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk

5、檢查java版本

java -version

如果出現

java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02)
Java HotSpot(TM) Server VM (build 1.5.0_19-b02, mixed mode)
就代表成功了!

6、設定環境變數

在bashrc檔案中加入安裝的java路徑

sudo gedit ~/.bashrc (bashrc)

export JAVAHOME=/usr/lib/jvm/java-1.5.0-sun(jdk安裝路徑)
export PATH=$PATH:$JAVAHOME/bin:$JAVAHOME/jre/bin:$JAVAHOME/bin/lib
export CLASSPATH=.:$JAVAHOME/jre/bin:$JAVA_HOME/lib

2010年11月22日 星期一

ADB driver in Ubuntu

1. lsusb

at first, we need to know how your computer recognize your android device. Just type "lsusb" and all the usb devices that connect to your computer will be listed. see what you got at the output. in my case, i have a Motorola Milestone, and this is my output:

Bus 001 Device 059: ID 22b8:41db Motorola PCS

remember this and let proceed to second step...

2. sudo vim /etc/udev/rules.d/51-android.rules
and add this line:
SUBSYSTEM=="usb", SYSFS{"Motorola PCS"}=="22b8", MODE="0666"

this helps your computer to know what is this USB device, and hence recognizable

3.
sudo chmod a+rx /etc/udev/rules.d/51-android.rules
service udev restart

restart the USB device service


and your device should be listed as an ADB device by now :)



2010年9月1日 星期三

Java NIO DatagramChannel

Steps of using DatagramChannel

1.initializing DatagramChannel and bind it to specific port number, and connect it to the destination so that we can perform read and write later through this channel

DatagramChannel channel = DatagramChannel.open();
channel.socket().bind(new InetSocketAddress(9999));
channel.connect(new InetSocketAddress("wallyjue.blogspot", 80));


2. prepare the buffering space for receiving data, note that if the received packet contains more data than the Buffer can contain, the remaining data is discarded silently.
ByteBuffer buf = ByteBuffer.allocate(48);
buf.clear();

channel.receive(buf);


reference:
1. http://tutorials.jenkov.com/java-nio/index.html
2. http://onjava.com/pub/a/onjava/2002/09/04/nio.html
3. http://openjdk.java.net/projects/nio/javadoc/java/nio/channels/DatagramChannel.html