Resharper Live Templates in VB.NET

by dimitrovski 22. April 2009 12:36

A while ago I saw a screencast on using Live Templates with Resharper. According to the screencast and to the Resharper web site, in order to insert a Live Template in the code you need to start typing the name of the template and then the template will be shown in Intelisense. Alternatively you could type the full name of the template, then press tab twice and the code appears. However neither of the two approaches work in VB.NET. First it does not show up in Intelisense and second even if you type the name of the template followed by pressing TAB+TAB again nothing happens. I looked over at their support forum and it seems that you have to do it differently in VB.

In VB.NET you need to type the template name and then CTRL + E + L. This is not as elegant as in C# but nevertheless it works.

Live Templates

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Problem Installing Windows Live Writer on Vista x86

by dimitrovski 31. March 2009 23:36

As I mentioned in my previous post, I really wanted to install Microsoft Live Writer on my computer so that I can quickly create some blog posts. However I cannot I am not quite sure what the reason for this is. The installer gives me this as a result of the installation

Most importantly, the installer tells me that it's Done! Then it tells me that actually it had a fatal error during installation and it suggests to close all other programs and to try again (which doesn't help). In addition is says, that it looks like another program is preventing the installer from working. hr:0x80070643. This is the best part; I mean it is just great that I know the code of the error. It seemed to me that it will be easy to find what the problem is after I search the Internetz with this error code but so far I could not find resolution.

Hopefully by the time I write my next blog post (which based on historical data should be in December, 2011) I'll be able to resolve this issue.

P.S. After closing the dialog above, the best part is that I'm greeted with a message "Welcome to Windows Live", "Your new programs are in the Windows Live folder on the Start menu". Hmmm, no they are not :)

Update 1: I noticed that during installation, the Windows Live Messenger would start itself up. I thought maybe the messenger application is the one preventing the installer, so I uninstalled it (I don't use it anyways). After finding how to uninstall it (you have to click uninstall on Windows Live Essentials, there is no separate entry for Live Messenger), I tried installing Live Writer but I encountered the same problem.

Update 2: I was suspecting that maybe my Symantec Endpoint Protection somehow prevents the installer, so I disabled it for few minutes to try to install Live Writer. Again I had no luck and got the same error message.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

The Snipping tool in Windows Vista has disappeared

by dimitrovski 31. March 2009 22:10

For some time now I was puzzled as to why the Snipping Tool in Vista wouldn't show up when I'd look for it in my start menu. Not paying too much attention to it, I had a workaround - take a screenshot of the screen (using the Print Screen key) and then quickly crop the selection that I need in Paint.

I had forgotten about this 'problem' but recently I was working on something that involves taking screenshots often, so I decided to have a look into it. Quick Google search revealed that I removed that program myself when I decided that I do not want to have the 'Tablet PC optional components' on my desktop computer. I'm not going to portray the feelings I had when I found out that according to Microsoft, capturing images from your screen is a "Tablet feature", instead I'll just say that I was glad that I had my Snipping Tool back.

But the excitement was short lived. I found out that I could not do simple edits on the captured image such as drawing a line or a rectangle. Yes, you can scribble on the image, but if you want to create a straight line you need to have hands of a surgeon. Having lost my faith in the usefulness of the Snipping tool I decided to finally install a proper tool. At work I use SnagIt, a program that is very dear to me so I decided I will go for it even though it has a price tag associated with it. Once I was at the TechSmith's web site (the creators of SnagIt), I found out that they now offer a new freeware product called Jing that does exactly what I need. With a download size of 7.6MB I was a bit skeptical at first, thinking that it is some bloat-ware program, but once I installed it that wasn't an issue any more because it runs fast. It does use a lot of memory (96MB Working set) but for me it is not an issue as I do not use it in combination with other resource hungry applications. In addition to the simple interface to take screenshots, this program even has a dead simple interface to upload the screenshot online so that I can share it with friends.

That issue is solved, next on the agenda "Why can I not install Windows Live Writer on my Windows Vista machine".

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Interesting blog post discussion about large database tables

by dimitrovski 6. March 2009 13:42

I was reading some stuff on SQL Server optimization and I came across an article by Ben Nadel, called SQL Server NOLOCK / ROWLOCK Directives To Improve Performance. The article is pretty basic as it describes the NOLOCK hint available in SQL Server.

However the thing that I really like about this article are the comments that follow. In the comments Rick Osborne talks about using the NOLOCK hint on a very very large table  (200 columns wide with 2M+ records).

The discussion there just sparked an idea on how I would ideally implement a search program that I’ve been working on recently had I had more time to devote to it. Maybe one day, I’ll have the time for it and this blog post will remind me to do it

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Creating a temp table for testing databound controls

by dimitrovski 10. December 2008 13:45

Often times while coding, I will have a stub method that needs to provide some data that will be used elsewhere as a source for databinding. What I normally do is create a simple DataTable with the appropriate columns and few DataRows and then return it. And every time I do this I forget the exact syntax to specify the DataType of the columns in the DataTable. This time I decided to record it here for future reference

   1: Dim dt As New DataTable
   2: With dt.Columns
   3:     .Add("SampleColumn", System.Type.GetType("System.String"))
   4:     'add more columns as necessary
   5: End With
   6:  
   7: With dt.Rows
   8:     .Add(New Object() {"Dejan"})
   9: End With

Other possible DataTypes for the DataColumn according to msdn are

Boolean
Byte
Char
DateTime
Decimal
Double
Int16
Int32
Int64
SByte
Single
String
TimeSpan
UInt16
UInt32
UInt64

As well as the following array type:

  • Byte[]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen