2019年11月5日 星期二

解決Blogger無法登入或是作者變成Unknown

如果確認已經使用正確的電子信箱但還是無法登入自己的Blogger後台,並且發現自己的作者名稱被改成Unknown,那麼可以嘗試使用下列的方法解決


問題出現的原因是Google+ 停止服務造成的
新版的 Google+ Android 應用程式已經於 2019 年 2 月 21 日推出。所有 Android 使用者都必須立即更新至這個 Google+ Android 應用程式,才能繼續使用應用程式。舊版應用程式將不再受支援。使用者還是可以在行動裝置上前往 plus.google.com 使用 Google+。不過請注意,Google+ 消費者 (個人) 版將於 2019 年 4 月 2 日停止服務。


最早在開始註冊Blogger的時候, 設定作者簡介時可決定是使用 Blogger本身的,還是使Google+

如果是設定Google+就無法登入Blogger後台, 所以如果當初帳號的設定是用Google+,作者的名字會變成Unknown

解決方法
先在Google首頁登入你的帳號(Google首頁、Gmail、Youtube...等等都可以) 然後進入這網址設定作者名字
https://www.blogger.com/switch-profile.g (現在可以自動轉向這網頁)



設定完Blogger作者的名字後, 就可以正常登入Blogger後台了


2017年1月17日 星期二

Note for Linux Device Drivers

Linux Kernel 2.4

Ch1.


write kernel code to access the hardware, but don't force particular policies on the user.

Class of Devices and Modules
1. Character Devices
Ex: text console, serial port


2. Block Devices
Ex: /dev file system

3. Network interfaces
Ex: eth0

4.Other
SCSI

Ch2. 

modularization
kernel header __KERNEL__ preprocessor

prevent namespace pollution and declare all symbols as static

Ch3.

Character Devices

Ch4.

Debugging skills

Ch5.

important operations: select, ioctl

Ch6.

time management

Ch7.

memory allocation


2016年12月25日 星期日

Misc about C Pointer

C Pointer

ptr++;    // Pointer moves to the next int position (as if it was an array)
++ptr;    // Pointer moves to the next int position (as if it was an array)
++*ptr;   // The value of ptr is incremented
++(*ptr); // The value of ptr is incremented
++*(ptr); // The value of ptr is incremented
*ptr++;   // Pointer moves to the next int position (as if it was an array). But returns the old content
(*ptr)++; // The value of ptr is incremented
*(ptr)++; // Pointer moves to the next int position (as if it was an array). But returns the old content
*++ptr;   // Pointer moves to the next int position, and then get's accessed, with your code, segfault
*(++ptr); // Pointer moves to the next int position, and then get's accessed, with your code, segfault


C Function Designator

A function designator is an expression that has function type. Except when it is the operand of the sizeof operator or the unary & operator, a function designator with type ‘‘function returning type’’ is converted to an expression that has type ‘‘pointer to function returning type’’.

References

2015年8月8日 星期六

Docker Networking


  • Install Docker
    1. exec ifconfig



  • Run Docker
    1. Docker can expose container services through port mapping
    2. docker run -it --rm busybox

2015年7月26日 星期日

Network Virtualization

What is Network Virtualization?

Network virtualization is a specific abstraction of a physical network that allows the support of multiple logical networks running on a common shared physical infrastructure.

How to implement Network Virtualization?

In order to virtualize network, we first build virtual nodes or machines on physical infrastructure.
One particular approach for doing that is the Xen Virtual Machine Monitor. Another is User-Mode Linux, with something called network namespaces. Network namespaces were originally an add
on to the Linux kernel and they're now part of the main line Linux kernel.

KVM is another virtualization technology. And there's certainly others as well. VMWare of course makes their own commercial virtual machine technology. And Virtual Box is one that free choice.

The examples of Network Virtualization

SDN Control Plane

Introduction to SDN Control Plane

The network consists of routers, switches and controllers. 
The controller speaks to the switch over a secure control channel and the SDN protocol effectively instructs the switch to update its flow table entries to take different actions on various traffic flows that pass through the switch.The purpose of the control channel is effectively to update this flow table and all of the logic concerning how the flow table entries are updated are contained at the controller.

SDN Controllers

When a packet arrives at the switch, it parses the header fields, and based on the values of those header fields, it will attempt to match that packet against flow table entries in any one of several flow tables. If there is no match in any of those tables, the traffic is sent to the controller.

NOX was a first-generation OpenFlow controller. It is open source, stable, and fairly widely used. There are two flavors of NOX. One, Nox-Classic, was the original NOX, and was implemented in C++ and Python. It's no longer supported. The new NOX is C++ only.

POX is essentially NOX in Python. It currently supports only version 1.0. An advantage of POX is that it's widely used, maintained and supported and it's relatively easy to read and write code. The main disadvantage of POX is performance.

Ryu is an open source Python controller. It supports all versions of OpenFlow from 1.0 to 1.4 as well as various mysteria extensions. A disadvantage of Ryu with respect to some of the other commercial grade controllers is performance.

Floodlight is an open-source Java controller that supports OpenFlow 1.0. It's a fork from the Beacon Java OpenFlow controller. And is maintained by Big Switch. Some of the advantages include good documentation and integration with the REST API. It's also production level, and supports and
provides support for OpenStack and Multi-Tenant Clouds.

OpenDaylight (ODL) is to provide a common industry supported platform with a robust, extensible open source codebase and common abstractions for northbound capabilities. OpenDaylight is written by Java and has many advantages including widespread industry acceptance and integration with OpenStack and other types of cloud applications. However, it's extremely complex. 

Frenetic
Pyretic = Python + Frenetic

Customize Network Control

NFV Service Chaining

2015年7月25日 星期六

SDN Control and Data Separation

SDN Control and Data Separation



What is the control/data plane separation?

The control plan is logic that controls the forwarding behavior in the network.
Examples of the control plane are routing protocols, network box configuration such as firewall configuration or load balancer configuration, and so forth. One can think of it in some ways as the brain of the network.

The data plane on the other hand forwards traffic according to the control plane logic.
Examples of data planes are IP forwarding layered to switching and so forth.

Why we need the control/data plane separation?

One reason of the control/data plane separation is that control plane and data plane can evolve and be developed independently. In particular the software control of the network can evolve independently of the hardware. That means one can buy a router, switches, middle boxes, and so forth deploy them in the network and not be bound by capabilities of software that ship with the hardware at that particular time.

The second reason to separate the control and data planes is that it allows the network to be controlled from a single high level software program. The higher order programs could easily control or debug  the behavior of the entire network instead of reconfigure/check each network component one by one.

The opportunities and challenges of control/data plane separation

The first opportunity of separating the data and control plane can help in data centers and in routing. The second advantage of the control and  data plane separation can help make certain applications in enterprise networks easier to manage.

There are also challenges to make the control and data plane separation being a reality.
The first is scalability, once we separate the control elements from the forwarding elements. The other challenge is reliability or security what happens if a controller fails or is compromised?

Reference:



2015年7月16日 星期四

Software-Defined Networking (SDN) Layers and Architecture Terminology

Introduction

     Software-Defined Networking (SDN) is a term of the programmable networks framework. The key differences between SDN and the common network are abstraction and virtualization. SDN separates the network function into management plant, control plane and data plane. The goal of SDN is to leverage this separation, and the associated programmability, in order to reduce complexity and enable faster innovation at all planes.


Terminology

  • Forwarding Plane (FP) - The collection of resources across all network devices responsible for forwarding traffic.
  • Control Plane (CP) - The collection of functions responsible for controlling one or more network devices. CP instructs network devices with respect to how to process and forward packets. The control plane interacts primarily with the forwarding plane and, to a lesser extent, with the operational plane.
  • Management Plane (MP) - The collection of functions responsible for monitoring, configuring, and maintaining one or more network devices or parts of network devices. The management plane is mostly related to the operational plane (it is related less to the forwarding plane).

SDN Model View


  • ForCES

The IETF Forwarding and Control Element Separation (ForCES) framework [RFC3746] consists of one model and two protocols. ForCES separates the forwarding plane from the control plane via an open interface, namely the ForCES protocol [RFC5810], which operates on entities of the forwarding plane that have been modeled using the ForCES model [RFC5812].
The ForCES model [RFC5812] is based on the fact that a network element is composed of numerous logically separate entities that cooperate to provide a given functionality (such as routing or IP switching) and yet appear as a normal integrated network element to external entities.
ForCES models the forwarding plane using Logical Functional Blocks (LFBs), which, when connected in a graph, compose the Forwarding Element (FE). LFBs are described in XML, based on an XML schema.
  • NETCONF/YANG

The Network Configuration Protocol (NETCONF) [RFC6241] is an IETF network management protocol [RFC6632]. NETCONF provides mechanisms to install, manipulate, and delete the configuration of network devices.
NETCONF protocol operations are realized as remote procedure calls (RPCs). The NETCONF protocol uses XML-based data encoding for the configuration data as well as the protocol messages. Recent studies, such as [ESNet] and [PENet], have shown that NETCONF performs better than SNMP [RFC3411].
Additionally, the YANG data modeling language [RFC6020] has been developed for specifying NETCONF data models and protocol operations. YANG is a data modeling language used to model configuration and state data manipulated by the NETCONF protocol, NETCONF remote procedure calls, and NETCONF notifications.
YANG models the hierarchical organization of data as a tree, in which each node has either a value or a set of child nodes. Additionally, YANG structures data models into modules and submodules, allowing reusability and augmentation. YANG models can describe constraints to be enforced on the data. Additionally, YANG has a set of base datatypes and allows custom-defined datatypes as well.
  • OpenFlow

OpenFlow is a framework originally developed at Stanford University and currently under active standards development [OpenFlow] through the Open Networking Foundation (ONF). Initially, the goal was to provide a way for researchers to run experimental protocols in a production network [OF08]. OpenFlow has undergone many revisions, and additional revisions are likely. The following description reflects version 1.4 [OpenFlow]. In short, OpenFlow defines a protocol through which a logically centralized controller can control an OpenFlow switch. Each OpenFlow-compliant switch maintains one or more flow tables, which are used to perform packet lookups. Distinct actions are to be taken regarding packet lookup and forwarding. A group table and an OpenFlow channel to external controllers are also part of the switch specification. With respect to Figure 1, the OpenFlow switch specifications [OpenFlow] define a DAL for the forwarding plane as well as for CPSI.
The OF-CONFIG protocol [OF-CONFIG], based on the YANG model [RFC6020], provides a DAL for the forwarding and operational planes of an OpenFlow switch and specifies NETCONF [RFC6241] as the MPSI. OF-CONFIG overlaps with the OpenFlow DAL, but with NETCONF [RFC6241] as the transport protocol, it shares the limitations described in the previous section.

2014年12月13日 星期六

Introduction to REST & JSON

What is REST?

Representational State Transfer (REST) is a style of software architecture for distributed systems.

 使用 REST 為設計架構的系統我們就稱為 RESTful系統

 RESTful Web Services(或稱RESTful Web API)是以HTTP為基礎,必且有以下三個特色
  1. 所有的API或是以Resource的形式存在,例如 htttp://www.test.com/examples/12345
  2. 這個服務可以接受與返回某個MIME-TYPE,最常見的是JSON格式,也可以回傳PNG/JPG/TXT等格式。
  3. 對資源的操作會支援各種請求方法 (例如GET, POST, PUT, DELETE)

What is JSON?

JavaScript Object Notation (JSON) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate” – JSON.org


JSON
XML
Data Structure
Data Structure
No validation system
XSD
No namespaces
Has namespaces (can use multiples)
Parsing is just an eval
Fast
Security issues
Parsing requires XML document parsing using things like XPath
In JavaScript you can work with objects – runtime evaluation of types
In JavaScript you can work with strings – may require additional parsing
Security: Eval() means that if the source is not trusted anything could be put into it.
Libraries exist to make parsing safe(r)
Security: XML is text/parsing – not code execution.

2014年9月4日 星期四

Machine Type Communication

Machine Type Communication (MTC) is a form of data communication which involves one or more entities that do not necessarily (or not much) need human interaction. The MTC is also known as Machine to Machine Communication (M2M) and Internet of Things (IoT).

What are the MTC applications?

Sensor 
Smart Meter
Actuator

What are the MTC features?

Different market scenarios (smart meter v.s. phone)
Data communications (low traffic v.s. burst traffic)
Lower costs and effort
Potentially very large number of communicating terminals
Low Mobility
Time Controlled
Infrequent Mobile Terminated (Mostly MO)
MTC Monitoring
Secure Connection
Group Based MTC Features (Policing, Addressing)


MTC is benefit to both telecom operators and vendors. Vendors are expected to profit from selling M2M-capable devices, and operators earn profit by increased throughput at non-rush hour. For service providers, MTC is an opportunity for fast deploying service onto the current user services network.

2014年8月24日 星期日

MTP on Android

What is MTP?

MTP stands for “Media Transfer Protocol.” After Android 3.x, Android uses this protocol, it appears to the computer as a “media device.” The media transfer protocol was widely promoted as a standardized protocol for transferring audio files to digital music players using Windows Media Player and similar applications. It was designed to allow other media player companies to compete with Apple’s iPod and iTunes.

The Problem in MTP

File dir = Environment.getExternalStoragePublicDirectory("TempDir");
File file = new File(dir, "test.txt");
FileUtils.writeStringToFile(file, "Hello World");

If you’d execute the code above, the file would be created but it wouldn’t show up in the Windows Explorer (or whatever tool you’re using the view the device’s contents).
To make the file show up, after closing it use the following code (API documentation):
MediaScannerConnection.scanFile(ctx, new String[] { file.getAbsolutePath() }, null, null);

Notes:
The external storage is scanned automatically when the Android device is booting (e.g. after a restart).
If you pass a directory (instead of a file) to scanFile(), the directory will show up as file in Window Explorer, so don’t do this.

2014年7月15日 星期二

Standard for National Communications Commission in Taiwan

Certification Standard

  1. LP0002
  2. PLMN01 (GSM and DCS Mobile Phone Standard)
  3. PLMN02
  4. PLMN08
  5. PLMN09 (3G Mobile Phone Standard)
  6. PLMN10 (4G LTE Mobile Phone Standard)
  7. IS2032-1
  8. IS2045-0
  9. IS2037-0
  10. IS2050
  11. CNS14958-1
  12. CNS14959

 PLMN10 (2013/10/15)

5.14 Public Warning System,PWS
 5.14.1 本項測試適用手持式行動臺設備。
 5.14.2 公眾告警廣播簡訊功能應具有下列通道:
  5.14.2.1 通道4370為顯示中文公眾告警廣播簡訊,且不可關閉。
  5.14.2.2 通道4380為業者測試公眾告警廣播簡訊。
  5.14.2.3 通道4383為顯示英文公眾告警廣播簡訊,且不可關閉。
 5.14.3 設備應具有告警聲響信號,並符合下列規定:
  5.14.3.1 告警聲響信號型式為2段聲響,並間隔0.5秒。每段聲響為2秒聲響後有2次1秒聲響,每次聲響間隔0.5秒。
  5.14.3.2 告警聲響信號須符合下列第5.14.3.2.1節或第5.14.3.2.2節之規定:
   5.14.3.2.1 設備具有混音能力,必須同時以基頻853Hz和960Hz混音產生聲響傳送。
   5.14.3.2.2 設備只有單音能力,必須以960Hz單音產生聲響傳送。
  5.14.3.3 告警聲響信號僅限使用於公眾告警廣播簡訊功能。
 5.14.4 設備應具有告警振動信號,並符合下列規定:
  5.14.4.1 告警振動信號型式為2段振動,並間隔0.5秒。每段振動為2秒振動後有2次1秒振動,每次振動間隔0.5秒。
  5.14.4.2 告警振動信號僅限使用於公眾告警廣播簡訊功能。
  5.14.4.3 告警聲響信號與告警振動信號間得不同步。
5.14.5 公眾告警廣播簡訊之接收處理必須優先於設備其他功能。

2014年7月14日 星期一

Patentable Invention

Copyright- Expression of idea
Patent- Embodiment of idea


Patentability and Patent Eligible

35 U.S.C. 101 Inventions patentable. “Whoever invents or discovers any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof, may obtain a patent therefor, subject to the conditions and requirements of this title.”

MacKay Co. v. Radio Corp., 306 U.S. 86,94(1939).

A.MT Test (Machine-or-Transformation Test)
Process  is tied to a particular machine or apparatus
Process ransforms a particular article into a different state or thing




Non-Patentability

1. abstract ideas

"principle, in the abstract, is a fundamental truth; an original cause; a motive; these cannot be patented, as no one can claim in either of them an exclusive right.", LeRoy v. Tatham, 14How.156,175 (1853).

Rubber-Tip Pencil Co. v. Howard, 20wall.498,507(1874).

2. natural phenomena
Association for Molecular Pathology v. Myriad Genetics, 569 U.S. 12-398 (2013).

3. natural products

4. laws of nature
Mayo Collaborative Services v. Prometheus Laboratories, Inc. 566 U.S. 10-1150(2012).


2014年7月1日 星期二

Modify OpenCV Tutorial Project

OpenCV Tutorial 2 – Mixed Processing




1. Enter the src folder, and then open Tutorial2Activity.java

2. At the top of the file, add:

private static final int VIEW_MODE_THRESH = 3;
private MenuItem mItemPreviewThresh;


3.In the method “onCreateOptionsMenu”, add:

mItemPreviewThresh = menu.add(“Thresh.”);

4.In the method “onCameraFrame”, add:


case VIEW_MODE_THRESH:
mRgba = inputFrame.rgba();
       int maxValue = 255;
       int blockSize = 61;
       int meanOffset = 15;
       Imgproc.adaptiveThreshold(
              inputFrame.gray(),
              mIntermediateMat,
              maxValue,
              Imgproc.ADAPTIVE_THRESH_MEAN_C,
              Imgproc.THRESH_BINARY_INV,
              blockSize,
              meanOffset );
       Imgproc.cvtColor( mIntermediateMat, mRgba, Imgproc.COLOR_GRAY2RGBA, 4 )


5.In the method “onOptionsItemSelected”, add:
else if (item == mItemPreviewThresh) {
mViewMode = VIEW_MODE_THRESH;
}

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