Tag: tutorials

SQL Server 2014 Tutorial – Display System Databases in Object Explorer.

Problem Statement You need to view the System Databases in Object Explorer. Solution By default , there are few System databases that gets created when you install SQL Server. Some of these databases are master – This is the primary system database which is needed for the SQL Server to start and work fine. It contains the information about databases , logins , configurations etc….

C Program to generate multiplication table

Problem Write a program in C to generate a multiplication table of a number entered by the user. How to generate a multiplication table for a input number in C ? Here’s a program that takes an input from the user and generates a multiplication table for it up to 10. Output Abundantcode.com’s Coding sample                                      Enter a Number: 12                                            12 * 1 = 12                                              12…

Json.NET & VB.NET – How to Serialize an Collection?

Do you want to serialize an collection in your VB.NET application?. Json.NET supports this functionality with ease. The Collection can be an Array , Dictionary or List. You need to simply pass collection to the JsonConvert.SerializeObject static method which would serialize the collection and return you the Json string. How to Serialize a Collection in VB.NET using Json.NET ? For example , assume that you…

C# Program to swap two numbers

Problem Write a program in C# to swap two numbers using temporary variable and display the result in the console window. How to swap two numbers in C# and display it in the Console ? Output Abundantcode.com coding sample Enter the First Number : 25 Enter the Second Number : 87 First Number is 87 Second Number is 25

Do-While Loop example in Java

The do-while loop in java is similar to the while loop except that the do-while loop is guaranteed to execute at least once . The do while loop evaluates its condition at the bottom of the loop. The syntax of the do-while loop in java can be written as do{statement(s)}while(expression) Do-While Loop example in Java Below is a sample code snippet demonstrating the usage of…

C Program to Find the Largest Number from the 3 Input Numbers

Problem Write a program in C language that accepts 3 numbers as inputs and finds the largest among them and displays it on the screen. How find the largest number among the three input numbers in C language ? Output Abundantcode.com Coding samples                                   Enter number1 : 87                                                   Enter number2 : 54                                         Enter number3 : 23                                           87 is the largest number.

How to provide a default value for Auto Implemented Property in C#?

Sometimes, one might want to provide a default value for the auto implemented properties. For example, you might want to provide a default text for a string value instead of null. This can be achieved by providing the default value in the constructor for the properties. Below is a sample code snippet demonstrating how to do it. How to provide a default value for Auto Implemented…

Java – How to accept input from Keyboard ?

Problem Statement You need to accpet user input from the keyboard from your java program and display it in the command line. Solution Use the BufferedReader and InputStreamReader defined in the java.io package to read the input data from keyboard and store it in a variable. The output of the above program is Enter data This is a test message from abundantcode.com This is a…

C Program to check if a number is Palindrome or not

Problem Write a program in C to check whether a given number is a palindrome or not. How to find if the number is a palindrome or not in C ? A palindrome is a number where the reverse of a number is equal to the original number. Here’s a program in C demonstrating how to do it. Output Abundantcode.com coding sample Enter a number:…

C Program to find the size of primitive datatypes

Problem Write a program in C to find and display the size of the primitive datatypes likes int , float , double and char using the sizeof function. How to find the size of primitive datatypes in C? Output Size of int: 4 bytes                            Size of float: 4 bytes                              Size of double: 8 bytes                              Size of char: 1 byte

C Program to find the Sum of natural numbers

Problem Write a program in C to find the sum of natural numbers using recursive function. How to find the sum of natural numbers using recursion in C ? Output Abundantcode.com Coding samples Enter the limit : 5 Result = 15

What are the difference between class and structure in C#?

What are the difference between class and structure in C#? Structure Struct are value types. They can be empty but a null cannot be assigned to Struct Structs cannot contain explicit parameterless constructors. Doesn’t support Inheritance and cannot use the protected or protected internal modifier. A Struct always has a built-in public default constructor. Cannot use the “as” operator. Cannot have a destructor Cannot be…

What is Suspension Manager in Windows Phone 8.1 App template ?

When you create a new Windows Phone 8.1 project using the Hub App or Pivot App template , you would notice that it contains a class called “SuspensionManager”. What is Suspension Manager in Windows Phone 8.1 App template ? It is a kind of helper class and provides the necessary properties and methods to load and store the state when the windows phone store app…

C# Program to swap two numbers without using temporary variable

Problem Write a program in Visual CSharp to swap two numbers using temporary variable and display the result in the console window. How to swap two numbers in C# without using temporary variable ? Output Abundantcode.com coding sample Enter the First Number : 45 Enter the Second Number : 67 First Number is 67 Second Number is 45

C Program to calculate the sum of Natural Numbers

Problem Write a program in C to take the input (n) from the user and calculate the sum of all the natural numbers from 1 to n. How to calculate the sum of natural numbers in C language ? Output Abundantcode.com coding sample                                                Enter a positive number : 4                                                 Result = 10

Concatenate or Join a string Array using LINQ in C#

Want to join the items inside the string array say with, delimiter using LINQ in C#? It’s pretty easy. Below is a sample code snippet demonstrating in easy steps on how to concatenate a string array using LINQ in C#? Concatenate or Join a string Array using LINQ in C#

Downloading and Installing AngularJS via CDN

If you want to use AngularJS in your webpage , you just need to point the <script> tag in the page to the AngularJS file. You can either download the AngularJS script file to your project and use it from there or use CDN (Content Delivery Network). How to download and install AngularJS via CDN ? You just need to add the below script within…