Internet Explorer Script Error / Library not registered with Visual Studio 2005

Programming, Visual Studio No Comments »

If you get an error like the above using MSDN help in Visual Studio (or in any other situation) you might try the following:

Go to “Add/Remove Programs”, locate “Microsoft Document Explorer 2005″ and repair it. You will have to restart your computer. Kudos to Steven Cheng for this info posted here.

The issue might be due to a failed or removed Orcas (Visual Studio 2008) Beta installation which corrupted the Document Explorer component on your machine. It’s still advisable to install Orcas Betas on virtual machines only.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

"Unable to find the requested .NET Framework Data provider" with MySQL Connector/Net and Orcas

Programming, Visual Studio No Comments »

If you have MySQL Connector/Net installed and then install Orcas (Visual Studio 2008) Beta 2 (and probably earlier versions), your machine.config file will be changed so that it does not include the MySQL Connector/Net data provider information anymore. This can lead to problems with the DataSet designer, first complaining about the MySQL Connector/Net and then with the message quoted in title of this post. The simple solution is to reinstall the MySQL Connector/Net which will put the necessary provider information back in the <system.data><DbProviderFactories> section of your machine.config and your designers should start working normally again. Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Finding Asymmetrical Duplicates with Transact-SQL

SQL No Comments »

Finding duplicates over all involved columns with Transact-SQL is done with the query

select column1 (, column2…)
from table
group by column1 (, column2…)
having count(*) > 1

This technique is especially important for finding duplicates before inserting into tables with primary keys made up of multiple columns.

But what if the duplicate is only in one column, call it half- or semi-duplicate, incomplete duplicate or asymmetrical duplicate or whatever. For example, I tried to come up with a query that finds hotels with identical names at different destinations. This is what I came up with:

SELECT  DISTINCT HotelName FROM
(SELECT DISTINCT HotelName, Destination FROM HotelTable) tmp
GROUP BY HotelName
HAVING COUNT(*) > 1

This query only works with ONE column that’s different, but you can expand the selection of columns that you expect to be identical (duplicates).

So the abstracted query is:

SELECT  DISTINCT expectedDuplicateColumn (, expectedDuplicateColumn2 …) FROM
(SELECT DISTINCT expectedDuplicateColumn (,expectedDuplicateColumn2 …), nonDuplicateColumn FROM MyTable) tmp
GROUP BY expectedDuplicateColumn, (, expectedDuplicateColumn2 …)
HAVING COUNT(*) > 1

With just one expected duplicate column you can get (of course) the entire rows like this: 

SELECT * FROM HotelTable WHERE HotelName  IN

(

SELECT  DISTINCT HotelName FROM
(SELECT DISTINCT HotelName, Destination FROM HotelTable) tmp
GROUP BY HotelName
HAVING COUNT(*) > 1

)

With multiple identical columns you can use nested subqueries like so:

SELECT * FROM HotelTable WHERE HotelName IN
(
SELECT HotelName FROM
(
SELECT  DISTINCT HotelName,  HotelChain FROM
(SELECT DISTINCT HotelName,  HotelChain, Destination FROM HotelTable) tmp
GROUP BY HotelName, HotelChain
HAVING COUNT(*) > 1
)tmp2
)

This latter approach avoids the use of EXISTS, which can get really messy. I’m sure SQL experts will find a more elegant solution but this might work for you.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Search foobar 2000 Playlists and Use them with RockBox

Computing, Simplify Computing No Comments »

Foobar 2000 is a great mp3 player, so I was looking for a way to create “sub-playlists” of my main MP3 folder from searches (for artists, mainly) that I could then export to RockBox. The iPod sucks is weak for creating playlists, but this basically due to the lack of a keyboard. Entering letters is the iPod clickwheel is truly a chore. After some searching and trying a couple of plugins that didn’t work for some reason I found the QuickSearch toolbar plugin for foobar 2000 (grab it now as the referring pages might be deleted any day now, here’s the foobar 2000 0.8.x version). imageIt lets you create quick searches of your main playlist which can then be saved as a new m3u8 playlist. This you just have to throw into your /Playlists directory in foobar on your iPod, after removing any drive letters and replacing all backslashes with forward slashes with any text editor. Then just browser the playlists on your iPod and enjoy. Note: This will not work with iTunes which should be replaced with RockBox anyway. Hope it helps.

Update: Of course the above can be achieved much more easily within RockBox:

Be sure to have SETTINGS>GENERAL SETTINGS>PLAYLIST>RECURSIVELY INSERT DIRECTORIES set to YES.

Files>LONG SELECT (keep iPod Select-Button pressed for a second or so) the Folder with the files you want to add to your playlist>Playlist Catalog>Add to New Playlist. Now (try to) create a name for your new playlist with the RockBox “Virtual Keyboard” which may take some practice. Two things: No need to create a file extension as this will be appended automatically, and pressing Play will save everything you have entered and start the insertion process. You might wanna just create a short playlist name and later edit it with a file system explorer when your iPod is connected to your PC or Mac.

That’s it. The new playlist will be in the /Playlists directory with the m3u8 extension.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Best-Practices Sample Application for Ruby on Rails

Programming, Ruby on Rails No Comments »

One of the most (in)famous marketing ploys of the not-so-recent past was the .NET pet store, where Microsoft showcased the new .NET framework in an ASP.NET web application with similar functionality as the erstwhile Java PetStore, using vastly less code. It also performed and scaled much better on all benchmarks conducted by Microsoft.

Sure enough, there’s a pet store done in Ruby on Rails as part of the ThoughtWorks Commons project, used mainly for scalability “shootouts”. Check it out and poke around to learn how things are can be done. There are actually two pet stores with PetStore2 more of an AJAX/Web 2.0  site. As complete sample rails apps for free download seem to be hard to come by here’s one option that can be used for learning as well as for speed tests. Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in