Tutorial by Examples

var JSONObject = { stringProp: 'stringProp', booleanProp: false, intProp: 8 } var JSONString = JSON.stringify(JSONObject); console.log(JSONString); /* output * {"stringProp":"stringProp","booleanProp":false,"intProp":8} */
var JSONObject = { stringProp: 'stringProp', booleanProp: false, intProp: 8 } var JSONString = JSON.stringify(JSONObject, ['intProp']); console.log(JSONString); /* output * {"intProp":8} */
var JSONObject = { stringProp: 'stringProp', booleanProp: false, intProp: 8 } var JSONString = JSON.stringify(JSONObject, null, 2); console.log(JSONString); /* output: * { * "stringProp": "stringProp", * "booleanProp": false, * "...
Loading from string Use simplexml_load_string to create a SimpleXMLElement from a string: $xmlString = "<?xml version='1.0' encoding='UTF-8'?>"; $xml = simplexml_load_string($xmlString) or die("Error: Cannot create object"); Note that or not || must be used here becau...
Despite you can write a binary number in C++14 like: int number =0b0001'0101; // ==21 here comes a famous example with a self-made implementation for binary numbers: Note: The whole template expanding program is running at compile time. template< char FIRST, char... REST > struct binary {...
Usually you'll end up creating models which will contain a state, and that state will be changing during the lifespan of the object. AASM is a finite state machine enabler library that can help you out with dealing with having an easy passing through the process design of your objects. Having some...
A broadcast join copies the small data to the worker nodes which leads to a highly efficient and super-fast join. When we are joining two datasets and one of the datasets is much smaller than the other (e.g when the small dataset can fit into memory), then we should use a Broadcast Hash Join. The f...
The Client Script is one of the more commonly used, and complex, script types available to you. As its name implies, the Client Script runs in the browser, i.e. on the client side. It is the only script type that runs on the client side; all others will execute on the server side of NetSuite. The p...
Closely related to the Client Script is the User Event Script. The events of this Script type are again fired when a record is being loaded or saved, but it instead runs on the server side. As such, it cannot be used to respond immediately to field changes, but it also is not limited to only users i...
There are two types of scripts we can leverage for running background processing on a specific, regular interval; these are the Scheduled and the Map/Reduce scripts. Note that the Map/Reduce script type is only available in SuiteScript 2.0. The Scheduled script is available for both 1.0 and 2.0. Th...
Often we will want to build custom UI pages in NetSuite; enter the Suitelet. The Suitelet script is designed for building internal, custom UI pages. Pages can be free-form HTML, or they can utilize NetSuite's UI Builder APIs to construct forms that follow NetSuite's look and feel. When it is deploy...
RESTlets allow us to build custom REST-based endpoints into NetSuite; thus, RESTlets form the backbone of nearly any integration into NetSuite. RESTlets provide individual event handlers for four of the most commonly used HTTP request methods: GET POST PUT DELETE When a RESTlet receives a ...
Using the Mass Update script, we can build custom Mass Updates for users to perform. This functions just like a normal Mass Update, where the user selects the type of Mass Update, builds a search that returns the records to update, and then each search result is passed individually into the custom M...
Workflows can be somewhat limited in their functionality; for example, workflows cannot interact with line items. The Workflow Action script type is intended to be invoked by a Workflow to add scripting functionality to accomplish what the workflow itself cannot. Workflow Actions have a single onAc...
Lastly, we have the Bundle Installation script type, which provides several events that allow us to interact with the installation, update, and uninstallation of a particular bundle. This is a rarely-encountered script type, but important to be aware of nonetheless. The Bundle Installation includes...
To add a background-image rule via the CSSOM, first get a reference to the rules of the first stylesheet: var stylesheet = document.styleSheets[0].cssRules; Then, get a reference to the end of the stylesheet: var end = stylesheet.length - 1; Finally, insert a background-image rule for the bo...
This is a step by step guide to set up the automated build process using Jenkins CI for your Android projects. The following steps assume that you have new hardware with just any flavor of Linux installed. It is also taken into account that you might have a remote machine. PART I: Initial setup on ...
First of all, Ensure that the user which will be running this call has the Change backup settings and control backup process privilege. # # TC Backup Launcher # Script to launch a backup on the TeamCity Server # Param( [Parameter(Mandatory=$true)][string]$username, [Parameter(Mandato...
Describes a dependency relationship between actors, the parent and child releationship. Parent is unique because it has created the child actor, so the parent is responsible for reacting when failures happens in his child. And parent decides which choice needs to be selected. When a parent receives...
There are two type of supervision strategies that we follow to supervise any actor: One-For-One Strategy One-For-All Strategy case object ResumeException extends Exception case object StopException extends Exception case object RestartException extends Exception override v...

Page 1023 of 1336