Andrew Que Sites list Photos
Projects Contact

April 20, 2006

DOM drag and drop

Juliet, Jake and Ichii

Juliet, Jake and Ichii

   My bike mileage for yesterday actually closed out at 20.6 miles.  It started with a late night craving for chocolate milk, for the which I usually take a quick bike ride to a gas station just over a mile alway.  When I arrived around midnight, I discovered the gas station was not open 24 hours anymore.  Undeterred, I figured I'd continue onto the next location up the road maybe an other mile.  It too was closed.  So, there was an other maybe a mile and a half.  Also closed.  By this time, I was a good distance from home, watching lighting illuminate massive cumulonimbus clouds in the distances with too little clothing for 47 degrees.  However, I knew there were defiantly some 24 hour gas stations ahead as I was approaching the interstate highway.  Round trip, my milk run added an other 10 and a half miles to my daily total.  But I returned victorious with chocolate milk—and it was good.
   Having made the slide show script functional, it was time to add the remaining fetchers.  One item I wanted was a slide bar for controlling the time between frames.  I initially though that should have been a no-brainier.  Not the case.  But what I did find was javascript slider that used drag-and-drop objects.  I needed drag and drop functionality for an other project I'm working on.  So I decided the slide should could wait, I was going to play with this for awhile.  The DOM Drag & Drop script is probably the first piece of javascript code I haven't needed to edit; it had everything I wanted to do already built in.
   The project I'm working on involves creating up a set of dynamic webpage via a set of webpages.  To over simplify it, one have a set of objects they can drag and drop to make a page.  I got to work making the first part function.  In this snap shot of my experiment, you can double click on a red frame to get a title bar.  The title bar allows one to move the red frame within the confines of the blue frame.  You can also edit the text.  Each move/edit talks back to the server and the results are saved in a CSV file. 
   A great deal of work needs to be done.  My CSV parsing class is wimpy at best, and it's easy to confuse it.  The double click javascript just does weird things in Internet Explorer, although it works fine in Firefox.  And so on and so forth.
   Pictured is Juliet, Jake and Ichabod (or "Ichii" for short—he's not yet big enough for that name).
   So I fixed the problem in the slide show with Internet Explorer.  IE only displayed a blank white page when a slide show was requested.  All the source was there, but nothing displayed.  Turns out the "script" tag can not have an in-line terminator.  That is, this line does not work in IE:
     <script type="text/javascript" src="SlideShow.js" />
   You must have
     <script type="text/javascript" src="SlideShow.js"></script>
   Note that the first line is completely legitimate XHTML.

   While I was at it, I fixed the way the gallery CSS looked in IE so that it matched Firefox (which is what it was suppose to look like).  One difference between the two browsers is the default margins in "form" tags.  Firefox gives forms no margins, while IE normally gives it a line feed on the bottom.  I learned this trying to make a project for work look the same in IE and Firefox.  It was a bit of a hunt, but I eventually discovered this irritating difference.
    Installed PHP version 5.1.2.  Looks mostly like bug fixes-- but hey, we need those.  Also ran updates on Debian on both the Indigo and White Dragons.  The White Dragon was first, and went flawlessly.  The Indigo Dragon was a little strange.  The updates called for Kernel 2.6.14.  However, during install, Debian reported problems and didn't recommend doing something.  I took the advice and didn't do it.  On reboot to start the new kernel, the system hung on a kernel panic.  The default kernel was 2.6.14 and couldn't find the hdc1.  I tried again, booting to kernel 2.6.8 build for AMD-k6.  That worked fine.  I played around with things some more, but couldn't even find where 'aptidude' listed kernel 2.6.14.  So, I manually removed the entry for it in the boot menu.  Don't really know what happened there, but everything seems to be running fine now.
   Before the update, the Indigo-Dragon had been running 38 days.
   And anyone web host/developer who doesn't have the plugin "Web Developer" for Firefox/Mozilla should get it.  Makes it very quick to check your headers (to see if your PHP upgrade worked as expected) and a wonderful way to check for w3c conformity.
   Today's bike ride was just over 10 miles.  I originally set out to explore the eastern show of the Rock River just north of the Garage.  I started this on the 11th of this month, exploring part of the trail before crossing a railroad bridge.  This time, I went north along the trail.  Unfortunately, it dead ended.  The lack of trial doesn't usually stop me, and it didn't at first.  Only when I found I was surrounded by marsh was I forced to turn around.  Along this bank of the river, it isn't possible to travel by bike.  Perhaps if the water level was a little lower.  But I have a feeling once things start their spring growth cycle, that area will become a worse tangled mess.  So no good trails found today.
   Pictured is the sunset this evening, taking along West Walters Road.

April 18, 2006

Slideshow script

   Added an AJAX slideshow to my gallery script today. To see it, go the the photos, select a gallery or date, and click on the link near the bottom left that says "Slide show".
   It took awhile to get the slide show to function how I wanted. First, I had to brush up on javascript a little more.  What I knew about the language was based on what I knew about C++.  But there are some big differences.  What I found most interesting is the way objects work.  After understanding more about them, I didn't use any of it during implementation.
   There are existing AJAX slide shows out there, but, as usual, I didn't like any of them.  The criteria I had for my version was an automatic transition between two pictures using fade-in/fade-out. This transition happens after some delay period (currently, 2 seconds)and the next picture has been loaded.  I wanted to be sure that while pausing between pictures, the next picture was getting requested.  This way, the transition could get underway as soon as possible.  In the event the picture was completely downloaded after the pause (the perfect scenario), the transition could begin right away. If not, the transition will take place as soon as the picture is loaded, in which case, 2 seconds of time is saved.
   The script looks awful as the moment.  I have a lot of cleanup to do.  It also doesn't work in Internet Explorer, which comes as no big surprise.
Crystal and Kamram

Crystal and Kamram

   I wrote a roll-over example for Tazz this afternoon.  He was having some trouble understanding how to layout HTML pages with tables.  I'm not a huge fan of HTML, as the layout work to get things placed where you want is a bit of a pain.  There is a learning curve you have to get over.  I decided the example should be 100% strict XHTML 1.1—and it was.  After playing a little more, I'm feeling more confident in switch over to strict XHTML 1.1.  Perhaps I'll make a project out of updating the root of; but not today.
   Crystal and Kamram

April 16, 2006

Updated photo database for missing sizes



   I wrote a house-keeping script for the photo gallery. For whatever reason, I had several photos in the gallery with incomplete size lists. This script checked to see if each photo had more sizes other then those in the list. It also check to see that each of the sizes in the list actually existed.
    After I wrote the script, I decided to do a little more house-keeping. My early photos had several strange sizes, like 1800x1200. I decided to remove all the odd sizes I don't typically use now. It took the the root of from 3.07 gigs down to 1.9 gigs; 24,851 files to 19,922.
   Caleb and Juliet looking tragic.

April 15, 2006

Added thumbnails to photo gallery

   Real quick addition to the gallery system.  I added thumbnails to each of the galleries. 
   Picture is Caleb and his sorta-kinda-but-not-really girlfriend.
All better

All better

   Back in October, the porch started on fire when a pumpkin with a candle was forgotten.  The fire department was called and the fire extinguished.  The corner post and the surrounding railing suffered fairly heavy burns.  I had known this since October, but it was getting cold outside and I really didn't want to work on it.  However, Thursday was a really nice day and I decided to start repairs.  First, I removed the railings, followed by unscrewing the deck from the corner post.  After the post was disconnected, I put on some gloves (because the post was like charcoal and I didn't want it all over my hands) and started to wiggle it free.  It took a bit of work, since there was a concrete footing.  But I managed to pull it up and all. 
   Today, I took inventory of all the burned wood and road tripped to my favorite lumberyard.  A few hours latter, the porch was restored;looking much like it had, only without the charcoal.
Sunset over the Rock River

Sunset over the Rock River

   As was taking flash pictures of the kittens today at very close proximity.  Normally, the flash just washes everything out up close.  But I had left the camera at  -1 f/stops.  For the non-photographer, this means the picture is purposely under-exposed (too dark).  This compensated for the wash-out caused by the flash much better then I would have guessed.
   I also shot the evening sunset for the first time in quite awhile. We have a storm moving in and I had hoped for a little better cloud formation, but not the case.  However, I took pictures at the end of my block long the river.  I was pleased with a few of the angles I had available for shots.  So as the spring progresses, I should have some opportunities for really good sunsets.

April 12, 2006


Crystal and Kittens

Crystal and Kittens

   Yesterday morning, our Internet connection was at a crawl.  After a little investigation, I found was downloading everything on the fractal site.  I've seen this sort of thing happen before at Park Place, but here we have 1/3 the upstream bandwidth.  I blocked this address at the firewall and life got back on track.  Indications from the log are that this is someone who found the fractal site via Google searching for "fractal mpeg" and launched a program to download everything.  The fractal site is 194 MB in size.
   I looked into mod_cband to help assist with this problem.  The idea was to limit the total amount of bandwidth the websites can consume.  Although everything seemed straight forward enough, I ran into some strange glitches.  Installation went very smooth and in no time, I had the source compiled, installed and configuration setup.  Naturally, to test the functionality, I hit the site from my computer.  Each time, several "503" errors were generated (internal server errors) and several images on the page were broken.  This happened no matter what the throttle setting were.  If I disabled throttling, everything worked fine.  Then, I hit the site remotely.  No problems at all.  Same browser (Firefox), just not local.  I'm not sure what to make of it.
   For now, I left the throttling enabled on the fractal site. 
   Yesterday's bike ride covered just over 9 miles.  Just past the railroad bridge north bound along highway 51, I came across a trail.  It was marked "Private property" by Wisconsin Power and Light (now owned by Aliant Energy).  I've seen several cars parked along this span of road and had suspected the area was used by fishermen.  I started down a short trail that went to the river's edge and sure enough, I found fishermen.  The area looks to be a bit of a floodplain.
   It was a short trip to a railroad bridge that crossed the Rock River.  The tracks were also marked "Private property" with threats of prosecution.  I crossed the bridge and got a shot of an island off the east shore of the river.  The I had suspected the tracks would take me fairly close to the Rock River Generating Station.  I'm a geek, so when I got home I decided to learn what I could about this power plant.  Here's some trivia I learned:
  • The plant contains two Babcock and Wilcox cyclone-fired boilers
  • Each boiler produces 525,060 pounds of steam per hour with outlet conditions of 1500 psig and 1000F
  • The plant went online in 1953 when the first boiler was compleated, and the second in 1955
  • The units were designed to burn and have burned an Illinois Basin, medium sulfur coal
  • The boilers have a heat rate of 10,600 btutkwh and an efficiency of 32%
  • In 1998, the plant's  "air emissions" were 174,421 pounds
  • In 2002, the plant produced 147,830 killowatts
  • In 1990, the plant was part of a co-burning test using Tire-Derived Fuel
  • Reports by Aliant Energy list the plant as "gas", sujesting at some point the plant was converted to natural gas over coal
   Across the railroad bridge, biked along what I believe to be an "ash lagoon"—a place where coal ash is dumped.  I found a couple small pieces of coal, but they ended up falling out of my bag before the end of the trip.  After the tracks, I followed an other trail, leading to a pumping station for the power plants.  From there, I suspended my trespassing and biked along West Walters Road.  I found a state nature area and had a look around.  Seeing I was close to Big Hill's Park, I was searching for a trail leading in.  I found one along the road, but after biking down a rather overgrown trail, I ended in front of stream.  Ahead of me was a trail I knew from riding around in Big Hill's.  But there was no bridge, and the stream was too large to jump.  I hate back tracking, but in this case, with marsh on both sides of me and no bridge in front of me, I had to.  Maybe an other day when I don't mind getting wet :)
   Creek along West Walters Road.