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
(function($) { | |
$.fn.selectAll = function(options) { | |
var defaults = { | |
inputs: 'input[name=ids]', | |
selectAll: "#select_all", | |
selected: false | |
}; | |
var settings = $.extend(defaults, options); | |
return this.each(function(x) { | |
var table = $(this); |
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 django.forms.widgets import CheckboxSelectMultiple | |
from django import forms | |
from .models import Curriculo | |
class CurriculoForm(forms.ModelForm): | |
class Meta: | |
model = Curriculo |
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
package com.mkyong.io; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class BufferedReaderExample { | |
public static void main(String[] args) { | |
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
continuar = True | |
nome_vencedor = '' | |
pontos_vencedor = -1 | |
vitorias_vencedor = -1 | |
gols_a_favor_vencedor = -1 | |
gols_sofridos_vencedor = -1 | |
saldo_vencedor = None | |
while continuar: |
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 django import forms | |
class MeuForm(forms.Form): | |
campo1 = forms.CharField(label="Campo 1") | |
def __init__(self, *args, **kwargs): | |
super(MeuForm, self).__init__(*args, **kwargs) | |
self.fields["campo1"].widget.attrs["class"] = "classe_css1" |
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 reportlab.pdfgen import canvas | |
from reportlab.lib.units import inch | |
c = canvas.Canvas("hello.pdf") | |
c.setFont("Helvetica", 40) | |
c.drawString(3*inch, 3*inch, "Hello World") | |
c.showPage() | |
c.save() |
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 django import forms | |
class MeuForm(forms.Form): | |
meu_campo = forms.CharField( | |
error_messages={'required': 'Este campo de ser preenchido'} | |
) | |
meu_campo2 = forms.IntegerField( | |
error_messages={'required': 'Este campo de ser preenchido', 'invalid': 'Informe um número válido'} |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
class GilenoFilhoSpider(scrapy.Spider): | |
name = "gilenofilho" | |
allowed_domains = ["gilenofilho.com.br"] | |
start_urls = ( | |
'http://www.gilenofilho.com.br/', |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
class GilenoFilhoSpider(scrapy.Spider): | |
name = "gilenofilho" | |
allowed_domains = ["gilenofilho.com.br"] | |
def starts_requests(self): |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
class OlxSpider(scrapy.Spider): | |
name = "olx" | |
allowed_domains = ["pe.olx.com.br"] | |
start_urls = ( | |
'http://pe.olx.com.br/imoveis/aluguel', | |
) |
OlderNewer