Wednesday, August 16, 2006

AutoStitch: Automatic photo/image stitcher, creates panoromas from a set of images

AutoStitch: "Autostitch� is the world's first fully automatic 2D image stitcher. Capable of stitching full view panoramas without any user input whatsoever, Autostitch is a breakthrough technology for panoramic photography, VR and visualisation applications. This is the first solution to stitch any panorama completely automatically, whether 1D (horizontal) or 2D (horizontal and vertical). Autostitch is built using cutting edge research from the AI lab at UBC, but it's incredibly simple to use! Just select a set of photos, and Autostitch does the rest: digital photos in, panoramas out. Try the free demo (for Windows):"

The Most Important Software Innovations

The Most Important Software Innovations An excellent list of the most important software innovations. Did you know that hypertext was invented in 1945! The last innovation of web-crawling search engines is from way back in 1994. None since then.

The Road to Know Where: Ultimate List of Free Windows Software from Microsoft

The Road to Know Where: Ultimate List of Free Windows Software from Microsoft Microsoft has over 150 FREE Windows Programs available for download -- but finding them all is extremely difficult. This page has a small description and links to these useful tools.

Seven deadly sins of programming

Eric Gunnerson's C# Compendium : Seven deadly sins of programming Another good read. A list of stuff to watch out for while programming.

Three Sins of Authors in Computer Science and Math

Three Sins of Authors in Computer Science and Math: "Three Sins of Authors in Computer Science and Math " A concise article on some mistakes often found in technical papers (Not only those written on Math and CS subjects). A good read for anybody writting a paper.

Idiot's Guide to Neural Networks

Richard Bowles' Idiot's Guide to Neural Networks An article on Neural Nets, also contains some source code.

Debugging MSI problems

 Feed: Microsoft WebBlogs
 Title: Diagnosing Installation Errors

Author: heaths 
0+ Comments 

 

 

When problems occur when installing, repairing or patching, or uninstalling a product using Windows Installer technology, you need to be able to figure out what happened and why it happened. Dialogs that occur when the user interface is displayed can be helpful sometimes, but many times you need to look at a log to determine the exact cause of the problem.

The first step in diagnosing a problem using the log is to, of course, enable logging. When performing any actions with an installation package or patch always be sure to pass /L*v filename.log on the command line. This enables verbose logging. You can also use /L*vx which outputs debugging information as well, but this isn't always helpful and can lead to much larger log file sizes than even verbose logs. This option is also only available on Windows Server 2003 and newer. You can also set logging options using the logging policy that will apply to all Windows Installer operations on the machine.

Now that verbose logging is enabled when an error occurs you can search for "value 3" and in most cases find the return code from a failed standard or custom action. Note that this is not the only indication that a standard or custom action did not run perhaps as expected. An installation that returned prematurely but that did not return an error code from the process would have returned IDIGNORE, so you would have to search for "value 5". In Return Values of JScript and VBScript Custom Actions you can find the return values that can be returned from actions and what they indicate. Of course, it is recommended that you write custom actions in native C++ but this page does list both the #define constants and their values. Another good source of return values for custom actions is Logging of Action Return Values that lists a few more possible return values, as well as what value is returned from the custom action server depending on what values you return from your custom action.

You should see a line like the following listing the action that returned the error value:

Action ended 12:00:00: MyCustomAction. Return value 3.

Now that you've located the error in the log you must determine what really happened since the return value isn't really adequate for determining the cause of the problem. If your custom action failed hopefully you've logged enough information to determine the cause right away. If you used the MsiProcessMessage function to log the error from the Error table, or a standard action failed, you will find the error number in field 1 of the log message a little above where you found "value 3":

MSI (s) (AC:14) [12:00:00:000]: Note: 1: 1601 2: C: 3: 4096 4: 1024
MSI (s) (AC:14) [12:00:00:0000]: Product: My Product -- Out of disk space -- Volume: 'C:'; required space: 4096 KB; available space: 1024 KB

The first line lists the error in field 1 as 1601. If you look up the error in Windows Installer Error Messages you will see Windows Installer error 1601 has the English text of "Out of disk space -- Volume: '[2]'; required space: [3] KB; available space: [4] KB". Plus the values of the fields in the first line into that message and you'll end up with the second line in the log. This will give you a much better indication of what error occurred. If the error value isn't in the Windows Installer Error Messages table, be sure to look in the Error table itself since this may be a custom error. Custom errors should be in the range from 25000 to 30000 according to the documentation for the Error table, but this isn't always the case.

In Logging of Action Return Values return codes from msiexec.exe are paired with error codes returned from custom actions, but msiexec.exe may return other error codes as documented in Error Codes, such as ERROR_UNKNOWN_PRODUCT (1605) if you try uninstalling a product by its ProductCode that is not installed, or ERROR_PATCH_TARGET_NOT_FOUND (1642) if you try applying a patch to a product that is not installed.

 

Debugging .NET Loading problems

Create a text file named fusionLog.reg
Edit it with notepad and add the following content:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion]
"ZapQuotaInKB"=dword:000f4240
"ViewerAttributes"=dword:50b00149
"LogFailures"=dword:00000001
"LogPath"="c:\\log\\Fusion"
"ForceLog"=dword:00000000
"LogResourceBind"=dword:00000001

 

create a folder c:\log\fusion

 

double click the fusionLog.reg file and accept adding info in the registry

Each time an assembly fails to load, a log file is created in c:\log\fusion folder

In order to also see successes, change ForceLog to 1

Sunday, August 13, 2006

Open source Licenses

Recently, I was looking into the different kinds of licenses available for open source software. Specifically I was looking into the Lesser GNU Public License (LGPL). Most of the main pages such as the GNU site (http://www.gnu.org/licenses/lgpl.html) is so full of legalize that I just could not figure out what I had to do to comply with the license. The best that I found was this page for the CGAL library, that tells me what I have to do with the LGPL license. http://cgal.org/license_frame.html The Lesser General Public License gives you the right to use and copy the code freely. It is also possible to modify the code under the condition that the resulting modification is released as source code under the LGPL with any binary distribution that you may do of a resulting application using these LGPL parts. And these are some other links that I found along the way: Here is a page on different kinds of Open Source licenses. Open Source Initiative OSI - Licensing And this one is for all GNU Licenses : http://www.gnu.org/licenses/

Saturday, August 12, 2006

Reflection in .NET

Recenty I was doing some research on reflection in .NET. Questions I was looking at were: When is it to be used? What costs are there to using reflection? What alternatives are there to reflection? Here are some websites that I found to answer these questions: Reflection (A chapter from the book Programming C#) http://www.oreilly.com/catalog/progcsharp/chapter/ch18.html Reflection Demystified http://www.dotnetdevs.com/articles/ReflectionDemystified.aspx Dodge Common Performance Pitfalls to Craft Speedy Applications http://msdn.microsoft.com/msdnmag/issues/05/07/Reflection/ This article compares CodeDOM to Emit (The major difference is that Emit, emits IL code, whereas CodeDOM can generates code in .NET languages like C#, VB....) http://www.fawcette.com/reports/vslivesf/2004/holmes/ In .NET 2.0, there is an alternative to Reflection called Dynamic Code Generation (sort of a light weight Emit) This article from CodeProject talks about it with some good examples: http://www.codeproject.com/useritems/Dynamic_Code_Generation.asp Here is a code project article on using this method to work around the issue of calling properties in a loop using reflection (which is very slow). Fast Dynamic Property/Field Accessors http://www.codeproject.com/csharp/DynamicCodeVsReflection.asp In VS2005, one can use visualizer and here is one for use with Reflection Debugger Visualizer for MethodInfo, DynamicMethod, and MethodBase http://weblogs.asp.net/rosherove/archive/2006/04/25/MethodsVisualizer.aspx ---------------------------------------------------------------------------- One major use of Reflection is for the loading of plugin dlls, using the mechanism of loading a DLL and then using reflection to query and find those types that implement a certain interface. Here is some information regarding this use of Reflection. Remember to scroll down to the "Oops a small problem" part of the article (which talks about doing this querying in a different appdomain). http://weblogs.asp.net/rosherove/pages/8048.aspx