Tutorial by Examples: add

You can include another Git repository as a folder within your project, tracked by Git: $ git submodule add https://github.com/jquery/jquery.git You should add and commit the new .gitmodules file; this tells Git what submodules should be cloned when git submodule update is run.
ALTER TABLE Employees ADD StartingDate date NOT NULL DEFAULT GetDate(), DateOfBirth date NULL The above statement would add columns named StartingDate which cannot be NULL with default value as current date and DateOfBirth which can be NULL in Employees table.
try { JTextPane pane = new JTextPane(); StyledDocument doc = new DefaultStyledDocument(); doc.insertString(0, "Some text", null); pane.setDocument(doc); //Technically takes any subclass of Document } catch (BadLocationException ex) { //hand...
Right after you install Git, the first thing you should do is set your username and email address. From a shell, type: git config --global user.name "Mr. Bean" git config --global user.email [email protected] git config is the command to get or set options --global means that the ...
const fs = require('fs'); // Read the contents of the directory /usr/local/bin asynchronously. // The callback will be invoked once the operation has either completed // or failed. fs.readdir('/usr/local/bin', (err, files) => { // On error, show it and return if(err) return console.er...
To get started with the jQuery UI library, you'll need to add the jQuery script, the jQuery UI script, and the jQuery UI stylesheet to your HTML. First, download jQuery UI; choose the features you need on the download page. Unzip your download, and put jquery-ui.css and jquery-ui.js (and jquery.js)...
First, establish if the device is capable of accepting Touch ID input. if (context.CanEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, out AuthError)) If it does then we can display the Touch ID UI by using: context.EvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometri...
There are two types of events emitted by a Preferences object: PreferenceChangeEvent and NodeChangeEvent. PreferenceChangeEvent A PreferenceChangeEvent gets emitted by a Properties object every time one of the node's key-value-pairs changes. PreferenceChangeEvents can be listened for with a Prefer...
SELECT your_columns, COUNT(*) OVER() as Ttl_Rows FROM your_data_set idnameTtl_Rows1example52foo53bar54baz55quux5 Instead of using two queries to get a count then the line, you can use an aggregate as a window function and use the full result set as the window. This can be used as a base for fur...
git add -i (or --interactive) will give you an interactive interface where you can edit the index, to prepare what you want to have in the next commit. You can add and remove changes to whole files, add untracked files and remove files from being tracked, but also select subsection of changes to put...
Razor has its own comment syntax which begins with @* and ends with *@. Inline Comment: <h1>Comments can be @*hi!*@ inline</h1> Multi-line Comment: @* Comments can spread over multiple lines *@ HTML Comment You can also use the normal HTML comment syntax starting with &...
Reachability uses NSNotification messages to alert observers when the network state has changed. Your class will need to become an observer. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil]; Elsewher...
string s = "Foo"; string paddedLeft = s.PadLeft(5); // paddedLeft = " Foo" (pads with spaces by default) string paddedRight = s.PadRight(6, '+'); // paddedRight = "Foo+++" string noPadded = s.PadLeft(2); // noPadded = "Foo" (original string...
String can be formatted to accept a padding parameter that will specify how many character positions the inserted string will use : ${value, padding} NOTE: Positive padding values indicate left padding and negative padding values indicate right padding. Left Padding A left padding of 5 (a...
NSMutableArray *myColors; myColors = [NSMutableArray arrayWithObjects: @"Red", @"Green", @"Blue", @"Yellow", nil]; [myColors addObject: @"Indigo"]; [myColors addObject: @"Violet"]; //Add objects from an NSArray NSArray *myArray = @[@...
You can see what "hunks" of work would be staged for commit using the patch flag: git add -p or git add --patch This opens an interactive prompt that allows you to look at the diffs and let you decide whether you want to include them or not. Stage this hunk [y,n,q,a,d,/,s,e,?]? ...
Let's take an example of adding a value to a range (as it could be done in a loop for example): 3+1:5 Gives: [1] 4 5 6 7 8 This is because the range operator : has higher precedence than addition operator +. What happens during evaluation is as follows: 3+1:5 3+c(1, 2, 3, 4, 5) expansio...
The <!DOCTYPE> declaration should always be included at the top of the HTML document, before the <html> tag. 5 See HTML 5 Doctype for details on the HTML 5 Doctype. <!DOCTYPE html> 4.01 See HTML 4.01 Doctypes for details on how these types differ from each other. Stri...
A custom component that takes the type of a component as input and creates an instance of that component type inside itself. When the input is updated, the previously added dynamic component is removed and the new one added instead. @Component({ selector: 'dcl-wrapper', template: `<div #...
Swift let mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: 320, height: 500)) It's recommended to store the mapView as a property of the containing ViewController since you might want to access it in more complex implementations. Objective C self.map = [[MKMapView alloc]initWithFrame:CGRec...

Page 2 of 32