This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Links for 2009-03-05 [del.icio.us]
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
APNG Feature Detection | Elijah Grey
"I have made a simple script that utilizes the HTML 5 <canvas> API in only 10 functional lines of JavaScript to detect if a browser supports APNG images. It can be useful for deciding when to serve a client browser APNG images instead of GIF images.
This will set the variable, apng_supported to true if the browser supports APNG."
Play! Manual - Edit your application in the browser with Bespin
"Bespin is a Mozilla Labs experiment on how to build an extensible Web code editor using HTML 5 technology. The Play! bespin module allows to edit all the application sources directly in the browser using bespin."
IE6 usage in full collapse in Norway
"From the mid of February when the campaign started and up til today IE6 usage have declined from 8.3% to 7.0% in digi.no's weblogs. These are *massive* numbers for such a short amount of time, interpolating this IE6 will be completely gone in less then four months from now. On their "sister magazine" (dinside.no) the declination of IE6 usage have been even more drastic. In the same period at dinside.no IE6 usage have declined from 12.8% to 10.6%. And this is within 14 days!"
Closures VS. Properties / arguments.callee is expensive
"If you need to build inside-out-objects without closures (e.g. because you need to serialize the function state) that use self-referencing functions instead of accessing arguments.callee."
New Tab Page: Proposed design principles and prototype
"Every time you open a new tab, you are opening it to go somewhere. Sometimes it’s to do a search. Sometimes it’s to type in a new URL. Sometimes it’s to check an address you just selected. The only thing you are guaranteed to not want is a blank page.
From the feedback from the last two rounds of new tab concepts, we know that the page needs to load instantly (even a small wait breaks user experience); that it shouldn’t be visually distracting; and that it should be a launch point into your daily activities."
Automatic Resource Management in Java
A resource is as an object that must be closed manually, such as a java.io.InputStream, OutputStream, Reader, Writer, Formatter; java.nio.Channel; java.net.socket; java.sql.Connection, Statement, ResultSet, or java.awt.Graphics.
The automatic resource management statement is a form of the try statement that declares one or more resources. The scope of these resource declarations is limited to the statement. When the statement completes, whether normally or abruptly, all of its resources are closed automatically:
static void copy(String src, String dest) throws IOException {
try (InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest)) {
byte[] buf = new byte[8192];
int n;
while ((n = in.read(buf)) >= 0)
out.write(buf, 0, n);
}
}