« March 2006 | Main | May 2006 »
April 29, 2006
Idiot Test
I'm taking it now... How'd you do?
My result is in the Extended Entry.
Posted by aland at 2:22 PM | Comments (0) | TrackBack
April 26, 2006
Evil, Caloric style
I'm so hungry. :-P
Posted by aland at 3:10 PM | Comments (0) | TrackBack
April 23, 2006
Suggestion for Apple
I've been thinking about how Apple might differentiate the MacBook series from the MacBook Pro series. Here's what I came up with:
One of the best things about the Powerbook 1400 (my second powerbook) was that you could slip off part of the cover and replace it.
One of the replacements (came in the box, as I recall) was a clear plastic casing, so you could basically design your own lid.
I think something like that - a sleeve that let you personalize the machine without doing anything permanent - would be a great feature for the machine more geared towards kids/students, without negatively affecting anything for adults.
If Apple wants to use my idea, feel free - I'm a stockholder and huge fan and want the best for the company. If Apple wants to reimburse me for the idea (hah / yay), 3 or 4 of the new machines would be a perfect gift. :-) :-) :-)
Posted by aland at 2:42 PM | Comments (0) | TrackBack
April 21, 2006
Pondering the imponderables
I've been wondering which of the following two variants to the joke is more funny...
(a) Q: How many psychiatrists does it take to change a lightbulb?
A: One, but it has to want to be changed.
or
(b) Q: How many psychiatrists does it take to change a lightbulb?
A: None, it has to want to change itself.
Actually there's a third variant:
(c) Q: How many psychiatrists does it take to change a lightbulb?
A: None, it has to change itself.
Thoughts?
Posted by aland at 4:26 PM | Comments (0) | TrackBack
April 17, 2006
How to customize HTML links
Text Rollovers: What's Good and What is Just Plain Bad
I -really- wanted a hidden link (a link which looks just like plain text) to 'hide' the administrative site for a program I'm working on at work... My normal Google searches didn't work, but I eventually found it at this site.
I set up a style:
a.hide:link { color: #CCCCCC; text-decoration: none }
a.hide:active { color: #CCCCCC; text-decoration: none }
a.hide:visited { color: #CCCCCC; text-decoration: none }
a.hide:hover { color: #CCCCCC; text-decoration: none }
(the headline in which I hid the link has a font color of CCCCCC). Then I just gave my link the class="hide" and voila, an HTML anchor, hidden, embedded into my page. The admins will know it's there, and everyone else will just be very confused if they run across it. :-) It's strictly read-only; if users could damage things I'd have to password protect it. But the admin pages allow resetting some caches and viewing prior execution results, none of which should have a major effect on things if users do it more than we'd want.
OK time to deploy. :-)
Posted by aland at 10:37 AM | Comments (0) | TrackBack
April 16, 2006
Easter Turducken
Too much work for me, but highly entertaining nonetheless...
Posted by aland at 9:28 PM | Comments (0) | TrackBack
April 15, 2006
Do you like egg?
Be afraid. Be very afraid...
Posted by aland at 3:42 PM | Comments (0) | TrackBack
April 10, 2006
JSP JavaBeans and enctype="multipart/form-data"
JSP JavaBeans and enctype="multipart/form-data" don't work right together.
I'm using WebSphere 5.1, but I think it's an issue in how JSP uses the jsp:setProperty name="gui" property="*" notation.
Whatever it is in the JSP spec that goes through the bean properties with reflection and pulls the values out of the request object does not work for HTML form encoding type multipart/form-data, which is typically used to upload files from the browser to the server.
There's an awful workaround though. I pull the parameter map out of the request object (where it's hidden in the multipart request), as processed by the Apache Commons FileUpload.
DiskFileUpload upload = new DiskFileUpload();
List items = upload.parseRequest(request);
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
processFormField(item);
} else {
processUploadedFile(item);
}
}
processFormFields puts the key/value pair into a parameter map which I'm then passing into my bean. My bean knows what its field names are (explicitly; adding a field will require adding to the setFields method), and it's an ugly hack but it'll get me through the day...
OK that's as generic as I can get while providing reasonably useful code... Hope this helps someone.
Posted by aland at 11:27 AM | Comments (0) | TrackBack
April 3, 2006
Hidden iPod Commands
Command-Tab � Hidden iPod Commands
'nuff said.
Posted by aland at 9:50 PM | Comments (0) | TrackBack
