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
private String serialize(Object object) { | |
try { | |
ByteArrayOutputStream buffer = new ByteArrayOutputStream(); | |
ObjectOutputStream output = new ObjectOutputStream(buffer); | |
output.writeObject(object); | |
output.flush(); | |
return Base64.encodeBase64String(buffer.toByteArray()); | |
} catch (Exception e) { |
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
#!/usr/bin/perl | |
# Author: Todd Larason <jtl@molehill.org> | |
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $ | |
# use the resources for colors 0-15 - usually more-or-less a | |
# reproduction of the standard ANSI colors, but possibly more | |
# pleasing shades | |
# colors 16-231 are a 6x6x6 color cube | |
for ($red = 0; $red < 6; $red++) { |
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
/** | |
* Retorna estado do Formulario | |
*/ | |
HTMLFormElement.prototype.isLocked = function() | |
{ | |
var store = buildStoreForm(this, false); | |
if(store.length>0) | |
return store['locked']; |
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
package com.braincoretechnology.rules.util; | |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.GregorianCalendar; | |
public class DateUtil | |
{ | |
public static Date resolvePrimeiroUltimo(Date data, boolean isPrimeiro) | |
{ |
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
<form method="post" action="centro.php" enctype="multipart/form-data"> | |
<input type="hidden" name="acao" value="upload-logo"> | |
<input type="file" name="logo"> | |
<input type="submit" value="Enviar"> | |
</form> |
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 carregarImagem(url, objImgDestino) | |
{ | |
var img = new Image(); | |
img.onload = function () { | |
objImgDestino.src=obj.src; | |
} | |
img.src = url; | |
} |
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
/* | |
* Bloqueia o Formulario | |
*/ | |
HTMLFormElement.prototype.lockForm = function() | |
{ | |
var elmnts = this.elements; | |
armazenaEstadoFormulario(this); | |
for(i=0; i<elmnts.length; i++) | |
habilitaItemForm(elmnts[i], false); |
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
/** | |
* Desbloqueia o Formulario | |
*/ | |
HTMLFormElement.prototype.unlockForm = function() | |
{ | |
var elmnts = this.elements; | |
var store = buildStoreForm(this, false); | |
for(i=0; i<elmnts.length; i++) | |
habilitaItemForm(elmnts[i], !store[i]); |
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
<?php | |
$action = $_REQUEST["acao"]; | |
if($action=="upload-logo") | |
{ | |
processaLogo(); | |
} | |
function processaLogo() | |
{ |
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 processaUploadLogo($arquivo) | |
{ | |
$dir = "destino/"; | |
$ale = rand(00,9999); | |
if (isset($arquivo)) | |
{ | |
$nome = $ale.basename($arquivo["name"]); |
OlderNewer