- Abrir link de pregunta
- Click en File -> Save Snapshot
- Se recargará la pagina con la misma pregunta, pero con otro link.
- Ese link representará su solución a dicha pregunta, guardalo.
- Repetir escenario para las demás preguntas.
- Al terminar enviar todos los links al correo [email protected]
- Abrir el jsbin http://jsbin.com/gorogayusu/1/edit?html,js,console
- Clonarlo usando el menu File - clone
- Leer las instrucciones y resolver el ejercicio
- Al terminar copiar la url del jsbin clonado y agregar en los comentarios de este gist.
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 a = [{"id": 42, "name": "TALLA", "companyId": 40, "createdAt": "2017-02-13T21:51:15.000Z", "updatedAt": "2017-02-13T21:51:15.000Z", "flagActive": 1}, {"id": 37, "name": "TELA", "companyId": 40, "createdAt": "2017-02-13T21:23:11.000Z", "updatedAt": "2017-02-13T21:23:11.000Z", "flagActive": 1}, {"id": 38, "name": "TIPO DE PRENDA", "filterable": true}, {"id": 39, "name": "MODELO", "filterable": true}, {"id": 41, "name": "COLOR", "filterable": true}, {"id": 40, "name": "MANGA", "filterable": true}] | |
function transformArrayToObject(array) { | |
var b = {}; | |
array.forEach((item, index) => { | |
var keys = Object.keys(item); | |
b[item.id] = {}; | |
keys.forEach((key) => { | |
b[item.id][key] = item[key]; | |
}); |
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 objectToQuery(obj, notInclude = []){ | |
const keys = Object.keys(obj); | |
const keysToConvert = keys.filter((kf) => { | |
return notInclude.indexOf(kf) === -1; | |
}) | |
const qs = keysToConvert.map((key) => { | |
const currentKey = obj[key]; | |
return `&${key}=${currentKey}`; | |
}); | |
return qs.join(''); |
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
<template> | |
<div> | |
About Page {{message}} | |
</div> | |
</template> | |
<script> | |
function metaInfo() { | |
return { |
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
<template> | |
<div> | |
About Page {{message}} | |
</div> | |
</template> | |
<script> | |
function metaInfo() { | |
return { |
- Consumir servicio y listar los usuarios en una tabla
// https://jsonplaceholder.typicode.com/users
- Agregar un textbox que permita realizar una busqueda de los usuarios.
Debe consumir el siguiente servicio // https://jsonplaceholder.typicode.com/users?username={valor-del-input} Solo se debe consumir el servicio cuando se escribe 3 caracteres o mas
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
{ | |
"address_components": [ | |
{ | |
"long_name": "Avenida Arequipa", | |
"short_name": "Av. Arequipa", | |
"types": [ | |
"route" | |
] | |
}, | |
{ |
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 styleDarkMode() { | |
var filterStyle = document.createElement('style'); | |
filterStyle.innerHTML = | |
':root{filter: invert(100%);}img, video { filter: invert(100%);}.vjs-fullscreen {background-color: white !important;filter: invert(1) !important;}'; | |
document.head.appendChild(filterStyle); | |
} | |
// run styleDarkMode() in a page that has the dark mode (using the developer tools). | |
// you can see a preview of how it looks here https://user-images.githubusercontent.com/461124/113607722-2ab34680-960f-11eb-80ff-70599a7081bc.png | |
// awful, right? But no more eye strain (at least for me) |