// jQuery
$(document).ready(function() {
// code
})
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
$(document).ready(function(){ | |
/** | |
* Determinar si una imagen existe por la propiedad naturalHeight | |
* la cual sera diferente de 0 si esta existe | |
**/ | |
$('img').each(function(){ | |
if($(this)[0].naturalHeight == 0){ | |
//Reemplazar el src con la imagen que queremos presentar | |
$(this).attr('src','images/image_not_found.jpg'); | |
} |
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
<input type="text" id="search_input" placeholder="Search..." onkeyup="search_on_table()"> | |
function search_on_table() { | |
var input, filter, table, tr, td, cell, i, j; | |
input = document.getElementById("search_input"); | |
filter = input.value.toUpperCase(); | |
table = document.getElementById("table"); | |
tr = table.getElementsByTagName("tr"); | |
for (i = 1; i < tr.length; i++) { | |
// Hide the row initially. |
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
$obj_merged = (object) array_merge((array) $obj1, (array) $obj2); |
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
//La documentacion oficial no indica uso | |
const params = new URLSearchParams(); | |
params.append('name', name); | |
params.append('foo', bar); | |
params.append('description', description); | |
axios({ | |
method: 'post', | |
url: 'http://localhost/controller/action', |
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
<img class="slide_image" src="some_url_img.jpg" alt="imagen login1"> | |
<img class="slide_image" src="some_url_img.jpg" alt="imagen login2"> |
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
.img_container{ | |
overflow: hidden; | |
max-height: 300px; | |
border-radius: 4px; | |
-webkit-box-shadow: 2px 0px 5px -2px rgba(128, 128, 128, 0.76); | |
-moz-box-shadow: 2px 0px 5px -2px rgba(128, 128, 128, 0.76); | |
box-shadow: 2px 0px 5px -2px rgba(128, 128, 128, 0.76); | |
} | |
.mySlides {display: none;} |
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 (num) { | |
if (!num || num == 'NaN') return '-'; | |
if (num == 'Infinity') return '∞'; | |
num = num.toString().replace(/\$|\,/g, ''); | |
if (isNaN(num)) | |
num = "0"; | |
sign = (num == (num = Math.abs(num))); | |
num = Math.floor(num * 100 + 0.50000000001); | |
cents = num % 100; | |
num = Math.floor(num / 100).toString(); |
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
/** | |
* Reotorna fecha en formato yyyy-mm-dd hh:ii:ss | |
**/ | |
function get_date_time(){ | |
let date = new Date().toISOString().slice(0, 10); | |
let time = new Date(); | |
let hours = time.getHours(); | |
let minutes = time.getMinutes(); | |
let seconds = time.getSeconds(); | |
return date + ' ' + hours + ':' + minutes + ':' + seconds; |
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 creada con la intencion de realizar pruebas de conexion | |
* a base de datos Postgres | |
* | |
* User: Albert Eduardo Hidalgo Taveras | |
* Date: 16/1/2019 | |
* Time: 11:16 AM | |
*/ |
OlderNewer