Skip to main content

Posts

Combining Kendo UI–Grid with Angular.js–Pass selected item to controller

A colleague couldn’t find a clean solution to pass the selected row in a Kendo Grid to an Angular controller method. So here is a short code snippet that shows how this can be done: Here is the UI(admire my great design skills): Here is the corresponding HTML and Angular controller:

Angular–Strange ng-click issue

A colleague asked me to have a look at the following issue he had: “I have the following problem inside my Angular application: I’m using the ngclick to capture the click event on a link and call a method on my controller that uses the UI routing to navigate to a different page inside my SPA. However when I click on the link, the navigation occurs as expected but I also see that the URL in my address bar is set to the root domain. To give an example, instead of showing my.spa.com#product/1/edit, the url is reset to my.spa.com.”   And here is the code he was using: When I started to debug the problem, I noticed that 2 click events were triggered when you click on the link. The first click event handles the ng-click as you would expect but the second click executes the normal action when clicking on a url(in this case, as the href attribute was empty, it triggers a navigation to the root url, explaining the strange behavior in the address bar). I was able to fix the issu...

What’s a secure password?

As a consultant I visit a lot of companies. At most of these companies I have an account and associated password. Every company has it’s own set of password rules most of the time expecting a combination of letters, numbers, uppercase, lowercase and special characters. But how useful are these password policies and in what ways does it help to make my password hard to crack? There are a lot of misconceptions regarding passwords and what a lot of people think is a secure password in the end is not. For example, do you think that “P@ssw0rd1!” is a more secure password than “This is my password” ? (At least what I know, is that the second one is a lot easier to remember.) Let’s use Haystack to get the answer: “Haystack is an interactive brute force search space calculator that allows you to experiment with password length and composition to develop an accurate and quantified sense for the safety of using passwords that can only be found through exhaustive search.” First che...

TFS 2015–Visual Studio Test Runner

After upgrading a XAML build template to TFS 2015, some of our unit tests started to fail. I had no idea what was causing the issue, so I tried to enable any kind of logging I could. I knew that behind the scenes the Build agent was calling the vstest.console.exe, but no matter what I tried I noticed that I couldn’t find the exact parameters that were used to call this test runner . I’m not the only one who had this problem, as an issue had already been raised on Uservoice, http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6073220-diagnostics-logs-should-show-the-vstest-console-co . Remark: Maybe another good reason to upgrade to the new Build system in TFS 2015, as the Visual Studio Test step nicely logs the exact parameters.

F#–Day by Day

In my journey to master the ancient art of functional programming, I found the F# Day by Day repo in Github; This repository is dedicated to teaching the F# language in tiny increments. The idea is you come back to the repo every day for a small dose of Functional Programming (FP).   Every day you get some small F# exercises. As each exercise only takes a few minutes, not enough time is not an excuse!

Team Foundation Server 2015–Enable NUnit tests for new Build system

I’m working on replacing the existing build system we use based on XAML Workflow by the new build system introduced in TFS 2015. So far, I really like the experience. Customizing became a lot easier than it was before… However one of the things I noticed that no Test Results were collected.   I opened up the Test Assemblies Step in the build process(click on the step in the Build Results). There I could see that the vstest.console.exe was invoked but that no tests were discovered. The reason is that I’m using NUnit and therefore a test adapter should be installed and loaded on the build server. Enable NUnit Test Adapter for TFS Build To enable the NUnit Test Adapter, you have multiple options: Option 1- Use the NUnit Test Adapter DLL’s Log in to your build server Download the NUnit Test Adapter for Visual Studio from the Visual Studio gallery: https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d Extract the VSIX file...

TFS 2015–The item may not be cloaked because it does not have a mapped parent.

I’m working on replacing the existing build system we use based on XAML Workflow by the new build system introduced in TFS 2015. So far, I really like the experience. Customizing became a lot easier than it was before… However not everything is perfect. While building a solution I noticed the following error message: “The item $/Framework en Tooling/Drops may not be cloaked because it does not have a mapped parent.” Let’s find out what was going on. Open your favorite browser and navigate to the web access portal for your team project Click on the BUILD tab Expand the Build Definition section, right click on the failing Build definition and choose Edit… from the context menu The build definition is loaded. Now click on the Repository tab. On this tab you see the workspace mapping used for the build definition. In my case it looked like this: Seeing this immediately explained the error message. I was cloaking a folder that was on the same l...