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
#include "stddef.h" | |
#include "mpi.h" | |
#include "stdio.h" | |
#define LIMITE 10 | |
int count = 0; |
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
#include <stdio.h> | |
#include <pthread.h> | |
#include <time.h> | |
#define NUM_THREADS 5 | |
#define MAX_COUNT 100 | |
pthread_barrier_t barrier; | |
pthread_t threads[NUM_THREADS]; |
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
private boolean extrairDados(HSSFSheet worksheet, String tabela, | |
Integer tipoInsercao, StringBuffer sbLog, String fileName) { | |
StringBuffer queryInsert = new StringBuffer(); | |
StringBuffer queryUpdate = new StringBuffer(); | |
StringBuffer queryFinal = new StringBuffer(); | |
List<String> camposUpdate = new ArrayList<String>(); | |
List<String> queriesPorLinha = new ArrayList<String>(); |
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
<p:inputText id="email" value="#{usuarioViewBean.usuario.email}" validatorMessage="Email inválido" > | |
<f:validateRegex | |
pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" /> | |
</p:inputText> |
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
private void sendEmail(String destinatario) { | |
final String username = "[email protected]"; | |
final String password = "password"; | |
Properties props = new Properties(); | |
props.put("mail.smtp.auth", "true"); | |
// props.put("mail.smtp.starttls.enable", "true"); use with gmail | |
props.put("mail.smtp.host", "mail.csrh.com.br"); | |
props.put("mail.smtp.port", "587"); | |
props.put("mail.imap.ssl.checkserveridentity", "false"); // is not necessary with gmail |
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
// Enum categoria | |
public enum Categoria { | |
LIVRO(1, "Livro"), | |
PERIODICO(2, "Periódico"), | |
ENCICLOPEDIA(3, "Enciclopédia"), | |
CD(4, "CD"), | |
DVD(5, "DVD"), | |
BLUE_RAY(6, "Blue Ray"), |
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
import static com.google.common.base.Preconditions.checkArgument; | |
import static com.google.common.base.Preconditions.checkNotNull; | |
import static java.util.FormattableFlags.ALTERNATE; | |
import static java.util.FormattableFlags.LEFT_JUSTIFY; | |
import java.io.Serializable; | |
import java.util.Formattable; | |
import java.util.Formatter; | |
import com.google.common.base.Objects; |
NewerOlder