Tutorial by Examples: ad

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="...
Note: you should use this way if you've installed a "website" module and you have a public website available. Add following record in 'your_file.xml': <openerp> <data> <template id="assets_frontend" name="your_module_name assets" inherit...
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...
The :l or :load command type-checks and loads a file. $ echo "f = putStrLn \"example\"" > example.hs $ ghci GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help ghci> :l example.hs [1 of 1] Compiling Main ( example.hs, interpreted ) Ok, modules ...
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...
Input must must read from the Update function. Reference for all the available Keycode enum. 1. Reading key press with Input.GetKey: Input.GetKey will repeatedly return true while the user holds down the specified key. This can be used to repeatedly fire a weapon while holding the specified key ...
First we need to set up two basic channels, one for the main queue, and one for the delay queue. In my example at the end, I include a couple of additional flags that are not required, but makes the code more reliable; such as confirm delivery, delivery_mode and durable. You can find more informatio...
Like any other java program, every swing program starts with a main method. The main method is initiated by the main thread. However, Swing components need to be created and updated on the event dispatch thread (or short: EDT). To illustrate the dynamic between the main thread and the EDT take a loo...
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...
You can enable the Gradle Daemon to improve the performance of your builds. The Gradle Daemon keeps the Gradle Framework initialized and running, and caches project data in memory to improve performance. For a Single Build To enable the Daemon for a single build, you can simply pass the --daemon ...
In /res/values/strings.xml: <string-array name="spinner_options"> <item>Option 1</item> <item>Option 2</item> <item>Option 3</item> </string-array> In layout XML: <Spinner android:id="@+id/spinnerName" ...
DataObjects in SilverStripe represent a database table row. The fields in the model have magic methods that handle getting and setting data via their property names. Given we have a simple DataObject as an example: class Fruit extends DataObject { private static $db = ['Name' => 'Varchar'...
A Clojure function can be defined to take an arbitrary number of arguments, using the symbol & in its argument list. All remaining arguments are collected as a sequence. (defn sum [& args] (apply + args)) (defn sum-and-multiply [x & args] (* x (apply + args))) Calling: =&gt...
As a root user: sudo nginx -s reload Ubuntu 14.04 example sudo service nginx reload Ubuntu 16.04 example sudo systemctl reload nginx Before reloading, it is a good idea to check config for syntax errors: sudo nginx -t Or sudo service nginx configtest
LocalBroadcastManager is used to send Broadcast Intents within an application, without exposing them to unwanted listeners. Using LocalBroadcastManager is more efficient and safer than using context.sendBroadcast() directly, because you don't need to worry about any broadcasts faked by other Applic...
Create a new httpHandler inside your ASP.NET project. Apply the following code (VB) to the handler file: Public Class AttachmentDownload Implements System.Web.IHttpHandler Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest ' pass an ID thr...
'Trim the leading and trailing spaces in a string Const paddedText As String = " Foo Bar " Dim trimmedText As String trimmedText = Trim$(paddedText) 'trimmedText = "Foo Bar"
Adding a Fragment Statically File: activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <fragment android:id=&qu...
adduser command adds a user to the system. In order to add a new user type: sudo adduser <user_name> example: sudo adduser tom After typing the above command, you will be prompted to enter details about the new user, such as new password, user Full name, etc. Below is the information ...

Page 38 of 114