- Create a web.config file in laravel root diretory
- Put this content in web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<?php | |
class ByteSize | |
{ | |
const KB = 1; | |
const MB = 2; | |
const GB = 3; | |
const TB = 4; | |
const PB = 5; | |
const EB = 6; | |
const ZB = 7; |
<?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) | |
{ |
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 :(") |
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 :(") |
<?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); |
from flask import Flask | |
import urllib | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
@app.route("/youtubeproxy/<youtubeid>") |
$(document).on('keyup blur', "input[name^='cpf']",function() { | |
$("#resposta").html(CPF.valida($(this).val())); | |
}); |
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 --> |
<?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; |