Tutorial by Examples: c

In a multi-project gradle build, you can have a dependency with another module in your build. Example: dependencies { // Dependency on the "mylibrary" module from this project compile project(":mylibrary") } The compile project(':mylibrary') line decla...
You can have a dependency with a single jar or multiple jar files. With a single jar file you can add: dependencies { compile files('libs/local_dependency.jar') } It's possible to add a directory of jars to compile. dependencies { compile fileTree(dir: 'libs', include: ['*.jar']...
You can add remote dependencies in Gradle usign this structure: compile 'group:name:version' or this alternative syntax: compile group: 'xxx', name: 'xxxxx', version: 'xxxx' For example: compile 'com.android.support:appcompat-v7:24.1.0' The compile 'com.android.support:appcompat-v7:24.1....
Init array of view controllers which will be managed by UIPageViewController. Add a base view controller class which has property identifier which will be used to identify view controllers when working with UIPageViewController data source methods. Let the view controllers to inherit from that bas...
This demonstrates a non-trivial example of wrapping a C++ dll with Cython. It will cover the following main steps: Create an example DLL with C++ using Visual Studio. Wrap the DLL with Cython so that it may be called in Python. It is assumed that you have Cython installed and can successfully...
R has a number of build in constants. The following constants are available: LETTERS: the 26 upper-case letters of the Roman alphabet letters: the 26 lower-case letters of the Roman alphabet month.abb: the three-letter abbreviations for the English month names month.name: the English names fo...
The ngCloak directive is used to prevent the Angular html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading. - View source HTML <div ng-cloak> <h1>Hello {{ name }}</h1> </div> ngCloak can be appl...
The command prompt comes pre-installed on all Windows NT, Windows CE, OS/2 and eComStation operating systems, and exists as cmd.exe, typically located in C:\Windows\system32\cmd.exe On Windows 7 the fastest ways to open the command prompt are: Press Win 𐌎, type "cmd" and then press ...
Any ASCII editor can edit batch files. A list of editors that can syntax highlight batch syntax can be found here. You can also use the default notepad shipped with windows to edit and view a batch file, although it does not offer syntax highlighting. To open notepad: Press Win 𐌎+R, type notepa...
I have the following list: 1. Alon Cohen 2. Elad Yaron 3. Yaron Amrani 4. Yogev Yaron I want to select the first name of the guys with the Yaron surname. Since I don't care about what number it is I'll just put it as whatever digit it is and a matching dot and space after it from the beginni...
One could easily center a child element using table display property. HTML <div class="wrapper"> <div class="parent"> <div class="child"></div> </div> </div> CSS .wrapper { display: table; vertica...
Cache-Control: public, max-age=31536000 public means the response is the same for all users (it does not contain any personalized information). max-age is in seconds from now. 31536000 = 60 * 60 * 24 * 365. This is recommended for static assets that are never meant to change.
Cache-Control: private, max-age=60 private specifies that the response can be cached only for user who requested the resource, and can't be reused when other users request the same resource. This is appropriate for responses that depend on cookies.
Cache-Control: no-cache The client will behave as if the response was not cached. This is appropriate for resources that can unpredictably change at any time, and which users must always see in the latest version. Responses with no-cache will be slower (high latency) due to need to contact the s...
Single Pointers Pointer to an int The pointer can point to different integers and the int's can be changed through the pointer. This sample of code assigns b to point to int b then changes b's value to 100. int b; int* p; p = &b; /* OK */ *p = 100; /* OK */ Pointer to a cons...
Many commands and programs in the remote side are screen-based (e.g. mc) or they need to ask password (e.g. sudo), to be able to run these kind of programs you can use option -t. ssh -t [email protected] sudo ls / [sudo] password for alice: bin root dev etc home lib mnt opt proc root run usr ...
foldMap maps each element of the Foldable structure to a Monoid, and then combines them into a single value. foldMap and foldr can be defined in terms of one another, which means that instances of Foldable need only give a definition for one of them. class Foldable t where foldMap :: Monoid m...
// Twitter markup documentation: // https://dev.twitter.com/cards/markup String[] twitterTags = { "twitter:site", "twitter:site:id", "twitter:creator", "twitter:creator:id", &q...
For added safety we can define the type of object that the array contains: NSArray<NSString *> *colors = @[@"Red", @"Green", @"Blue", @"Yellow"]; NSMutableArray<NSString *> *myColors = [NSMutableArray arrayWithArray:colors]; [myColors addObject:...
NSArray *myColors = @[@"Red", @"Green", @"Blue", @"Yellow"]; [myColors enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { NSLog(@"enumerating object %@ at index %lu", obj, idx); }]; By setting the stop parameter to YES you c...

Page 268 of 826