港股即時

Economic Calendar

Sunday, November 27, 2016

RFID



Radio-Frequency Identification (RFID) is the use of radio waves to read and capture information stored on a tag attached to an object.  A tag can be read from up to several feet away and does not need to be within direct line-of-sight of the reader to be tracked.




How does a RFID system work?

A RFID system is made up of two parts: a tag or label and a reader. RFID tags or labels are embedded with a transmitter and a receiver. The RFID component on the tags have two parts: a microchip that stores and processes information, and an antenna to receive and transmit a signal. The tag contains the specific serial number for one specific object.

To read the information encoded on a tag, a two-way radio transmitter-receiver called an interrogator or reader emits a signal to the tag using an antenna. The tag responds with the information written in its memory bank. The interrogator will then transmit the read results to an RFID computer program.



There are two types of RFID tags: passive and battery powered.  A passive RFID tag will use the interrogator’s radio wave energy to relay its stored information back to the interrogator.  A batter powered RFID tag is embedded with a small battery that powers the relay of information.




RFID Tags

RFID tags are classified as Class 0 through Class 5, depending on their functionality:

Class 0UHFl read-only, preprogrammed passive tag
Class 1UHF or HF; write once, read many (WORM)
Class 2Passive read-write tags that can be written to at any point in the supply chain
Class 3Read-write with onboard sensors capable of recording parameters like temperature, pressure, and motion; can be semipassive or active
Class 4Read-write active tags with integrated transmitters; can communicate with other tags and readers
Class 5Similar to Class 4 tags but with additional functionality; can provide power to other tags and communicate with devices other than readers

Reference above

Radio Basics for UHF RFID

Backscatter Radio Links
Passive and semipassive RFID tags do not use a radio transmitter; instead, they use modulation of the reflected power from the tag antenna. Reflection of radio waves from an object has been a subject of active study since the development of radar began in the 1930s, and the use of backscattered radio for communications since Harry Stockman's work in 1949.

A very simple way to understand backscatter modulation is shown schematically in Figure 3.14: current flowing on a transmitting antenna leads to a voltage induced on a receiving antenna. If the antenna is connected to a load, which presents little impediment to current flow, it seems reasonable that a current will be induced on the receiving antenna.


3.14. Simplified Physics of Backscatter Signaling.

In the figure, the smallest possible load, a short circuit, is illustrated. This induced current is no different from the current on the transmitting antenna that started things out in the first place: it leads to radiation. (A principle of electromagnetic theory almost always valid in the ordinary world, the principle of reciprocity, says that any structure that receives a wave can also transmit a wave.) The radiated wave can make its way back to the transmitting antenna, induce a voltage, and therefore, produce a signal that can be detected: a backscattered signal. On the other hand, if instead a load that permits little current to flow (that is, a load with a large impedance) is placed between the antenna and ground, it seems reasonable that little or no induced current will result. In Figure 3.14, we show the largest possible load, an open circuit (no connection at all). Since it is currents on the antenna that lead to radiation, there will be no backscattered signal in this case. Therefore, the signal on the transmitting antenna is sensitive to the load connected to the receiving antenna.

To construct a practical communications link using this scheme, we can attach a transistor as the antenna load (Figure 3.15). When the transistor gate contact is held at the appropriate potential to turn the transistor on, current travels readily through the channel, similar to a short circuit. When the gate is turned off, the channel becomes substantially nonconductive. Since the current induced on the antenna, and thus, the backscattered wave received at the reader, depend on the load presented to the antenna, this scheme creates a modulated backscattered wave at the reader.

Note that the modulating signal presented to the transistor is a baseband signal at a low frequency of a few hundred kHz at most, even though the reflected signal to the reader may be at 915 MHz. The use of the backscatter link means that the modulation switching circuitry in the tag only needs to operate at modest frequencies comparable to the data, not the carrier frequency, resulting in savings of cost and power. (Real RFID tag ICs are not quite this simple and may use a small change in capacitance to modulate the antenna current instead.)


3.15. Modulated Backscatter Using a Transistor as a Switch.

Note that in order to implement a backscattered scheme, the reader must transmit a signal. In many radio systems, the transmitter turns off when the receiver is trying to acquire a signal; this scheme is known as half-duplex to distinguish it from the case where the transmitter and receiver may operate simultaneously (known as a full-duplex radio).

RFID Basics: Backscatter Radio Links and Link Budgets

In a passive RFID system, the transmitter does not turn itself off but instead, transmits CW during the time the receiver is listening for the tag signal. RFID radios use specialized components known as circulators or couplers to allow only reflected signals to get to the receiver, which might otherwise be saturated by the huge transmitted signal. However, in a single-antenna system, the transmitted signal from the reader bounces off its own antenna back into the receiver, and the transmitted wave from the antenna bounces off any nearby objects such as desks, tables, people, coffee cups, metal boxes, and all the other junk that real environments are filled with, in addition to the poor little tag antenna we're trying to see (Figure 3.16).


3.16. Realistic Environments Create Many Reflected Waves in Addition to that from the Wanted Tag

If two antennas are used (one for transmit and one for receive), there is still typically some signal power that leaks directly from one to the other, as well as the aforesaid spurious reflections from objects in the neighborhood. The total signal at the receiver is the vector sum of all these contributions, most of which are much larger than the wanted tag signal, with appropriate amplitudes and phases, most of which are unpredictable a priori. Thus, the actual effect of a given change in the load on the tag antenna on the receiver signal is completely unpredictable and uncontrollable. For example, modulating the size of the tag antenna current (amplitude modulation) may not result in the same kind of change in the reader signal.


3.17. The Received Signal is not Simply Correlated to the Tag Signal. The AM Case Assumes the Tag Reduces its Scattered Magnitude Without Changing Phase; the Phase Shift Keying (PSK) Case Assumes Phase Inversion Without Amplitude Change.

In Figure 3.17, we show a case where changing the tag reflection from a large amplitude (HI) to a small amplitude (LO) causes the received signal to increase in magnitude without changing phase (the "AM" case). Changing the phase of the tag signal without changing the size of the reflected signal in order to symbolize a local oscillator (LO) state may change the amplitude of the reader signal at constant phase (Figure 3.17, PSK case). The only thing we can say with any confidence is that when we make a change in the state of the tag antenna, something about the phase or amplitude of the reader signal will change.
In order to make a backscatter link work, we need to choose a way to code the data that can be interpreted based only on these changes and not on their direction or on whether they are changes in phase or amplitude. As a consequence, all approaches to coding the tag signal are based on counting the number of changes in tag state in a given time interval, or equivalently on changing the frequency of the tag's state changes.
Therefore, all tag codes are variations of frequency-shift keying (FSK). It is important to note that the frequency being referred to here is not the radio carrier frequency of (say) 900 MHz but the tag (baseband) frequency of perhaps 100 or 200 kHz. A binary '1' might be coded by having the tag flip its state 100 times per millisecond, and a binary '0' might have 50 flips per millisecond.
Because the frequency being changed is the frequency at which a carrier is being amplitude modulated, techniques like this are sometimes known as subcarrier modulation. Let's look at one specific example of tag coding, usually known as FM0 (Figure 3.18).



3.18. FM0 Encoding of Tag Data.

In FM0, the tag state changes at the beginning and end of every symbol. In addition, a binary 0 has an additional state change in the middle of the symbol. Note that, unlike OOK, the actual tag state does not reliably correspond to the binary bit: for example, in the left-hand side of the figure, two of the binary '1' symbols have the tag in the LO state and another '1' symbol has the tag in the HI state. Remember, the reader can't reliably distinguish which state is which but can only count transitions between them. The right side of the figure shows the baseband signal corresponding to a series of identical binary bits to clarify the correspondence of binary '0's with a frequency twice as high as that of binary '1's. Different tag coding schemes can be used to adjust the offset from the carrier frequency at which the signal from the tags is found. Readers have an easier time seeing a tag signal when it is well separated from their own carrier frequency, so higher subcarrier frequencies help improve the ability to read a tag signal. However, if the separation is large compared to the channel size, the tag signal might lie on the signal of another reader in a different channel. Just as with readers, increasing the data rate of a tag signal tends to spread the spectrum out in frequency. To have a flexible choice of tag data rates while minimizing noise, the reader needs to be able to adapt the band of frequencies it tries to receive, adding cost and complexity.

In real receivers, noise and interference may be present as well as the desired signal. A certain minimum signal-to-noise ratio (S/N) is necessary for each type of modulation in order that it can be reliably decoded by the receiver. The exact (S/N) threshold depends on how accurate you're trying to be and to a lesser extent on the algorithms used for demodulation/decoding. For RFID using FM0, (S/N) of around 10 or better (10 dB or more) is usually sufficient. (Requirements for demodulation of reader symbols, like PIE, in the tag are generally similar.)

Link Budgets

Let's summarize the message of the last couple of sections. To transmit to a tag, a reader uses amplitude modulation to send a series of digital symbols. The symbols are coded to ensure that sufficient power is always being transmitted regardless of the data contained within in. The received signal can be demodulated using a very simple power detection scheme to produce a baseband voltage, which is then decoded by the tag logic. The whole scheme is depicted in Figure 3.19.




3.19. Schematic Depiction of Reader-to-tag Data Link.

Figure 3.20 shows the corresponding tag-to-reader arrangements. The tag codes the data it wishes to send and then induces changes in the impedance state of the antenna. The reader CW signal bounces off the tag antenna (competing with other reflections) and is demodulated by the reader receiver and then decoded back into the transmitted data.


3.20. Schematic Depiction of Tag-to-reader Data Link (A Separate Receive Antenna is Shown for Clarity).
While we have alluded several times to the fact that the reader must power the tag, so far we have avoided coming to grips with the crucial associated question of just how much power the tag needs to get and just how far we can go from the reader and still get it. The amount of power that one needs to deliver to a receiver across a wireless link in order that the transmitted data be successfully received is known as the link budget. Since readers and tags both talk, for an RFID system there are two separate link budgets, one associated with the reader-to-tag communication (the forward link budget) and one with the tag reply to the reader (the reverse link budget).


Reference above

Radio Basics for RFID, Part 1



Generation 2 Protocol Standard

http://www.gs1.org/sites/default/files/docs/epc/Gen2_Protocol_Standard.pdf


ST25RU3992 UHF RFID reader kit - using 8dBi antenna


http://www.soliddepot.com/index.php?main_page=product_info&cPath=38_42&products_id=232

Cottonwood: USB Long Range UHF RFID reader

http://learn.linksprite.com/rfid/how-to-program-the-rfid-reader/








Saturday, November 19, 2016

Android 學習



Android Manifest.xml 內的語法:


android version Apps版本
uses-permission 獲取權限
Application

存放位置示範:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   
package="com.testing.newrfid"
   
android:versionCode="1"
   
android:versionName="1.0">

    <
uses-sdk
       
android:minSdkVersion="14"
        
android:targetSdkVersion="19"/>

<
uses-permission android:name="android.permission.VIBRATE"/>

    <
application
       
android:allowBackup="true"
       
android:icon="@mipmap/winnington_logo"
       
android:label="@string/app_name"
       
android:supportsRtl="true"
       
android:theme="@style/AppTheme">
        <
activity android:name=".MainActivity">
            <
intent-filter>
                <
action android:name="android.intent.action.MAIN" />

                <
category android:name="android.intent.category.LAUNCHER" />
            </
intent-filter>
        </
activity>
    </
application>

Permissions 參考Link:
http://hyz301.iteye.com/blog/2211950

Intent-filter 的Main 和Launcher 意思參考link:
http://fanli7.net/a/caozuoxitong/android/2011/1103/139302.html
















Friday, November 4, 2016

PSL,SLF,MLF (殘體)

SLF (常备借贷便利)

借鉴国际经验,中国人民银行于2013年初创设了常备借贷便利(StandingLending Facility)。它是中国人民银行正常的流动性供给渠道,主要功能是满足金融机构期限较长的大额流动性需求。

对象主要为政策性银行和全国性商业银行。期限为1-3个月。利率水平根据货币政策调控、引导市场利率的需要等综合确定。常备借贷便利以抵押方式发放,合格抵押品包括高信用评级的债券类资产及优质信贷资产等。

主要特点:

1、由金融机构主动发起,金融机构可根据自身流动性需求申请常备借贷便利;

2、常备借贷便利是中央银行与金融机构“一对一”交易,针对性强;三是常备借贷便利的交易对手覆盖面广,通常覆盖存款金融机构。
MLF(中期结构便利/中期借贷便利)
M是Mid-term的意思。即虽然期限是3个月,临近到期可能会重新约定利率并展期。各行可以通过质押利率债和信用债获取借贷便利工具的投放。MLF要求各行投放三农和小微贷款。
目前来看,央行放水是希望推动贷款回升,并对三农和小微贷款有所倾斜。

它跟我们的比较熟悉的SLF也就是常备借贷便利是很类似的,都是让商业银行提交一部分的金融资产作为抵押,并且给这个商业银行的发放贷款。最大的区别是MLF借款的期限要比短期的要稍微长一些,而且临近到期的时候可能会重新约定的一个利率,就是说获得MLF这个商业银行可以从央行那里获得一笔借款,期限是3个月,利率是央行规定的利率,获得的这个借款之后,商业银行就有钱了,就可以拿这笔钱去发放贷款了,而且三个月到期之后,商业银行还可以根据新的利率来获得同样额度的贷款。

MLF的目的:
刺激商业银行向特定的行业和产业发放贷款。
通常情况下,商业银行它是通过借用短期的资金,来发放长期的贷款,也就是所谓的借短放长,短期的资金到期之后,商业银行就得重新的借用资金,所以为了维持一笔期限比较长的贷款,商业银行需要频繁借用短期的资金,这样做存在一定的短期利率风险和成本,由于MLF它的的期限是比较长的,所以商业银行如果它用MLF得到这个资金来发放贷款,就不需要那么频繁借短放长了,就可以比较放心发放长期的贷款。

所以通过MLF的操作,央行它的目标其实是很明确的,就是鼓励商业银行继续发放贷款,并且对贷款发放的对象有一定的要求,就是给三农企业、小微企业发放,以次来激活经济中的毛细血管,改善经过的状况。

市场人士认为,由SLF向MLF转变,标志着央行货币政策正从数量型为主向价格型为主转变。
PSL(抵押补充贷款)

(PSL,即Pledged Supplementary Lending的缩写)
PSL作为一种新的储备政策工具,有两层含义:
1、量的层面,是基础货币投放的新渠道;
2、价的层面,通过商业银行抵押资产从央行获得融资的利率,引导中期利率。 

PSL这一工具和再贷款非常类似,再贷款是一种无抵押的信用贷款,不过市场往往将再贷款赋予某种金融稳定含义,即一家机构出了问题才会被投放再贷款。出于各种原因,央行可能是将再贷款工具升级为PSL,未来PSL有可能将很大程度上取代再贷款工具,但再贷款依然在央行的政策工具篮子当中。

在我国,有很多信用投放,比如基础设施建设、民生支出类的信贷投放,往往具有ZF一定程度担保但获利能力差的特点,如果商业银行基于市场利率水平自主定价、完全商业定价,对信贷较高的定价将不能满足这类信贷需求。
央行PSL所谓引导中期政策利率水平,很大程度上是为了直接为商业银行提供一部分低成本资金,引导投入到这些领域。这也可以起到降低这部分社会融资成本的作用。
SLO(短期流动性调节工具)

SLO是Short-term Liquidity Operations的缩写,要理解清楚这个工具,咱先回顾下逆回购。 

每周二、周四,央行一般都会进行公开市场操作,目前最主要的是回购操作。回购操作又分成两种,正回购和逆回购。

正回购即中国人民银行向一级交易商卖出有价证券,并约定在未来特定日期买回有价证券的交易行为。正回购为央行从市场收回流动性的操作,正回购到期则为央行向市场投放流动性的操作。

逆回购即中国人民银行向一级交易商购买有价证券,并约定在未来特定日期将有价证券卖给一级交易商的交易行为,逆回购为央行向市场上投放流动性的操作,逆回购到期则为央行从市场收回流动性的操作。一言以蔽之,逆回购就是央行主动借钱给银行;正回购则是央行把钱从银行那里抽走。

知道逆回购后SLO就很好解释了,简单说就是超短期的逆回购。对于SLO,央行如此介绍:以7天期以内短期回购为主,遇节假日可适当延长操作期限,采用市场化利率招标方式开展操作。

人民银行根据货币调控需要,综合考虑银行体系流动性供求状况、货币市场利率水平等多种因素,灵活决定该工具的操作时机、操作规模及期限品种等。该工具原则上在公开市场常规操作的间歇期使用。
了解好以上工具的作用和特点,在之后”央妈“每一次的动作中,我们就可以把握”央妈“的意图和动向,可以更好的控制我们的投资方式和资金的流向。如果我们不能对宏观经济作出准确的预期,那我们就多涨一些姿势,让我们在”风向“变换时作出最快的反应!

在我们对于央行进行分析的时候,一定要记住央行背后有很多政策目标,它今天的货币政策操作可能出于调结构的考虑,明天的操作可能出于稳增长的考虑,是一套组合拳。如果我们离远一点距离看,可能会比较清晰,但如果单纯看一个动作,就事论事,则难免产生疑惑,误解了央行的意图。当然,央行原本目的为A的政策,也可能产生目的为B的效果,这也需要我们注意,另一方面,央行的透明度也有进一步提高的空间。
作者:央行观察
关于PSL的真相,只有一个。
6月1日,媒体上出现了央行展开1.5万亿PSL操作的消息,由于1.5万亿规模甚巨,再加上操作的利率很低。因此,有关央行放水的评论铺天盖地的袭来。在如今资本市场对消息面非常敏感之际,这样的传闻不啻又一剂强心针,进一步推动了A股市场上涨。
央行真的是在大水漫灌吗?为正视听,6月2日晚,央行网站公开了有关PSL操作的细节:
2014年4月25日,为贯彻落实国务院第43次常务会议精神,中国人民银行创设抵押补充贷款(PSL)为开发性金融支持棚改提供长期稳定、成本适当的资金来源。根据棚改贷款进度,中国人民银行2014年提供PSL资金3831亿元,2015年前5个月提供PSL资金2628亿元。截至2015年5月末,PSL余额为6459亿元。为适时发挥价格杠杆的作用,以及适应存贷款基准利率的调整,中国人民银行分别于2014年9月、11月,2015年3月、5月经四次将PSL利率从4.50%下调至目前的3.10%,以引导国家开发银行降低棚改贷款利率,加大对棚户区改造的支持力度,促进降低社会融资成本。中国人民银行通过PSL为国家开发银行棚改贷款提供长期稳定、成本适当的资金来源,对支持棚户区改造发挥了积极作用。
这则说明包含信息点较多,我们主要从三个维度分析:
1)额度:央行表明,2014年提供PSL资金3831亿元,2015年前5个月提供PSL资金2628亿元。将两者相加得出,截至2015年5月末,PSL余额为6459亿元。 
6459亿元的额度与1.5万亿额度的传闻相差太远,而媒体也不可能完全空穴来风,那这么大的差距是怎么产生的?这里,我只是试图提出一种可能的分析:事实上,去年媒体对于央行向国开行提供PSL操作就有详细的报道,当时就说额度是1万亿元,这种报道应该是确实的,但由于去年房地产形势不好,国开行没有放出去那么多贷款,在PSL到期后又还了央行一部分,这可能是导致央行公布出来的2014年PSL资金较少(3831亿元)的一个原因。而媒体将1万亿与今年的额度相加,得出的金额接近于1.5万亿。
2)利率:PSL利率分四次从4.5%下调至3.1%,这与这段时间内央行降息行为是一致的,可以认为是对于利率下行的顺应,并不具备所谓扭曲操作引导中长期利率下行的效果。在国务院的工作指导下,央行需要为开发性金融支持棚改提供长期稳定、成本适当的资金来源。
3)意图:相比于流动性的调节,央行的PSL对于结构调整的意义更为重大,首先PSL只投放给了国开行,而且央行说的很清楚,抵押补充贷款的主要功能是支持国民经济重点领域、薄弱环节和社会事业发展而对金融机构提供的期限较长的大额融资。
因此,在我们对于央行进行分析的时候,一定要记住央行背后有很多政策目标,它今天的货币政策操作可能出于调结构的考虑,明天的操作可能出于稳增长的考虑,是一套组合拳。如果我们离远一点距离看,可能会比较清晰,但如果单纯看一个动作,就事论事,则难免发出为何忽左忽右的疑惑,也会对央行的政策意图产生误解。当然,央行原本目的为A的政策,也可能产生目的为B的效果,这也需要我们注意。另一方面,央行的透明度也有进一步提高的空间。

Saturday, October 22, 2016

C++ Learning


C和 C++的分別

http://blog.xuite.net/edison901/documents/3753230-C+%E5%92%8C+C%2B%2B+%E7%9A%84%E5%B7%AE%E5%88%A5+--+%E4%B8%80%E4%BA%9B%E6%B7%BA%E8%A6%8B

程式設計的思維模式:
1. procedural-based paradigm
2. object-based paradigm
3. object-oriented paradigm
4. generic paradigm


C++入門指南
http://pydoing.blogspot.hk/2014/06/cpp-guide.html

中英文術語對照
文字編輯器text editor
整合開發環境Integrated Development Environment, IDE
關鍵字keyword
保留字reserved word
基本內建型態primitive built-in type
整數integer
宣告declare
參數列parameter list
回傳值return value
字串字面常數string literal
註解comment
標準程式庫standard library
前置處理器preprocessor
標頭檔header file
識別字identifier
變數variable
函數function
參數parameter
字面常數literal
運算子operator
類別class
物件object
輸出運算子output operator
命名空間name space
作用域運算子scope operator
建構子constructor
陳述statement

基本內建型態與物件


C++ 中的基本內建型態 (primitive built-in type) 屬於算術型態 (arithmetic type) ,分成四大類


基本資料型態共有九種,如下表:

型態類型關鍵字範圍
布林booltruefalse
字元char1 位元組
寬字元wchar_t2 位元組
整數short2 位元組
整數int4 位元組
整數long4 位元組
浮點數float4 位元組
浮點數double8 位元組
浮點數long double12 or 16 位元組

Sunday, October 16, 2016

學習Android 與RFID

前言


話說最近「腦細」話要用RFID技術於現有的公司運作中,於是「腦細」就英明地在香港某公司買了一個RFID printer, 又買了RFID tag還買了RFID reader & writer。
然而「腦細」由於「腦細」,他花了萬多元買的RFID reader & writer是一支OEM原型機,只內附一個行Android 4.4.4的系統。儀器內的Apps只是一個demo version ,只能read tags, 不能save成檔案,更惶說要把儲存了所讀取了的tag data 檔案導出成檔案。

「腦細」見事態不對,只放下一句 : 「事到如今,點都要整到的了。」就把屎送到我面前.....

面對著一督屎,我就係一督屎,命比蟻便宜。
雖然我用的是HTC手機,但我對Android可說是一無所知。既然有屎要食,也只好惡補一下Android,看看是否能把一件買回來的廢物變回有用的工具。

注意,我不是Programmer,我只是一個讀香港非三大BBA出身的一般文職office 人員。
不過一直以來都對學習寫一個語言程式很感興趣。或許這次是上帝給我學習的一個Trigger point。

1.)  首先要基本認識一下Android。


作為一個普通,電腦用家,最基本就是上網看看維基天書。維基基本是所有武功的入門途徑吧。

基本介紹:

Android(讀音:英:['ændrɔɪd],美:[ˈænˌdrɔɪd]),中文俗稱安卓,是一個基於Linux核心的開放行動作業系統,由Google成立的Open Handset Alliance(OHA,開放手機聯盟)持續領導與開發,主要設計用於觸控螢幕行動裝置如智慧型手機和平板電腦。

顯示布局
Android作業系統支援更大的解像度,VGA,2D顯示,3D顯示都給予OpenGL ES 3.0標準規格(4.3版本開始支援OpenGL ES 3.0),並且支援傳統的智慧型手機。

資料存儲
Android作業系統內置SQLite小型關聯式資料庫管理系統來負責存儲資料。

網路
Android作業系統支援所有的網路制式,包括GSM/EDGE、IDEN、CDMA、TD-SCDMA 、EV-DO、UMTS、Bluetooth、Wi-Fi、LTE、NFC和WiMAX。

資訊
作為原設計給智慧型手機使用的作業系統,Android作業系統原生支援簡訊和郵件,並且支援所有的雲端資訊和伺服器資訊。

語言
Android作業系統支援多語言。

瀏覽器
Android作業系統中內建的網頁瀏覽器基於WebKit核心,並且採用了Chrome V8引擎。在Android 4.0內置的瀏覽器測試中,HTML5和Acid3故障處理中均獲得了滿分,並且於2.2版至4.0版之前能原生支援Flash,4.0版本後去除對Flash的支援。

支援Java
雖然Android作業系統中的應用程式大部分都是由Java編寫的,但是Android卻是以轉換為Dalvik executables的檔案在Dalvik虛擬機上執行的。由於Android中並不自帶Java虛擬機,因此無法直接執行Java程式。不過Android平台上提供了多個Java虛擬機供用戶下載使用,安裝了Java虛擬機的Android系統可以執行Java_ME的程式。5.0版(Lolipop)開始以Android Runtime(ART)取代Dalvik虛擬機。

媒體支援
Android作業系統本身支援以下格式的音訊/視訊/圖片媒體:WebM、H.263, H.264(in 3GP or MP4 container)、MPEG-4 SP、AMR, AMR-WB(in 3GP container)、AAC, HE-AAC(in MP4 or 3GP container)、MP3、MIDI、Ogg Vorbis、FLAC、WAV、JPEG、PNG、GIF、BMP。如果用戶需要播放更多格式的媒體,可以安裝其他第三方應用程式。

流媒體支援
Android作業系統支援RTP/RTSP(3GPP PSS, ISMA)的流媒體以及(HTML5 <video>)的流媒體,同時還支援Adobe的Flash,在安裝了RealPlayer之後,還支援蘋果公司的流媒體。

硬體支援
Android作業系統支援識別並且使用視頻/相片攝像頭,多點電容/電阻觸控螢幕,GPS,加速計,陀螺儀,氣壓計,磁力儀(高斯計),鍵盤,滑鼠,USB Disk,專用的遊戲控制器,體感控制器,遊戲手把,藍牙裝置,無線裝置,感應和壓力感測器,溫度計,加速2D位位塊傳輸(硬體方向,縮放,像素格式轉換)和3D圖形加速。

多點觸控
Android支援原生的多點觸控,在最初的HTC Hero智慧型手機上即有這個功能。該功能是內核級別(為了避免對蘋果公司的觸控螢幕技術造成侵權)。

藍牙
Android支援A2DP,AVRCP,發送檔案(OPP),存取電話簿(PBAP),語音撥號和方送智慧型手機之間的聯繫。同時支援鍵盤,滑鼠和搖桿(HID)。

多工處理
Android作業系統支援原生的多工處理。

語音功能
除了支援普通的電話通話之外,Android作業系統從最初的版本開始就支援使用語音操作來使用Google進行網頁搜尋等功能。而從Android 2.2開始,語音功能還可以用來輸入文字、語音導航等功能。

無線共享功能
Android作業系統支援用戶使用本機充當「無線路由器」,並且將本機的網路共享給其他智慧型手機,其他機器只需要通過WiFi尋找到共享的無線熱點,就可以上網。而在Android 2.2之前的作業系統則需要通過第三方應用或者其他定製版系統來實現這個功能。

截圖功能
從Android 4.0開始,Android作業系統便支援截圖功能,該功能允許用戶直接抓取智慧型手機螢幕上的任何畫面,用戶還可以通過編輯功能對截圖進行處理,還可以通過藍牙/E-mail/微博/共享等方式發送給其他用戶或者上傳到網路上,也可以拷貝到電腦中。

https://zh.wikipedia.org/wiki/Android


2.) 接著的問題是,我面對著甚麼問題? 


- 問題一: 我的Android Device 內的Apps 無法滿足到公司需要。公司需要的,就是一個能Read Tag Write Tag 又能把Read了tag的內容傳化為一個excel檔案,而且excel檔案要傳到電腦上以便再管理庫存。
- 問題二 : Android Device 不能被我的電腦讀到。簡單黎講就係無Driver。

面對這兩個問題,首先就要了解一下Androd Device 如何與一個windows 系統溝通的。要知道兩者如何溝通,就先要了解Android 的程式架構。

程式開發


在早期的Android應用程式開發中,通常通過在Android SDK(Android軟體開發包)中使用Java作為編程語言來開發應用程式。開發者亦可以通過在Android NDK(Android Native開發包)中使用C語言或者C++語言來作為編程語言開發應用程式。同時Google還推出了適合初學者編程使用的Simple語言,該語言類似微軟公司的Visual Basic語言。此外,Google還推出了Google App Inventor開發工具,該開發工具可以快速地構建應用程式,方便新手開發者。
也要了解一下Kernel 的角色作用。

開發所需軟體

1. JAVA開發工具(Java Development kit - JDK)
2. Eclipse的JAVA開發環境(Eclipse IDE for Java Developers)
3. Android 開發工具(stand-alone Android SDK)


Where to start

Set up a build environment – including installing the right development tools, the Java Development Kit, and getting all the paths and directories right.
Grab the source – this is done using the “Repo” tool and git.
Obtain proprietary binaries – some of the drivers are only released in binary form.
Choose a target – using the “lunch” tool.
Start the build – using “make” and Jack.
Flash the build onto your device – using adb and fastboot.


看了一大堆佢唔識我我又唔識佢的Android 開發資料,本初哥的簡單歸納以下。
- Android 就是以Linux為基礎開發出來的一個作業系統。
- 要識Android,首先要識一些基本的電腦概念,例如Kernel 。也要認識一些語言程式,例如Java。
- 要進一步認識這些程式,就要嚐試。然而目前部Device就連同我部行Windows的電腦溝通也有問題。首先要為Windows 搵一個Driver來正確讀取部Android 機的內容。

部Device model 叫P6001U ,大陸野....唔係一般智能電話,基本上上網搵唔到Driver。
後來搵搵下,發現世界上有人都預到同樣大陸雜嘜牌子Android  Device 無法USB 連上電腦的問題,於是就找到一個ADB Drive Installer來。
而且,還發

Android 在4.2 之後 , USB除錯是被隱藏起來的開啟的方式如下打開USB除錯的方法:
1設置
2關於平板電腦
3版本號(連續猛點)
4右上方會出現開關
5打開即可看到選項
6打開ok!


【技術文章】完全認知 Android 4.4 中 ART 與 Dalvik 會有多大分別?
http://qooah.com/2013/12/02/%E3%80%90%E6%8A%80%E8%A1%93%E6%96%87%E7%AB%A0%E3%80%91%E5%AE%8C%E5%85%A8%E8%AA%8D%E7%9F%A5-android-4-4-%E4%B8%AD-art-%E8%88%87-dalvik-%E6%9C%83%E6%9C%89%E5%A4%9A%E5%A4%A7%E5%88%86%E5%88%A5/


在看了一系列的文章後,忽然發現了原來部Android 機沒有啟動USB錯誤偵錯,只要啟動錯誤偵錯,就可以把Android連到電腦成為一個可存放修改檔案的裝置了。如此問題二便得以解決。


回歸問題一

既然問題二已解決,便回歸到我們最源始的問題,就是要造一個能夠Ready, Write, export file的RFID apps。

要解決這個問題,首先:

1.) 要認識apps 點寫
2.) 要對RFID有基本認識。

寫Apps要從基礎學起。
https://code.google.com/archive/p/androidbmi/wikis/AndroidUI.wiki


同步又 學下RFID



Types of RFID:

Gen 2 RFID tags are comprised of an antenna and a chip (more accurately called an integrated circuit, or IC). The ICs for Gen 2 tags contain four types of memory:

Reserved memory
EPC memory
TID memory
User memory

how much memory is on each tag’s IC?

Reserved Memory:

This memory bank stores the kill password and the access password (each are 32 bits). The kill password permanently disables the tag (very rarely used), and the access password is set to lock and unlock the tag’s write capabilities. This memory bank is only writable if you want to specify a certain password. Most users do not use this memory area unless their applications contain sensitive data. It cannot store information besides the two codes.

EPC Memory:

This memory bank stores the EPC code, or the Electronic Product Code. It has a minimum of 96 bits of writable memory. The EPC memory is what is typically used in most applications if they only need 96 bits of memory. There are some tags that have the capability of allocating more bits to the EPC memory from the user memory. EPC memory is your first writable memory bank.

TID Memory:

This memory is used only to store the unique tag ID number by the manufacturer when the IC is manufactured. Typically, this memory portion cannot be changed.

User Memory:

If the user needs more memory than the EPC section has available, certain ICs have extended user memory which can store more information. When it comes to user memory, there is no standard in how many bits of memory are writable on each tag. Typically, the extended memory is no more than 512 bits, but there are some high memory tags with up to 4K or 8K bytes of memory. This is the second writable memory bank for Gen 2 ICs.


學習Android - 殘體教學
https://kesenhoo.gitbooks.io/android-training-course-in-chinese/content/index.html

Android - 英文教學
https://developer.android.com/training/index.html


Friday, October 7, 2016

香港房地產信托 Real Estate Investment Trust

港交所:0405 越秀房地產投資信託基金
港交所:0435 陽光房地產投資信託基金
港交所:0625 睿富中國商業房地產投資信託基金 (已停牌,準備除牌)
港交所:0778 置富產業信託
港交所:0808 泓富產業信託
港交所:0823 領展房地產投資信託基金
港交所:1275 開元產業信託
港交所:1426 春泉產業信託
港交所:1881 富豪產業信託
港交所:2778 冠君產業信託
港交所:87001 匯賢產業信託(採用人民幣計價、發行以及派息)

Wednesday, October 5, 2016

IMF 經濟增長預測 October 2016


http://www.imf.org/external/pubs/ft/weo/2016/02/index.htm?utm_content=buffer6ab30&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer

債劵市場 比 股票市場 更敏感於政策變動所帶來的影響



To understand the financial markets, you need to understand the hierarchy of asset classes.
That hierarchy is as follows:
Globally, the stock market is about $69 trillion in size, trading about $191 billion in shares per day.
The bond markets are well north of $140 trillion, and trade about $700 billion in volume per day,
The bond market is the SMART money and reacts to major policy changes before stocks.



Reference:

http://www.zerohedge.com/news/2016-10-04/warning-bond-markets-are-signaling-something-massive-coming

Gold price affected by the Fed?

最近金價跌破$1300。


點解?




http://www.bloomberg.com/news/articles/2016-10-04/gold-heads-for-longest-retreat-in-five-weeks-on-u-s-rate-view

厘段有提及幾個Federal Reserve Bank 人物講加息。
Fed Bank of Richmond President Jeffrey Lacker urged the central bank to raise rates to head off a likely pickup in inflation that would force bigger increases later. On Monday, Fed Bank of Cleveland President Loretta Mester said she expects the case for a hike to remain “compelling” at the next review in November. 

http://www.reuters.com/article/us-usa-fed-evans-idUSKCN12503Z?il=0
 厘段講 Chicago Federal Reserve Bank President Charles Evans 話如無意外美國經濟數據持向好的話,2016年12月會加息。


金價插水好大機會就係聯儲講加息,炒低金價。

#Fed也是財演


Monday, October 3, 2016

資訊觀點 Information & Point of view

https://srsroccoreport.com/

- Focus on how energy will impact the overall economy with a focus on the precious metals and mining industry


http://www.zerohedge.com/

- A financial blog that aggregates news and presents editorial opinions from original and outside sources. The news portion of the site is written by a group of editors who collectively write under the pseudonym "Tyler Durden"

礦物資源 Mineral Source

世界天然資源分怖地圖
http://www.mapsofworld.com/thematic-maps/natural-resources-maps/


黃金 - Gold

交易所


Mining Companies:
  • Barrick and Newmont
研究及資訊相關:



銀 - Siliver


Mining Companies:

  • Pan American Silver
  • Tahoe Resources


鈀 - Palladium


鉑 - Platinum


Mining Companies:

  • Anglo American Platinum
  • Impala Platinum


銅 - Copper


鎳 - Nickel

鈾 - Uranium


釷 - Thorium


銠 - Rhodium




The current values of the top four precious metals are based on their cost of production, not their production ratio.

引: 金價將飛天?瑞士煉金廠短缺惡化 紙上黃金搖搖欲墜

MoneyDJ新聞 2016-09-07 15:53:30 記者 郭妍希 報導

金價接下來要怎麼走,得看實體黃金的供需狀況。2011年暢銷財經書《下一波全球貨幣大戰》(Currency Wars: The Making of the Next Global Crisis)作者James Rickards警告,中國、印度積極囤金,美國、英國的黃金ETF投資者跟著推波助瀾,導致實體黃金的供給愈來愈吃緊。假使有一天投資「紙上黃金」的人們發現,他們手上的合約根本無從兌換真的黃金,那麼紙黃金體制必會瓦解,金價也將一飛衝天(super-spike)。
Rickards日前在The Daily Reckoning網站撰文指出,紐約商品期貨交易所(COMEX)的黃金期貨以及黃金ETF都是所謂的紙黃金,資料顯示這些紙上合約承諾的黃金總量,大概是實體黃金的100倍(甚至更多)。只要紙上黃金的投資人要求以實體黃金結算,他們就會驚覺,世界上根本就沒有這麼多實體黃金可以流通,屆時勢必會引爆黃金爭奪戰,金價也會飆高好幾千美元,金礦類股更將狂漲十倍以上,而期貨交易所也會被迫關閉。
那麼,黃金恐慌買盤何時引爆?Rickards認為,一切都要觀察實體黃金的供需動向。各國實體黃金的進出口資料,以瑞士最為透明,而瑞士進口黃金主要是為了精煉,之後會出口到世界各地,同時瑞士既無金礦、民眾也無囤金習慣,因此相當適合用來觀察全球實體黃金的流動方向。

根據Rickards觀察,瑞士過去四個月一直是黃金的淨出口國,這代表市場需求強勁,但供給卻頗為緊縮。若瑞士的黃金持續呈現淨出口,那就代表需求過多、供給減少,金價也將跟著走強。數據並顯示,瑞士精煉過的黃金主要出口到五處,分別是中國大陸、香港、印度、英國與美國,共佔總出口量的91%。
要注意的是,香港進口的黃金一般會「再次出口」到大陸,以滿足大陸民眾、人行和主權基金對黃金的需求。另一方面,瑞士也出口102公噸的黃金到英國和美國,大多是為供應黃金ETF投資者所需。ETF對金價通常會有推波助瀾的作用,金價的波動常遭ETF誇大。
Rickards警告,他所得到的第一手消息顯示,瑞士的黃金供給量已經相當吃緊,假如短缺繼續惡化,那麼金價肯定會跳高,屆時ETF需求更將助長金價火焰,而整個紙黃金體制遲早要崩塌。
其實,在英國脫歐之前,就有消息傳出英國民眾大量搶金,市場面臨流動性與供給問題。Zero Hedge 6月22日報導,黃金業界資深人士(其中一名還是瑞士煉金大廠的高層)透露,銀行間或機構黃金交易市場人士已開始「驚慌失措」,黃金市場面臨流動性與供給問題,情勢之緊繃連美國911恐攻、雷曼兄弟倒閉以及歐元區金融危機的高峰期間都比不上。
煉金廠與鑄金廠都已被告知,黃金交易銀行也許會「直接暫停實體黃金交易」,包括Intl FC Stone在內的大型流動性提供商都已拉高保證金。也就是說,機構投資者的高額黃金買單成本比中小型訂單還貴,進而打擊大筆買進實體黃金的需求。(相關新聞見此)
雖然英國脫歐之後金價漲勢稍歇,但民間投資人熱度不減,8月買超近半噸黃金,加碼量創2012年年底以來的新高紀錄!
倫敦24小時線上黃金交易網站《BullionVault》9月6日報導,旗下客戶8月份的黃金淨買量共計多達470公斤,整體客戶儲金量也跟著拉升至35.7公噸、創史上高。有趣的是,客戶幾乎都把黃金儲存在蘇黎世,並未選擇BullionVault位於倫敦、紐約、新加坡與多倫多的金庫。

原文:

http://www.moneydj.com/KMDJ/News/NewsViewer.aspx?a=89029001-5e54-4589-a444-06916f886541


延伸:

實體黃金有詭!美今年來對瑞士的進口較去年暴增18倍 實體黃金有詭!美今年來對瑞士的進口較去年暴增18倍

引: U.S. Imports Record Amount Of Gold From Switzerland In July

U.S. Imports Record Amount Of Gold From Switzerland In July

Filed in Precious Metals by  on September 23, 2016

It seems as if the tide has changed as the U.S. imported a record amount of gold from Switzerland in July.  Normally, the flow of gold from the United States has been heading toward Switzerland.  For example, when the U.S. exported a record 691 metric tons (mt) of gold in 2013, Switzerland received 284 mt, which accounted for 41% of the total.  Compare that to the paltry 3 metric tons of gold imported from Switzerland that very same year.
However, something has changed in the market dynamics as the U.S. imported a record 23.8 mt of gold from Switzerland in July:
us-gold-imports-from-swtizerland-jul-2016-monthly
As I stated in my previous article, WHAT’S GOING ON?? Record Swiss Gold Flow Into The United States: the Swiss exported 20.7 mt of gold in May 2016, up considerably from its monthly average 0.4 mt.  Even though gold imports from Switzerland declined the next month to only 13.1 mt in June, they were still much higher than their monthly average going back until Jan. 2015.
But, as we can see… U.S. gold imports from Switzerland jumped 82% in July to 23.8 mt compared to June.  There has been speculation in the precious metals community as to why the Swiss are now exported gold to the United States.  While many theories seem plausible, the one that makes the most sense is that investors in Europe who have their gold stored in Switzerland are moving it to the United States to protect it from the implications of negative interest rates.
Furthermore, after the Brexit vote for the U.K. to leave the European Union (In June), it has also put a lot of stress on investors holding assets within the E.U. countries.  For whatever reason, gold bullion is now flowing into the United States from Switzerland in record volume for the first time in many years.
This next chart shows the annual imports of gold from Switzerland going back until 2000:
us-gold-imports-from-switzerland-jul-2016-annuallynew
As we can see, Switzerland’s gold exports to the U.S. are already 60.7 mt in 2016, up more than 18 times the volume in 2015.  Again, for whatever reason, Swiss gold is heading into the United States in record volume.
In addition, this is the first year the U.S. has imported more gold than it has exported in several years:
us-total-gold-imports-vs-exports-2012-2106
In 2012, the United States exported a record 693 mt of gold, while imports were only 332 mt.  Even though the volume of U.S. gold exports declined in 2014 and 2015, they were still much higher than imports (62% & 86% respectively).
However, this has changed in the first seven months of 2016, as the U.S. has imported 249 mt of gold versus exports of only 190 mt.  The majority of the increase of U.S. gold imports came from Switzerland.  Of the 249 mt of U.S. gold imports Jan-July 2016, Switzerland accounted for 60.7 mt, compared to only 3 mt in 2015.
With the upcoming Chinese Yuan into the IMF SDR (Special Drawing Rights) on Oct 1st, the situation for the U.S. Dollar going forward will come under increased stress as global trade moves more into Chinese Yuan currency.  This will negatively impact the U.S. Treasury holdings by foreigners as they move into owning more Chinese Yuan for trade.
The days of the U.S. Dollar Reserve currency status is coming to an end.  It is no surprise that Russia and China continue to add a great deal of gold to their official holdings.
Lastly, I will be publishing a very important article on the precious metals next week.  It will provide analysis on the top four precious metals (Gold, Platinum, Palladium and Silver) that most investors have not seen before.  It will be out either Monday or Tuesday next week.


Source:
https://srsroccoreport.com/u-s-imports-record-amount-of-gold-from-switzerland-in-july/

引 : 實體黃金有詭!美今年來對瑞士的進口較去年暴增18倍

實體黃金有詭!美今年來對瑞士的進口較去年暴增18倍


MoneyDJ新聞 2016-09-26 09:28:18 記者 郭妍希 報導

追蹤黃金報價的期貨、ETF滿天飛,但這些合約承諾的黃金、卻是現實世界總產量的100倍(甚至更多),先前也傳出有期貨、ETF投資人要求以實體黃金結算,卻換不到黃金的消息。以此來看,過去數年向來以出口黃金為主的美國,7月跟瑞士進口的實體黃金卻突然暴增8成、單月進口量登史上高,年初迄今的進口量更是去年一整年的18倍,這樣的消息相當值得關注。
SRSrocco Report 23日報導,統計顯示,美國7月從瑞士進口的黃金總量飆升至23.8噸、較6月的13.1噸高出82%之多,而5月的進口量也多達20.7噸,這三個月的進口量都遠多於2015年1月以來的平均月進口量(0.4噸)。(圖表見此)
不僅如此,美國今(2016)年迄今從瑞士進口的黃金總量已經高達60.7噸,是去年一整年(3.3公噸)的18倍之多!

如此奇怪的現象也引發諸多揣測。有人認為,把黃金儲藏在瑞士的歐洲投資人,為了避免負利率的衝擊,因此決定把黃金移往美國。另外則有人猜測,英國6月舉行公投決定脫歐後,在歐盟國家持有資產的投資人面臨了龐大壓力。無論是哪種原因,實體黃金的流向的確已開始逆轉,美國從瑞士進口的黃金總量大幅跳增,是多年以來首見。
這是相當不尋常的現象。正常來講,實體黃金通常都是從美國流向瑞士,舉例來說,美國2013年就出口了691噸的黃金、創歷史新高,瑞士當年則收到284噸。
為何要觀察瑞士相對於美國的黃金進出口數據?2011年暢銷財經書《下一波全球貨幣大戰》(Currency Wars: The Making of the Next Global Crisis)作者James Rickards 9月初在The Daily Reckoning網站撰文解釋,各國實體黃金的進出口資料,以瑞士最為透明,而瑞士進口黃金主要是為了精煉,之後會出口到世界各地,同時瑞士既無金礦、民眾也無囤金習慣,因此相當適合用來觀察全球實體黃金的流動方向。
根據Rickards當時的說法,紐約商品期貨交易所(COMEX)的黃金期貨以及黃金ETF都是所謂的紙黃金,資料顯示這些紙上合約承諾的黃金總量,大概是實體黃金的100倍(甚至更多)。只要紙上黃金的投資人要求以實體黃金結算,他們就會驚覺,世界上根本就沒有這麼多實體黃金可以流通,屆時勢必會引爆黃金爭奪戰,金價也會飆高好幾千美元,金礦類股更將狂漲十倍以上,而期貨交易所也會被迫關閉。
黃金恐慌買盤何時引爆?Rickards認為,一切都要觀察實體黃金的供需動向。根據Rickards觀察,瑞士過去四個月一直是黃金的淨出口國,這代表市場需求強勁,但供給卻頗為緊縮。若瑞士的黃金持續呈現淨出口,那就代表需求過多、供給減少,金價也將跟著走強。數據並顯示,瑞士精煉過的黃金主要出口到五處,分別是中國大陸、香港、印度、英國與美國,共佔總出口量的91%。
Rickards警告,他所得到的第一手消息顯示,瑞士的黃金供給量已經相當吃緊,假如短缺繼續惡化,那麼金價肯定會跳高,屆時ETF需求更將助長金價火焰,而整個紙黃金體制遲早要崩塌。(詳細新聞見此)


原文:
http://www.moneydj.com/funddj/ya/yp050000.djhtm?a=4B3B3CEF-CD9C-427F-83C9-1D82581EBC6F