Tag: How to
How to check if one string contains another substring in JavaScript ?
Below is a sample code snippet that demonstrates how to check if one string contains another specified substring using JavaScript. How to check if one string contains another substring in JavaScript ?
Inner Join in SQL Server
You can use inner join to get the result of two tables that match the criteria. For example , assume that you have a Person table and a Phone Number table where every person would have 0 or more phone number associated to him and you wish to get the person records who have at least one phone number. Here’s the query on how to…
How to Create ByteArray from a Stream in C#?
Below is a sample code snippet that demonstrates an easy way to create a ByteArray from the Stream that contains data in C#. How to Create ByteArray from a Stream in C#?
How to check if a column exists in a table in SQL Server ?
If you want to find out if a column exists in a SQL Server table , you can use the sys.columns table and specify the name of the column and table as parameter. How to check if a column exists in a table in SQL Server ? For example , you want to find out if the GroupName column exists in the table “HumanResources.Department” table…
How to Merge Dictionary in C# ?
There are times when you want to merge 2 dictionary collections to one . Below is a code sample that shows how to do it. How to Merge Dictionary in C# ?
How to Add range of elements to ArrayList in C# ?
You can use the AddRange method of the ArrayList object to add the range of elements (string array) to ArrayList in C#. How to Add range of elements to ArrayList in C# ? Here’s the code that demonstrates how to do it.
How to find the reverse of a number using C# ?
Below is a sample code snippet that demonstrates how to find the reverse of a number using C# . How to find the reverse of a number using C# ?
Sleep Command in SQL Server
If you are looking at writing a query to sleep for or WAIT for a certain amount of time before the query execution can begin , you can use the WAITFOR command. For example , if you want to wait for 1 minute , the query or command for the same will be this.
How to Remove Objects from the List with RemoveAll in C#?
Below is a sample code snippet demonstrating How to Remove Objects from the List with RemoveAll in C#? How to Remove Objects from the List with RemoveAll in C#?
VB.NET Program to display "Hello, World!"
Problem Write a program in VB.NET to display “Hello, World!” on the screen. VB.NET Program to display “Hello, World!” in Console Window. This is a simple VB.NET program that displays “Hello, World!” on the console window. Output Hello, World! In the above program , Main() is the starting point for the program and the Console.WriteLine function is used to display the string on the Console…
Get the Current Location from Windows 8.1 Store App using JavaScript
Below is a sample code snippet demonstrating the procedure on how to get the current user location Windows 8.1 Store App using JavaScript. How to Get the Current Location from Window 8.1 Store App using JavaScript ? Add the button and the span element to the html page where you want to show the current location. <button id=”GetLocation”> Get Location </button> <span id=”locationinformation”></span> Add the…
How to select top 5 records from List using LINQ in C#?
Below is a sample code snippet demonstrating on how to select top 5 records from a list using LINQ in C# using the Take extension method… How to select top 5 records from List using LINQ in C#?