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
/* | |
DUI = 00016297-5 | |
Posiciones -> 9 8 7 6 5 4 3 2 | |
DUI -> 0 0 0 1 6 2 9 7 | |
DV = 5 | |
sum: (9*0) + (8*0) + (7*0) + (6*1) + (5*6) + (4*2) + (3*9) + (2*7) = 85 | |
residuo: (85 % 10) = 5 | |
resta: 10 - residuo = 5 |
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.controller('TodoCtrl', function($scope, $http) { | |
$http.get('todos.json') | |
.then(function(res){ | |
$scope.todos = res.data; | |
}); | |
}); |
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', ['ngResource']); | |
app.config(function($locationProvider, $routeProvider) { | |
// $locationProvider.html5Mode(true); | |
$routeProvider | |
.when('/', { templateUrl: 'partials/index', controller: 'ctrl' }) | |
.when('/about', { templateUrl: 'partials/about', controller: 'ctrl' }) | |
.otherwise({redirectTo:'/'}); | |
}); |
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
(defn fib [n] | |
(Math/round (/ (- (Math/pow 1.618034 n) | |
(Math/pow (- 0.618034) n)) | |
(Math/sqrt 5)))) | |
(map fib (range 51)) | |
;; (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524579 5702888 9227467 14930356 24157823 39088179 63246003 102334183 165580188 267914374 433494567 701408948 1134903525 1836312490 2971216044 4807528580 7778744699 12586273401) |
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', []); |
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 myLoader = function(filename, fun) { | |
var head = document.getElementsByTagName('head')[0], | |
script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = filename; | |
if(typeof fun === 'function'){ script.onload = fun; } | |
head.appendChild(script); | |
}; |
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
# Cakefile to document, compile, join and minify CoffeeScript files for | |
# client side apps. Just edit the config object literal. | |
# | |
# -jrmoran | |
fs = require 'fs' | |
{exec, spawn} = require 'child_process' | |
# order of files in `inFiles` is important | |
config = |
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.config(function($locationProvider, $routeProvider) { | |
$locationProvider.html5Mode(true); | |
$routeProvider | |
.when('/', { | |
templateUrl: '/partials/template1.html', // <- relative to base | |
controller: 'ctrl1' | |
}) | |
.when('/tags/:tagId', { |
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
/* | |
* Write a program that prints out the numbers 1 to 100 (inclusive). | |
* If the number is divisible by 3, print Crackle instead of the number. | |
* If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, | |
* print CracklePop | |
* | |
* Jaime Moran | |
*/ | |
var cracklePop = function(i){ | |
var r = ''; |
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 v = d3.select('#viz') | |
.append("svg") | |
.attr("width", 1170) | |
.attr("height", 700 ); | |
var getPointAtAngle = function(center, radius, theta){ | |
console.log(r); | |
theta = 90 + theta; | |
return { |
NewerOlder