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
var verificarEmail = function(email){ | |
var regex = /^[a-zA-Z0-9][a-zA-Z0-9\._-]+@([a-zA-Z0-9\._-]+\.)[a-zA-Z-0-9]{2,}$/; | |
var result = regex.exec(email) ? true : false; | |
return result; | |
} |
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
/** | |
* Formata uma String que representa um valor númerico como Moeda | |
* Referência/Fonte: http://codigosprontos.blogspot.com.br/2010/06/o-codigo-function-moedavalor-casas.html | |
* | |
* @Params | |
* valor Obrigatório. String que representa um número (a parte decimal deve ser separada da parte inteira por vírgula) | |
* casas Obrigatório. Quantidade de casas decimais | |
* separdor_decimal Obrigatório. Separador de decimais, em geral é utilizado "," | |
* separador_milhar Obrigatório. Separado de milhar, em gerla é utlizado "." | |
* moeda Opcional. Abreviatura da moeda. Por exemplo: para Real, utilizar R$ |
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
//IBM BPM 8 | |
Packages.java.net.InetAddress.getLocalHost().getHostName(); | |
//Java | |
java.net.InetAddress.getLocalHost().getHostName(); |
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
If exists (select 1 from sys.procedures where name = 'myProcedure') | |
Drop Procedure myProcedure | |
--CREATE PROCEDURE myProcedure ...... |
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
http://<SERVER>:<PROCESS_SERVER_PORT>/teamworks/executeServiceByName?processApp=<ACRONIMO_PROCESSAPP>&serviceName=<NOME_SERVICO>&<tw.local.param1=valor1>&<tw.local.param2=valor2>... |
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
/* | |
@Author Hromenique Cezniowscki Leite Batista | |
Valida se um CPF é valido | |
@param valor um cpf (String) contendo apenas os dígitos | |
@return true se o cpf é valido, false caso contrário | |
*/ | |
function validaCPF(cpf) { | |
if(cpf.length != 11){ |
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.maplink.axiodis.rest.api.endpoint; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.MessageSource; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.MethodArgumentNotValidException; | |
import org.springframework.web.bind.annotation.ControllerAdvice; | |
import org.springframework.web.bind.annotation.ExceptionHandler; | |
import java.util.Locale; |
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
public class ConstraintValidatorContextImplTest { | |
private static String message = "message"; | |
@Test | |
public void testIterableIndexed() { | |
ConstraintValidatorContextImpl context = createEmptyConstraintValidatorContextImpl(); | |
context.buildConstraintViolationWithTemplate( message ) | |
.addPropertyNode( "foo" ) | |
.addPropertyNode( "bar" ).inIterable().atIndex( 3 ) |
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
@Configuration | |
@ComponentScan(basePackages = "br.com.hrom", | |
excludeFilters = { | |
@Filter(type = FilterType.REGEX, pattern = "br.com.hrom.queue.*") | |
}) | |
//@EnableAutoConfiguration and @Enable???Repositories in case of one or more depedencies need database repositories. | |
//Otherwise errors will occurrs when start the container | |
@EnableAutoConfiguration | |
@EnableMongoRepositories(basePackages = "br.com.hrom") |
OlderNewer