match(10) {
w < 10 => print('x is less than 10');
x > 10 => print('x is greater than 10');
10 => print('x is equal to 10');
}
split p [] = ([],[]) | |
split p (x:xs) = if p x then (x : ys, zs) | |
else (ys, x : zs) | |
where (ys, zs) = split p xs | |
isEven :: Int -> Bool | |
isEven number = number `mod` 2 == 0 |
'use strict'; | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const production = process.env.NODE_ENV === 'production'; | |
const babelPlugins = ['jsx-tagclass']; | |
const babelProdPlugins = babelPlugins.concat( | |
['transform-react-constant-elements', 'transform-react-inline-elements'] |
: | |
help = "Delete inactive users that has a expired activation key." | |
def handle(self, **options): | |
User.objects.filter(is_active=False, userprofile__key_expires__lte=now()).delete() |
(py34dj17)$ python manage.py test functional_tests | |
Creating test database for alias 'default'... | |
E | |
====================================================================== | |
ERROR: test_can_login_via_oauth (functional_tests.test_login_via_oauth.LoginViaOauthTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Users/drager/toerh/functional_tests/test_login_via_oauth.py", line 7, in test_can_login_via_oauth | |
self.login() |
This guide will explain how you can make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier.
We will also explain how the process can be automatically started each time you log in to your Mac and ensure the connection to the server is kept alive.
# -*- coding: utf-8 -*- | |
from django.template.defaultfilters import slugify | |
from django.core.urlresolvers import reverse | |
from notifications import notify | |
def notify_topic_subscribers(post): | |
topic = post.topic | |
for user in topic.subscribers.all(): |