How To Improve Laptop / Notebook Battery Lifetime

One of the easiest things to kill is the battery of a laptop/notebook. In fact, it is common that some people may notice their laptop battery life growing shorter as the weeks go by. One reason why this is so is because of the way the battery is being used. To ensure that batteries last for the long term, they need to be used properly. Most people keep their notebooks plugged in all day, and whenever they can find a

Continue Reading

Get Random Colour in PHP

Ever wanted to get random colours for your PHP scripts? This easy randomise script does just that – It randomly picks a few colours for you! <? //randomise the RGB colours $r = rand(128,255); $g = rand(128,255); $b = rand(128,255); //sets the colour code in 000000 format $colour = dechex($r) . dechex($g) . dechex($b); ?> That’s it! Then just use $colour in your PHP code. The dechex() method just converts the number to the hexadecimal format that you need. I

Continue Reading

Microsoft Word =rand Automatically Creates Text

Microsoft Word has a little known feature that inserts the following text into your document: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. “The quick brown fox jumps over the lazy dog” is a pangram (a phrase that uses all the letters of

Continue Reading

Ideal Typing Postures

In the ideal typing posture, muscle loads are minimized. This posture is achieved when the keyboard is below seated elbow height and the keyboard base is gently sloped away from the user so that the keys are accessible to the hands in a neutral posture. In this position the arms, shoulders, neck and back can relax, especially during brief rest pauses. Also, in this slightly reclined sitting position the low back rests against the lumbar support of the chair, the

Continue Reading

Ergonomic Tips on Healthy Laptop Usage

Laptops are getting really pervasive. It used to be that laptops were the exclusive tools of the rich, or busy business people. These days, almost everyone owns a laptop. The problem with a laptop, however, is that it isn’t ergonomic – in fact, most people use their laptops in a way that will cause health problems. I suffered from a stiff neck and backaches before I decided that I needed to completely change the way I use my laptop. Un-ergonomic

Continue Reading

Replace/remove character in a String

To replace all occurences of a given character : String.replaceAll("n", ""); // Remove all n String.replaceAll("n", "r"); // Replace n by r To replace a character at a specified position : public static String replaceCharAt(String s, int pos, char c) { return s.substring(0,pos) + c + s.substring(pos+1); } To remove a character : public static String removeChar(String s, char c) { String r = ""; for (int i = 0; i < s.length(); i ++) { if (s.charAt(i) != c)

Continue Reading

Site Footer

Sliding Sidebar


The contents on this blog are not intended as professional advice. The author disclaims any liability, loss, or risk taken by individuals who directly or indirectly act on the information contained on this blog.