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
Show hidden characters
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_with_fields": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/base16-ocean.light (SL).tmTheme", | |
"detect_indentation": true, | |
"fade_fold_buttons": false, | |
"folder_exclude_patterns": |
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 | |
function quitaEspacios($texto) | |
{ | |
$partes = explode(' ', $texto); | |
$textoLimpio = ""; | |
foreach ($partes as $parte) { | |
if (strlen($parte) > 0 || $parte != "") { | |
$nombreLimpio .= $parte." "; | |
} | |
} |
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
/** | |
Si le pasamos una cadena como: | |
'index.php?var=17&otravar=12&masvar=33&muchovar=21' | |
nos devuelve una tabla con los valores de las variables | |
*/ | |
DROP PROCEDURE IF EXISTS extractVars; | |
CREATE PROCEDURE extractVars(url VARCHAR(255)) | |
BEGIN | |
DECLARE posicion INT; | |
DECLARE fin INT; |
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 generoPersona($nombre, $provider = 'genderAPI') | |
{ | |
$providers = array( | |
'genderAPI' => array( | |
'url' => 'https://gender-api.com/get?name=', | |
'pais' => '&country=ES' | |
), | |
'genderize' => array( | |
'url' => 'https://api.genderize.io/?name=', | |
'pais' => '&country_id=es' |
OlderNewer