This file contains hidden or 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 telefone_validation(telefone) { | |
//retira todos os caracteres menos os numeros | |
telefone = telefone.replace(/\D/g, ''); | |
//verifica se tem a qtde de numero correto | |
if (!(telefone.length >= 10 && telefone.length <= 11)) return false; | |
//Se tiver 11 caracteres, verificar se começa com 9 o celular | |
if (telefone.length == 11 && parseInt(telefone.substring(2, 3)) != 9) return false; |
This file contains hidden or 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
#!python | |
# coding: utf-8 | |
import sys | |
import ctypes | |
def run_as_admin(argv=None, debug=False): | |
shell32 = ctypes.windll.shell32 | |
if argv is None and shell32.IsUserAnAdmin(): | |
return True | |
This file contains hidden or 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 selenium import webdriver | |
from selenium.webdriver.support.wait import WebDriverWait | |
class WaitBrowser(object): | |
def __init__(self, **kw): | |
self.browser = webdriver.PhantomJS() | |
def readystate_complete(self): |
This file contains hidden or 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
<html> | |
<head> | |
<style> | |
#barcode {height: 60px;} | |
#barcode span {margin: 0;padding-bottom: 34px;height: 16px;} | |
.n {border-left: 1px solid;} | |
.w {border-left: 3px solid;} | |
.n, .w {border-color: #000;} | |
.s {border-color: #fff;} | |
</style> |