var query = string.Format( "(&(objectClass=group)(samaccountname={0})(memberof:1.2.840.113556.1.4.1941:={1}))", childGroupName, parentGroupDistinguishedName);
Gaming and Coding
Dave posts his thoughts about board games, RPGs and programming
Thursday, 11 April 2013
Hierarchical LDAP Queries
Wednesday, 23 January 2013
Simple Visual Studio TypeScript HTML App with jQuery
I heard about TypeScript a few months ago and have had a bit of a play-around compiling some TypeScript into JavaScript using the Node.js package, but I've not had chance to try it out in Visual Studio. Here is a simple demo that shows how the code generated by the TypeScript project template can be adapted to include jQuery support.
Thanks to this stackoverflow answer for getting me started.
Step 1: Install TypeScript Plugin
Install the Visual Studio 2012 TypeScript plugin from here
Step 2: Create a Project
Create a new project in Visual Studio 2012 using the HTML Application with TypeScript project template
Step 3: Include the jQuery Type Definitions
Create a new file in the project and call it jquery.d.ts
Paste in the type definitions from from here
Step 4: Update the app.ts File
Change the code in the app.ts file to...
/// <reference path="jquery.d.ts" /> class Greeter { element: JQuery; span: JQuery; timerToken: number; constructor(element: JQuery) { this.element = element; this.element.text("The time is: "); this.span = $('<span>'); this.element.append(this.span); this.span.text(new Date().toUTCString()); } start() { this.timerToken = setInterval(() => { this.span.text(new Date().toUTCString()); }, 500); } stop() { clearTimeout(this.timerToken); } } $(() => { var el = $("#content"); var greeter = new Greeter(el); greeter.start(); });
Step 5: Include Reference to jQuery Library
Add the following markup to the head section of the default.htm file...
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
Step 6: Run or Debug
Run or Debug the application to see the TypeScript in action.
You can even put breakpoints in the app.ts file.
Thursday, 4 October 2012
Highcharts JS
Friday, 31 August 2012
Rogue-Like Game
Below is a rogue-like game implemented in JavaScript and inspired by Eric Lippert's blog articles. In deference to my old spectrum days the control keys are W, A, S, D. Find the treasure, and get out again!
Friday, 6 July 2012
Online PostScript Viewer
http://view.samurajdata.se/
Friday, 8 June 2012
Useful JQuery UI Tools
Lucky the guys that are resonsible for JQueryUI have made available a couple of controls on their site that may make it into the main UI library in the future. Here are links to the page containing demos of the controls.
Tuesday, 21 February 2012
Microsoft Excel Application missing from DCOMCNFG
Thanks to tibb I now know that this node can be accessed using the following method...
- Start
- Run
- mmc -32
- File
- Add Remove Snap-in
- Component Services
- Add
- OK
- Console Root
- Component Services
- Computers
- My Computer
- DCOM Config
- Microsoft Excel Application