Tag: tips
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…
How to get the Names of all the columns from a SqlDataReader object in C# ?
Here’s a simple code snippet that demonstrates how to retreive all the column names from a SqlDataReader object in C#. How to get the Names of all the columns from a SqlDataReader object in C# ?
How to open Documents folder from Run Window in Windows 10 ?
You can open the documents folder from the Run Windows in Windows 10 using the command “Documents”. How to open Documents folder from Run Window in Windows 10 ? Just open the Run window using the shortcut key (Windows + R) and type “Documents” and press the enter key. This should open up the documents folder or directory in Windows 10.
How to Create a Class in Javascript in WinJS ?
You can define a new class using WinJS.class.define when developing Windows Store App using Javascript. How to Create a Class in Javascript in WinJS ? The WinJS.Class.define method can be used to create a new class in WinJS . It accepts 3 parameters – Constructor – instanceMembers – staticMembers Below is a sample code snippet demonstrating the usage WinJS.Class.define to create a new class in…
Auto-Property Initializers with Method Call in C# 6.0
The Auto-Property Initializer in C# 6.0 is a feature that lets the users to initialize the value of the auto implemented property . This feature lets the user provide any expression (lambda expression or a method) . Auto-Property Initializers with Method Call in C# 6.0 The below code snippet demonstrates how to initialize the auto property with a method call.
How to Turnoff Frame rate counter in UWP App ?
You can turn off the frame rate counter in your Universal Windows Platform (UAP) apps by following the below steps. How to Turnoff Frame rate counter in UWP App ? 1. Open your UWP project built using C# and XAML in Visual Studio. 2. From Visual Studio Solution explorer , open App.xaml.cs. 3. Set the DebugSettings.EnableFrameRateCounter property with the false false. as shown below.
How to remove the non ascii characters from a string in C# ?
Regular expression comes in handy especially if you want to remove the non ascii characters from a string in C#. Here’s a regular expression sample in C# demonstrating how to do it. How to remove the non ascii characters from a string in C# ? The output of the code snippet will be cde in C#
Column Alias in SQL Query
When returning the query results , you want to provide an alternate name for the column for readability purpose , you can use the AS clause to specify the column alias in SQL Query. How to specify Column alias in SQL Query ? Below is an example of the usage of the column alias in SQL Query. Every column in the Query result has a…
How to Declare and Define an Integer Type in F# ?
How to Declare and Define an Integer data type variable in F# ?
How to get the first day of the month in SQL Server ?
If you want to get the first day of the month of a input datetime variable from a SQL Query , here’s how you do it.
How to Declare and Define an Boolean data type variable in F# ?
How to Declare and Define an Boolean data type variable in F# ?
Exit the Current Scope with a return value in SQL Server
You can use the RETURN statement to discontinue the execution of a T-SQL batch statement or a stored procedure and provide a status code or value on return. For example , you want to display the Employees whose MaritalStatus is Divorced. You want to return a value -1 to indicate that no records exist and also You do not want the SQL Statements following it…
How to find all instances of a pattern in JavaScript ?
To find out out all the instances of a pattern in JavaScript , you can use the regular expression as showb below. How to find all instances of a pattern in JavaScript ?
How to escape a single quote in SQL Server ?
You can escape a single quote in your T-SQL query in SQL Server by simply doubling them. Here’s a simple example that demonstrates how the single quote ie escaped in SQL Server. How to escape a single quote in SQL Server ?
How to add new user account from command line in Windows 10 ?
You can add a new user account in Windows 10 using command prompt using the net user command and passing the right parameter. How to add new user account from command line in Windows 10 ? Following is the syntax of the command to add a new user from command line in Windows. net user <username> <password> /ADD For example , to add a new…
How to know what toolbar does in Microsoft PowerPoint 2013?
If you want to know what a toolbar does in Microsoft PowerPoint 2013, simply mouse over or point your point on the toolbar, a tooltip will pop up and displays the necessary information on what exactly the toolbar does. How to know what toolbar does in Microsoft PowerPoint 2013?
How to convert number to text in Excel?
In Microsoft Excel 2016 , there are times when you don’t want the numbers present in the cell to be participating in the calculation. This means , you can either update the formula to not include the cell value or else change the number to text. How to convert number to text in Microsoft Excel 2016? You can use the TEXT function in Excel to…
How to Detect Windows Phone OS version using C#?
The Windows Phone SDK provides the Environment.OSVersion property which can be used to detect the version of the Operating System uses in Windows Phone (Windows Phone 8 / Windows Phone 7). Below is a code snippet that demonstrates how to detect the Windows Phone OS Version using C#. How to Detect Windows Phone OS version using C#?
How to Check if all elements in array are alphabets in JavaScript ?
JavaScript provides the every() method defined in the Array object which lets the developers to check and validate the contents of the array in JavaScript. How to Check if all elements in array are alphabets in JavaScript ? Below is a sample code snippet demonstrating the usage of the every() method to find out if all the elements in the array are alphabets. Note that…
What is the equivalent of MySQL’s Now() function in SQL Server ?
MySQL has the function Now() which is a Datetime type field which shows the current date as well as the time. What is the equivalent of MySQL’s Now() function in SQL Server ? In SQL Server , you can use the GetDate() function to achieve the same.