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
async function scrollDown() { | |
const wrapper = document.querySelector("#search-page-list-container"); | |
await new Promise((resolve, reject) => { | |
var totalHeight = 0; | |
var distance = 600; | |
var timer = setInterval(async () => { | |
var scrollHeightBefore = wrapper.scrollHeight; | |
wrapper.scrollBy(0, distance); | |
totalHeight += distance; |
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
/** | |
* Angular JS directive for autorezising text inside an element | |
* Usage: | |
* <input type="text" ng-model="text"> | |
* <p style="font-size: 30px; border: red 1px solid; width: 200px; height: 20px;" autofit="text"><span>{{text}}</span></p> | |
*/ | |
app.directive('autofit', function(){ | |
return function(scope, element, attrs){ |
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 | |
/* | |
Spanish information validator | |
*/ | |
class Validator { | |
static function validarDni($cif) { | |
//Copyright ©2005-2008 David Vidal Serra. Bajo licencia GNU GPL. | |
//Este software viene SIN NINGUN TIPO DE GARANTIA; para saber mas detalles | |
//puede consultar la licencia en http://www.gnu.org/licenses/gpl.txt(1) |
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 | |
/** | |
* File: SimpleImage.php | |
* Author: Simon Jarvis | |
* Modified by: Miguel Fermín | |
* Based in: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 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 | |
/** | |
* @name Database class | |
* @author Miguel Fermín | |
* @copyright 2013 | |
* @license MIT | |
* @license http://opensource.org/licenses/MIT | |
*/ | |
class DataBase { | |