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
import Example # importa o Example.any | |
class Evolution extends Example: | |
public def __init__(): # Construtor | |
super("teste") # Equivalente ao super do Java, ele "executa" o Example.__init__(args...) passando o argumentos | |
self.show() # Executa como o Example.show | |
public def __destroy__(): # É equivalente ao __destruct() do php ou Foo::~Foo() do C++ | |
print("Bye :(") |
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
import Example # importa o Example.any | |
class Evolution extends Example: | |
public void __init__(): # Construtor | |
super(100, "teste", false) # Equivalente ao super do Java, ele "executa" o Example.__init__(args...) passando o argumentos | |
self.show() # Executa como o Example.show | |
public void __destroy__(): # É equivalente ao __destruct() do php ou Foo::~Foo() do C++ | |
print("Bye :(") |
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 | |
/* | |
* @param string $filename Path from windows executable | |
* @param string $encoding You need single-byte-character output, use ISO-8859-1 | |
* @param int $limit increase limit if you tried read a big file and it returns NULL | |
* @return null|array | |
*/ | |
function getFileVersionInfo($filename, $encoding = 'UTF-8', $limit = 15728640) | |
{ |
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 | |
exec('reg export Hkey_local_Machine\Software\blabla C:\arquivo.reg'); | |
$regfile = file_get_contents('C:/arquivo.reg'); | |
$regfile = preg_replace('#(\r|\n)"|"(=)#', '$1$2', $regfile); | |
$parsed = parse_ini_string($regfile, false, INI_SCANNER_RAW); |
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
from flask import Flask | |
import urllib | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
@app.route("/youtubeproxy/<youtubeid>") |
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
$(document).on('keyup blur', "input[name^='cpf']",function() { | |
$("#resposta").html(CPF.valida($(this).val())); | |
}); |
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
1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc mi, euismod id dapibus sed, sodales id mi. | |
<!-- begin snippet: js hide: false console: true babel: false --> | |
<!-- language: lang-html --> | |
teste 1 | |
<!-- end snippet --> |
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 | |
/* | |
* http://pt.stackoverflow.com/a/197684/3635 | |
*/ | |
$imagem = array(); | |
$items = simplexml_load_file("http://cidades.gov.br/ultimas-noticias?format=feed&type=rss")->channel->item; | |
$doc = new DOMDocument; |
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
// ==UserScript== | |
// @name UxHomologation | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Ajuda a detectar se esta em que ambiente baseado no domínio | |
// @author Guilherme Nascimento | |
// @match *://dominio-do-ambiente-de-homologação.com.br/* | |
// @grant none | |
// ==/UserScript== |
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 "wallacewindow.h" | |
#include <QApplication> | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
WallaceWindow w; | |
w.show(); | |
return a.exec(); |