My Software : Comments and observations related to the usage and installation of softwares on my systems.
Updated: 2007-02-01; 08:50:04.

 

Subscribe to "My Software" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


Categories: (Check them too. My content isn't all on the main page)

Knowledge Management
Technology
My Hardware
My Software
En français!
Top 20 topics!


Currently reading:

The Second World War, Volume 1: The Gathering Storm by Winston S. Churchill

Beginning Linux Programming (Programmer to Programmer) by Richard Stones and Neil Matthew



www.blogwise.com

Male/31-35. Lives in Canada/Ontario/Ottawa/Manor Park, speaks French and English. Spends 80% of daytime online. Uses a Faster (1M+) connection. And likes Cooking/Reading.
This is my blogchalk:
Canada, Ontario, Ottawa, manor Park, French, English, Male, 31-35, Cooking, Reading.


The Political Compass: Economic Left/Right: -3.50
Authoritarian/ Libertarian:
-2.26


Technorati Profile
Popdex Citations



 
 

11 juin 2003


I finished installing Gentoo Linux on 3 of my old Linux boxes (2 to go). It runs very smoothly. I am really impressed by Gentoo Linux. I am upgrading my OpenMosix kernel to 2.4.20-3 and I face some little quirks. Hopefully they'll be resolved soon.
I also finally configured succesfully distcc. Not every ebuilds use it: MySQL doesn't but ntp does. I guess it's a case-by-case type of thing. Hoepully X and KDE will take advantage of it otherwise it will take a week again to compile everything...
I'll get one more used PC tonight: an IBM PG300GL. It will likely replace one of my old Digital PC5100. Or it may be added to my cluster. I'll see...
I'll probably have to go on a business trip next week, to be confirmed.
1:29:43 PM    comment []  - See Also:  Linux OpenMosix 

2 juin 2003


Spent most of the week-end finishing and fine-tuning my installation of Gentoo Linux on two old boxes I have. It is very stable and more responsive than Red Hat 7.3 I used previously on these two boxes. The only drawback is that I now have two OpenMosix clusters: One with three machines running Red Hat 7.3/kernel 2.4.16 and one with two machines running Gentoo 1.4_rc4/kernel 2.4.20. I'll probably start to convert one more Red Hat machine to Gento tonight.
And the rest over the next week-end. I am also discussing with somebody about getting 6 more machines!
The only major problem I had was with distcc. I just couldn't make it work. I followed the instructions, tried many things but it just won't distribute. I'll have to simply rely on OpenMosix to distribute task on the machines of the cluster. This do works. I used it to compile Samba without any problems at all.
I am also thinkering with the idea of installing Blender on all my Linux machines to distribute the load when rendering. I discovered a very nice utility allowing the distribution of a blender job on an OpenMosix cluster. I'll try this one over the week-end too.
1:05:48 PM    comment []  - See Also:  Linux OpenMosix Multimedia 

27 mai 2003


I just installed the SpamBayes plug-in for Outlook. Like Jon Udell, I think it just rocks. The fact it relies on the words of the content and their occurences protects me against spam especially well since most of my friends and familly are writing to me in French while 99.9999% of the spam is in English. In this case, ham and spam don't even use the same words corpus!
10:42:16 AM    comment []  - See Also:  Metadata 

23 mai 2003

I am installing Gentoo Linux on one of my PC at home. Things went pretty well except at the beginning where I was looking for a simpler way to bootstrap the process since I couldn't boot from the CD. I finally found a way using the Slackware boot disks.
On this puny P166MMX/192MB it took almost 36 hours doing scripts/bootstrap.sh then emerge system.
Now I am compiling the OpenMosix kernel. It is not very fast but at the end, I'll have a system completely tailored to my need.
12:24:18 PM    comment []  - See Also:  Linux OpenMosix 

19 mai 2003


I tried to install Gentoo tonight but I have a problem burning a bootable CD from the ISO files available. I posted a message about it on the Gentoo forum. If you read it and have a solution, let me know.
9:33:21 PM    comment []  - See Also:  Linux 

13 mai 2003

It seems there is a gzip plug-in for Radio. Anybody out there with the URL?
3:05:11 PM    comment []  - See Also:  Radio 

11 mai 2003


Autocompletion in the command prompt!.

Roy Osherove posted a link to some cool Registry settings. One of them I found quite usefull: Enable AutoCompletion in Command Prompt. Once this setting is done, you can use the tab key for autocompleting while typing in the command prompt (cmd)! For example you type "cd c:\progr" (without return) and press the tab key, "progr" will be completed to "Program Files".

To enable this setting, change the following key in the registry:
HKEY_CURRENT_USERSoftwareMicrosoftCommand ProcessorCompletionChar
Change this value (or create the key, DWORD) to 9.

[.NET Weblogs]
Outstanding trick!

9:09:07 PM    comment []  - See Also:  .NET Micro$oft 


Transferring properties to a thumbnail image.

A while back, I created a simple console app for thumbnailing photos for posting on my family Web site. The application simply asks for a directory and a reduction percentage, then looks for any images in the directory provided and reduces them by the requested percentage.

This was fine as far as it went, but I realized after a colleague, Ryan Trudelle-Schwarz, requested copies of some of the photos I'd thumbnailed with this app, that I had neglected to correctly transfer the properties from the old image to the newly-created thumbnail. Given that digital cameras like mine (a Nikon CoolPix 4500) provide a lot of information in the properties, from photo info like focal length, exposure time, and ISO speed to important stuff like the date the photo was taken (as opposed to the date the file was last copied/altered).

Given that the app did mostly what I wanted, I didn't tackle the property transfer until recently. I was pleased to find that as with most stuff in .NET, it was pretty easy, once I stopped trying to fight the platform (I initially tried doing a For loop with a counter variable, but wasn't getting the PropertyItems populated that way). My initial successful code took advantage of a neat feature of arrays (the properties of an image are stored in an array called PropertyItems) called Enumerators. Enumerators, which implement the IEnumerator interface, allow you to easily traverse the members of an array or collection much the same way as you would a recordset or a DataReader. The code below gets an enumerator for the PropertyItems array of an instance of System.Drawing.Image that is created from the image being thumbnailed, and then calls the SetPropertyItem method of a new instance of System.Drawing.Bitmap that will contain the thumbnail version of the image:

        Dim imgPropEnum As System.Collections.IEnumerator = img.PropertyItems.GetEnumerator
        While imgPropEnum.MoveNext()
            bmp.SetPropertyItem(imgPropEnum.Current)
        End While
In a subsequent email, Ryan suggested the following code, which is a little cleaner, and perhaps more like what a VB programmer would expect to use:
        Dim PropItm As PropertyItem
        For Each PropItm In img.PropertyItems
            bmp.SetPropertyItem(PropItm)
        Next
Either will work, and both are examples of how simple tasks graphics-related tasks are in the .NET Framework. The trick, as I discovered, is to work with the framework, rather than against it.

As an aside, while I was playing with the code above, I also took a look at the GetThumbnailImage method of the Image class, but found that the method appears to both reduce the size of the image and compress it, such that the resulting image quality is fairly poor. In all fairness, the MSDN docs for the GetThumbnailImage method does warn that

GetThumbnailImage works well when the requested thumbnail image has a size of about 120 x 120. If you request a large thumbnail image (say 300 x 300) from an Image object that has an embedded thumbnail, there could be a noticeable loss of quality in the thumbnail image. It might be better to scale the main image (instead of scaling the embedded thumbnail) by calling DrawImage.

but I was hoping that the code for creating a decent thumbnail would've been as simple as a single method call, perhaps one overloaded to allow both compressed and non-compressed thumbnails. Not that it's all that difficult to scale an image in .NET, of course. I guess I've just gotten spoiled by how much the framework classes do for the developer that now I expect them to do everything. Perhaps in version 2.0.

[Listening to: How Blue Can You Get? - B.B. King - The Best of B.B. King [MCA] (05:09)]
[.NET Weblogs]
This is a very cool trick as I take tons of pictures that I shuffle around and manipulate a lot. I could use this trick in a script that is applying a series of "steps" to a fixed set of pictures.

8:23:32 PM    comment []  - See Also:  .NET Multimedia Metadata 

7 mai 2003


T-SQL Tip of the day.

Just to test the w.bloggar tool with this blog and because it's always nice to have something to say, I thought why not post a nice T-SQL Tip. (It works on Oracle too btw)

Optional parameters
When you have a table, say Orders (as in the Northwind database which comes with SQLServer), which has more than 1 foreign key (FK), it is typical that developers will query the Orders table based on a combination of these FK fields. However, as with the Orders table, this can be quite cumbersome when there are a number of FK fields. It would be nice if you could pass along any combination of these FK fields to a single stored procedure which would use these parameters to query the table in a uniform manner, so there will be no recompiles (most people who try to use optional parameters end up concatenating SQL strings in a stored procedure, which is not that good).

The idea is this: for every parameter you do not need, you pass in 'NULL' as value. For every parameter you do need, you pass in the value you want to filter on. Let's get back to the example table, the Orders table in the Northwind database. This table has 3 foreign keys: CustomerID, EmployeeID and ShipVia. If we want all Orders of a given CustomerID which are taken by a given Employee we normally wouldn't be able to use the same stored procedure which would query for all Orders for a given Customer which are shipped via a given ShipVia value. But you can! Here's how:

CREATE PROCEDURE pr_Orders_SelectMultiWCustomerEmployeeShipper
 @sCustomerID nchar(5),
 @iEmployeeID int,
 @iShipVia int
AS
SELECT  *
FROM Orders
WHERE CustomerID = COALESCE(@sCustomerID, CustomerID)
 AND
 EmployeeID = COALESCE(@iEmployeeID, EmployeeID)
 AND
 ShipVia = COALESCE(@iShipVia, ShipVia)


That's it! This stored procedure will query for Orders on any given combination of CustomerID, EmployeeID and ShipVia. If we f.e. want to select all Orders for Customer 'CHOPS' and ShipVia '1', pass these 2 values to the stored procedure and pass NULL for @iEmployeeID. This will result in the requested rows.

Caveats.
Of course there are drawbacks. One of them is that this is slower than a query which is taylored to the columns you want to filter on. It also needs a clustered index to work well, but every table should have a clustered index anyway to support fast retrievals of data.

[.NET Weblogs]
This kind of situation happen often in my kind of usage of databases.

1:11:57 PM    comment []  - See Also:  Micro$oft 

26 avril 2003

Backing up with tar and ssh. bbum: I found myself in a situation where I really needed to copy some files from a remote OS X box to my local system, but the only access I had was via SSH. Unfortunately, the files all have resource forks that contain pertinent information.

You can probably do this all at once:

  ssh remote.server.com -c 'gnutar cvp file1 file1/rsrc file2 file2/rsrc file3 file3/rsrc' | gnutar -x -v -p --overwrite

Here are some other handy ones:

- back up a remote directory to a local tarfile over a slow link

  ssh remote.server.com -c 'tar -cz /path/to/dir/to/back/up' > backup.tar.gz

- back up a remote directory to a local tarfile over a fast link, where the remote PC is very slow

  ssh remotehost -c 'tar -c /path/to/dir/to/back/up' | gzip > backup.tar.gz

Also rsync is great for this sort of thing:

  rsync -vr remote.server.com:/path/to/dir/to/back/up localbackupdir

Comment

[Second p0st]
Useful trick

9:53:52 PM    comment []  - See Also:  Linux 


While backing up with Veritas Back Up Exec 8.6, it is impossible to either capture or render with Adobe Premiere 6.0: tried 4 times, crashed the machine 4 times...
9:00:39 PM    comment []  - See Also:  Multimedia Adobe Premiere dat24x6 

18 avril 2003

MSDN Magazine RSS feed. I just noticed that MSDN Magazine has an RSS feed, in addition to the feeds that Tim Ewald already mentioned. Cool!... [Incessant Ramblings (Technology Entries)]
It doesn't work now but should later...

12:33:52 AM    comment []  - See Also:  .NET Micro$oft 

11 avril 2003


I finally solve my OFO problem with BackupExec. It seems it is incompatible with Roxio EasyCD creator. I got rid of Roxio and boom, problem solved. I am testing it intensively to make sure I ironed out any problems left.
4:48:00 PM    comment []  - See Also:  dat24x6 

SPAM, SPAM, SPAM, Baked Beans, and SPAM.

I just bumped into an Anti-Spam tool that actually seems to work. It has caught 100% of the Spam coming into my In-box for the last 48 hours without ANY interaction on my part.

It is an Outlook Add-in so it is seamless (no external program to scrub your email first, nothing server side required). This was something I've wanted for a while now.

And at $0.00, the price is just right. :)

Check out SpamNet from Cloudmark.

[.NET Weblogs]
I am using it since 2 weeks and it works flawlessly too. Try it. Recommended!

12:00:18 PM    comment []  - See Also:  Personal 

10 avril 2003

NullOrEmptyString.

Tired of doing this: "if(s == null || s == String.Empty)"...

public class NullOrEmptyString
{
 public static NullOrEmptyString Value = new NullOrEmptyString();

public static bool operator==(NullOrEmptyString s1, string s2)

{

return ((object)s1) == null || s1.Equals(s2);

}

public static bool operator!=(NullOrEmptyString s1, string s2)

{

return !(((object)s1) == null || s1.Equals(s2));

}

public override int GetHashCode()

{

return String.Empty.GetHashCode();

}

public override bool Equals(object o)

{

return((o is string) && (o == null || (((string)o) == string.Empty)));

}

public static implicit operator string(NullOrEmptyString s)

{

return s.ToString();

}

public override string ToString()

{

return String.Empty;

}

}

[.NET Weblogs]
Neat trick

2:37:17 PM    comment []  - See Also:  .NET 

© Copyright 2007 Charles Nadeau.



Click here to visit the Radio UserLand website.
 


Latest
11   02   27   23   19   13   11   
07   26   18   11   10   
expand / collapse all posts
collapsed nodes: hide previews
how this works

-->
February 2007
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28      
Jun   Mar


Google
Search the whole web!
Search Charles radio!


www.flickr.com


Top 5 artists I listen to the most often during the last week:


I subscribe to:

Here's how this works.


Weather in Ottawa:
The WeatherPixie
Weather in Fukuoka:
The WeatherPixie