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 | |
// desativando todos os erros, para que o usuário não os veja. | |
error_reporting(0); | |
//mudando a função que irá gerenciar os erros a partir de agora. | |
$old_error_handler = set_error_handler("erros"); | |
/** | |
* @return void | |
* @param int $errno numero do erro |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function coordenadas(event) | |
{ | |
var x=event.clientX; | |
var y=event.clientY; | |
var coord = x + "," + y; | |
return coord; | |
} |
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
#!/bin/bash | |
# TITULO: Programa em bash para comparar pastas | |
# DATA: 28/Jan/2009 | |
# | |
# Programa em bash para comparar recursivamente duas pastas | |
# - informa quais arquivos tem em uma e que nao tem em outra | |
# - quais subpastas tem em uma que nao tem em outra | |
# - se houverem arquivos com mesmo nome em uma pasta e na outra, | |
# informa se eles sao iguais ou diferentes |
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
/* | |
RESET CSS | |
Marcos Brasil (markus.prologic@gmail.com) | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, |
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
/* | |
* Easy Slider 1.7 - jQuery plugin | |
* written by Alen Grakalic | |
* http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding | |
* | |
* Copyright (c) 2009 Alen Grakalic (http://cssglobe.com) | |
* Dual licensed under the MIT (MIT-LICENSE.txt) | |
* and GPL (GPL-LICENSE.txt) licenses. | |
* | |
* Built for jQuery library |
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 <iostream> | |
#include <ctime> | |
#include <cstdlib> | |
#include <string> | |
#include <windows.h> | |
#define ARRAY_SIZE 6 | |
using namespace std; | |
//Declarando global screen vars |
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
#!/bin/bash | |
echo "###############################################################\n" | |
echo "Instalacao dos componentes: Apache2 / php5 / mysql / phpmyadmin\n" | |
echo "###############################################################\n" | |
apt-get update | |
apt-get -yV install apache2 | |
apt-get -yV install php5 php5-mysql php5-curl php5-gd php5-mcrypt | |
apt-get -yV install mysql-server mysql-client |
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 mindToCanvas(){ | |
var c = document.getElementById('logo-mind'); | |
c.height = 72; | |
c.width = 185; | |
var cx = c.getContext('2d'); | |
cx.fillStyle="rgba(249,255,244,1)"; | |
cx.fillRect(0,0,1,1); | |
cx.fillStyle="rgba(252,255,253,1)"; | |
cx.fillRect(1,0,1,1); | |
cx.fillStyle="rgba(252,255,255,1)"; |
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 | |
function limitarTexto($texto, $limite){ | |
$texto = substr($texto, 0, strrpos(substr($texto, 0, $limite), ' ')) . '...'; | |
return $texto; | |
} | |
// String a ser limitada | |
$string = 'Como limitar caracteres sem cortar as palavras com PHP'; | |
// Mostrando a string limitada em 25 caracteres. |
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
var cache = []; | |
// Arguments are image absolute paths to the current page | |
$.preLoadImages = function(arrImg,funcCallback) { | |
var imgLen = arrImg.length; | |
for (var i = imgLen; i>=0 ;i--) { | |
if(typeof arrImg[i] !== 'undefined'){ | |
var cacheImage = document.createElement('img'); | |
cacheImage.src = arrImg[i]; | |
cache.push(cacheImage); |
OlderNewer