Skip to content

Instantly share code, notes, and snippets.

View Miltex's full-sized avatar

Milton Ferreira Lima Miltex

  • Belo Horizonte, Brazil
View GitHub Profile
package br.miltex.service;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
keytool -import -trustcacerts -keystore "C:\Program Files (x86)\Java\jre7\lib\security\cacerts" -noprompt -alias cert_cielo -file "D:\Users\milton.filho\scriptsSQL\itegrapc\cert\cert_cielo.cer"
@Miltex
Miltex / Async.java
Created June 13, 2018 00:22
AsyncTasks
package miltex.br.consultor;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.AsyncTask;
@Miltex
Miltex / getElementId_jQuery.js
Last active December 2, 2016 00:31
Pegar o valor de um elemento no frm jsf
<script>
$(document).ready(function(){
$("#frm").submit(function(event){
//exibe com mascara
alert($('#frm\\:telefone').val());
//exibe sem mascara
var valor = $('#frm\\:telefone');
alert(valor.val().replace(/[^\d]+/g,''));
});
});
@Miltex
Miltex / pom_jsf_primefaces.xml
Last active December 1, 2016 23:47
POM basico jsf primefaces
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.miltex</groupId>
<artifactId>AlgaworksJEECDIPrimefacesJPA</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
@Miltex
Miltex / cron
Created September 16, 2016 12:16
@SuppressWarnings("serial")
@Stateless
public class Cron implements Serializable {
@Schedule(hour = "1,2,3,4,5,6", minute = "*", persistent = false)
@TransactionAttribute(TransactionAttributeType.NEVER)
public void sincronizaPessoa() throws Exception {
}