Monday, December 28, 2009

城巴118 有底地台巴士行走

城巴118 有底地台巴士行走

世界大同又近了

Sunday, December 27, 2009

MagicDisc Virtual CD/DVD-ROM Overview

本以為MagicDisc 這個免費軟體可以取代Daemon tools 3.47 這個舊版Virtual CD/DVD-ROM, 點知原來MagicDisc 唔支持VMware 中的CD Boot 機功能!

即在MagicDisc 放進CD Image, 然後在VMware 中選擇以這個CD Rom Boot 機, 結果卻是不能啟動Virtual Machine...=.=, 從前Daemon tools 3.47 for WinXP 是可以的呀!

MagicDisc2.7(build 106)   2/24/2009
http://www.magiciso.com/tutorials/miso-magicdisc-overview.htm

Daemon Tools
http://www.daemon-tools.cc/eng/home

Saturday, December 26, 2009

Wii Remote not being recognized by the Wii Console - Solution

Wii Remote not being recognized by the Wii Console (lights on the Wii Remote flash when you press a button, but then go out) - Most Common:
Getting the Wii console to recognize (or "sync" with) a Wii Remote, especially one that did not come in the box with your Wii console, may require doing a few additional steps before it can be synced. Additionally, a Wii Remote that was working, but is no longer being recognized (or has "lost its sync") may need to be re-synced. Please use the troubleshooting steps listed below, which our experience has shown can solve many Wii Remote issues.

    Try these steps!
  1. Turn the Wii console power OFF by pressing the POWER Button on the front of the console. Unplug the power cord from the wall outlet for a few seconds. After a few seconds have elapsed, plug the cord back into the wall outlet.
  2. Turn the power of the Wii console ON. When you see the Health and Safety screen, open the small flap on the front of the Wii console to find a red button labeled "SYNC." Press and hold the SYNC Button down for 15 seconds. This will clear all the syncs on the Wii, allowing you to get a clean start to begin the process described below.
  3. After holding the SYNC Button on the Wii console down for at least 15 seconds, you can now "re-sync" your Wii Remotes:


    1. With the first Wii Remote you wish to sync, remove the battery cover on the back of the Wii Remote to find a small red button just below the batteries.
    2. Press and release the small red button just below the batteries on the Wii Remote; the blue lights on the front of the Wii Remote will blink.
    3. Quickly press and release the red SYNC button on the inside of the white flap on the front of the Wii console (picture).
    4. When the Player LED blinking stops and stays lit, the syncing is complete. The LED that is illuminated indicates the player number (1 through 4).
    5. This sync procedure (steps "a" through "d" above) must be followed for each additional Wii Remote added to the system.




 From:
http://www.nintendo.com/consumer/systems/wii/en_na/ts/wiiremote.jsp

Tuesday, December 22, 2009

Visual Basic/ Visual Basic .Net / C # / J # 上生成圖表 - JFreeChart.Net

Visual Basic/ Visual Basic .Net / C # / J # 上生成圖表 - JFreeChart.Net

Java 上有大名鼎鼎的JFreeChart (http://www.jfree.org/jfreechart/) 用作生成不同的統計圖表, 如PieChart, Histogram 等.

而.Net 平台上亦同樣有JFreeChart.Net for Visual Basic/ Visual Basic .Net / C # /
J # (http://www.ujihara.jp/jbyjsharp/jfreechart/), 可是, 其功能是較原有Java 版少的, 但是, .Net 免費的東西也算可以吧.

要在VB/VB.Net 上運行JFreeChart.Net, 需要以下的DLL:

Apache.Xml.Commons.dll
JCommon.dll
JFreeChart.dll
JSharpLib.dll
vjslib.dll

首4個的DLL 可以在JFreeChart.Net的網頁上下載, 最後一個可以在VS 2008 的Add Reference 內找到.
   

Imports org.jfree.data.general

Imports org.jfree.chart

Imports org.jfree.chart.labels

Imports org.jfree.chart.title

Imports System.IO   
Dim data As DefaultPieDataset = New DefaultPieDataset
        For i As Integer = 0 To des.Count - 1
            data.setValue(des.Item(i), bit.Item(i))
        Next
        Dim jChart As JFreeChart = ChartFactory.createPieChart3D("Bits' usage breakdown by field name", data, True, False, False)
        Dim pieplot3d As plot.PiePlot3D = CType(jChart.getPlot(), plot.PiePlot3D)
        Dim bgColor As Color = Color.FromArgb(239, 239, 239)
        Dim percentFormat As java.text.NumberFormat = New java.text.DecimalFormat("#0%")
        Dim noFormat As java.text.NumberFormat = New java.text.DecimalFormat("#0")
        Dim copyright As TextTitle = New TextTitle("Bits' usage breakdown by field name", New Font("SansSerif", 16, FontStyle.Bold))

        jChart.getRenderingHints().put(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF)
        pieplot3d.setStartAngle(150D)
        pieplot3d.setDirection(org.jfree.util.Rotation.CLOCKWISE)
        pieplot3d.setLabelFont(New Font("Microsoft Sans Serif", 10, FontStyle.Regular))
        pieplot3d.setLabelGap(0.02)
        pieplot3d.setCircular(True)
        pieplot3d.setLegendLabelGenerator(New StandardPieSectionLabelGenerator("{0}"))
        pieplot3d.setForegroundAlpha(0.5F)
        pieplot3d.setNoDataMessage("No data to display")
        pieplot3d.setLabelGenerator(New StandardPieSectionLabelGenerator("{0}: {1} ({2})", noFormat, percentFormat))
        jChart.setBackgroundPaint(bgColor)
        ChartUtilities.saveChartAsPNG(New FileInfo(Application.StartupPath + "\temp\pieChart.png"), jChart, 559, 543)

Tuesday, December 08, 2009

陶言無忌 平機會的荒謬

甘乃威事件繼續上演續集,便是女事主突然發表一封長達六頁的公開信,公開信裏面雖然她聲稱希望事件告一段落,但是似乎她不想告一段落。因為這六頁紙發表之 後,如果你真的想告一段落,便應該在信中繼續呼籲,連同呼籲這個立法會不要再聆訊甘乃威。既然你又要它繼續聆訊,那麼又發表六頁紙、又說要告一段落,這是 否前後矛盾呢?此其一。

第二,然後爭吵至香港平機會那裏,好了,平機會出來干預了,平機會指:如果一個男人向一個女性求愛不遂,都可以構 成性騷擾,理由便是求愛最終是要達到性行為的目的。如果根據平機會這個定義,以後糟了,全香港的男性是不夠膽去追求女孩子,異性或者同性,因為你一開口追 求,便有50%的機會至少是構成性騷擾,因為你向一個女子表達好感,這個好感也好,示愛也好,我很喜歡你、我希望將來和你結婚、乃至我今晚想與你拍拖,我 們可不可以做一對密友?如果遭到拒絕,你剛才的對白即時會構成性騷擾的刑事罪行,那麼你說香港還有男人敢追求異性?

這些平機會在這個時候 知少少、扮代表,這個平機會機構本身便是抄襲模仿自美國、加拿大西方的一些組織,可惜香港「坐陣」平機會的人是讀書不夠,或者叫做「A little knowledge is a dangerous thing」。所以這個甘乃威事件的續集,隨著這一封六頁的公開信,引致最惡劣、最抗大的影響便是,全香港700萬人,所有的男性你以後聽著,平機會告訴 你,誰夠膽追女孩子,如果遭到拒絕,即時你是一個性騷擾的罪犯。那麼香港以後便進入塔利班時代了,這樣的平機會還要靠香港市民的公帑、交稅養這班「大泡 和」,你說香港人前世真的做了甚麼孽,今世要忍受這些機構、這樣「憨居」兼荒謬的統治呢?

陶傑
(本聲音專欄只反映主持人及個別參與人士的個人意見。)

男: 可唔可以做我女朋友呀?
女: 安已不, 警已報
男: T_T

平機會:男人求愛既最終目的, 是要達到性行為

Wednesday, December 02, 2009

VB.Net Application form, control sizes are different in different PC

VB.Net Application form, control sizes are different in different PC


http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4229137f-d4e0-469e-8826-5e8117b3ecb7

Solve:
AutoScaleMode = None in MainForm

The AutoScaleMode property specifies the current automatic scaling mode of this control. Scaling by Font is useful if you want to have a control or form stretch or shrink according to the size of the fonts in the operating system, and should be used when the absolute size of the control or form does not matter. Scaling by DPI is useful when you want to size a control or form relative to the screen. For example, you may want to use dots per inch (DPI) scaling on a control displaying a chart or other graphic so that it always occupies a certain percentage of the screen.