2014年6月28日 星期六

The Collection of Cell Phones

Cell Phone History

2014年6月27日 星期五

3GPP Supplementary Service

Reference


SPEC NumberTitleNote
TS 24.010Mobile radio interface layer 3; Supplementary services specification; General aspects
TS 24.030Location Services (LCS); Supplementary service operations; Stage 3
TS 24.072Call Deflection (CD) supplementary service; Stage 3
TS 24.080Mobile radio interface layer 3 supplementary services specification; Formats and coding
TS 24.081Line Identification supplementary services; Stage 3
TS 24.082Call Forwarding (CF) supplementary services; Stage 3
TS 24.083Call Waiting (CW) and Call Hold (HOLD) supplementary services; Stage 3
TS 24.084Multi Party (MPTY) supplementary service; Stage 3
TS 24.085Closed User Group (CUG) supplementary service; Stage 3

Example: Call Forwarding when not Reachable (CFNRc)

當手機正處於無法與基地台聯絡的狀況, 例如荒郊野外, 關機, 地下室, 樓梯間,速度大於150km/hr的載具(高速鐵路), 有人打這隻手機, 透過CFNRc服務便會被轉接到所指定的號碼. 至於這個轉接的號碼, 是可由使用者隨意設定與取消的,並不具有監聽的效果.
 

CFNRc服務可以藉由 *#62#指令來進行設定, 下面是一些實驗流程, 可以自己設設看, 本文設計了一個實驗流程, 請跟著步驟一步步試試看
1. 準備三支手機(或至少一支手機與一台市內電話), 裡面要有能通話的SIM卡(或者PHS也可以),電話號碼分別是 A, B, C(或者
一支手機A與一台市內電話B)
2. 在手機A 上按 **62*(號碼B)#[SEND], 撥號出去之後, 如果A這個號碼的運營商有支援CFNRc, 你會看到手機的完成訊息:來電轉接已啟動
恭喜你, 設定成功了
3. 把手機A 關機, 然後拿起手機C(或用公用電話), 打給手機A
4. 因為這個號碼是設定在基地台, 所以當C call A, 基地台找不到手機A, 他就會根據之前設定的號碼, 把這通電話轉給手機B
(或市內電話)
5. 所以手機B 就會響起來了, 接了它吧, 不是什麼詐騙電話, 更不是監聽電話
6. 如果要取消設定, 很簡單, 你只要把手機A 拿到有收訊的地方, 按 ##62#[SEND], send 出去之後, 你會看到手機的完成訊息:
來電轉接已取消, 這樣就成功取消轉接功能並刪掉設定的號碼了

其實62這個 SC (service code) 只是 call forwarding 的四種條件其中之一, 這四種條件分別是
1. SC=21, call forwarding unconditional, 無論如何都轉接給指定的號碼
2. SC=67, call forwarding on busy subscriber, 當手機正在忙線中, 轉接給指定的號碼
3. SC=61, call forwarding on no reply, 當來電沒有被接起來到達指定的秒數, 轉接給指定的號碼
4. SC=62, call forwarding when not reachable, 當手機沒有在任何基地台的範圍之內

至於操作的指令, 其實一共有五種:
1. *#SC#, 可隨時查詢此服務的狀態, 放心使用, 不會改變服務的狀態(check the service state)
2. **SC*PHONENUMBER#, (set and enable the service forward call to the PHONENUMBER)設定並啟動此服務
3. ##SC#,
(disable the service forward call and erase the PHONENUMBER)取消並將設定的號碼刪除掉
4. *SC##, (enable call forwarding)啟動此服務
5. #SC#,
(disable call forwarding)取消此服務

聽起來很複雜, 但真的很簡單, 假設鄉親已經使用 **SC*(電話號碼)# 設定並啟動轉接服務, 可以使用 #SC# 暫時取消,
稍後藉 *SC# 再度啟動, 若一旦藉由 ##SC#
刪掉掉註冊在基地台的轉接號碼, 則 *SC##SC# 皆無法作用.

以下列出台灣前三大行動網路運營商CFNRc服務設定申請的相關網頁供大家做進一步的參考:
The following links are about call forwarding application in the Taiwan top 3 operator:
1. 中華電信(
Chunghwa Telecom): 首頁 > 個人/家庭>行動服務>基本服務 
2. 遠傳電信(FarEasTone): 首頁 > 網路客服 > 基本功能說明 > 基本功能 > 指定轉接
3. 台灣大哥大(Taiwan Mobile):
首頁 » 用戶服務 » 我的服務/優惠»指定轉接


2014年6月26日 星期四

OpenCV on Android

I: Install OpenCV for Android

Downloading and Installing Android NDK

The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++.

1. Download the latest version of the NDK from this website:
    http://developer.android.com/tools/sdk/ndk/index.html
2. Unzip the downloaded file to a location without spaces in the path, for example:
    C:\\Development\android-ndk-r9d
3. Define NDKROOT as a new environment variable pointing to the unzipped location from
    the previous step.

Updating Tools in Android SDK

1. In Eclipse, click Help > Install New Software. Then, click Add.
2. In the Add Repository dialog, enter “ADT Plugin” for the Name and the following URL for
    the Location, and click OK:
    https://dl-ssl.google.com/android/eclipse/
3. In the Available Software dialog, select all listed components. Click Next. Accept all license agreements. Click Finish.
4. Restart Eclipse after all the tools have been downloaded and installed.

Downloading and Installing OpenCV SDK

1. Download version 2.4.4 (or higher) of the SDK from this website:
    http://sourceforge.net/projects/opencvlibrary/files/opencv-android/
2. Unzip the downloaded file to a location without spaces in the path, for example:
    C:\\Development\OpenCV-2.4.9-android-sdk
3. In Eclipse, select File > Switch Workspace > Other. Specify a location associated with OpenCV projects, for example:
C:\\Development\OpenCV-2.4.9-android-sdk
4. Right-click in the Package Explorer panel and choose Import > General > Existing Projects into Workspace. Select “Specify root directory” and input the location where the SDK contents were unzipped, for example:
C:\\Development\OpenCV-2.4.9-android-sdk
5. After seeing the OpenCV library and sample projects appear in the “Projects” box, click Finish. It may take a minute for all the projects to be loaded and initialized. Thereafter, you have the projects imported into the workspace

II: Run OpenCV Applications on Physical Phone

Running OpenCV Samples

1. Connect your phone to PC via USB Cable
2. Make sure your device manager shows (Android Composite) ADB Interface, if no please check driver installation

3. Install the OpenCV Manager app from the Google Play Market onto your phone
link: https://play.google.com/store/apps/details?id=org.opencv.engine
4.In Eclipse, click on any of the sample OpenCV projects. Then, click Run > Run As > Android Application. You can monitor the installation status in the Console.

Troubleshooting 

Ref:
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html#development-in-java 


1."The container 'Android Dependencies' references non existing library 'C:\Project\android-sdk-windows\tools\support\annotations.jar'.



Sol:change the target API version from 11 to 19


2. OpenCV in not ready (OpenCV Manager app not be install)


 
Sol: Download App's apk file on Google Play without Google account

a. get the app's link from Google Play page
Ex:https://play.google.com/store/apps/details?id=org.opencv.engine

b. go to App Downloader website
http://apps.evozi.com/apk-downloader/?id=org.opencv.engine

c. post link get from step a in website
d. get the apk file org.opencv.engine.apk
e. cmd adb install org.opencv.engine.apk

2014年6月19日 星期四

Introduction to Cryptocurrency Authentication Protocol

      A cryptocurrency is a medium of exchange designed around securely exchanging information which is a process made possible by certain principles of cryptography. The first cryptocurrency to begin trading was Bitcoin in 2009. Since then, numerous cryptocurrencies have been created. Fundamentally, cryptocurrencies are specifications regarding the use of currency which seek to incorporate principles of cryptography to implement a distributed, decentralized and secure information economy.

Proof of work

A proof of work is a piece of data which was difficult (costly, time-consuming) to produce so as to satisfy certain requirements. It must be trivial to check whether data satisfies said requirements. Producing a proof of work can be a random process with low probability, so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work.

Proof of Stake

Proof of Stake is a proposed alternative to Proof of Work. Like proof of work, proof of stake provides a mechanism for determining who signs bitcoin transactions.

 "PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake". http://barkingshibes.com/wp-content/uploads/2014/02/ppcoin-paper.pdf, 
19-08-2012. Sunny King, Scott Nadal.

Proof-of-Stake-Velocity

Proof-of-Stake-Velocity (PoSV) replace the current Proof-of-Work (PoW).
PoSV builds on the strength of Proof-of-Stake (PoS) but introduces crucial features to address the flaws of both PoW and PoS.
PoSV is specifically designed to help Reddcoin grow as the digital social currency.
FAQs, such as PoSV's impact on mining and halving schedule, are covered here: Proof of Stake Velocity: FAQs

2014年6月17日 星期二

RoR Hello World

MVC Model in Rails

1. Generator a controller

rails generate controller welcome

      create  app/controllers/welcome_controller.rb
      invoke  erb
      create    app/views/welcome
      invoke  test_unit
      create    test/controllers/welcome_controller_test.rb
      invoke  helper
      create    app/helpers/welcome_helper.rb
      invoke    test_unit
      create      test/helpers/welcome_helper_test.rb
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/welcome.js.coffee
      invoke    scss
      create      app/assets/stylesheets/welcome.css.scss



2.Add new setting in routing file (config/routes.rb)

get "welcome/say_hello" => "welcome#say"


3. edit controller fileopen app/controllers/welcome_controller.rb, and then ass a say method.

class WelcomeController < ApplicationController 
    def say 
    end
end


4.add app/views/welcome/say.html.erb

<h1>Hello, World!</h1>


以CRUD方式開始RoR應用

CRUD means the four basic type: Create, Read, Update and Delete for data operation.

1.build work space

$ mkdir projects
$ cd projects

2. build new app project

$ rails new blog
$ cd blog
$ ls -al




檔案/目錄用途
Gemfile設定Rails應用程式會使用哪些Gems套件
README專案說明:你可以用來告訴其他人你的應用程式是做什麼用的,如何使用等等。
Rakefile用來載入可以被命令列執行的一些Rake任務
app/放Controllers、Models和Views檔案,接下來的內容主要都在這個目錄。
config/應用程式設定檔、路由規則、資料庫設定等等
config.ru用來啟動應用程式的Rack伺服器設定檔
db/資料庫的結構綱要
doc/用來放你的文件
lib/放一些自定的Module和類別檔案
log/應用程式的Log記錄檔
public/唯一可以在網路上看到的目錄,這是你的圖檔、JavaScript、CSS和其他靜態檔案擺放的地方
script/放rails這個指令和放其他的script指令
test/單元測試、fixtures及整合測試等程式
tmp/暫時性的檔案
vendor/用來放第三方程式碼外掛的目錄

3. Start the server

$ cd projects/demo
$ rails server

4. check the default web page
open browser and then goto http://localhost:3000

2014年6月16日 星期一

Innovation System

TRIZ的含義是發明問題解決理論,其中TRIZ拼寫是由俄文單詞теории решения изобретательских задач 的英文音譯Teoriya Resheniya Izobreatatelskikh Zadatch的縮寫,其英文全稱是Theory of the Solution of Inventive Problems(發明問題解決理論)。在歐美國家也可縮寫為TIPS

QFD是品質機能展開(Quality Function Deployment的縮寫),QFD是將客戶的需求轉換成產品設計的方法,著重在傾聽客戶的聲音,回應顧客的需求。

2014年6月14日 星期六

Install RoR on Ubuntu 10.04 x86_64


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Install Ruby Using apt-get (Out of date)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

1. Install Ruby interpreter

$sudo apt-get install ruby
$ruby -v (make sure the install sucess, ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux])
$sudo apt-get install ruby-dev
$sudo apt-get install libopenssl-ruby (Solution for "no such file to load -- net/https (LoadError)")
2. Install Ruby Package Management program
$sudo apt-get install rubygems
$gem -v (make sure the install sucess 1.3.5)

#speed up by setting no doc files download for each pakage install
$vim ~/.gemrc
insert the content "gem: --no-ri --no-rdoc"

3.Install Rails
$gem install rails

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Install Ruby Using RVM

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$\curl -sSL https://get.rvm.io | bash -s stable --ruby

$ source /home/stanley3/.rvm/scripts/rvm
(or add "source ~/.rvm/scripts/rvm" in the ~/.bashrc)
$ruby -v
(ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux])
$gem -v (2.2.2)

$rvm list known (查看可安裝的 Ruby 實作)

$rvm use ruby_version (can switch between the Ruby versions)

add the following line into .bashrc to load rvm

# This loads RVM into a shell session.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Install Node.js

Since Rails 3.1, a JavaScript runtime has been needed for development on Ubuntu Linux. The JavaScript runtime is required to compile code for the Rails asset pipeline. For development on Ubuntu Linux it is best to install the Node.js server-side JavaScript environment.

Note: the following green key is from the output of $apt-get update
$sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B9316A7BC7917B12
$sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get install nodejs
$ which node (expected output: /usr/bin/node)


Rails Installation


$gem install rails (the most recent stable release)
$rails -v