Tutorial by Examples: c

archive: create an unversioned archive of a repository revision bundle: create a changegroup file clone: make a copy of an existing repository export: dump the header and diffs for one or more changesets graft: copy changes from other branches onto the current branch incoming: show new change...
bookmarks, bookmark: create a new bookmark or list existing bookmarks branch: set or show the current branch name tag: add one or more tags for the current or given revision update, up, checkout, co: update working directory (or switch revisions)
FNR contains the number of the input file row being processed. In this example you will see awk starting on 1 again when starting to process the second file. Example with one file $ cat file1 AAAA BBBB CCCC $ awk '{ print FNR }' file1 1 2 3 Example with two files $ cat file1 AAAA BBBB...
If you want to create an instance of an inner nested class you need to provide a class object of the enclosing class as an extra parameter with Class#getDeclaredConstructor. public class Enclosing{ public class Nested{ public Nested(String a){ System.out.println("Constru...
In Scala (in contrast to Java and most other languages), if is an expression instead of a statement. Regardless, the syntax is identical: if(x < 1984) { println("Good times") } else if(x == 1984) { println("The Orwellian Future begins") } else { println("Po...
Create a new repository or clone an existing one. Create a new branch called gh-pages without any history $ git checkout --orphan gh-pages # ensure you are in the correct directory then, # remove all files from the old working tree $ git rm -rf Add an index.html file to the root of t...
1. Add a platform target iOS: $ ionic platform add ios Android: $ ionic platform add android Windows: $ ionic platform add windows 2. Build your app iOS: $ ionic build ios Android: $ ionic build android Windows: $ ionic build windows Live Reload App During Development...
If you try to submit tasks to a shutdown Executor or the queue is saturated (only possible with bounded ones) and maximum number of Threads has been reached, RejectedExecutionHandler.rejectedExecution(Runnable, ThreadPoolExecutor) will be called. The default behavior is that you'll get a Rej...
Functions which return a character vector Base R has two functions for invoking a system command. Both require an additional parameter to capture the output of the system command. system("top -a -b -n 1", intern = TRUE) system2("top", "-a -b -n 1", stdout = TRUE) ...
var MY_AJAX_ACTION_URL = "path/to/controller.php"; var table = $('#user_list_table').DataTable({ "autoWidth": true, "paging": true, "searching": true, "ordering": true, "language": { ...
$ echo {0..10..2} 0 2 4 6 8 10 A third parameter to specify an increment, i.e. {start..end..increment} Using increments is not constrained to just numbers $ for c in {a..z..5}; do echo -n $c; done afkpuz
On a few occasions, I have had an interesting figure I saved but I lost an access to its data. This example shows a trick how to achieve extract information from a figure. The key functions are findobj and get. findobj returns a handler to an object given attributes or properties of the object, suc...
C++14 Parameter pack unpacking traditionally requires writing a helper function for each time you want to do it. In this toy example: template<std::size_t...Is> void print_indexes( std::index_sequence<Is...> ) { using discard=int[]; (void)discard{0,((void)( std::cout <&...
The built-in functions GETDATE and GETUTCDATE each return the current date and time without a time zone offset. The return value of both functions is based on the operating system of the computer on which the instance of SQL Server is running. The return value of GETDATE represents the current tim...
Interfaces and implementations (types that implement an interface) are "detached". So it is a rightful question how to check at compile-time if a type implements an interface. One way to ask the compiler to check that the type T implements the interface I is by attempting an assignment us...
To convert String to and from Data / NSData we need to encode this string with a specific encoding. The most famous one is UTF-8 which is an 8-bit representation of Unicode characters, suitable for transmission or storage by ASCII-based systems. Here is a list of all available String Encodings Stri...
To make a new directory from a File instance you would need to use one of two methods: mkdirs() or mkdir(). mkdir() - Creates the directory named by this abstract pathname. (source) mkdirs() - Creates the directory named by this abstract pathname, including any necessary but nonexistent parent d...
NgZone reference can be injected via the Dependency Injection (DI). my.component.ts import { Component, NgOnInit, NgZone } from '@angular/core'; @Component({...}) export class Mycomponent implements NgOnInit { constructor(private _ngZone: NgZone) { } ngOnInit() { this._ngZone.runO...
Returns a string (varchar) of repeated spaces. Parameters: integer expression. Any integer expression, up to 8000. If negative, null is returned. if 0, an empty string is returned. (To return a string longer then 8000 spaces, use Replicate. SELECT SPACE(-1) -- Returns NULL SELECT SPACE(0) -...
Repeats a string value a specified number of times. Parameters: string expression. String expression can be a character string or binary data. integer expression. Any integer type, including bigint. If negative, null is returned. If 0, an empty string is returned. SELECT REPLICATE('a', -1) ...

Page 351 of 826