Solomon

This user hasn't shared any biographical information

Homepage: http://www.oyangudi.com


Posts by Solomon

Design Patterns Interview Questions #1

February 13, 2010 - 6:17 am

Posted in Design Patterns | No comments

What is a Design Pattern? Design Pattern is a re-usable, high quality solution to a given requirement, task or recurring problem. Further, it does not comprise of a complete solution that may be instantly converted to a code component, rather it provides a framework for how to solve a problem. In 1994, the release of [...]

AJAX Interview Questions #1

February 13, 2010 - 6:07 am

Posted in Interview Questions - AJAX | 1 comment

What’s AJAX ? AJAX (Asynchronous JavaScript and XML) is a newly coined term for two powerful browser features that have been around for years, but were overlooked by many web developers until recently when applications such as Gmail, Google Suggest, and Google Maps hit the streets. Asynchronous JavaScript and XML, or Ajax (pronounced "Aye-Jacks"), is [...]

JavaScript Interview Questions #1

February 13, 2010 - 5:58 am

Posted in Interview Questions - Javascript | No comments

What’s relationship between JavaScript and ECMAScript? – ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3. What are JavaScript types? – Number, String, Boolean, Function, Object, Null, Undefined. How do you convert numbers between different bases in JavaScript? – Use [...]

XML Interview Questions #1

February 13, 2010 - 5:45 am

Posted in Interview Questions - XML | No comments

1. What is XML? XML is the Extensible Markup Language. It improves the functionality of the Web by letting you identify your information in a more accurate, flexible, and adaptable way. It is extensible because it is not a fixed format like HTML (which is a single, predefined markup language). Instead, XML is actually a [...]

JavaScript & AJAX Interview Questions #1

February 13, 2010 - 5:33 am

Posted in Interview Questions - JS & AJAX | No comments

1.  Why so JavaScript and Java have similar name? A.  JavaScript is a stripped-down version of Java B.  JavaScript’s syntax is loosely based on Java’s C.  They both originated on the island of Java D.  None of the above   2.  When a user views a page containing a JavaScript program, which machine actually executes [...]

Inherit DataGridView in Windows Forms

September 4, 2009 - 11:28 pm

Tags: , ,
Posted in C# | 4 comments

Create a user control class DataGridViewEx and paste the code snippet given. You can use this control where you want an inherited DataGridView. Download source code & sample: 7z file – DataGridViewInheritance.7z Zip file – DataGridViewInheritance.zip using System; using System.ComponentModel; using System.Design; using System.Drawing; using System.Windows.Forms; namespace DataGridViewInheritance { [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))] public partial class DataGridViewEx : [...]

Comma-Delimited Output (SQL Server)

May 2, 2009 - 3:56 pm

Tags: ,
Posted in SQL Server | 1 comment

Using Query: use Northwind GO declare @CustIDs varchar(8000) select top 10 @CustIDs = isnull(@CustIDs + ‘,’, ”) + CustomerID from Customers select @CustIDs GO Using Cursor: declare cCustomerIDs cursor for select [CustomerID] from [dbo].[Customers] order by [CustomerID] declare @CustomerIDs varchar(8000) declare @CustomerID varchar(10) open cCustomerIDs fetch next from cCustomerIDs into @CustomerID while @@FETCH_STATUS = 0 [...]

Decimal to Byte array (vice versa)

February 26, 2009 - 9:43 am

Tags:
Posted in C# | 14 comments

/// <summary> /// Decimal to Bye array /// </summary> /// <param name="dec">decimal</param> /// <returns>byte array</returns> public static byte[] DecimalToBytes(Decimal dec) { using (MemoryStream stream = new MemoryStream()) { using (BinaryWriter writer = new BinaryWriter(stream)) { writer.Write(dec); return stream.ToArray(); } } } /// <summary> /// Byte array to Decimal /// </summary> /// <param name="src">byte array</param> /// [...]

Byte array to String (vice versa)

February 26, 2009 - 9:33 am

Tags:
Posted in C# | No comments

/// <summary> /// Byte arrary to String /// </summary> /// <param name="bytes">byte array</param> /// <returns>string</returns> public static string BytesToString(byte[] bytes) { ASCIIEncoding enc = new System.Text.ASCIIEncoding(); return enc.GetString(bytes); } /// <summary> /// String to Byte array /// </summary> /// <param name="str">string</param> /// <returns>byte array</returns> public static byte[] StringToBytes(string str) { ASCIIEncoding enc = new System.Text.ASCIIEncoding(); [...]

Byte array to Integer (vice versa)

February 26, 2009 - 9:29 am

Tags:
Posted in C# | No comments

/// <summary> /// Byte array to Integer /// </summary> /// <param name="bytes">byte array</param> /// <returns>int</returns> public static int BytesToInt(byte[] bytes) { return int.Parse(BytesToString(bytes).Trim()); } /// <summary> /// Byte array to String /// </summary> /// <param name="bytes">byte array</param> /// <returns>string</returns> public static string BytesToString(byte[] bytes) { ASCIIEncoding enc = new System.Text.ASCIIEncoding(); return enc.GetString(bytes); } /// <summary> [...]