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 queremos en php mostrar un texto como error: | |
``` | |
return "<div class='advertencia'>" .__("Identificador de herramienta incorrecto") . "</div>"; | |
``` | |
Si es una función que se llama por OPS, por js, podemos retornar | |
``` | |
$this->quid->error("lo que sea"); | |
``` |
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
const textoFormateado = texto.replace(/<br\s*\/?>/gi, '\u000A'); |
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
ucfirst(strtolower($parametros["modo"])) | |
por ejemplo: | |
$clases []= "modo" . ucfirst(strtolower($parametros["modo"])); |
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
Se hace un array con clases, y luego se pone esto: | |
$parametros["class"] = implode(" ", $clases); |
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
cordova create puertaJuicio com.ionicframework.juciio330640 --display-name="Puerta del Juicio Tudela" | |
cordova platform add android | |
Copiar proyectos en www | |
cordova prepare android | |
cordova build android (esto genera un debug) | |
(ponemos la version queramos) | |
cordova config set version 10.12.2 | |
cordova build android --release (build release sin firmar, genera un aab) | |
Gestionar las imágenes e iconos |
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
# Hacer que una función retorne un json público | |
Si estamos haciendo una API, puede ser que queramos retornar un JSON. Para ello haremos una función normal, en QUID, solo tendremos en cuenta estas cosas: | |
* **Agregar la función al "Espacio Exportación"** (config_app.php en espacios/exportacion) | |
* Establecer el header del **Content-type** de la respuesta JSON: | |
```php | |
header('Content-Type: application/json'); | |
``` | |
* Tener en cuenta que la función quizás puede retornar **códigos de error**, esto se gestiona con cabeceras (php4): | |
```php |
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
# Caché | |
La caché sirve para evitar consultas innecesarias a la BD, que seguramente no cambian frecuentemente. Se le asigna una key, y se comprueba si existe el objeto. Si no existe se calcula y se guarda, poniéndole una caducidad **en segundos** | |
```php | |
$keyCache='credencialesAlumno-'.$id; | |
$cacheCredenciales = $this->quid->db->getCache( $keyCache ); | |
if($cacheCredenciales){ | |
//operación costosa | |
}else{ | |
$this->quid->db->setCache($keyCache, "lo que quieras guardar aquí, puede ser un array", 10000); |
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
* https://extension.uned.es/cursosverano&tema=cv | |
* https://extension.uned.es/cursosverano | |
* https://extension.uned.es/cursosverano_patrocinadores&tema=cv | |
* https://extension.uned.es/cursosverano_patrocinadores | |
* https://extension.uned.es/cursosverano_areas&tema=cv | |
* https://extension.uned.es/cursosverano_areas | |
* https://extension.uned.es/convalidacion_cv&tema=cv | |
* https://extension.uned.es/convalidacion_cv | |
* https://extension.uned.es/cursosverano_ministerio&tema=cv | |
* https://extension.uned.es/cursosverano_ministerio |
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
$salida.=console_log($listadoDeModelos); | |
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
/* colores uned ajustados (intensificados y ajustados manualmente) */ | |
--color-uned: #00533e; | |
--color-uned-2: #479b7f; | |
--color-uned-3: #9dd1bf; | |
--color-uned-4: #daf1e9; | |
--color-apple:#6fae35; | |
--color-apple-2:#a0d061; | |
--color-apple-3:#cae9a1; | |
--color-apple-4:#e4f2ce; | |
--color-blueberry: #556ac0; |
NewerOlder