Tutorial by Examples: o

PostmarkMailSender.java public class PostmarkMailSender implements MailSender{ private static Logger logger = Logger.getLogger("com.postmark"); private String serverToken; private static Gson gson; static { GsonBuilder gsonBuilder = new GsonBuilder(); ...
class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80)) email = db.Column(db.String(120), unique=True) posts = db.relationship('Post', backref='user') class Post(db.Model): id = db.Column(db.Integer,...
The curl source packages can be downloaded from the following page: https://curl.haxx.se/download.html However, the best way to install it is to use your package repository. For Linux distros, you can use apt-get, yum or rpm depending on the distribution you are using, so the exact command will b...
Child Processes are the way to go when one wants to run processes independently with different initialization and concerns. Like forks in clusters, a child_process runs in its thread, but unlike forks, it has a way to communicate with its parent. The communication goes both ways, so parent and chil...
A typical example of the implementation of a Looper thread given by the official documentation uses Looper.prepare() and Looper.loop() and associates a Handler with the loop between these calls. class LooperThread extends Thread { public Handler mHandler; public void run() { Lo...
A HandlerThread can be used to start a thread with a Looper. This looper then can be used to create a Handler for communications with it. HandlerThread thread = new HandlerThread("thread-name"); thread.start(); Handler handler = new Handler(thread.getLooper());
Detailed instructions on getting graphviz set up or installed.
In this example, we will plot a sine curve and a hyperbolic sine curve in the same plot with a common x-axis having different y-axis. This is accomplished by the use of twinx() command. # Plotting tutorials in Python # Adding Multiple plots by twin x axis # Good for plots having different y axis ...
In this example, a plot with curves having common y-axis but different x-axis is demonstrated using twiny() method. Also, some additional features such as the title, legend, labels, grids, axis ticks and colours are added to the plot. # Plotting tutorials in Python # Adding Multiple plots by twin ...
const { expect } = require('chai') describe('Suite Name', function() { describe('#method()', function() { it('should run without an error', async function() { const result = await answerToTheUltimateQuestion() expect(result).to.be.equal(42) }) }) })
Promises handle errors differently to synchronous or callback-driven code. const p = new Promise(function (resolve, reject) { reject(new Error('Oops')); }); // anything that is `reject`ed inside a promise will be available through catch // while a promise is rejected, `.then` will not be ...
Numeric literals of more than a few digits are hard to read. Pronounce 7237498123. Compare 237498123 with 237499123 for equality. Decide whether 237499123 or 20249472 is larger. C++14 define Simple Quotation Mark ' as a digit separator, in numbers and user-defined literals. This can make it ...
Fibonacci Numbers are a prime subject for dynamic programming as the traditional recursive approach makes a lot of repeated calculations. In these examples I will be using the base case of f(0) = f(1) = 1. Here is an example recursive tree for fibonacci(4), note the repeated computations: Non-Dy...
A possible response to the request above. The response contains the HTTP headers Date, Content-Type, Content-Encoding and Content-Length. HTTP/1.1 200 OK Date: Wed, 21 Jun 2017 10:58:03 GMT Content-Type: text/html; charset=UTF-8 Content-Encoding: UTF-8 Content-Length: 150 <response body&g...
You can check the version of Sass using sass -v Update all ruby gems gem update Update only Sass gem update sass
Open your command line Installation using Ruby gem update --system gem install compass Create a Project compass create <myproject> This will initialize a compass project. It will add a folder called . The folder will look like have the following structure: File/Folderdescription...
You can find a complete reference which CSS3 components are supported on this page In order to use CSS3 in your project Compass provides mixins to support CSS3 features in every browser. On top of your Sass/Scss file you have to specify that you want to use compass @import "compass/css3"...
Locate and open your TIBCO BW bwengine.tra file typlically under TIBCO_HOME/bw/5.12/bin/bwengine.tra (Linux environment) Look for the line that states: *** Common variables. Modify these only. *** Add the following line right after that section tibco.deployment=%tibco.deployment% ...
A simple OGL 4.0 GLSL shader program with vertex position and color attribute. The program is executed with a phyton script. To run the script, PyOpenGL must be installed. A shader program consists at least of a vertex shader and a fragmant shader (exception of computer shaders). The 1st shader s...

Page 1002 of 1038