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
Circle of Despair | |
Righteous War |
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<vector> | |
#include<iterator> | |
//#include "exceptions.h" | |
using namespace std; | |
template <class I, class T> | |
class SparseArray { | |
private: | |
vector<pair<I, T> > values; | |
bool exists(I position); |
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 c34aa1bc6858bffc1d3db0470e4f33c4428f6c31 Mon Sep 17 00:00:00 2001 | |
From: Richard Marko <[email protected]> | |
Date: Thu, 15 Jul 2010 16:16:56 +0200 | |
Subject: [PATCH] Convert css class of PasswordInput widget | |
--- | |
uni_form/templatetags/uni_form_field.py | 3 ++- | |
1 files changed, 2 insertions(+), 1 deletions(-) | |
diff --git a/uni_form/templatetags/uni_form_field.py b/uni_form/templatetags/uni_form_field.py |
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 custom_create(request, *args, **kwargs): | |
''' update __init__ of the form class to use current user as initial ''' | |
form_class = kwargs['form_class'] | |
class custom_class(form_class): | |
def __init__(self, *args, **kwargs): | |
kwargs['initial'] = {'user': request.user.id} | |
return super(custom_class, self).__init__(*args, **kwargs) | |
kwargs['form_class'] = custom_class |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; General Options ; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Specify a file into which sidc will write messages. This file is written | |
; using open/append/close, so that you can apply a straightforward log rotate | |
; policy | |
logfile /data/projects/sid/sidc/sidc.log | |
; Specify a directory to contain output data files. Use '.' for the |
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
<?php | |
$txt = 'abcd ***animation(text1|text2) defg ***animation(txt1|txt2)'; | |
function replace_anim($matches) { | |
return '[[Replaced: 1-"'.$matches[1].'"-2-"'.$matches[2].'"]]'; | |
} | |
$ret = preg_replace_callback('~\*\*\*animation\(([^|]+)\|([^|]+)\)~', "replace_anim", $txt); | |
echo $ret; | |
?> |
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
set sliceoptscommand deslicer_pronterface_cfg | |
set slicecommand deslicer_pronterface $s $o | |
set port /dev/ttyUSB0 | |
set baudrate 250000 | |
set last_bed_temperature 105.0 | |
set last_temperature 195.0 | |
set xy_feedrate 3000 | |
set z_feedrate 3000 | |
set e_feedrate 50 |
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
yumParser :: Parser [YumMsg] | |
yumParser = (many $ yumEntryParser <* endOfLine) | |
yumEntryParser = | |
Separator <$> takeWhile (=='=') | |
-- Separator <$> string "===" | |
<|> Message <$> takeTill isEndOfLine |
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
#!/bin/bash | |
WP_DIR=/var/www/<FIXME> | |
/usr/local/bin/wp --path=$WP_DIR core check-update --quiet | |
if [ "$?" != "0" ]; then | |
Wordpress update required | |
/usr/local/bin/wp --path=$BLOG_DIR core check-update | |
fi |
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
# for crontab. e.g.: | |
# 5 5 * * * /root/bin/wp_check_update | |
BLOG_DIR=/var/www/<INSERT_BLOG_PATH> | |
wp --path=$BLOG_DIR core check-update --quiet | |
if [ "$?" != "0" ]; then | |
Wordpress update required | |
wp --path=$BLOG_DIR core check-update | |
fi |
OlderNewer