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
fitoria@fitoria-laptop:~/code$ git clone git://labs.trolltech.com/qt-creator #bajamos qt creator desde el repositorio git | |
fitoria@fitoria-laptop:~/code$ cd qt-creator | |
fitoria@fitoria-laptop:~/code/qt-creator$ qmake -v #comprobamos si la version de qmake es la correcta. | |
QMake version 2.01a | |
Using Qt version 4.5.0-rc1 in /usr/local/Trolltech/Qt-4.5.0-rc1/lib | |
fitoria@fitoria-laptop:~/code/qt-creator$ qmake qtcreator.pro | |
fitoria@fitoria-laptop:~/code/qt-creator$ make | |
fitoria@fitoria-laptop:~/code/qt-creator$ make install ## como root |
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
/* 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; |
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
:⌉ | |
=⌉ | |
¦-) as opposed to | | |
☺ | |
☹ | |
☻ | |
⍣ | |
⍤ | |
⍥ om nom nom | |
⍨ |
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
#context manager para el menú. | |
from django.core.cache import cache | |
from models import Menu | |
def menu_context_manager(request): | |
#probamos si esta el elemento en caché | |
valor = cache.get('menu') | |
#si no está leemos de la base de datos | |
if not valor: |
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
server { | |
#redirigiendo feed | |
rewrite ^/feed/ /feed.rss.xml permanent; | |
#redirigiendo about | |
rewrite ^/about/ /about.html permanent; | |
#redirigiendo feed de categoria | |
rewrite ^/category/([a-z-\d-\¿-\¡]+)/feed/ /category/$1.rss.xml permanent; | |
location / { | |
#redirigiendo entradas viejas hacia urls nuevas (solo se agrega el .html) |
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
Categories: {% for category in article.categories %} <a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a>, {%endfor%} |
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
import pygame | |
import sys | |
OLPC_SCREEN_SIZE = (640, 480) | |
BLANCO = (255, 255, 255) | |
AZUL = (0, 0, 255) | |
AMARILLO = (255, 255, 0) | |
class Main(object): |
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
{%ifequal user.tipo 'profesional'%} | |
<div class="btn-group user-button"> | |
<button class="btn btn-primary"><i class="icon-user"></i>{{user.get_full_name}}</button> | |
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> | |
<span class="caret"></span> | |
</button> | |
<ul class="dropdown-menu"> | |
<li><a href="{% url mis-notificaciones %}"><i class=""></i> Notificaciones</a></li> | |
<li><a href="{{user.get_absolute_url}}"><i class=""></i> Ver mi perfil</a></li> | |
<li><a href="{% url perfil-editar user.perfil.id %}"><i class=""></i> Editar mis datos</a></li> |
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 AfiliacionNacionalCreateView(CreateView): | |
model = AfiliacionNacional | |
form_class = AfiliacionNacionalForm | |
success_url = reverse_lazy('afiliacionnacional-list') | |
def form_valid(self, form): | |
messages.info(self.request, 'Afiliacion creado', extra_tags='alert alert-success') | |
return super(AfiliacionNacionalCreateView, self).form_valid(form) | |
class AfiliacionNacionalDeleteView(DeleteView): |
NewerOlder