Saturday, July 19, 2014

cd dvd formats

  • CD-R (compact disc recordable)
CD-RW (compact disc re-writable)
DVD (Digital Versatile Disc)
DVD-RW    Digital Versatile Disc - Rewriteable


  • The DVD-R DVD+R difference can easily be summarized by the following:

* The DVD-R/RW standard was developed by Pioneer, and is used primarily
by Apple and Pioneer. These “minus” discs can only be written to in one
layer on the discs surface. In addition, this format is supported by the DVD
forum, but is in no way an industry standard. DVD-R/RW discs are cheaper
than the “plus” format.
* The DVD+R/RW format is supported by Philips, Dell, Sony, HP, and Mcft.
These discs can be written to in multiple layers, giving them s1
Slightly better and more disc storage than the “minus” format. Because of this additional capacity, they are slightly more expensive than “minus” discs.
http://faalacademy.wordpress.com/2013/05/10/the-difference-between-dvd-r-dvdr-dvdrw-and-dvd-rw/

  • Overview of DVD Recordable: +R Versus -R
1) The DVD-R (pronounced "DVD dash R") and -RW media formats are officially approved by the standards group DVD Forum. The DVD Forum was founded by Mitsubishi, Sony, Hitachi, and Time Warner, so it has tremendous industry support for its technical standards.
2) DVD+R ("DVD plus” R) and +RW formats are not approved by the DVD Forum standards group, but are instead supported by the DVD+RW Alliance. The DVD+RW Alliance is supported by Sony, Yamaha, Philips, Dell, and JP, so it also has tremendous industry support for its technical standards. Note that Sony supports both organizations.

The main functional differences between DVD-R and DVD+R are:
1) the DVD recorder's built-in defects management,
2) the way the recorders format and rewrite DVDs,
3) the price.

According to the claims of the DVD Alliance, using a DVD+R/+RW recorder will let you do the following:

1. Instantly eject without having to wait for finalized formatting.

2. Ability to record one DVD disc partially on PC and partially on television.

3. Background formatting: while the disc is being formatted, you can simultaneously record on already-formatted portions of the same disc.

4. Enhanced ability to edit filenames, movie and song titles, and playlists.

5. 100% compatibility with all other DVD players, while still enjoying these extra recording features.
http://netforbeginners.about.com/cs/multimedia/a/DVD_explained_2.htm

Thursday, July 10, 2014

literal

  • In computer science, a literal is a notation for representing a fixed value in source code.
In contrast to literals, variables or constants are symbols that can take on one of a class of fixed values, the constant being constrained not to change.
Literals are often used to initialize variables, for example, in the following, 1 is an integer literal and the three letter string in "cat" is a string literal:
 int a = 1;
 String s = "cat";

 http://en.wikipedia.org/wiki/Literal_%28computer_programming%29

Static Import in Java


  • import static java.lang.Math.PI;
double r = cos(PI * theta);

http://viralpatel.net/blogs/static-import-java-example-tutorial/

  • Static import can reduce code size and allow you to freely use static field of external class without prefixing class name on that
http://javarevisited.blogspot.com/2012/10/what-is-static-import-in-java-5-example-tutorial.html#ixzz370mlCrPP

BigDecimal

  • How to Use Java BigDecimal
Ability to specify a scale, which represents the number of digits after the decimal place
Ability to specify a rounding method
The java.math.BigDecimal class handles both of these considerations.

suppose we have a product which costs 10.00 in a given currency and the local sales tax is 0.0825, or 8.25%. If we work it out on paper, the tax amount is,
10.00 * 0.0825 = 0.825
Because our precision for the currency is two digits after the decimal, we need to round the 0.825 figure. Also, because this is a tax, it is good practice to always round up to the next highest cent. That way when the accounts are balanced at the end of the day, we never find ourselves underpaying taxes.
0.825 -> 0.83
so the total we charge to the customer is 10.83 in the local currency and pay 0.83 to the tax collector. Note that if we sold 1000 of these, we would have overpaid the collector by this much,
1000 * (0.83 - 0.825) = 5.00

http://www.opentaps.org/docs/index.php/How_to_Use_Java_BigDecimal:_A_Tutorial


  • The java.math.BigDecimal class provides operations for arithmetic, scale manipulation, rounding, comparison, hashing, and format conversion.
Two types of operations are provided for manipulating the scale of a BigDecimal:

    scaling/rounding operations
    decimal point motion operations.
http://www.tutorialspoint.com/java/math/java_math_bigdecimal.htm

CamelCase Java Naming Convention

CamelCase Java Naming Convention
CamelCase (also known as Upper CamelCase) is where each new word begins with a capital letter (e.g., CamelCase, CustomerAccount, PlayingCard).
http://java.about.com/od/javasyntax/a/nameconventions.htm

Monday, July 7, 2014

association vs composition

COMPOSITION
Imagine a software firm that is composed of different Business Units (or departments) like Storage BU, Networking BU. Automobile BU. The life time of these Business Units is governed by the lifetime of the organization. In other words, these Business Units cannot exist independently without the firm. This is COMPOSITION. (ie the firm is COMPOSED OF business units)

ASSOCIATION
The software firm may have external caterers serving food to the employees. These caterers are NOT PART OF the firm. However, they are ASSOCIATED with the firm. The caterers can exist even if our software firm is closed down. They may serve another firm! Thus the lifetime of caterers is not governed by the lifetime of the software firm. This is typical ASSOCIATION

http://stackoverflow.com/questions/731802/what-is-the-difference-between-composition-and-association-relationship