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
//esto es en android en la welcomeActivity | |
String userId = currentUser.getObjectId(); | |
final HashMap<String, Object> params = new HashMap<>(); | |
params.put("id", userId); | |
ParseCloud.callFunctionInBackground("getTeam", params, new FunctionCallback<ParseObject>() { | |
public void done(ParseObject o, ParseException e) { | |
if (e == null) { | |
Toast.makeText(getApplicationContext(), |
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
/* | |
* 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; |
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
/* | |
* 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; |
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
(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)) |
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
@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)) |
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 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; |
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
// $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; |
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 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; |
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
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)) |
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
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 |
NewerOlder