Posts

Post update - Windows Scripting: Adding/removing network printers and drives

Windows Scripting: Adding/removing network printers and drives has been updated to show you how to add entries to the event log in case of an error, rather than show a message box.

The JavaScript CompressorRater

The JavaScript CompressorRater compares several popular tools used for compressing JavaScript. At the moment, it compares JSMin , Dojo shrinksafe , Packer and the YUI Compressor (which has been recently been released and has very good results so far). Dojo shrinksafe and YUI Compressor require Java and Rhino installing. Packer can be run online and JSMin is a command line tool (with code available in several languages for use within your own applications). Before using any of these tools, it is best to check your syntax is correct (adding the optional semi-colons and checking the code with JSLint ). You can see the results of the compression with several popular JavaScript libraries: jQuery , Prototype , YUI and Scriptaculous . Mootools and Dojo are missing from the comparison. Rather than using one tool to compress your code, it may be better to try several and use the one that gives you the best results.

New Version of jQuery - 1.1.4

A new version (1.1.4) of jQuery has been released - jQuery 1.1.4: Faster, More Tests, Ready for 1.2 . There are several notable features in this release: Any name jQuery - so you can use multiple versions of jQuery on the same page (though I wouldn't recommend that if at all possible) - e.g. myobj.jQuery = jQuery.noConflict(true) It is also faster (yet again) - although it is only slow if you call the same query a lot (hundreds) of times (e.g. $("#myel").foo(); $("#myel").bar(); ... instead of $myel = $("#myid"); $myel.foo(); $myel.bar(); ... New features: .slice() (works like the JavaScript array method slice ), :has() (select element only if it has (an)other element(s) in it), recursive .extend() and .noConflict(true) (see first point) Deprecated methods are also detailed in the blog post - i.e. they won't be in jQuery 1.2, with one exception, XPath attribute selector (deprecated in 1.1.4 and 1.2 - $("div[@attr]") )

jQuery Cheat Sheet (Excel and Google Spreadsheet)

A cheat sheet for jQuery has recently been created by Matt Kruse and posted on the jQuery discussion list. It is available in Excel format via jQuery Tips (JavaScript Toolbox) or in Google Spreadsheet format (the Excel sheet created by Matt was converted into this format by George Blouin). Being in a spreadsheet format means it is easily editable, to add your own 'cheats'.

Select box manipulation with jQuery - update to removeOption

The previous update to this collection of plugins introduced a cache when adding options (i.e. made it much faster if adding a lot of options). However, it was not cleared when remove options (causing possible conflicts). This is now done and an extra parameter has been added to removeOption (of boolean type), that when set to true, will only remove options if it matches any option(s) defined by the first parameter. More details and download from the Select Box Manipulation project page at the jQuery site. A demo is also available.

FileHelpers - a library for worked with CSV files (.NET)

Best described in the words on the FileHelpers website : The FileHelpers are a free and easy to use .NET library to import/export data from fixed length or delimited records in files, strings or streams. It is a library that can be used to work with flat text files (e.g. Comma Separated Value (CSV) or Tab Separated Values (TSV) etc). Available for commercial and non-commercial use (under the LGPL). They also have a blog . There is also a CSV parser on CodeProject if you can't use a library licensed under the LGPL: A Fast CSV Reader . Not as powerful as FileHelpers but still good nonetheless.

Text Clips for Programmers Notepad 2 (jQuery)

I have not updated my jQuery Text Clips for Programmer's Notepad 2 for a while (since 1.0.2) so have added them for jQuery 1.1.2 @ Text Clips for Programmer's Notepad 2 (generated using the jQuery Text Clip Generator ).