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
| 'use strict'; | |
| var fs = require('fs'); | |
| var byline = require('byline'); | |
| var progress = require('progress'); | |
| var stream = byline(fs.createReadStream('challenge_2_input.txt', { encoding: 'utf8' })); | |
| var total = 0; | |
| var count = 0; |
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
| import java.util.*; | |
| import java.io.BufferedReader; | |
| // Clase Carta, definida para el ejercicio | |
| public class Carta { | |
| // Atributos | |
| String pregunta; | |
| String respuesta; | |
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
| { | |
| init: function(elevators, floors) { | |
| var reqFloor = 0, dir = ""; | |
| floors.forEach(function(floor){ | |
| floor.on("up_button_pressed", function(){ | |
| dir = "up"; | |
| reqFloor = floor.floorNum(); | |
| }); | |
| floor.on("down_button_pressed", function(){ | |
| dir = "down"; |
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
| app.directive('ngEnter', function() { | |
| return function(scope, element, attrs) { | |
| element.bind("keydown keypress", function(event) { | |
| if(event.which === 13) { | |
| scope.$apply(function(){ | |
| scope.$eval(attrs.ngEnter); | |
| }); | |
| event.preventDefault(); | |
| } | |
| }); |
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
| token (just in case): 7d4a2134e9dd938602324c86c6136ed116fcad8f |
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
| <div class="input-group"> | |
| <input type="text" class="form-control" | |
| ng-model="search.texto" | |
| ng-blur="search.buscar($event)" | |
| ng-keyup="$event.keyCode === 13 ? search.buscar($event) : null" | |
| placeholder="NIF, nombre..." suma-validar-cadena="mayuscula"> | |
| <span class="input-group-btn"> | |
| <button class="btn btn-primary" type="button" | |
| ng-click="search.buscar($event)" | |
| ng-disabled="!search.texto"> |
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
| # Your snippets | |
| ".js": | |
| "RunFacade": | |
| prefix: "rf" | |
| body: "function $1() {\n | |
| \tvar req = {\n | |
| \t\t'pe_entorno': helper.util.getEntorno(),\n | |
| 'pe_codusuario': helper.util.getUserConex(),\n | |
| \t\t'pe_codaplicacion': helper.util.getCodAplicacion()\n |
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
| // las funciones con await deben de tener el prefijo async | |
| async function main () { | |
| try { | |
| const result = await pedirPermisos(); | |
| // dependemos del servicio anterior para realizar el siguiente | |
| if (result) { | |
| const geolocation = await llamarAPIGoogleMaps(); | |
| console.log(geolocation); |
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
| import { Component, OnInit } from '@angular/core'; | |
| import { Painter } from './painter'; | |
| import { PainterDetailComponent } from './painter-detail.component'; | |
| import { PainterService } from './painter.service'; | |
| @Component({ | |
| directives: [PainterDetailComponent], | |
| providers: [PainterService], | |
| selector: 'my-app', |
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
| import { bootstrap } from '@angular/platform-browser-dynamic'; | |
| import { AppComponent } from './app.component'; | |
| bootstrap(AppComponent); |
OlderNewer