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
SELECT Col.Column_Name from | |
INFORMATION_SCHEMA.TABLE_CONSTRAINTS Tab, | |
INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE Col | |
WHERE | |
Col.Constraint_Name = Tab.Constraint_Name | |
AND Col.Table_Name = Tab.Table_Name | |
AND Constraint_Type = 'PRIMARY KEY' | |
AND Col.Table_Name = '<your table name>'; |
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
{ | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
"*.pid", | |
"*.pyc" | |
], | |
"folder_exclude_patterns": | |
[ |
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
# coding: utf-8 | |
""" | |
=========================== | |
Testando um tômbola com bug | |
=========================== | |
Para começar, vamos criar uma instância de tômbola. Nessa implementação, | |
é necessário fornecer uma sequência de itens ao construtor:: |
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
# coding: utf-8 | |
from random import shuffle | |
class Tombola(object): | |
'''Sorteia itens sem repetir''' | |
def carregar(self, seq): | |
self.itens = list(seq) |
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
# coding: utf-8 | |
import arquivo |
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
# coding: utf-8 | |
print __name__ |
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
# coding: utf-8 | |
""" | |
Código inicial usado na Lista de Exercícios 1 do curso | |
"Objetos Pythonicos" de Luciano Ramalho, Oficinas Turing. | |
""" | |
class Contador(object): | |
def __init__(self): | |
self.totais = {} |
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> |