This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @class DecimalFormat | |
* @constructor | |
* @param {String} formatStr | |
* @author Oskan Savli | |
*/ | |
function DecimalFormat(formatStr) | |
{ | |
/** | |
* @fieldOf DecimalFormat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function number_format(amount, decimals) { | |
amount += ''; // por si pasan un numero en vez de un string | |
amount = parseFloat(amount.replace(/[^0-9\.]/g, '')); // elimino cualquier cosa que no sea numero o punto | |
decimals = decimals || 0; // por si la variable no fue fue pasada | |
// si no es un numero o es igual a cero retorno el mismo cero | |
if (isNaN(amount) || amount === 0) | |
return parseFloat(0).toFixed(decimals); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Metodo getDiasHabiles | |
* | |
* Permite devolver un arreglo con los dias habiles | |
* entre el rango de fechas dado excluyendo los | |
* dias feriados dados (Si existen) | |
* | |
* @param string $fechainicio Fecha de inicio en formato Y-m-d | |
* @param string $fechafin Fecha de fin en formato Y-m-d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:{PORT}> | |
ServerName www.yourdomain.com | |
ServerAdmin mail@domain.com | |
DocumentRoot /var/www/yourdir/ | |
<Directory /var/www/yourdir> | |
Options Indexes FollowSymLinks | |
AllowOverride all | |
Order allow,deny |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Banco: | |
<select name="banco"> | |
<option value=""></option> | |
<option value="0156">100%BANCO</option> | |
<option value="0196">ABN AMRO BANK</option> | |
<option value="0172">BANCAMIGA BANCO MICROFINANCIERO, C.A.</option> | |
<option value="0171">BANCO ACTIVO BANCO COMERCIAL, C.A.</option> | |
<option value="0166">BANCO AGRICOLA</option> | |
<option value="0175">BANCO BICENTENARIO</option> | |
<option value="0128">BANCO CARONI, C.A. BANCO UNIVERSAL</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* secsToTime | |
* Given the number of seconds it returns the value in minutes and seconds | |
* (i.e. 62 seconds returns 1:02) | |
*/ | |
function secsToTime(secs) { | |
return (secs / 60).toFixed() +':'+ ('0'+secs % 60).slice(-2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$email = array( | |
'fromName' => 'Adam', | |
'fromEmail' => 'adam@example.com', | |
'toName' => 'Bob', | |
'toEmail' => 'bob@example.com', | |
//'cc' => 'charles@example.com', | |
'subject' => 'Website Change Request', | |
'body' => 'Hello,<br>Bye', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('GEOIP_CACHE_TIME', 5184000); // 5184000 = 60 days | |
/** | |
* Returns the country of an IP address | |
* If IP is cached and less than 2 months old, otherwhise requests it to geoplugin.com API | |
* | |
* @string $ip The IP address | |
* @bool $justcountry If you want the full array or just the country |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************************/ | |
// NumeroALetras | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2015 Luis Alfredo Chee | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Clase para imprimir variables PHP en la consola del navegador. | |
* | |
* Esta clase ha sido creada a partir de esta otra: | |
* http://www.codeforest.net/debugging-php-in-browsers-javascript-console | |
*/ | |
class Console | |
{ | |
/** |
OlderNewer