Insert image with TSQL and a hex string

0 Comments

You can insert an image from t-sql script, if you use the hex string notation: The next line will insert an image representing a "check mark" into the database. In a table [Test] with a

C# convert a BitMap to Byte[]

2 Comments

/// <summary> /// Covert a bitmap to a byte array /// </summary> /// <param name="bitmap"></param> /// <returns> /// byte array, when bitmap could be converted /// null, when bitmap is null /// null, when bitmap

Check if string is an entry in an enum C#

0 Comments

If you want to check if a string is defined in an enum, with C#, use the Enum.IsDefined function public enum CarTypes { Alfa, Audi, BMW } public void TestEnum() { if (Enum.IsDefined(typeof(CarTypes), "Audi")) {

Create Microsoft Excel documents with the Open Xml SDK with charts

0 Comments

See: http://blogs.msdn.com/brian_jones/archive/2008/11/04/document-assembly-solution-for-spreadsheetml.aspx You can now create Microsoft Office Excel documents which are compatible with the desktop client, with use of the Open Xml SDK. The created document can contain charts, formula’s etc. The data is

Difference between return true; and return false; in javascript

0 Comments

see: http://bytes.com/groups/javascript/89023-difference-between-return-true-return-false When you return something from a function, that value gets returned to the caller. For instance, say I had a method to multiply two numbers. Maybe the code looks like this: function multiply(num1,

undefined vs null in javascript

0 Comments

There is a difference between a varaible declarde as: var test; and a variable declared as: var test = null; The first variable has a value of undefined whereas the second variable has a value