Tutorial by Examples: n

FOREIGN KEY constraint can be added on existing tables that are still not in relationship. Imagine that we have Company and Employee tables where Employee table CompanyId column but don't have foreign key relationship. ALTER TABLE statement enables you to add foreign key constraint on an existing c...
FOREIGN KEY columns with constraint can be added on existing tables that are still not in relationship. Imagine that we have Company and Employee tables where Employee table don't have CompanyId column. ALTER TABLE statement enables you to add new column with foreign key constraint that references ...
sys.foreignkeys system view returns information about all foreign key relationships in database: select name, OBJECT_NAME(referenced_object_id) as [parent table], OBJECT_NAME(parent_object_id) as [child table], delete_referential_action_desc, update_referential_action_desc from sys.foreign...
Create a set local set = {} -- empty set Create a set with elements by setting their value to true: local set = {pear=true, plum=true} -- or initialize by adding the value of a variable: local fruit = 'orange' local other_set = {[fruit] = true} -- adds 'orange' Add a member to the ...
Abstraction levels help determine when to split things up. Abstraction is achieved by implementing functionality with increasingly detailed code. The entry point of a macro should be a small procedure with a high abstraction level that makes it easy to grasp at a glance what's going on: Public Sub...
Encapsulation hides implementation details from client code. The Handling QueryClose example demonstrates encapsulation: the form has a checkbox control, but its client code doesn't work with it directly - the checkbox is an implementation detail, what the client code needs to know is whether the s...
When followed by a qualified name, typename specifies that it is the name of a type. This is often required in templates, in particular, when the nested name specifier is a dependent type other than the current instantiation. In this example, std::decay<T> depends on the template parameter...
Swift let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier() NSUserDefaults.standardUserDefaults().removePersistentDomainForName(bundleIdentifier) Objective-C NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; [[NSUserDefaults standardUserDefaults] removePersi...
This example splits cubic and bezier curves in two. The function splitCurveAt splits the curve at position where 0.0 = start, 0.5 = middle, and 1 = end. It can split quadratic and cubic curves. The curve type is determined by the last x argument x4. If not undefined or null then it assumes the curv...
This is a basic Hello World program in NASM assembly for 32-bit x86 Linux, using system calls directly (without any libc function calls). It's a lot to take in, but over time it will become understandable. Lines starting with a semicolon(;) are comments. If you don't already know low-level Unix sy...
Detailed instructions on getting deep-learning framework set up or installed. Most frameworks supports interfaces in several languages: Caffe (C++, Python, Matlab) Tensorflow (C++, Python) Theano, Theano wrappers (Keras, Lasagne) (Python) Torch (Lua) Matconvnet (Matlab) Every framework i...
git clean -i Will print out items to be removed and ask for a confirmation via commands like the follow: Would remove the following items: folder/file1.py folder/file2.py *** Commands *** 1: clean 2: filter by pattern 3: select by numbers 4: ask each 5: quit...
After installing a Java SDK, it is advisable to check that it is ready to use. You can do this by running these two commands, using your normal user account: $ java -version $ javac -version These commands print out the version information for the JRE and JDK (respectively) that are on your sh...
>>> import os >>> os.stat(path_to_file).st_size == 0 or >>> import os >>> os.path.getsize(path_to_file) > 0 However, both will throw an exception if the file does not exist. To avoid having to catch such an error, do this: import os def is_empty_...
A commonly used utility library is Lodash. To install it into your Aurelia CLI driven application first you need to install it using Npm. npm install lodash --save Now in your preferred IDE/code editor open up the following file in your project directory: aurelia_project/aurelia.json and scroll do...
boost::program_options::notify can be used to report any errors in the paramters passing #include <boost/program_options.hpp> #include <string> #include <iostream> int main(int argc, char** argv) { namespace po = boost::program_options; po::variables_map vm; po::op...
Introduction: Swagger is a set of rules/specifications for a format describing REST APIs. It provides a powerful and actively developed ecosystem of tools around this formal specification like code generators and editors. The best part of Swagger is that the documentation of methods, parameters, an...
One useful feature of extension methods is that you can create common methods for an interface. Normally an interface cannot have shared implementations, but with extension methods they can. public interface IVehicle { int MilesDriven { get; set; } } public static class Extensions { ...
print "Hello World" import clr from System import Console Console.WriteLine("Hello World")
Introduces the definition of a union type. // Example is from POSIX union sigval { int sival_int; void *sival_ptr; }; Introduces an elaborated type specifier, which specifies that the following name is the name of a union type. If the union name has been declared alread...

Page 606 of 1088