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
{ | |
"window.zoomLevel": 0.2, | |
"workbench.colorTheme": "Min Dark", | |
"workbench.iconTheme": "symbols", | |
"symbols.hidesExplorerArrows": false, | |
"editor.guides.bracketPairs": "active", | |
"editor.fontFamily": "JetBrains Mono", | |
"editor.fontSize": 13, | |
"editor.lineHeight": 1.7, | |
"editor.rulers": [ |
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
# Atencao, esse codigo não esta completo! Ainda precisa de uma refatorada boa. | |
# Estou usando aqui apenas para mostrar um exemplo | |
class LaudoCreate(LoginRequiredMixin, FormView): | |
model = Laudo | |
template_name = 'laudo/laudo_form.html' | |
form_class = LaudoForm | |
def get_initial(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
use seubanco | |
--use seuOutroBanco | |
--use seuBancoOutro | |
go | |
DECLARE @Search varchar(255) | |
SET @Search='trecho que deseja procurar' | |
SELECT DISTINCT |
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 ConvertUTCToLocalTime(sTime) | |
'Fonte: https://anandthearchitect.com/2006/11/08/convert-utc-to-local-time-and-vice-versa-using-vbscript/' | |
Dim od, ad, oShell, atb, offsetMin | |
Dim sHour, sMinute, sMonth, sDay | |
Dim ResultDate | |
'Convert the UTC time 2006-11-07T18:00:000Z to | |
'a normal date format 11/07/2006 10:00:00 | |
'Note the converted date would be 24 hr format |
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.contrib import admin | |
from .models import Product, ProductImage | |
class ProductImageInline(admin.TabularInline): | |
model = ProductImage | |
extra = 5 | |
class ProductAdmin(admin.ModelAdmin): | |
list_display = ['name', 'slug', 'category', 'created', 'modified'] | |
search_fields = ['name', 'slug', 'category__name'] |
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.db import models | |
from django.db.models import permalink | |
from django.core.urlresolvers import reverse | |
from cloudinary.models import CloudinaryField | |
class Product(models.Model): | |
name = models.CharField('Nome', max_length=100) | |
slug = models.SlugField('Identificador', max_length=100, help_text='identificador baseado no titulo', unique=True) | |
description = models.TextField('Descrição', blank=True) |