Posts

Showing posts from June, 2009

C# - version of Java currentTimeMillis

Java System.currentTimeMillis() is a very good utility to measure time in Java. However, in C#, it uses Ticks. There is 2 simple way to have a similar version of it

1. Use System.Environment.TickCount, it will return the number of millis elapsed since system started.

2. Use DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond, this will convert current time in Ticks to millisecond.

IMAPIv2 27354130-7F64-5B0F-8F00-5D77AFBE261E Error Fix

If you use WinXP for IMAPIv2, you may encounter the following error



Retrieving the COM class factory for component with CLSID {2735412E-7F64-5B0F-8F00-5D77AFBE261E} failed due to the following error: 80040154.



This error is due to IMAPIv2 is not found on the system. http://support.microsoft.com/kb/932716

To fix this, you have to install the following Microsoft Patch.

Vista is preinstalled with IMAPIv2

C++ Getting Device IO

Image
Today, I am exploring on how to communicate with window system device with VS C++
In concept, it is rather simple

1. Get the device name
2. Open the device with CreateFile().
3. Perform IO action such as DeviceIoControl()
4. Close the device after use with CloseHandle()
You need to include windows.h, winioctl.h, stdio.h
Below is the sample code from MSDN on reading first primary drive geometry information.



Top 10 Phones in SG CommunicAsia 2009

These are really cool phones.. Take a lookhttp://news.cnet.com/8301-17938_105-10268240-1.html

Site Value

Image
Before today, I do not know that my blog worth a bit of $$$... USD$146. Not a lot, but, I am amused. Not sure how they could have calculated it. Mostly, must be base on traffic.


Try it out http://www.websiteoutlook.com/http://www.stimator.com/

Web 2.0 Security

Just read about this article about Web 2.0 security and find it interesting.

Web 2.0 Security: Four Things to Know about the Social Web

Below are the 4 main points:

1) Most Web Posts on Blogs and Forums are Actually Unwanted Content (Spam and Malware)

Especially, this is really true. "a site is reputable, doesn't mean its safe. Blogs and message boards belonging to Sony Pictures, Digg, Google, YouTube and Washington State University have all hosted malicious comment spam recently, and My.BarackObama.com was infected with malicious comment spam." Also, twitter will also be the upcoming social website that may help adversary to spread malicious contents. Read this http://www.pcmag.com/article2/0,2817,2348052,00.asp?kc=PCRSS03129TX1K0000625

2) The Top Search Results from Google are Safe, Right?

Search Engine poison is really a concern. Many people thinks that result from reputable search engine such as Google and Yahoo are free from malicious contents. Although these search engin…

iPhone for USD$99

This sound like a good deal for the new iPhone. It promises double the speed of its previous model.

The iPhone will come in three sizes and prices. The new phone will have a 16-gigabyte model for USD$199 and a 32-gigibyte version for USD$299. Apple will continue to sell a second-generation iPhone 3G with 8 gigabytes of memory for USD$99.

The new iPhone OS 3.0, which was first unveiled in March, will have cut, copy and paste capabilities for all applications. The operating system will also feature an undo gesture, which will undo the last action by shaking the phone.

Fully integrated search, multimedia text messages and auto-fill for passwords have also been added to the iPhone, though the multimedia text messaging will not be available on AT&T until later in the summer.

The new OS will allow users to rent and purchase movies right from their phones using iTunes, and it will have parental control functionality.