Skip to content

Instantly share code, notes, and snippets.

View hrbullon's full-sized avatar
🎯
Focusing

Haderson hrbullon

🎯
Focusing
  • Venezuela, Maracaibo
View GitHub Profile
@hrbullon
hrbullon / utilies.js
Last active September 23, 2019 13:46
Utils Javascript Functions
/**
* This functions is for ajax error handling
* Now it can captch these erroCode 0,400,403,404 y 500, so you can add more an more status code
*/
$(function() {
//Setup ajax error handling
$.ajaxSetup({
data: {
'csrf_tkn': $("[name='csrf_tkn']").val()//If you have a token that you need to send in each one requests
},
@evilnapsis
evilnapsis / desviacion_es.php
Created December 28, 2017 08:33
Calcular varianza y desviación estándar en PHP
<?php
/**
* Calcular desviacion Estandar
* @author evilnapsis
**/
$nums = array(1,4,7,2,6);
$sum=0;
for($i=0;$i<count($nums);$i++){
$sum+=$nums[$i];