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
/* author @dactyllo */ | |
var matchHeight = function(classe, perLine) { | |
var peeps = $(String(classe)+":visible").css('height','auto').get(); | |
var line = isNaN(perLine) ? peeps.length : parseInt(perLine); | |
for(var i = 0;i<peeps.length;i=i+line) { | |
var height = 0; | |
for(var x = i;x<(i+line);x++) { | |
if(peeps[x] && peeps[x].clientHeight > height) height = peeps[x].clientHeight; | |
} | |
for(var x = i;x<(i+line);x++) { |
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 | |
if ! type "php" > /dev/null; then | |
echo "PHP not found!" 1>&2 | |
echo "Please follow the install instructions at http://php.net/ then try again" 1>&2 | |
exit | |
fi | |
if ! type "git" > /dev/null; then | |
echo "Git not found!" 1>&2 |
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
$lines = file('agrupama.sql'); //lê o ficheiro para dentro de um array | |
foreach ($lines as $line) { | |
// Skip it if it's a comment | |
if (substr($line, 0, 2) == '--' || $line == '') | |
continue; | |
// Add this line to the current segment | |
$templine .= $line; | |
// If it has a semicolon at the end, it's the end of the query | |
if (substr(trim($line), -1, 1) == ';') { | |
// Perform the query |