Skip to content

Instantly share code, notes, and snippets.

View brayancruces's full-sized avatar
🎯
Focusing

Brayan Cruces brayancruces

🎯
Focusing
View GitHub Profile
@brayancruces
brayancruces / PD09
Last active June 15, 2021 20:06
PD09
/*
Transact - SQL:
DDL: Data Definition Language
---> Define Objetos sobre la BD
Crear: CREATE
Modificar: ALTER
Eliminar: DROP
DML: Data Manupulation Language
/* Listar el importe neto vendido por cliente cuya region de envio es NM , mostrar solo aquellos clientes con importe neto vendido mayor a 100,000
Mostar id, nombre , ciudad importe ordenelo por importe vendido */
SELECT C.CustomerID , C.CompanyName , C.City , MONTO_VENTA=CONVERT(money,SUM((od.Quantity*od.UnitPrice*(1-od.Discount))))
FROM Region R inner join Territories T on R.RegionID=T.RegionID
join EmployeeTerritories ET on T.TerritoryID=ET.TerritoryID
join Employees E on E.EmployeeID=ET.EmployeeID
join Orders O on O.EmployeeID=E.EmployeeID
join Customers C on C.CustomerID=O.CustomerID
@brayancruces
brayancruces / README.md
Created June 20, 2017 19:39 — forked from hilios/README.md
ngPageTitle - AngularJS page title service

$pageTitle

Allows to control the page title from the AngularJS route system, controllers or any other component through an injectable service.

ngPageTitle - Page title service (run tests)

To get started add the module to your app and configure the page title provider:

// Header
template <class T, class P, class C> // P para funcion procesar y C para funcion comparar
class ArbolAVL {
struct Nodo {
T elem; // payload
Nodo* izq;
Nodo* der;
int h; // altura: numero de ramas desde el nodo hasta la hoja más lejana
package testeo;
public class Abaco {
double sumar(double a, double b)
{
return a +b;
}
// restar
#include<iostream>
#include<math.h>
#include<fstream>
using namespace std;
struct Tupla
{
int X;
int Y;
@brayancruces
brayancruces / sort_cplusplus.cpp
Created November 4, 2016 11:37
Algorithms Sorts in C++
/* Some Sorts.. */
void bubbleSort(int a[],int n){
for(int i=0;i<n;i++){
for(int j=0;j<n-i-1;j++){
if(a[j]>a[j+1]){
int temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
/* From : https://ccodigo.wordpress.com/tag/recursividad/ */
// Algunas recursividades conocidas
int MCD(int x, int y)
{
if(y==0)
return x;
else
return MCD(y, x%y);
/*
04/11/2016
Ejercicio 1
Hoja de ejercicios
To-do:
Recursividad [Completa]
Lambda [Incompleto]
*/
/*
04/11/2016
Ejercicio 1
Hoja de ejercicios
To-do:
Guardar archivo [Incompleto]
*/