陳錫身

我中文不好, 但也想寫中文網誌 . . 因為我英文更不濟

2010年2月6日星期六

香港的基建發展方向 Hong Kong infrastrucutre development planning

現時政府的交通的基建發展方向, 因就業機會過份集中於市區而著眼於強化潮水作業的交通網絡發展, 市民早晚返工放工都要迫巴士迫地鐵穿梭商業區同新市鎮 , 未能發揮鐵路及道路網雙向並用的最大功效。


假若政府能從城市規劃,提供稅務優惠、綜合大樓等鼓勵新興產業到為人口增長較快的新市鎮設立辦工室
為社區提供足夠的就業的機會, 減少市民上班的距離, 既經濟和又環保,節省下來的時間,讓市民可以更多空間和家人朋友相處,更可大大提昇上班一族的生活質素及工作效率。


固此, 我十分讚同謝偉俊議員嘅觀點, 不應過份集中發展已十分密集嘅區域

21 Jan 2010 星島日報(港聞) :立會大比數否決停建添馬艦政府總部議案
議案由謝偉俊議員提出,認為停建添馬艦政府總部,有助紓緩巿中心地區交通擠塞的問題,又建議政府部門應分設在不同地區,帶動偏遠地區經濟,又要求政府提供稅務優惠,鼓勵大機構在偏遠地區設立分部。

2010年1月28日星期四

iPad, yet a new larger iPod Touch

 

image

In comparing with iPod, the screen is 3 times bigger, only double up the Price , even with longer battery life (1) )

 

ref:

  1. iPad Spec: Up to 10 hours of surfing the web on Wi-Fi, watching video, or listening to music
  2. iPod Touch Spec: Video playback time: Up to 6 hours when fully charged

2010年1月21日星期四

香港的社區發展方向

現時政府的交通的基建發展方向, 大部份停留於流水作業的模式, 早晚返工放工都要迫巴士迫地鐵 ,未能發揮鐵路及道路網雙向並用的最大功效。


假若政府能從城市規劃,提供稅務優惠、綜合大樓等鼓勵新興產業到為人口增長較快的新市鎮設立辦工室
為社區提供足夠的就業的機會, 縮短市民上班的距離, 既經濟和又環保,節省下來的時間,讓市民可以更多空間和家人朋友相處,更可大大提昇上班一族的生活質素及工作效率。


固此, 我十分讚同謝偉俊議員嘅觀點, 不應過份集中發展已十分密集嘅區域

21 Jan 2010 星島日報(港聞) :立會大比數否決停建添馬艦政府總部議案
議案由謝偉俊議員提出,認為停建添馬艦政府總部,有助紓緩巿中心地區交通擠塞的問題,又建議政府部門應分設在不同地區,帶動偏遠地區經濟,又要求政府提供稅務優惠,鼓勵大機構在偏遠地區設立分部。

2010年1月9日星期六

Caution in drawing large amount of Graphics WPF

For a recently project which draw large amount of object in the WPF application, it's redraw performance after mousemove event (or any animation across the background drawing) is not smooth enough. So I conduct a research and found that WPF use Retained-mode graphics (with modules communicate with Direct X), unlike C++ use GDI+ directly.

Unless you use image (bitmap) class to render the graphical elements , all graphics in Path /in StreamGeometry/PathFigures or DrawingVisual would be repainted(internal process of WPF RetainedMode Grahpics) in a Vector format. Therefore, the dirty region redraw put burdern to CPU and result in a leggy UI experience.

So , if you need to draw relatively large amount of object in WPF (Vector format).
please have a careful consideration before and you can convert your vector geometry into Raster format by using RenderTargetBitmap. (link3 :putting DrawingVisual into RenderTargetBitmap )



Quoting 1( from MSDN Windows Presentation Foundation Graphics Rendering Overview)

Drawing Content in Visual Objects
A Visual object stores its render data as a vector graphics instruction list. Each item in the instruction list represents a low-level set of graphics data and associated resources in a serialized format. There are four different types of render data that can contain drawing content... skipped

Retained Mode Graphics
One of the keys to understanding the role of the Visual object is to understand the difference between immediate mode and retained mode graphics systems. A standard Win32 application based on GDI or GDI+ uses an immediate mode graphics system. This means that the application is responsible for repainting the portion of the client area that is invalidated, due to an action such as a window being resized, or an object changing its visual appearance.
Diagram of Win32 rendering sequence




In contrast, WPF
uses a retained mode system. This means application objects that have a visual
appearance define a set of serialized drawing data. Once the drawing data is
defined, the system is responsible thereafter for responding to all repaint
requests for rendering the application objects. Even at run time, you can modify
or create application objects, and still rely on the system for responding to
paint requests. The power in a retained mode graphics system is that drawing
information is always persisted in a serialized state by the application, but
rendering responsibility left to the system. The following diagram shows how the
application relies on WPF for responding to paint requests.
Diagram of WPF rendering sequence



Intelligent Redrawing
One of the biggest benefits
in using retained mode graphics is that WPF can efficiently optimize what needs
to be redrawn in the application. Even if you have a complex scene with varying
levels of opacity, you generally do not need to write special-purpose code to
optimize redrawing. Compare this with Win32 programming in which you can spend a great deal of effort in optimizing your application by minimizing the amount of
redrawing in the update region. See Redrawing in the
Update Region
for an example of the type of complexity involved in
optimizing redrawing in Win32 applications.


Vector Graphics
WPF uses vector graphics as its rendering data format. Vector graphics—which include Scalable Vector Graphics (SVG), Windows metafiles (.wmf), and TrueType
fonts—store rendering data and transmit it as a list of instructions that
describe how to recreate an image using graphics primitives. For example,
TrueType fonts are outline fonts that describe a set of lines, curves, and
commands, rather than an array of pixels. One of the key benefits of vector
graphics is the ability to scale to any size and resolution.
Unlike vector graphics, bitmap graphics store rendering data as a pixel-by-pixel
representation of an image, pre-rendered for a specific resolution. One of the
key differences between bitmap and vector graphic formats is fidelity to the
original source image. For example, when the size of a source image is modified,
bitmap graphics systems stretch the image, whereas vector graphics systems scale
the image, preserving the image fidelity.

Quoting 2 : WPF Wonders: Getting Started with WPF (cont'd)


In Windows Forms graphics, you have two main choices for drawing something:
either redraw it during a Paint event or draw it into a bitmap and then display
the bitmap. In the first case, you need to redraw frequently, keeping track of
whatever it is that you're drawing. If parts of the drawing move over time, you
need to keep track of where they all are during every redraw.

In retained-mode graphics, you define objects that represent parts of the
drawing: lines, ellipses, text, images, and so forth. WPF automatically redraws
any of them that need redrawing when they need it.

If you need one of the objects to move, you simply move it at the appropriate
time. WPF automatically redraws the object in its new position as needed.
Alternatively, you can define a WPF animation and let WPF move the object over
time. Furthermore, because the objects draw themselves as needed, you can zoom
in on them and they will redraw themselves with high precision, not the blocky
appearance you would get from magnifying a bitmap.


Quoting 3: InformIT: WPF Control Development: The Diverse Visual Class

Images can be useful when you want to visualize a large amount of data for which
you have limited interaction. Some situations where this might come in handy are
when you are visualizing high-volume graphs or network monitoring tools that are
visualizing thousands of network nodes. In cases like this, even DrawingVisuals
become extremely expensive because each data item is a separate visual and
consumes CPU and memory resources. Using an image, and knowing that each data
point doesn't need to be interactive, you can visualize what you need without
bringing the host computer to its knees.


Since the Image class also has event handling support, we can attach handlers for mouse events that can query the pixel at the mouse's current coordinates and report information about that data
item. With a little bit of creativity and forethought, the Image class can be a
powerful tool in any developer's toolbox.


Reference Links

  1. Windows Presentation Foundation Graphics Rendering Overview & http://msdn.microsoft.com/en-us/library/dd162909(VS.85).aspx
  2. Retained-Mode Graphics in WPF Wonders: Getting Started with WPF (Page 2 cont'd) (Full article)
  3. Image Class in InformIT: WPF Control Development: The Diverse Visual Class

Forum Discussion Reference

  1. stackoverflow.com Scaling WPF content before rendering to bitmap suggested sample code for putting DrawingVisual into RenderTargetBitmap
  2. MSDN Social Forum Slow performance transforming OnMouseMove

2009年11月14日星期六

居安思危: 按揭收緊 觸發豪宅上會潮

雖然好多人講, 富豪買豪宅邊駛用按揭

但從商業角度黎講 ,如果手頭上有大量物業 或一大疊樓的大商家、大財主, 係利息咁低企嘅時候,
比起作資本性投資投的商業貸款(P+2~3%) , 用物業按揭(P-2~3%)套現的資金成本相對為低 ,極為吸引。


若果富豪間繼續用呢個途經,從以獲得大量資金去作非商業的投機活動
間接會蘊讓更多市場泡沫, 增加出現金融海嘯第二波嘅風險。

所以我絕對讚成銀行係資金氾濫的情況下, 亦要居安思危,收緊對豪宅的按揭成數。



按揭收緊 觸發豪宅上會潮
(星島)2009年11月13日 星期五 05:30
(綜合報道)
(星島日報 報道)政府最近推出的收緊樓按措施,令近三周銀行申請樓宇按揭個案大增,觸發起豪宅「上會」潮,預料涉及按揭貸款額超過六十億元。
  經絡按揭轉介首席經濟分析師劉圓圓表示,上月二十三日有關方面推出多項收緊樓按措施,包括降低二千萬元或以上物業之按揭成數,以及暫停租住物業按保申請,同時下調三個按保計畫之貸款額上限。二千萬元或以上的豪宅業主,須於政策實施後的一個月寬限期內、即本月二十三日或之前提出按揭申請。由於該批業主須提前於本月二十三日或之前申請按揭,因而觸發一股「上會潮」。
  她指,措施出台至今,二千萬元或以上物業近三周的按揭申請穩步上升,其中十月最後一周之有關申請數量更按周大升兩倍,預料涉及按揭貸款額超過六十億元。
  申請宗數一周升兩倍
  根據該公司資料統計,須要申請按揭二千萬元或以上的豪宅業主當中,約六成業主需要六成至七成按揭貸款,預期該批業主影響最大。該公司指出九月份至十一月十日期間,逾二千萬豪宅之註冊量超過五百宗,當中大部分未「上會」,預期收緊按揭成數的政策將刺激業主加快申請按揭。劉圓圓又指,預料「上會」潮後按揭規模會縮減,以反映近期樓宇成交放緩情況,但仍然超越去年同期。
  中小型物業市場方面,她表示目前按揭息率處於歷史新低,相信有能力負擔人士仍有置業意欲,但隨著豪宅市場這個火車頭冷卻下來,中小型單位交投量也會跟隨下降,但呎價仍維持在金融海嘯前的四千三百元水平。
  至於連租約單位方面,由於按揭證券公司暫停租住物業的按保申請,將租住物業最高按揭成數由原來的八成半下調至七成,投資者須預留至少三成的首期購買物業,增加了投資成本,估計連租約成交將放緩。

2009年8月2日星期日

屯門36度

image

2009年7月19日星期日

嘩... 9號

image