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
diff --git a/src/pkg/encoding/xml/read.go b/src/pkg/encoding/xml/read.go | |
index c216824..09f0d85 100644 | |
--- a/src/pkg/encoding/xml/read.go | |
+++ b/src/pkg/encoding/xml/read.go | |
@@ -451,6 +451,51 @@ func (p *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []str | |
Loop: | |
for i := range tinfo.fields { | |
finfo := &tinfo.fields[i] | |
+ if finfo.flags&fAttr != 0 { | |
+ if len(finfo.parents) > len(parents) + 1 { |
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
function View(template, model, parentNode) { | |
this.model = model | |
this.parentNode = null | |
this.bindings = {} | |
this.node = document.importNode(template.content, true) | |
this.childNodesSlice = Array.prototype.slice.apply(this.node.childNodes) | |
this.discoverNodes(this.node.childNodes) | |
this.setupObserve() |
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 | |
URLS_FILE=$1 | |
while read URL; do | |
TIME=`curl --silent -w '%{time_total}' -o /dev/null $URL` | |
echo "${TIME}s $URL" | |
done <$URLS_FILE |
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
<!-- http://htmlbook.ru --> | |
<!-- Sublime Text 3 --> | |
<html> | |
<head> | |
<meta charset="utf8"> | |
<title>Moneycalc</title> | |
<style> | |
* { |
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
web: vendor/bin/heroku-php-nginx -C app_nginx.conf -F app_php-fpm.conf app | |
verstat: cd verstat ; npm install ; verstat --exec-after-generate 'cd .. ; ./verstat2wp.sh' serve |
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
[ | |
{ | |
id: "burger-grill-bbq", | |
category: "Бургеры", | |
title: "Бургер с грилловаными овощами с соусом BBQ", | |
thumb: "http://placehold.it/350x260", | |
price: 28, | |
weight: 128, | |
nutrition: ['бургер', 'гриллованые овощи', 'соус BBQ', 'дизайн', 'верстка'], | |
addables: ['cheeses', 'cutlet'] |
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
{"s":1,"t":1407963842576,"m":"[etcd] Aug 13 21:04:02.575 INFO | Discovery via https://discovery.etcd.io using prefix /[cut].\n"} | |
{"s":1,"t":1407963842975,"m":"[etcd] Aug 13 21:04:02.975 WARNING | Discovery encountered an error: Discovery found an initialized cluster but no reachable peers are registered.\n"} | |
{"s":1,"t":1407963842975,"m":"[etcd] Aug 13 21:04:02.975 WARNING | \u003cno value\u003e failed to connect discovery service[https://discovery.etcd.io/[cut]] Discovery found an initialized cluster but no reachable peers are registered.\n[etcd] Aug 13 21:04:02.975 CRITICAL | \u003cno value\u003e, the new instance, must register itself to discovery service as required\n"} | |
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 | |
error_reporting(E_NONE); | |
$cnt = 100; | |
$t1 = microtime(true); | |
$a = 4; | |
for ($i=1; $i<=$cnt; $i++) { if ($a) { 1+1; } } | |
$t2 = microtime(true); | |
unset($a); | |
for ($i=1; $i<=$cnt; $i++) { if ($a) { 1+1; } } |
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 | |
URLS_FILE=$1 | |
while read URL; do | |
TIME=`curl --silent -w '%{time_total}' -o /dev/null $URL` | |
echo "${TIME}s $URL" | |
done <$URLS_FILE |
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 | |
/* | |
* tr – translation helper | |
* examples: | |
* tr("Hello") -> "Привіт" // simply translates given string | |
* tr("%s products", $category) -> "Продукти категорії " // translates format and uses sprintf for substitutions | |
* tr(array("%d comment", "%d comments"), $commentCount) -> "1 comment" // pluralized format version | |
*/ | |
function tr() { |
NewerOlder