Snippet IT IT News, Programming, Internet and Blogging

13Sep/110

eGenting Programming Competition 2011

Calling all talent programmers! eGenting Programming Competiton 2011 is now open for registration! Do you dare to come?

eGenting Programming Competiton 2011

20Jun/110

New Top-Level Domain – Dot Whatever

ICANN (Internet Corporation for Assigned Names and Numbers) has recently approved new top-leve domain name. Currently, the web has .com .net .org or country level TLDs. Soon you can expect to have .whatever domain (whatever means whatever).

To have this kind of domain is not cheap. The application alone is $185,000 and the annual fee is $25,000. I wonder why the application fee and the annual fee is too expensive. I think it is meant to control the number of people that own the domain names.

The application for the new generic will be accepted from January 12, 2012 to April 12, 2010 and the new domain name will be appear on the Internet within a year.

Personally I think this is a great idea because it may cause confusion to most people. People might not be able to differentiate a company domain from a government domain for instance.

4Mar/110

Google Adsense: Now available for mobile (beta)

Google Adsense is now available on mobile. It is still in beta mode and I have tried it now just now, not much feature but it us pretty good. You can see earnings and graphs.

However it is great that now you can see your website earning on your phone!

Point your browser on your mobile device to Google Adsense website and it will bring you to the mobile version of Adsense website.

11Sep/100

Gmail: Priority Inbox

Gmail is great and comes with a lot of useful features like labeling and filter to let your organize your mail box. Although these features are great but they work according to preset or static values. They are not smart enough.

It becomes a problem when you have too much of unread emails. What if a bunch of emails come in at the same time? It could be a pain to find out which email is important to read first.

Tagged as: Continue reading
16Aug/100

Unix Shell Script: How to Receive Input Right After Echoing A Line

For example, say I echo a line of text in shell script and I want to receive user input just right after the text (not in the next line). The are several ways to do it:

Method 1

echo "Enter a value: \c"
read value

Method 2

echo -n "Enter a value: "
read value

Method 3

read -p "Enter a value: " value

30May/100

Database: CHAR and VARCHAR – What are the differences?

Most programmers may already know the main different between CHAR and VARCHAR - The first one supports fixed-length data and the second one supports variable-lengths of data.

Some people may think, since VARCHAR can do what CHAR does, then why we still need CHAR in our database design. I even have heard one of the very experienced Oracle database administrator say "Nowadays nobody is using CHAR anymore, you can forget about putting CHAR column in your database design".

12Jan/100

Java: Use ByteBuffer As InputStream

Sometime, your program may need to read data from a ByteBuffer buffer into a InputStream object. There is no class in Java library that provide the facility to do the conversion.

Anyway, to use a ByteBuffer object as an InputStream is pretty simple. What you need to do is to write a class wrapper that inherit InputStream and override the read() function in InputStream.

12Jan/100

100th Posts For Snippet IT

Finally, this blog has reached 100 posts! Yeah!

It really takes a long time for me to do this because I'm not blogging this site full timely. Second, sometime I'm just out of idea what to blog.

I will try work harder to share more information on programming and anything related to information technology in this new year. Thanks for reading!

5Jan/102

Java: Format Integer Into Fixed Width String

Sometime, you may want to format an integer or a long value into a fixed width String. You need to display the value in fixed width especially in reports where you want to keep the numbers in aligned (e.g. 3456 as 0003456 and 1234 as 0001234).

Other than that, you may also want to format the integer value for a better visibility. For example, to display integer value as a document number (e.g. 12345678 as 00-01234-5678), for example an account number.

The Java.format() is not flexible enough to solve my problem. At least it cannot be used to format a fixed length document number in the format I want: XX-XXXX-XXXX. Therefore I decide write my own format function.

21Dec/090

Happy Holidays from your Google team!

I just got a greeting card from Google Team. Do you have one?

Happy Holidays from Google - Card

Happy Holidays from Google - Earth

The email entitles  "Happy Holidays from your Google team!". Opps... when do I have a Google Team that works for me? Ha ha.

Anyway thank you Google! Happy Holiday too.