This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Hash Tables | |
Usage : | |
'python -i hashex.py' | |
The goal of a hash table is to map a keyword to a placeholder that contains the value you stored. | |
We will define 3 functions : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('app',[]); | |
app.factory('strictHttp', function ($http) { | |
return { | |
post: function(url, params, req, config){ | |
var invalid; | |
for(var p in params){ | |
if(req.indexOf(p) > -1 && (params[p] === '' || params[p] === undefined)){ | |
invalid = 1; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
scope -> non functions and non constats are regular objects, no functions allowed | |
services -> all functions are sent through a service that executes on the server (nodejs in this example but could be python. could also be a hosted service) | |
*/ | |
angular.module('MVapp', []) | |
.factory('Service', function($http, $q){ | |
return { | |
_: function(){ |