Monday 9 December 2013

Free e-book: Object-Oriented Programming with ANSI-C

This interesting book written by Axel Schreiner has some answers about the possibility of OOP in plain C. Although we're continuously moving to managed languages mainly based on Java or .Net, it's still worthwhile to take a look at this book to understand OOP concepts better and get fresh new ideas for the future. 

( Image from www.cs.rit.deu/~ats/ )



Sent from Evernote

Wednesday 4 December 2013

How to solve exception on loading of Microsoft.Practices.EnterpriseLibrary.Logging for WPF application development

Today I got an exception from Visual Studio 2010 which complained the unresolvable module of Microsoft.Practices.EnterpriseLibrary.Logging (version 2.0.0.0, Public Key 13aaee2494f61799) when I attempted to open a XAML UI developed by others. To my embarrassment, this .Net DLL is already GAC-ed on my machine. Probably, one or more of its satellite libraries were missing. 


It's turned out that I should install "Enterprise Library for .Net Framework 2.0". The exception is now gone after installing the library package and restarting VS. 

Interestingly, even without the Enterprise Library, I was still able to compile & run the project. It means that the missing part matters on design time only. 

Sent from Evernote

Can't reboot Optimus G Pro into recovery mode after installing CyanogenMod 10.2

Yesterday, I encountered a strange problem to update the CM10.2 RC ROM to the official CM10.2 on my E986 as I couldn't make the phone boot into recovery mode. It just showed this disappointing message. 


Actually it was obvious that I succeeded in doing that - or I wouldn't be able to install CM 10.2 RC. So what happened? As I am not an expert in this area so that I am not 100% sure, but it seems that the last recovery image to apply CM 10.2 RC was not fully compatible with my e986. 

(Warning - Everything is at your own risk!)

Last time, I used 2nd-init recovery to inject CWM and it worked with no issue so I still don't understand why not now. Anyway, I was advised that I should use a loki-compatible recovery tool. e.g. FreeGee. (What is loki??? Don't ask me, please!) Interestingly, I found that several people encountered the same problem of mine and some of them just reverted the ROM back to the stock one and start from scratch with safer tools. I know it could be the best, but I didn't have the stock ROM.

Instead, I installed FreeGee I mentioned above. Unfortunately, the latest version (1.9.5) didn't do anything but displaying "Error 127" so I googled to find an older one and finally found Chinese version of 1.2.4 which worked fine whilst I don't speak Chinese. FreeGee has a few options to take various recoveries and I used CWM. I won't link that Chinese version here as I believe the developer of FreeGee will fix the current problem soon and that unsecured version I used might brick your machine. 

Therefore, if you encounter the same problem, use FreeGee! 
Sent from Evernote

Official CM10.2 for LG Optimus G Pro (e980, e986, e98x)

I found that a new stable ROM for my e986 so updated it in my bed. :)
It is not a Release Candidate any more! What a fast change.



Don't know how to apply the ROM? Please read my previous posts here. 
Sent from Evernote

Thursday 28 November 2013

How to install CM10.2 (Jelly Bean 4.3) Release Candidate on LG Optimus G Pro (E986)

Introduction

I don't like to repeat the reason of installing a CM ROM :), but for most of Android devices, the steps to install a CyanogenMod ROM are all the same. 
  1. Root
  2. Install recovery
  3. Install the ROMs from recovery mode 
So I'm just going to describe what I picked up to achieve my goal. I am not sure if this works on all E98x devices but at least it worked on mine, with a few minor issues. 

* WARNING * 
It's totally up to you to follow the steps here so I have no responsibility on any of damages and/or bricks which can happen on your phones/devices.

Procedures & File Locations 
  • Root on the official 4.1.2 ROM: Follow the instructions here -  http://forum.xda-developers.com/showthread.php?t=2362657 
    • Don't hesitate to install LG drivers - that won't kill your PC! :)
  • CM 10.2 Release Candidate:  http://download.cyanogenmod.org/?device=e980 
    • Please note that e980 is for all e98x GSM devices. e986 used to have its own branch but now it's unified. 
    • I took cm-10.2.0-RC1-e980.zip as it was the latest RC. If you can see any newer stable or RC one, you can go with one of them but I don't recommend you to go with nightly ones. 
  • Google Apps for Jelly Bean 4.3:  http://wiki.cyanogenmod.org/w/Gapps
    • Mind you, you should use CM 10.2's one. All the other versions aren't compatible. 
    • Don't forget to put the two roms (CM10.2, GApps) on your phone. You may use either of internal storage or external SD (recommended). 
  • Recovery:  http://forum.xda-developers.com/showthread.php?t=2284298
    • Don't know how to run the recovery? 
      1. Install the APK. 
      2. Run the new app installed on the phone
      3. There should be two buttons - just click them in order. 
      4. And the phone will enter the recovery mode. 
    • On recovery mode - I usually do:
      1. Clean up all the caches including Dalvik cache (in advanced options) 
      2. Install CM 
      3. Install GApps. Once you've install a CM, you may skip 1 when you install another CM ROM in order to keep your settings but don't forget to do 3 every time. 
Troubleshooting

Embarrassingly, my e980 produced an error when I firstly attempted to install the rom. It produced 'error 7' (assert failure) at the first line of updater script, which indicated that I picked up a wrong rom which was not compatible with my device. But I was pretty sure that my phone was e986. What the.. 

Hence it was natural for me to open up the updater script in the ROM. The script ('updater-script') is at META-INF>com>google>android in the ROM. You can extract it to somewhere and edit it using a typical editor like Notepad++ as it's just a plain text file and then you may overwrite the file with your changes. I recommend you to use 7-zip to handle zip files.

The complainer was something like this: 

assert(getprop("ro.product.device") == "e986" || getprop("ro.build.product") == "e986" || ....... 

As we can see, "e986" is already there so it looks unlikely to have downloaded a wrong ROM. Maybe the device name was something unusual on my phone.. So I put a check code to display my phone's property at the top of the updater script. 

ui_print(getprop("ro.product.device"));
ui_print(getprop("ro.build.product"));

And guess what? It displayed vu2kt. VU2KT!!!!!!!!! This means LG Optimus Vu 2 for KT (a cell-phone services provider in LG's hometown). Did I have Optimus Vu? Absolutely not. The phone was definitely e986. Now, workaround is my friend. My friend just put a new entry of vu2kt there conveniently and it worked fine. :) I think there was just a mistake somewhere in my phone. 

Interestingly, actually there was a common feature in VU2 & G Pro - the "Rubberdium" pen. Although the pen is not bundled with G Pro package, it works fine anyway. I bought that by myself. However, frankly speaking, it never catches up Galaxy Note series. Other than the lacking pressure-sensitive input, G Pro + Rubberdium beats nothing against the Notes. Personally I think the input is too laggy. 

Result


Quality of the ROM

It's pretty fantastic regarding that it is only the first RC. I haven't got anything serious yet. The battery feels like draining little bit faster but I am not sure. But - I'm missing some bundled apps in the original ROM like QRemote and QMemo. After installing a CM, you should find similar ones from Play Store. Now the quick memo button on the left side is just a search button. :) 

Sent from Evernote

Wednesday 27 November 2013

How to see registered COM/OCX objects on the machine

How to see registered COM/OCX objects on the machine
  1. Open up Visual Studio
  2. View->Object Browser
  3. Click "..." and select COM tab
    • before registering TestActiveX
    •  
    • after registering TestActiveX by entering RegSvr32 TestActiveX.ocx
Sent from Evernote

Evernote to Blogger.com - it actually works!

The idea was from here:  http://discussion.evernote.com/topic/38192-export-note-for-blogger/

For somebody who doesn't want to click the link - the idea was simple & quick. You just create a new note on Evernote, right-click on it and select "Share->Send By Email". Whom to email? Also simple - you may setup "blog import email" on your blog. Blogger.com supports it and works excellently. If you use one of other blogs which support this feature, I bet you will like that too. Conveniently, Evernote remembers the last exported email address so I don't even have to remember the "blog import email". 

I love this because I use Evernote all the time so that I don't have to open anything else to post blog articles. e.g. Blogger.com editor. In addition, finally I can stay in Blogger.com which supports AdSense! 



Photos are posted as well - this is really great!!! How quick, how easy. 

The only downside I can think of now is I can't edit existing posts. But that's fine - it's not that painful to modify/erase posts on Blogger.com's dashboard. If the expected change is too huge, I can just remove the old post (if there is no comment) and post a new one. 


Sent from Evernote

Thursday 4 July 2013

Classic theme for Windows 8

It would be really nice to have a classic theme on Windows 8. So I made it. 
Although it's not perfect, you may start with it and modify as you want.