Archive for February, 2004
Swing Goodies
”
Cool Swing-ish Stuff
After a ton of interesting feedback last time, I’ve scoped out some interesting Swing bits and pieces. I’ve got most of what I needed, but here’s the summary so far:
JGoodies Forms for layout management - I finally have found a layout manager that I understand and that does what I want!
l2fProd provides exactly the button bar I was after (very Mozilla-ish)
exe4j is a very polished little exe maker for Windows to give you that nice icon/launch option.
Still looking for a nice grid… but something will come up…
“
Caching Images that are dished out with a Servlet
You can find examples of how to dish out an image via a servlet online, but they don’t go into the caching of the image. Basically, you ‘name’ the servlet in the “src” of your img tag and in your web.xml file.
<img src=”imageServlet.imageServ?imageId=xxxx”>
and in the web.xml:
<servlet-mapping>
<servlet-name>ImageServlet</servlet-name>
<url-pattern>*.imageServ</url-pattern>
</servlet-mapping>
Caching: My coverage is an extension of a post here.
To get the browser to cache the image you need to set some headers.
response.setDateHeader( “Last-Modified”, image.getModifiedDate() );
On the next access of the image, the browser will/should respond with a “If-Modifed-Since” header. Compare the image’s timestamp on the server with the timestamp from the browser. If the browser has an old copy or didn’t set the header, send out the image. If the browser has the image, you set a HTTP response of 304 “Not-Modified”.
So in the end it looks something like this:
long browserTime = request.getDateHeader( “If-Modified-Since” );
long imageTime = image.getModifedDate();
if ( browserTime == -1 || imageTime > browserTime )
{
// send the image
response.setDateHeader( “Last-Modified”, imageTime );
}
else
response.setStatus( 304 );
and you’re done.
List of Linux CDs
The question is, which of those have a “build system” where you could build your own customized CD easily.
ATT Wireless
Pretty much everybody hates their cell providers. I’m currently with ATT, and I’m ready to move out.
There are all the standard reasons to dislike your carrier: coverage (ATT GSM), price (Verizon), lack of cool phones (Sprint), bad customer service (Sprint), length of service contract (Sprint).
But the one that gets me with ATT is the institutional lack of focus on the customer. Eg, every other cell carrier offers a way to check the number of minutes you have left on your plan via the phone: secret key code, voice automated system, or SMS. Not ATT.
The other thing that bugs me is their incessant and pathetic attempt to try to get me to SMS more, seeing as how that is such a high profit margin service for them. Just about every month I get glossy (expensive), pithy brochure about MLife and how cool SMSing people is. Their latest attempt is to get people to SMS their votes for American Idol in.
Anyhow, my contract with them is now up, and I am currently looking at other providers and phones. Yah cell number portability!
The hitch at the moment is the phone. I want a clam shell design, with a decent camera, and bluetooth support for syncing.
Update: Problem solved. Now on TMobile with a very nice Nokia 3650 with 1000 mins and unlimited data. MUHAHAHA.
The importance of Fame
Can’t outsource coolness and reputation.
http://www.janegalt.net/blog/archives/004594.html
Model VC Docs
Open Source VC docs.
Nifty
Periodic table of Condiments
Periodic table of Condiments.
I think I will print this out and put it in the fridge.
“Computer, faster.”
Here is a interesting way to read a novel, in particular Cory Doctorow’s “Eastern Standard Tribe”. Reminds me Star Trek:TNG, where Data had his own interface to the computer that would display pages of information very rapidly.
http://trevor.smith.name/EST/index.html
“Read” the book it in about 1.5 hrs, so that was nice. However, about a half an hour after I finished it I got a headache. I can’t directly attribute blame to the reader, because it could also have been a caffeine withdrawl headache.
JVM as a cramfs filesystem
Turns out that the jars that make up the Linux 1.4.2 JRE aren’t compressed very much.
Eg, if you unjar and rejar rt.jar, it will be significantly smaller: 23 –> 12 megs. Uncompressed rt.jar weighs in at 49 megs.
Useful if you are trying to get the jvm in a cramfs filesystem, where the max input filesize is 16 meg.
Also, you can save 7.5 uncompressed megs by dropping the server vm from the lib/i386 directory.
Getting Old
Found myself listening to the “_Classic_ Techno Trance” channel at DigitallyImported. ![]()
Gallery Hack to Spam Machine
A non-standard install of Gallery got hacked and the server was turned into a spam box. Sophisticated hack.
You are currently browsing the Kikkoman blog archives for February, 2004.