Tutorial by Examples: a

In OCaml, there are different arithmetic operators for floats and integers. Additionally, these operators can only be used on 2 floats or 2 integers. Here are invalid expressions in OCaml 1.0 + 2.0 1 + 2.0 1 +. 2 1 +. 2.0 The correct expression for each of these respectively are 1. +. 2. fl...
This is just an extension on the sealed trait variant where a macro generates a set with all instances at compile time. This nicely omits the drawback that a developer can add a value to the enumeration but forget to add it to the allElements set. This variant especially becomes handy for large en...
When you logged into Odoo application you will find an option to see who is the current logged in person in the top right corner. This user information have a dropdown button. Click on the dropdown, then you will find a list. In that list select about Odoo.com option. Clicking on that will open a Ab...
Note: Loading Odoo onto an AWS EC2 Container requires an AWS account Loading Odoo onto an AWS EC2 Instance can be done with one-click, simply go here or search for "Odoo AWS" in Google. This may take some time, but once it's ready you'll need to do two things: Get your password Fin...
Main motive to develop this compound view is, below 5.0 devices does not support svg in drawable inside TextView/EditText. One more pros is, we can set height and width of drawableRight inside EditText. I have separated it from my project and created in separate module. Module Name : custom_edit_d...
A simple example of an svg font. A few things to note here: the coordinate system of the glyphs is in opposition to the usual coordinate system in svg. the y axis points upwards. The point 0,0 is in the lower right corner. All paths in a font must be drawn counter clockwise. In most tools only ...
the units-per-em property is one of the most important font properties. It's used to give any value of any other property any meaning. the CSS2 font spec has a nice definition of the em sqare: Certain values, such as width metrics, are expressed in units that are relative to an abstract square w...
We will use retrofit 2 and SimpleXmlConverter to get xml data from url and parse to Java class. Add dependency to Gradle script: compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:converter-simplexml:2.1.0' Create interface Also create xml class wrapper in our cas...
<# .DESCRIPTION Writes the metric out in bosun external collector format which is compatible with scollector external scripts .PARAMETER metric Name of the metric (eg : my.metric) .PARAMETER type Type of metric (counter, gauge, etc) .PARAMETER unit ...
Array declaration in Powershell is almost the same as instantiating any other variable, i.e. you use a $name = syntax. The items in the array are declared by separating them by commas(,): $myArrayOfInts = 1,2,3,4 $myArrayOfStrings = "1","2","3","4" Adding...
Odoo uses ORM(Object Relational Mapping) technique to interact with database. ORM will help to create a virtual object database that can be used within from the Python. In ORM technique each model is represented by a class that sub-classes Models.model. Models.model is the main super class for regu...
amazingservice: url: 'http://amazing.com' client_id: 'test_client_1' client_secret: 'test_secret' This is a basic example for create configuration in yml format, for following the yml format you can take deeper configuration.
For instance you have a bundle, which generated by the symfony console. In this case in the DependencyInjection/Configuration.php you have to insert your configuration representation: $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('amazingservice'); $rootNod...
In this example we will ask the bitcoin network for the merkle block number 442603. In order to do this we need to send a filterload message and then we have to send a getdata message using the inventory type MSG_MERKLEBLOCK. The peers should reply with a merkleblock message for the requested bloc...
This is a bit of a primer. It's mostly put it in because documentation is forced to have an example, even if it's intended as a stub article. If you already know unit-testing basics, feel free to skip forward to the remarks, where specific frameworks are mentioned. Unit testing is ensuring that a...
By default, accessing an individual item in a template dom-repeat loop is by calling {{item}}. Passing in an as= attribute to template will allow you to switch out the default {{item}} syntax for something that is more customized to the module you are working with. In this case, we want to grab the ...
Consider a basic class containing an object with getters and setters in Java: public class CountHolder { private int count = 0; public int getCount() { return count; } public void setCount(int c) { count = c; } } We can't access the count variable because it's private. But we can ac...
For example, with following nmap: nmap <expr> <S-F6> ':%s/' . @/ . '//gc<LEFT><LEFT><LEFT>' select a word with *, type Shift-F6, type in a replacement and hit Enter to rename all occurrences interactively.
library(dplyr) library(nycflights13) There are several verbs most commonly used in dplyr to modify datasets. select Select tailnum, type, model variables from the dataframe planes: select(planes, tailnum, type, model) ## # A tibble: 3,322 × 3 ## tailnum type mode...
interface Mockable { bool DoSomething(); } var mock = new Mock<Mockable>(); mock.Setup(x => x.DoSomething()).Returns(true); var result = mock.Object.DoSomething(); //true

Page 862 of 1099