This file contains hidden or 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
| function Jugador(nombre, arma){ | |
| this.nombre = nombre; | |
| this.puntaje = 0; | |
| this.arma = arma; | |
| } | |
| Jugador.prototype.setArma = function() { | |
| let armas = ["Piedra","Papel","Tijera"]; | |
| let aleatorio = Math.floor(Math.random() * (armas.length )); | |
| this.arma = armas[aleatorio]; |
This file contains hidden or 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
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or 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
| * { | |
| /*border: 1px solid red !important;*/ | |
| font-family: 'Lato', sans-serif; | |
| } | |
| * { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| -ms-box-sizing: border-box; | |
| box-sizing: border-box; |
This file contains hidden or 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
| public function handle($request, Closure $next) | |
| { | |
| return $next($request) | |
| ->header('Access-Control-Allow-Origin', '*') | |
| ->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS'); | |
| } |
This file contains hidden or 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
| $.validate({modules : 'date, security', lang: 'es'}); | |
| // Add validator | |
| $.formUtils.addValidator({ | |
| name : 'cedula', | |
| validatorFunction : function(value, $el, config, language, $form) { | |
| var patt = new RegExp("^[0-9]+$"); | |
| if( value.length > 7 && value.length < 13 && patt.test(value) ){ | |
| return true; | |
| } else { | |
| return false; |
This file contains hidden or 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 projects = { | |
| "projects": [ | |
| { | |
| "title": "Sandwich Qbano", | |
| "dates": "2011", | |
| "description": "Concurso Música en Altamar", | |
| "images": ["11-img-large.jpg", "11-img-small.jpg"] | |
| }, | |
| { | |
| "title": "Sweet Lemon", |
This file contains hidden or 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
| //When you encapsule a function inside an object that | |
| //function is called as a method whenever you need. Example: | |
| //The object projects | |
| var projects = { | |
| "projects": [{ | |
| "title": "Project 1", | |
| "description": "Lorem ipsum dolor sit amet" | |
| }, | |
| { |
This file contains hidden or 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 clickLocations = []; | |
| function logClicks(x,y) { | |
| clickLocations.push( | |
| { | |
| x: x, | |
| y: y | |
| } | |
| ); | |
| console.log('x location: ' + x + '; y location: ' + y); |
This file contains hidden or 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 work = { | |
| "jobs": [ | |
| { | |
| "employer": "Udacity", | |
| "title": "Course Developer", | |
| "location": "Mountain View, CA", | |
| "dates": "Feb 2014 - Current", | |
| "description": "Who moved my cheese cheesy feet cauliflower cheese. Queso taleggio when the cheese comes out everybody's happy airedale ricotta cheese and wine paneer camembert de normandie. Swiss mozzarella cheese slices feta fromage frais airedale swiss cheesecake. Hard cheese blue castello halloumi parmesan say cheese stinking bishop jarlsberg." | |
| }, | |
| { |
This file contains hidden or 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 name = "AlbERt EINstEiN"; | |
| function nameChanger(oldName) { | |
| var finalName = oldName; | |
| // Your code goes here! | |
| finalName = finalName.toLowerCase(); | |
| finalName = finalName.split(" "); | |
| finalName = finalName[0].charAt(0).toUpperCase() + finalName[0].slice(1) + " " + finalName[1].toUpperCase(); | |