Tutorial by Examples: c

This: class Foo extends Dynamic { // Expressions are only rewritten to use Dynamic if they are not already valid // Therefore foo.realField will not use select/updateDynamic var realField: Int = 5 // Called for expressions of the type foo.field def selectDynamic(fieldName: String) = ...
This: class Villain(val minions: Map[String, Minion]) extends Dynamic { def applyDynamic(name: String)(jobs: Task*) = jobs.foreach(minions(name).do) def applyDynamicNamed(name: String)(jobs: (String, Task)*) = jobs.foreach { // If a parameter does not have a name, and is simply given, th...
Slightly counterintuitively (but also the only sane way to make it work), this: val dyn: Dynamic = ??? dyn.x(y) = z is equivalent to: dyn.selectDynamic("x").update(y, z) while dyn.x(y) is still dyn.applyDynamic("x")(y) It is important to be aware of this, or else...
Result<T, E> is an enum type which has two variants: Ok(T) indicating successful execution with meaningful result of type T, and Err(E) indicating occurrence of an unexpected error during execution, described by a value of type E. enum DateError { InvalidDay, InvalidMonth, } str...
Using a CASE statement, conditionally display an expression in the column based on values found in another column, a.k.a. “my kingdom for an OR”. In the example, the result is obtained when the status of the transaction is Pending Fulfillment or Partially Fulfilled: CASE DECODE( {status}, 'Pending ...
Using a regular expression, parse a record name that might be hierarchical. The expression looks for the final colon in the name. It returns what follows the colon, or the entire name if none: regexp_substr( {name} , '[^:]*$' )
The example builds a string from the name of the parent record, the name of this record, and the memo of this record. {createdfrom} || ' ' || {name} || ' ' || {memo}
'<div style="font-size:11pt">' || expression || '</div>'
In a string formula field, consider that some values might contain substrings which look to the browser like HTML. Unless this is intentional, it is important to protect the values from corruption. This is useful to avoid injection attacks: it prevents someone from entering HTML into a comment field...
In a saved search formula, the possible values of mainline are designed to be useful in an HTML context. When mainline is true, the value of {mainline} is the 1-character string * (asterisk). When mainline is false, the value of {mainline} is the 6-character string   (non-breaking space, HT...
The following example combines several of the techniques covered here. It puts a hyperlink in a custom formatted column which, when clicked, opens the sales order record associated with a row. The hyperlink is designed to open the record in a new window or tab when clicked, and to display a tooltip ...
JavaScript allows us to define getters and setters in the object literal syntax. Here's an example: var date = { year: '2017', month: '02', day: '27', get date() { // Get the date in YYYY-MM-DD format return `${this.year}-${this.month}-${this.day}` }, ...
var setValue; var obj = {}; Object.defineProperty(obj, "objProperty", { get: function(){ return "a value"; }, set: function(value){ setValue = value; } });
If you haven't already lets simply start this file of with: class HelloWorldLeftAndMain extends LeftAndMain { } Configure The first thing you should do, is define the $url_segment that will be used to access the interface, and the title ($menu_title) that will appear in the side navigation m...
The expected structure of this template can be a bit convoluted but it all boils down to this: There are 3 sections worth noting for this guide: .north .center .south It must be wrapped entirely within an element that has the data-pjax-fragment="Content" attribute. This is...
To add user, use following command htpasswd /etc/subversion/passwd user_name Specify user_name with the username you wish to add in above command. It will prompt to provide password for the user. If you are creating very first user, you need to add –c switch in above command, which will create th...
Groups can be defined in /etc/subversion/svn_access_control file. Create/edit the file using following command nano /etc/subversion/svn_access_control Use syntax specified as below to define groups and assign members. [groups] groupname = <list of users, comma separated> e.g. [groups]...
Registering a custom post type does not mean it gets added to the main RSS feed automatically.You need to use request filter to add custom post types to main RSS feed. // Add 'books' custom post types on main RSS feed function add_book_post_types_to_rss($qv) { if (isset($qv['feed']) &&amp...
Requirement for Local development 1) MySQL server(I am Using XAMPP for MySQL server) 2) For Test API You can use Postman(optional) 3) Before run application,make sure MySQL server is running, properly prepare your application.properties file(DB_Name, Username,Password). 1.Add following depen...

Page 666 of 826