##QUERY (PostgreSQL 9.4)
WITH RECURSIVE t(n) AS (
VALUES(1337)
UNION ALL
SELECT CASE WHEN n%2=0 THEN n/2 ELSE 3*n+1 END FROM t WHERE n > 1)
SELECT * FROM t
##QUERY (PostgreSQL 9.4)
WITH RECURSIVE t(n) AS (
VALUES(1337)
UNION ALL
SELECT CASE WHEN n%2=0 THEN n/2 ELSE 3*n+1 END FROM t WHERE n > 1)
SELECT * FROM t
//On config definition... | |
angular.module("moduleName").config( | |
function ($routeProvider, $httpProvider) { | |
//HERE THE IMPORTANT MAGIC LINE! | |
$httpProvider.defaults.withCredentials = true; | |
//If you don't set the line above, all $http will dispatch request without session_id to backend | |
//and the backend will not reconize the user session, giving your a big head pain! Believe on me. | |
//Question & Answer: http://stackoverflow.com/questions/17064791/http-doesnt-send-cookie-in-requests |