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
| import 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return new MaterialApp( |
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
| def crearempresa(request): | |
| field_ejecutivo = Profile.objects.filter(tipo_usuario='ejecutivo') | |
| if request.method == 'POST': | |
| user_form = UserEmpresaForm(data=request.POST or None) | |
| if user_form.is_valid(): | |
| user = user_form.save() | |
| user.refresh_from_db() | |
| user.profile.rfc = user_form.cleaned_data.get('rfc') | |
| user.profile.tipo_usuario = 'empresa' |
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
| ALTER FUNCTION [dbo].[fnCFDFlexCadenaOriginalTFDI] | |
| ( | |
| @Modulo varchar(5), | |
| @ModuloID int | |
| ) | |
| /* | |
| declare @valor varchar(1000) | |
| exec @valor=fnCFDFlexCadenaOriginalTFDI 'VTAS',884727 |
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
| ALTER PROCEDURE [dbo].[spCFDFlexTextoQRCode] | |
| ( | |
| @Modulo varchar(5), | |
| @ModuloID int | |
| ) | |
| --exec spCFDFlexTExtoQRCode 'VTAS', 891160 | |
| AS BEGIN |
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
| """ Guarda un dato como xml | |
| xml = "<myxmldata/>".encode() | |
| f = open("myxmlfile.xml", "wb") | |
| f.write(xml) | |
| f.close() | |
| """ | |
| import pyodbc |
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
| """ Guarda un dato como xml | |
| xml = "<myxmldata/>".encode() | |
| f = open("myxmlfile.xml", "wb") | |
| f.write(xml) | |
| f.close() | |
| """ | |
| import pyodbc |
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
| /* | |
| if (select count(distinct fechaentrega) from CompraD where id=47024288) >1 | |
| begin | |
| print 'mas de dos' | |
| end | |
| else | |
| print 'nel' | |
| select distinct FechaEntrega from CompraD where id=47024685 | |
| update compraD set FechaEntrega='19/04/2017' where id=47024685 and renglon=2048 |
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 sysobjects.name,sysobjects.xtype,syscolumns.* | |
| from syscolumns, sysobjects | |
| where syscolumns.id = sysobjects.id and | |
| sysobjects.xtype = 'U' and | |
| syscolumns.name = 'Moneda' | |
| order by sysobjects.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
| import datetime | |
| d = datetime.date(2017, 9, 9) | |
| def next_weekday(d, weekday): | |
| days_ahead = weekday - d.weekday() | |
| if days_ahead <= 0: | |
| days_ahead += 7 | |
| return d + datetime.timedelta(days_ahead) |
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 datetime import datetime, timedelta | |
| s = '2004/03/30' | |
| date = datetime.strptime(s, "%Y/%m/%d") | |
| modified_date = date + timedelta(days=5) | |
| print(modified_date) |
NewerOlder