Skip to content

Instantly share code, notes, and snippets.

View HugoRoca's full-sized avatar
🏠
Working from home

Hugo Roca HugoRoca

🏠
Working from home
View GitHub Profile
using System;
namespace week06
{
internal class Program
{
static void Main(string[] args)
{
example1();
}
using System;
namespace Fundamentos
{
internal class Program
{
static void Main(string[] args)
{
const string backText = "Para volver al menú principal, presione cualquier tecla.";
const string printScreen = "**** BIENVENIDOS A LA CALCULATOR ****\n" +
Console.WriteLine("\n\nExercise 4:");
Console.Write("Ingrese el precio por unidad de cada producto: ");
double productPrice = double.Parse(Console.ReadLine());
Console.Write("Ingrese la cantidad adquirida por el cliente: ");
int quantity = Int32.Parse(Console.ReadLine());
double totalPay04 = productPrice * quantity;
if (quantity > 20) totalPay04 -= (totalPay04 * 0.1);
if (anios <= 0) Console.WriteLine("Los datos son incorrectos.");
else
{
if (anios <= 2)
{
if (rol == "A")
{
salary = 2000;
}
else if (rol == "C")
Algoritmo Excercise
Definir messages, serviceNames, quantityServices, customer, brandVehicle, modelVehicle, option, concat, name Como Caracter;
Definir i, j Como Entero;
Definir serviceTime, time, timeTotal Como Real;
Definir allDataIsOk, helper Como Logico;
Dimension serviceNames[6];
serviceNames[1] = "Revision 1000 km";
serviceNames[2] = "Cambio Aceite";
serviceNames[3] = "Revision Frenos";
@HugoRoca
HugoRoca / Vistony_recluter.psc
Last active May 6, 2022 01:56
System for register postulant for a new process
Algoritmo VISTONY_RECLUTER
// Start: Variables for simulation load of DB
Definir userLengthTable, roleLengthTable, postulantLengthTable, processLengthTable Como Entero;
Definir userTable, roleTable, postulantTable, processTable Como Caracter;
// Normal definitions
Definir username, password, role, optionMenu, screenName Como Caracter;
Definir existsUser Como Logico;
Definir postulantId, postulantNames, postulantDocumentType, postulantDocument, postulantPhone, postulantEmail Como Caracter;
Definir screenLogout, screenRegisterPostulant, screenSearch, screenNewIncorporationProcess, screenSearchProcess Como Caracter;
Algoritmo Vistony
Definir username, password Como Caracter
Definir longitudDocument Como Entero
Definir postulantNames, postulantBithDate, postulantDocumentType, postulantDocumentNumber, postulantPhoneNumber, postulantAgeExperience, postulantSalary, postulantVaccine, postulantCV Como Caracter
Escribir " *** BIENVENIDO A EMPLEO_VISTONY *** "
Escribir "Ingrese su usuario:"
Leer username
@HugoRoca
HugoRoca / git-recover-branch.md
Created July 1, 2021 17:53 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
select * from ['material-PA$']
update ['material-PA$'] set Categoría = 'Maquillaje' where Categoría = 'MAQUILLAJE'
update ['material-PA$'] set Categoría = 'Fragancias' where Categoría = 'FRAGANCIAS'
update ['material-PA$'] set Categoría = 'Tratamiento Facial' where Categoría = 'TRATAMIENTO FACIAL'
update ['material-PA$'] set Categoría = 'Cuidado Personal' where Categoría = 'CUIDADO PERSONAL'
-- que todos tengan la extención
update ['material-PA$'] set Miniatura = 'Portada Antibacterial(1).jpg' where Miniatura = 'Portada Antibacterial(1)'
@HugoRoca
HugoRoca / aggregation_lookup.md
Created May 18, 2020 01:16 — forked from bertrandmartel/aggregation_lookup.md
MongoDB $lookup aggregation example

MongoDB $lookup aggregation

SO link

db.votes.aggregate([{
    $lookup: {
        from: "users",
        localField: "createdBy",
        foreignField: "_id",