Took me a while to find this one ….
http://stackoverflow.com/questions/2645442/visual-studio-2010-does-not-discover-new-unit-tests
Took me a while to find this one ….
http://stackoverflow.com/questions/2645442/visual-studio-2010-does-not-discover-new-unit-tests
Posted in Uncategorized | Leave a Comment »
SELECT @titleqty = (SELECT SUM(qty) FROM sales WHERE title_id = @titleid)
This post gave me the syntax I was looking for.
Posted in Uncategorized | Leave a Comment »
Using JQuery to post data I had problems with the success event not firing.
$.ajax({ url: myUrl, data: JSON.stringify({ stuff: stuffData }),type: ‘POST’,dataType: ‘json’, contentType: ‘application/json; charset=utf-8′,success: function () { alert(‘Im back!’); } });
I could use alternative options like the Status property to catch 200 as success …. but as it turns out, removing the (redundant) “dataType: ‘json’” property fixed the problem and my success function kicked back in.
Posted in English, Technology | Leave a Comment »
Posted in English, Technology | Tagged html5 | Leave a Comment »
Scenario: Creating an html application, with a few pages in separate html files. Testing the html web in Chrome, Firefox and building the app for my mobile Android phone through phonegap.com. For debugging purposes I created two identical pages (same content) in different files, with links (link1 and link2) in the root menu.
Problem: When selecting either link from the application root menu, only the first page I requested worked properly and ran scripts populating a list on the page. When pressing “back” and then pressing the other link (not pressed in my first attempt) the resulting page is displayed, but the page list is not populated (..without pressing browser refresh).
Solution: Making sure div elements hosting script results have unique names across the application.
Posted in English, Technology | Tagged html5 | Leave a Comment »
While trying to setup a clean development computer, I ran into all sorts of installation problems with SQL 2008 R2. “Invalid operation” and “System version=4.0.0.0″ not found. After trying all sorts of install/uninstall combinations, I decided to format the disc, reinstall W7.
Seems like that did the trick and now I am blaming Visual Studio 2010 (with .net 4.0) for the installation problems.
This being a completely blurry blog entry, I will provide logs and what the exact error is if anybody asks.
Posted in English, Technology | Leave a Comment »
Working with jqGrid, placing a Json response as data source, trying to do this stuff according to jqGrid documentation gave me:
gridPlayers.addJSONData(jsonStr );
But I was left stranded with this message:
[mygrid] ...has no method 'addJSONData'
Using this post: http://stackoverflow.com/questions/545714/jqgrid-addjsondata-asp-net-2-0-ws I realized that the data source is actually an array and some kind of wrapping is needed for the Json data so:
var jsonObject = eval('(' + jsonStr + ')');
gridPlayers[0].addJSONData(jsonObject);
works
Posted in English, Technology | Leave a Comment »
After installing Windows 7 on my Dell Latitude D620, I couldn’t find a driver to disable the touchpad (It was not automatically installed).
After scanning google and the Dell support website, I finally stumbled acrross this post.
Posted in English, Technology | 1 Comment »
When having 1…n relation between a base object and a list of other object, e.g. when a tournament has a list of players, removing one of the players from the list isn’t as obvious as one might expect.
var t = DB.Tournament.FirstOrDefault(c => c.Id == idTournament);
var g = DB.Golfer.FirstOrDefault(x => x.Id == idGolfer);
t.Golfer.Attach(g);
t.Golfer.Remove(g);
DB.SaveChanges();
This Stack Overflow post fixed this issuse for me.
Posted in English, Technology | Leave a Comment »
I was receiving the following error:
Unable to update the EntitySet 'Player' because it has a DefiningQuery and no element exists in the element to support the current operation.
Turns out that Entity Framework treats tables that are created without an explicit primary key, as views, and therefore does not generate an update function. As usual, a StackOverFlow post quickly put my mind on track.
Posted in English, Technology | Leave a Comment »