Tag: tips

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…

Searching in an Array in JavaScript

If you want to search an array for a value in JavaScript and retrieve the index of the found array element , you can use the Array’s indexOf method. How to search for an element in an array in JavaScript ? When using the indexOf method , if the value is found, it returns the index representing the array element. If the value is not…

Displaying all the worksheet names in Excel using VBA Code

Do you want to display the names of the worksheets in the excel workbook ?. Here;s how you can do it using the VBA Code. How to display all the worksheet names in Excel using VBA Code ? Open up the Microsoft Visual Basic for Application Window using the keyboard shortcut key “ALT + F11” and enter the following run and free F5 to run…

Null Coalescing Operator (??) in C#

The .NET Framework provides the Null Coalescing Operator (??) which is a kind of binary operator and enables the developers to quickly check for the null values . The Null Coalescing Operator (??) in C# can be used with Nullable types as well as reference types . For example , a??b .If a is not null then assign the value a else take the value…

How to drop a table if it exists in SQL Server 2014 ?

Assume that you want to write a SQL Query in SQL Server which checks if the table exists in database and want to drop it , you can use the OBJECT_ID function to determine the table existence by passing the table name and the ‘U’ as parameters. How to drop a table if it exists in SQL Server 2014 ?

How to rename directory from command line in Windows 10 ?

You can rename a directory from command line in Windows 10 using the Rename command. The syntax for renaming the directory is as shown below. Rename <oldname> <newname> How to rename directory from command line in Windows 10 ? Below is an example demonstrating how to change the name of the directory from command prompt. D:\>Rename abundantcode1 abundantcode2 D:\>cd abundantcode2 D:\abundantcode2> The Rename command only…

How to get the first character of a string in SQL Server ?

Assume a scenario where you have a column in your table in SQL Server database where you want to retreive the first character of the column value. How to get the first character of a string in SQL Server ? You can use the LEFT function and specify the column name as well as the number of characters from left that you want to retreive.

Continue statement in Java

The continue statement in java lets the developers to skip the current iteration within the loop statements like for , while or do-while . As soon as the java compiler figures out the continue keyword in the code , it immediately skips the statements that follow the continue keyword and then proceeds with the next iteration. The break statement jumps out of the loop completely…

How to Clone an Object in JQuery ?

If you are looking at cloning an object in JQuery , you can do that using the jQuery’s extend method . You can perform the shallow copy or deep copy by setting the parameters. Below is a sample code snippet demonstrating how to clone an object in JQuery How to Clone an Object in JQuery ? The above method performs the shallow copy . You…

How to get the date part from the date time in SQL Server ?

If you are on SQL Server 2008 and higher version and want to get the date part of the datetime data in SQL Server , you can use the CONVERT method as shown in this post. How to get the date part from the date time in SQL Server ? If you want to get the current date leaving out the time from the datetime…

How to Terminate an Windows Phone 8 App using C#?

If you want to programmatically terminate the windows phone 8 application , you can use the Application.Terminate() method . How to Terminate an Windows Phone 8 App using C#? When using the Application.Terminate() , the developers should make sure that all the necessary data is saved because , the Application Closing event handler wont be raised in this case.

Deferred Execution Example in LINQ and C#

The Query Operators are executed only when enumerated except few scenarios. For example, when you use the for/Foreach statement and iterate the items from the query result. Below is a sample code demonstrating the Deferred Execution in C#. Deferred Execution Example in LINQ and C#