ServerGuard is a simple Windows process monitor that will show you the processes that are running on your server, the owner and the load on the server they are causing. It was written to quickly visualize heavy load users and application on busy terminal server systems. You should run this tool as administrator to be […]
Author: bobnoordam
Populating a DX Treelist control from code or data
These samples will show the basic handling of the treelist control, to create a structure and react to clicks by the user. Used in this example is the treelist control from the DevExpress suit, but you can apply the same technique to basicaly any treelist control with minimal changes. The first example shows how to […]
Accordeon control
The accordeon control is part of the Ajax control toolkit and offers a series of tab-like sections, of which one is expanded at a time. Below is a minimal use sample of how to deploy the control. The ajax control toolkit can easily be installed from the NUGET menu within visual studio. Markup <%@ Page […]
Sorting and selection with the streams API
The common question: How do i make a selection from an arraylist in a simple way. Answer: use the streams api that has been around since forever. Assume the very simple data class B And let’s put some very simple data in it: Selecting with an arraylist as target Or, using a generic List<> to […]
Recursion revisited: Let’s call it self-calling-code
In the days of Z80 and 6502 programming in low memory systems self modifying code was quite common. Not only was it extremely efficient space and speed wise, it often was the only real way to get things done in systems with nothing but a few kb of memory. Explaining the concept of self modifying […]
Testing the Ajax Control Toolkit Tab control with WatiN
The Ajax Control Toolkit offers a large amount op ASP.NET Ajax control, and can be found on codeplex. WatiN is a popular test framework for UI testing ASP.NET web applications. Both can be obtained from the linked site, or can easily be added in Visual Studio with nuget. The objective of this writeup is to […]
Establishing display and game window size
Sample XNA code to establish a fixed size windowed view public Game1() { graphics = new GraphicsDeviceManager(this); // Determine the resolution of the screen int maxwidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; int maxheight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; // Set the game window to 90% of the avaiable resolution _windowWidth = (int) (0.9*maxwidth); _windowHeight = (int) (0.9*maxheight); graphics.PreferredBackBufferWidth = _windowWidth; graphics.PreferredBackBufferHeight […]
Backup and restore a MySQL Database from the command line
Creating a backup from the command line on the source server mysqldump -h localhost -u username -p database_name > backup_db.sql Restoring this backup to an existing, empty database on the target server mysql -u username -p database_name < backup_db.sql When scheduling your backup with a batchfile you can use a simple trick to include a […]
Change network type for VPN Connections (Windows)
So you just created a brand new VPN connection to let’s say work, and Windows decided that it is a completely untrusted network connection, setting it to a public network. Here is how you can quickly and immediately change the network type using powershell. Start an elevated powershell prompt Use the following command to list […]
Get the version number of the current running release
lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.9 (jessie) Release: 8.9 Codename: jessie</pre>