Tag: How to
How to return rows in random order in SQL Server ?
Do you want to return rows sorted in random order , here’s how you do it. How to return rows in random order in SQL Server ? This example demonstrates how to sort the Employee table and display the results in random order.
How to Create a Guid Value in C# ?
If you want to create a new Guid value in C# which is random , you can use the Guid class to achieve it. Below is a sample code snippet demonstrating how to do it. How to Create a Guid Value in C# ?
How to Prevent the Lock Screen to automatically lock from the Windows Phone 8 App?
There are times when the automatic lock of the Screen is enabled by the user in the Settings App of the Windows Phone 8. When your App is running on the device, sometimes you may not want to lock the device automatically for various reasons . How to Prevent the Lock Screen to automatically lock from the Windows Phone 8 App? Below is a sample…
How to get the Machine Name from a .NET Application using C# ?
You can use the MachineName property defined in the System.Environment class in order to get the Machine Name from your .NET Application. How to get the Machine Name from a .NET Application using C# ? Here’s a code sample demonstrating how to do it. This should display the machine name. The output of the program would be The Machine Name is Abundantcode-LT
How to run the Universal App outside Visual Studio in Windows 10 ?
The Windows Store App built using the Universal App template in Visual Studio 2013 produces the .exe file which is available in the bin folder but when you double click on this exe folder , you will get an error message stating that “This application can only run in the context of an app container.” How to run the Universal App outside Visual Studio in…
How to Redirect To Action between Areas in ASP.NET MVC?
There are times when you want to redirect to a specific area from different area. In this, one can use the RedirectToAction method to achieve it and pass the parameter area. How to Redirect between Areas in ASP.NET MVC?
How to add entries to ResourceDirectory in Windows 10 UWP Apps using C# ?
Below is a sample code snippet demonstrating how the entries can be added to the ResourceDirectory in Windows 10 UWP application using C#. How to add entries to ResourceDirectory in Windows 10 UWP Apps using C# ?
How to Declare and Define an byte data type variable in F# ?
How to Declare and Define an byte data type variable in F# ?
How to Convert Byte[] to stream in C# ?
Below is a sample code snippet demonstrating the conversion of the byte array to stream in C#. How to Convert Byte[] to stream in C# ?
Connecting to a Database in SQL Server Management Studio
Most of the time you will be connecting to your database when working in SQL Server Management Studio. You want to know how to connect to a particular database in SQL Management Studio when working with SQL Server 2014 and executing a query. For example , you want to connect to the AdventureWorks2014 database. How to connect to a database in SQL Management Studio in…
Elastic Search Error – JAVA_HOME environment variable must be set!
When trying to get the Elastic Search running on a Windows 10 machine , there are times when you would hit with the below problem which is related to Java. JAVA_HOME environment variable must be set! If there are any java developers out there , then it would be easier for them to identify this issue. For all those who are new to Java ,…
How to sort an array using Comparator in C# ?
The Array.Sort method lets the developers pass the comparator which can be used to sort an array of objects. How to sort an array using Comparator in C# ? In the below example , the method CompareByName is used which lets the Array.Sort method to sort the array of objects in descending order.