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 validate (ardBase, ardUser) { | |
let counter=0; | |
let valCount=0; | |
let lengs = { | |
lengBase :ardBase.length, | |
lengUser : ardUser.length | |
}; | |
while(lengs.lengBase > counter){ | |
// console.log(`array user : ${ardUser[counter]} array Base: ${ardBase[counter]}`); |
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 { Router } = require('express'); | |
const boom = require("@hapi/boom"); | |
const userService = require('../../../services/userService'); | |
const inscriptionService = require('../../../services/inscriptionsService'); | |
const insValService = require('../../../services/insValidationService'); | |
function validate (ardBase, ardUser) { | |
let counter=0; | |
let valCount=0; |
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
SELECT CONCAT(usr.name,' ', usr.lastname) AS usuario | |
FROM users usr WHERE usr.user_id IN (SELECT usr.user_id from users usr | |
INNER JOIN user_types ON user_types.user_type_id = usr.user_id); | |
SELECT | |
CONCAT(usr.name,' ', usr.lastname) AS nombre, | |
courses.curseTitle, | |
cert.token_cert AS token | |
FROM certifications cert |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct arbol | |
{ | |
int dato; | |
struct arbol *izq; | |
struct arbol *der; | |
}treenode; |
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
#include <stdio.h> | |
/* ingrese numeros mayores a 0 y vamos a calular el | |
- promedio de los numeros impares | |
- la cantidad de numeros mayoyes que a 24 y pares | |
- la sumatoria de los numeros primos | |
*/ | |
void cargar(int vec[], int dim){ | |
int cont=0, num=0, contPar=0, contImp=0, itemb=0; |
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
"use strict"; | |
//aplciando closure | |
function makeMoney(){ | |
let gcant=0 | |
return { | |
//this apuntara a lo que este dentro de este objeto |
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
"use strict"; | |
global.alphanet = `alphanet`; | |
//aplciando closure | |
function makeMoney(){ | |
let gcant=0 | |
return { | |
//this apuntara a lo que este dentro de este objeto |
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
lastProduct: (req, res) => { | |
console.log("ejecutando request"); | |
db.Product.findAll({ | |
include : ["Images"], | |
order: [[ ,'id' , 'DESC']], | |
}) | |
.then(data => { | |
let object = data[0].dataValues; | |
let producto = { |
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
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi |
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
// Necesitamos una función masMenos que reciba un array y devuelva otro con los siguientes tres números: | |
// En la primera posición, la fracción de números que son positivos | |
// En la segunda posición, la fracción de números que son cero | |
// En la última posición, la fracción de números que son negativos | |
// Por ejemplo, masMenos([1, 2, 0, -1]) debería devolver [0.5, 0.25, 0.25], | |
// dado que hay 50% de positivos, 25% de ceros, y 25% de negativos. | |
/* | |
La función masMenos([0,0,0,0]) debe retornar [0,1,0] |
NewerOlder