Skip to content

Instantly share code, notes, and snippets.

Manuel Matías Zubieta manuel14

Block or report user

Report or block manuel14

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6252822
<html>
<style
img { width:100px; }
</style>
<header>
<nav>
<ul>
<li><a href="/">Inicio</a></li>
<li><a href="/usuarios">Usuarios registrados</a></li>
<li><a href="/recetas">Recetas</a></li>
View gist:6565013
class Noticia(models.Model):
titulo = models.TextField()
texto = models.TextField(help_text='Redacta la Noticia')
autor = models.TextField(verbose_name='Autor')
#imagen = models.ImageField(upload_to='rrpp', verbose_name='imagen')
#tiempo_registro = models.DateTimeField(auto_now=True)
usuario = models.ForeignKey(User)
def __unicode__(self):
return self.titulo
View gist:6589159
def guardar_noticia(request):
if request.method=='POST':
titulo = request.POST['titulo']
autor = request.POST['autor']
texto = request.POST['texto']
usuario = request.POST['usuario']
if usuario.isdigit():
return HttpResponseRedirect('/')
else:
noticia = Noticia(titulo=titulo, autor=autor, texto=texto, usuario=User(usuario))
View gist:7455068
package w3bex;
import robocode.*;
import robocode.util.Utils;
import java.awt.geom.*;
public class cirujator extends AdvancedRobot {
// movimientos al azar, constantes y variables
static final double Maxima_Velocidad = 8;
static final double Margen_Pared = 25;
View gist:7455244
// $Id: RandomMovementBot.java,v 1.2 2004/01/04 18:52:08 peter Exp $
package EH.kms;
import robocode.*;
import robocode.util.Utils;
import java.awt.geom.*;
public class LightningStorm extends AdvancedRobot {
// random movement constants and variables
// Credit goes to PEZ for RandomMovementBot
static final double MAX_VELOCITY = 8;
@manuel14
manuel14 / gist:7455806
Created Nov 13, 2013
cirujator.java corregido
View gist:7455806
package w3bex;
import robocode.*;
import robocode.util.Utils;
import java.awt.geom.*;
public class cirujator extends AdvancedRobot {
// movimientos al azar, constantes y variables
static final double Maxima_Velocidad = 8;
static final double Margen_Pared = 25;
View comprobar y funcion js
@csrf_exempt
def comprobar(request):
usuario = request.POST["user"]
password = request.POST["pass"]
user = authenticate(username=usuario, password= password)
if user is not None:
return HttpResponse(simplejson.dumps(True))
else:
return HttpResponse(simplejson.dumps(False))
View vista y js y html
(vista)
def comprobar(request):
usuario = request.POST["user"]
password = request.POST["pass"]
user = authenticate(username=usuario, password= password)
if user is not None:
return HttpResponse(simplejson.dumps(True), context_instance=RequestContext(request))
else:
return HttpResponse(simplejson.dumps(False), context_instance=RequestContext(request))
View transporteconverter
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Converters;
import dacs.dao.TransporteFacade;
import dacs.models.Transporte;
View transporteconverter
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Converters;
import dacs.dao.TransporteFacade;
import dacs.models.Transporte;
You can’t perform that action at this time.