Tutorial by Examples: at

Detailed instructions on getting Nokogiri set up or installed.
Reading an image is almost like reading an array. The only difference beeing that the size and offset need to be three-dimensional. clEnqueueReadImage($queue, $memobj, $blocking, $offset, $size, $stride, $slice_pitch, $target, 0, null, null); The $stride defines how many bytes a row has. Normall...
Recent versions of Delphi ships with the TStopwatch record which is for time interval measurement. Example usage: uses System.Diagnostics; var StopWatch: TStopwatch; ElapsedMillseconds: Int64; begin StopWatch := TStopwatch.StartNew; // do something that requires measurement El...
DRF offers the chance to further customize the behavior of the generic views/viewsets by allowing the creation of custom mixins. How to: To define a custom mixin we just need to create a class inheriting from object. Let's assume that we want to define two separate views for a model named MyM...
An inner class which is visible to any outside class can be created from this class as well. The inner class depends on the outside class and requires a reference to an instance of it. To create an instance of the inner class, the new operator only needs to be called on an instance of the outer cla...
npm install --save-dev ember-cli-sass ember install ember-cli-foundation-6-sass
// ember-cli-build.js /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Add options here 'ember-cli-foundation-6-sass': { 'foundationJs': [ ...
1. Enable Flat Categories and Products One of the top reasons of Magento speed issues with database read speed. To fasten the read speed of the database you should enable Flat Catalog. This will minify the number of database joins done when showing products and due to that the MySQL query complexit...
A print job is a request of printing something in a specific print service. It consists, basically, by: the data that will be printed (see Building the Doc that will be printed) a set of attributes After picking-up the right print service instance, we can request the creation of a print job...
Doc is an interface and the Java Print Service API provide a simple implementation called SimpleDoc. Every Doc instance is basically made of two aspects: the print data content itself (an E-mail, an image, a document etc) the print data format, called DocFlavor (MIME type + Representation class...
Sometimes we need to determine some aspects of the print request. We will call them attribute. Are examples of print request attributes: amount of copies (1, 2 etc), orientation (portrait or landscape) chromacity (monochrome, color) quality (draft, normal, high) sides (one-sided, two-sided e...
A convenient way to package your application is to write the scripts in your packages.json file and run them with the npm run command { "name": "AppName", "productName": "AppName", "version": "0.1.1", "main": ...
Detailed instructions on getting google-cloud-dataflow set up or installed.
##= # The variable $Bit will hold either 64 or 32 depending on system architecture # This is used with all the ${Service::} macros # Use this in the beginning of your code. # This snippet should only be used once. # Var Bit System::Call "kernel32::GetCurrentProcess()i.s" System::C...
##= #= Service::State # # USAGE: # ${Service::State} "NAME" /DISABLEFSR $0 $1 # # ::State = The service's status is returned. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return after call...
If you have: val r = Random(233) infix inline operator fun Int.rem(block: () -> Unit) { if (r.nextInt(100) < this) block() } You can write the following DSL-like code: 20 % { println("The possibility you see this message is 20%") }
Detailed instructions on getting nsurlsession set up or installed.
This example illustrates how to create a simple sine curve using Matplotlib # Plotting tutorials in Python # Launching a simple plot import numpy as np import matplotlib.pyplot as plt # angle varying between 0 and 2*pi x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...
In this example, we take a sine curve plot and add more features to it; namely the title, axis labels, title, axis ticks, grid and legend. # Plotting tutorials in Python # Enhancing a plot import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...

Page 422 of 442