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.middleware import locale | |
from django.utils import translation | |
class QueryParameterLocaleMiddleware(locale.LocaleMiddleware): | |
""" | |
Django's LocaleMiddleware picks the locale setting of the request from | |
multiple sources such as a cookie, Accept-Language header and server-side | |
session. | |
This middleware adds one more way to specify the language by supplying |
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 pqueue import PersistentQueue | |
q1 = PersistentQueue("/tmp/queue_storage_dir") | |
q1.put("1") | |
q1.put("2") | |
q1.put("3") | |
q1.close() | |
q2 = PersistentQueue("/tmp/queue_storage_dir") | |
while not q2.empty(): |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
typedef unsigned int u32; | |
typedef unsigned long long u64; | |
//------------------------------------------------------------------------- | |
// WorkArea | |
//------------------------------------------------------------------------- |
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
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script> |