Nettiers and tables that refuse to generate an entity

June 22nd, 2011

If you use Codesmith/Nettiers (recommended) you might have stumbled upon:

You set up the Nettiers project in Codesmith and mark all tables.

When you generate the code one or more entities are missing.  There is no error message.

Besides the entity/entities not showing up you see it in the SourceTables property of nettiers.  When you started the template all were marked.  When the template was finished one/more table/s were not marked any more.

Reason: the tables are missing a primary key.

I have spent hours on this before.  I did it again.  Hopefully this post will make me, and others, spend less time on this issue.

Prezi.com – simple presentation graphics

June 13th, 2011
I found a nice little site for creating presentation graphics.  Gratis for simple and public use.
Forget power point frame by frame imaging and instead reate slides with zoom and pan.
It won’t make your presentation suddenly look good but it makes them at least a little less prone for death by powerpoint.
Until your prezi usage becomes mainstream that is.
I will use it for my next presentation.  Just have to figure out something to talk about that is not that code heavy first.
http://prezi.com/

Short review: Lilliput USB monitor

May 29th, 2011

Small and expensive but totally worth it if you need a third screen for your laptop.

If you are only using one monitor and satisfied with it there are bigger and better monitors to have for less money.  But if you, as me, only have a dual head video card and already two monitors the lilliput makes the day.

I have it for keeping an eye on email or chat or spotify or logs or perfmon or whatever needs little space at the side of my main monitor.

Easy installation in Win7 and it pops up as an ordinary video card.  No pesky dialogs floating around.

Gratis sql client tools to put on server

May 18th, 2011

( There are probably many but I haven’t bothered to do a deep search since I normally have Sqlserver and its tools on my machines. )

I avoid installing query tools on the servers to keep them as clean as possible but sometimes I need to and then there are two that spring to mind.

Microsoft Sql server 2008 management studio express which requires an install.

JAlbaharis  Query express which comes as a folder.  No installation and no risk of contaminating the server.  As is mentioned on the page there is a F/OSS version with more functionality here.  The latters seems to in active development at writing time.

Even though I wouldn’t say Management studio has a well thought through user interface it is better than Query express.  On the other hand – the source code of the latter is free (someone has already branched it but I haven’t tried the fork yet, written in C#, visual studio and seems to be active)

First time I tried Query express I threw it away since there is a bug that kicks in if you make the new document in the MDI window maximized and then run the query; the splitter between query and result is set to the bottom om the document and it looks like there is no result.  Workararound: either run the query first with non-maximized document or simply drag the splitter upwards.

Are there more gratis tools anyone would recommend?

 

Script data in Sqlserver

May 17th, 2011

I don’t know for how long this has been possible but I guess my years of whining about lack of data scripting capabilities in Sqlserver management studio is moot.

I found an article which describes the hidden setting.  I wonder for how long the possibility has been there.

http://www.kodyaz.com/articles/how-to-script-data-in-sql-server-2011.aspx

I remember Sqlbase scripting its own data back in last century.  I remember myself writing sprocs for the same for Sqlserver.  I remember myself hunting scripts for the same on the web.  I now foresee a future with lots of clicketyclick – the GUI of MS’s Sqlserver tools is way too fiddly for my taste.

Googling your own question

May 14th, 2011

Some years ago I googled a question just to find my own answer.

Right now it happened again.  Wasted 2 hours for finding the question and answer I already had gotten an answer for.

It was about AspnetMvc and Model and Actionresult and Modelstate and Modelstate.clear and Modelstate.Remove and Return View.  So next time I can google my own blog to find my own question to find the answer.

Stupid me.

Debugging javascript in ie7

May 5th, 2011

This is a dispersed article about caveats I found when forced to debug javascript in IE7.

Out of date web browser.  Out of date script engine.  Limping solution.

To fire up the debugger, enter

debugger;

as javasctipt on a row exceuting before where you want to start debugging.  One could probably divide by zero or something that makes IE throw up a dialogue asking if you want to debug or not.  and then answer yes…

There doesn’t seem to be any good official debugger for IE7, unless you have Visual studio installed.  Search the web and there is a NT4-compatible Microsoft Script Debugger; it is not very good.  There is one or more solutions but this is the only I have tried.

If you get a dialogue/error message

Request format is invalid: application/json; charset=utf-8

when working with jquery and ajax on an iis / dotnet solution, it might be due to missing lines in web.config.  The code below is for Dotnet3.5.  I don’t know what it looks like in 2.0 or 4.0.

<system.web>

<httpHandlers>
<remove path=”*.asmx” verb=”*” />
<add path=”*.asmx” type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ validate=”false” verb=”*” />
<add path=”*_AppService.axd” type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ validate=”false” verb=”*” />
<add path=”ScriptResource.axd” type=”System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ validate=”false” verb=”GET,HEAD” />
</httpHandlers>
</system.web>

 

Ajax JSON.stringify IE7 problem

May 4th, 2011

Just a tip up front.  IE7 runs an older script engine than IE8 and has no full support for Json.

So your code that calls JSON.stringify does not work.

The remedy is to include json2.js from https://github.com/douglascrockford/JSON-js/blob/master/json2.js.  It does not interfere with IE8+.  Just download the file (the “raw” button – saveas) to your script lib and include as so:

<script src="Script/json2.js"; type="text/javascript"></script><!-- Needed for IE7. -->

Running IE9 in compatibility mode does not make this error appear – it seems like IE9-in-IE7-mode is running a newer script engine.

That impediment avoided you are free to continue adding value to your site.

Placeholder for review of HP Pavilion dm1-3110eo Notebook PC

May 4th, 2011

This is a place holder for a possible review of HP Pavilion dm1-3110eo Notebook PC.

Track your document in Visual studio solution explorer window

May 3rd, 2011

This setting has been around a long time but it seems to still elude users.

There is a way to have the document you have open in Visual studio to also be tracked and highlighted in the Solution explorer window.

Menu->Tools->Options->

The Options dialogue.

Checkbox: Track active item in Solution explorer