Tag: How to

Specify a port number when connecting to SQL Server in Management Studio

There are times when you want to connect to a SQL Server instance that is running on a different port number than default port (1433). How to specify a port number when connecting to a SQL Server instance in SQL Management Studio ? Just specify the SQL Server instance that you are connecting to along with the port number with comma as delimiter. For example…

How to remove or replace array element in JavaScript ?

To remove or replace an element in an array in JavaScript , you can use the splice method as shown below. How to remove or replace array element in JavaScript ? To remove the array element , you can use the splice method and specify the index of the array to remove the array element. The second parameter determines the number of elements to remove….

How to mark a file as read-only from command line in Windows 10 ?

You can set a file to a read-only mode from the command line by using the command attrib and passing in the parameters like the read-only mode and the name of the file. The format of this command is as follows attrib +R  <Name of the the file> How to mark a file as read-only from command line in Windows 10 ? For example ,…

How to append an array to another in JavaScript ?

In JavaScript , you may want to append one array to another array(s) to combine their elements resulting in to a single array. How to append an array to another in JavaScript ? You can use the concat method of JavaScript to achieve the same. Below is a sample code snippet demonstrating the usage of the concat method of array in JavaScript to combine multiple…

How to Enable or Disable Visual Styles in your VB.NET Winforms Application?

You can enable or Disable the Visual Styles in your VB.NET Winforms Application by following the below steps. How to Enable or Disable Visual Styles in your VB.NET Winforms Application? 1. Launch Visual Studio 2013 and Open your VB.NET Project. 2. Right Click on the project and open the Project Properties. 3. In the Project Properties Dialog, Select the “Application” menu in the left sidebar…

C Program to calculate the power of a number

Problem Write a program in C to calculate and display the power of a number. How to calculate the power of a number in C ? Output Abundantcode.com coding sample                                               Enter the base number: 2                                         Enter an exponent: 3                                              Answer = 6

How to Save an Appointment in Windows Phone 8 using C# ?

If you want to allow the user to create or save an appointment within the Calendar application in Windows Phone 8 , you can do it using the SaveAppointmentTask launcher. How to Save an Appointment in Windows Phone 8 using C# ? To use the SaveAppointmentTask launcher , first enable the ID_CAP_APPOINTMENTS in the WMAppManifest file. Create an instance of the SaveAppointmentTask class and set…

How to redirect your website to the mobile version?

Accessing the websites in the mobile or smartphones are very common these days. Companies tend to have the mobile version of the website which targets the smaller screens. If you are one of those users who have created the mobile version of your main website, you should take care that each time the user visits the website from their mobile phones, it should redirect to…

How to Get the Current Location in Windows Phone 8?

The Windows Phone 8 SDK provides the Geolocator class which can be used to monitor and get the current location from Windows Phone 8. The Geolocator API is part of the WinPRT API and contains the necessary events for detecting the changes in the Geographic position of the Windows Phone. Below is a sample soucrecode demonstrating how to get the Current Location in Windows Phone…

How to Create a Unique temporary file in C# ?

There are times when you want to create an unique temporary file in C# to deal with the storage of the data. In this case , you can use the Guid Name to get the unique name. How to Create a Unique temporary file in C# ?

How to return Json instead of XML in ASP.NET Web API ?

When you make a call to the ASP.NET Web API action method and notice this in Google Chrome browser , you would see that by default the data would be displayed in the XML format as shown in the screenshot. How to return Json instead of XML in ASP.NET Web API ? You can easily change this behavior by adding the following code in the…

C Program to display full pyramid using numbers

Problem Write a program in C to print full pyramid using numbers as shown below.The program should take the number of rows as input.          1       2 3 2     3 4 5 4 3   4 5 6 7 6 5 4 How to create and  display full pyramid pattern in C using numbers ? Output Abundantcode.com coding samples Enter the limit: 4…

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…