Tutorial by Examples: a

When you need to find the bounding rectangle of a quadratic bezier curve you can use the following performant method. // This method was discovered by Blindman67 and solves by first normalising the control point thereby reducing the algorithm complexity // x1,y1, x2,y2, x3,y3 Start, Control, and ...
Introduction Sometimes migrations conflict, resulting in making the migration unsuccesful. This can happen in a lot of scenerio's, however it can occur on a regular basis when developing one app with a team. Common migration conflicts happen while using source control, especially when the feature-...
We will present some examples to show how to apply happens-before reasoning to check that writes are visible to subsequent reads. Single-threaded code As you would expect, writes are always visible to subsequent reads in a single-threaded program. public class SingleThreadExample { public in...
A CSV file itself requires no installation as it is just a plain text file, usually with .csv extension. A CSV file usually contains records. Each line represents one record and is separated by a delimiter, most commonly a comma; but semicolons and tabs are also frequently used. Each line should ha...
All communications between Fragments must go via an Activity. Fragments CANNOT communicate with each other without an Activity. Additional Resources How to implement OnFragmentInteractionListener Android | Communicating With Other Fragments In this sample, we have a MainActivity that hosts t...
If you have an elixir file; a script or a module and want to load it into the current IEx session, you can use the c/1 method: iex(1)> c "lib/utils.ex" iex(2)> Utils.some_method This will compile and load the module in IEx, and you'll be able to call all of it's public methods. ...
Add react-rails to your Gemfile: gem 'react-rails' And install: bundle install Next, run the installation script: rails g react:install This will: create a components.js manifest file and a app/assets/javascripts/components/ directory, where you will put your components place the follo...
React.js builds You can pick which React.js build (development, production, with or without add-ons) to serve in each environment by adding a config. Here are the defaults: # config/environments/development.rb MyApp::Application.configure do config.react.variant = :development end # conf...
Here is the JSON File we will be using called animals.json { "Sea Animals": [ { "name": "Fish", "question": "How many species of fish are there?" }, { "name": "Sharks", ...
What is Profiling? By definition Profiling is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls. Why is it necessary? Profiling is important becau...
// If you find yourself doing something like this... function fieldChanged(type, name, index) { if (name == 'salesrep') { var salesRepId = nlapiGetFieldValue('salesrep'); var salesRepEmail = nlapiLookupField('employee', salesRepId, 'email'); nlapiSetFieldValue('custb...
Package Control - Download/Install this plugin to install and manage all your other plugins in sublime. Git - Keeps track of your git versioning system. Also enables you to execute some git commands from ST itself. GitGutter - With GitGutter, you can see which lines have been added, deleted or m...
Framebuffer is a type of buffer which stores color values, depth and stencil information of pixels in memory. When you draw something in OpenGL the output is stored in the default framebuffer and then you actually see the color values of this buffer on screen. You can also make your own framebuffer ...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
PHP has no support for running code concurrently unless you install extensions such as pthread. This can be sometimes bypassed by using proc_open() and stream_set_blocking() and reading their output asynchronously. If we split code into smaller chunks we can run it as multiple suprocesses. Then usi...
It is a basic human instinct to assess risk and to accept or take some kind of action on that risk. This is the essence of security, which is the body of knowledge that provides a framework around this instinct. Security defines three key concepts in a triangular paradigm - Confidentiality, Integri...
IDENTIFICATION DIVISION. PROGRAM-ID. STRINGVAL. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 WORK-AREAS. 05 I-STRING PIC X(08) VALUE 'STRNGVAL'. 05 O-STRING PIC XBXBXBXBXBXBXBX. 88 O-STRING-IS-EMPTY VALU...
OS: Mac OS X 10.11 (Should work on Windows / Linux since we are using Vagrant) Vagrant 1.8.4 Installed Directory Structure on Host OS (Mac OS): /path/to/project /provision /packages Note: If you use different vesions, be sure to update Variables at top of provision.sh script b...
This Example assumes you setup as explained in Example: Setting Up Environment for aurelia-cli Explained of this document. Creating a new project In main host os, open terminal (Mac OS in my case) $cd /path/to/project/vagrant $vagrant up (Launches VM GUI) Log into VM via UI U...
Environment This Example assumes you setup as explained in Example: Setting Up Environment for Aurelia-cli Explained of this document. Summary of setup: On Mac OS X with Vagrant 1.8.4 $cd /path/to/project/vagrant $vagrant up Log into VM via UI as User:vagrant / PW:vagrant $cd /home/vagrant/...

Page 773 of 1099