Saturday, April 24, 2010

Visual Studio Tip: Reference files in Project Directory.

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

Using doskey macrofile to optimize work within the Command Prompt

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

Gravatar of propellerhead

propellerhead

 
By the way, the sublimetext.exe reference is, in my opinion, one of the best text editors for Windows out there.
 

leave comment

Wednesday, June 10, 2009

Reminder to self: How to use ASP.NET AJAX PageMethods

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

PropellerHead Now Cornified

posted by Lars Hundebøl # 07:48 AM
Cornify

Gravatar of Bo S.

Bo S.

 
Hvad i alverden sker der?
 

leave comment

Sunday, April 26, 2009

Installing Ruby on Rails on Windows with SQLite

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.

  1. 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).

  2. Update RubyGems by executing the following line in a command prompt:

    gem update --system
    


  3. 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.

  4. 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.

  5. 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

Old School Google

posted by Lars Hundebøl # 04:25 PM

Back in the days, Google was a little more primitive.

Gravatar of Lars Hundebøl

Lars Hundebøl

 
Google Classic, I like it.
 

leave comment

Friday, March 20, 2009

SketchFlow - prototyping by Microsoft

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.

Gravatar of Lars Hundebøl

Lars Hundebøl

 
This a simple test of the new commenting feature of propellerhead.dk.
 

leave comment

Thursday, March 19, 2009

Silverlight 3 - the morning after

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

SuperPreview

posted by Lars Hundebøl # 04:17 PM

SuperPreview screenshot

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

Heart Your Silverlight 3

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.

Gravatar of lisa and the looks

lisa and the looks

 
i just love that you love Microsoft the way I love Apple and we can have some real fun together creating a private, invitation-only, grassroots cloud auction site for the sports and entertainment and technology and any kind of publishing or production enterpirse to bid on new talent in every aspect of life, business and design, including clothing, nutrition, sports gear, music videos, feature films, etc. etc., all for the benefit of charity so that we can avoid the unions that do not represent the interests of emerging talent in any industry and need to be lawyers in order to do so anyways.

Rolling Stones Only Rock and Roll just shuffled on my 3G iPhone while I am developing the 5G which will not need any apps and will be a fully functioning input and interface device with this private cloud, as will the ipad and the mobile world will all want to know who the rock star Olympic philanthropist is who wrote this to you. So please email me as soon as you can.

You just hit the jackpot with your passion big time.

I'm creating an international coaching and consulting company based in Kauai where i am going to live with a very special man with strong arms and a huge heart who needs some new technology to sweep the Tour du France with Team Radio Shack and a little help from my friends at Apple, Radio Shack, Qwest, Sprint, Cisco, AT&T and w3radio.com a fully AM radio capable production and distribtuion and Baby You Can Drive My Internet Car because I am already a star who has Steve Jobs' direct fax number.

Let's rock the planet with Sir Richard Branson's Centres for Entrepreneurship.

Aloha
Lisa
 

leave comment

older posts >