Tutorial by Examples: er

Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. It lets you execute arbitrary Python functions via the command line. Install fabric via pip install fabric Create fabfile.py in your root directory...
// 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...
As parameters (8, 16, 32 bits) 8, 16, 32 bits integers are always passed, on the stack, as full width 32 bits values1. No extension, signed or zeroed, is needed. The callee will just use the lower part of the full width values. //C prototype of the callee void __attribute__((cdecl)) foo(char ...
The clear property is directly related to floats. Property Values: none - Default. Allows floating elements on both sides left - No floating elements allowed on the left side right - No floating elements allowed on the right side both - No floating elements allowed on either the left or the r...
Managing AWS resources that scale up and down runs into the limits of the static inventory host file, that's why we need something dynamic. And that's what the dynamic inventories are for. Let's start: Download these ec2.ini and ec2.py files to the your project folder: cd my_ansible_project wget...
There is a maximum capacity an integer can store. And when you go over that limit, it will loop back to the negative side. For int, it is 2147483647 int x = int.MaxValue; //MaxValue is 2147483647 x = unchecked(x + 1); //make operation explicitly unchecked so that the ...
Overflow also happens during the operation. In the following example, x is an int, 1 is an int by default. Therefore addition is an int addition. And the result will be an int. And it will overflow. int x = int.MaxValue; //MaxValue is 2147483647 long y = x + 1; //...
Query SELECT * FROM stack WHERE username = "admin" AND password = "admin"; Result +------+----------+----------+ | id | username | password | +------+----------+----------+ | 1 | admin | admin | +------+----------+----------+ 1 row in set (0.00 sec) Query...
It's also possible to use data binding within your RecyclerView Adapter. Data model public class Item { private String name; public String getName() { return name; } } XML Layout <TextView android:layout_width="wrap_content" android:layou...
With the ~ selector, you can easily implement a global accessible boolean without using JavaScript. Add boolean as a checkbox To the very beginning of your document, add as much booleans as you want with a unique id and the hidden attribute set: <input type="checkbox" id="sideba...
Clojure functions can be defined with zero or more parameters. (defn welcome "Without parameters" [] "Hello!") (defn square "Take one parameter" [x] (* x x)) (defn multiplier "Two parameters" [x y] (* x y)) ...
An existing working copy can be quickly transformed to reflect the contents of a different branch in the same repository. For example, you might have a working copy of the trunk and now need to work on a development branch. Instead of checking out a completely new working copy (which can waste a l...
To activate the developer mode: Log in to the ODOO front end Click on the User Name drop down at the top-right side Select 'About' Click on 'Activate developer mode' from the pop-up window.
#include <vector> #include <string> #include "agent_util.hpp" //this file can be found in Java SE Development Kit 8u101 Demos and Samples //see http://download.oracle.com/otn-pub/java/jdk/8u101-b13-demos/jdk-8u101-windows-x64-demos.zip //jdk1.8.0_101.zip!\demo\jvmti\v...
A full explanation of Access Modifiers in Java can be found here. But how do they interact with Inner classes? public, as usual, gives unrestricted access to any scope able to access the type. public class OuterClass { public class InnerClass { public int x = 5; } p...
This topic is intended for intermediate to advanced F# developers "What are Monads?" is a common question. This is easy to answer but like in Hitchhikers guide to galaxy we realize we don't understand the answer because we didn't know what we were asking after. Many believe the way to un...
In Lua, booleans can be manipulated through logical operators. These operators include not, and, and or. In simple expressions, the results are fairly straightforward: print(not true) --> false print(not false) --> true print(true or false) --> true print(false and true) --> false ...
class MyHello { def sayHello() { "Hello, world" } } def cl = { sayHello() } cl() // groovy.lang.MissingMethodException cl.delegate = new MyHello() cl(); // "Hello, world" Used extensively by Groovy DSLs.

Page 138 of 417