Tutorial by Examples: ti

The easiest way to get started with Gremlin is to install the Gremlin Console. The Gremlin Console is a REPL that allows immediate feedback on the results of Gremlin traversals. As a prerequisite, Java 8 is required for the Gremlin Console to run. Ensure that it is installed prior to moving forward...
Detailed instructions on getting titan set up or installed.
You can redirect the debug output to a text file by adding a TextWriterTraceListener to the Debug.Listeners collection. public static void Main(string[] args) { TextWriterTraceListener myWriter = new TextWriterTraceListener(@"debug.txt"); Debug.Listeners.Add(myWriter); Deb...
return http://www.example.com/skin/frontend/{interface}/{theme}/images/my-image.jpg
System time gives you the CPU time required to execute a R expression, for example: system.time(print("hello world")) # [1] "hello world" # user system elapsed # 0 0 0 You can add larger pieces of code through use of braces: system.time({ li...
At its simplest, proc.time() gives the total elapsed CPU time in seconds for the current process. Executing it in the console gives the following type of output: proc.time() # user system elapsed # 284.507 120.397 515029.305 This is particularly useful for benchmarking s...
If you want to display to your users meaningful errors instead of simple "sorry, something went wrong", Rails has a nice utility for the purpose. Open the file app/controllers/application_controller.rb and you should find something like this: class ApplicationController < ActionContro...
You can rollback and then migrate again using the redo command. This is basically a shortcut that combines rollback and migrate tasks. Run command: 5.0 rake db:migrate:redo 5.0 rails db:migrate:redo You can use the STEP parameter to go back more than one version. For example, to go ba...
Drupal Console The new CLI for Drupal. A tool to generate boilerplate code, interact with and debug Drupal. First, we need to install Drupal Console. Drupal Console is needed not only for this time, but for future installations. # Run this in your terminal to get the latest project version: cur...
In Aurelia all HTML templates are defined inside of opening and closing <template></template> tags. All of your HTML and Aurelia specific logic goes inside of these template tags and cannot exist outside of them. <template> </template>
Each pair in the dictionary is an instance of KeyValuePair with the same type parameters as the Dictionary. When you loop through the dictionary with For Each, each iteration will give you one of the Key-Value Pairs stored in the dictionary. For Each kvp As KeyValuePair(Of String, String) In curren...
Dim extensions As New Dictionary(Of String, String) _ from { { "txt", "notepad" }, { "bmp", "paint" }, { "doc", "winword" } } This creates a dictionary and immediately fills it with three KeyValuePairs. You can also add new val...
Dictionaries are implemented in a Dict core library. A dictionary mapping unique keys to values. The keys can be any comparable type. This includes Int, Float, Time, Char, String, and tuples or lists of comparable types. Insert, remove, and query operations all take O(log n) time. Unlike Tu...
Get width and height: var width = $('#target-element').width(); var height = $('#target-element').height(); Set width and height: $('#target-element').width(50); $('#target-element').height(100);
Get width and height: var width = $('#target-element').innerWidth(); var height = $('#target-element').innerHeight(); Set width and height: $('#target-element').innerWidth(50); $('#target-element').innerHeight(100);
Get width and height (excluding margin): var width = $('#target-element').outerWidth(); var height = $('#target-element').outerHeight(); Get width and height (including margin): var width = $('#target-element').outerWidth(true); var height = $('#target-element').outerHeight(true); Set widt...
For named (non-anonymous) functions, you can break when the function is executed. debug(functionName); The next time functionName function runs, the debugger will stop on its first line.
We will see how to center content based on the height of a near element. Compatibility: IE8+, all other modern browsers. HTML <div class="content"> <div class="position-container"> <div class="thumb"> <img src="http://lorempix...
The caption-side property determines the vertical positioning of the <caption> element within a table. This has no effect if such element does not exist. Below an example with two tables with different values set to the caption-side property: The table on the left has caption-side: top whi...
Picasso.with(context) .load("YOUR IMAGE URL HERE") .placeholder(DRAWABLE RESOURCE) // optional .error(DRAWABLE RESOURCE) // optional .resize(width, height) // optional .rotate(degree) // optional .in...

Page 104 of 505