win.print = function() {
var accum = [];
for (var i = 0; i != arguments.length; i++)
accum.push(String(arguments[i]));
var joined = accum.join("");
env.output(DIV(null, preNewline != "\n" ? joined.replace(/\n/g, preNewline) : joined));
};
<?php
header('Content-type: text/plain;');
$xml = '
<doc>
<elem>
<name>belykrolik</name>
<owner color="blue">golov</owner>
<disk used="124" limit="1024"/>
<bandwidth used="24" limit="100000000"/>
<disabled/>
<preset>test</preset>
<note>01/02/2014</note>
</elem>
<elem>
<name>belykrolik2</name>
<owner color="blue">golov</owner>
<disk used="124" limit="1024"/>
<bandwidth used="24" limit="100000000"/>
<preset>test</preset>
<note>01/02/2014</note>
</elem>
</doc>';
$ar = array();
$i = 0;
$x = simplexml_load_string($xml);
foreach($x->elem as $elem)
{
$ar[$i]['name'] = (string)$elem->name;
$ar[$i]['disabled'] = (bool)$elem->disabled;
$i++;
}
var_dump($ar);
array(2) {
[0]=>
array(2) {
["name"]=>
string(10) "belykrolik"
["disabled"]=>
bool(true)
}
[1]=>
array(2) {
["name"]=>
string(11) "belykrolik2"
["disabled"]=>
bool(false)
}
}
class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {
/**
* Generate a Response for the 404 Exception.
*
* The user should be shown a nice 404 page.
*
* @return Response
*/
public function get_response()
{
$view = View::factory('errors/404');
// Remembering that `$this` is an instance of HTTP_Exception_404
$view->message = $this->getMessage();
$response = Response::factory()
->status(404)
->body($view->render());
return $response;
}
}
SELECT userid FROM user_options WHERE optionid IN (2, 3) GROUP BY userid HAVING COUNT(*) = 2
SELECT o1.userid FROM user_options o1
INNER JOIN user_options o2 ON o1.userid = o2.userid AND o2.optionid = 3
WHERE o1.optionid = 2
this.init = function() {
console.log(this, this_);
this.second();
}
this.second = function() {
}
this.init()
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
<XRD>
<Service priority="0">
<Type>http://specs.openid.net/auth/2.0/server</Type>
<Type>http://openid.net/srv/ax/1.0</Type>
<Type>http://specs.openid.net/extensions/ui/1.0/mode/popup</Type>
<Type>http://specs.openid.net/extensions/ui/1.0/icon</Type>
<Type>http://specs.openid.net/extensions/pape/1.0</Type>
<URI>https://www.google.com/accounts/o8/ud</URI>
</Service>
</XRD>
</xrds:XRDS>