Friday, September 10, 2010

forward declaration in C++

Benefit:

Enable to implement interface completely in C++.

- Define a pure class as an interface
- Use forward declaration when needs it but don't include its header file
- If necessary, you can redefine this class to replace the original one

Wednesday, August 11, 2010

eBay on Mobile

http://blogs.forbes.com/elizabethwoyke/2010/08/10/ebays-mobile-roadmap-ipad-windows-phone-7-apps-and-more/

- EBay was early to recognize the potential of mobile shopping, launching its first iPhone application in 2008.

- EBay’s mobile strategy is worth observing because the company is the largest mobile retailer in the U.S. and keeps growing. In 2009, eBay sold $600 million of goods (which it calls GMV for Gross Merchandise Volume) by mobile. This year, it expects to more than double that amount to $1.5 billion.
-working on brand-new apps. One, for the discount book and DVD store Half.com will debut in a few weeks. Another, dedicated to eBay-surfing car enthusiasts, is in development. Both apps are likely to be infused with barcode-reading technology that eBay acquired in June through a startup called RedLaser. In the Half.com app, the barcode reader (accessed through the phone’s camera) will let users compare prices. In the “motors” app, it could scan a car’s vehicle identification number (VIN) to help users identify compatible car parts on eBay.
-Since eBay aims to make these apps fun as well as functional, the car app could also include a virtual car housed in a virtual garage–a feature Yankovich likens to augmented reality. Eventually, the technology could power an app that would scan passersby and call up their clothes and accessories–or similar goods–on eBay, he says.
-Video is another option. Sellers’ listings could include video clips that showed the goods in use. “Enthusiasts want to be immersed in their product interests,” notes Yankovich. “We want to give them a reason to come back.”
-Apple, MS and Andriod
-Ultimately, we want people to experience eBay products in a way they never did before, even in a store,” he says. “That’s the only way we’ll get people who don’t buy things on their phones to try.”
- Yankovich says there are several possible reasons, including the app’s more inviting design, with larger, higher-quality images, and the fact that people tend to log onto their iPads at night, when they are likely to be more relaxed and willing to make purchases.

Sunday, May 9, 2010

Who is the leader of the mobile computing?

1. Apple
- Very strong client product
- Very strong server product

2. Google
- Very strong server product
- Building the client (what is it client?)

3. Microsoft
- String server product
- Weak client
- Strong desktop product

Try ChromeOS

Burn a Chrome to a USB disk and start your PC from there.
Download it here http://chromeos.hexxeh.net/.

Wednesday, May 5, 2010

C#: Exception in using () {...}

We know in C#, "using" will call Dispose() of the object at the end of its scope. What will happen if an exception happens? the Dispose() will still get called?

Yes.
When?
When the fist catch is met.

Tuesday, May 4, 2010

Fixed .NET framework 4.0 error when installing Visual Studio 2010

The error:

- Windows 7 Pro 32bits

- I had VisualStudio 2010 RC installed successfully but removed prior to VS 2010 setup

- I have Visual Studio 2008 installed at the same PC

- My system disk is called I:, not C:

- I turned off all the anti-virus software while installing

- I got the following error in the event viewer after turning on the Installer trace:

Windows update "Update for Windows (KB958488)" could not be installed because of error 2147944003 "Fatal error during installation." (Command line: "wusa.exe "I:\7ef862549a4cbd33ceefb00d4a1c19\Windows6.1-KB958488-v6001-x86.msu" /quiet /norestart")

- I got the following error in the log:

Action: Performing Action on Exe at I:\Users\Billibit\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x86.msu...

[5/3/2010, 22:55:12]Launching CreateProcess with command line = wusa.exe "I:\Users\Billibit\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x86.msu" /quiet /norestart
[5/3/2010, 22:55:21]Exe (I:\Users\Billibit\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x86.msu) failed with 0x643 - Fatal error during installation. .
[5/3/2010, 22:55:21]PerformOperation on exe returned exit code 1603 (translates to HRESULT = 0x643)
[5/3/2010, 22:55:21] Action complete
[5/3/2010, 22:55:21]Error 1603 is mapped to Custom Error:
[5/3/2010, 22:55:21]OnFailureBehavior for this item is to Rollback.

...

Final Result: Installation failed with error code: (0x00000643), "Fatal error during installation. " (Elapsed time: 0 00:01:24).


How to fix it?
- Use .NET Framework Cleanup Tool to remove .Net Framework 4.0
- Uninstall KB958488 from Update Windows Feature at Uninstall of Control Panel. It will ask to reboot the PC, but DO NOT reboot! immediately install .Net 4.0.

Monday, May 3, 2010

How do I debug a custom action/installer class?

You can use one of the following methods:
• Add a call in your code to System.Diagnostics.Debugger.Launch. This method opens Just-In-Time debugging and allows you to attach a new debugger to your code.
• Add a call in your code to MessageBox.Show("Debug Me"). When the message box is shown, use Visual Studio to attach to the MessageBox process. Then place breaks (for Visual C# projects) or stops (for Visual Basic projects) in the code.
• Set your debugging preferences to start InstallUtil.exe (which is located in \winnt\Microsoft.net\Framework\version) and pass it your assembly as a parameter. When you press F5, you hit your breakpoint. InstallUtil.exe will run your custom actions the same way that MSI does.

Sunday, May 2, 2010

What I want to do?

Everyday I read a lot of posts, learn a lot of new technologies, code a lot, think a lot about life, human being, and future.

I will post all of them here!