Tutorial by Examples: o

COALESCE () Evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL. DECLARE @MyInt int -- variable is null until it is set with value. DECLARE @MyInt2 int -- variable is null until it is set with value. DECLARE @MyInt3 int -...
Let's discuss with an example. From n items, in how many ways you can choose r items? You know it is denoted by . Now think of a single item. If you don't select the item, after that you have to take r items from remaining n-1 items, which is given by . If you select the item, after that you hav...
No matter how many problems you solve using dynamic programming(DP), it can still surprise you. But as everything else in life, practice makes you better. Keeping these in mind, we'll look at the process of constructing a solution for DP problems. Other examples on this topic will help you understan...
This attribute is used to identify a method that is called immediately after each tests, it will be called even if there is any error, this is the place we can dispose our objects. [TearDown] public void CleanAfterEveryTest() { }
Minimum Vertex Cover is a classic graph problem. Let's say, in a city we have a few roads connecting a few points. Let's represent the roads using edges and the points using nodes. Let's take two example graphs: We want to set watchmen on some points. A watchman can guard all the roads connected ...
describe("Includes validations for index page", function () { var indexPage; it("Check for null values", function () { // We are going to pass "" (null) value to the function var retVal = indexPage.isNullValue(""); exp...
since version 9.5 postgres offers UPSERT functionality with INSERT statement. Say you have a table called my_table, created in several previous examples. We insert a row, returning PK value of inserted row: b=# INSERT INTO my_table (name,contact_number) values ('one',333) RETURNING id; id ---- ...
Go to Tools -> Options. Go to Environment -> Keyboard -> Query Shortcuts On the right side you can see some shortcuts which are by default in SSMS. Now if you need to add a new one, just click on any column under Stored Procedure column. Click OK. Now please go to a query window and sel...
If you click on export icon, you will given options to choose like on which format you need to export the data. Just click on anything you wish. You can see that the data is being send to the server http://export.highcharts.com/ in the top left side. exporting: { chartOptions: { ...
You need to add a reference of the file called offline-exporting.js to make the client side exporting available. Please be noted this feature is not supported in browser IE 8, So if you load this chart in any unsupported browser, the module will fall back to the export server. This can be handled wi...
Import the namespace System.Runtime.Caching(Make sure that you have added System.Runtime.Caching DLL to your project reference). Create an instance of MemoryCache class. MemoryCache memCache = MemoryCache.Default; Add values to MemoryCache public IQueryable<tblTag> GettblTags() ...
Install the package: $ pip install pymssql import pymssql SERVER = "servername" USER = "username" PASSWORD = "password" DATABASE = "dbname" connection = pymssql.connect(server=SERVER, user=USER, password=PASSWORD, database=DATABASE...
Let's start with a simple algorithm to see how recursion could be implemented in Ruby. A bakery has products to sell. Products are in packs. It services orders in packs only. Packaging starts from the largest pack size and then the remaining quantities are filled by next pack sizes available. For ...
.prefer_dml 1 turn on dmlformat output .prefer_dml 0 turn off dmlformat output
You can watch data property of any Vue instance. When watching a property, you trigger a method on change: export default { data () { return { watched: 'Hello World' } }, watch: { 'watched' () { console.log('The watched property ha...
XmlView: <mvc:View controllerName="sap.ui.demo.wt.controller.App" xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" displayBlock="true"> <App> <pages> <Page content="{path:'Tiles>/Tiles',fact...
DATA table-name; INFILE "file-path/file-name.csv" dsd; INPUT Name $ City $ Age; RUN;
InvocationExpression class allows invocation of other lambda expressions that are parts of the same Expression tree. You create them with static Expression.Invoke method. Problem We want to get on the items which have "car" in their description. We need to check it for null before searc...
The Content-Type meta tag is for telling the destination rendering engine how to process text and special characters. You should encode all special characters anyway (e.g., & becomes & for an ampersand) to be safe, but it’s worth keeping this line in there anyway. utf-8 works for most c...
The viewport meta tag tells a device to set the viewable area to the width of the device screen. It also sets the initial scale to normal (not zoomed in or out). <meta name="viewport" content="width=device-width"> or <meta name="viewport" content="wid...

Page 800 of 1038