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] |
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
// Los árboles utópicos crecen de una forma particular, en dos ciclos: | |
// Cada primavera duplican su tamaño | |
// Cada verano crecen un metro | |
// Si Laura planta un árbol utópico de un metro, al fin del otoño, ¿cuánto medirá de alto después de N ciclos? | |
// Algunos ejemplos: | |
// Si N = 0, su altura será 1 metro (no creció nada) | |
// Si N = 1, su altura será de 2 metros (duplicó su altura en primavera) | |
// Si N = 2, su altura será de 3 metros (creció un metro más en verano) |
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
#!/bin/bash | |
#AUTHOR: AlphanetEX, APACHE2 + MYSQL CONFIGURATION | |
apache_conf="/etc/apache2/sites-available/" | |
#read .env file it works | |
[ ! -f .env ] || export $(grep -v '^#' .env | xargs) | |
if [[ ! -d /u01 ]]; then | |
mkdir /u01 | |
fi |
NewerOlder