Thursday, January 7, 2010

Missing Passport - Small Idea Small Blog

If you find any important document like Driving Licence, Ration Card, Passport, Bank Passbook Etc., missed by someone, simply put them into near by any POSTBOXES. They'll automatically reach the owner, and fine will be collected from them.

Tuesday, January 5, 2010

Learn Flash ActionScript Techniques - Round Nearest Decimal Place

There are numerous reasons to round numbers. For example, when displaying the results of a calculation, you might display only the intended precision.Because all arithmetic in ActionScript performed with floating-point numbers, some calculations result in unexpected floating-point numbers that must be rounded.For example, the result of a calculation may be 3.99999999 in practice, even though it should be 4.0 in theory.

The Math.round() method returns the nearest integer value of any parameter passed to it

trace(Math.round(29.577)); // Displays: 29
trace(Math.round(189.697)); // Displays: 189

The Math.floor() method rounds down, and the Math.ceil() rounds up:

trace(Math.floor(204.99)); // Displays: 204
trace(Math.floor(401.01)); // Displays: 401


To round a number to the nearest decimal place:

1. Decide the number of decimal places to which you want the number rounded. For example, if you want to round 90.337 to 90.34 then you want to round to two decimal places, which means you want to round to the nearest .01.

2. Divide the input value by the number chosen in Step 1 (in this case, .01).

3. Use Math.round() to round the calculated value from Step 2 to the nearest integer.

4. Multiple the result of Step 3 by the same value that you used to divide in Step 2.

For example, to round 90.337 to two decimal places, you could use:

trace(Math.round(90.337 / .01) * .01); // Displays: 9.34

You can use the identical math to round a number to the nearest multiple of an integer.

For example, this rounds 92.5 to the nearest multiple of 5:

trace(Math.round(92.5 / 5) * 5); // Displays: 95

Saturday, January 2, 2010

New Year Celebration 2010

Lot of Excitement with my team members (C2 Workshop Pvt Ltd)
















Thirukkural