guilhebl

Philosophical writings about programming and technology

Angular 2

Angular 2 Finally Angular2 has been released under beta version. It carries steep changes compared to version 1. Check Angular's version 2 documentation. Another reason for adopting angular 2 is performance. Many improvements were done...
Read more...
16 April 2016

Full AngularJS Gulp seed

Full AngularJS + Gulp Seed Whenever you're about to start a new AngularJS application, you think about where to begin from and what infra-structure to use in terms of testing, build automation, etc. That's when...
Read more...
02 December 2015

Unit testing with angularjs, requirejs, jquery, karma and jasmine.

Unit testing with angular requirejs karma and jasmine In this example we're going to create a sample test for the an application called "FarmApp", which should ressemble an imaginary farm. Here we are testing our...
Read more...
19 July 2015

Building an app based on angularjs, requirejs, jquery, bootstrap.

Prerequisites To start building the app you need to install: Node.js npm Farm App In this example we're going to create a sample app called "FarmApp", which should ressemble an imaginary farm. project directory tree...
Read more...
13 July 2015

NGINX port redirect example

Sample port redirect using NGINX A common scenario when using a separate Web Server from an Application Server is port redirect. using NGINX as a web application server and an application server it is possible...
Read more...
15 April 2015

Subset Sum Mod N

Problem overview Get sum of value of all subsets (powersum) of int array a[] and return sum % mod Example: "123" = [1, 2, 3] --> 123 + 12 + 13 + 23 + 1...
Read more...
14 April 2015

Get total count of employees under each manager in the hierarchy

Problem overview Given a dictionary that contains mapping of employee and his/her manager like this: Dictionary<string, string> employees = new Dictionary<>() { { "A","C" }, { "B","C" }, { "C","F" }, { "D","E" }, {...
Read more...
10 April 2015

Fit Binary Int M into Binary Int N

Problem overview You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e.g.,...
Read more...
09 April 2015