A rough overview of the visible improvements:

Ye, I guess I'm pretty happy with it now. :)
Java Example
import java.io.*;
import java.util.zip.CRC32;
public class CRC{
public static void main(String[]args) throws Exception{
CRC32 c=new CRC32();
DataInputStream in=new DataInputStream(new FileInputStream(args[0]));
byte []buffer=new byte[4096];
int read;
while((read=in.read(buffer))>0){
c.update(buffer,0,read);
}
System.out.println("CRC: "+Long.toHexString(c.getValue()).toUpperCase());
}
}Python Example
#!/usr/bin/env python
import sys
if len(sys.argv) != 2:
print 'usage: python dia.py <odd length>'
sys.exit(1)
try:
h=int(sys.argv[1])
except ValueError:
print ('"%s" isn\'t a number')%(sys.argv[1])
sys.exit(1)
if h%2!=1:
print ('%i isn\'t odd')%(h)
sys.exit(1)
for i in range(1,h/2+2)+range(1,h/2+1)[::-1]:
print(('%s%s')%(' '*(h/2-i+1),'*'*(i*2-1)))XML Example
<?xml version="1.0" encoding="utf-8"?>
<!-- some jnlp file -->
<jnlp
spec="1.0+"
codebase="http://domain.tld/"
href="whatever">
<information>
<title>Some Application</title>
<vendor>Some Vendor</vendor>
<homepage href="http://www.domain.tld/"/>
<description>It does this and that.</description>
</information>
<resources>
<j2se version="1.4+"/>
<jar href="example.jar"/>
</resources>
<application-desc main-class="tld.domain.Example">
</application-desc>
</jnlp>Download
SHJS Filter (4kb)
Note: It has to run before the line break converter.
Comments
Post new comment