Tutorial by Examples: f

Ansible is best used from a checkout. It runs as you (not root) and it has minimal python dependencies. Python pip dependency install with pip: sudo pip install paramiko PyYAML Jinja2 httplib2 six Next, clone the Ansible repo from GitHub: cd ~/Documents git clone git://github.com/ansible/ans...
The border-[left|right|top|bottom] property is used to add a border to a specific side of an element. For example if you wanted to add a border to the left side of an element, you could do: #element { border-left: 1px solid black; }
You can obtain information about EC2 instances using: aws ec2 describe-instances You can obtain information about specific EC2 instances using: aws ec2 describe-instances --instance-ids ... where ... contains one or more instance identifiers. For example: aws ec2 describe-instances --instan...
Before Fortran 95 it was possible to use assigned formats for input or output. Consider integer i, fmt read *, i assign 100 to fmt if (i<100000) assign 200 to fmt print fmt, i 100 format ("This is a big number", I10) 200 format ("This is a small number", I6) e...
Before you begin tuning your Gradle build for performance, you should establish a baseline and figure out which portions of the build are taking the most time. To do this, you can profile your build by adding the --profile argument to your Gradle command: gradle --profile ./gradlew --profile Af...
If profiling your build shows significant time spend in Configuring Projects, the Configure on Demand option might improve your performance. You can enable Configure on Demand mode by editing $GRADLE_USER_HOME/.gradle/gradle.properties (~/.gradle/gradle.properties by default), and setting org.gradl...
You can set or increase memory usage limits (or other JVM arguments) used for Gradle builds and the Gradle Daemon by editing $GRADLE_USER_HOME/.gradle/gradle.properties (~/.gradle/gradle.properties by default), and setting org.gradle.jvmargs. To configure these limits only for a specific project, e...
'Declare and assign a 1-character fixed-width string Dim middleInitial As String * 1 'middleInitial must be 1 character in length middleInitial = "M" 'Declare and assign a 2-character fixed-width string `stateCode`, 'must be 2 characters in length Dim stateCode As String * 2 stateC...
VBA offers a Mid function for returning substrings within a string, but it also offers the Mid Statement which can be used to assign substrings or individual characters withing a string. The Mid function will typically appear on the right-hand-side of an assignment statement or in a condition, but ...
The text-overflow property deals with how overflowed content should be signaled to users. In this example, the ellipsis represents clipped text. .text { overflow: hidden; text-overflow: ellipsis; } Unfortunately, text-overflow: ellipsis only works on a single line of text. There is no way...
Guice is a Java library. To use it you have to add a JAR file into the classpath of your Java project. Sample classes Below are several classes for a "Hello, world!" example. An interface of a hello "service": public interface HelloWorldService { public void sayHello(); ...
DECLARE @startdate CHAR(8), @numberDays TINYINT SET @startdate = '20160101' SET @numberDays = 10; WITH CTE_DatesTable AS ( SELECT CAST(@startdate as date) AS [date] UNION ALL SELECT DATEADD(dd, 1, [date]) FROM CTE_DatesTable WHERE DATEADD(dd, 1, [date]) <= DateAdd(DAY, @nu...
XHProf is a PHP profiler originally written by Facebook, to provide a more lightweight alternative to XDebug. After installing the xhprof PHP module, profiling can be enabled / disabled from PHP code: xhprof_enable(); doSlowOperation(); $profile_data = xhprof_disable(); The returned array wil...
Some recommended PEP8 style guidelines for imports: Imports should be on separate lines: from math import sqrt, ceil # Not recommended from math import sqrt # Recommended from math import ceil Order imports as follows at the top of the module: Standard libr...
The typical workflow of training and using neural networks, regardless of the library used, goes like this: Training Data Getting the training data: the X variable is the input, and the Y variable is the output. The simplest thing to do is to learn a logic gate, where X is a vector or two number...
Giving this enumeration as Example: enum Compass { NORTH(0), EAST(90), SOUTH(180), WEST(270); private int degree; Compass(int deg){ degree = deg; } public int getDegree(){ return degree; } } In Java an enum class is like any other c...
The sum 20 + 21 + 22 + ... + 2n-1 simplifies to 2n - 1. This explains why the maximum value that can be stored in an unsigned 32-bit integer is 232 - 1.
The sum of the geometric series r0 + r1 + r2 + ... + rn-1 In the case where r ≠ 1, simplifies to (rn - 1) / (r - 1). If r < 1, this sum is bounded from above by 1 / (1 - r). If r = 1, this sum is rn.
How do you go about using an instance of a (possibly further) inherited generic type within a method declaration in the generic type itself being declared? This is one of the problems you will face when you dig a bit deeper into generics, but still a fairly common one. Assume we have a DataSeries&l...
apologies: since I don't know of a channel for discussing/providing feedback on requests for improvement, I'm going to put my question here. Please feel free to point out a better place for this! @DataTx states that this is "completely unclear, incomplete, or has severe formatting problems&quot...

Page 148 of 457