Posts

Messing with QML

Image
Just started learning QML and yeah, it's totally new age! It's going to take me some time to get in gear and know the various internals.  So I am just messing around and trying to learn the trade lang for Qt 5.

[Android] Factory/ Hard reset of Karbonn S1 Titanium

Power down the phone. Press Power + Volume Plus button combo for about 5 sec's. You will get to green screen; don't let go of the buttons. After another 5 sec's display will turn red. Let go of buttons, and a menu will be shown with various options for installing update/ reset/ cache wipe / data wipe etc. Move to data wipe option using Vol +/- options. And select the option using power key. Below the options, the result can be seen. Once data wipe is done, select Reboot phone option. After reboot the phone should return to factory condition.

[Android] Boot animation change, subsequent hangup and hard reset thereafter!

[UPDATE ] The hard-reset phone kept with old animation worked for a while but after I installed a s***load of apps, it went keput again! So had to do another hard reset; and this time after the reset I installed BAC (Boot Animation Changer) and restored the stock animation back. Now I have re-installed almost all the apps and it's going okay. Hmmm, maybe no custom boot anim for me.                                                                                --- *** --- Just tried Boot Animation Changer on my Karbonn S1 Titanium. Had to root it first; framaroot took care of that. It's a nice app! Later I installed BAC(Boot animation changer) and put in an animation of Cynogenmod that I got hold of on a site. After rebooting though, the karbon won't get to homescreen. The last thre...

[PostgreSQL] Query to check no of tables in a database

Often times we are needed to check if any database we are connected to has any tables or not. In this case following query proves helpful: select count(*) from information_schema.tables where table_schema = 'public'

PostgreSQL script to keep postgreSQL server running

:loop @ECHO OFF set PSQL="C:\Program Files\PostgreSQL\9.1\bin" set DBNAME="template1" set USER="postgres" set PORT="5432" set RES="Not Pinging" %PSQL%\psql -Atq -c "SELECT 'ping'" -p %PORT% -U %USER% %DBNAME% > _Res.txt set /p RES=<_Res.txt IF %RES% EQU ping (echo "Postgres running... ") else (echo "PostgreSQL seems not pinging.. Restarting..." sc start postgreSQL-9.1 > NUL ) ping -n 10 127.0.0.1 > NUL goto loop

A sleep starved day

Its the middle of the week. I have stayed up quite a while the previous night. So with about three and half hours sleep on my schedule I have been feeling foggy whole day. But I have slogged on through, moving code from one place to another, building the binaries and fixing whatever build issues I stumble upon. It has been a grueling day spend fighting with messy code and various idiosyncracies anything that's fairly old seem to acquire. And now as I move in the train still about an hour away from home and one full hour into the return commute, my brain wants to shut down. The shuffled playlist has Rihanna singing 'stay'. I know tonight I am gonna sleep like dead. I have pulled such ultra-late nights before. And I have seen too many foggy days. I miss my folks. I miss my cats. I miss the jungle. And its been so many years here, but I can't stop feeling like a refugee in this concrete jungle. And Rihanna sings, 'I want you to stay', but it doesn't feel like t...

[Qwt] How to plot discontinuous curves

In the current project we are using Qwt for doing some plotting. There was a problem with data loss and how to represent it on the graphs. While discussing possible solutions and researching on how to implement them, I stumbled upon this thread which was good for a solution. http://www.qtcentre.org/threads/49416-How-to-plot-discontinuous-curves-in-Qwt