Friday, December 2, 2011
Thursday, November 17, 2011
Quick HOWTO : Linux Networking
A fantastic document on Linux networking is available here: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking
Friday, November 11, 2011
Best 11 questions Gallup scientists have found to ask customers anywhere in the world
Leaders have yet to learn that relationships trump price in almost all business circumstances, from hair salons to high-tech consulting. He who most deeply understands the customer's needs tends to win and always gets the highest margins. That's why talent and relationships can almost always beat low price -- they inspire customer engagement. To measure customer engagement, these are the best 11 questions Gallup scientists have found to ask customers anywhere in the world:
CE1. Taking into account all the products and services you receive from them, how satisfied are you with (Company) overall?
CE2. How likely are you to continue to do business with (Company)?
CE3. How likely are you to recommend (Company) to a friend or associate?
CE4. (Company) is a name I can always trust.
CE5. (Company) always delivers on what they promise.
CE6. (Company) always treats me fairly.
CE7. If a problem arises, I can always count on (Company) to reach a fair and satisfactory resolution.
CE8. I feel proud to be (a/an) (Company) customer.
CE9. (Company) always treats me with respect.
CE10. (Company) is the perfect company/product for people like me.
CE11. I can't imagine a world without (Company).
I think this is indeed a very good compilation!
Tuesday, November 1, 2011
Quotable Quotes on Money
Sep 29, 2012 - 5 minute wrapup
"Yearly figures, it should be noted, are neither to be ignored nor viewed as all-important. The pace of the earth's movement around the sun is not synchronized with the time required for either investment ideas or operating decisions to bear fruit." - Warren Buffett's 2010 letter to shareholders of Berkshire Hathaway
October 19, 2011 - 5 minute wrapup -
"Yearly figures, it should be noted, are neither to be ignored nor viewed as all-important. The pace of the earth's movement around the sun is not synchronized with the time required for either investment ideas or operating decisions to bear fruit." - Warren Buffett's 2010 letter to shareholders of Berkshire Hathaway
October 19, 2011 - 5 minute wrapup -
"It takes character to sit there with all that cash and do nothing. I didn't get to where I am by going after mediocre opportunities." - Charles Munger
20-Oct-2011 - 5 minute wrapup -
"As I grow older, I pay less attention to what men say. I just watch what they do." - Andrew Carnegie
29-Oct-2011 - 5 minute wrapup -
"Here's one truth that perhaps your typical investment counselor would disagree with: if you're comfortably rich and someone else is getting richer faster than you by, for example, investing in risky stocks, so what?! Someone will always be getting richer faster than you. This is not a tragedy." - Charlie Munger
29-Oct-2011 - Market Musings (M2) -
"As I grow older, I pay less attention to what men say. I just watch what they do." - Andrew Carnegie
5-Nov-2011 - 5 minute wrapup -
"If past history was all there was to the game, the richest people would be librarians." - Warren Buffett
30-Apr-2011 5 minute wrapup -
"Investing in stocks is an art, not a science, and people who've been trained to rigidly quantify everything have a big disadvantage. If stock picking could be quantified, you could rent time on the nearest Cray computer and make a fortune. But it doesn't work that way. All the math you need in the stock market you get in the fourth grade." - Peter Lynch
Tuesday, October 25, 2011
A simple counter/timer code in Java
It is a very common requirement to measure time taken by a particular method/function or block of code. The following simple timer can come handy:
The accuracy of results can be improved by using System.nanoTime().
long startTime = System.currentTimeMillis();
// Code block or method/function to time.
long endTime = System.currentTimeMillis();
System.out.println("Time taken: " + (endTime - startTime) + " milliseconds");
The accuracy of results can be improved by using System.nanoTime().
Monday, October 10, 2011
How to execute HTTP command in Linux on command line
curl is a command line utility to execute commands in protocols like HTTP, FTP, etc on Linux.
Example: curl -k --user admin@abc.xyz.com:password "https://abc.xyz.com:8080/api/data"
where:
-k : disable SSL (when server doesn't enforce SSL authentication)
--user: authentication credentials of format "username:password"
Example: curl -k --user admin@abc.xyz.com:password "https://abc.xyz.com:8080/api/data"
where:
-k : disable SSL (when server doesn't enforce SSL authentication)
--user: authentication credentials of format "username:password"
How to print time taken in milli seconds by a command on UNIX
Just replace "" in one line script below with your command and it will output the time taken by the command in milli seconds
You can also manipulate the dividing factor (1000000 in command below) to get output with varying degrees of precision
START=$(date +%s%N); ; END=$(date +%s%N); DIFF=$(( $END - $START )); echo "It took $(( $DIFF / 1000000)) milli seconds"
You can also manipulate the dividing factor (1000000 in command below) to get output with varying degrees of precision
START=$(date +%s%N);
Monday, September 26, 2011
How to type in "Marathi" (devanagari) in Windows?
There are various ways of doing it and I have listed them below:
Option 1: Unicode (using transliteration software/websites)
You will have to type in Unicode format (more
details if interested: http://en.wikipedia.org/wiki/Unicode).
Unicode being an international standard
makes it usable without requiring to install any fonts. All browsers
support Unicode, which may at most need to be enabled. Currently Gmail offers typing and reading mails in Marathi this way. Other way is to use Google transliteration that is available here: http://www.google.com/transliterate/indic/MARATHI. The only disadvantage of this is that you need an active internet connection.
Option 2: IME (Input method editor)
Google also gives an interesting tool
called Google IMEI (http://www.google.com/ime/transliteration/) which
allows you to type Marathi characters represented in Unicode in any
application on Windows (notepad, directory names, file names,
practically anything...).
How to install
and use Google IMEI is given here:
http://www.youtube.com/watch?v=XRy3_Gmt5ak&feature=mh_lolz&list=FL_5qtqa6_rBw. Installation of it requires interenet connection. However, the biggest advantage is that once installed it can be used without active internet connection. If you want to install on a PC that does not have internet connection, please check this link: http://shashigokhale.blogspot.com/2011/09/how-to-install-google-ime-without.html
Option 3: Font files
You will have to install the specific
font on the computer. This basically means copying the font file
(typically of extension of ttf or fon) into C:\Windows\Fonts.
My choice: Option 2!
Saturday, September 24, 2011
How to install Google IME without internet connection
This is a very common problem faced by Google IME users in India (where internet penetration is still growing). I found these links, where people have find various ways of getting the offline installer to solve the problem. The links are given below:
http://hi.fi.vc/2010/07/google-transliteration-ime-offline.html
http://www.trishtech.com/internet/google_transliteration_ime_offline_installer.php
So, go ahead and enjoy typing in your mother tongue.
http://hi.fi.vc/2010/07/google-transliteration-ime-offline.html
http://www.trishtech.com/internet/google_transliteration_ime_offline_installer.php
So, go ahead and enjoy typing in your mother tongue.
Friday, March 25, 2011
10 calcuations for calculating worth of investments
Very good information about such 10 formulae is available at: http://specials.rediff.com/money/2008/jul/22slde01.htm
SIP returns calculator: http://www.indiainfoline.com/personalfinance/calculators/mutualfunds/systematic-investment-plan-returns
Numerous calculators: http://www.indiainfoline.com/personalfinance/calculators/
SIP returns calculator: http://www.indiainfoline.com/personalfinance/calculators/mutualfunds/systematic-investment-plan-returns
Numerous calculators: http://www.indiainfoline.com/personalfinance/calculators/
Labels:
calculator,
favourite,
finance,
money,
returns
Sunday, March 13, 2011
XML parsing
Below is a list of very helpful links that I found related to XML parsing.
How to convert Document to String (source: http://www.theserverside.com/discussions/thread.tss?thread_id=26060)
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
//method to convert Document to String
public String getStringFromDocument(Document doc)
{
try
{
DOMSource domSource = new DOMSource(doc);
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.transform(domSource, result);
return writer.toString();
}
catch(TransformerException ex)
{
ex.printStackTrace();
return null;
}
}
How to convert Document to String (source: http://www.theserverside.com/discussions/thread.tss?thread_id=26060)
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
//method to convert Document to String
public String getStringFromDocument(Document doc)
{
try
{
DOMSource domSource = new DOMSource(doc);
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.transform(domSource, result);
return writer.toString();
}
catch(TransformerException ex)
{
ex.printStackTrace();
return null;
}
}
How To Pretty Print Xml With Java (source: http://www.coderanch.com/how-to/java/HowToPrettyPrintXmlWithJava)
Examples of XML Transformer OutputKeys (source: http://www.javadocexamples.com/javax/xml/transform/javax.xml.transform.OutputKeys.html#STANDALONE)
Thursday, February 24, 2011
How to change hostname in Linux
- Edit file /etc/sysconfig/network using your favourite editor. For vi enter vi /etc/sysconfig/network
- Look for HOSTNAME=xxxxxx
- Change the xxxx to the name you wish to set for your computer. (ex: HOSTNAME=hula.com)
- Save the file and restart the xinetd service. (ex: type service xinetd restart in your shell)
Monday, February 21, 2011
Recharge your prepaid mobile phone online
Service providers:
==============
Vodafone: http://www.vodafone.in/online_prepaid_recharge/online_recharge_mobile.aspx
BSNL: http://portal.bsnl.in/rc/aspxfiles/login.aspx
Banks:
======
HDFC Bank: http://www.hdfcbank.com/personal/payments/prepaid_refill/pre_refill.htm
ICICI: http://www.icicibank.com/Personal-Banking/onlineservice/online-services/PrepaidMobileRecharge/prepaid-mobile-recharge.html
Third party (I have personally not used any of them, but looks good)):
==========
http://www.rechargeitnow.com
http://www.onestoprecharge.com
http://rechargemobilephones.com/india/online-recharge-mobile/
Hope this information is helpful.
==============
Vodafone: http://www.vodafone.in/online_prepaid_recharge/online_recharge_mobile.aspx
BSNL: http://portal.bsnl.in/rc/aspxfiles/login.aspx
Banks:
======
HDFC Bank: http://www.hdfcbank.com/personal/payments/prepaid_refill/pre_refill.htm
ICICI: http://www.icicibank.com/Personal-Banking/onlineservice/online-services/PrepaidMobileRecharge/prepaid-mobile-recharge.html
Third party (I have personally not used any of them, but looks good)):
==========
http://www.rechargeitnow.com
http://www.onestoprecharge.com
http://rechargemobilephones.com/india/online-recharge-mobile/
Hope this information is helpful.
Wednesday, January 12, 2011
Fixing Master Boot Record (MBR) in Windows XP without the recovery console (equivalent of fdisk /mbr on XP)
The solution to this problem is given here: http://eivind.dataweb.no/?p=13. In essence the solution is to use a utility named MBRFix available here: http://www.sysint.no/products/Download/tabid/536/language/nb-NO/Default.aspx
Howto for CPPUNIT
Good information about using CPPUNIT is available at:
http://blog.csdn.net/snowphy/archive/2004/10/22/146766.aspx
http://www.uow.edu.au/~nabg/222/Lectures/P3UnittestingforC++.pdf
An important point is to using macros with which you can specify custom message for describing the error. In the following example, use the second macro instead of the first and so on:
http://blog.csdn.net/snowphy/archive/2004/10/22/146766.aspx
http://www.uow.edu.au/~nabg/222/Lectures/P3UnittestingforC++.pdf
An important point is to using macros with which you can specify custom message for describing the error. In the following example, use the second macro instead of the first and so on:
- CPPUNIT_ASSERT(condition)
Assertions that a condition is true. - CPPUNIT_ASSERT_MESSAGE(message, condition)
Assertion with a user specified message.
I deleted Linux partition and now Windows XP does not boots
I am just getting a grub prompt. Tried to use Windows setup disk, but it went forward and gave blue screen. The following steps found at: http://www.linuxquestions.org/questions/linux-software-2/booting-windows-from-the-grub-prompt-275446 fixed the problem.
root (hd0,0)
makeactive
chainloader --force +1
boot
root (hd0,0)
makeactive
chainloader --force +1
boot
Subscribe to:
Comments (Atom)