using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; namespace MiscUtil.Reflection { /// <summary> /// Generic class which copies to its target type from a source /// type specified in the Copy method. The types are specified /// separately to take advantage of type inference on generic /// method arguments. /// </summary> public static class PropertyCopy<TTarget> where TTarget : class, new()… Read more →
Author: Peter
Find Domain Group Members
Win+R Rundll32 dsquery.dll OpenQueryWindow or dsquery group domainroot -name groupname | dsget group -members | dsget user -fn -ln Read more →
Commands and Queries are Holistic Abstractions
This post has been updated Click here In this post I will outline an updated perspective on Commands and Queries. If you are unfamiliar with these two patterns then please see these posts here and here for a great introduction. For the remainder of this post I will assume you have fully subscribed to the idea of parameter objects and… Read more →
Method Injection with Simple Injector
In this post I will outline a trick I created while experimenting with the code for my post Managing Commands and Queries. If you are unfamiliar with these two patterns then please see these posts here and here for a great introduction. For the remainder of this post I will assume you have fully subscribed to the idea of parameter… Read more →
Managing Command and Query Parameter Objects
In this post I will outline some of the techniques I employ to manage my Commands and Queries. If you are unfamiliar with these two patterns then please see these posts here and here for a great introduction. For the remainder of this post I will assume you have fully subscribed to the idea of parameter objects and are comfortable… Read more →
Displaying CLOB data in Sql Developer 2
set serveroutput on format wrapped; declare my_var long; begin for x in ( select <col> from <table> where … ) loop my_var := dbms_lob.substr( x.<col>, 32000, 1 ); DBMS_OUTPUT.put_line(my_var); end loop; end; / Read more →
SourceSafe lost password
Open um.dat with a hex editor change to the following (ensure that exists 41 64 6d 69 6e) 0000080 55 55 bc 7f 41 64 6d 69 6e 00 00 00 00 00 00 00 0000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000A0 00 00 00 00 90 6e 00… Read more →
Patterns & Abstractions
Patterns and Abstractions My central architectural pattern of choice is CQRS. Commands Actions that change something and return nothing public interface ICommandHandler<TCommand> where TCommand : ICommand { void Run(TCommand command); } Queries Actions that return something and change nothing public interface IQuery<TResult> { } public interface IQueryHandler<TQuery, TResult> where TQuery : IQuery<TResult> { TResult Execute(TQuery query); } Mediators A combination… Read more →
Debug IIS/global.asax within Visual Studio
Taken from this SO answer You may create a post-build event which changes the timestamp of a web.config file. I used a touch.exe tool from http://www.stevemiller.net/apps/. You also need to set the “Run the post-build event” to Always. With this option set anytime you start the debugger, web.config timestamp is getting updated causing application (thus IIS pool) restart on the… Read more →
A web based Markdown file viewer (IIS/PHP)
Firstly, thanks must go to the author of this post. Put markdown.php in your blog site folder. Add a posts folder and place all your md files into it. Create a content folder and download google prettify and bootstrap Create index.php <html> <head> <link href=’content/bootstrap.css’ type=’text/css’ rel=’stylesheet’ /> <style> * { font-family: Verdana; } </style> </head> <body> <div class=”container”> <div… Read more →