How to backup and restore in PostgreSQL

I was fairly impressed with pgAdmin III when I first used it. It seems to be simple to use for anyone who can’t write their own SQL statements. I wasn’t too good and it and each time I execute a change in the database I have a feeling the world’s going to end. But one thing the pgAdmin III doesn’t do well is backup and restore.

Using pgAdmin III for PostgreSQL

(Using pgAdmin III for PostgreSQL. A screenshot.)

0. Objective

In the end it’s best to use the command prompt (or terminal) and in this really beginner tutorial, we’ll do a backup and restore using the command line.

1. Set PATH for PostgreSQL in Windows Vista

This guide assumes you install in ‘C:Program FilesPostgreSQL8.3’, the default installation directory. Continue reading “How to backup and restore in PostgreSQL”

I ate two products with melamine

I recently ate these 2 food that contains mild contents of melamine. I ate Julie’s Wheat Crackers and Julie’s Peanut Butter sandwich biscuit. They contain 0.7 to 0.26 ppm and 4.9 ppm to 23.4 ppm respectively. They won’t kill an adult but it sure doesn’t feel too good after I read that.

Julies Wheat Crackers

(Julie’s Wheat Crackers.)

Julies Peanut Butter sandwich biscuit

(Julie’s Peanut Butter sandwich biscuit.)

I generally feel that no one should be panicking like my mom. She thinks the world is going to end one day due to poisons in food. I corrected her by announcing, “the world will not end due to food poisoning; we’ll just poison our environment and we all die anyway.” I smirked. She gave me a confused look. “Well,” I sighed, “never mind.”

Here’s some information disseminated by the Agri-Food & Veterinary Authority of Singapore:

What is melamine?

Melamine is a chemical rich in nitrogen that is used in making plastics, glues and whiteboards. It was implicated in the recent cases of contaminated milk and milk products from China.

Are milk and milk products in Singapore safe?

Milk and milk products sold in Singapore are safe for consumption.

AVA has suspended the import and sale of all milk and milk products from China since 19 September 2008. Retailers and importers have been instructed to recall these products and these products will be withheld from sale.

Local food manufacturers have also been instructed to cease the use of milk and milk products from China as ingredients. Consignments which have newly arrived or are on the way will also be withheld from sale.

Why is it that only the “Julie’s” brand of biscuits have been recalled?

As a precautionary measure, all “Julie’s” brand biscuits are required to be withdrawn from sale. This is because 12 of the 17 affected biscuits that were just detected are “Julie’s” brand of biscuits. (Source: AVA Singapore, PDF file)

Well anyway, if you do have one of these Julie’s biscuit, you are advise not to consume it, to see a full list of food that contain melamine, click on Agri-Food & Veterinary Authority of Singapore’s the PDF link.

Radiohead – Faust Arp

Somehow the tune of the song matches my mood these days. The somewhat disjoint tune, the mumbled lyrics…

As I was traveling, whether to school, whether in the train, as long as I am alone, this is the tune that loops in my mind. I couldn’t really recall where I heard the tune. I can only remember it tells me to wake up, rise and shine.

Somehow, just somehow, I feel a little sad listening to this.

Radiohead – In Rainbows – Faust Arp

Lyrics for Radiohead – Faust Arp

One two three four

Wakey, wakey, rise and shine
It’s on again, off again, on again
Watch me fall like dominos
In pretty patterns Continue reading “Radiohead – Faust Arp”

Java SE 6 Update 10 is out: it’s the new one

Okay, main news is that Java SE 6 Update 10 is out. I’ve been using Update 10 beta since a month ago. I got it simply to see the Java Swing menu fonts using ClearType and that’s all.

Let’s side track a little to look at how sucky a state Java download page is in.

Sun Microsystem probably has the worst marketing team. Java SE 6 Update 10 is now. Before update 10 was probably update 7. The numbers doesn’t seem to be incremental.

But that’s okay, that’s just Sun’s way of doing thing. The version after Java 1.4.2 is Java 5. Java can’t compute elementary math. Java Standard Edition 6 is also known as Java 1.6.

You go to their Java SE download page and you see:

  • Java SE Runtime Environment (JRE) 6 Update 10
  • Java SE Development Kit (JDK) 6 Update 10
  • JDK 6 Update 10 with Java EE
  • JDK 6 Update 10 with NetBeans 6.1
  • JRE 6 Update 7 for Intel Itanium®
  • JDK 6 Update 7 for Intel Itanium®
  • JDK DST Timezone Update Tool – 1.3.9
  • Java SE 6 Documentation
  • Java SE 6 JDK Source Code
  • and other friends like Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy

Usually you just need whatever’s that’s need at the top. New Java developers would no doubt get intimidated by the choices available. They should have separated the developer page from the rest of the Java site. And on the developer page, there really should just be 3 options:

  • Java Standard Edition 6
  • Java Enterprise Edition 6
  • others…

Continue reading “Java SE 6 Update 10 is out: it’s the new one”

Turn your face into a music visualizer

Ahhaa this is so awesome in a geeky kinda way:

electric stimulus to face -test3 ( Daito Manabe )

Daito Manabe: Direction,programming and compose

supported by
Masaki Teruoka and Katsuhiko Harada: device
Taeji Sawai: sound design

I can actually feel the pain. This is what people do in the name artistic geekdom.

What he did was to use electrodes (or something) to stimulate his face muscles. The music turns the wires on and off causing his strange facial expressions.