Tag: tricks
Single Click Preview in Visual Studio 2013 Solution Explorer
The single click preview is one of the cool feature in Visual Studio 2013 which lets the developers preview the file in the preview tab. This feature is available for use from Visual Studio Solution explorer as well. You can activate it by clicking the Preview Selected Items button in the Solution explorer toolbar. To disable this feature , you can click the same button…
How to hide horizontal or vertical scroll bar using VBA Code in Excel ?
Here’s a VBA code that hides the horizontal and vertical scroll bar in Microsoft Excel. How to hide horizontal or vertical scroll bar using VBA Code in Excel ? 1. Open the Microsoft Visual Basic for Applications Window using the ALT + F11 keyboard shortcut key. 2. Select Insert -> Module and then paste the following code snippet.
How to delete user account from command line in Windows 10 ?
You can delete a user account from command line in Windows 10 using the net user command and specifying the delete parameters. How to delete user account from command line in Windows 10 ? The syntax for deleting the user from the command line is as follows. net user <username> /DELETE The above command deletes the user from the local system. For example , if…
How to Declare and Define an signed byte data type variable in F# ?
How to Declare and Define an signed byte data type variable in F# ?
Comparing only Date in the DateTime datatype in C#
The DateTime datatype includes both the date as well as the time component to it in C#. By any chance , if you want to compare only the date part in the DateTime variable in C# , you can use the Date property defined in the DateTime class. How to compare only Date in the DateTime datatype in C# ?
CASE expression in a Query in SQL Server
You can use the CASE expression in a T-SQL query in SQL Server to get the same behavior of the switch statement in the programming languages. Below is a sample Query demonstrating the implementation of the CASE expression in a query in SQL Server. CASE expression in a Query in SQL Server The query associates a Department group name to a country USA and UK…
How to select N random rows using a T-SQL Query ?
You can use the TOP keyword and specify the number to retreive the TOP N records that the query returns. Additionally , order the records by newid() function using the ORDER BY clause to make the records random. How to select N random rows using a T-SQL Query ?
How to Declare and Define an unsigned long data type variable in F# ?
How to Declare and Define an unsigned long data type variable in F# ?
C Program to find the G.C.D of a number using Recursive function
Problem Write a program in C to find the find the G.C.D of a number using recursion and display the result. How to find the G.C.D of a number using recursion in C ? Output Abundantcode.com Coding samples Enter the first number: 8 Enter the second number: 4 G.C.D of 8 and 4 is 4.
How to Create an Explicit Style in Windows Phone 8 ?
The developers can utilize the style resources to create styles and use them within the Windows Phone Application. For example , the developers can create a style for the textblock with a key identifier in the app.xaml file and then reuse them in different screens of the application. How to Create an Explicit Style in Windows Phone 8 ? To create an explicit style ,…
Using Where clause in T-SQL Query
If you want to restrict the results of the query to only the records that you need instead of returning all the records from the table , you can use the WHERE clause to filter the records. You can simply specify the WHERE clause and also specify the conditions that the rows must meet. How to Filter records using WHERE clause in SQL Server ?…
Using FETCH and OFFSET to get N records in SQL Server
In SQL Server , you can use the OFFSET and FETCH and apply paging and retreive N records at a time. OFFSET AND FETCH clause are part of the ORDER BY clause and hence you must include the ORDER BY clause. For example , you might want to skip the first 4 records and retrieve 5 records from the query , you could use the…
Get the date in YYYY-MM-DD format in SQL Server.
You can retreive the date in the YYYY-MM-DD format in SQL Server using the CONVERT method as shown in this code snippet. How to get the date in YYYY-MM-DD format in SQL Server ?
Lambdas Expression for Getter-Only Auto-Properties in C# 6.0
C# 6.0 lets the developers use the lambda expression to implement the getter value of the read-only property . Whenever a lambda expression is found , the C# compiler identifies it as the property with only get method rather than a field. Lambdas Expression for Getter-Only Auto-Properties in C# 6.0 Below is a sample code snippet demonstrating the use of Lambdas Expression for Getter-Only Auto-Properties…
Encoding.ASCII.GetBytes in F# for Array of Bytes (Ascii string)
Below is a sample code snippet demonstrating the usage of the “B” to define a ASCII string in F# . This technique is somewhat similar to Encoding.ASCII.GetBytes in F#. Encoding.ASCII.GetBytes in F# for Array of Bytes (Ascii string)
How to Validate an email address using Regular Expression in C# ?
You can validate an email address in C# using regular expressions which provides the developers to play around with different patterns. Below is a code snippet that shows how you can use regular expression to validate an email address in C# . How to Validate an email address using Regular Expression in C# ?
How to remove user from group using command line in Windows 10 ?
You can use the net localgroup command and specify the /delete parameter to remove the user from a group using command line in Windows 10. The format of the command is as shown below. net localgroup <groupname> <username> /delete How to remove user from group using command line in Windows 10 ? 1. Open command prompt from the elevated administrator mode. 2. Enter the command….
Alias Names for Tables in SQL Query
There are times when you write query and end up qualifying the columns references by indicating the table name. For example , In the above query , the Department table is referred in the GroupName and Name column. Instead of mentioning the table table , we could provide a shortname or alias name for the table and use the alias name instead. The full use…
How to specify the Sort order for a Query in SQL Server ?
If you want the sort the records in descending order by more than one column instead of the default ascending order , you can use the DESC or DESCENDING to this. How to specify the Sort order for a Query in SQL Server ? Here’s the query which retrieves the Department records in Descending order by two columns – Name and GroupName.
How to get the Size of all tables in a SQL Server ?
In SQL Server 2014 Management Studio , you can get the size of all tables in a SQL Server from the Object explorer details window. How to get the Size of all tables in a SQL Server ? 1. In SQL Management Studio 2014 , navigate to the Object explorer details screen from View -> Object explorer details menu or by simply pressing the F7…