ThomThom's Website

LULT - Sidebar - Changelog

19 Apr 08 - 15:58

Note: this is not an official gadget from Transport For London, so don't ask them for support.

If you find any bugs, issues or simply got a feature suggestion, please contact me.

Attention Internet Explorer users! IE will incorrectly try to download the .gadget file as .zip from my server. If that happens rename the .zip file to .gadget. Alternatively you can download from one of the mirrors. I'll try to find a fix for this. —17 July 2008

Version 1.3.10 — 25.06.2008
Fixed: forgot to enable the update checker.
Version 1.3.9 — 24.06.2008
Intermediate release before 1.4 to address changes in the TFL source which broke the parser.
Version 1.3.0 — 28.03.2008
Added option to select what lines to monitor.
Version 1.2.1 — 27.06.2007
Small tweak to account for change in the sourcecode at TFL.
Version 1.2.0 — 09.04.2007
Because of all the updates and paches I've had to do I added an update notification system to the gadget. Hope this will make things easier.
Version 1.1.0 — 09.04.2007
Finally updated the graphics and added an undocked mode.
Version 1.0.3 — 02.04.2007
Again the format on the TFL site changed. I've contacted them asking of there's any chance they'll provide the data in XML format. Waiting for a reply. Until then, all I can do is make these patches.
Version 1.0.2 — 28.03.2007
Sorry, yet another update. The source file at the TFL site has been a bit unpredictable after the update. I'm looking into finding a more reliable way of getting the data.
Version 1.0.1 — 26.03.2007
Sorry. I screwed up the packaging of the gadget. Think I included the old file.
Version 1.0.1 — 25.03.2007
Emergency patch to account for TFL site change.

Standalone gadget for Windows 2000 or newer: Download

Document History Viewer – Making use of <del> and <ins>

22 Mar 08 - 12:57

I put together some quick examples to how <del> and <ins> can be used. It’s some of the HTML tags which doesn’t seem to get used allot.

Using jQuery I built a crude Document History Viewer. It’s basically a time machine for HTML documents where you can read the document as it where on a previous date.

The first example document simply displays some dummy text where I’ve added some <ins> and <del>. It’s the change log for the Colour Swatch gadget I made. The <ins> and <del> here are just added randomly. However, a change log is a good example where <ins> and <del> is useful to allow the user to read through the various changes to the product.

The second example shows how it can be used to present source code where you can see the various changes made to it. If you click on one of the changes you will get the time and date of the change along with the title all extracted from the <ins> or <del> element itself. It also present the cite URL and uses AJAX to fetch the extended information about the reason for the edit.

The third and final example is just a test to see how browsers dealt with ordered lists as <ins> and <del> was dynamically hidden and displayed. It appears to work fine. Only issue is that the <del> and <ins> has to wrap around the <li> element and this is not valid according to the W3Cspecifications. However, I see this as a flaw in the specifications and I think it’s OK to break it.

If you have some creations using <del> and <ins> I’d like to see it. It’s a set of HTML elements which adds good semantic value to a document, but is rarely used. The jQuery script in the examples are not the best. They are hacked and bashed as the requirement to it changes as I was experimenting. But if you find any use for it, feel free to use it.

<del> and <ins> in lists

22 Mar 08 - 12:16

While working on some examples to demonstrate <ins> and <del> with a document history viewer I came across an unexpected problem. If you want to remove or insert a whole list item, you can’t wrap it in <del> or <ins> as <ul> and <ol> only allows <li> children.

Putting <del> inside the <li> makes the browsers render the list item as it was empty but with the bullet, leaving an undesired result if you have set del { display: hidden; }.

This appears to be a case where the specifications haven’t taken into account every option. If you remove a list item at some point and would like to mark that up in your HTML document then you want to mark up the entire list item, including the <li> tag, not just it content.

Fortunately, it looks like all browsers will render <del><li>Lorem Ipsum</li></del> as I want, removing the entire list item including the bullet. This is invalid markup according to the specifications, but I think that this is a good example of where you can ignore that.

I posted a comment about this in the public W3C HTML news group. Hoping that it’d be added to the HTML5 specifications. So far there’s no response.

PHP Resumable Download Server

22 Sep 07 - 19:23

I wanted to add a download section to my site, but at the same time keep statistics of the files downloaded. So made a little PHP script to act as a download server.

This little script became a little larger when I added support for partial file downloads. I noticed that many comments in the PHP manual and other sources described the method wrong. For instance, many of them announced to accept multiple byte ranges while that was not the fact. And they also tended to not handle the requested byte range according to the HTTP 1.1 specifications.

Now, I'm never pretending this is a complete implementation or free for issues. But it should work very well and I've tried to make it behave to the specifications.

Features

  • Serves files from a file repository.
  • Makes sure no files outside the repository is served.
  • Lists files if a directory is requested.
  • Supports partial file request allowing users to pause or accelerate downloads.
  • Logging function to keep statistic over the file downloads. (Needs configuring to work.)

Live Example

Known Issues

  • Files larger than 2GB might give unexpected results on platforms that use 32-bit integers. This is because it might affect the calculation of filesizes.

Download

Installation instructions is in the readme.txt file.

thomthom.net

Colour Swatch Manager Documentation

07 Sep 07 - 15:53

Version: 1.0.3
Last Updated: 23 September 2007

Related Files

Table of Contents

Schemes

Warning: Any changes made to a scheme are automatically saved. If you delete or edit a colour there’s no way to undo it. An Undo function might be added in a later version.

Scheme Menu

Click on “Scheme: ” to open the Scheme Menu. Here you are presented with the tools related to the scheme itself.

Creating new scheme

Choose “New Scheme” from the Scheme Menu. You will then be presented with a window asking for title and filename.

Type the name of your new Scheme and then enter the filename with full path to where you want to store the Scheme. Click the “Browse” button to browse your system and pick the location you want.

Warning: This file dialog does not automatically append the *.xcsm file extension to the files. You must remember to add this yourself. This will hopefully be corrected in later version.

Opening scheme

Choose “Open Scheme” from the Scheme Menu and locate the file you want to open.

Alternatively you can drag and drop colour scheme files onto the gadget. When you drag a colour scheme onto an already open colour scheme you can choose to append the file you dragged to the one already open.

Information: Currently there’s no way to associate colour scheme with Colour Scheme Manager due to limitation of DesktopX. Hopefully a future version will support this feature.

Swatches

Creating new swatch

Click on “New Swatch...” at the bottom of the swatch list. It will only appear when there’s a colour scheme open.

Name the swatch and pick the colour.

Information: At the moment you have to use Windows’ colour picker. It has its limitations that it only lets you enter RGB and HSL values. A future version will feature a custom colour picker with CMYK, Hex and long support.

Warning: The HSL value ranges used in Windows’ colour picker is not the same as the ones used in Colour Manager. Colour Manager matches what Photoshop uses.

Swatch Menu

Right click on a colour entry to bring up the Swatch Menu. This brings up your options for the specific swatch.

Expand swatch

You can expand the swatch to display all the colour codes by left clicking the swatch list-item.

Organizing swatches

You can drag and drop the swatches in the list to organize them to your liking.

Warning: Dragging the swatch outside the gadget area will delete them with no undo function available.

Deleting swatches

Apart from using the Swatch Menu to delete a swatch you can also drag a swatch outside the gadget area. When you then release the mouse the swatch will be deleted. The drag symbol will say “Delete” to indicate that the swatch will be deleted if you release the mouse.

Copying colour values

You can copy the colour values from the various colour spaces by using the Swatch Menu. If you click the colour sample of a swatch you copy the colour values of the default colour space.

Colour Spaces

RGB

The native colour space of computer monitors.

HSL

The Hue is given a value of 0–360 degrees with the Saturation and Lightness ranges from 0–100%. This is similar to how Photoshop let you pick HSL values.

CMYK

Warning: CMYK colours needs colour profiles of the source and the target medium to be calculated accurately. Colour Scheme Manager only performs a very generic conversion and should only be regarded as guidance.

Hex

Hexadecimal values in the same format used in HTML and CSS.

Long

Some computer languages take colour codes in one integer number.

Configuration

Default Colour Space

Here you set the default colour space to be used. This colour space is the one displayed next to the colour when a swatch is collapsed. It’s also the colour space copied when you click the colour sample.

Verbose Copy

By default Colour Scheme Manager will only copy the colour values. I.e.: “FF8000” or “255, 128, 0”. If you tick this option it will prefix the text copied with colour space indication; “#FF8000” or “RGB: 255, 128, 0”.

Lowercase Hex

Tick this option if you want lower case letters in your hexadecimal values.

Show Hotkey

You can assign a hotkey that will bring the gadget to the front of your windows.

More Posts

Newest | Newer | 1 | 2 | 3 | 4 | Older | Oldest