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 | |
# ---------------------------------------------------------------------- | |
# DFN Thumbnailer | |
# http://www.digifuzz.net | |
# digifuzz@gmail.com | |
# ---------------------------------------------------------------------- | |
# Constants | |
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 | |
$bebeu_agua = "Não"; | |
$ta_com_sede = "To"; | |
if($bebeu_agua == "Não") { | |
if($ta_com_sede == "To") { | |
echo "Água, Água, Água mineral, Água mineral..."; | |
} | |
} |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'mysql2' | |
class Ecommerce | |
attr_accessor :id, :name, :price, :bank_price, :con | |
@@con = Mysql2::Client.new(:host => 'localhost', :username => 'root', :password => '1234', :database => 'ecommerce') | |
def acessar_site(url) | |
Nokogiri::HTML(open(url, :proxy_http_basic_authentication => ['http://192.168.254.200:8080', 'deyvin', 'fdcsistemas123'] )) |
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 | |
mysql_connect("localhost", "root", "1234"); | |
$banco = 'ecommerce'; | |
$db_selected = mysql_select_db($banco); | |
$result = mysql_query('SHOW TABLES'); | |
while($row = mysql_fetch_assoc($result)) { | |
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 | |
define('TOTALAPLICADO', 1000); | |
define('PERC_RENDIMENTO', 15); | |
define('DIAS', 31); | |
$total_por_dia = ((TOTALAPLICADO * PERC_RENDIMENTO) / 100) / DIAS; |
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 | |
$valor_desejado = 500; | |
$percentual = 20; | |
echo ($valor_desejado * 100) / (100 − $percentual); |
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 | |
$db = ibase_connect ('localhost:/usr/db/db.gdb', 'SYSDBA', 'masterkey'); | |
$tr = ibase_trans( IBASE_DEFAULT, $tr ); #abre a transação do firebird | |
$insert = "INSERT INTO CLIENTES (ID, NOME) VALUES (1, 'JOSE')"; | |
ibase_query($tr, $insert); | |
$insert = "INSERT INTO CLIENTES (ID, NOME) VALUES (1, 'JOSE')"; |
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() { | |
$.fn.serialize = function (options) { | |
return $.param(this.serializeArray(options)); | |
}; | |
$.fn.serializeArray = function (options) { | |
var o = $.extend({ | |
checkboxesAsBools: false | |
}, 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
server { | |
root /var/www/promo; | |
index index.php index.html index.htm; | |
server_name example.com.br; | |
client_max_body_size 100M; | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} |
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 get_remote_file(filename, url, fn_end, fn_progress ) { | |
Ti.API.info("[filename]" + filename); | |
Ti.API.info("[url]" + url); | |
var file_obj = {file:filename, url:url, path: null}; | |
var file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename); | |
if ( !file.exists() ) { |