Search this site
Skip to main content
Skip to navigation
Peter Henell - Home
Just Code
.Net - Unit Testing Internal Classes
.Net - Where is machine.config?
ASMX - Odd errors after changing namespace on your code behind files
Asmx Webservices - Test forms not vissible from remote machine?
Asp.Net - Change the identity/user that runs the Asp.Net process
Asp.Net - Quick n Dirty download SQL result as excel file to user
Asp.Net - Register your web user controls once and for all in web.config
ASP.Net - Simple - Generate image dynamically in codebehind
Automatic build version counter for visual studio projects
Batch - Automatically set JAVA_HOME to current installed version of java
BATCH - Create a copy of a file with a date & time in the filename
BDC - Most simple way to connect to Azure Data Lake Storage Gen2
Be carefull with check constraints on columns that can be null
C# - Snippet, Expected exception snippet
C# - Add/Send text to notepad process using user32.dll SendMessage from your application
C# - Assert that Type have no settable properties
C# - Asynchronous Data Access base class to retrieve data from the database without blocking the caller
C# - Asyncronously execute an Action for a period of time and report the amount of executions when done
C# - Basic SQLCommand- and SQLConnection-factory classes
C# - Class for logging
C# - Convert any CSV file to XML file
C# - Convert File to another Encoding.
C# - Convert List to DataTable
C# - Create Tree structured TreeNodes data from sql rows. Use with TreeView in winforms
C# - Create XML From any SQL Query
C# - Creating a Process, reading its console output into a textbox on a form
C# - Dataset from XSD schema with multiple datatables in hierachy. Data from only one stored procedure.
C# - DataTable to RecordSet
C# - DbCommand factory to completely remove the dependency to any specific DB Client
C# - Fill DataTable using NBuilder.Net
C# - Find SQL server instance port number
C# - Get config from non default config section
C# - Get multiple result sets from one SqlCommand query or stored procedure
C# - Gzip Uncompress and Compress Example using System.IO.Compression.GZipStream
C# - Playing with delegate invocation list, Combine, Remove
C# - Plugin architecture sample
C# - Print all fields, in a class, and their values. Excelent ToString()
C# - Read from Excel and insert to DB
C# - Tiny regex sample to get value from matched group
C# - Using Lambda instead of a separate event handler to handle events
C# - Work around for “The remote certificate is invalid according to the validation procedure"
C# Asp.Net - See html output before sending it to the client
C# Asp.Net - Checkbox validation using custom validator
C# Asp.Net - Get Id from gridview, use it to get a file from database and upload it to the user
C# Create Random Password with select set of available characters
C# EPiServer - Get Filtered PageDataCollection from codebehind
C# get web page from code, POST and GET versions. Trying to get user agent to work...
C# Snippet - Concatenate list of strings to one colon-separated string
C# Width/Depth first tree search soduko solver
Can i has Task Management System?
Clever, or not? date conversion to Date (use when date stored as integer)
Configure a list of emails in app/web.config
Could not start the Snapshot Agent to generate a new snapshot
Dataset.WriteXml write result into a string
DOS CMD Prompt - Merge multiple text files into one big file
DOS PROMPT - Command line to Use 7zip to compress all folders to individual archives
Entity Framework 4 - Customizing the generated data model script
EPiServer - Adding and modifying pages from code behind
EPiServer - Create an empty page to use when you only want to use it to store some data
EPiServer add events to datafactory
EPiServer anteckningar från kursen
EPiServer Custom property
EPiServer Dynamic Content rendered with usercontrol
EPiServer minimal scheduled job
EPiServer Plugin web usercontrol, with access control who should be able to see it
EPiServer RSS Page provider
EPiServer Virtual role
Erlang - Gissa talet
Extension on IList<T> on specific interfaces
F# - Basic Try catch pattern
F# - Compare two lists, Compare two Sequences, Compare two Sets
F# - Couchbase - Serialize from JSON to Generic Object and from Generic object to JSON
F# - Find the latest appearance of of a new item in a list
F# - Generic function to query a database with dynamic return object type
F# - Passing functions as a parameter to another function
F# - Returning Nullable objects from a function
F# - Sudoku Solver using search trees Step Five: Defining the data structure for the complete problem
F# - Sudoku Solver using search trees Step Four: Adding more Unit Tests
F# - Sudoku Solver using search trees Step one: Defining the data structure
F# - Sudoku Solver using search trees Step Seven: Increasing performance using parallel tasks
F# - Sudoku Solver using search trees Step Six: Solving Sudoku
F# - Sudoku Solver using search trees Step Three: Adding Unit Tests
F# - Sudoku Solver using search trees Step two: The algorithm
F# Mandelbrot, stolen from someone
F# Sieve of erastothenes, two versions: List and Seq. Interesting performance differences
Git Extensions - Disable check for SSL CA Cert verification
How to get NUnit to read the correct Web.config when working with Web or WCF projects
iPhone - Snippet to load image and add to view
Java - Generic Entity Comparer to check Equality of all fields
Java - Truncate the time part of a java.util.Date, removing the hours minutes and seconds etc
Linq To XML Inline Loop to add elements
Log Changes made in database tables, not that hard as i thought
Nant - Find File By Pattern
Nant - Property as a dictionary
Notify when screensaver starts running
Oracle - Only update fields where the value have actually changed.
Oracle 12c - Convert scientific formatted varchar string to Number type
Organize your servers and services, Hierarchical management of arbitrary nodes
pgAdmin - Macro to create INSERT statement for selected table
Postgre SQL - PLV8 functions to query complex json datatype
Postgres 9.2 - Installation on Ubuntu, including PLV8 Language, from source, resources used
Postgres from MSSQL - Notes from converting database from MSSQL to PostgreSQL
PostgreSQL - Automatic Partition creation script
PostgreSQL - Get Execution Plan as query result
PostgreSQL - Partition Exclusion with now/current_timestamp/current_date
PostgreSQL - Playing with postgresql, day 1
Powershell - Concat all .SQL Files into one big file, with GO statement in between
Powershell - Create new object of a custom Class using a Constructor
Powershell - Create Serialized XML result from database query
Powershell - Example of using hashmaps as dynamic objects
Powershell - How to Override ToString, or any method on an object
Powershell - ONE- LINER - Add a line of code to each filtered file of a directory
Powershell - Replace function with ignore case
Powershell - Use SQLCMD to run all scripts in a folder on one target database
Redirect To current page with querystring and all
Regex för att plocka ut en grupp ur en sträng
Regex to remove annoying google-url from google sites
Remote desktop - No more available sessions?
RIA services - Crazy bug with DateTime dates, crazy solution
Save DataSet to comma separated file
Show Hexadecimal representation of a file, neat for checking encoding of the file
Sieve of Eratosthenes
Silverilght - Changing Template on selected Item in a listbox
Silverlight - Bind to SelectedItems of a DataGrid
Silverlight - Binded value need to be updated when text is changed, not only when focus is lost.
Silverlight - Delayed loading of details when selecting an item in some list
Silverlight - Deploying Silverlight applications, remember the MIME types
Silverlight - Get Full info about WCF Exceptions
Silverlight - Let the consumers of your UserControl provide DataTemplate for parts
Silverlight - MVVM Hooking up the ViewModel in the view
Silverlight - Out Of Browser, automatic installation of updates
Spark - Microsoft SQL Server MSSQL using Windows Authentification to Parquet
Spark - Reading from Excel files, converting to parquet
SQL - Extract all user created Stored procedure text from syscomments
SQL - Find all constraints for a table
SQL - Insert to a child table using values from the OUTPUT clause
SQL - Performance comparison NVARCHAR(4000) vs NVARCHAR(max)
SQL - Simple script to get referenced table and their column names
SQL Split function for very large input string
SQL Wiki - Automatic wiki markup generator for stored procedures
SQL Wiki - Automatic documentation stubb generation
SQLCMD - Pass in scripting variables to the script
SQLCMD - Run a script file with windows authentication
SQLCMD - TSQL script to run all .sql scripts in a folder
SQLCMD BATCH FILE - Export large XML files from SQL server using SQLCMD
SSMS - Add custom templates to Template Browser, or edit the existing templates
SSMS - Adding your own addin to SSMS
SSMS - Regex to handle stuff copied from Excel to SSMS
SSMS/Visual Studio - Find Replace - Use Regex to create one task for each row in the editor
Static functions are thread safe if they do not modify any other variables than those they create themself
T SQL - Basic Inheritance
T SQL - How to get row numbers from select query
T SQL - Just some handsome code to configure a shedule
T SQL - Move a table to some other Schema
T SQL - Select contents of a column into a comma separated string
T SQL - stupid Password generator
T SQL, how long is that varchar?
T-SQL - Comments written on a course 2010-09-27
T-SQL - Kurs 2
T-SQL - An attempt to extract filter-, join- and output columns from query plan XML
T-SQL: The difference between @@identity, scope_identity(), and ident_current()
T4 - Generate POCO from all tables in a database
Tagga fil med prefix
Talent is wasted unless practiced
Timer för att räkna arbetstid
Tool of the day - StExbar
Tortoise SVN - Run Svn commands from command line
TSQL - Från kursen
TSQL - Show all the rows in all tables that are being locked right now
TSQL - Aliases for column names from Stored Procedure results
TSQL - Check if temp table exists, then drop it
TSQL - Concat values from a column into a single string
TSQL - Cool scripts to get statistics about your Databases
TSQL - Data Generation toolkit, Generate large amount of data for tables easily
TSQL - Deadlock while setting database to MULTI_USER mode
TSQL - Delete ALL data from ALL tables, with respect to foreign keys
TSQL - Execute ALL stored procedures to see if they work or not
TSQL - Find keys and constraints that was automatically named by SMSS
TSQL - Find orphan jobs that does not have a target database on the server anymore
TSQL - Find tables that is missing some kind of contraint
TSQL - Find which deprecated features being used by querying sys.dm_os_performance_counters
TSQL - Generate series of numbers on the fly using this CTE, useful for data generation scripts
TSQL - Generate WikiMarkup for all Indexes (all key columns and included columns)
TSQL - Get name of tables in the database that have some rows
TSQL - Grant permissions on a schema for a user
TSQL - Hierarchical table dependency graph based on foreign keys
TSQL - How to get row numbers for selected rows
TSQL - How to move all database files to new location, script to move files.
TSQL - Improved Parallel DML between 2008 and 2014 breaking code
TSQL - LEN and SUBSTRING may seem bugged but they are not, they are only very strange
TSQL - Looking at locking; can you lock a row using select statement?
TSQL - Peek into what Queries/Statements are in the query plan cache, and their execution plan if available.
Tsql - Procedure to compare data in two tables to find missing/additional/modified rows
TSQL - Query processor could not produce a query plan because of the hints defined in this query
TSQL - READ COMMITTED SNAPSHOT Demo
TSQL - Rebuild all indexes that does not have fillfactor = X
TSQL - Remove/Delete all SQL Server Agent jobs on your development server
TSQL - Reset identity column value for a table
TSQL - See all the locks that are taken / Acquired during a query
TSQL - Service Broker error when sending message to the queue
TSQL - Set database to read only using single user mode
TSQL - Snippet example of sp_executeSql to use parameters in dynamic query
TSQL - Storage Overhead of the SQL_Variant Data type
Tsql - Stored procedure to generate HTML table output from any query
TSQL - Trace for deadlocks and stop the trace when deadlock occured using EVENT NOTIFICATION and SERVICE BROKER
TSQL - Transaction Safe Sequence generation in SQL Server 2008 and older
Tsql - Use result from stored procedure in tsql script, capture it in a temporary table or variable
TSQL - Use this as check constraint on a field to prevent having overlapping dates in a table
TSQL C# - Improving the performance of INSERT when doing many inserts to the same table by batching
TSQL Insert file into database from script
TSQL Minutes from midnight
Upgrade from vb6 to vb.net wizzard, to many damned Upgrade warnings? No problem
Uppdatera GUI från en annan tråd i WPF
Vb.Net - Regex Whitelist exclusion, string cleanup
VBA Move mail to another folder
VBA Script create a link to current selected item and copy to clip board
WCF - Trace and log all incomming SOAP messages with Envelope and all
Windows 10 - Disable thumbs.db creation
Windows 7 - How to create a directory symbolic link to a network share
WPF - A simple GUI for creating SQL Connection Strings
WPF - Create a viewmodel from XAML with parameters in the vm constructor
WPF - Cut & Copy & paste buttons in a toolbar. NO CODE
WPF - Drawing positioned boxes/shapes based on a list in MVVM
WPF - Key.Up, Key.Down commands sent from Textbox to a MVVM Command binding
WPF - Make window size adjust automatically to its content
WPF - Recursive DataTemplates to display graphs/trees or Recursive objects
WPF - Update GUI from another thread
WPF MVVM - Bind command of buttons for items in a ListBox to the correct viewmodel
Xaml Tip - Find-replace regex to remove the name attribute
XCOPY - Create backup of all source code files (*.asp) from a directory and recursive child dirs
XmlSerialize - Serializing IEnumerable<T> with attributes at the top element
Återställa backup på databas som används av massa andra users
Peter Henell - Home
Remote desktop - No more available sessions?
Post date: Mar 5, 2010 2:59:28 PM
Try the admin console
Mstsc /v: serverName /admin (or /console)
Report abuse
Page details
Page updated
Report abuse