This file contains hidden or 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
define('summernote/settings', function () { | |
var settings = { | |
// version | |
version: '@VERSION', | |
/** | |
* options | |
*/ | |
options: { | |
width: null, // set editor width |
This file contains hidden or 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
//SLEECIONA TODOS LOS ELEMENTOS MENOS EL ULTIMOS | |
$("div.elem:not(:last)").hide(); | |
function formatTable(cnf) { | |
/* | |
{ | |
debug: true, //debugging options switch | |
element: '.table_rols_modules', //object en DOM el cual será datatable | |
empty_table: 'NO HAY DATOS', |
This file contains hidden or 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
/*VUELVE CUALQUIER IMAGEN CUADRADA*/ | |
.NO_wrapped_picture { | |
object-fit: cover; | |
width: 128PX; | |
height: 128px; | |
} | |
//Imprimir imagenes a color y backgrounds | |
@media print { |
This file contains hidden or 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
Password Strength | |
[A-Z].*[A-Z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8}$ | |
Hexadecimal Color | |
\#([a-fA-F]|[0-9]){3, 6} | |
Validate E-mail Address | |
/[A-Z0-9._%+-]+@[A-Z0-9-]+.+.[A-Z]{2,4}/igm | |
This file contains hidden or 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
-- GET THE MAX ID ASSIGNABLE POSSIBLE IN A TABLE | |
SELECT max(id) AS id FROM :TABLE; | |
-- DYNAMIC QUERIES | |
SELECT * FROM ( | |
SELECT * FROM students S | |
JOIN cursos ON s.cursoId = c.cursoId |
This file contains hidden or 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
// Split the string into individual words | |
$words = explode(' ', $string); | |
// Initialize a counter | |
$tokens = 0; | |
// Iterate over the words | |
foreach ($words as $word) { | |
// Increment the counter by the ceil of the word's length divided by 4 | |
// GPT-3's tokenizer uses a byte pair encoding that won't split a word into more than one token if it's 4 bytes or less |
This file contains hidden or 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
//SETS THE TIME FOR THE COOKIE TO EXPIRE | |
function setTimeUp() { | |
//DELETE COOKIE EXIST | |
deleteCookie('TimeIsUp'); | |
deleteCookie('TimeRedirect'); | |
deleteCookie('TimeWarn'); | |
//SETTING SESSION TIME'S UP | |
setCookie('TimeIsUp', moment().add(18, 'minutes').format('YYYY-MM-DD HH:mm:ss'), 1); | |
setCookie('TimeRedirect', moment(getCookie('TimeIsUp')).add(60, 'seconds').diff(moment()), 1); |