HTML5Test and CSS3Test
These two sites do a great job of testing your web browser and telling you what HTML5 and CSS3 features it supports...
Calculate Size of Files Within a Zip File
package co.wlv.apputil; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.text.DecimalFormat; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.TrueFileFilter; public class CalculateFileSizeInDir { public static void main(String args[]) throws Exception { String zipFileName = "C:\\path\\to\\my.zip"; File initialFile = new File(zipFileName); InputStream targetStream = new FileInputStream(initialFile); File extractDir = new File("output"); FileUtils.deleteDirectory(extractDir); unZipImportData(targetStream, extractDir); Listfiles = (List ) FileUtils.listFiles(extractDir, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE); for (File file : files) { System.out.println("file: " + file.getCanonicalPath() + " - file Size: " + readableFileSize(file.length())); } } public static String readableFileSize(long size) { if (size <= 0) return "0"; final String[] units = new String[] { "B", "kB", "MB", "GB", "TB" }; int digitGroups = (int) (Math.log10(size) / Math.log10(1024)); return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups]; } public static double fileSize(long size) { if (size <= 0) return 0; int digitGroups = (int) (Math.log10(size) / Math.log10(1024)); return size / Math.pow(1024, digitGroups); } public static String getUnits(long size) { if (size <= 0) return "0"; final String[] units = new String[] { "B", "kB", "MB", "GB", "TB" }; int digitGroups = (int) (Math.log10(size) / Math.log10(1024)); return units[digitGroups]; } public static void unZipImportData(InputStream zip, File extractTo) throws Exception { ZipInputStream zipInputStream = new ZipInputStream(zip); ZipEntry zipEntry; try { while ((zipEntry = zipInputStream.getNextEntry()) != null) { File file = new File(extractTo, zipEntry.getName()); if (zipEntry.isDirectory() && !file.exists()) file.mkdirs(); else { if (!file.getParentFile().exists()) file.getParentFile().mkdirs(); BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); byte[] buffer = new byte[8192]; int read; while (-1 != (read = zipInputStream.read(buffer))) out.write(buffer, 0, read); zipInputStream.closeEntry(); out.close(); } } zipInputStream.close(); zipInputStream = null; } catch (IOException e) { e.printStackTrace(); } } }
Subclipse 1.10 + Maven (M2E)
I had a tricky time getting the Eclipse Maven tool (m2e) to work in Eclipse Luna with the latest version of Subclipse 1.10.6. It turns out that the Maven SCM Handler for Subclipse (m2e-subclipse) linked to in the Luna Marketplace on the Sonatype site is no longer supported. The gory details and a .zip file containing an updated m2e-subclipse plugin are available at subclipse.tigris.org/issues/show_bug.cgi.
JAXP Packages
- javax.xml
- javax.xml.datatype
- javax.xml.namespace
- javax.xml.parsers
- javax.xml.stream
- javax.xml.stream.events
- javax.xml.stream.util
- javax.xml.transform
- javax.xml.transform.com
- javax.xml.transform.sax
- javax.xml.transform.stax
- javax.xml.transform.stream
- javax.xml.validation
- javax.xml.xpath
- org.w3c.dom
- org.w3c.dom.bootstrap
- org.w3c.dom.ls
- org.w3c.dom.views
- org/xml/sax
- org/xml/sax.ext
- org/xml/sax.helpers