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
!function (w, d, t) {w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++ )ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=i+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)}; ttq.load('CJMB7ERC77U2JVNG7RF0');ttq.page();}(window, document, 'ttq'); |
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
// Del exterior hacia el centro | |
// IN: funciones:array, Datos: array | object | |
// OUT: Dato procesado | |
const compose = (...fns) => (xs) => fns.reduceRight((y, f) => f(y), xs); | |
// Del centro hacia el exterior | |
// IN: funciones:array, Datos: array | object | |
// OUT: Dato procesado | |
const pipe = (...fns) => (xs) => fns.reduce((y, f) => f(y), xs); |
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
// Esta formula aumentará los impuestos sobre tu monto base, si planteas un monto de 10.000 soles por un proyecto y luego le aumentas lo impuestos te devolverá: 12195.121951219511 | |
// El monto retornado es el monto que deseas ganar sin perder en impuestos | |
// Recuerda que puedes ajustar cuantos puntos flotantes quieres con el tercer parámetro | |
const calcularMontoConImpuestos = (montoBase = 0, porcentajeImpuestos = 0, puntosFlotantesPermitidos) => { | |
const divisor = 1 - (porcentajeImpuestos / 100); | |
const montoTotal = montoBase / divisor; | |
return !!puntosFlotantesPermitidos | |
? parseFloat(montoTotal.toFixed(puntosFlotantesPermitidos)) |
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
const sortIterable = prop => xs => { | |
let lon = xs.length; | |
let arr = [...xs]; | |
while(lon > 1) { | |
lon--; | |
for(let o = 0; o < lon; o++) { | |
if(arr[o][prop] > arr[o+1][prop]) { | |
let temp = arr[o]; | |
arr[o] = arr[o+1]; |
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
/* | |
Dado un string formado por (), [], {} escribe un programa que indique | |
si los pares correspondientes son correctos. | |
Entrada: [()] {} {[()()]()} Correcto | |
Entrada: [(]) Incorrecto | |
*/ | |
function checkEvenPairs(stringToEvaluate) { |
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
<?php | |
/** | |
* Created by PhpStorm. | |
* User: elporfirio | |
* Date: 2019-02-26 | |
* Time: 23:13 | |
*/ | |
define('EMAIL_PASSWORD', 'secretpassword'); |