I know I am going to want this link again in the future!
Category:Uncategorised
VSTO Office plugin not appearing in Office 2007
If you have an office VSTO plugin that is working in other versions of Office but not appearing in Office 2007 then try setting the following registry value HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice12.0CommonGeneral Name = EnableLocalMachineVSTOValue (DWORD) = 1
Watching a single property in an array in AngularJS
A typescript example that converts the array’s property into a single string that can be watched. $scope.$watch( () => this.someArray.map(x => x.selected ? “1” : “0”).join(“”), (newValue, oldValue, scope) => this.onSelectionChanged(this.getSelectedItems()));
Getting an AngularJS directive to call back a method on its parent’s controller
Here is a TypeScript example of how to call back a method on the controller from an embedded directive. The most important thing to note is that the directive’s parameter name for your callback uses a & when defined, and when calling that callback you should not use positional parameters but instead use an object …
Continue reading Getting an AngularJS directive to call back a method on its parent’s controller
AngularJs – binding HTML
The directive ng-bind will escape HTML to avoid data acting maliciously. If you want to output html you need to use ng-bind-html <div ng-bind-html=”someHtmlBody”/> The important step to getting this working is to ensure the script angular-sanitize.js is referenced on your page, and it is specified as a dependency when creating a module…. var app …
Continue reading AngularJs – binding HTML
AngularJS routes with ASP MVC Forms authentication
The ASP MVC app I am working on uses forms authentication with a timeout. This means that when the session has timed out and the user clicks refresh they get redirected to a login page, and after that they get directed back to the original page without the deep-linked client-side # part of the url. The …
Continue reading AngularJS routes with ASP MVC Forms authentication
Node.js Express, form validation, and keeping previously posted form values
I’ve been playing with Node.js and the Express webserver framework as a learning experience, it’s good fun 🙂 In the C# ASP MVC world using the Razor view engine I can define my user interface elements like this… @Html.TextBoxFor(x => x.EmailAddress)@Html.ValidationMessageFor(x => x.EmailAddress) This will do three things It will create the html output for …
Continue reading Node.js Express, form validation, and keeping previously posted form values
AngularJS – Triggering code whenever ng-view updates
//Create the modulevar app = angular.module(‘someapp’, [‘ngRoute’]);//Config the routesapp.config(configRoutes);function configRoutes($routeProvider) { $routeProvider .when(‘/’, { templateUrl: ‘/angular/viewtemplates/admin/index.html’, controller: ‘AdminController’ }) .when(‘/categories’, { templateUrl: ‘angular/viewtemplates/admin/categories/index.html’, controller: ‘CategoryIndexController’ })}//Make sure we are notified whenever the ng-view is updatedapp.run(function($rootScope) { $rootScope.$on(‘$viewContentLoaded’, function() { $(‘table[data-toggle=”table”]’).bootstrapTable(); });});
Windows welcome screen slow
After I log in to Windows 7 the welcome screen stays on for ages, in the past it was almost instant. I’ve tried various suggestions from forums and none of them worked, then it struck me what it was! Windows was trying to reconnect network drives after I had logged in, but one of them …
Continue reading Windows welcome screen slow
Installing Ruby on Rails, RubyMine and MongoDB on Ubuntu Linux
Here are some really basic instructions which should work on a virgin installation of Ubuntu Linux. I tried following some instructions in a book but they were awful, these are what I ended up with. Install some installation helper tools etc sudo apt-get install build-essential git-core sudo apt-get install curl bash -s stable < <(curl …
Continue reading Installing Ruby on Rails, RubyMine and MongoDB on Ubuntu Linux