Tutorial by Examples: al

DatePickerDialog is the simplest way to use DatePicker, because you can show dialog anywhere in your app. You don't have to implement your own layout with DatePicker widget. How to show dialog: DatePickerDialog datePickerDialog = new DatePickerDialog(context, listener, year, month, day); datePick...
Below are the PHP5 SuperGlobals $GLOBALS $_REQUEST $_GET $_POST $_FILES $_SERVER $_ENV $_COOKIE $_SESSION $GLOBALS: This SuperGlobal Variable is used for accessing globals variables. <?php $a = 10; function foo(){ echo $GLOBALS['a']; } //Which will print 10 Glo...
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=[APP_KEY]&client_secret=[APP_SECRET] Source
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=password&username=[USERNAME]&password=[PASSWORD] &client_id=[APP_KEY]&client_secret=[APP_SECRET] Source
It's also possible to easily share roles with the community or download roles that have been created by other members of the community with Ansible Galaxy. Ansible ships with a command line tool called ansible-galaxy that can be used to install roles in the role directory defined in the ansible.cfg...
Multiple FOR clauses are allowed in a LOOP. The loop finishes when the first of these clauses finishes: (loop for a in '(1 2 3 4 5) for b in '(a b c) collect (list a b)) ;; Evaluates to: ((1 a) (2 b) (3 c)) Other clauses that determine if the loop should continue can be combined: ...
Odoo v8.0 way is to add corresponding record in the XML file: ​Add XML file to the manifest (i.e. __openerp__.py file.): ... 'data' : [ 'your_file.xml' ], ​... Then add following record in 'your_file.xml': <openerp> <data> <template id="...
Add following record in 'your_file.xml': <openerp> <data> <template id="assets_common" name="your_module_name assets" inherit_id="web.assets_common"> <xpath expr="." position="inside"> <link rel...
Starting with a three-dimensional list: alist = [[[1,2],[3,4]], [[5,6,7],[8,9,10], [12, 13, 14]]] Accessing items in the list: print(alist[0][0][1]) #2 #Accesses second element in the first list in the first list print(alist[1][1][2]) #10 #Accesses the third element in the second list in...
Introduction and motivation Expression templates (denoted as ETs in the following) are a powerful template meta-programming technique, used to speed-up calculations of sometimes quite expensive expressions. It is widely used in different domains, for example in implementation of linear algebra ...
The OverloadedStrings language extension allows the use of normal string literals to stand for Text values. {-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T myText :: T.Text myText = "overloaded"
{-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T myText :: T.Text myText = "mississippi" splitOn breaks a Text up into a list of Texts on occurrences of a substring. ghci> T.splitOn "ss" myText ["mi","i","ippi"] sp...
Example uses basic HTTP, which translate easily to cURL and other HTTP applications. They also match the Sense syntax, which will be renamed to Console in Kibana 5.0. Note: The example inserts <#> to help draw attention to parts. Those should be removed if you copy it! DELETE /my_index <1...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. You can use the _cat APIs to get a human readable, tabular output for various reasons. GET /_cat/health <1> _cat/health has existed since Elasticsearch 1.x, but here is an example of its output...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. Like most _cat APIs in Elasticsearch, the API selectively responds with a default set of fields. However, other fields exist from the API if you want them: GET /_cat/health?help <1> ?help cau...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. The _cat APIs are often convenient for humans to get at-a-glance details about the cluster. But you frequently want consistently parseable output to use with software. In general, the JSON APIs are meant...
If you want to delete rows (or columns) in a loop, you should always loop starting from the end of range and move back in every step. In case of using the code: Dim i As Long With Workbooks("Book1").Worksheets("Sheet1") For i = 1 To 4 If IsEmpty(.Cells(i, 1)) Then...
To customize appearance of all instances of a class, access appearance proxy of the desired class. For example: Set UIButton tint color Swift: UIButton.appearance().tintColor = UIColor.greenColor() Objective-C: [UIButton appearance].tintColor = [UIColor greenColor]; Set UIButton background...
Allowing user credentials or the user's session to be sent with a CORS request allows the server to persist user data across CORS requests. This is useful if the server needs to check if the user is logged in before providing data (for example, only performing an action if a user is logged in - this...
Mostly you will use "normal variables": set(VAR TRUE) set(VAR "main.cpp") set(VAR1 ${VAR2}) But CMake does also know global "cached variables" (persisted in CMakeCache.txt). And if normal and cached variables of the same name exist in the current scope, normal var...

Page 90 of 269