Tutorial by Examples: c

When you try to restore database from another server you might get the following error: Error 3154: The backup set holds a backup of a database other than the existing database. In that case you should use WITH REPLACE option to replace database with the database from backup: RESTORE DATABAS...
The Same Database reference allows you to split a single database into multiple projects. This is useful for cases where a project is very large or where different teams manage different parts of the database. If you consider that you have two .sqlproj SSDT database projects with the following stru...
productFlavors { // Define separate dev and prod product flavors. dev { // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin // to pre-dex each module and produce an APK that can be tested on // Android Lollipop without time c...
Let's understand something. JavaEE consists of a number of specifications. When you install an Application Server (Payara for example), you install all of the specifications at once. For example there's a specification for an ORM called JPA (Java Persistence API), a specification to build Component ...
If you want to sort your data numerically or alphabetically, you can simply use order by [column]. If you want to sort using a custom hierarchy, use a case statement. Group ----- Total Young MiddleAge Old Male Female Using a basic order by: Select * from MyTable Order by Group retur...
(************************************************* * All comments in SML are block comments * Block Comments begin with '(*' * Block Comments end with '*)' * (* Block Comments can be nested *) * The additional framing asterisks at the beginning * and end of this block comment are common ...
(* The block comment syntax allows nested comments (* whether or not this is a good thing is probably a matter of personal opinion (*or coding standards*)*)*) val _ = print "Nested comment example\n" (* line ending block comment *)
The stack is a LIFO (last-in, first-out) data-structure, i.e. the most recent (or "last in") element added to the stack will be the first element removed ("first out"). Let us consider the example of books in a box. Only one book can be added or removed from from the box at a ti...
Operators that bound tighter (higher precedence) are listed first. OperatorsPrecedence group (≥3.0)PrecedenceAssociativity.∞left?, !, ++, --, [], (), {}(postfix)!, ~, +, -, ++, --(prefix)~> (swift ≤2.3)255left<<, >>BitwiseShiftPrecedence160none*, /, %, &, &*MultiplicationPrec...
You could migrate from team foundation version control to git by using an open source tool called Git-TF. Migration will also transfer your existing history by converting tfs checkins to git commits. To put your solution into Git by using Git-TF follow these steps: Download Git-TF You can downloa...
This is contrived; but some COBOL programmers may prefer the positive clarity, versus using NOT in conditional expressions (especially with the logic error prone var NOT = value OR other-value). if action-flag = "C" or "R" or "U" or "D" continue else...
program-one. FD important-file. 01 file-record. COPY record-layout. DATA DIVISION. 01 memory-record. COPY record-layout. PROCEDURE DIVISION. ... COPY record-move. ... COPY record-move. program-two. DATA DIVISION. 01 print-record. COPY record-lay...
The matplotlib.animation package offer some classes for creating animations. FuncAnimation creates animations by repeatedly calling a function. Here we use a function animate() that changes the coordinates of a point on the graph of a sine function. import numpy as np import matplotlib.pyplot as p...

C#

In order to execute JavaScript in a IWebDriver instance you need to cast the IWebDriver to a new interface, IJavaScriptExecutor IWebDriver driver; IJavaScriptExecutor jsDriver = driver as IJavaScriptExecutor; You can now access all the methods available on the IJavaScriptExecutor instance which...
This example will create an EC2 instance of t2.micro type in N.Virginia region running Amazon Linux. During the execution, it will ask to select the KeyPair to use and an I.P. CIDR from where you can SSH to the instance, use default to make SSH open to the internet { "AWSTemplateFormatVersion"...
You can create unlogged tables so that you can make the tables considerably faster. Unlogged table skips writing write-ahead log which means it's not crash-safe and unable to replicate. CREATE UNLOGGED TABLE person ( person_id BIGINT NOT NULL PRIMARY KEY, last_name VARCHAR(255) NOT NULL, ...
The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. The 301 redirect is consider...
To query a field which name is contained in a variable, use the field function. some_field = :id some_value = 10 from p in Post, where: field(p, ^some_field) == ^some_value
For interacting with plots Matplotlib offers GUI neutral widgets. Widgets require a matplotlib.axes.Axes object. Here's a slider widget demo that ùpdates the amplitude of a sine curve. The update function is triggered by the slider's on_changed() event. import numpy as np import matplotlib.pyplot...
A good VOD (Video On Demand) service should start with the basics. Lets say you have a directory on your server that is not publicly accessible, yet through some sort of portal or paywall you want to allow users to access your media. var movie = path.resolve('./public/' + req.params.filename); ...

Page 587 of 826