Category Archives: Development

Vue links

  1. Basic understanding of elixir, gulp and webpac
  2. Best Vue JS templates 2018

Use PostMan to post JSON to laravel

  1. Set web method to POST
  2. Add to the Headers:
    1. a key named: Accept with value application/json
    2. a key named: Content-Type with value application/json
  3. Add the JSON data to the raw area of Body of Postman.
  4. Click send.






Floating-point tolerance tests

Absolute tolerance:

  • Not good for big numbers
abs(x–y) <= tol1

Relative tolerance:

  • Not good for small numbers
abs(x–y) <= tol2 * max(abs(x), abs(y))

Combined tolerance test:

(abs(x-y) <= tol1) ||
  (abs(x-y) <= tol2 * max(abs(x), abs(y))

equal to:

abs(x-y) <= tol1 * Max(1.0f, tol2/tol1 * max(abs(x), abs(y))

which for tol1=tol2 becomes:

abs(x-y) <= tol1 * Max(1.0f, abs(x), abs(y))



  • Real time collision detection, Christer Ericson


Enable CORS to Tomcat

CORS (CORS flowchart) is quite complex to understand but you absolutely need it if you want to write an app in “modern” javascript frameworks like angular.

The simplest way to enable CORS to Apache Tomcat for development is to:

  1. create web.xml (if it does not exist already)
  2. add the included filter. An example is shown below: