Skip to content

Instantly share code, notes, and snippets.

View gusthavosouza's full-sized avatar
🇮🇸
Working from 🇮🇸

Gustavo De Souza gusthavosouza

🇮🇸
Working from 🇮🇸
View GitHub Profile
package mail;
import java.io.IOException;
import java.util.Properties;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
import javax.servlet.http.*;
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee">
<!-- Servlets -->
<servlet>
<servlet-name>greetServlet</servlet-name>
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title>Noticias</title>
</h:head>
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<!-- Login filter -->
<filter>
<filter-name>FiltroLogin</filter-name>
<filter-class>util.FiltroLogin</filter-class>
</filter>
<!-- Set the login filter to secure all the pages in the /secured/* path of the application -->
<filter-mapping>
<filter-name>FiltroLogin</filter-name>
** Ativa monitoramento remoto
** Testes utilizar sem autenticação
** Produção não utilizar sem autenticação
java -Xmx6m -Dcom.sun.management.jmxremote
-Dcom.sun.management.jm\parxremote.port=9000
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
@gusthavosouza
gusthavosouza / Connectivity.java
Created April 4, 2016 14:11 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
package com.emil.android.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
/**
* Check device's network connectivity and speed
* @author emil http://stackoverflow.com/users/220710/emil
package uscs;
import java.io.*;
import java.net.*;
public class Atv01 {
@SuppressWarnings("deprecation")
public static void main(String args[]) {
try {
package uscs;
import java.io.*;
import java.net.*;
public class Atv02A {
@SuppressWarnings("deprecation")
public static void main(String args[]) {
String[] codigo = { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10" };
String[] descr = { "Produto A", "Produto B", "Produto C", "Produto D", "Produto E", "Produto F", "Produto G",
<rich:tab header="Escolher Metricas" id="tabMetrica"
rendered="#{SistemaController.passo eq 2}">
<rich:dragIndicator id="ind2" acceptClass="accept"
rejectClass="reject" draggingClass="default">
Arraste o item para a area disponivel
</rich:dragIndicator>
<h:form>
<(?:h:outputLabel)(?:\s+(?!for\b)[\w\-.:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[\w\-.:]+))?)*\s*/?>