How about sleep barking? Sleep running in circles Imagine if the dog was narcoleptic too]]>
an extended period of time, even though the latest major version (3) has made massive memory usage improvements over previous versions. This tweak will make sure Firefox behaves more like standard Windows applications when it comes to being minimized, as in freeing up the memory it’s using for Windows. The down-side to this is that when restored or maximized again, there will be a delay as the application shifts chunks from slow virtual memory to system memory.
- Go to about:config
- Right click anywhere in the list and choose New > Boolean
- Call the entry config.trim_on_minimize and set it to true
- Restart Firefox
- You might want to go to about:config to confirm the change took effect
< ![CDATA[A few months ago I posted a little query about finding duplicate rows in a database table. I’m revisiting this because I helped out Doogie with a similar query last night but with some complications.
Let’s start with the original simple scenario of checking duplicates in a single column.
Some example data, a Users table:
+----+----------------+ | Id | Email | +----+----------------+ | 1 | email@example.com | | 2 | firstname.lastname@example.org | | 3 | email@example.com | | 4 | firstname.lastname@example.org | | 5 | email@example.com | | 6 | firstname.lastname@example.org | +----+----------------+
You can see that email@example.com and firstname.lastname@example.org have been duplicated. This could have been prevented by putting a unique index on the Email column.
So to find what emails have duplicates in our table:
< ![CDATA[Most thumbnail-generation solutions will shrink the original down while maintaining aspect ratio. Usually you specify the maximum height and width of the thumbnail, e.g. 150 x 200. However, if your original image's aspect ratio is different to the maximum thumbnail dimensions, you will end up with dead space vertically or horizontally (shown in green in the illustration). This can be quite an eyesore when displaying thumbnails in a grid.
I’ve got an algorithm that will automatically crop the image either horizontally or vertically to then match the thumbnail aspect ratio, so you end up with the thumbnails all being the same size even though they may be coming from originals of wildly different aspect ratio.
In the illustration, you can see that the image is scaled down and fills all the available thumbnail space, showing the parts in grey from the original that were cropped out.
The algorithm does the cropping before the resizing. It takes the width and height of the original image, and the width and height of the desired thumbnail. It will return the width and height that the original must be cropped to, to match the aspect ratio of the thumbnail. Continue reading Creating thumbnail images with automatic cropping and maintaining aspect ratio