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
package andrerocker.util; | |
import java.lang.reflect.Field; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import javax.persistence.Entity; | |
import javax.persistence.Transient; | |
public class PesquisaUtil |
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
package bvti.coelho.view.components.ui.validators | |
{ | |
import mx.collections.ArrayCollection; | |
import mx.validators.ValidationResult; | |
import mx.validators.Validator; | |
import spark.components.TextInput; | |
public class InicialFinalValidator extends Validator | |
{ |
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
public static function carregaCombo(combo:DropDownList, funcao:Function, currentSelected:*=null, callback:Function=null):void | |
{ | |
funcao.apply(null, [function(event:ResultEvent):void { | |
combo.dataProvider = event.result as ArrayCollection; | |
if(currentSelected) | |
selecionaCorrente(false, combo, currentSelected); | |
if(callback!=null) | |
callback.apply(null, [event]); |
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
[Bindable] | |
protected var moduleInfo: IModuleInfo; | |
protected function menuClick(event:MenuEvent):void | |
{ | |
var className:String = event.item.@data; | |
var executa:Function = function():void | |
{ | |
var definition:Class = Class(getDefinitionByName(className)); |
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
#!/bin/bash | |
# Torna agradavel a chamada ao YUI na linha de comando | |
# yui by Andre Souza ([email protected]) | |
# | |
# modo de uso: yui --type js input.js -o output.js | |
java -jar /path/to/yui-compressor.jar $* |
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
#!/bin/sh | |
read -p "usuario: " usuario; | |
read -p "senha: " senha; | |
read -p "link: " download; | |
nomeArquivo=`echo $download | awk 'BEGIN{FS="/"}{print $NF }'`; | |
authLink="https://profile.oracle.com/jsp/reg/loginHandler.jsp"; | |
if [ -z $usuario ] || [ -z $senha ] |
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 java.io.BufferedInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.math.BigInteger; | |
import java.security.MessageDigest; | |
public class Util | |
{ | |
public static String md5File(File file) throws Exception | |
{ |
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
function carregarImagem(url, objImgDestino) | |
{ | |
var img = new Image(); | |
img.onload = function () { | |
objImgDestino.src=obj.src; | |
} | |
img.src = url; | |
} |
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
public void exportReportToPdfStream(List<JasperPrint> prints, OutputStream output) throws JRException | |
{ | |
JRPdfExporter exporter = new JRPdfExporter(); | |
exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, prints); | |
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output); | |
exporter.exportReport(); | |
} |
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
public class BitlyJExample | |
{ | |
public static void main(String[] args) | |
{ | |
Bitly bitly = BitlyFactory.newInstance("<seu-login>", "<sua-chave>"); | |
BitlyUrl bUrl = bitly.shorten("http://rosaloves.com/stories/view/13"); | |
URL url = bitly.expandHash("hopetransfusion"); | |
BitlyUrlInfo info = bitly.info("hopetransfusion"); | |
} | |
} |