Skip to content

Instantly share code, notes, and snippets.

View juniorUsca's full-sized avatar

Junior Usca juniorUsca

View GitHub Profile
import React from 'react'
import ReactDOM from 'react-dom'
import { useState } from 'react'
const App = () => {
const [ contador, setContador ] = useState({
izquierda: 0,
derecha: 0,
})
@juniorUsca
juniorUsca / busqueda_binaria.py
Created February 3, 2021 22:30
busqueda_binaria
datos = [100,1,2,3,4,10,20,45,67,32]
buscar = 32
datos.sort()
print(datos)
inicio = 0
fin = len(datos) - 1
encontrado = False
@juniorUsca
juniorUsca / Screen Shot 2020-07-15 at 00.39.45.png
Last active July 15, 2020 05:44
Circuito comunicando 2 arduinos usando wire
Screen Shot 2020-07-15 at 00.39.45.png
@juniorUsca
juniorUsca / index.php
Last active March 16, 2020 21:49
php memory allocation
<?php
class MemoryManager {
private $_buffer;
private $_allocation;
private $_numBytes;
private $_currentNumBytes;
function __construct(&$buffer, $numBytes) {
$buffer = array_fill(0, $numBytes, NULL);
@juniorUsca
juniorUsca / fetch-rico.js
Created July 4, 2019 21:03
Fetch evaluaciones
const baseUrl = gcUrlBase.slice(0, -1)
const options = {
// descomentar para POST
// method: 'POST',
// body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json',
AppRRHH: Cookies.get('AppRRHH'),
},
}
@juniorUsca
juniorUsca / html5-video-streamer.js
Last active July 3, 2019 21:07 — forked from paolorossi/html5-video-streamer.js
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
* https://stackoverflow.com/questions/24976123/streaming-a-video-file-to-an-html5-video-player-with-node-js-so-that-the-video-c
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
USE [RRHH]
DECLARE @tnEmpresa TINYINT = 1;
DECLARE @tnOrganizacion SMALLINT = 16;
DECLARE @tnNivelTrabajador TINYINT = 1;
DECLARE @tnNumero INT = 1;
DECLARE @ltbAsistencia TABLE
(
@juniorUsca
juniorUsca / outsider.js
Created February 14, 2019 07:43 — forked from fazlurr/outsider.js
React Detect Click Outside Component - https://stackoverflow.com/a/42234988
/**
* Component that alerts if you click outside of it
*/
class OutsideAlerter extends Component {
constructor(props) {
super(props);
this.setWrapperRef = this.setWrapperRef.bind(this);
this.handleClickOutside = this.handleClickOutside.bind(this);
}
https://facturacionelectronica.us/facturacion/controller/ws_consulta_rucdni_v2.php?usuario=10733298214&password=mypassword&documento=DNI&nro_documento=47077319
@juniorUsca
juniorUsca / trial.md
Created January 16, 2019 16:40 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare