function testit() {
echo "$1"
[ -n "$1" ] && return;
echo $__FUNCNAME__ "ok"
}
testit
function testit() {
if (arguments.length>1 && arguments[1]<2) {
console.log(arguments[0], arguments[1]);
arguments.callee("offtop", arguments[1]+1);
} else {
console.log("no arguments left");
}
}
testit("test", 1);
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="p">
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="dialog">
<p class="dialog">
<xsl:for-each select="./*|./text()">
<xsl:choose>
<xsl:when test="self::text()">
<xsl:value-of select="normalize-space(.)" />
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
<xsl:copy>
<xsl:copy-of select="./text()"/>
</xsl:copy>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</p>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<p>Lorem ipsum dolor sit amet,</p>
<p>Quibusdam dolore iure deleniti quasi accusantium non nostrum facere neque ducimus
mollitia et ex suscipit, placeat, eius maiores ratione cumque. <b>Provident</b> doloribus
natus perspiciatis quas id sequi neque, molestiae cupiditate facere quod. Dolore voluptate
consectetur:</p>
<p>aperiam nihil.</p>
<p class="dialog">aperiam nihil. aperiam <b>123</b> nihil. aperiam nihil. <b>123</b> </p>
Access-Control-Allow-Origin: http://hub.host
Access-Control-Allow-Credentials: true
Content-Type: application/json; charset=utf-8
$('#form').submit(function(e) {
var $form = $(this);
console.log($form.serialize());
return false;
...
});
var_dump($_POST); die();
class Auth:
_instance = None;
def __init__(self, user, pswd):
# some initialization
self._id = None
pass
def getId(self):
return self._id
@staticmethod
def getInstance(user, pswd):
if Auth._instance is None:
Auth._instance = Auth(user, pswd)
return Auth._instance
# later use authorization as Auth.getInstance().getId();
switch($a){
case "one":
case "two":
case "three":
// your code
}
if (strpos(":"+$a+":", ":one:two:three:space ship:") !== FALSE) {
// your code here
}