Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SQLite;
/* create table usuarios(
* username text primary key,
* password text not null,
* ultima_sesion text not null,
81c81
< if (this.logueado == true)
---
> /*if (this.logueado == true)
83c83
< query = "update usuarios set password = '@password', " +
---
> query = "update usuarios set password = '@password', " +
88c88
< {
/* Programa para simular los estados del procesador */
#include<iostream>
#include<vector>
using namespace std;
enum estados{NULO, NUEVO, LISTO, EJECUCION, BLOQUEADO, TERMINADO};
typedef struct{
int estado;
#!/bin/sh
for img in `ls *.jpg`
do
echo $img
mogrify -resize 1900x -compress jpeg -quality 70 $img #cambiar el tamaño a tu gusto
done
var d = new Date();
dom = d.getDate();
month = d.getMonth();
year = d.getYear();
if (year < 2000) year = year - 100;
else year = year - 2000;
if (year == 9 && month == 2)
days = 56 - dom;
else if (year == 9 && month == 3)
from django import forms
from models import Place, RestaurantDetail
class PlaceForm(forms.Form):
""""Formulario para crear un lugar nuevo"""
name = forms.CharField(max_length = 100, required = True)
img = forms.ImageField()
#todo: agregar los demas campos
def save(self):
place = Place(name = self.cleaned_data['name']) #agregar los demas aca
<html>
<head><title>Javascript Dynamic ListBox Demonstration</title>
</head>
<body bgcolor="#ffffff" OnLoad="setOption(document.ThisForm, 0)">
<h2>Javascript Dynamic ListBox Demonstration</h2>
<hr>
<blockquote>
<form name="ThisForm">
<!--
The listbox size should be same as the list which has the maximum size.
<?xml version="1.0" encoding="UTF-8"?>
<lista>
<programa>
<nombre>Firefox</nombre>
<version>3.0.1</nombre>
</programa>
<programa>
<nombre>emesene</nombre>
<version>1.1</nombre>
</programa>
from django.forms import ModelForm
from django import forms
from models import PAISES, COMUNIDADES, UserProfile
FORMATOS_FECHA = ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%m/%d/%Y', '%d/%m/%y', '%d/%m/%Y')
class ProfileForm(ModelForm):
edad = forms.IntegerField()
telefono = forms.CharField()
pais = forms.ChoiceField(choices = PAISES)
gul = forms.ChoiceField(choices = COMUNIDADES)
default 0
timeout 3
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##