This file contains hidden or 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
meal = get_object_or_404(Meal, id=meal_id) | |
date_dictionary = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'] | |
mealdate = date_dictionary[meal.date.weekday()] |
This file contains hidden or 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
@login_required | |
def new_reservation(request, chef_id, template_name="reservation/newreservation.html"): | |
chef = get_object_or_404(Chef, id=chef_id) | |
form = ReservationForm(request.POST or None) | |
form.data = { "guest":request.user.id,"meal":chef.meal } | |
if request.method == 'POST': | |
if form.is_valid(): | |
reservation = form.save(commit=False) | |
reservation.guest = request.user | |
reservation.save() |
This file contains hidden or 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 calculator() = function{ | |
this.multi() { | |
var digs = 0; | |
for (var i = 0, i < digs.length; i ++) { | |
digs *= digs.length[i]; | |
{ | |
console.log(digs) | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<script type = "text/javascript"> | |
if (window.addEventListener) { | |
window.addEventListener("load",emile, false); | |
} else if (window.attachEvent) { | |
window.attachEvent("onload", emile); | |
} else { | |
window.onload=emile; | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<script type = "text/javascript"> | |
function emile() { | |
for ( var i = 1; i <= 200; i++) { | |
if (i%7 == 0 && i%4 ==0) { | |
document.write( "<p>" + i + " : Rickroll</p>") | |
} else if (i%7 == 0) { | |
document.write("<p>" + i + " : Rick</p>") | |
} else if (i%4 == 0) { |
This file contains hidden or 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
:javascript | |
|$(document).ready(function() { | |
| var client = new simplegeo.ContextClient('XXX'); | |
| function printlocation(err, position) { | |
| if (err) { | |
| $("#location").text("Unable to load location: " + err); | |
| } else { | |
| var coords = position.coords; | |
| $("#location").text("Your location is lat: " + coords.latitude + ", lon: " + coords.longitude ) |
This file contains hidden or 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
:javascript | |
|$(document).ready(function() { | |
| var client = new simplegeo.ContextClient('XXX'); | |
| function printlocation(err, position) { | |
| if (err) { | |
| $("#location").text("Unable to load location: " + err); | |
| } else { | |
| var coords = position.coords; | |
| $("#location").text("Your location is lat: " + coords.latitude + ", lon: " + coords.longitude ) |
This file contains hidden or 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
emilepetrone@~/code/node: make test | |
Waf: Entering directory `/Users/emilepetrone/code/node/build' | |
DEST_OS: darwin | |
DEST_CPU: x64 | |
Parallel Jobs: 1 | |
Product type: program | |
Waf: Leaving directory `/Users/emilepetrone/code/node/build' | |
'build' finished successfully (0.096s) | |
python tools/test.py --mode=release simple message | |
=== release test-tls-securepair-client === |
This file contains hidden or 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
{% for want in wants %} | |
{% if want.body_html %} | |
<div id="want"> | |
{{ want.body_html|truncatewords_html:"50"|safe }} | |
{% endif %} | |
<a href="{% url individual_want want.id %}">Read the full request</a> | |
<p>Tags: {% for tag in want.tags %}{{ tag }}{% endfor %}</p> | |
{{ want.mentee}} - {{ want.pub_date|date:"F j, Y" }} - |
This file contains hidden or 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
{% for want in wants %} | |
{% if want.body_html %} | |
<div id="want"> | |
{{ want.body_html|truncatewords_html:"50"|safe }} | |
{% endif %} | |
<a href="{% url individual_want want.id %}">Read the full request</a> | |
<p>Tags: {% for tag in want.tags %}{{ tag }}{% endfor %}</p> | |
{{ want.mentee}} - {{ want.pub_date|date:"F j, Y" }} - |