Day Learning Headline Animator

Day Learning

Friday, November 20, 2009

Check out my photos on Facebook

facebook

Check out my photos on Facebook


Hi Arvind,

I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile.

Thanks,
Arvind

To sign up for Facebook, follow the link below:
http://www.facebook.com/p.php?i=1409850042&k=Z2EUQ2W2Q3TF6BD1QFWTSWXPQ3IB4XWBSQCWJ&r

Already have an account? Add this email address to your account here.
purohit_arvind.daylearning@blogger.com was invited to join Facebook by Arvind Purohit. If you do not wish to receive this type of email from Facebook in the future, please click here to unsubscribe.
Facebook's offices are located at 1601 S. California Ave., Palo Alto, CA 94304.

Wednesday, September 12, 2007

How to use MS Excel sheet to track portfolio

I find MS Excel very useful to track my finances. So one day I thought how nice it would be to track my portfolio using excel sheet. Then I searched internet for some free excel template to do this. And I found the one. I then modified it to make it more attractive with some color and formulas.


Then I thought how nice it would be if I can use it to calculate my capital gains from this sheet given the transactions. So I learnt some excel programming to come up with very crude way to do it. You can find this excel sheet here. And I have created one ppt with screenshots telling how to use it. You can download it here. Please let me know your feedback at my email id purohit under score arvind at the rate of yahoo.com

Wednesday, September 5, 2007

JPEG Encoding

Its quite long time since I blogged about what I am learning. Blogging should be a regular job. And regularity is toughness. Anyways here is what I have learnt today about JPEG Encoding

 

JPEG Encoding

 

JPEG is a lossy image compression and it exploits two limitations of human vision system

 

(1)  We are more sensitive to brightness then the color

(2)  We are more sensitive to color change at lower brightness over large area then at higher frequency brightness.

 

So to exploit it we do following things

 

(1)  Convert RGB color space to YCbCr model. Then reduce Cb and Cr component by as much as half! Thus use limitation (1) listed above

(2)  Now split images in 8x8 blocks.

(3)  Each of the Y, Cb, and Cr component of this 8x8 block goes through DCT phase.

(4)  Then we quantize the output of DCT.

(5)  Once quantized we know which part belong to high frequency brightness and which one belong to low brightness. We compress high intensity component more aggressively or may discard them altogether. This is the step in which major loss of information occur in encoding. Here we are exploiting limitation (2) listed above

(6)  Remaining components are encoded using lossless compression technique like Huffman Encoding.

 

Note: YCbCr is color model in which Y stands for Luma(brighness) and Cb and Cr stands for chrominance for blue and red.

 

Question: What is DCT? You can explore more on it.

 

Decoding should be the reverse process of it.

 

Friday, May 4, 2007

Shape changing dialogs in QT4

I was not able to get QT4 book so I started learning from QT3 book which is freely available. Now when I started reading chapter 2, it talks of self changing dialogs. But here I had to spent a lot of time! The book which is based on QT3 tells that make “resizeMode” property from “Auto” to “Fixed”. But I did not find this property in QT4 at all! And I tried all the permutations and combinations of size of all the widgets.

 

But then I looked in one dialog example. Here I saw that top level grid layout should call setSizeConstraint with argument as QLayout::SetFixedSize. And when I did this code change manually in ui_sortForm.h it worked liked magic! [Note ui_sortForm.h is generated by QT Designer from sortForm.ui file]

 

One thing I don’t understand now is how come you cant change top most grid layout’s property in QT Designer? I may find out more about this when I learn more about QT.

 

 

 

Thursday, April 12, 2007

Finally got QT working in office computer

I got company laptop on which I removed Cygwin and installed QT 4.2.2. Now it is okay. I have started learning QT on office also. Idea is to learn about basic classes of QT and then to read more about specialized class in the area in which I want to programe.
 
On office front I have prepared one PPT on Mobile Web 2.0. Lets see how and when this presentation needs to be given to my boss and others. I want to build a team of mobile web technologies.
 
Lottery for H1B is on. There are roughly 1.2 Lacs visa applicants for a 65 thousand visas! So roughly 1 in evert 2 person would get it. There was a mad rush this time quota got over on first day itself. So they would use random selection (euphemism for lottery) to select the candidates who filed on first and second day of visa opening month. How pathetic! It would not be meritocracy but randomocracy I guess ;). Lets hope that I get the lottery :) Amen


Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

Wednesday, March 28, 2007

Cygwin g++ error!

While compiling a simple or complicated c++ program in Cygwin/g++ if you get below error

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../i686-pc-cygwin/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

Go though following steps.

First try to find where you /usr/lib is mapped. Use Cygpath -w /usr/lib

Above command would tell you the windows directory path where /usr/local/lib is mapped. Go to that directory. In my case it was c:\utils\cygwin\lib. cd into this directory. And search for file libstdc*. You would get a file named libstdc++.a.2.10.0. Create a link named libstdc++.a for the same file in this directory. Here is sequence of commands.

C:\> Cygpath -w /usr/lib
c:\utils\cygwin\lib

C:\>cd c:\utils\cygwin\lib
C:\utils\Cygwin\lib>ls libstdc++*
libstdc++.a.2.10.0

C:\utils\Cygwin\lib>ln -s libstdc++.a.2.10.0 libstdc++.a

And thats it. And even if above trick does not work, try creating link to libstdc++ in directory given by cygpath -w /usr/local/lib.

The problem is g++ can not find out libstdc++ on its own, it needs to be told about this. Here are more threads on this.

http://ubuntuforums.org/archive/index.php/t-15120.html
http://gcc.gnu.org/ml/libstdc++/2002-05/msg00353.html

Monday, March 26, 2007

Undefined referrence to 'vtable for MyWidget'

So I have started learning QT on my own. Documentation for QT seems just fabulous. So today I am in tutorial number 4, and here as exercise I created a basic signal and slot. But I got this error .. undefined reference to `vtable for MyWidget'

I had put the class definion in my .cpp file and was struggling to get it compiled. But it would never compile and throw above compiler error along with some other random erros. When I googled, I got below link

http://www.qtforum.org/article/302/Fixing-undefined-reference-to-vtable-.html

Sometimes the linking stage of compiling might fail with the rather confusing error:

undefined reference to `vtable for MyWidget`

So theme is don't put class definitions in .cpp files when they have the Q_OBJECT macro.



Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.