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 | |
if($_POST){ | |
watterMarkUmMais1(); | |
} | |
function watterMarkUmMais1(){ | |
if(isset($_POST['upload'])){ | |
$permitido= array('image/jpg','image/jpeg', 'image/pjpeg'); | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "phpdevbox" |
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 Gerar(){ | |
mkdir('site'); | |
mkdir('site/css'); | |
mkdir('site/include'); | |
mkdir('site/images'); | |
mkdir('site/js'); | |
$head = fopen("site/index.php", "a"); | |
$escreve_head = fwrite($head, ' |
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 <stdio.h> | |
int main(){ | |
int soma; | |
int i=1; | |
int total; | |
while(i<=10){ | |
if(i % 2 == 1){ | |
total = i + total; | |
printf("%d \t",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 | |
//Original: | |
/** | |
* Path to the application directory. | |
*/ | |
define('APPPATH', realpath(__DIR__.'/../fuel/app/').DIRECTORY_SEPARATOR); | |
/** | |
* Path to the default packages directory. |
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
/** | |
* Created with JetBrains PhpStorm. | |
* User: anderson.mota | |
* Date: 11/23/12 | |
* Time: 4:48 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
$.fn.editHere = function(action, callback, options){ |
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 | |
//error_reporting(E_ERROR); | |
$original = imagecreatefrompng("assets/picture.png"); | |
$mask = imagecreatefrompng("assets/mask.png"); | |
$masked = applyAlphaMask( $original, $mask ); | |
function applyAlphaMask($image, $mask) { | |
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 noneDig = false; | |
$('.mobile').mask("(99) 9999-9999").keydown(function(){ | |
var phone, $element; | |
$element = $(this); | |
phone = $element.val().replace(/\D/g, ''); | |
if(phone == "11" && phone.length == 2 && !noneDig){ | |
$element.mask("(11) 99999-999?9"); | |
noneDig = true; | |
}else if(phone == "11" && phone.length == 2 && noneDig){ |
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 | |
class Pager | |
{ | |
public $path; | |
public $page = 1; | |
public $perPage = 15; | |
public $offset; | |
public $totalPages; |
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 site = function(){ | |
function privateFunction(){ | |
} | |
return { | |
Init: function(){ |
OlderNewer