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 time | |
time.time() | |
#-> 1324305354.0857329 |
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
.popup{ | |
transition-property: top; | |
transition-duration:2s; | |
top:-1000px | |
} | |
.popup.showing{ | |
top:50px; | |
} |
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
//25 frames per sec | |
var framerate=1000 / 25; | |
function move(){ | |
$.each(myObjects, function(index, obj) { | |
//do stufs with obj | |
}); | |
redraw(); | |
setTimeout(move,framerate); | |
} |
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
<style type="text/css"> | |
#dessin{ width: 960px; height:785px; position:relative; } | |
#dessin #canvasContainer{ width: 100%; height:100%; position:absolute; z-index:2; } | |
#dessin #htmlDrawContainer{ width: 100%; height:100%; position:absolute; z-index:2; } | |
#dessin #htmlDrawContainer a{ position:absolute; display:block; } | |
</style> | |
<div id="dessin"> | |
<div id="canvasContainer"><!--canvas will be here--></div> | |
<div id="htmlDrawContainer"></div> | |
</div> |
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
var canvasContainer = document.getElementById("canvasContainer"); | |
var canvas = document.createElement('canvas'); | |
canvas.setAttribute("id", "canvas"); | |
canvas.setAttribute("width", 960); | |
canvas.setAttribute("height", 785); | |
canvasContainer.appendChild(canvas); | |
if (typeof(G_vmlCanvasManager) != 'undefined') | |
canvas = G_vmlCanvasManager.initElement(canvas); | |
ctx=canvas.getContext("2d"); |
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 os | |
import sys | |
appName="myApp" #change this with your application name | |
#this way, you can use "import myfile" instead of "import myproject.myapp.myfile" everywhere in your app. | |
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), appName))) | |
os.environ['DJANGO_SETTINGS_MODULE'] = appName+'.settings' | |
import django.core.handlers.wsgi | |
application = django.core.handlers.wsgi.WSGIHandler() |
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
# | |
# see http://ggendre.posterous.com/django-mini-localized-db-values for details | |
# | |
# -*- coding: utf-8 -*- | |
from django.db import models | |
from django.utils.translation import gettext as _ | |
import settings | |
import utils | |
from django.utils import translation |
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
SELECT user.* | |
FROM user, (SELECT * FROM user) AS doublons | |
WHERE user.nom = doublons.nom | |
AND user.prenom = doublons.prenom | |
AND user.id!=doublons.id |
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
SELECT user.* | |
FROM user, | |
(SELECT id_user | |
FROM user | |
GROUP BY id_user | |
HAVING count( * ) >1 | |
) doublons | |
WHERE user.id_user = doublons.id_user; |
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
<noscript> | |
<link rel="stylesheet" type="text/css" href="css/noscript.css" /> | |
</noscript> |