Tutorial by Examples: ble

Variadic Arguments
Create a .gitattributes file in the project root containing: * -text This is equivalent to setting core.autocrlf = false.
Regular instances require: All instance types must be of the form (T a1 ... an) where a1 ... an are *distinct type variables*, and each type variable appears at most once in the instance head. That means that, for example, while you can create an instance for [a] you can't create an instance f...
$ docker run -e "ENV_VAR=foo" ubuntu /bin/bash Both -e and --env can be used to define environment variables inside of a container. It is possible to supply many environment variables using a text file: $ docker run --env-file ./env.list ubuntu /bin/bash Example environment variable...
You can make an UILabel with a dynamic height using auto layout. You need to set the numberOfLines to zero (0), and add a minimal height by setting up a constraints with a relation of type .GreaterThanOrEqual on the .Height attribute iOS 6 Swift label.numberOfLines = 0 let heightConstraint = ...
The data.table package introduces the function fread. While it is similar to read.table, fread is usually faster and more flexible, guessing the file's delimiter automatically. # get the file path of a CSV included in R's utils package csv_path <- system.file("misc", "exDIF.csv&q...
(defvar *ht* (make-hash-table)) (loop for (sym num) on '(one 1 two 2 three 3 four 4 five 5 six 6 seven 7 eight 8 nine 9 ten 10) by #'cddr do (setf (gethash sym *ht*) num)) (loop for k being each hash-key of *ht* do (print k)) ; iterate over the keys (loop for k ...
Light Table is a good editor to learn, experiment and run Clojure projects. You can also run lein/boot projects by opening project.clj file. It will load all project dependencies. It supports inline evalution, plugins and much more, so there's no need to add print statements and check the output i...
package main import ( "log" "text/template" "os" ) type Person struct{ MyName string MyAge int } var myTempContents string= ` This person's name is : {{.MyName}} And he is {{.MyAge}} years old. ` func main() { t,err := temp...
To assign variables from the command-line, -v can be used: $ awk -v myvar="hello" 'BEGIN {print myvar}' hello Note that there are no spaces around the equal sign. This allows to use shell variables: $ shell_var="hello" $ awk -v myvar="$shell_var" 'BEGIN {print m...
You can use any element as an handle to drag another element around: <script> $(function() { $( "#draggable" ).draggable({ handle: ".handle" }); }); </script> <div id="draggable"> <span class="handle"&...
There are several ways to create an Observable in RxJava. The most powerful way is to use the Observable.create method. But it's also the most complicated way. So you must avoid using it, as much as possible. Emitting an exiting value If you already have a value, you can use Observable.just to emi...
An algorithmic problem is specified by describing the complete set of instances it must work on and of its output after running on one of these instances. This distinction, between a problem and an instance of a problem, is fundamental. The algorithmic problem known as sorting is defined as follows:...
Support for type hinting array parameters (and return values after PHP 7.1) was added in PHP 5.1 with the keyword array. Any arrays of any dimensions and types, as well as empty arrays, are valid values. Support for type hinting callables was added in PHP 5.4. Any value that is_callable() is valid ...
Destructuring allows us to refer to one key in an object, but declare it as a variable with a different name. The syntax looks like the key-value syntax for a normal JavaScript object. let user = { name: 'John Smith', id: 10, email: '[email protected]', }; let {user: userName, id: us...
TRUNCATE TABLE Employee; Using truncate table is often better then using DELETE TABLE as it ignores all the indexes and triggers and just removes everything. Delete table is a row based operation this means that each row is deleted. Truncate table is a data page operation the entire data page is...
This code selects data out of a table and displays it in the query tool (usually SSMS) SELECT Column1, Column2, Column3 FROM MySourceTable; This code inserts that data into a table: INSERT INTO MyTargetTable (Column1, Column2, Column3) SELECT Column1, Column2, Column3 FROM MySourceTable;
This code selects data out of a table: SELECT Column1, Column2, Column3 FROM MySourceTable; This code creates a new table called MyNewTable and puts that data into it SELECT Column1, Column2, Column3 INTO MyNewTable FROM MySourceTable;
To move data you first insert it into the target, then delete whatever you inserted from the source table. This is not a normal SQL operation but it may be enlightening What did you insert? Normally in databases you need to have one or more columns that you can use to uniquely identify rows so we w...
Comparable is one of the most popular modules in Ruby. Its purpose is to provide with convenience comparison methods. To use it, you have to include Comparable and define the space-ship operator (<=>): class Rectangle include Comparable def initialize(a, b) @a = a @b = b ...

Page 8 of 62