How to do laundry

July 9th, 2010 NamPham No comments

Sometimes I get confused how to choose wash cycle and dry cycle ? how to separate clothes correctly ? when to wash in cold/warm/hot water ? what is normal/delicate/permanent press ? etc

It’s not a rocket science but very easy to forget and wrongly choose. Here is some experiences I collected from some websites and my own experience:

First, here is the basic setting for almost all laundry stuffs you might have:

Type of Stuff Cycle Water Temp Dryer Setting
Whites Regular Hot Normal
Colors Regular Warm/Cold Normal
Permanent Press Perm. Press Cold Permanent Press
Delicates Delicates Cold Delicates
Wool Delicates Cold Tumble/Fluff-No Heat

As far as I understand, permanent press clothes are stuffs that contains chemically treated fabric that makes your clothes less wrinkles. Clothes with permanent press features I can think of is like office uniforms, pants, t-shirts, skirts and 100% cottons. Delicates include polyesters, sweater, wool.

The harshness degree of each wash cycle and wash dryer is reduced gradually from regular > Perm. Press > Delicates.

As you see in the table, white/light color should be washed in hot water and can be used with bleach. Color one and heavy-duty clothes like jeans should be washed in cold water and taken inside-out to preserve color.

One more thing is that towels should washed separately from other stuffs. It can make other clothes marked with a lot of lints. I am having a bad experience with it right now :(

Also, don’t overload the machine. The height of cloth pile should not be over the height of the agitator (the center column in the machine).

Last but not least, I found some interesting guidelines in this following website. Check it out:

http://www.automaticlaundry.com/laundry1.htm

I will upload some firework pictures I took in the fourth of July in the next post :)

Categories: Daily Life Tags:

ASE 2010 Paper Notification

June 11th, 2010 NamPham No comments

Dear Nam, Tung, Hoan and Tien,

We are pleased to inform you that your paper

“Detection of Recurring Software Vulnerabilities”
(Paper-ID: ????)

has been accepted for publication as full paper in the proceedings of
the 25nd IEEE/ACM International Conference on Automated Software
Engineering (ASE 2010).

All papers went through a rigorous reviewing process and each paper
was reviewed by at least two reviewers.  Out of 191 submitted papers,
only 34 were accepted as full papers and another 31 as short papers.

In revising your paper, please pay attention to the reviewers’
comments below. The submission deadline for the camera-ready version
is July 8th.

Instruction for final submission of your paper including format,
copyright, etc. will be provided in a separate message.

Please note that at least one of the authors of the paper must
register for the conference. Otherwise, we will not be able to include
your paper in the proceedings.

Registration will open soon; please see the conference web site for
further information.

http://soft.vub.ac.be/ase2010/

Congratulations again on having your paper accepted and thank you for
your submission.  We look forward to meeting with you this September
in Antwerp.

Cheers,

Jamie and Elisabetta
ASE 2010 Program Chairs

Categories: Research Tags:

Majority Element

June 2nd, 2010 NamPham No comments

This is a very interesting question I found in CareerCup.com (link):

Given an unsorted array of n numbers, find the number that appears more than n/2 times. Do it in O(n) time and O(1) space.

First, I did not come up with the solution. The solution is described here.

Second, the idea is as follow: If there exists a major element M which appears more than n/2 times, all of the other elements can be paired with this element M. It means that if we crossed out each instance of element M with another element different from M, only instances of M are left.

In short, we need to maintain a counting variable count and a current candidate of major element M:

+ if count == 0 -> assign M to current element

+ else if M == current element -> count++

- else if M != current element -> count –;

After this loop, the candidate of major element is stored in M and it appears at least count time. Please note that M is only the element that seems to appear more than other elements. It does not mean it’s a major element. For example: given 1 2 3 -> M will be 3 which is not a major element.

Therefore, we need to count again all instances of element M to verify the number of occurrence is larger than n/2.

Here is the pseudo code for this algorithm:

FindMajorElement A[1..n]
//init
count = 1
M = A[1];

//find the candidate
for (int i = 2;i <= n;i++)
     if (count == 0) M = A[i];
     else if (A[i] == M) count++;
     else if count--;

count = 0; //reset the variable to number of instance M

//verify
for (int i = 1;i <= n;i++)      if (M == A[i]) count++; //return if (count >= n/2) return M
else return null;

That’s it :)

Categories: Algorithms, Daily Life Tags: