Skip to content

Instantly share code, notes, and snippets.

View Falci's full-sized avatar
🍉

Fernando Falci Falci

🍉
View GitHub Profile
package certificacao;
public abstract class ClassA {
public void run(){
System.out.println("running...");
}
}
package integer;
public class MaxInt {
public static void main(String[] args) {
Integer i = Integer.MAX_VALUE - 10;
for(int x=0; x<20; x++){
System.out.println( i++ );
}
package br.com.zueira;
public class Zueira {
public static void main(String[] args) {
boolean zueira = true;
while(zueira){
if( 1 == 2){
zueira = false;
}
var
ArquivoResultado, LinhaResultado, CampoResultado: JObject;
linha, coluna, quantidadeLinhas, quantidadeColunas : integer;
path, nome, valor : string;
begin
ArquivoResultado := LerArquivoRetorno(ParamStr(1));
quantidadeLinhas := GetQuantidadeDeLinhas(ArquivoResultado);
// LOG
Writeln( IntToStr(quantidadeLinhas) + ' linhas' );
package me.falci.planoB.javascript;
import java.util.Date;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class Main {
package me.falci.planoB.converter;
import java.util.Calendar;
import java.util.Date;
import org.springframework.core.convert.converter.Converter;
/**
* @author Falci
*
@Falci
Falci / criarLista.pl
Created June 4, 2014 16:40
Criar lista em Prolog
criarLista(X, R) :-
criarLista(X, [], R).
criarLista(2, L, R) :-
R = '.'(2,L),
!.
criarLista(X, L, R) :-
T = '.'(X, L),
Xn is X -1,
package me.falci.util;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
Number.prototype.format = function(c, d, t){
var n = this,
c = isNaN(c = Math.abs(c)) ? 2 : c,
d = d == undefined ? "," : d,
t = t == undefined ? "." : t,
s = n < 0 ? "-" : "",
i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "",
j = (j = i.length) > 3 ? j % 3 : 0;
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
@Falci
Falci / jquery.codeReader.js
Created October 22, 2014 12:36
CodeReader: verifica se o campo está recebendo dados pelo teclado ou pelo leitor de código de barras;
$.fn.codeReader = function(options){
var timer, defaults = {
event: 'keypress',
max: 100,
fail: function(){
console.error('keyboard');
},
success: function(str){
console.log(str);
}