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 montaHorario($horaMin=7, $minMin=0, $horaMax=22, $minMax=45, $default=""){ | |
$montaHorario = ''; | |
for($hora=$horaMin; $hora<=$horaMax; $hora++){ | |
$horaStr = str_pad($hora, 2, "0", STR_PAD_LEFT); | |
$startMin = 0; | |
if($hora==$horaMin){ | |
$startMin = $minMin; | |
} | |
$endMin = 45; |
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
Gerar keystore: | |
keytool -genkey -alias ivprog -keystore ivprog | |
Assinar: | |
jarsigner -keystore ivprog -storepass 123456 iVProg2.jar ivprog |
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 latest(){ | |
return $this->Medicine->find("all", array("limit"=>10)); // seu find normal aqui | |
} | |
?> |
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
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; | |
-- ----------------------------------------------------- | |
-- Schema ultranegocio | |
-- ----------------------------------------------------- | |
CREATE SCHEMA IF NOT EXISTS `ultranegocio` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; | |
USE `ultranegocio` ; |
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 Extensao extends AppModel{ | |
public $useTable = "extensoes"; | |
} |
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 umaClosure(name){ | |
var x = 0; | |
// metodos privados | |
function contar(){ | |
console.log("Contei "+name," ", x++); | |
} | |
// metodos publicos | |
return { | |
cont: contar | |
} |
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 modulo1 = require('./modulo1'); | |
modulo1.escreva(); | |
modulo1.escreva(); | |
modulo1.escreva(); | |
var modulo2 = require('./modulo2'); | |
var m2 = modulo2("M2"); | |
m2.conta(); | |
m2.conta(); |
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
// promises | |
var q = require("q") | |
var fs = require('fs'); | |
var filename = "dados.txt"; | |
function lerDados(filename){ | |
var defer = q.defer(); | |
fs.readFile(filename, 'utf8', function(err, data) { | |
//defer.resolve(data); |
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 | |
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel | |
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz | |
tar zxvf GraphicsMagick-1.3.9.tar.gz | |
cd GraphicsMagick-1.3.9 | |
./configure --enable-shared | |
make |
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 app = angular.module("app", ["appControllers"]); |
OlderNewer