Person | Present |
---|---|
io | sono |
tu | sei |
lui/lei | è |
noi | siamo |
voi | siete |
loro | sono |
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
goog.provide('events_tutorial.Events'); | |
goog.require('goog.events.Event'); | |
goog.require('goog.events.EventTarget'); | |
events_tutorial.Events = new goog.events.EventTarget(); | |
events_tutorial.Events.ChangeColorEvent = function() { | |
goog.events.Event.call(this, 'CHANGECOLOR'); | |
}; |
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
goog.provide('events_tutorial'); | |
goog.require('lime.Director'); | |
goog.require('lime.Scene'); | |
goog.require('lime.Layer'); | |
goog.require('lime.Label'); | |
goog.require('lime.animation.FadeTo'); | |
goog.require('lime.animation.Spawn'); | |
goog.require('lime.animation.ScaleTo'); |
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
goog.provide('events_tutorial.ColoredSprite'); | |
goog.require('lime.Sprite'); | |
goog.require('lime.animation.ColorTo'); | |
goog.require('events_tutorial.Events'); | |
events_tutorial.ColoredSprite = function(width, height) { | |
goog.base(this); |
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
from django.template import loader, Context | |
from django.utils.safestring import mark_safe | |
class MyWidget(forms.RadioSelect.renderer): | |
def render(self): | |
'''Outputs radios''' | |
t = loader.get_template('my_widget.html') | |
c = Context({"radios": self, | |
"name": self.name}) | |
return mark_safe(t.render(c)) |
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
from datetime import datetime, timedelta | |
created_at = datetime(2012, 12, 19, 13, 5, 20, 213002) | |
if created_at >= datetime.now - timedelta(days=14): | |
print "two weeks has past since created_at" |
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 getLocationMap(): | |
locations=Location.objects.all().order_by('-date') | |
location_array={} | |
for location in locations: | |
location_array[location.id]=[str(location.longitude),(location.latitude),location.note,location.title] | |
return location_array | |
//JAVASCRIPT | |
var location_array= $.parseJSON("{{ location_array }}"); |
A MultiWidget is a widget that contains more than one widget and bundles it into one. Sometimes you require two or more inputs from the user where the data is not mutually exclusive. For example the expiry date on a credit card or a phone number with the area code.
This blog post will show and explain how to create a MultiWidget for an expiry date that accepts a month and a year.
Creating a MultiWidget is similar to creating a custom Widget. Here is the code for an expiry date multiwidget that accepts two values the month and year that a credit card expires.
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 { | |
listen 80; | |
server_name <url>; | |
root /var/www/html; | |
location / { |