Adv

顯示包含「Computers and Internet」標籤的文章。顯示所有文章
顯示包含「Computers and Internet」標籤的文章。顯示所有文章

6/19/2011

慢手慢腳的我和 PPHK

依? PPHK? 上次 PPHK5 唔係已經完左好耐咩??

係,你無睇錯。我今次係寫 PPHK5,唔係6唔係Lite。

只係因為我近年寫少左野....好慢

上次寫過 PPHK4 之失敗 ,之後 PPHK 一直都咩攪作。上次聽佢地講過,我估都係因為大家都忙到 SQJ 而又未定到方向而無大動作。

係我差唔多已經忙記(係忙,我無寫錯)嘅情況下,突然有一日係 twitter 見到 PPHK5 報名消息!係第二日忙到唔記得第一時間報名嘅情況下過左差唔多成鐘都居然都報到名實在係奇蹟。都無點理到佢今次係咩主題,只知地點改左做 JCACC

從今次嘅地點,promotion,同時間,而且貼心咁介紹點去JCACC (雖然到最後我無時間睇..);我必須要大贊 PPHK 幾位義工 community 上次聽完我地一堆廢話之後真係肯認真接受大家嘅意見同確實向住依個目標前進。

當日,我係遲到嘅。記得一入場已經有 speaker 講緊馬拉松,可以跑到一半就地解決生理需要。因為遲到坐得比較後,但係聽得都OK;反而無上次嘈到投入唔到咩都聽唔到嘅情況出現。

而且贊助商正正式式咁揾到同 Internet 有關贊助商,雖然我唔會用騰訊微博,又唔會用友緣人。但唔係海港城贊助實在太好啦。

點解我無咁講?

第一位講者, 莊曉陽: 香港馬拉松的特色係咩都睇唔到,比全世界都要早起身要幸苦;因為地產霸權令香港街道唔可以被阻,所以會跑入隧道,跑上天橋;跑完都唔知跑過咩地方。

第二位講者, Eva:喜愛做手作,推動手作文化及發展手作人社群;但係香港無容身創業嘅地方,地產霸權令租金太貴;手作成本(時間)高利錢低。

NGO講者, 非牟利機構「仁人家園」:「人人都應該有個體面、安全及可負擔的居所」係宗旨,但佢地只能發走到好遠嘅地方同因貧窮或因天災的人建立家園-真係落手起屋;.........香港呢??

第三位講者, Phoebe:推動阿根廷探戈,阿根廷探戈 (Tango) 的文化在擁抱,任意的舞步由係緊密的接觸之中互相理解配合

第四位講者, Adaline:素食可以保護地球。(其實我覺得佢講英文會好D,聽佢講中文好攰)

最後一位講者, <a href="http://yatming.wordpress.com/">龐一嗚:反霸權行動者,唔多講,心照。

每一位講者,或者或少在言談之間,或多或少都發出很沉重的念:「地產霸權」其實迫得我們很慘,要走很多不必要的路。甚至龐一嗚完全是此為中心,而台下反應都係最熱烈,最多掌聲,最多支持,最大回響。

試問咁嘅 topic,咁嘅內容又點可能會得到大地產既得利益者的贊助?



完左之後?我輕輕的走了,正如我輕輕的來。無識到其他 blogger 或者新朋友....
或者我得閒要整定D咭片??

6/15/2011

Google Chrome 將推出 preredner 功能

還記得部份 browser 的 prefetch 功能嗎?  (Firefox: network.prefetch-next)

先把下一頁的 HTML 下載到 cache 而大大減低使用者再按下一頁時的等侯時間

雖然說已是已經推出很多年的功能,但大多網站都不太會支持(因為會在 access log 產生近一倍的 HTML impression 和 負載)

而 Chrome 居然在這個概念再向前多一步,不單是下載下一頁的 HTML,而且是整頁內容加上必需的運算。把整個顯示的結果先準備好。

看了一下,是用 <link rel="prerender"> 實現。看來是時候把所網站再小更新一下。

5/17/2011

Keyboard Shortcuts for Bash ( Command Shell for Ubuntu, Debian, Suse, Redhat, Linux, etc) - How-To Geek

最近都在用 bash, 是時候好好學習習慣一下 shortcut key

 

Keyboard Shortcuts for Bash ( Command Shell for Ubuntu, Debian, Suse, Redhat, Linux, etc) - How-To Geek.



































































Ctrl + AGo to the beginning of the line you are currently typing on
Ctrl + EGo to the end of the line you are currently typing on
Ctrl + LClears the Screen, similar to the clear command
Ctrl + UClears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + HSame as backspace
Ctrl + RLet’s you search through previously used commands
Ctrl + CKill whatever you are running
Ctrl + DExit the current shell
Ctrl + ZPuts whatever you are running into a suspended background process. fg restores it.
Ctrl + WDelete the word before the cursor
Ctrl + KClear the line after the cursor
Ctrl + TSwap the last two characters before the cursor
Esc + TSwap the last two words before the cursor
Alt + FMove cursor forward one word on the current line
Alt + BMove cursor backward one word on the current line
TabAuto-complete files and folder names

福特採用Google資料預測演算法,研發節能智慧汽車 - 數位時代-台灣最具影響 力的科技媒體

Asurada!??

福特採用Google資料預測演算法,研發節能智慧汽車 - 數位時代-台灣最具影響力的科技媒體.

4/26/2011

近况和 Hadoop

很久沒有寫 blog 了,不過沒差.反正原本就該沒有人會看.XD

差不多都是忙工作,和 mysql 戰鬥也在和 Hadoop 戰鬥.

不容易,卻很有挑戰性

最近 Hadoop 的名聲開始高而且使用這個 open source project 的人也越來越多

感覺上好像有很多人有在用,但試用或小玩一下的人比較多.真的大量投入 production 的人還比較少;所以發現問題時很大機會都要自己去解決而不是從其他人的錯誤中學習.看它 source code 多了,也大聲罵它的次數多了.

我必需說...它的 coding implementation 很有問題;而且我還只是說最基本的 HDFS 的部份.差不多沒有文檔,也經常更改Client-Server API protocol 的情況下,最快了了解它的運作方式我都是去直接去看它的 source code

它用它自己類 IPC/RPC 的 Proxy 連去 namedode.... stafeful ; 我不明白為何不用 stateless 而且可以加入不同版本支持的做法 (如果我自己沒看錯,  application 和 cloud 的版本必需一樣,   也就是說應該不能一個 client 連到不同 version 的 hadoop; 至少 0.20 和 0.21 不能)

用 NIO 卻沒有用上 thread-pool;簡單的一個寫入一個 file 的動作原來需要大約三條 threads,同時寫入十個文件則是三十條 threads..) 而且都是 non-pooled-thread ;也不支持 Channel 和 ByteBuffer 寫入

大部份使用的 API都是停留在 1.4 年代的,直接 extend Thread 沒有用 Executor,用 NIO 的部份現在只是為了 read/write timeout;在 Filesystem 可以找到大量 global synchronize 的 method,也奇怪也難以理解的 helper proxy 去實現 RETRY

最大的問題是....它居然真的能跑
所以大家看到有問題都不能不想也不敢去嘗試修正

 

4/09/2011

The JavaScript Comma Operator | JavaScript, JavaScript

Java Script 果然係一隻易學難精嘅 language

 

By wrapping the right hand expression in parentheses we create a group – which, effectively has the highest precedence. This ensures that the comma operator gets applied first:

via The JavaScript Comma Operator | JavaScript, JavaScript.

3/02/2011

Tweet from Tweetcaster

@jquery: RT @cowboy: jQuery snippet that simulates the DOM building: (function n(e){e.eq(0).fadeIn(99,function(){n(e.slice(1))})})($(":visible"). ... Shared via Tweetcaster

11/16/2010

Open Tab In New Process - Chrome Extension

My second chrome extension (first real useful one...)

Open Tab In New Process

This chrome extension add new options on the context menu when you right-click on a hyper-link.

You will able to open a page in a new chrome process on need.


11/01/2010

How to: Install the ADB USB(Debug mode) driver for Samsung Galaxy S on Windows 7

You'll need the USB driver for develop and test Android apps on Galaxy S with Windows platform. However the USB driver come with the Android SDK is not compatible with i9000.

The driver is provided from Samsung, but you may ask where it is?

Solution 1: Install the Samsung Kies

Yes, you should download it from the Samsung website. They does not ship stupid driver CD (which will always be outdated and make packing larger) with the phone. I've never tried, but it should install the driver for you automatically (with some stupid software you may not want to  pollute you PC).

Solution 2: Extract it from the Samsung Kies and install manually.

It is the way I did.

  1. Download the Kies from the Samsung website.

  2. Download and install 7-Zip

  3. Open the Kies_1.5.3.10093_82.exe (or newer) with 7-Zip

  4. Browse for CabFile\USB Driver\SAMSUNG_USB_Driver_for_Mobile_Phones.exe.cab, right click and press "Open Inside"

  5. Right-Click on the SAMSUNG_USB_Driver_for_Mobile_Phones.exe again and click "Open Inside"

  6. Extract the folder to a temporary folder

  7. Enable the USB debugging mode on your lovely Galaxy S (better after lagfix), you can find it from "Setting > Application > Development"

  8. Connect with USB

  9. Windows may try to locate the driver; and fail

  10. Open Device Manager and find the device

  11. Update driver, and give her the path of the temporary folder

  12. Repeat step 11 twice for Modem and ADB

  13. Done !!


Solution 3: Google it and get

You may ask, why not just Google it rathern then extract from the installation file? You can. But not everyone want to install system driver from a untrusted source. Also, the up-to-date driver makes you happier.

UPDATE: 9th July 2011
Solution 4: Get it from Samsung Developer website

Today I just found they are giving the USB driver only download from their website at http://innovator.samsungmobile.com/down/cnts/toolSDK.detail.view.do?platformId=1&cntsId=9480
You will be required to signup an account (for free) before download.

6/28/2010

Faster Chrome

早幾看了原來 IE9 Preview 已經推出了第三版,沒有下載來試,但留意到之前那可笑的 100% passed in submitted test 也更新了.也對 IE9 終於可以係 ACID 得到 83 分 感到 Microsoft 真的有在 standard 上下功夫,但可惜對他們的 demo 有點失望.因為睇到 demo 用的 API,他們好像還沒有打算停止建立 API barrier和功能上的 barrier......

無聊 search 了一下 chrome open issue 上 GPU 的部份,原來 dev/beta 已經開始有 HW Accelerated compositing 的功能,但好像要用 "--enable-accelerated-compositing" 自己打開.

我用自己的舊PC小試了一下,以Flying Images為例

在 "Default IE Logo x 36 Images" 的測試可以用 30~35 FPS 加速到 35~45 FPS.


在 "Large IE Logo x 36 Images" 的測試可以用 1~2 FPS 加速到 2~3 FPS.


以上測試環境為 P4-3GHz, 4GB, WinXPSP3, resize windows 到大約只看到般大小 (clientWidth/Heigh 約 578x162),GPU 只是 Intel 的 GMA X4500。 Chrome version 5.0.375.70

確實是快了..但最終還是很慢.跟據 Issue 28539 的說法,是在 image resampling 的部份出問題而慢,所以處理大圖會比較慢.這樣也沒錯啦,可是應用 HW Accelerated 的重點不是只 rendering 比較快,而且是把 resampling 等等的這部份工作也交給 GPU 去計算.

剛更新了一下去到 5.0.375.86,再試一次 FPS 居然也有 5 FPS / 2 FPS 的增長........

6/18/2010

SPB Mobile Shell 3.5 for S60v5 試用中

早幾天發現左原來終於有人在 S60v5 上開發了個真實能應用的 Shell - SPB Mobile Shell

我下載了 Trial 的版本,把它安裝在我的 5800XP 上試用了幾天,到目前也真的還好,也是少數用起來會比網上看到的 screenshot / video 的介紹還要好用軟件(特別是在 S60 平台)。也是首個令我有點心動想馬上付錢買下來的 S60 software (可見其他軟件的試用版有多差)。

不知是否 Trial 版本還是設定的關係,和官網的 screenshot 有點不同但功能都齊。

用了幾天,它帶來的不只是比原裝垃圾 Shell 順和快幾倍的速度。也不只是美很多的 eye candy。

而是在功能上它的確是為手機帶來了明確的提昇。

  • 它的 Launcher 比原裝的 Application Menu 快很多 (可能是我 apps icon 較多, 原裝的很慢)。而且付有 Favorited 和 Recently Used 兩個概念,令其操作和打開 application 更快更方便。在 Launcher 再按一下中間的白鍵可以回到原來的 Application Menu。

  • 很懂得用 Press-&-Hold 這個動作,而減少了 UI 上按鍵的數量。

  • 它有 override 手機下方的紅鍵,所以一般使用是不會跳出去。

  • 它有 override 手機下方的白鍵,單按會去到 Luncher,長按會是它的 Task Manager 是一整頁,而且 Icon 更大,也有 "X" 方便 Kill app 的 icon。更方便單手操作。而且它有把自己從 Task List 上隱蔽起來,可是 Telephone 跟 Menu 還是不能關。

  • 而且是 key override 是可以設定的!

  • 不得不提它的 Contract 頁,Favorited 比較簡單方便盲按而不易按錯。而且還很聰明的會記下有幾個號碼的人的上次暴後撥打的號碼。

  • Call History 整合了 call out 和 call in,時順上更清楚。

  • Contact List 的 12 鍵的做法也很聰明,比低能的整個畫面都是 A-Z 而且一頁還不夠的做法好多了。


好像的確實的很好很值得花一點小錢。但它可不是完美的。。。

  • 它居然沒有 override 原裝的來電顯示,和撥出畫面。

  • 用電量好像的確是多了,之前我一般用的話大概可以用一天半。現在只能剛剛好用一天

  • RAM 也聽說用得比較多的樣子。大概花掉 20MB 多。但事實上沒有變慢,因為大部份 S60 的 app 都根本不會用也用不著太多 RAM。

  • 不能把 URL Bookmark 當成 widget 放在 Home Screen

  • SMS 還是原來那個,但好像有另外 3rd-party 可以改裝?


現在先寫到這,再有甚麼的話才分享

4/28/2010

License of Windows Virtual PC 2007

You can have a free copy of Windows 7 legally, in addition of your paid license.

If you have ever read the EULA of the Windows 7 during the installation ( I bet nobody does), it is noted inside.

For whom may get interested of the EULA, you can find them in the folder in your Windows 7 folder.

C:\Windows\System32\en-US\Licenses\_Default\

In the license terms for HomePremium (which I am using), skip to section 3.d
Use with Virtualization Technologies. Instead of using the software directly on the licensed computer, you may install and use the software within only one virtual (or otherwise emulated) hardware system on the licensed computer. When used in a virtualized environment, content protected by digital rights management technology, BitLocker or any full volume disk drive encryption technology may not be as secure as protected content not in a virtualized environment. You should comply with all domestic and international laws that apply to such protected content.

It means, you can have a free additional instance of Windows 7 running a Virtual PC / VMWare / etc inside your machine.

How about it on other Editions of Windows 7?

You can also find the similar statement in Windows Vista EULA.

---------------

Vista Home Basic and Home Premium

4. USE WITH VIRTUALIZATION TECHNOLOGIES. You may not use the software installed on the licensed device within a virtual (or otherwise emulated) hardware system

Vista Ultimate

6. USE WITH VIRTUALIZATION TECHNOLOGIES. You may use the software installed on the licensed device within a virtual (or otherwise emulated) hardware system on the licensed device. If you do so, you may not play or access content or use applications protected by any Microsoft digital, information or enterprise rights management technology or other Microsoft rights management services or use BitLocker. We advise against playing or accessing content or using applications protected by other digital, information or enterprise rights management technology or other rights management services or using full volume disk drive encryption.

-----------------------

via Virtual PC 2007 Beta: Free and Available Now - Windows Vista Team Blog - The Windows Blog.

1/31/2010

DNS-Prefetch could be a security leak in emails?

As you may know that, email clients and webmails usually disable auto-loading of external images (and others) to prevent spammer getting confirmation of the reading activity.

There are usually an external image with a unique URL to a image that spammers will know which emails are read, which addresses are active, when the image being loaded.

DNS-Prefetch won't  load any URL, and it won't submit any request to the web server. However, it will submit request to DNS server.

If spammer improve the method, by adding a link to a URL with a sub-domain which is unique? (possible for wildcard DNS)

Then a request (confirmation) might send to the spammer when you opening the email, without your permission.

Lucky, it seem that the DNS-prefetching is disabled by default in HTTPS.

Ref: http://codemonkeyism.com/google/

12/30/2009

Programming Barriers

There are many barriers could happen in software development that degrade the performance of a programmer to do threr job.


  • Hardware Barriers
    Fact of the hardware: Slow development machines, different platforms, CPU architecture, memory limits, etc

  • Storage Barriers
    The distinct from the programmer to source code: Version control tool, shared folder, file lock

  • API Barriers
    The imperfect of API of the runtime platform/library: HTML, missing feature, missing documentation, bad API, poor standard, bug in the implementation to workaround

  • Policy Barriers
    Barriers created by real-world policy make you to code:  security, choice of third party tools, coding style, meaningless comment

  • Information / Knowledge Barriers
    Must have domain knowledge / background information before who can code: Business rule, understanding of the objective, experience, design patterns,

  • Data format Barriers
    Protocols, encoding, file format, charset, size and length limit

  • Language Barriers
    Barriers in between programming languages: C#, JNI, wrapper, ANSI-SQL, PL/SQL, COBOL, jQuery, etc

  • Reinvent wheel Barriers
    I cannot categorize it into others: Somehow you will find yourself reinvent a wheel because of many reasons.

  • Emotion Barriers
    Emotion: e.g. I won't use C# because of Microsoft.



Please comment if you work in the software development industry

Simplest way to fix "No D3DX9 dll" with MPC-HC on Windows 7

There is a bug in MPC-HC in Windows 7, and you may get the following error message when everytime it play a video.

No D3DX9 dll found. To enable statsshaders and complex resizersplease make sure to install the latest DirectX End-User Runtime


You may find other on the web / youtube tell you to download a copy of DirectX 9. But actually, you don't have to.

Step 1. open "C:\Program Files\MPC HomeCinema" with your explorer.
Step 2. Make a copy "ANY" of dll (e.g. mpcresources.fr.dll)
Step 3. Rename the duplication dll to "d3dx9_41.dll"

And you should not get the error message anymore.

Why it is simple than other?
The MPC-HC try to load the DLL into memory. It locate the file "d3dx8_41.dll" from path. However, on Windows 7 there is no DirectX 9 but DirectX 10  and it should load "d3dx10_40.dll" on directx.

It find the DLL cannot be loaded, then popup a message to notify you, and play the video.

The fact is that, MPC-HC is not required to load it again as it should be loaded already by system. By putting a dummy DLL to the path to bypass the checking is enough as no API will be used.

In short, MPC-HC use the wrong way to check and to ensure the minimum version of DirectX installed. It should load "d3d9.dll" and check the build number in the assembly or in the registry.

------------

UPDATE: June 2010

I am not sure if MPC or Win7 have fix the issue.

There should no the popup any more by update both of them to the latest.

If you have did my fix on the above, you can just delete the file and everythings work fine.

11/30/2009

A big bug of Chromium - Checkboxes and scroll bar arrows sometimes disappear under Windows classic - Project Hosting on Google Code

Issue 3543 - chromium - Checkboxes and scroll bar arrows sometimes disappear under Windows classic - Project Hosting on Google Code.

It is unbelievable that they still yet fix that bug after year meanwhile they worked hard on it (unlike Java@Sun, your issues could be ignored)

Watch on the timeline!
The first report was  >>Chrome Version : 0.3.154.3; and they move it from milestone 2.0 to milestone 5. But still, it is not only unsolved.....but also have no idea why it is going wrong.

Is it possible an infamous bug from Window!?

11/21/2009

What I am thinking on the Chromium OS open source project

Official Google Blog: Releasing the Chromium OS open source project.

Google is now Microsoft in the past, when Microsoft was selling DOS to IBM.

I just watch few Chrome OS documents and videos, it is a larger plan then I thought before. If it happen in the way which Google is planning, there is a Web 3.0 revolution that ever important then the PC revolution.

PC will be a historical term, like Apple II.

--

I watch also IE9 video yesterday, they are all doing the same - faster browser, faster Javscript, use GPU to speed up...etc, etc. However, IE9 will never beat Chrome OS as there are no anything to slow it down, in theory.

---

DOS - Disk operating system,  Chrome OS - Web operating system.

----

Microsoft is doing this - "keep your laptop/notebook connected to their cloud, and the company network ---- in order to deadly control them"

You can find these sign in Windows 7 and Server 2008 R2.
BitLocker, branchcache, group policy forced auto VPN connection...etc,etc

Fat OS, fat server, deep connection, tight control.
I bet half of system administrators will love these new feature.
(not the end user, as they cannot

Google is doing in another way - "nothing but a powered stateless workstation --- you cannot do too much offline"

Lightweight browser, internet depending, open source.
Not all company will like it, (but they will), but many heavy Internet and mobile user will.

----

How about NativeClient ?

Think about it, something like Photoshop, AutoCAD, graphical designer, movie editing....etc

They might not do very well in HTML5 then that in PC.

But if there is a plug-in system which allow you to run full featured application. They don't read/write file from harddisk, but on WebDAV folders.

Chrome OS answer the question which people ask when Google release NativeClient --- why not just download the exe and execute?  Why reinvent ActiveX? Because you won't and not allowed on Chrome OS.

I just there will even some "Extension based on NativeClient"

----

Back to Chrome OS, it take away unsuccessfully, and optimize it.

7 SECONDS from power on and boot to browser.

Why "HIBERNATE" !??  Why "SLEEP"?  to cut 7 seconds into 0.5  :-)

----

Sandbox - application partition --- everybody know about it, if they have a iPhone.....Apple guy call it Jail.

File system encrypted by default - very reasonable for mobile devices .

They try to LIMIT supported hardware!!!!
Reasonable to keep limited number of driver support and stupid bad hardware problems.

Actually, if it run in google way, half of hardware building company will die.
Because nobody will buy a faster GPU card, cooler, super CPU, larger harddisk.... they will subscribe storage online.

Google Application Store!!

-----

Read more:

http://randle.wordpress.com/2009/11/20/google-chrome-os-revealed/