Saturday, April 24, 2010
posted by Lars Hundebøl # 07:47 AM
Here is a nice little tip to reference files located in Visual Studio project directory, when running the project from within Visual Studio.
Use the following code:
string path = Path.Combine(Environment.CurrentDirectory,
@"..\..\Test.xml");
leave comment
Wednesday, December 02, 2009
posted by Lars Hundebøl # 01:59 PM
The following is helpfull little tip to create shortcuts to commonly used applications when working in the command prompt.
1. Create a new doskey macrofile (e.g. notepad c:\doskey)
2. Edit doskey macrofile to include all your shortcuts:
sub="C:\Program Files\Sublime Text\sublimetext.exe" $*
ie="C:\Program Files\Internet Explorer\iexplore.exe"
3. Change cmd.exe shortcut to include the following doskey command:
%SystemRoot%\system32\cmd.exe /k doskey /macrofile=c:\doskey
Relevant doskey links:
Loading doskey automatically with CMD
DOSKEY – set shortcuts for DOS commands
leave comment
Wednesday, June 10, 2009
posted by Lars Hundebøl # 01:45 PM
I keep forgetting how to use the ASP.NET AJAX PageMethods (.NET 3.5), so here is a short examples that gets me up to speed:
In Default.aspx.cs insert the following static method declared with the WebMethod attribute:
[WebMethod]
public static Person DoSomethingServerSide(
string name, string email)
{
Person p = new Person()
{
Name = name,
Email = email
};
return p;
}
...and in the Default.aspx insert some JavaScript that leverage this PageMethod:
function DoSomethingClientSide()
{
PageMethods.DoSomethingServerSide(
"Test", "test@test.com", Callback);
}
function Callback(res)
{
alert(res.Name + " " + res.Email);
}
And that's it... no wonder I keep forgetting how easy it is.
leave comment
Saturday, May 02, 2009
posted by Lars Hundebøl # 07:48 AM
Sunday, April 26, 2009
posted by Lars Hundebøl # 09:12 AM
The following is a step-by-step guideline to how I installed Ruby On Rails for Windows with SQLite as the database.
-
Download the latest version of Ruby One-Click installer for Windows here, and run the installer. This will install Ruby (naturely) and RubyGems, the package manager for Ruby.
At the time of writting this tutorial, I downloaded and installed Ruby-186-26 (stable).
-
Update RubyGems by executing the following line in a command prompt:
gem update --system
- Now install Rails using RubyGems, by executing the following line in a command prompt:
gem install rails --include-dependencies
This will install Rails and all relevant dependencies. Please note that this may take some time to install.
- Download the lastest SQLite from here, and unzip it into the Ruby bin directory (by default c:\ruby\bin). You'll only need the pre-compiled DLL; at the time of writing, the version I downloaded and unzipped was sqlitedll-3_6_13.zip.
- Finally install SQLite3-Ruby using RubyGems, by executing the following line in a command prompt:
gem install sqlite3-ruby -v 1.2.3
By the time of writing version 1.2.3 was the latest version actually working with Windows.
I've used the installation guideline on Windows Vista and Windows 7 (Build 7000) without any problems. The latest version of Ruby on Rails is preconfigured to use SQLite, and therefore no additional configuration is required after creating a new rails project.
leave comment
Monday, April 20, 2009
posted by Lars Hundebøl # 04:25 PM

Back in the days, Google was a little more primitive.
leave comment
Friday, March 20, 2009
posted by Lars Hundebøl # 04:18 PM
At MIX 09 this week, Microsoft released the prototyping tool SketchFlow. SketchFlow allows the designer, to "sketch" up a simple prototype, using a combination of flow diagrams and hand drawn pictures or controls that looks hand drawn.
By using Silverlight, SketchFlow can create a prototype that easily can be shared with the client using the Web, and with annotating tools, the client can comment on different aspects of the prototype.
In that the prototype is a Silvelight application, it is also possible to use animations, within the prototype, to better illustrate different transition within the proposed application. There is also the added benefit of using this tool when developing Silverlight and WPF applications, it that the prototype can easily be used as the base for the actual implementation (check out the MIX 09 day 1 keynote).
Not knowing existing prototyping tools, I can't say whether or not this product is all that different from existing prototyping tools. The SketchFlow will be able for preview later this yaer.
leave comment
Thursday, March 19, 2009
posted by Lars Hundebøl # 04:37 PM
In all my excitement yesterday, I forgot some of the crucial items on my personal wish list for Silverlight, which still is not supported by Silverlight 3. Unfortunately there is no support for webcams or microphones, as there is in Flash, and most regrettably there is no support for printing.
Microsoft said they working hard to get support for printing, so hopefully we might see this in the RTM release of Silverlight 3.
leave comment
Thursday, March 19, 2009
posted by Lars Hundebøl # 04:17 PM
Yesterday Microsoft announced the SuperPreview feature as part of Expression Web and as a standalone install. The cool thing about SuperPreview is that you can overlay you HTML mockup onto of the actual composition, to see how "pixel perfect" it is, and you can test different browsers (IE 6, 7, 8, Safari, FireFox, e.g.) opposite each, and even without some of them being installed (by leveraging a service on the Net).
Check it out by downloading the trial here.
leave comment
Wednesday, March 18, 2009
posted by Lars Hundebøl # 07:33 PM
Maybe it's the brainwashing drugs they give you here at MIX, or maybe it's just because Microsoft have really listen to the developers, but I'm in love with Microsoft.
The new enhancements made to Silverlight 3 (just released in Beta), can now fully compete with Adobes Air/Flex. Here's the short list of cool new features:
- GPU accelaration support in both Windows and Mac
- H.264 support
- Outside Browser support in both Windows and Mac
- Perspective 3D support
- Bitmap+Pixel API
- Support for Pixel Shaders
- Improved Deep Zoom
- Deep Linking
- Improved Text Quality
- Multi Touch
- 100+ Controls (as part of the SDK)
- Library Caching Support
Check out the Keynote with Scott Gu and the What's new in Silverlight 3 session when available on www.visitmix.com/2009.
leave comment
older posts >