While chomping my facebook stream today, I found this article that had an analysis of the 50 best cities of the USA, with metrics on why each city is in this list. Metrics used for the ranking included aspects like population, household income, crime rate, quality of education etc.
Immediately, I found this lacking in one key aspect: I could not find a tabular representation of all this data! So what did I do? I did what any decent hacker would do: I mined out the data, and created a spreadsheet
I was starting to fool around with Qt just when Qt v4.5 was released.
The first thing to do obviously was to download the source tarball and build it. But the first ./configure command resulted in “Qt will not be built with xshape support”, which was obviously a let-down. To make things worse, when I ignored this message and went on with “make”, the compilation failed with some compilation errors.
So I googled around, and found this:
To solve this problem, install the xorg-dev package.
This is for ubuntu/debian systems. For other distributions, the same may be available under a different package name. I don\’t really know.
And oh, I was reading this online book yesterday, and maybe it will be a great help for people to get started with – Qt 4: Introduction to Design Patterns in C++ with Qt 4
Hope this piece-o-text is a lifesaver for many a baffled Qt starters.
I recently noticed a little bug in firefox (I don’t know where this belongs, in “xulrunner” or in firefox code itself), and I dutifully report it here:
My friend built an extension for firefox, and I noticed that the timepicker control (in xul) does not display the AM/PM select, neither does it provide a 24 hour clock. (only on Ubuntu).
I live in India, and so it just shows IST instead of AM/PM (see screenshot)
This problem occurs only on Ubuntu (I have not tried other distros). The same firefox extension was displaying AM/PM correctly in Firefox when running on Windows Vista.
The same problem occurred with the datepicker control: it was displaying an arbitrary “October” between the Day number and Month number. (This too, only on ubuntu).
I have reported the bug at bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=479069
I wonder why this is hapenning.
Most server side languages have inbuilt capabillity of reading GET variables passed via the URL.
- You need to find out what the server did/will do on recipt of a particular URL (usually the one on which you currently are)
- You are building a dynamic AJAX based website, and you are making dynamically loaded content linkable using # in the URL (example: http://jrharshath.com/blog#Article?articleid=12345).
I am currently building an AJAX based application on jswaf and it faces second problem, so I wrote a script for this express purpose: to parse URL like strings into BaseURL and key-value paired parameters.
The code is free to borrow. Just provide credits if you do, and drop me a line if you like it, or would like to learn how to use it.
Update: If you enjoy Karaoke, you might want to try http://thesimsonstage.ea.com/. I tried it out once, and simply loved it.
Last week I searched the internet for a way to “make” karaoke – strip out the vocals from my songs.
This way, I get songs without the vocals – only instrumentals – so I can sing along instead of the real singer. Turns out this is called karaoke
So, my hunt led me to two things:
This is a software that can be installed with a simple “sudo apt-get install pykaraoke“. But, this somehow did not do what it is supposed to do.
So I figured out a new way to do this (after a LOT of googling).
Mplayer, your friend (#yay)
So here’s a DIY for how-to-make-your-own-karaoke:
1. Install the required software
You need mplayer and lame encoder. Installation is pretty simple: sudo apt-get install mplayer lame shntool
2. Remove the vocals from the song
Here’s how to do that: mplayer -ao pcm:file=<output file> -af karaoke <input file (song)>
This command will (try to) strip the vocals from the input song (audio, video, whatever) and will dump the output as “PCM Wav” encoded audio. Relax, this just means that the output song is NOT in mp3 format. And its size is huge.
3. Convert the wav output to mp3
Here’s how: lame -V2 <input wav file> <output mp3 file>
Make sure that there are no spaces in the file names during this “lame” operation. (I don’t know what happens if there are).
So far, so good.
And here’s the catch: not all songs respond equally well to this “procedure”. Some pointers:
- This procedure is meant to “attenuate” the voice, not remove it, like, completely. (#ref: http://www.linuxjournal.com/article/9787)
- Songs with male voice repond better than ones with female voice.
- Sometimes, drum beats are also badly attenuated along with the vocals. In any case, the “boom” of the beat gets killed.
So much for being a killjoy. But all said and done, I still use this method. It works on some songs, and it doesn’t on others.
Q: So what do you do if this method doesn’t work?
A: Search for a better method, and if you find it, post it in here!