Tuesday, May 25, 2010

DOS equivalent of linux commands

unix Command =>Dos Command
Grep -r => findstr /S
ps aux => tasklist /v
kill -9 => taskkill /f /im imagename
cp => copy
find . -name =>dir filename /S
Currently looking for locate or find . -name available in linux
Got the answer for above one. Thanks to Satish. Updated the list accordingly.

Monday, April 05, 2010

Stop the process of emotionally attacking

One of our relative is not feeling well since recently and the family are going in very bad trauma as recently, two people from the family are passed away during different incidents. Now, one can see how emotionally weak they might be during this situation, given they have kids who are still young and one of the main person of the family is ill. So, one religion have taken this as an advantage and gave some speech that they will do prayers for them and their God (are there different Gods who can do better than other!!!, I was assuming it is only one :-/) will save them. So, the couple converted into different religion and stopped celebrating the festivals of their religion. I am not against any religion and I do believe one should respect other religions and I don't differentiate as their God or my God. But, I didn't like this way of attacking people emotionally and try to convert them into one religion and put a hard and fast rule of not celebrating their own festivals!
My request to those fellows who choose to convert people's religion in this way: Please stop this nonsense advertising/promotion what ever you call. This is not the right way.

Wednesday, March 17, 2010

install chrome in fedora 12

Installing Google Chrome from the rpm file specified in google chrome site didn't work for me. So, below are the steps which worked for me.


Step-1: Create a chromium.repo file in your /etc/yum.repos.d directory
Step-2: add below contents to chromium.repo file
[chromium]
name=Chromium Test Packages
baseurl=http://spot.fedorapeople.org/chromium/F$releasever/
enabled=1
gpgcheck=0
Step-3: yum install chromium

Reference

Monday, March 15, 2010

Taking a backup of a folder in Fedora Linux

Normal "cp" command will exclude files/folders starting with ".". Below steps are needed to make sure everything is copied (essentially a backup) of a given folder.

1. Set shopt dotglob option to enable.
shopt -s dotglob

2. Copy hidden files and folder.
cp -pr sourceDir destDir

3. Set shopt dotglob option to disable.
shopt -u dotglob

Reference

Friday, March 12, 2010

How true but we ignore :(

Wednesday, March 10, 2010

Tomato Pickle

Ingredients:
1KG tomatoes, 1 big spoon tamarind, methi powder, 1 cup salt, 1 cup mirch powder, oil, mustard seeds, cumin seeds

Preparation:
Clean 1 kg of tomatoes and dry it under fan/under Sun so that water will go away. Take it in a pan and cook it properly till the water in tomatoes almost go away. Once done, take the tamarind (after having only pulp, removing all seeds and other small stick type of things) and put it in the pan where tomatoes pulp is there and cook them together till the moist goes away. once done, add mirch powder, salt and methi powder. Take this mixture add lasoon and grind it in mixer. Keep this stuff in fridge.

Take oil in pan and heat it well. Add mustard seeds and cumin seeds and cool it down. Add part of above mixture (upto few weeks of use) and serve it as pickle.

Wednesday, January 27, 2010

Exporting mysql query output to xml

I know there are ways to do this. But wasn't aware that it is very simple.
Exporting mysql query output to xml is:
mysql -u --xml -e''

Simple, isn't it?

Reference:http://dev.mysql.com/tech-resources/articles/xml-in-mysql5.1-6.0.html#xml-5.1-in-and-out

This article also talks about importing data from xml to mysql.

Monday, January 25, 2010

My struggle with Maven plugin for eclipse and mahout building

Somehow, my maven plugin stopped working in my eclipse (again!!!). I have already posted on maven plugin installation and everything earlier. However, this doesn't seem to work now. :-(. no idea though. So, I had to restart my "mission mvn". Finally after a lot of struggle on making the current mvn plugin to work, I looked for a new plugin and got this link
. I installed this plugin and I could see "mvn commands" populated in "Run as.. " section. My happiness couldn't last for long as I couldn't successfully build mahout codebase using this plugin.

mvn install is giving build error however mvn compile is successfully compiling. Should be able to resolve soon. Stay Tuned...

Finally, I figure out a way to avoid build errors in eclipse using maven. Following checks need to be made to see if everything is configured properly

Right click on Project -> select Properties -> Make sure under Java Build Path and libraries tab, whether Maven ClassPath container and maven dependancies are present
Right click on Project -> select Properties ->Make sure under builder, you have maven project builder and maven incremental builder and default Java builder are available

Right click on project - select properties - select maven at left hand side - check include modules.

Once all above are configured properly, right click on project and select build project. This should build without any issues.

Tuesday, January 12, 2010

Sound issue in Mozilla firefox in Fedora

There was a sound issue in Mozilla firefox in Fedora and to fix the same, one need to install libflashsupport. It worked for me.

Reference:http://www.derekhildreth.com/blog/guides-to-help-with-fedora-8-install/

Monday, January 11, 2010

Disabling Work Offline in Firefox

I have been facing this issue in my firefox that when I start it, "Work Offline" box is checked by default and I have to manually uncheck to start browsing internet. And, here is the solution to turn it off permanently.

1. type about:config in address field of browser
This gives a warning saying you are changing advanced settings. Once you press the button that "I'll be careful, I promise!"

2. type "networkmanager" in filter tab and toggle the parameter(toolkit.networkmanager.disable) that you get when you type the above value in filter tab.

Reference is:
http://ubuntuforums.org/showthread.php?t=851542

The reason given in above link is- The network manager is not well informed , especially in dial-up situations and so, lets the firefox assuming that no connection exists and there by forcing "Work Offline". However, in my case, I had some network issues while booting up and so a manual restart of network was needed. However, even after fixing that issue, I was facing the above problem and there is no other option for me other than disabling network manager.

Friday, January 08, 2010

Destiny

I thought of starting this year blog with something different. But couldn't control after seeing such a sad video in news channel and couldn't control expressing my emotions.

Insane People

While watching TV, I came across this news (http://www.dailychilli.com/news/1721-two-ministers-watch-as-cop-bleeds-to-death) where two ministers watch while cop dies.
I am not pressing at ministers but the whole group of people standing there and watching his death. Crows cry when other fellow crow is hurt. How can we being human beings watch other person dying?. The ugliest reasons they give are "We were waiting for Ambulance", "We thought the minister's convoy is attacked. So, we were thinking whether the attacked people still there and might attack if we reach near to the person". All I can say, they are insane. I don't treat them as human beings. Would you do the same thing if your family member is in that position?

Poor police office, who got double promotions for doing bravery tasks. He was part of "Operation Veerappan". Even, if he is not, he deserves help from the people around. And the way people were pouring drinking water over him, it looked like he is untouchable and they can't touch him. I felt sad and I couldn't do anything. :-(

Thursday, December 31, 2009

Issues while starting mysql server

I have installed mysql server again in my local machine and I was trying to start the same using /etc/init.d/mysqld start and I was getting error saying "Timeout" and when I looked into /var/log/mysqld.log, it is giving error as the db is corrupted or not shutdown properly previously. And after doing some other fixes, I was getting "Can't open and lock privilege tables: Table 'mysql.host' doesn't exist" So to resolve this, I have removed the datadir altogether and have executed below commands:

/usr/bin/mysql_install_db --user=mysql --ldata=/new-data-location
and once that is succeeded, I tried to start with
mysqld_safe --datadir=/new-data-location --user=mysql &
and I got below error saying it couldn't create .pid file in /new-data-location/mysqld. So, I had to manually create mysqld directory in new-data-location and change ownership to mysql and re executed above command and everything went fine.

Now, I changed the root password using the secure installation script(mysql_secure_installation) available in bin folder and everything is fine now.

Refreshing all IMAP folders in Thunderbird

Continuing my work towards configuring my desktop for checking mails, I was irritated with thunderbird configuration as it wasn't refreshing all folders and I had to manually click on each folder for new mail. So, I was wondering what to do and then I remembered what my husband said which I effectively use in my day-to-day work. He said below quote.

"Remember, when you are facing a problem, don't think you are the only one and there are many who might have faced this earlier. So, before rushing to solve the problem, try to search over the net if there is a solution already. No need to reinvent the wheel"

There I go again, I searched and got below solution for refreshing all folders in Thunderbird.

Go to Edit ->Preferences -> Advanced -> Config Editor and toggle the following parameter available in the list.
"mail.check_all_imap_folders_for_new" which toggles value from false to true and you are done. Now, I don't need to refresh each folder separately.

Reference for above solution:
http://alexlurthu.wordpress.com/2007/07/22/thunderbird-config-to-refresh-all-imap-folders/

Thursday, December 24, 2009

The only Active President of India so far

None other than great Dr. APJ Abdul Kalam ji. Though, President don't have much power to do, he was not wasting government money for useless travels and was inspiring young generation where ever he went to give a talk/chat with people. I remember the discussions that were happening while electing the next President when Dr APJ Abdul Kalam and other lady (don't remember her name) were contending for it. Now, I feel what would have happened if the lady was selected, we would have missed such a great president.

Just now heard that our current President of India,Prathibha Patil, brought her 3 dozen relatives along with her while travelling to some other place. We, the poor tax payers continue to pay taxes to let the politicians enjoy with our money. :-)

Monday, December 21, 2009

To start mplayer in shuffle and repeat mode

mplayer -shuffle -loop 0

Plugin for reading telugu news paper in mozilla firefox in linux

With changes in my cab routes and so change in my daily scheduled walk to catch cab, I was getting backpain (I rush in the last minute to catch the cab, so you can imagine how fast I need to walk) due to the heavy weight on my back on the name of "Laptop". So, I decided to configure my desktop for everything that I would need laptop for. Only thing that left was to read telugu news paper (yeah. I am addicted to "Eenadu" since my childhood when I was in 2nd or 3rd Std). So, I came across this plug in which would install the dynamic fonts needed for these news papers. Reference: http://www.adminbytes.com/2008/08/reading-malayalam-newspapers-using.html

Friday, December 11, 2009

Installing Maven in fc9 and maven plugin for eclipse

for maven plugin - install the below plugin
http://www.eclipse.org/iam/
and the respective installation instructions are available at http://code.google.com/p/q4e/wiki/Installation
and once it is installed successfully, select maven by right clicking the project and then build is done using maven rather ant.


And, for installing maven in fc9, yum is showing maven2.0.4 which is old and doesn't work with latest maven pom.xml. So, in order to install latest version of maven, get the latest version from apache site http://maven.apache.org/download.html and download it. Once downloaded, specify the bin path in your PATH variable. Reference: http://beans.seartipy.com/page/2/

Tuesday, December 08, 2009

Ilayaraja rocks

We watched "Paa" in Solapur. It was nice as it was unexpected. We reached Solapur early and there was nothing to do as there was a gap of 5 hours for the train which we have to take. So, we planned to go for some movie and we found this theater where there were three options

1. De dana dan
2. Radio
3. Paa

And, we had this impression that Paa would be senti but we thought, that's ok. I don't want to go for Radio for sure.

But, Paa is not senti. And, Amitabh rocks as a child actor and Ilayaraja music rocks like anything. Vidya Balan looked much better than in Parineeta. Overall, I loved this movie and recommend to watch. :)

Thursday, November 26, 2009

Junit testing

After a long break, recently I came across junit testing. This was when I was helping my team member in writing junit tests and suggested where to start from. Then, there was an issue in running a TestSuite.

The code that I used before is something like below:

import junit.framework.Test;
import junit.framework.TestSuite;

public class AllTests {

public static Test suite() {
TestSuite suite = new TestSuite("Test for something");
suite.addTestSuite(SomeClass.class);
return suite;
}
}


But, when i tried to run, I got below error:
java.lang.Exception: No runnable methods

By the way, this is with junit-4. So, here is what we figured out -
In junit-4, they use annotations for TestSuite. So, the old syntax is not working. Here is working syntax

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses( { SomeClass.class})

public class AllTests {
}

So simple. Isn't it?
Also, download junit coverage plugin for eclipse using this update site http://update.eclemma.org/ . More details are here regarding eclemma