no, i will not write about the interesting places u can find in singapore (or the lack of them for that matter :p). tapi yang mau dibahas adalah, kejutekan orang2 di singapur. sebenernya gw agak tidak setuju dengan penyamarataan semacam ini, karena teman2 singaporean gw super baik, rendah hati, dan berbudi pekerti luhur. but it’s not just me. dari semua orang yang datang berkunjung kesini, kesan pertama mereka bukan

“wah, singapur bersih ya”

atau

“wah, orang2nya disiplin ya, ga nyebrang sembarangan”

atau

“wah, ada mrt”

tapi, yang keluar adalah

“ih, jutek2 banget sih orang singapur” (atau semacamnya, tapi intinya sama)

tapi memang sih, agak jarang bisa menemukan keramahan asia di sini. kan katanya orang2 asia ramah2 kan, ato indonesia ya itu. anyways, bukannya di indonesia semua ramah juga, ada jg yg jutek, banyak bahkan, kadang jutek banget minta dijitakin kepalanya. tapi disini, sejauh ini kebanyakan semuanya minta dijitakin. haha. no offense yah kalo ada orang singapur yg baca (mungkin orang2 ini bukan singaporean, just some foreign workers like moi).

ada beberapa insiden kejutekan yg pernah gw alami disini, tapi karena kelamaan, jadi uda lupa, cuma inget beberapa, here are some:

hari pertama sampe sini, uda dimarahin sama supir yg jmpt, gara2 keluar paling akhir. haha. ga ada deh pelanggan adalah raja. DIA adalah raja, siapapun dia.

terus pernah lagi pesen taksi dimarahin karena salah nunggu. “biasanya saya kalo jemput orang2nya nunggu sini”. yea rite, kaya gw suka perhatiin lu kalo lagi jmpt orang.

suatu hari, dengan senyum yang ramah sambil nahan pipis, nanya baik2 kamar mandi dimana, daaann, ga dijawab. cuma tunjuk pake tangan, daaann, nunjuknya bukan ke arah kamar mandinya, tapi ke arah papan penunjuk arah kamar mandi. ya okay, maaf deh gw ga liat papannya, namanya juga lagi panik nahan pipis.

terus di lift, kebetulan karena berdiri deket pencetan, pas ada yg masuk gw tanya dong mau ke lantai berapa. sambil senyum ni, uda ky petugas lift. eh buset, dijawabnya jutek bgt “6thx” ga pake senyum. ya, at least pake terima kasih. mungkin lagi sakit gigi, gabisa ramah2. dimaafkan.

itu ga seberapa sih tapi, yg lebih heboh lagi miri kayanya. sampe pernah diancam dilaporin ke kedutaan supaya dideportasi cuma gara2 cancel appoinment, haha. uda gila kali ya.

The storm is coming but i don’t mind.
People are dying, i close my blinds.

All that i know is i’m breathing now.

I want to change the world…instead i sleep.
I want to believe in more than you and me.

But all that i know is i’m breathing.
All i can do is keep breathing.
All we can do is keep breathing now.

All that i know is i’m breathing.
All i can do is keep breathing.
All we can do is keep breathing now.

All we can do is keep breathing
All we can do is keep breathing
All we can do is keep breathing
All we can do is keep breathing.
All we can do is keep breathing now.

[Ingrid Michaelson]

Let’s get out of this country
I’ll admit I am bored with me
I drowned my sorrows and slept around
When not in body at least in mind

We’ll find a cathedral city
You can convince me I am pretty
We’ll pick berries and recline
Let’s hit the road dear friend of mine

Wave goodbye to our thankless jobs
We’ll drive for miles maybe never turn off
We’ll find a cathedral city you can be handsome I’ll be pretty
What does this city have to offer me?

Everyone else thinks it’s the bee’s knees
What does this city have to offer me?
I just can’t see
I just can’t see

Let’s get out of this country
I have been so unhappy
Smell the Jasmine my head was turned
I feel like getting confessional
We’ll find a cathedral city you can convince me I am pretty

What does this city have to offer me?
Everyone else thinks it’s the bee’s knees
What does this city have to offer me?
I just can’t see
I just can’t see

[camera obscura]

I, I got a low down dirty feeling
That I’ve been cheated on, and lied to
If it’s so then it’s wrong, we’ve hung on for so long
Why don’t we have that magic anymore


I got a strange sneaking suspicion
That it’s been going on for some time now
Something shines in your eyes, something hurts deep inside
I won’t stand in your way anymore

You said that I’m just a little girl
Who’s easily led astray
Well aren’t you the same little guy
Who always gets his way

[Stray Cats]

Her skin is white cloth,
And she’s all sewn apart
And she has many colored pins
Sticking out of her heart.

She has a beautiful set
Of hypno-disk eyes,
The ones that she uses
To hypnotize guys.

She has many different zombies
Who are deeply in her trance.
She even has a zombie
Who was originally from France.

But she knows she has curse on her
A curse she cannot win.
For if someone gets
Too close to her,

The pins stick farther in.

[tim burton]

Do it Again
Do it Again

Again and again

Its a shame, its a shame, its a perfect shame.
Creep under my door, and we do it again, oh.

Its easy and easy and easy and easy
And creepy and creepy and creepy, oh
Again, again, again, again.

Again and again and again
Do it Again
Do it Again

Again and again and again
Do it Again
Do it Again

Again & Again

Say my name, say my name, say my stupid name?
Its stupid how we always seem to do it again, oh.

Youre so stupid and perfect and stupid and perfect.
I hate you, I want you, I hate you, I hate you, oh.
Again, again, again, again.

Again and again and again
Do it Again
Do it Again

Again and again and again
Do it Again
Do it Again

Again and again

[the bird and the bee]

June wiki..not late this time, just written in the very last minutes :p ..enjoy.. ;*


For some applications, it might be important to ensure that only one instance of that application can run at one time in a particular machine. The example is an application that during it’s running time modifies a stored data, whether it’s in the registry or database. Several instances of this application running at the same time might result in data corruption.

There are some known method to achieve such behavior, some are generic and some other are language specific. In this article, several methods will be discussed.

Creating a lock file with process id

During it’s initialization, an application were to create a file. If the file is not exist, that means there aren’t any other instances of this application which are already running. Just before the application closes, it should delete the file in order to allow the application to run again later. Inside the file, the application should write the it’s process id. This process id is important to avoid trouble if the application crashes and does not exit normally. In such case, the application might not delete the file before it closes. Next time the application is run, it will notice that the lock file still exists, thus assuming that there’s another instance of the application already running. This will prevent the application to run again forever, except if the file is deleted manually. With the existence of the process id, when the application tries to run and notice that the lock file exists, it can check for the process id and see whether that particular process id is still up and running. If it does, the application exit, otherwise, the application would modify the file to contain the new process id.

Creating a file, reading the content, writing, and deleting it should not be a problem. However, most of us might not be to familiar to read a process id of an application, thus it might require a little exploration.

Creating a lock file and open the file

This method is probably a little simpler compared to the previous one. This does not include detecting process id of the application. You will only need to create, delete, open a stream, and close a document. The idea is the application keeps the stream of the file open during its lifetime, to avoid other instance from deleting it. When another instance starts, it will search for the lock file and tries to delete it. Since the file is open, the instance will not be able to delete it, and it will know that another instance is already running, hence exit. When the application crashes, the open stream from the file will automatically be closed, thus the next instance will be able to run.

Creating a lock file and lock the file

In Java, you can specifically lock a file and release it when you’re done. This lock will automatically released if your application exits, even when it’s due to crash. Here’s the example of locking and releasing the lock of a file using Java:

try {
  File file = new File("filename");
  FileChannel channel = new RandomAccessFile(file, "rw").getChannel();
  FileLock lock = channel.lock();
  lock = channel.tryLock();
  lock.release();
  channel.close();
} catch (Exception e) {
  //do nothing
}

Creating a port listener

In all of the previous methods, when an instance cannot run because another instance is already running, the instance can exit. Another modification to that is probable is the instance can show a message box notifying user that another instance of the application is already running. To even make it better, you might want to open and bring forward the window of the already running instance. If you want to do this, then probably this method is a good choice. The idea of this method is to make your application listens to a particular port. When you try to listen to a port that has already been listened to, then you will receive an exception. This means, another instance is already running. Then, to make the already running application open its windows, bring the windows to focus, or whatever you would like it to do, you send messages through the port. Just make sure that when you implement the listener, you implement them to react accordingly to the message they receive from the port. This method, despite of its attractiveness to allow you to send message to the already running instance, also have a drawback. Even though we can specify the application to listen to a rarely used port, there still be chances that another application is using the exactly same port, which will prevent out application to ever run.

Use port listener and lock file

Another method you can use is combining the port listener and a lock file. The application should first check whether the lock file exists, if it’s doesn’t exist, the application will try to search for an open port, create the lock file, write the port number in the lock file and listens to the port. On termination of the application, the application should then release the listener and deletes the file. Another instance of the application will check the existence of the lock file. Once it found the lock file, it tries to listen to the port number written in the file. If it succeeded, it means the previous instance might terminates abnormally, but is not running anymore, thus it can run. Otherwise, it means the previous instance is still running and thus the new instance should exit.

Other methods

Other than these methods, you might also be able to fine methods, including the language specific ones, here are some examples:

- For Delphi

- For .NET

I’ve made up my mind,
Don’t need to think it over
If I’m wrong, I am right
Don’t need to look no further,
This ain’t lust
I know this is love
But, if I tell the world
I’ll never say enough
Cos it was not said to you
And that’s exactly what I need to do
If I end up with you

Should I give up,
Or should I just keep chasin’ pavements?
Even if it leads nowhere
Or would it be a waste
Even if I knew my place
Should I leave it there
Should I give up,
Or should I just keep chasin’ pavements
Even if it leads nowhere

I build myself up
And fly around in circles
Waitin’ as my heart drops
And my back begins to tingle
Finally, could this be it

Or should I give up
Or should I just keep chasin’ pavements
Even if it leads nowhere
Or would it be a waste
Even if I knew my place
Should I leave it there

Should I give up
Or should I just keep chasin’ pavements
Even if it leads nowhere
Or would it be a waste
Even if I knew my place should I leave it there
Should I give up
Or should I just keep on chasin’ pavements
Should I just keep no chasin’ pavements

[by adele]

Ahaha, tiba-tiba postingannya gini.. Jadi, di kantor sebulan sekali gw harus menulis di wiki lokal sana. Karena menulis buat gw merupakan suatu hal yang tidak terjadi secara alamiah sehingga menghabiskan waktu dan tenaga, sayang dong kalo adanya di wiki lokal aja. Jadi di tulis disini juga. Selain itu, sekarang gw uda telat blm nulis, bsk senin ga ke kantor, jadi ditulis disini supaya asisten saya saudari miri bisa memasukannya ke wiki, bukankah begitu mir?hihihi.. becanda mir..makasi yaaaa.. salam buat live update..kasitau kalo ito marah2 karena gabisa baca kode gw yg brantakan..hii, deg2an.. Baiklah, enuff chit chat, mari kita mulai tulisan cupu sok2 technicalnya:


To develop a desktop application that requires an internet connection, we might need to create a connection using proxy. Though in some cases we can ask user to provide the proxy setting that we need to use, in many other cases, the user themselves might not know the proxy setting that they are using. In such cases, detecting the proxy setting automatically might just be the answer. In this article, we will discuss on how to detect the proxy setting in Windows.

Proxy settings in windows
To know what the available proxy settings in Windows are, we can see the settings in the Internet Explorer. There are several options available:

1. Automatically detect settings.

2. Use automatic configuration script.

3. Use a proxy server for your LAN (manual configuration).

Where the information are stored

Information about this setting can be retrieved in the registry.

The registry key you should be looking for are available in the following location:
HKEY_CURRENT_USER>Software>Microsoft>Windows>CurrentVersion>Internet Settings

How to determine the setting

Different proxy settings will create different keys or different values in the registry as follows:

  • ProxyEnable: this key can be set to 0 or 1. The value 1 specifies that the manual configuration is used.
  • ProxyServer: if we specify manual configuration, the Address and Port of the proxy server is specified in this key with the format of <server address>:<server port> (i.e. “127.0.0.0:8080″)
  • ProxyOverride: for manual proxy settings, sometimes some local addresses will require you to bypass the proxy in order to be able to establish the connection. This key specifies which addresses are suppose to be bypassed. Different addresses are separated with a semicolon.
  • AutoConfigURL: when we specify to use an automatic configuration file for the proxy, the address to the automatic configuration file is available as a value in this key. The configuration file is a Proxy Auto Configuration (.pac) file. This file contains javascript functiona which will determine which proxy to use to connect to a particular server address.

Implementation tips

  • Reading Registry. To implement automatic detection of proxy setting in Windows, first, we need to be able to read the registry. For Java, we can use library such as the jRegistryKey to read and write to the registry.
  • Using .pac file. As a .pac file contains javascripts, it is most likely that we will not be able to use the file directly except if we create our on interpreter for javascript. However, a library is already available to parse such file, such as the pacparser. This library is a C library which allows you to retrieve the proxy that you should use to connect to a particular server address according to the .pac file.

[perhatian: posting ini ngga seserius judulnya]

cape deh, kenapa sih semua orang yang ngga secara fisik berada di indonesia dianggap ngga membangun bangsa. emang membangun bangsa itu apa sih? seriously, gw sampe bingung sama definisinya. kalo membangun bangsa adalah bantu2 bangun jembatan dan ngaspal jalan, maka gw sangat setuju kalo dibilang utk bangun bangsa harus ada di indonesia, gimana caranya kita ngaspal kalo kita bahkan ngga ada disitu.

i find this stereotype quite funny actually. jadi kalo mau digeneralisasi, berarti kalo gw di indonesia, pasti gw lebih membangun bangsa. apalagi kalo jadi pegawai negri kan berarti? kerja untuk negara gitu loh. kalo kita korupsi? ga masalah. selama masih di Indonesia, masih membangun bangsa judulnya. paling uang rakyat abis. tapi kan demi membangun bangsa, jadi knapa ngga? ;)

dari sudut pandang gw, dengan berada di luar indonesia, singapura tepatnya, gw justru lebih membantu bangsa daripada kalo misalnya saat ini gw di indonesia. berikut contohnya (remember, ini GW, bukan generalisasi semua org):

1. Lg suntuk, pengen makan makanan enak.
sekarang: beli indomiieeee, makan ayam penyet, makan ayam ojolali
di indo: beli makanan import, ke restoran2 cabang restoran luar, ato franchise luar, ato at least yg punyanya orang luar.

2. Janjian, ketemuan sm orang luar negri.
sekarang: tepat waktu, gaenak nanti kesannya orang indo suka telat (walaupun iya)
di indo: telat, plg cepet pas deh. “hehehe, aduuu, maaf ya, uda lama nunggu? maklum aja, kalo di indo emg biasanya kalo janji jm 2 berarti jam 3..hehe..get use to it..”

3. Promosi visit indonesia.
sekarang: promosi saat ngobrol2 santai tentang indonesia, encourage orang2 dateng ke indonesia
di indo: jalan-jalan ke singapur yu, lagi great sale loh.

4. Belanja.
sekarang: ya belanja juga sih, maaf, tidak bisa menolak godaannya. tapi ngga banyak. tetep nabung buat beli baju2,sepatu2,tas2 dan semua2 yg di indo pastinya lebih murah. ambil uang dari sini bawa balik ke indo, buat nci2 mangga dua ato mba2 di pasarbaru.
di indo: ya belanja juga sih. tapi nabung, abis itu: jalan-jalan ke singapur yu, lagi great sale loh.

5. Denger indo dijelek2in.
sekarang: memikirkan dengan sungguh2 bagaimana cara membalas secara halus tapi mematikan
di indo: haha iya, emg gt

6. Di acara talent show.
sekarang: kita saman yu
di indo: apaan sih

7. Promosi kuliner
sekarang: pulang ke indonesia, bawa balik bronis amanda sama batagor + sambal abc, ketagihan deh semua sekarang
di indo: promosi ke siapa?

Lagipula, gw kan jg menyediakan satu tempat kosong buat pengangguran di indonesia, daaan, mungkin satu orang itu kamu.

Kalo dibilang dgn disini gw membangun bangsa lain, yg jadi masalah kan mengenai gw membangun Indonesia apa ngga, bukan apakah gw membangun bangsa lain ato ngga. Kalaupun gw gamau, bangsa ini akan tetep nemu org lain kok, karena ternyata ya, percaya ato ngga, org2 negara lain itu banyak yg pinter loh. waaaaaa sulit dipercaya ya.. hehehe

Sementara, kalian sendiri (yg-di-indonesia-dan-ngeributin-kalo-org-keluar) sudah melakukan apa? kan kata pepatah jg: ask not what your country can do for you – ask what YOU can do for your country, bukan ask what your friend can do for your country. daripada abis tenaga nyumpah2in kita, mending bantuin bangun jembatan dan ngaspal jalan. ntar jg kita balik sendiri kok, mungkin membawa jarahan dari negara lain untuk bangun jembatan dan ngaspal jalan.

with love,
muah