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 OlaMundo{ | |
var $nomeDoUsuario; | |
/** | |
* Escreve Ola Mundo | |
* | |
* @author Chuck Norris. | |
*/ |
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 OlaMundo{ | |
static $nomeDoUsuario; | |
/** | |
* Escreve Ola Mundo | |
* | |
* @author Chuck Norris. | |
*/ |
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 OlaMundo{ | |
static $nomeDoUsuario; | |
/** | |
* Cria instancias automaticamente | |
* | |
* @author Chuck Norris. | |
*/ |
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
// Criando o handle de uma conexão com o PostgreSQL | |
$db = new PDO("pgsql:dbname=MEU_DB;host=localhost", "USUARIO", "SENHA" ); | |
// Criando o handle de uma conexão com o MySQL | |
$db = new PDO("mysql:dbname=MEU_DB;host=localhost", "USUARIO", "SENHA" ); |
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
def menino |
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
<meta property="og:title" content="Geopromo"/> | |
<meta property="og:type" content="website"/> | |
<meta property="og:url" content="http://www.geopromo.com.br"/> | |
<meta property="og:image" content="http://www.geopromo.com.br/images/icons/opengraph.jpg?1312037161"/> | |
<meta property="og:site_name" content="Geopromo"/> | |
<meta property="og:description" | |
content="Encontre e organize as melhores ofertas da internet baseado na sua localizacao"/> |
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
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ) { | |
$_SERVER['HTTPS'] = 'on'; | |
$_SERVER['SERVER_PORT'] = 443; | |
} |
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
# Vc monta assim | |
dict_medias = {} | |
for pergunta in perguntas: | |
# Atualiza media | |
if pergunta.id in dict_medias: | |
dict_medias[pergunta.id]['media'] = dict_medias[pergunta.id]['media'] + 3 | |
# Cria pergunta | |
else: |
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
Feature: Search For PageObject Article | |
As a Blog do Pedro visitor | |
I want to find for PageObjects article | |
Scenario: | |
Given I am on Blog do Pedro's Home Page | |
When I input a term into search text field | |
Then I should submit search form |
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
# encoding: UTF-8 | |
Given(/^I am on Blog do Pedro's Home Page$/) do | |
visit_page HomePage | |
end | |
When(/^I input a term into search text field$/) do | |
on_page HomePage do |page| | |
page.input_search = "Tradução do artigo sobre PageObjects" | |
end |
OlderNewer