Expand VMWare Drive Image
These instructions assume we have a Windows Server called “vm1” that we need to expand the “c” drive. 1). Remove any snapshots from vm1. This method will not work with …
These instructions assume we have a Windows Server called “vm1” that we need to expand the “c” drive. 1). Remove any snapshots from vm1. This method will not work with …
Syntax for a TSQL date time variable 1234567DECLARE @START_DATE DATETIME DECLARE @END_DATE DATETIME SET @START_DATE = ’09/21/2012 00:00:00′ SET @END_DATE = ’09/21/2012 23:59:59′ SELECT * FROM TABLE WHERE POSTINGDATE >= …
TSQL 123456–all tables and rowcount (in descending order by count) select ‘[‘+SCHEMA_NAME(t.[SCHEMA_ID])+’].[‘+t.NAME+’]’ AS [fulltable_name], SCHEMA_NAME(t.[SCHEMA_ID]) as [schema_name],t.NAME as [table_name] ,i.rows from sys.tables t INNER JOIN sysindexes i ON (t.object_id = …
Sort an array of objects by date Given the class below: 1234567891011121314 public class MyClass { public int id; …
In C# you can draw a shape on any control. For example: 12345System.Drawing.SolidBrush b = new System.Drawing.SolidBrush(Color.Blue); System.Drawing.Graphics g = System.Drawing.Graphics.FromHwnd(control.Handle); float width = 50; float height = 25; g.FillRectangle(b, …
Generate a random integer in C# 123456789private static readonly Random random = new Random(); private static readonly object lock_random = new object(); public static int GetRandomNumber(int min, int max) { …
To change the oil in a 2009 Ford F-150 you need: Oil filter removal wrench 5/8 inch socket 7 quarts 5w-20 engine oil Oil Filter Oil catch pan Rags Funnel …
To replace the starter on a 1995 Honda TRX300 4 Wheeler you will need: Starter 10 MM socket Two large screw drivers (for gently prying) A phillips screwdriver A long …
Various serialization functions 123456789101112131415public static string SerializeObject(object obj) { if (obj == null) { return string.Empty; } System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(obj.GetType()); string s …
12345$> mysql -u ‘root’ -p mysql> create database atestdatabase; mysql> create user ‘myuser’@’localhost’ identified by ‘secret’; mysql> grant all on atestdatabase.* to ‘myuser’@’localhost’;