Tag: tutorials

SQL Server 2014 Tutorial – Personalize SQL Management Studio

Problem Statement You need to personalize SQL Server Management Studio. Solution There are various personalization options available for the SQL Server users in the SQL Management Studio. For example, if you want the Object explorer to be place on a different position instead of showing it in the left side of the SSMS, you can just move it by clicking it on the title bar…

ElasticSearch – How to Install ElasticSearch ?

Problem Statement You need to download , install and Elastic Search on Windows and Mac OS X machines. Solution You can download ElasticSearch which is available in various formats like Zip , Tar.gz from https://www.elastic.co/downloads/elasticsearch . The installation is pretty simple and infact you dont need to do  anything special to install ElasticSearch on your machine. You need to extract or uncompress the file. Note…

C Program to find if the Given year is a Leap Year or Not

Problem Write a program in C to check whether a year entered by the user is a leap year or not. How to find if the given Year is a Leap Year or Not in C ? If the Year is divisible exactly by 4 , then it is a Leap Year. Additionally for the century years that ends with 00 , it is a…

Different Operators in C#

Below is a list of some of the operators in C# Arithmetic Operators + , – , * , / , % Logical Operators & , | , ^ , ~ , && , || , ! Increment and Decrement Operators ++ , — Bit Shift Operators << , >> Comparison Operators == , != , <> , <= , >= Assignment Operator = ,…

How to get the IP Address of the Local Machine using C# ?

You can get the IP address of the local machine or localhost using C# using the Dns class’s GetHostByName defined in the System.Net namespace. The Dns.GetHostByName returns the array of AddressList which contains the IP address . How to get the IP Address of the Local Machine using C# ? Below is the sample code snippet demonstrating the retrieval of the IP address of the…

C Program to convert Binary Number to Decimal

Problem Write a program in C to convert a binary number to decimal number. How to convert a binary number to decimal number in C ? Output Abundantcode.com Coding samples        Enter a binary number: 1101                                                    13 in decimal

How to get the Number of Elements in an Array in C# ?

You can use the Length property of the array to return the number of elements in it. Note that once the array is created , you cannot change its length. How to get the Number of Elements in an Array in C# ? Here’s a code snippet demonstrating the usage of the Length property of the array to get the number of elements.

How to Get the localhost IP address in Java ?

If you want to get the localhost IP address in java , you can use the InetAddress class which exposes the getLocalHost method and later use the getHostAddress method of the InetAddress. The getLocalHost method returns the host information of type InetAddress . The InetAddress type has the method getHostAddress which returns the IP address. How to Get the localhost IP address in Java ?…

How to sort an array in C# ?

If you want to sort an array in C#.NET , you can use the Array.Sort method to do it. How to sort an array in C# ? Below is a sample code snippet demonstrating the usage of the Array.Sort method to sort an array in C#.

How to search array elements in Java using Binary Search ?

Do you want to search for an element in a array in Java using Binary Search algorithm ? . If yes , its pretty much easy to do it using the binarySearch method exposed by the Arrays class. How to search array elements in Java using Binary Search ? Below is an example of searching an element using Binary search from array elements in Java.

C# Program to display "Hello, World!"

Problem Write a program in C# to display “Hello, World!” on the screen. C# Program to display “Hello, World!” in Console Window. This is a simple C# program that displays “Hello, World!” on the console window. Output Hello, World!

C Program to display Fibonacci Numbers

Problem Write a program in C to display the sequence of Fibonacci numbers of first n numbers entered by the user. How to display Fibonacci sequence in C Language ? Before writing a program to display the Fibonacci sequence , it is important to understand what exactly is the Fibonacci sequence. It is a series where the next number is the sum of the previous…

How to find if the Column Exists in a table in SQL Server?

If you are looking to find if the column exists in a table in SQL Server, here’s a simple query to it. Assume that the table name is “Articles” and the column name is “AbundantCodeType”, below is a sample query to know if the column exists in SQL Server. How to find if the Column Exists in a table in SQL Server ?

How to sort an array in Java ?

If you want to sort an array in Java , you can use the Arrays.sort utility method to do it. How to sort an array in Java ? Below is a sample code snippet demonstrating the usage of the Arrays.sort utility method to sort an array in java.

C Program to find if a number is odd or even using Conditional Operator

Problem Write a program in C language using the conditional operator to check whether a given number is even or odd. How to check if a Number is Odd or Even in C using conditional operator? An integer that is divisible by 2 is an even number and that is not divisible by 2 is an odd number. Example of even number is 2 ,…