Tutorial by Examples: 0

The same example above, Image loading, can be written using async functions. This also allows using the common try/catch method for exception handling. Note: as of April 2017, the current releases of all browsers but Internet Explorer supports async functions. function loadImage(url) { return...
Django 1.10 introduced a new middleware style where process_request and process_response are merged together. In this new style, a middleware is a callable that returns another callable. Well, actually the former is a middleware factory and the latter is the actual middleware. The middleware facto...
Include using System.Numerics and add a reference to System.Numerics to the project. using System; using System.Numerics; namespace Euler_25 { class Program { static void Main(string[] args) { BigInteger l1 = 1; BigInteger l2 = 1; ...
realloc is conceptually equivalent to malloc + memcpy + free on the other pointer. If the size of the space requested is zero, the behavior of realloc is implementation-defined. This is similar for all memory allocation functions that receive a size parameter of value 0. Such functions may in fact ...
Use vectors to calculate incremental [x,y] from [startX,startY] to [endX,endY] // dx is the total distance to move in the X direction var dx = endX - startX; // dy is the total distance to move in the Y direction var dy = endY - startY; // use a pct (percentage) to travel the total distance...
Modern versions of Jenkins (version 2.x) come with a "Build Pipeline Plugin" that can be used to orchestrate complex CI tasks without creating a multitude of interconnected jobs, and allow you to easily version-control your build / test configuration. You may install this manually in a &q...
Here is an example of a pipeline script that builds a Docker container, then runs the tests inside of it. The entrypoint is assumed to be either manage.py or invoke/fabric with a runtests command available. #!/usr/bin/groovy node { stage 'Checkout' checkout scm sh 'git submodule update ...
The TLC5940 is a handy item to have when you run out of PWM ports on the Arduino. It has 16 channels, each individually controllable with 12 bits of resolution (0-4095). An existing library is available at http://playground.arduino.cc/Learning/TLC5940. It is useful for controlling multiple servos or...
require(['N/search'], function(SEARCHMODULE){ var type = 'transaction'; var columns = []; columns.push(SEARCHMODULE.createColumn({ name: 'internalid' })); columns.push(SEARCHMODULE.createColumn({ name: 'formulanumeric', formula: '{quantity}-{...
require(['N/search'], function(SEARCHMODULE){ var savedSearchId = 'customsearch_mySavedSearch'; var mySearch = SEARCHMODULE.load(savedSearchId); var resultset = mySearch.run(); var results = resultset.getRange(0, 1000); for(var i in results){ var result = results[i]...
Put the following code in functions.php: function themify_custom_excerpt_length( $length ) { return 50; } add_filter( 'excerpt_length', 'themify_custom_excerpt_length', 999 ); Use 999 as the priority to ensure that the function runs after the default WordPress filter, otherwise it would ov...
invoke("", somePrivateMethodName, {argument1='one'});
We have a set of data We would like to see by using the following expression in the detail textbox. we can achieve the Remark =IIF(Fields!Points.Value>=10,"Good","Average")
Example Table There are several ways to inject your data into DataTables. Serverside Processing is just one method. In this manner, DataTables has a pre-configured endpoint to retrieve data from, and that endpoint is responsible for accepting all paging/filtering/sorting requests that DataTables ap...
require(['N/search'], function(SEARCHMODULE){ var savedSearchId = 'customsearch_mySavedSearch'; var mySearch = SEARCHMODULE.load(savedSearchId); var resultset = mySearch.run(); var results = resultset.getRange(0, 1000); for(var i in results){ var result = results[i]...
require(['N/search'], function(SEARCHMODULE){ var type = 'transaction'; var columns = []; columns.push(SEARCHMODULE.createColumn({ name: 'internalid' })); columns.push(SEARCHMODULE.createColumn({ name: 'formulanumeric', formula: '{quantity}-{...
In this example code we will create A blank Opengl Window using LWJGL 3.0+, this doesn't contain steps to create the project in your IDE Create a class name WindowManager that will contain all the boiler plate code for creating a opengl context window on screen WindowManager.java impor...
webpack 2 introduces tree shaking which can remove unused code when ES2015 modules are used to import and export code. Install npm install babel-preset-es2015-webpack --save-dev Usage in .babelrc: { "presets": [ "es2015-webpack" ] }
To make an app more cohesive, we often need to keep user's personal settings and preferences consistent across multiple devices that have been logged in with one Microsoft account. In this sample, we use roaming data to store and to load UI settings, game process and user info. But the roaming data ...
Goto - http://www.jorambarrez.be/blog/2010/08/02/tutorial-a-bpmn-2-0-hello-world-with-activiti-5-0-alpha4-in-5-steps/ A very Good and detailed tutorial by Joram Barrez (one of the core Developer of Activiti)

Page 5 of 11