<input numeric numericType="number" type="text">
<input numeric numericType="decimal" type="text">
var arr = ['Sacha', 'Og', 'Haru']; | |
arr[Symbol.iterator] = function *() { | |
var i = this.length - 1; | |
while (i >= 0) { | |
yield this[i]; | |
i--; | |
} | |
} | |
for (var value of arr) { |
"use strict"; | |
/** | |
* Hypertext Transfer Protocol (HTTP) response status codes. | |
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} | |
*/ | |
enum HttpStatusCode { | |
/** | |
* The server has received the request headers and the client should proceed to send the request body |
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
var talk = talky; | |
var cat = { | |
speak: talk, | |
sound: 'miau' | |
} | |
var dog = { | |
speak: cat.speak, | |
sound: 'wof' | |
} | |
function talky() { |
// Uso de Let y Const | |
// var nombre = "César Tapia"; | |
// var edad = 32; | |
// var PERSONAJE = { | |
// nombre: nombre, | |
// edad: edad | |
// }; | |
// Resolución 1: | |
/** envolvi esta resolución para que no cause conflictos con la Resolución 2 */ |
/** | |
* El siguiente ejercicio es crear una función que implemente la siguiente lógica. | |
* const a = getIn(obj, path, defaultValue) | |
* Ejemplo: | |
* var object = { 'a': [{ 'b': { 'c': 3 } }] }; | |
* getIn(object, 'a.b.c', 'default'); | |
* // => 'default' | |
* var object2 = {a: { b: { c: 3 } } }; | |
* getIn(object2, 'a.b.c', 5); | |
* // => 3 |
#! /usr/bin/python | |
""" | |
Description: Will run an lpstat -p and send an email to jtrutwin notifying him of a disabled printer, if there is one, so that he can take action. | |
TODO: | |
1) Add parameter to override the recipient of the email | |
2) Add functionality for only sending email when a printer hasn't been found to be disabled today - ie. email sent at 5am shouldn't be sent again if only that same printer is disabled as of 8am, should only send another email if another printer has been disabled or if the original printer has been disabled, enabled and re-disabled. | |
""" | |
import commands |