Skip to content

Instantly share code, notes, and snippets.

View Lvcios's full-sized avatar
💭
La vida es una tombola

Lucio Flores Lvcios

💭
La vida es una tombola
View GitHub Profile
using System.Diagnostics;
using System.Net;
namespace Crehana.DotNetAsincrono
{
internal class Program
{
//variables para almacenar html de las páginas a descargar
static string htmlGoogle = new string("");
static string htmlCrehana = new string("");
function BubbleSort(arrayToSort){
const len = arrayToSort.length;
for(let i = 0; i<len; i++){
for(let j = 0;j< len; j++){
if(arrayToSort[j] > arrayToSort[j+1]){
let tempGreaterValue = arrayToSort[j];
let tempMinorValue = arrayToSort[j + 1];
arrayToSort[j] = tempMinorValue;
arrayToSort[j + 1] = tempGreaterValue;
@Lvcios
Lvcios / sumArrayRecursive.js
Created April 5, 2022 01:58
Simple example of array sum using recursion
function sumArrayRecursive(arr){
if(arr.length == 1) return arr[0];
else if(arr.length == 0) return 0;
else{
return arr[arr.length - 1] + sumArrayRecursive(arr.slice(0, arr.length - 1));
}
}
using System;
namespace DataStructures.CustomArray
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello Custom Array!");
var myCustomArray = new CustomArray(100);
using System;
namespace DataStructures.HashTable
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
int len = 100;
@Lvcios
Lvcios / Home.js
Created April 16, 2021 21:31
Upload and retrieve an excel file with react and netcore
import React from 'react';
class Home extends React.Component {
constructor(props) {
super(props)
this.state = {
file: null
}
this.sendFile = this.sendFile.bind(this)
import React from 'react';
class Home extends React.Component {
constructor(props) {
super(props)
this.state = {
file: null
}
this.sendFile = this.sendFile.bind(this)
CREATE TABLE IF NOT EXISTS `affiliates` (
`affiliate_id` int(6) unsigned NOT NULL,
`parent_affiliate_id` int(3) unsigned NOT NULL,
PRIMARY KEY (`affiliate_id`)
) DEFAULT CHARSET=utf8;
INSERT INTO `affiliates` (`affiliate_id`, `parent_affiliate_id`) VALUES
('1', '1'),
('2', '1'),
('3', '2'),
<?php
$location = "http://localhost/soap-php/index.php?wsdl";
$request = "<soapenv:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:mis=\"miSuperSoap2020.alv\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">
<soapenv:Header/>
<soapenv:Body>
<mis:guardarOrdenDeCompra soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">
<name xsi:type=\"mis:ordenDeCompra\">
<!--You may enter the following 5 items in any order-->
<NumeroOrden xsi:type=\"xsd:string\">1000</NumeroOrden>
static void Main(string[] args)
{
var config = new TemplateServiceConfiguration();
config.CachingProvider = new DefaultCachingProvider(t => { });
config.DisableTempFileLocking = true;
var service = RazorEngineService.Create(config);
string razorTemplate = File.ReadAllText("Template.cshtml");
string templateName = "helloWorld";
bool isCached = service.IsTemplateCached(templateName, typeof(object));