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
/** | |
Copyright (C) <2013> <Arturo Lopez Gomez> | |
**/ | |
/** | |
Creado por arturo lopez gomez <arthurolg@gmail.com>. | |
Fecha: 05/04/2013 | |
Aplicado en el proyecto de StarChoice, para la generacion de cadenas aleatorias para nombres de archivos, | |
en la importacion de documentos y generar url amigables. | |
Licencia OpenSource |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Window Browser Screen Size?</title> | |
</head> | |
<body> | |
<script src="http://codeorigin.jquery.com/jquery-2.0.3.min.js"></script> | |
<script> |
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
import org.springframework.context.MessageSource | |
import org.springframework.web.servlet.i18n.SessionLocaleResolver | |
class I18nService { | |
SessionLocaleResolver localeResolver | |
MessageSource messageSource | |
def msg(String code, String defaultMsg = null, List objs = null) { |
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
import org.apache.commons.codec.binary.Base64 | |
class CifradoBase64Service { | |
static transactional = true | |
def ofuscarCadena(String text) { | |
def encrypted = "" | |
try { | |
byte[] encodedBytes = Base64.encodeBase64(text.getBytes()) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Test</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" | |
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" | |
crossorigin="anonymous" referrerpolicy="no-referrer"></script> |
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
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
double base; | |
double altura; | |
double area; | |
Scanner lectura = new Scanner(System.in); | |
System.out.println("Ingresa la base: "); |
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
Buena idea. | |
def foo = estaEsUnaFuncionLarga(def var1, def var2, def var3, | |
def var3, def var4) { | |
println(var1) | |
} | |
def foo = estaEsUnaFuncionLarga( | |
def var1, def var2, def var3, | |
def var3, def var4) { | |
println(var1) |
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
class Imagen() { | 79 caracteres. | |
| | |
def Imagen(int width, int height, def color='black', def highlight=0) { | | |
| | |
if (width == 0 && height == 0 && color == 'red' && | | |
highlight > 100 && emphasis == 'strong') { | | |
| | |
return true; | | |
} | | |
} | |
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
package com.utilidades | |
import java.text.Normalizer | |
import java.util.regex.Pattern | |
/** | |
* Created by arturo.lopez on 17/02/14. | |
*/ | |
class SlugCodec { |
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
package com.utilidades | |
/** | |
* Created by arturo.lopez on 06/08/2015. | |
*/ | |
class Utilities { | |
static benchmark = { closure -> | |
def start = System.currentTimeMillis() | |
closure.call() |
OlderNewer