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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <regex.h> | |
#define BUFFER 512 | |
typedef struct Patterns { | |
char *regexFreq; // Regex usado na conta de frequencia | |
char *regexLongest; // Regex usado para achar a palavra mais longa |
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
function TestaCPF(strCPF) { | |
var Soma; | |
var Resto; | |
Soma = 0; | |
if (strCPF == "00000000000") return false; | |
for (i=1; i<=9; i++) Soma = Soma + parseInt(strCPF.substring(i-1, i)) * (11 - i); | |
Resto = (Soma * 10) % 11; | |
if ((Resto == 10) || (Resto == 11)) Resto = 0; |
- Informações compiladas por João G.J. Marinho a.k.a Pato do ICMC/USP
- A idéia foi compilar os conteúdos necessários de JavaScript puro antes de adentrar o mundo dos frameworks