Draw Shapes C#

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 Random Numbers C#

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) { …

2009 Ford F-150 Oil Change

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 …

Serialization C#

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 …

Create a mysql database

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’;

Oracle impdp (import data pump)

1). Create a directory: 2). Copy your database to the directory C:\ 3). Issue the impdp command 1impdp user/secret@ORACLE11G schemas=USERSCHEMA directory=export_dir dumpfile=export.dmp logfile=output.log