<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3682681908977789735</id><updated>2024-09-12T11:06:23.140+05:30</updated><category term="javascript"/><category term="Mysql"/><category term="Ajax"/><category term="Comet"/><category term="Server Push"/><category term="long Lived AJAX"/><category term=".ascx"/><category term=".ascx load dynamically"/><category term=".net Ajax Events"/><category term="ASP.NET Update Panel"/><category term="C# to JSON String"/><category term="COMET or Reverse Ajax"/><category term="Custom events in C#"/><category term="DataTable"/><category term="DataTable to JSON"/><category term="Delegate Events"/><category term="Dynamically"/><category term="Event Handling"/><category term="Events"/><category term="Fulltext"/><category term="Get"/><category term="HTML5 websocket api"/><category term="Hierarchical queries in MySQL"/><category term="Indexing"/><category term="JSON"/><category term="Long Polling"/><category term="Manage Trees"/><category term="Match Against Mysql"/><category term="Mysql indexing and searching"/><category term="POST"/><category term="Post in c#"/><category term="Request"/><category term="Request complete event"/><category term="Reverse AJAX"/><category term="SSE"/><category term="Streaming in internet explorer"/><category term="Tree structures in MySql"/><category term="Unique two columns"/><category term="Update Panel"/><category term="Update Panel Ajax Request complete event"/><category term="Url writing"/><category term="What is PHP"/><category term="apply"/><category term="apply()"/><category term="c#"/><category term="call"/><category term="call()"/><category term="call() and  apply() e"/><category term="change url without reloading the page"/><category term="client sided url writing"/><category term="comet internet explorer fix"/><category term="cover image from youtube different methods"/><category term="create events in c#"/><category term="create modal in xcode"/><category term="custom control Dynamically to a page in ASP.NET"/><category term="facebook"/><category term="function"/><category term="function.apply()"/><category term="function.call()"/><category term="get video image from youtube"/><category term="google+"/><category term="ios"/><category term="linkedin"/><category term="modal"/><category term="modal window in ios"/><category term="php"/><category term="pop up"/><category term="recieve atguments"/><category term="retrival of images from youtube"/><category term="searching"/><category term="server sent events"/><category term="sharing"/><category term="sharing links"/><category term="sharing widget"/><category term="social sharing links"/><category term="social widget"/><category term="tmbler"/><category term="twitter"/><category term="unique constraint"/><category term="unique constraint on multiple columns"/><category term="url change without reloading"/><category term="websockets"/><category term="x-code"/><category term="youtube cover images"/><title type='text'>code.extend()</title><subtitle type='html'>  // Solve the problems you will face during the development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-7004418225085107433</id><published>2013-11-11T16:46:00.001+05:30</published><updated>2013-11-11T16:50:00.975+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="apply"/><category scheme="http://www.blogger.com/atom/ns#" term="apply()"/><category scheme="http://www.blogger.com/atom/ns#" term="call"/><category scheme="http://www.blogger.com/atom/ns#" term="call()"/><category scheme="http://www.blogger.com/atom/ns#" term="call() and  apply() e"/><category scheme="http://www.blogger.com/atom/ns#" term="function"/><category scheme="http://www.blogger.com/atom/ns#" term="function.apply()"/><category scheme="http://www.blogger.com/atom/ns#" term="function.call()"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Javascript Function call() and  apply() explained</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;First of all&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;every function in JavaScript is an object&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;which has some methods attached to it some are&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;toString(), call(),&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; and &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Read &lt;/span&gt;&lt;a href=&quot;http://odetocode.com/Articles/473.aspx&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this&lt;/a&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; article if you wonder what the difference is between a function and a method.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Every JavaScript object has a&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;toString()&lt;/span&gt; &lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;method&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;,&lt;/i&gt; for example, and we can use the &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;toString()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; method on a function object to see its source code:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;function foo()
{
    alert(&#39;x&#39;);
}
&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
alert(foo.toString());&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Because functions are objects they can have their own properties and methods, and we can treat them like data. &quot;Functions as data&quot; is important to remember for the next post, too, but for now we&#39;ll focus on two of a function&#39;s methods: &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;, and its counterpart:&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; call()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;Let&#39;s start with the following code:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;var x = 10;

function f()
{
    alert(this.x);
}

f();&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Here we have a global function by the name of &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;f(). f()&lt;/span&gt; &lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;uses the &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; keyword to reference &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;x&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;, but notice we don&#39;t invoke the function through an instance of an object. So what object does &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this &lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;reference? &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; will reference the global object. The global object is where we defined the variable x. The above code does work and will show the value 10 in a dialog.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Both &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;call()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; and &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; are methods we can use to assign the &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; pointer for the duration of a method invocation. As an example, here is how we could use the &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;call()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; method:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;var x = 10;
var o = { x: 15 };

function f()
{
    alert(this.x);
}

f();
f.call(o);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The first invocation of &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;f()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; will display the value of 10, because &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; references the global object. The second invocation (via the &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;call&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; method) however, will display the value 15. 15 is the value of the&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; x&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; property inside object &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;. The &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;call() &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;method invokes the function and uses its first parameter as the &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; pointer inside the body of the function. In other words - &lt;/span&gt;&lt;strong style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;we&#39;ve told the runtime what object to reference as&lt;/strong&gt; &lt;strong style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;em&gt;this&lt;/em&gt; &lt;/strong&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;while executing inside of function &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;f()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;Fiddling with the &lt;em&gt;this&lt;/em&gt; pointer might sound funny, even perverse, to C++, Java, and C# programmers. What&#39;s next? Dogs sleeping with cats? Working nVidia drivers for Windows Vista? It&#39;s all part of the fun that is ECMAScript.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;We can also pass arguments to the target function via &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;call()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;var x = 10;
var o = { x: 15 };
function f(message)
{
    alert(message);
    alert(this.x);
}

f(&quot;invoking f&quot;);
f.call(o, &quot;invoking f via call&quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; method is identical to &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;call()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;, except &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; requires an array as the second parameter. The array represents the arguments for the target method.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;f(&quot;invoking f&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;f.apply(o, [&quot;invoking f through apply&quot;]);
&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply() &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;method is useful because we can build a function like createDelegate (from the last post) that doesn&#39;t care about the signature of the target method. The function can use &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; to pass all additional arguments to the target method via an array.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;var o = { x: 15 };

function f1(message1)
{
    alert(message1 + this.x);
}

function f2(message1, message2)
{
    alert(message1 + (this.x * this.x) + message2);
}

function g(object, func, args)
{
    func.apply(object, args);
}

g(o, f1, [&quot;the value of x = &quot;]);
g(o, f2, [&quot;the value of x squared = &quot;, &quot;. Wow!&quot;]);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The problem here is the awkward syntax. We are forcing the caller to stuff arguments into an array just so we call &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;. Fortunately, there is a way to make the syntax easier, but we have to introduce one more topic: the &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;arguments&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; identifier.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;In JavaScript, every function essentially has a variable length argument list. The means we can pass 5 parameters to a function even if the function only uses one argument. The following runs without error and displays &quot;H&quot;:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;function f(message)
{
    alert(message);
}

f(&quot;H&quot;, &quot;e&quot;, &quot;l&quot;, &quot;l&quot;, &quot;o&quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;If we did want to access the other arguments from inside &lt;em&gt;f()&lt;/em&gt;, we can use the arguments keyword. &lt;em&gt;arguments&lt;/em&gt; references an Arguments object, which has a length property and feels like an array.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;function f(message)
{
    // message param is the same as arguments[0]    
   
    for(var i = 1; i &amp;lt; arguments.length; i++)
    {
        message += arguments[i];
    }
    
    alert(message); 
}

// this will say &quot;Hello&quot;
f(&quot;H&quot;, &quot;e&quot;, &quot;l&quot;, &quot;l&quot;, &quot;o&quot;);&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Just so you know, &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;arguments&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; is technically not an array, even if it walks and talks like one. a&lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;rguments &lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;has a length property but no &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;, push, or pop &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;methods. What we can do with &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; inside our previous &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;g()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; function is copy the incoming arguments after &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;arguments[1]&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; into an array object that we pass to &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;apply&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js; gutter: false; toolbar: false;&quot; style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;var o = { x: 15 };

function f(message1, message2)
{
    alert(message1 + (this.x * this.x) + message2);
}

function g(object, func)
{           
    // arguments[0] == object
    // arguments[1] == func
    
    
    var args = []; // empty array
    // copy all other arguments we want to &quot;pass through&quot; 
    for(var i = 2; i &amp;lt; arguments.length; i++)
    {
        args.push(arguments[i]);
    }

    func.apply(object, args);
}

g(o, f, &quot;The value of x squared = &quot;, &quot;. Wow!&quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;When we invoke&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; g()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;, we can pass additional arguments as parameters instead of stuffing the arguments into an array.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;At this point, we have the theoretical knowledge needed to understand &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;call&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; and &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;apply, &lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;but perhaps you are already asking a question: what if I don&#39;t want to immediately invoke the target function&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; f()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;? What if I just want to arrange all the players in this little drama so that I can invoke &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;f()&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; at some later point (as an event handler, for example), but still have &lt;/span&gt;&lt;em style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;this&lt;/em&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; referencing the desired object.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif; font-weight: normal;&quot;&gt;Using&amp;nbsp;&lt;code style=&quot;font-size: 20px;&quot;&gt;call&lt;/code&gt;&amp;nbsp;to invoke an anonymous function&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;font-size: 14px; line-height: 1.5em; margin-bottom: 1.286em; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Trebuchet MS, sans-serif;&quot;&gt;In this purely constructed example, we create anonymous function and use&amp;nbsp;&lt;code style=&quot;line-height: normal;&quot;&gt;call&lt;/code&gt;&amp;nbsp;to invoke it on every object in an array. The main purpose of the anonymous function here is to add a print function to every object, which is able to print the right index of the object in the array. Passing the object as&amp;nbsp;&lt;code style=&quot;line-height: normal;&quot;&gt;this&lt;/code&gt;&amp;nbsp;value was not strictly necessary, but is done for explanatory purpose.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #333333; color: white; padding: 10px;&quot;&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;var animals = [
{species: &#39;Lion&#39;, name: &#39;King&#39;},
&lt;br /&gt;{species: &#39;Whale&#39;, name: &#39;Fail&#39;}
];
&lt;br /&gt;&lt;br /&gt;for (var i = 0; i &amp;lt; animals.length; i++) &lt;br /&gt;{
&lt;br /&gt;(function (i) {
&lt;br /&gt;this.print = function () &lt;br /&gt;&amp;nbsp; {
&lt;br /&gt;&amp;nbsp; &amp;nbsp; console.log(&#39;#&#39; + i + &#39; &#39; + this.species + &#39;: &#39; + this.name);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;this.print();
&lt;br /&gt;}).call(animals[i], i);
}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;Hope this will help you understand, Feel free to ask anything&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/7004418225085107433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/11/javascript-function-call-and-apply.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/7004418225085107433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/7004418225085107433'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/11/javascript-function-call-and-apply.html' title='Javascript Function call() and  apply() explained'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-2284053804261377788</id><published>2013-07-02T18:08:00.000+05:30</published><updated>2013-11-11T16:54:31.532+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="create modal in xcode"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><category scheme="http://www.blogger.com/atom/ns#" term="modal"/><category scheme="http://www.blogger.com/atom/ns#" term="modal window in ios"/><category scheme="http://www.blogger.com/atom/ns#" term="pop up"/><category scheme="http://www.blogger.com/atom/ns#" term="x-code"/><title type='text'>IOS Xcode Create a modal window</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;
Create &amp;nbsp;a modal window for IOS application in Xcode&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;1. Create new view controller either programatically or using a nib file, design it the way you want your modal window to be.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;2. Name it&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New, Courier, monospace;&quot;&gt;youtubeplayer&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;(say).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;3. Import its header file into the main view controller (obviously).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;4. From the main view controller put the below code into any event. ( clicking of button, or table row selected etc.)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #444444; padding: 8px 5px; text-align: left;&quot;&gt;
&lt;div style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;youtubeplayer *yt = [[youtubeplayer alloc]&amp;nbsp; initWithNibName:&lt;span style=&quot;color: #e44448;&quot;&gt;@&quot;youtubeplayer&quot;&lt;/span&gt; bundle:[NSBundle mainBundle]];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; yt.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; yt.modalPresentationStyle = UIModalPresentationFormSheet;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #c2349b;&quot;&gt;self&lt;/span&gt; presentViewController:yt animated:&lt;span style=&quot;color: #c2349b;&quot;&gt;YES&lt;/span&gt; completion:^{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(&lt;/span&gt;@&quot;this is calleed&quot;&lt;span style=&quot;color: white;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;CGRect&lt;span style=&quot;color: white;&quot;&gt; r = &lt;/span&gt;CGRectMake&lt;span style=&quot;color: white;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #c2349b;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;.&lt;/span&gt;view&lt;span style=&quot;color: white;&quot;&gt;.&lt;/span&gt;bounds&lt;span style=&quot;color: white;&quot;&gt;.&lt;/span&gt;size&lt;span style=&quot;color: white;&quot;&gt;.&lt;/span&gt;width&lt;span style=&quot;color: white;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #8b84cf;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt; - &lt;/span&gt;&lt;span style=&quot;color: #8b84cf;&quot;&gt;350&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c2349b;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #00afca;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #00afca;&quot;&gt;bounds&lt;/span&gt;.&lt;span style=&quot;color: #00afca;&quot;&gt;size&lt;/span&gt;.&lt;span style=&quot;color: #00afca;&quot;&gt;height&lt;/span&gt;/&lt;span style=&quot;color: #8b84cf;&quot;&gt;2&lt;/span&gt; - &lt;span style=&quot;color: #8b84cf;&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #8b84cf;&quot;&gt;700&lt;/span&gt;, &lt;span style=&quot;color: #8b84cf;&quot;&gt;400&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; r = [&lt;span style=&quot;color: #c2349b;&quot;&gt;self&lt;/span&gt;.view convertRect:r toView:yt.view.superview.superview];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; yt.view.superview.frame = r;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Also now you will need a button on the modal window opened to close it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;simply create a button or what ever element you are comfortable with and put in the following code in it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div style=&quot;background-color: #444444; padding: 8px 5px;&quot;&gt;
&lt;div style=&quot;color: white;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;- (&lt;span style=&quot;color: #c2349b;&quot;&gt;IBAction&lt;/span&gt;)closeModal:(&lt;span style=&quot;color: #c2349b;&quot;&gt;id&lt;/span&gt;)sender {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #00afca;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #c2349b;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt; &lt;/span&gt;dismissModalViewControllerAnimated&lt;span style=&quot;color: white;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c2349b;&quot;&gt;YES&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: white;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;that&#39;s&amp;nbsp;it Now you are good to go.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;If need any help You can ask in comments.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Happy Coding :)&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/2284053804261377788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/07/ios-xcode-create-modal-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2284053804261377788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2284053804261377788'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/07/ios-xcode-create-modal-window.html' title='IOS Xcode Create a modal window'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-6922493426176722318</id><published>2013-07-01T18:52:00.001+05:30</published><updated>2013-11-11T16:59:32.545+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="cover image from youtube different methods"/><category scheme="http://www.blogger.com/atom/ns#" term="get video image from youtube"/><category scheme="http://www.blogger.com/atom/ns#" term="retrival of images from youtube"/><category scheme="http://www.blogger.com/atom/ns#" term="youtube cover images"/><title type='text'>Retrive the cover images of videos from YouTube</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Retrive the cover images of videos from YouTube&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Each YouTube video has 4 generated images. They are predictably formatted as follows:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/0.jpg&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/1.jpg&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/2.jpg&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/3.jpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The first one in the list is a full size image and others are thumbnail images. The default thumbnail image &lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;(ie. one of&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;1.jpg&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;2.jpg&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;3.jpg&lt;/code&gt;)&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt; is:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://img.youtube.com/vi/Jee4fqiczjM/default.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://img.youtube.com/vi/Jee4fqiczjM/default.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/default.jpg&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;For the high quality version of the thumbnail use a url similar to this:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://img.youtube.com/vi/Jee4fqiczjM/hqdefault.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://img.youtube.com/vi/Jee4fqiczjM/hqdefault.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: Georgia, Times New Roman, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/hqdefault.jpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;There is also a medium quality version of the thumbnail, using a url similar to the HQ:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://img.youtube.com/vi/Jee4fqiczjM/mqdefault.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://img.youtube.com/vi/Jee4fqiczjM/mqdefault.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: 100%;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #444444; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #444444; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #444444; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/mqdefault.jpg&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;For the maximum resolution version of the thumbnail use a url similar to this:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;(if it exists for certain videos youtube does not have a heigh resolution cover pic) .&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://img.youtube.com/vi/lwqFP66I0Cw/maxresdefault.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://img.youtube.com/vi/lwqFP66I0Cw/maxresdefault.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//img.youtube.com/vi/&amp;lt;insert-youtube-video-id-here&amp;gt;/maxresdefault.jpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;All of the above urls are available over https too. Just change&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;http&lt;/code&gt;&amp;nbsp;to&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; margin: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;https&lt;/code&gt;&amp;nbsp;in any of the above urls.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Alternatively, you can use the&amp;nbsp;&lt;a href=&quot;http://code.google.com/apis/youtube/2.0/developers_guide_php.html&quot; style=&quot;background-color: transparent; border: 0px; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;YouTube API&lt;/a&gt;&amp;nbsp;to get thumbnail images.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/6922493426176722318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/07/retrive-cover-images-of-videos-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/6922493426176722318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/6922493426176722318'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/07/retrive-cover-images-of-videos-from.html' title='Retrive the cover images of videos from YouTube'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-2302865428118326454</id><published>2013-03-01T02:08:00.000+05:30</published><updated>2013-11-11T17:06:34.238+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fulltext"/><category scheme="http://www.blogger.com/atom/ns#" term="Indexing"/><category scheme="http://www.blogger.com/atom/ns#" term="Match Against Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql indexing and searching"/><category scheme="http://www.blogger.com/atom/ns#" term="searching"/><title type='text'>MySQL FULLTEXT Indexing and Searching</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;entryBody&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;MySQL has supported&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;indexes since version&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;3.23.23&lt;/code&gt;.&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;VARCHAR&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;TEXT&lt;/code&gt;&amp;nbsp;Columns that have been indexed with&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;can be used with special SQL statements that perform the full text search in MySQL.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;To get started you need to define the&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;index on some columns. Like other indexes,&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;indexes can contain multiple columns. Here&#39;s how you might add a&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;index to some table columns:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #fbfbfb; border-left-color: silver; border-left-style: solid; border-left-width: 2px; overflow: auto; padding: 5px; width: 810px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ALTER TABLE news ADD FULLTEXT(headline, story);&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;Once you have a&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;index, you can search it using&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;MATCH&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;AGAINST&lt;/code&gt;&amp;nbsp;statements. For example:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: #fbfbfb; border-left-color: silver; border-left-style: solid; border-left-width: 2px; overflow: auto; padding: 5px; width: 810px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;SELECT headline, story FROM news
WHERE MATCH (headline,story) AGAINST (&#39;Hurricane&#39;);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The result of this query is automatically sorted by relevancy.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: small;&quot;&gt;
MATCH&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;MATCH&lt;/code&gt;&amp;nbsp;function is used to specify the column names that identify your&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;collection. The column list inside the&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;MATCH&lt;/code&gt;function must exactly match that of the&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;FULLTEXT&lt;/code&gt;&amp;nbsp;index definition, unless your search in boolean mode (see below).&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: small;&quot;&gt;
AGAINST&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;AGAINST&lt;/code&gt;&amp;nbsp;function is where your full text search query goes. Besides the default natural language search mode, you can perform&lt;em&gt;boolean mode&lt;/em&gt;&amp;nbsp;searches, and use&amp;nbsp;&lt;em&gt;query expansion&lt;/em&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;
Boolean Mode Searches&lt;/span&gt;&lt;/h4&gt;
&lt;pre style=&quot;background-color: #fbfbfb; border-left-color: silver; border-left-style: solid; border-left-width: 2px; overflow: auto; padding: 5px; width: 810px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;SELECT headline, story FROM news
WHERE MATCH (headline,story)
AGAINST (&#39;+Hurricane -Katrina&#39; IN BOOLEAN MODE);&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The above statement would match news stories about hurricanes but not those that mention hurricane katrina.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;See the MySQL&amp;nbsp;&lt;a href=&quot;http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html&quot;&gt;documentation&lt;/a&gt;&amp;nbsp;on Boolean Mode searches for more info.&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;
Query Expansion&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The&amp;nbsp;&lt;em&gt;Blind Query Expansion (or automatic relevance feedback)&lt;/em&gt;&amp;nbsp;feature can be used to expand the results of the search. This often includes much more noise, and makes for a very fuzzy search.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;In most cases you would use this operation if the users query returned just a few results, you try it again&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;WITH QUERY EXPANSION&lt;/code&gt;&amp;nbsp;and it will add words that are commonly found with the words in the query.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #fbfbfb; border-left-color: silver; border-left-style: solid; border-left-width: 2px; overflow: auto; padding: 5px; width: 810px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;SELECT headline, story FROM news
WHERE MATCH (headline,story)
AGAINST (&#39;Katrina&#39; WITH QUERY EXPANSION);&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;The above query might return all news stories about hurricanes, not just ones containing&amp;nbsp;&lt;em&gt;Katrina&lt;/em&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;A couple points about Full-Text searching in MySQL:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Searches are not case sensitive&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Short words are ignored, the default minimum length is 4 characters. You can change the min and max word length with the variables&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;ft_min_word_len&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;ft_max_word_len&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Words called&amp;nbsp;&lt;em&gt;stopwords&lt;/em&gt;&amp;nbsp;are ignored, you can specify your own stopwords, but default words include&amp;nbsp;&lt;em&gt;the&lt;/em&gt;,&amp;nbsp;&lt;em&gt;have&lt;/em&gt;,&amp;nbsp;&lt;em&gt;some&lt;/em&gt;&amp;nbsp;- see&amp;nbsp;&lt;a href=&quot;http://dev.mysql.com/doc/mysql/en/fulltext-stopwords.html&quot;&gt;default stopwords list&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;You can disable stopwords by setting the variable&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;ft_stopword_file&lt;/code&gt;&amp;nbsp;to an empty string.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Full Text searching is only supported by the&amp;nbsp;&lt;code style=&quot;background-color: #fbfbfb; padding: 1px;&quot;&gt;MyISAM&lt;/code&gt;&amp;nbsp;storage engine.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;If a word is present in more than 50% of the rows it will have a weight of zero. This has advantages on large datasets, but can make testing difficult on small ones.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/2302865428118326454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/02/mysql-fulltext-indexing-and-searching.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2302865428118326454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2302865428118326454'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/02/mysql-fulltext-indexing-and-searching.html' title='MySQL FULLTEXT Indexing and Searching'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-2388304287657159443</id><published>2013-02-15T19:47:00.002+05:30</published><updated>2013-11-11T17:15:07.020+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hierarchical queries in MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Manage Trees"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Tree structures in MySql"/><title type='text'>Hierarchical queries in MySQL, Tree structures</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Hierarchical queries in MySQL, Managing tree like structures&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 15px; padding: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;blockquote style=&quot;background-image: url(http://explainextended.com/wp-content/themes/journalist/images/quote.gif); background-position: 0% 0%; background-repeat: no-repeat no-repeat; border-style: none none solid; border-width: 1px; line-height: normal; margin: 0px 0px 20px; min-height: 50px; opacity: 0.7; padding: 0px 0px 0px 60px;&quot;&gt;
&lt;div style=&quot;line-height: 18px; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;I was wondering how to implement a&amp;nbsp;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;hierarchical query in MySQL&lt;/strong&gt;&amp;nbsp;(using the ancestry chains version) for a single row, such that it picks up the parents (if any) and any children (if any).&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;The idea is, I want to be able to jump in at any point, provide an Id of some sort, and be able to draw out the entire hierarchy for that Id, both upwards and downwards.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;We need to combine two queries here:&lt;/span&gt;&lt;/div&gt;
&lt;ol style=&quot;margin: 0px 0px 15px 30px; padding: 0px;&quot;&gt;
&lt;li style=&quot;margin: 0px 0px 5px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Original hierarchical query that returns all descendants of a given&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;id&lt;/code&gt;&amp;nbsp;(a descendancy chain)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 5px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;A query that would return all ancestors of a given&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;id&lt;/code&gt;&amp;nbsp;(an ancestry chain)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;An&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;id&lt;/code&gt;&amp;nbsp;can have only one&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;parent&lt;/code&gt;, that’s why we can employ a linked list technique to build an ancestry chain, like shown in this article:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;margin: 0px 0px 15px 30px; padding: 0px;&quot;&gt;
&lt;li style=&quot;margin: 0px 0px 5px; padding: 0px;&quot;&gt;&lt;a href=&quot;http://explainextended.com/2009/03/25/sorting-lists/&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Sorting lists&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Here’s the query to to this (no functions required):&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: sql&quot; style=&quot;background-color: #333333; color: #dddddd; font-family: &#39;Lucida console&#39;; font-size: 14px; line-height: normal; margin-bottom: 20px; overflow-x: auto; padding: 10px;&quot;&gt;SELECT  @r AS _id,
         (
         SELECT  @r := parent
         FROM    t_hierarchy
         WHERE   id = _id
         ) AS parent,
         @l := @l + 1 AS lvl
 FROM    (
         SELECT  @r := 1218,
                 @l := 0,
                 @cl := 0
         ) vars,
         t_hierarchy h
WHERE    @r &amp;lt;&amp;gt; 0
&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;To combine two queries, we can employ a simple&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;UNION ALL&lt;/code&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The only problem that is left to preserve the correct&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;, since the ancestry chain query conts&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;backwards, and the hierarchical query will count it starting from zero.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;br /&gt;Let’s create a sample table and see what we get:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;CREATE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;TABLE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy (&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;02.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;id&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;int&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;(10) unsigned&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NOT&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NULL&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;AUTO_INCREMENT,&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;03.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;parent&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;int&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;(10) unsigned&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NOT&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NULL&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;,&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;04.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;PRIMARY&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;KEY&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;(id),&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;05.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;KEY&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;ix_hierarchy_parent (parent, id)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;06.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;) ENGINE=InnoDB&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DEFAULT&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;CHARSET=utf8;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;07.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;08.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DELIMITER $$&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;09.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;CREATE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;PROCEDURE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;prc_fill_hierarchy (&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;level&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;, fill&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;10.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;BEGIN&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;11.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_level&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;12.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_fill&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;13.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INSERT&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;14.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INTO&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy (id, parent)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;15.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;VALUES&lt;/code&gt;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;(1, 0);&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;16.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_fill = 0;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;17.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHILE _fill &amp;lt; fill DO&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;18.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INSERT&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;19.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INTO&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy (parent)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;20.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;VALUES&lt;/code&gt;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;(1);&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;21.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_fill = _fill + 1;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;22.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHILE;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;23.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_fill = 1;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;24.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_level = 0;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;25.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHILE _level &amp;lt;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;level&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DO&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;26.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INSERT&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;27.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INTO&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy (parent)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;28.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SELECT&lt;/code&gt;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;hn.id&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;29.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FROM&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy ho, t_hierarchy hn&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;30.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;ho.parent = 1&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;31.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 168px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;AND&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;hn.id &amp;gt; _fill;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;32.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_level = _level + 1;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;33.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_fill = _fill + POWER(fill, _level);&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;34.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHILE;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;35.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;36.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;$$&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;37.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DELIMITER ;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;38.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;39.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DROP&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FUNCTION&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IF EXISTS hierarchy_connect_by_parent_eq_prior_id;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;40.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;41.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DELIMITER $$&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;42.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;43.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;CREATE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FUNCTION&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;hierarchy_connect_by_parent_eq_prior_id(value&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;)&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;RETURNS&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;44.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NOT&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DETERMINISTIC&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;45.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;READS SQL DATA&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;46.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;BEGIN&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;47.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_id&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;48.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_parent&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;49.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_next&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;50.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DECLARE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;CONTINUE&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;HANDLER&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FOR&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NOT&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FOUND&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;@id =&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NULL&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;51.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;52.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_parent = @id;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;53.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_id = -1;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;54.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;55.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IF @id&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IS&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NULL&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;THEN&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;56.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;RETURN&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NULL&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;57.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IF;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;58.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;59.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;LOOP&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;60.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SELECT&lt;/code&gt;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;MIN&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;(id)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;61.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INTO&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;@id&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;62.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FROM&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;63.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;parent = _parent&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;64.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 168px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;AND&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;id &amp;gt; _id;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;65.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IF @id&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IS&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NOT&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;NULL&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;color1&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: grey; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;OR&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_parent = @start_with&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;THEN&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;66.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 168px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;@&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;level&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;= @&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;level&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;+ 1;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;67.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 168px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;RETURN&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;@id;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;68.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;IF;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;69.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SET&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;@&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;level&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;:= @&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;level&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;- 1;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;70.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;SELECT&lt;/code&gt;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;id, parent&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;71.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;INTO&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;_id, _parent&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;72.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;FROM&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;t_hierarchy&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;73.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 112px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;id = _parent;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;74.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 56px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&amp;nbsp;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;LOOP;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;75.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;END&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;76.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;$$&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;77.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;78.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;DELIMITER ;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;79.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;80.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;START&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;TRANSACTION&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;81.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: white; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;CALL prc_fill_hierarchy(6, 5);&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-color: #e7e5dc; background-image: none; border: 0px; bottom: auto; color: #222222; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;
&lt;code class=&quot;number&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #5c5c5c; display: block; float: left; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0.3em 0px 0px; position: static; right: auto; text-align: right; top: auto; vertical-align: baseline; width: 3em;&quot;&gt;82.&lt;/code&gt;&lt;span class=&quot;content&quot; style=&quot;background-color: #f8f8f8; background-image: none; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-width: 0px 0px 0px 3px; bottom: auto; color: black; display: block; float: none; height: auto; left: auto; margin: 0px 0px 0px 3.3em; outline: 0px; padding: 0px 0px 0px 0.5em; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;background-image: url(http://explainextended.com/wp-content/plugins/syntaxhighlighter-plus/syntaxhighlighter/styles/wrapping.png); background-position: 0px 1.1em; background-repeat: no-repeat no-repeat; border: 0px; bottom: auto; display: block; float: none; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px 0px 0px 1.5em; position: static; right: auto; text-indent: -1.5em; top: auto; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-image: none; border: 0px; bottom: auto; color: #006699; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; font-weight: bold; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;COMMIT&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background-image: none; border: 0px; bottom: auto; float: none; font-family: Consolas, Monaco, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace; height: auto; left: auto; margin: 0px; outline: 0px; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;more-2259&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Now, let’s try to&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;the queries as is:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: sql&quot; style=&quot;background-color: #333333; color: #dddddd; font-family: &#39;Lucida console&#39;; font-size: 14px; line-height: normal; margin-bottom: 20px; overflow-x: auto; padding: 10px;&quot;&gt;SELECT  CONCAT(REPEAT(&#39;    &#39;, lvl  - 1), _id) AS treeitem, parent, lvl AS level
FROM    (
        SELECT  @r AS _id,
                (
                SELECT  @r := parent
                FROM    t_hierarchy
                WHERE   id = _id
                ) AS parent,
                @l := @l + 1 AS lvl
        FROM    (
                SELECT  @r := 1218,
                        @l := 0,
                        @cl := 0
                ) vars,
                t_hierarchy h
        WHERE   @r &amp;lt;&amp;gt; 0
        ORDER BY
                lvl DESC
        ) qi
UNION ALL
SELECT  CONCAT(REPEAT(&#39;    &#39;, level  - 1), CAST(hi.id AS CHAR)), parent, level
FROM    (
        SELECT  hierarchy_connect_by_parent_eq_prior_id(id) AS id, @level AS level
        FROM    (
                SELECT  @start_with := 1218,
                        @id := @start_with,
                        @level := 0
                ) vars, t_hierarchy
        WHERE   @id IS NOT NULL
        ) ho
JOIN    t_hierarchy hi
ON      hi.id = ho.id

&lt;/pre&gt;
&lt;div class=&quot;terminal&quot; style=&quot;line-height: normal; margin: 0px 0px 2em; overflow-x: auto; padding: 0px;&quot;&gt;
&lt;table class=&quot;terminal&quot; style=&quot;background-color: #333333; border-collapse: collapse; border-style: hidden; border-width: 0px; margin: 0px; padding: 0px; white-space: pre-wrap; width: 700px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;treeitem&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;parent&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;level&lt;/th&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;0&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24796&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24797&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24798&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24799&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24800&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24801&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24802&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24803&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24804&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24805&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24806&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24807&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24808&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24809&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24810&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24811&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24812&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24813&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24814&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24815&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24816&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24817&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24818&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24819&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24820&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;statusbar&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td colspan=&quot;100&quot; style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 10px; line-height: 10px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;36 rows fetched in 0.0014s (0.1447s)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;We see that the hierarchical order is mangled: the first resultset is upside down, the second one is starting from&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level = 1&lt;/code&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;To fix it, we need to change the code that calculates level a little.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;First, we need to reverse the ancestry part.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;This can be easily done by sorting it on&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;lvl DESC&lt;/code&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: sql&quot; style=&quot;background-color: #333333; color: #dddddd; font-family: &#39;Lucida console&#39;; font-size: 14px; line-height: normal; margin-bottom: 20px; overflow-x: auto; padding: 10px;&quot;&gt;SELECT  CONCAT(REPEAT(&#39;    &#39;, level  - 1), _id) AS treeitem, parent, level
FROM    (
        SELECT  @r AS _id,
                (
                SELECT  @r := parent
                FROM    t_hierarchy
                WHERE   id = _id
                ) AS parent,
                @l := @l + 1 AS level
        FROM    (
                SELECT  @r := 1218,
                        @l := 0,
                        @cl := 0
                ) vars,
                t_hierarchy h
        WHERE   @r &amp;lt;&amp;gt; 0
        ORDER BY
                level DESC
        ) qi

&lt;/pre&gt;
&lt;div class=&quot;terminal&quot; style=&quot;line-height: normal; margin: 0px 0px 2em; overflow-x: auto; padding: 0px;&quot;&gt;
&lt;table class=&quot;terminal&quot; style=&quot;background-color: #333333; border-collapse: collapse; border-style: hidden; border-width: 0px; margin: 0px; padding: 0px; white-space: pre-wrap; width: 700px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;treeitem&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;parent&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;level&lt;/th&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;0&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;statusbar&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td colspan=&quot;100&quot; style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 10px; line-height: 10px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;6 rows fetched in 0.0003s (0.0684s)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;We now have it in correct order but with wrong&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;&amp;nbsp;values.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Since a&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;&amp;nbsp;is essentially a&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;rownum&lt;/code&gt;&amp;nbsp;here, we can just calculate it as a rownum instead:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: sql&quot; style=&quot;background-color: #333333; color: #dddddd; font-family: &#39;Lucida console&#39;; font-size: 14px; line-height: normal; margin-bottom: 20px; overflow-x: auto; padding: 10px;&quot;&gt;SELECT  CONCAT(REPEAT(&#39;    &#39;, level  - 1), id) AS treeitem, parent, level
FROM    (
        SELECT  _id AS id, parent,
                @cl := @cl + 1 AS level
        FROM    (
                SELECT  @r AS _id,
                        (
                        SELECT  @r := parent
                        FROM    t_hierarchy
                        WHERE   id = _id
                        ) AS parent,
                        @l := @l + 1 AS level
                FROM    (
                        SELECT  @r := 1218,
                                @l := 0,
                                @cl := 0
                        ) vars,
                        t_hierarchy h
                WHERE   @r &amp;lt;&amp;gt; 0
                ORDER BY
                        level DESC
                ) qi
        ) qo
&lt;/pre&gt;
&lt;div class=&quot;terminal&quot; style=&quot;line-height: normal; margin: 0px 0px 2em; overflow-x: auto; padding: 0px;&quot;&gt;
&lt;table class=&quot;terminal&quot; style=&quot;background-color: #333333; border-collapse: collapse; border-style: hidden; border-width: 0px; margin: 0px; padding: 0px; white-space: pre-wrap; width: 700px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;treeitem&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;parent&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;level&lt;/th&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;0&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;statusbar&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td colspan=&quot;100&quot; style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 10px; line-height: 10px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;6 rows fetched in 0.0003s (0.0712s)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;We disregard the previously selected&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;at all, leaving it only inside the inline view&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;qi&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;for ordering purposes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Now, we need to merge the descendancy tree query, but with&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;s starting from&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;6&lt;/code&gt;, not from&amp;nbsp;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;1&lt;/code&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Since this query will come after the ancestry one, we can use accumulated value of&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@cl&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;(which we used to calculate level in the previous query) as a seed.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;To do that, we can take the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;returned by the descendancy tree query, and just add&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@cl&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;to it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;The only problem it to determine when we should increment&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@cl&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;and when we should add it to&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;level&lt;/code&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;We will just use a boolean field which will help us to tell the sets apart.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Here’s the query to do it:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: sql&quot; style=&quot;background-color: #333333; color: #dddddd; font-family: &#39;Lucida console&#39;; font-size: 14px; line-height: normal; margin-bottom: 20px; overflow-x: auto; padding: 10px;&quot;&gt;SELECT  CONCAT(REPEAT(&#39;    &#39;, level - 1), CAST(id AS CHAR)),
        parent,
        level
FROM    (
        SELECT  id, parent, IF(ancestry, @cl := @cl + 1, level + @cl) AS level
        FROM    (
                SELECT  TRUE AS ancestry, _id AS id, parent, level
                FROM    (
                        SELECT  @r AS _id,
                                (
                                SELECT  @r := parent
                                FROM    t_hierarchy
                                WHERE   id = _id
                                ) AS parent,
                                @l := @l + 1 AS level
                        FROM    (
                                SELECT  @r := 1218,
                                        @l := 0,
                                        @cl := 0
                                ) vars,
                                t_hierarchy h
                        WHERE   @r &amp;lt;&amp;gt; 0
                        ORDER BY
                                level DESC
                        ) qi
                UNION ALL
                SELECT  FALSE, hi.id, parent, level
                FROM    (
                        SELECT  hierarchy_connect_by_parent_eq_prior_id(id) AS id, @level AS level
                        FROM    (
                                SELECT  @start_with := 1218,
                                        @id := @start_with,
                                        @level := 0
                                ) vars, t_hierarchy
                        WHERE   @id IS NOT NULL
                        ) ho
                JOIN    t_hierarchy hi
                ON      hi.id = ho.id
                ) q
        ) q2

&lt;/pre&gt;
&lt;div class=&quot;terminal&quot; style=&quot;line-height: normal; margin: 0px 0px 2em; overflow-x: auto; padding: 0px;&quot;&gt;
&lt;table class=&quot;terminal&quot; style=&quot;background-color: #333333; border-collapse: collapse; border-style: hidden; border-width: 0px; margin: 0px; padding: 0px; white-space: pre-wrap; width: 700px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;CONCAT(REPEAT(‘    ‘, level – 1), CAST(id AS CHAR))&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;parent&lt;/th&gt;&lt;th style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; font-weight: normal; margin: 0px; padding: 5px 10px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;level&lt;/th&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;0&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;38&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;165&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24796&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24797&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24798&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24799&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24800&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5473&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24801&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24802&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24803&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24804&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24805&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5474&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24806&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24807&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24808&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24809&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24810&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5475&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24811&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24812&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24813&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24814&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24815&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5476&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;1218&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24816&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24817&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24818&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24819&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td class=&quot;blob&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;24820&lt;/td&gt;&lt;td class=&quot;bigint&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;5477&lt;/td&gt;&lt;td class=&quot;double&quot; style=&quot;border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 12px; margin: 0px; padding: 5px 15px 2px 5px; text-align: right; white-space: pre; word-wrap: break-word;&quot;&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;statusbar&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td colspan=&quot;100&quot; style=&quot;background-color: black; border-color: rgb(136, 136, 136); border-style: dotted none none solid; border-width: 1px; color: white; font-family: &#39;Lucida Console&#39;, monospace; font-size: 10px; line-height: 10px; margin: 0px; padding: 5px 15px 2px 5px; text-align: left; white-space: pre; word-wrap: break-word;&quot;&gt;36 rows fetched in 0.0016s (0.1514s)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;One more thing: &amp;nbsp;use this if&amp;nbsp;extremely necessary, and for small trees,, some times it crashes the Mysql server,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;im still working on some more&amp;nbsp;efficient&amp;nbsp;solution.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Till Happy coding :)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/2388304287657159443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/02/hierarchical-queries-in-mysql-tree.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2388304287657159443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2388304287657159443'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/02/hierarchical-queries-in-mysql-tree.html' title='Hierarchical queries in MySQL, Tree structures'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-5779070197967296318</id><published>2013-01-22T19:11:00.003+05:30</published><updated>2013-11-11T17:21:14.934+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="change url without reloading the page"/><category scheme="http://www.blogger.com/atom/ns#" term="client sided url writing"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="url change without reloading"/><category scheme="http://www.blogger.com/atom/ns#" term="Url writing"/><title type='text'>Change the Url Arguments without Reloading the page </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h2 style=&quot;font-size: 1.6875em; font-weight: normal; margin: 0px 0px 1.037037037037037em; padding: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Change the Url Arguments without Reloading the page &lt;/span&gt;&lt;span style=&quot;font-family: MuseoSlabTumblr, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;font-family: Cambria, Georgia, Times, serif; font-size: 16px; line-height: 24px; margin-bottom: 1.375em; padding: 0px;&quot;&gt;
It was always a messy thing to deal with urls for different pages or resources on a website And the only method we got was&amp;nbsp;&lt;code style=&quot;font-family: monaco, courier, monospace;&quot;&gt;location.hash&lt;/code&gt;&amp;nbsp; AJAX applications to get back button and bookmarking support, and libraries like&amp;nbsp;&lt;a href=&quot;http://benalman.com/projects/jquery-bbq-plugin/&quot; style=&quot;color: #eb374b; cursor: pointer;&quot; target=&quot;_blank&quot;&gt;jQuery BBQ&lt;/a&gt;&amp;nbsp;from Ben Alman made dealing with it cross browser a cinch. &amp;nbsp;Now, with HTML5 coming of age, there is a new feature that aims to replace the use of&amp;nbsp;&lt;code style=&quot;font-family: monaco, courier, monospace;&quot;&gt;location.hash&lt;/code&gt;&amp;nbsp;with a better solution:&amp;nbsp;&lt;code style=&quot;font-family: monaco, courier, monospace;&quot;&gt;pushState&lt;/code&gt;. &amp;nbsp;Over on the Spoiled Milk blog, Jamie Appleseed&amp;nbsp;&lt;a href=&quot;http://www.spoiledmilk.dk/blog/?p=1922&quot; style=&quot;color: #eb374b; cursor: pointer;&quot; target=&quot;_blank&quot;&gt;describes&lt;/a&gt;&amp;nbsp;the API as “a way to change the URL displayed in the browser through JavaScript without reloading the page.” &amp;nbsp;It works on the history object like this:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; border: 1px solid rgb(158, 233, 236); font-family: monaco, courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 0.9375em; overflow-x: scroll; padding: 1.5384615384615385em; width: 36em;&quot;&gt;&lt;code style=&quot;font-family: monaco, courier, monospace;&quot;&gt;window.history.pushState(data, &quot;Title&quot;, &quot;/new-url&quot;);&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: Cambria, Georgia, Times, serif; font-size: 16px; line-height: 24px; margin-bottom: 1.375em; padding: 0px;&quot;&gt;
The last argument is the new URL. &amp;nbsp;For security reasons you can only change the path of the URL, not the domain itself. &amp;nbsp;The second argument is a description of the new state. &amp;nbsp;And the first argument is some data that you might want to store along with the state.&lt;/div&gt;
&lt;div style=&quot;font-family: Cambria, Georgia, Times, serif; font-size: 16px; line-height: 24px; margin-bottom: 1.375em; padding: 0px;&quot;&gt;
In order to support the back and forward buttons you must be notified when they are clicked. &amp;nbsp;You can do that using the&amp;nbsp;&lt;code style=&quot;font-family: monaco, courier, monospace;&quot;&gt;window.onpopstate&lt;/code&gt;event. &amp;nbsp;This event gives you access to the state data that you passed to&lt;code style=&quot;font-family: monaco, courier, monospace;&quot;&gt;pushState&lt;/code&gt;&amp;nbsp;earlier. &amp;nbsp;Of course, you can manually go back and forward with the standard history functions.&lt;/div&gt;
&lt;div style=&quot;font-family: Cambria, Georgia, Times, serif; font-size: 16px; line-height: 24px; margin-bottom: 1.375em; padding: 0px;&quot;&gt;
Currently, pushState has support from the latest versions of Safari and Chrome, and Firefox 4 will be supporting it as well. &amp;nbsp;It is worth noting that Flickr is already using the API in their new layout. &amp;nbsp;I think that this is really the correct way to be dealing with history management in JavaScript applications since it changes the real URL instead of just the hash. &amp;nbsp;I’m very excited to see libraries like jQuery BBQ start to support this feature with fallback to the old hash trick.&lt;/div&gt;
&lt;div style=&quot;font-family: Cambria, Georgia, Times, serif; font-size: 16px; line-height: 24px; margin-bottom: 1.375em; padding: 0px;&quot;&gt;
If you’d like to read a more in depth overview of these new features, you should check out the aforementioned&amp;nbsp;&lt;a href=&quot;http://www.spoiledmilk.dk/blog/?p=1922&quot; style=&quot;color: #eb374b; cursor: pointer;&quot; target=&quot;_blank&quot;&gt;blog post&lt;/a&gt;&amp;nbsp;by Jamie Appleseed. &amp;nbsp;If reading specs is your thing, you can check out the relevant document&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/5779070197967296318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/01/change-url-arguments-without-reloading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5779070197967296318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5779070197967296318'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/01/change-url-arguments-without-reloading.html' title='Change the Url Arguments without Reloading the page '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-5935535092203991705</id><published>2013-01-10T19:27:00.003+05:30</published><updated>2013-11-11T17:29:08.738+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="google+"/><category scheme="http://www.blogger.com/atom/ns#" term="linkedin"/><category scheme="http://www.blogger.com/atom/ns#" term="sharing"/><category scheme="http://www.blogger.com/atom/ns#" term="sharing links"/><category scheme="http://www.blogger.com/atom/ns#" term="sharing widget"/><category scheme="http://www.blogger.com/atom/ns#" term="social sharing links"/><category scheme="http://www.blogger.com/atom/ns#" term="social widget"/><category scheme="http://www.blogger.com/atom/ns#" term="tmbler"/><category scheme="http://www.blogger.com/atom/ns#" term="twitter"/><title type='text'>Social Media Sharing Links</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Creating custom social sharing widgets for your website&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Ever bother to make a sharing widget, here is the required info, u need to know to make a global sharing platform. what you need to do is to simply create a link &lt;i&gt;( &amp;lt; a href=&quot;given url here &amp;gt;social media&amp;lt;/a&amp;gt;&quot; ) &lt;/i&gt;Set its URL to one of the provided below.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;1. Twitter.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;URL :&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt; https://twitter.com/intent/tweet?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;ARGS :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;text = Hello this is a message length must not exceed 50 chars&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;related = pulsepad&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;url = the intended url.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;2. Facebook.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;for open type posting&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;http://www.facebook.com/sharer.php?u=http%3A%2F%2Fpinkink.brightpinkstudio.com&amp;amp;t=Hellothere&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;i&gt;
&amp;nbsp;if u have an application then be precise and use this&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; https://www.facebook.com/dialog/feed?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; app_id=458358780877780&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; link=https://developers.facebook.com/docs/reference/dialogs/&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; picture=http://fbrell.com/f8.jpg&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; name=Facebook%20Dialogs&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; caption=Reference%20Documentation&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; description=Using%20Dialogs%20to%20interact%20with%20users.&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; redirect_uri=https://mighty-lowlands-6381.herokuapp.com/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;b&gt;3. Google&amp;nbsp;+&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;https://plus.google.com/share?url=http://jack.artoir.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;b&gt;4. Pintrest&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fbrightpinkstudio.com%2Fpinkink%2Fresources%2Fsocial-bookmarking-widgets%2F&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;media=http%3A%2F%2Fwww.onlywire.com%2Fimages%2FMainIllustrationz.jpg&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;description=10%20Social%20bookmarking%20widgets%20for%20your%20website%20or%20blog%20-%20analyzed%20and%20compared.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;b&gt;5. Linkedin&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;http://www.linkedin.com/shareArticle?mini=true&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;url=http%3A%2F%2Fbrightpinkstudio.com%2Fpinkink%2Fresources%2Fsocial-bookmarking-widgets%2F&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;title=10%20Social%20Bookmarking%20Widgets%20Compared%20%7C%20Design%20by%20BrightPink%20Studio&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;summary=10%20Social%20bookmarking%20widgets%20for%20your%20website%20or%20blog%20-%20analyzed%20and%20compared.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;amp;source=&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;
&lt;b&gt;6. tumbler&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;http://www.tumblr.com/share/link?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;url=http%3A%2F%2Fwww.tumblr.com%2Fexamples%2Fshare%2Fsharing-links-to-articles.html&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;name=Sharing%20links%20to%20articles&amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;description=This%20example%20uses%20an%20advanced%20Tumblr%20Button%20in%20the%20article&#39;s%20footer%20to%20let%20Tumblr%20users%20easily%20share%20a%20beautifully%20formatted%20link%20to%20this%20article%20on%20their%20blogs.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/5935535092203991705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2013/01/social-media-sharing-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5935535092203991705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5935535092203991705'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2013/01/social-media-sharing-links.html' title='Social Media Sharing Links'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-5489601312858107899</id><published>2012-11-29T12:37:00.005+05:30</published><updated>2013-11-11T17:30:11.412+05:30</updated><title type='text'>Some Useful methods Keywords</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Some Useful methods Keywords&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;C# &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #cfe2f3; color: #0b5394;&quot;&gt;php&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #0b5394;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; white-space: pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; white-space: pre-wrap;&quot;&gt;PHP_EOL&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; white-space: pre-wrap;&quot;&gt;; //new line&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; white-space: pre-wrap;&quot;&gt;WebRTC : &lt;/span&gt;&lt;/span&gt;
&lt;a href=&quot;http://www.html5rocks.com/en/tutorials/webrtc/basics/&quot;&gt;http://www.html5rocks.com/en/tutorials/webrtc/basics/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/5489601312858107899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/some-useful-methods-keywords.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5489601312858107899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5489601312858107899'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/some-useful-methods-keywords.html' title='Some Useful methods Keywords'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-4395625734551232754</id><published>2012-11-29T12:14:00.004+05:30</published><updated>2013-11-11T17:34:15.831+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5 websocket api"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="server sent events"/><category scheme="http://www.blogger.com/atom/ns#" term="SSE"/><category scheme="http://www.blogger.com/atom/ns#" term="websockets"/><title type='text'>STREAM UPDATES WITH SERVER-SENT EVENTS (HTML 5 NATIVE)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;STREAM UPDATES WITH SERVER-SENT EVENTS (HTML 5 NATIVE WEBSOCKET API)&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 12px; line-height: 1.5; text-transform: uppercase;&quot;&gt;SUPPORTED BROWSERS:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;section class=&quot;browser_support&quot; style=&quot;background-position: 0px 50%; color: #333333; float: left; font-size: 12px; margin: 0.25em 0px 0px; overflow: hidden; padding: 1em 0px 0px; position: relative; width: 632px;&quot;&gt;
&lt;span class=&quot;browsers&quot; style=&quot;background-color: white; float: left; font-family: &#39;Open Sans&#39;, sans-serif; line-height: 14px; margin: 0px 0.75em 0px 0.25em;&quot;&gt;&lt;span class=&quot;browser opera supported&quot; style=&quot;background-color: transparent; background-image: url(http://1-ps.googleusercontent.com/x/s.html5rocks-hrd.appspot.com/www.html5rocks.com/static/images/browser_logos.png.pagespeed.ce.z_HVNR5Lmv.png); background-position: -69px 0%; background-repeat: no-repeat no-repeat; float: left; height: 17px; margin: -1px 0.25em 0px 0px; opacity: 1; position: relative; width: 17px;&quot;&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;PERA&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;browser ie &quot; style=&quot;background-color: transparent; background-image: url(http://1-ps.googleusercontent.com/x/s.html5rocks-hrd.appspot.com/www.html5rocks.com/static/images/browser_logos.png.pagespeed.ce.z_HVNR5Lmv.png); background-position: -52px 0%; background-repeat: no-repeat no-repeat; float: left; height: 17px; margin: -1px 0.25em 0px 0px; opacity: 0.25; position: relative; width: 17px;&quot;&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px; white-space: nowrap;&quot;&gt;IE&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;browser safari supported&quot; style=&quot;background-color: transparent; background-image: url(http://1-ps.googleusercontent.com/x/s.html5rocks-hrd.appspot.com/www.html5rocks.com/static/images/browser_logos.png.pagespeed.ce.z_HVNR5Lmv.png); background-position: -35px 0%; background-repeat: no-repeat no-repeat; float: left; height: 17px; margin: -1px 0.25em 0px 0px; opacity: 1; position: relative; width: 17px;&quot;&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;SAFARI&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;browser ff supported&quot; style=&quot;background-color: transparent; background-image: url(http://1-ps.googleusercontent.com/x/s.html5rocks-hrd.appspot.com/www.html5rocks.com/static/images/browser_logos.png.pagespeed.ce.z_HVNR5Lmv.png); background-position: -17px 0%; background-repeat: no-repeat no-repeat; float: left; height: 17px; margin: -1px 0.25em 0px 0px; opacity: 1; position: relative; width: 17px;&quot;&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;FIREFOX&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;browser chrome supported&quot; style=&quot;background-color: transparent; background-image: url(http://1-ps.googleusercontent.com/x/s.html5rocks-hrd.appspot.com/www.html5rocks.com/static/images/browser_logos.png.pagespeed.ce.z_HVNR5Lmv.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat; float: left; height: 17px; margin: -1px 0.25em 0px 0px; opacity: 1; position: relative; width: 17px;&quot;&gt;&lt;span class=&quot;browser_name&quot; style=&quot;-webkit-transition: all 0.1s ease-in-out; background-color: transparent; display: inline-block; font-size: 11px; left: -3px; line-height: 1; opacity: 0; padding: 3px 5px; position: absolute; text-align: center; text-transform: uppercase; top: -15px;&quot;&gt;CHROME&lt;/span&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/section&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #0b5394;&quot;&gt;&lt;a href=&quot;http://caniuse.com/EVENTSOURCE&quot; style=&quot;background-color: transparent;&quot; target=&quot;_blank&quot;&gt;See Browser compatibility history&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 id=&quot;toc-introduction&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-weight: normal; line-height: 1.125; margin: 0px 0px 0.5em; text-transform: uppercase;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;
INTRODUCTION&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
I wouldn&#39;t be surprised if you&#39;ve stumbled on this article wondering, &quot;What the heck are&amp;nbsp;&lt;a href=&quot;http://dev.w3.org/html5/eventsource/&quot; style=&quot;-webkit-transition: color 0.2s; background-color: transparent; background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #508b88; padding-right: 16px; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Server-Sent Events&lt;/a&gt;&amp;nbsp;(&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s)?&quot; Many people have never heard of them, and rightfully so. Over the years, the specification has seen significant changes, and the API has taken somewhat of a backseat to newer, sexier communication protocols such as the&amp;nbsp;&lt;a href=&quot;http://www.html5rocks.com/tutorials/#websockets&quot; style=&quot;-webkit-transition: color 0.2s; color: #508b88; text-decoration: initial;&quot;&gt;WebSocket API&lt;/a&gt;. The idea behind&amp;nbsp;&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s may be familiar: a web app &quot;subscribes&quot; to a stream of updates generated by a server and, whenever a new event occurs, a notification is sent to the client. But to really understand Server-Sent Events, we need to understand the limitations of its AJAX predecessors, which includes:&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;Polling&lt;/strong&gt;&amp;nbsp;is a traditional technique used by the vast majority of AJAX applications. The basic idea is that the application repeatedly polls a server for data. If you&#39;re familiar with the HTTP protocol, you know that fetching data revolves around a request/response format. The client makes a request and waits for the server to respond with data. If none is available, an empty response is returned. So what&#39;s the big deal with polling? Extra polling creates greater HTTP overhead.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;Long polling (Hanging GET / COMET)&lt;/strong&gt;&amp;nbsp;is a slight variation on polling. In long polling, if the server does not have data available, the server holds the request open until new data is made available. Hence, this technique is often referred to as a &quot;Hanging GET&quot;. When information becomes available, the server responds, closes the connection, and the process is repeated. The effect is that the server is constantly responding with new data as it becomes available. The shortcoming is that the implementation of such a procedure typically involves hacks such as appending script tags to an &#39;infinite&#39; iframe. We can do better than hacks!&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Server-Sent Events on the other hand, have been designed from the ground up to be efficient. When communicating using&amp;nbsp;&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s, a server can push data to your app whenever it wants, without the need to make an initial request. In other words, updates can be streamed from server to client as they happen.&amp;nbsp;&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s open a single unidirectional channel between server and client.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
The main difference between Server-Sent Events and long-polling is that&amp;nbsp;&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s are handled directly by the browser and the user simply has to listen for messages.&lt;/div&gt;
&lt;h2 id=&quot;toc-introduction-differences&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
SERVER-SENT EVENTS VS. WEBSOCKETS&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Why would you choose Server-Sent Events over WebSockets? Good question.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
One reason&amp;nbsp;&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s have been kept in the shadow is because later APIs like&amp;nbsp;&lt;a href=&quot;http://www.html5rocks.com/tutorials/#websockets&quot; style=&quot;-webkit-transition: color 0.2s; color: #508b88; text-decoration: initial;&quot;&gt;WebSockets&lt;/a&gt;&amp;nbsp;provide a richer protocol to perform bi-directional, full-duplex communication. Having a two-way channel is more attractive for things like games, messaging apps, and for cases where you need near real-time updates in both directions. However, in some scenarios&amp;nbsp;&lt;i&gt;data doesn&#39;t need to be sent from the client&lt;/i&gt;. You simply need updates from some server action. A few examples would be friends&#39; status updates, stock tickers, news feeds, or other automated data push mechanisms (e.g. updating a client-side Web SQL Database or IndexedDB object store). If you&#39;ll need to send data to a server,&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;XMLHttpRequest&lt;/code&gt;&amp;nbsp;is always a friend.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;s are sent over traditional HTTP. That means they&amp;nbsp;&lt;i&gt;do not require a special protocol or server implementation&lt;/i&gt;&amp;nbsp;to get working. WebSockets on the other hand, require full-duplex connections and new Web Socket servers to handle the protocol. In addition, Server-Sent Events have a variety of features that WebSockets lack by design such as&amp;nbsp;&lt;i&gt;automatic reconnection&lt;/i&gt;,&amp;nbsp;&lt;i&gt;event IDs&lt;/i&gt;, and the ability to&amp;nbsp;&lt;i&gt;send arbitrary events&lt;/i&gt;.&lt;/div&gt;
&lt;h2 id=&quot;toc-js-api&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
JAVASCRIPT API&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
To subscribe to an event stream, create an&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;EventSource&lt;/code&gt;&amp;nbsp;object and pass it the URL of your stream:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(!!&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;EventSource&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; source &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;EventSource&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;stream.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;// Result to xhr polling :(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;If the URL passed to the&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;EventSource&lt;/code&gt;&amp;nbsp;constructor is an absolute URL, its origin (scheme, domain, port) must match that of the calling page.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Next, set up a handler for the&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;message&lt;/code&gt;&amp;nbsp;event. You can optionally listen for&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;open&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;error&lt;/code&gt;:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;message&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  console&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;open&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;// Connection was opened.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;error&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;readyState &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;EventSource&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;CLOSED&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;// Connection was closed.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
When updates are pushed from the server, the&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;onmessage&lt;/code&gt;&amp;nbsp;handler fires and new data is be available in its&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;e.data&lt;/code&gt;&amp;nbsp;property. The magical part is that whenever the connection is closed, the browser will automatically reconnect to the source after ~3 seconds. Your server implementation can even have control over this reconnection timeout. See&amp;nbsp;&lt;a href=&quot;http://www.html5rocks.com/en/tutorials/eventsource/basics/#toc-reconnection-timeout&quot; style=&quot;-webkit-transition: color 0.2s; color: #508b88; text-decoration: initial;&quot;&gt;Controlling the reconnection-timeout&lt;/a&gt;&amp;nbsp;in the next section.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
That&#39;s it. Your client is now ready to process events from&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;stream.php&lt;/code&gt;.&lt;/div&gt;
&lt;h2 id=&quot;toc-event-stream-format&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
EVENT STREAM FORMAT&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Sending an event stream from the source is a matter of constructing a plaintext response, served with a&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;text/event-stream&lt;/code&gt;&amp;nbsp;Content-Type, that follows the&amp;nbsp;&lt;abbr style=&quot;border-bottom-style: dotted; border-bottom-width: 1px;&quot; title=&quot;Server-Sent Events&quot;&gt;SSE&lt;/abbr&gt;&amp;nbsp;format. In its basic form, the response should contain a &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;data:&lt;/code&gt;&quot; line, followed by your message, followed by two &quot;\n&quot; characters to end the stream:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;My&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; message\n\n&lt;/span&gt;&lt;/pre&gt;
&lt;h3 id=&quot;toc-multiline-data&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 20px; font-weight: 300; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
MULTILINE DATA&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
If your message is longer, you can break it up by using multiple &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;data:&lt;/code&gt;&quot; lines. Two or more consecutive lines beginning with &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;data:&lt;/code&gt;&quot; will be treated as a single piece of data, meaning only one&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;message&lt;/code&gt;&amp;nbsp;event will be fired. Each line should end in a single &quot;\n&quot; (except for the last, which should end with two). The result passed to your&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;message&lt;/code&gt;&amp;nbsp;handler is a single string concatenated by newline characters. For example:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; first line\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; second line\n\n&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
will produce &quot;first line\nsecond line&quot; in&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;e.data&lt;/code&gt;. One could then use&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;e.data.split(&#39;\n&#39;).join(&#39;&#39;)&lt;/code&gt;&amp;nbsp;to reconstruct the message sans &quot;\n&quot; characters.&lt;/div&gt;
&lt;h3 id=&quot;toc-json-data&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 20px; font-weight: 300; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
SEND JSON DATA&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Using multiple lines makes it easy to send JSON without breaking syntax:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;msg&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;hello world&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;12345&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n\n&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
and possible client-side code to handle that stream:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;message&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; JSON&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  console&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;h3 id=&quot;toc-lastevent-id&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 20px; font-weight: 300; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
ASSOCIATING AN ID WITH AN EVENT&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
You can send a unique id with an stream event by including a line starting with &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;id:&lt;/code&gt;&quot;:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;12345&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; GOOG\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;556&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n\n&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Setting an ID lets the browser keep track of the last event fired so that if, the connection to the server is dropped, a special HTTP header (&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;Last-Event-ID&lt;/code&gt;) is set with the new request. This lets the browser determine which event is appropriate to fire. The&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;message&lt;/code&gt;&amp;nbsp;event contains a&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;e.lastEventId&lt;/code&gt;&amp;nbsp;property.&lt;/div&gt;
&lt;h3 id=&quot;toc-reconnection-timeout&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 20px; font-weight: 300; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
CONTROLLING THE RECONNECTION-TIMEOUT&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
The browser attempts to reconnect to the source roughly 3 seconds after each connection is closed. You can change that timeout by including a line beginning with &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;retry:&lt;/code&gt;&quot;, followed by the number of milliseconds to wait before trying to reconnect.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
The following example attempts a reconnect after 10 seconds:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;retry&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;10000&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; hello world\n\n&lt;/span&gt;&lt;/pre&gt;
&lt;h3 id=&quot;toc-eventname&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 20px; font-weight: 300; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
SPECIFYING AN EVENT NAME&lt;/h3&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
A single event source can generate different types events by including an event name. If a line beginning with &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;event:&lt;/code&gt;&quot; is present, followed by a unique name for the event, the event is associated with that name. On the client, an event listener can be setup to listen to that particular event.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
For example, the following server output sends three types of events, a generic &#39;message&#39; event, &#39;userlogon&#39;, and &#39;update&#39; event:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;msg&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;First message&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n\n
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; userlogon\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;username&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;John123&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n\n
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; update\n
data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;username&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;John123&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;emotion&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;happy&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;\n\n&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
With event listeners setup on the client:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;message&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; JSON&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  console&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;userlogon&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; JSON&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  console&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;User login:&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;update&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; JSON&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  console&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;username &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39; is now &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;emotion&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;h2 id=&quot;toc-server-code&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
SERVER EXAMPLES&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
A simple server implementation in PHP:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pun&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;php
header&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Content-Type: text/event-stream&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
header&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Cache-Control: no-cache&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;// recommended to prevent caching of event data.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;/**
 * Constructs the SSE data format and flushes that data to the client.
 *
 * @param string $id Timestamp/id of this connection.
 * @param string $msg Line of text that should be transmitted.
 */&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; sendMsg&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $msg&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  echo &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;id: $id&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; PHP_EOL&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  echo &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;data: $msg&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; PHP_EOL&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  echo PHP_EOL&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  ob_flush&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  flush&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

$serverTime &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; time&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

sendMsg&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$serverTime&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;server time: &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; date&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;h:i:s&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; time&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()));&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;a href=&quot;http://www.html5rocks.com/en/tutorials/eventsource/basics/demo/sse.php&quot; style=&quot;-webkit-transition: color 0.2s; color: #508b88; text-decoration: initial;&quot;&gt;Download the code&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Here&#39;s a similiar implementation using&amp;nbsp;&lt;a href=&quot;http://nodejs.org/&quot; style=&quot;-webkit-transition: color 0.2s; background-color: transparent; background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #508b88; padding-right: 16px; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Node JS&lt;/a&gt;:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; http &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;http&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; sys &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;sys&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; fs &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;fs&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

http&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;createServer&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;//debugHeaders(req);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;accept &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;accept &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;text/event-stream&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;url &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;/events&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
      sendSSE&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
      res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;writeHead&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;404&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
      res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;writeHead&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Content-Type&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;text/html&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;});&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;fs&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;readFileSync&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;__dirname &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;/sse-node.html&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}).&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;listen&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;8000&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; sendSSE&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;writeHead&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Content-Type&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;text/event-stream&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Cache-Control&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;no-cache&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Connection&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;keep-alive&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;});&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; id &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()).&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;toLocaleTimeString&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

  &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;// Sends a SSE every 5 seconds on a single connection.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  setInterval&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    constructSSE&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()).&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;toLocaleTimeString&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;());&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #3387cc;&quot;&gt;5000&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

  constructSSE&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()).&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;toLocaleTimeString&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;());&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; constructSSE&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;id: &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; id &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;\n&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  res&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&quot;data: &quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;\n\n&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; debugHeaders&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  sys&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;puts&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;URL: &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; key &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    sys&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;puts&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;key &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;: &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; req&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  sys&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;puts&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;\n\n&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;a href=&quot;http://www.html5rocks.com/en/tutorials/eventsource/basics/demo/node-sse.js&quot; style=&quot;-webkit-transition: color 0.2s; color: #508b88; text-decoration: initial;&quot;&gt;Download the code&lt;/a&gt;&lt;/div&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.125;&quot;&gt;
sse-node.html:&lt;/h4&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;color: #3387cc;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: darkkhaki;&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #65b042;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; source &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #89bdff;&quot;&gt;EventSource&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;/events&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;onmessage &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
      document&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;data &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;&amp;lt;br&amp;gt;&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;};&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #89bdff;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;h2 id=&quot;toc-canceling&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
CANCEL AN EVENT STREAM&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Normally, the browser auto-reconnects to the event source when the connection is closed, but that behavior can be canceled from either the client or server.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
To cancel a stream from the client, simply call:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
To cancel a stream from the server, respond with a non &quot;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;text/event-stream&lt;/code&gt;&quot;&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;Content-Type&lt;/code&gt;&amp;nbsp;or return an HTTP status other than&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;200 OK&lt;/code&gt;(e.g.&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;404 Not Found&lt;/code&gt;).&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Both methods will prevent the browser from re-establishing the connection.&lt;/div&gt;
&lt;h2 id=&quot;toc-security&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
A WORD ON SECURITY&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
From the WHATWG&#39;s section on&amp;nbsp;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#authors&quot; style=&quot;-webkit-transition: color 0.2s; background-color: transparent; background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #508b88; padding-right: 16px; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Cross-document messaging security&lt;/a&gt;:&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 13px; line-height: 16px; margin: 1em 40px;&quot;&gt;
&lt;q style=&quot;quotes: none;&quot;&gt;&lt;i&gt;Authors should check the origin attribute to ensure that messages are only accepted from domains that they expect to receive messages from. Otherwise, bugs in the author&#39;s message handling code could be exploited by hostile sites.&lt;/i&gt;&lt;/q&gt;&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
So, as an extra level of precaution, be sure to verify&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;e.origin&lt;/code&gt;&amp;nbsp;in your&amp;nbsp;&lt;code style=&quot;background-color: rgba(251, 213, 208, 0.498039); background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 1em; padding: 2px 3px;&quot;&gt;message&lt;/code&gt;&amp;nbsp;handler matches your app&#39;s origin:&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #444444; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: white; font-family: &#39;Source Code Pro&#39;, monospace; font-size: 13px; line-height: 16px; margin: 1em auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;message&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;origin &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;!=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;http://example.com&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    alert&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #65b042;&quot;&gt;&#39;Origin was not http://example.com&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #e28964;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
Another good idea is to check the integrity of the data you receive:&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 13px; line-height: 16px; margin: 1em 40px;&quot;&gt;
&lt;q style=&quot;quotes: none;&quot;&gt;&lt;i&gt;Furthermore, even after checking the origin attribute, authors should also check that the data in question is of the expected format....&lt;/i&gt;&lt;/q&gt;&lt;/blockquote&gt;
&lt;h2 id=&quot;toc-demo&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
DEMO&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.5;&quot;&gt;
A&amp;nbsp;&lt;a href=&quot;http://googlecodesamples.com/html5/sse/sse.html&quot; style=&quot;-webkit-transition: color 0.2s; background-color: transparent; background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #508b88; padding-right: 16px; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;demo app&lt;/a&gt;&amp;nbsp;written in PHP is available on googlecodesamples.com along with its&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/html5rocks/source/browse/www.html5rocks.com/#www.html5rocks.com%2Fcontent%2Ftutorials%2Feventsource%2Fbasics%2Fdemo&quot; style=&quot;-webkit-transition: color 0.2s; color: #508b88; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;source&lt;/a&gt;.&lt;/div&gt;
&lt;h2 id=&quot;toc-references&quot; style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 26px; font-weight: normal; line-height: 1.125; margin: 1em 0px 0.5em; text-transform: uppercase;&quot;&gt;
REFERENCES&lt;/h2&gt;
&lt;ul style=&quot;background-color: white; color: #222222; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 14px; line-height: 1.6; list-style: square; margin: 1em 0px 1em 1.75em; padding: 0px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.75em;&quot;&gt;&lt;a href=&quot;http://dev.w3.org/html5/eventsource/&quot; style=&quot;-webkit-transition: color 0.2s; background-color: transparent; background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #508b88; padding-right: 16px; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Server-Sent Events specification&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.75em;&quot;&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#authors&quot; style=&quot;-webkit-transition: color 0.2s; background-color: transparent; background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #508b88; padding-right: 16px; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Cross-document messaging security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/4395625734551232754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/stream-updates-with-server-sent-events.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/4395625734551232754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/4395625734551232754'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/stream-updates-with-server-sent-events.html' title='STREAM UPDATES WITH SERVER-SENT EVENTS (HTML 5 NATIVE)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-8897567862167309298</id><published>2012-11-28T13:37:00.003+05:30</published><updated>2013-11-11T17:38:21.378+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C# to JSON String"/><category scheme="http://www.blogger.com/atom/ns#" term="DataTable"/><category scheme="http://www.blogger.com/atom/ns#" term="DataTable to JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><title type='text'>Convert a DataTable to JSON string</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;Convert a DataTable to JSON string&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;This article demonstrate how to convert a DataTable in c# to a JSON string.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; dt &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DataTable&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;MyTable&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ID&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Active&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;LoadDataRow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ID1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;John&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;LoadDataRow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ID2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Bill&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;JsonConvert&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SerializeObject&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DatatableToDictionary&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ID&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;));


&lt;/span&gt;&lt;/code&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Dictionary&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Dictionary&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DatatableToDictionary&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DataTable&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; cols &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Columns&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Cast&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DataColumn&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;().&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Where&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;c &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; c&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ColumnName&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;!=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; dt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Rows&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Cast&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DataRow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ToDictionary&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;r &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; r&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ToString&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; 
                           r &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; cols&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ToDictionary&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;c &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; c&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ColumnName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; c &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; r&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ColumnName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]));&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;The output string will be :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ID1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;John&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Active&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ID2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Bill&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Active&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}




&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/8897567862167309298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/convert-datatable-to-json-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/8897567862167309298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/8897567862167309298'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/convert-datatable-to-json-string.html' title='Convert a DataTable to JSON string'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-2855060574188336736</id><published>2012-11-27T16:42:00.002+05:30</published><updated>2013-11-11T17:44:14.505+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="create events in c#"/><category scheme="http://www.blogger.com/atom/ns#" term="Custom events in C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Delegate Events"/><category scheme="http://www.blogger.com/atom/ns#" term="Event Handling"/><category scheme="http://www.blogger.com/atom/ns#" term="Events"/><title type='text'>Create custom events in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Create custom event in C# and handle them&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Consider the following code.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #333333; padding: 10px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;public class FeedsManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public event Status onStatusChange;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public delegate void Status(string StatusText, int StatusPercent);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;public void someMethod(){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;......&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;........&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;if (onStatusChange!= null) onStatusChange(&quot;Starting...&quot;, 10);
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;.......&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;.......&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;........&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;if (onStatusChange!= null) onStatusChange(&quot;Starting...&quot;, 10);
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;.......&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;//other methods...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: white;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: white;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;1. Declare the event delegate&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #eeeeee; color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #eeeeee; color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public delegate void Status(string StatusText, int StatusPercent);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;As in this case Status is the event type taking two arguments one of type string and other integer. you can provide a custom name to event and pass many arguments of different types.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;2. &amp;nbsp;Now create the event&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: #eeeeee;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #eeeeee; color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public event Status onStatusChange;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Create an event of the type of delegate you have created , here the name of e&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;vent is &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;onStatusChange.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;3. Raising the event&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #eeeeee; color: #0c343d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (onStatusChange!= null) onStatusChange(&quot;Starting...&quot;, 10);&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;first we have to check is an event handler is set, if yes then call the handler function and pass the desired arguments.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Note: you can raise a event as many time you want, but in the context of same class.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-weight: normal;&quot;&gt;Creating the handlers for event.&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #333333; padding: 10px;&quot;&gt;
&lt;div&gt;
&amp;nbsp;&lt;span style=&quot;color: white;&quot;&gt; &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FeedsManager FM = new FeedsManager();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;FM.onStatusChange += new FeedsManager.Status(FM_onStatusChange);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;void FM_onStatusChange(string StatusText, int StatusPercent)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//do what ever you want&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0c343d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0c343d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Or alternatively you can create a handler function as&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #333333; padding: 10px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;FM.onStatusChange += (msg, per) =&amp;gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//do whatever you want&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: white; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0c343d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Hope it helps you some where&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;happy coding.... :D&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/2855060574188336736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/create-custom-events-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2855060574188336736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2855060574188336736'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/create-custom-events-in-c.html' title='Create custom events in c#'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-4471231310092219410</id><published>2012-11-26T20:11:00.002+05:30</published><updated>2013-11-11T17:51:55.342+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Comet"/><category scheme="http://www.blogger.com/atom/ns#" term="comet internet explorer fix"/><category scheme="http://www.blogger.com/atom/ns#" term="long Lived AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="Reverse AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="Server Push"/><category scheme="http://www.blogger.com/atom/ns#" term="Streaming in internet explorer"/><title type='text'>COMET Streaming in Internet Explorer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h3 class=&quot;post-name&quot; style=&quot;clear: both; font-weight: normal; line-height: 26px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;COMET Streaming in Internet Explorer&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;Comet or Reverse AJAX or Server Push or long Lived AJAX Request, This is a technique which can be used to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;maintain&lt;/span&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;&amp;nbsp;a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;continuous&lt;/span&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;&amp;nbsp;connection to a web server and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;receive&lt;/span&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;&amp;nbsp;data instantly without making a new AJAX request or reloading the page. This can be used in effective chatting applications or&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;real time&lt;/span&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;&amp;nbsp;update of page data.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, Times New Roman, serif; line-height: 1.5em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; line-height: 1.5em;&quot;&gt;The request/response nature of HTTP works very well for traditional web pages, but to build dynamic AJAX applications, it’s often desirable for the server to be able to send data to the client on its own schedule. You could imagine, for instance, scenarios like an online game, or an event viewer, where the server may want to notify the client of something on an irregular schedule.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;post-content user-defined-markup&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: dotted; border-bottom-width: 1px; border-top-style: none; color: #333333; line-height: 1.5em; margin: 22px 0px 10px; max-width: 100%; overflow: hidden; padding: 10px 0px; position: relative; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;The&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Comet_(programming)&quot; mce_href=&quot;http://en.wikipedia.org/wiki/Comet_(programming)&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;COMET&lt;/a&gt;&amp;nbsp;model allows a web application to push data to the browser without the browser explicitly requesting it—the Wikipedia page is fairly comprehensive, but my favorite reference is the “Scaling with COMET” chapter by Dylan Schiemann in Steve Souders’ second book on web performance,&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Even-Faster-Web-Sites-Performance/dp/0596522304&quot; mce_href=&quot;http://www.amazon.com/Even-Faster-Web-Sites-Performance/dp/0596522304&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;Even Faster Websites&lt;/a&gt;. While improved alternatives (like&amp;nbsp;&lt;a href=&quot;http://dev.w3.org/html5/eventsource/&quot; mce_href=&quot;http://dev.w3.org/html5/eventsource/&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;Server-Sent Events&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://www.w3.org/TR/websockets/&quot; mce_href=&quot;http://www.w3.org/TR/websockets/&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;Web Sockets&lt;/a&gt;) will likely eventually take over, workable COMET implementations can run in any browser built in the last few years.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;One challenge with using XMLHTTPRequest is that browsers behave differently when it comes to streaming of content. A common complaint against XMLHTTPRequest in IE was that it doesn’t stream content. More specifically, the responseText property cannot be queried when readyState=3 (Receiving) and it only becomes available when readyState=4 (Loaded). This means that while your JavaScript will know when the transfer of the response body starts, you must wait for the response to complete before examining it. If your goal is to stream down a “never-ending” stream of data, you’ll find that IE’s XHR object never gets to the Loaded readyState and thus you cannot examine the “partial” response.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;We had planned on fixing this for IE8 but unfortunately found that we couldn’t do so easily. IE’s “native” XMLHTTPRequest is simply a wrapper around the existing MSXML implementation, and the MSXML implementation performs this buffering internally. Since IE doesn’t install MSXML, we couldn’t simply change that implementation ourselves.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Update&lt;/span&gt;:&amp;nbsp;&lt;/strong&gt;IE10&#39;s newly enhanced&amp;nbsp;&lt;a href=&quot;http://blogs.msdn.com/b/ie/archive/2012/02/09/cors-for-xhr-in-ie10.aspx&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;CORS-capable XmlHttpRequest&lt;/a&gt;&amp;nbsp;implementation can now stream responses as they are read from the server.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;I put together a simple&amp;nbsp;&lt;a href=&quot;http://www.debugtheweb.com/test/teststreaming.aspx&quot; mce_href=&quot;http://www.debugtheweb.com/test/teststreaming.aspx&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;Streaming Test page&lt;/a&gt;&amp;nbsp;where you can examine the behavior of your browser. The test uses AJAX to download a stream that contains ten small blocks of data, each sent 1 second apart. An event handler attached to the&amp;nbsp;&lt;a href=&quot;http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#dfn-onreadystatechange&quot; mce_href=&quot;http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#dfn-onreadystatechange&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;onreadystatechange&lt;/a&gt;&amp;nbsp;event displays what data has been received. It’s interesting to see how different browsers behave when you click the “Try XMLHTTPRequest” button:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;IE cannot show the responseText until readyState=Loaded&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;Chrome 4.1 doesn’t get to readyState=2 until the entire response is available&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;Opera 10.51 appears to fire the onreadystatechange function only once when first entering readyState=3 (Receiving)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;Firefox 3.6 and Safari 4 fire onreadystatechange as each block is received, and make these blocks available in the responseText property&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;One point to keep in mind about streaming content in this way with XHR—even in the browsers where XHR behavior works as you might hope—is that the responseText property will grow and grow, increasing the amount of memory consumed by your page. In past betas, we’ve found degenerate pages which will exhaust the system’s virtual memory if left running overnight.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;In Internet Explorer 8, we introduced the new&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/cc288060(VS.85).aspx&quot; mce_href=&quot;http://msdn.microsoft.com/en-us/library/cc288060(VS.85).aspx&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;XDomainRequest&lt;/a&gt;&amp;nbsp;object—beyond support for making cross-origin requests, this object directly wraps URLMon and thus&amp;nbsp;it doesn’t inherit the buffering behavior for MSXML. Naturally, the IE8 enginering team had test cases which confirmed that XDomainRequest objects properly support streaming, calling the onprogress event as the response blocks are received from&amp;nbsp;the network.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;Unfortunately, it turns out that our official test suite was based on streaming large responses back to the client. The problem is that, by-default,&amp;nbsp;URLMon (the network wrapper below XDomainRequest) will not bubble up notifications of download progress in the first 2kb of the response. So, if you click “Try XDomainRequest” button on the test page, you will find that you don’t see the onprogress notifications until the entire response is returned.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;A workaround for this problem is to send down a two kilobyte “prelude” at the top of the response stream—my test simply sends 2kb of spaces. After that initial block is received, the onprogress event is fired as each subsequent block is received from the network. Interestingly, you will also find that this “prelude” workaround resolves the Chrome 4.1 XHR behavior described in Point #2 above. When you send this prelude, Chrome’s XHR object will get to readyState=3 and begin reporting blocks as they are received.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;Until next time,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;-Eric&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;PS: Folks using Fiddler to debug with streaming content should be aware of two factors. First, Fiddler buffers most HTTP responses by default—you must&amp;nbsp;&lt;a href=&quot;http://www.fiddler2.com/fiddler/help/streaming.asp&quot; mce_href=&quot;http://www.fiddler2.com/fiddler/help/streaming.asp&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;disable Fiddler&#39;s buffering&lt;/a&gt;&amp;nbsp;if you want content to be streamed to the browser as it normally is. Second, it’s important to understand that Fiddler’s Response Inspectors will not show an incomplete HTTP response. For streaming responses that never end, Fiddler will not show the partial body unless you use the&amp;nbsp;&lt;a href=&quot;https://www.fiddler2.com/dl/fiddler2betasetup.exe&quot; mce_href=&quot;https://www.fiddler2.com/dl/fiddler2betasetup.exe&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;newly introduced&lt;/a&gt;&amp;nbsp;COMETPeek command on the context menu. The COMETPeek command will copy the current partial response body into the Response Inspectors for your viewing pleasure.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;strong&gt;Update:&amp;nbsp;&lt;/strong&gt;IE10&#39;s newly enhanced&amp;nbsp;&lt;a href=&quot;http://blogs.msdn.com/b/ie/archive/2012/02/09/cors-for-xhr-in-ie10.aspx&quot; style=&quot;color: #0066dd; cursor: pointer; outline: none; text-decoration: none;&quot;&gt;CORS-capable XmlHttpRequest&lt;/a&gt;&amp;nbsp;implementation can now stream responses as they are read from the server.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/4471231310092219410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/comet-streaming-in-internet-explorer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/4471231310092219410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/4471231310092219410'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/comet-streaming-in-internet-explorer.html' title='COMET Streaming in Internet Explorer'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-2262418083236307540</id><published>2012-11-24T14:10:00.004+05:30</published><updated>2013-11-13T00:47:29.504+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Get"/><category scheme="http://www.blogger.com/atom/ns#" term="POST"/><category scheme="http://www.blogger.com/atom/ns#" term="Post in c#"/><category scheme="http://www.blogger.com/atom/ns#" term="recieve atguments"/><category scheme="http://www.blogger.com/atom/ns#" term="Request"/><title type='text'>Request , Get , Post in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Request , Get , Post in c#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Receiving&amp;nbsp;the client side posted data on server side in c#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; request &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;q&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;         &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// $_REQUEST&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; post &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;q&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// $_POST&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; get &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;QueryString&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;q&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// $_GET&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/2262418083236307540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/request-get-post-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2262418083236307540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/2262418083236307540'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/11/request-get-post-in-c.html' title='Request , Get , Post in c#'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-5238499576067389533</id><published>2012-05-08T13:13:00.001+05:30</published><updated>2013-11-11T18:03:17.071+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="unique constraint"/><category scheme="http://www.blogger.com/atom/ns#" term="unique constraint on multiple columns"/><category scheme="http://www.blogger.com/atom/ns#" term="Unique two columns"/><title type='text'>SQL SERVER place unique contraint on multiple column</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Problem:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The problem is that we want to create two columns of a table&amp;nbsp;combined unique.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Ex: consider the table below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;EmpID DeptID&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1 &lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
1     2 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;Now we have to maintain the integrity of &amp;nbsp;these two columns&amp;nbsp;combined,&amp;nbsp;as you can see that last two rows are exact duplicate of 1st and 2nd rows which must not exists where as 2nd and 3rd rows are permissible.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large; font-weight: normal;&quot;&gt;Solution :&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you have already created a table then first remove these duplicate rows. Then execute the following SQL query in the query editor window or SQL command prompt.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;ALTER&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;TABLE&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;ADD&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;CONSTRAINT &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;AnyConstraintName&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;UNIQUE&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;EmpID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;DeptID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;border: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-size: small; line-height: normal; white-space: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Or at time of creating table :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;border: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;CREATE&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;TABLE&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; T1 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; EmpID int &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; DeptID int &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;/* Other Columns */&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;constraint&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; PK_T1 &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;PRIMARY&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;KEY&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;EmpID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;DeptID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Hope this will help...&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;border: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;border: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/5238499576067389533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/05/sql-server-place-unique-contraint-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5238499576067389533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/5238499576067389533'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/05/sql-server-place-unique-contraint-on.html' title='SQL SERVER place unique contraint on multiple column'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-6805161889331523234</id><published>2012-05-07T15:57:00.005+05:30</published><updated>2013-11-11T18:06:46.242+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net Ajax Events"/><category scheme="http://www.blogger.com/atom/ns#" term="Ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET Update Panel"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Request complete event"/><category scheme="http://www.blogger.com/atom/ns#" term="Update Panel"/><category scheme="http://www.blogger.com/atom/ns#" term="Update Panel Ajax Request complete event"/><title type='text'>Get the request complete event of ASP.NET Update Panel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Problem :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;This problem is related to the use of jquery with ASP.NET Update panel, I encountered it when i was trying to make a event scheduler using the update panel.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The problem was that when i load the new data in update panel, or when i fire an&amp;nbsp;post-back&amp;nbsp;asynchronously the event handlers of jquery attached to the previous dom inside the update panel gets lost. and i need to attach the events to newly updated dom elements.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Solution :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;I begin my thought process and a ♫♪Tding♥♥♥ &amp;nbsp;idea came into my mind, that when ever an ajax request is completed a request complete event is fired. Thus i need to capture this event and&amp;nbsp;reinitialize&amp;nbsp;my jquery code at the request completion.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;After reading a lot of documentations over&amp;nbsp;Microsoft&amp;nbsp;AJAX i discovered the code below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sys.WebForms.PageRequestManager.getInstance().add_endRequest( &amp;nbsp;yourCallBackFunction );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;And yes this line of code calls your function when ever any ajax request completes on the page. and&amp;nbsp;of course this is the extension to&amp;nbsp;Microsoft&amp;nbsp;AJAX&amp;nbsp;Framework.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Below is a complete demo of code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; Sys.WebForms.PageRequestManager.getInstance().add_endRequest(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;function () { &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#Calender li&#39;).each(function (index) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var Prev = $(this);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).find(&#39;p&#39;).click(function () {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Prev.find(&#39;p&#39;).css(&#39;background-color&#39;, &#39;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).css(&#39;background-color&#39;, &#39;#111&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;simply you can test as: &lt;i&gt;(or i must say cup cake steps)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;1. put a scriptmanager on the page&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;2. place an update panel on your page&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;3. put some buttons inside update panel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;4. copy the following code and paste somewhere inside your page&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sys.WebForms.PageRequestManager.getInstance().add_endRequest(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;function () {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&#39;Request completed&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Thanks for reading hope this will help you some where..&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/6805161889331523234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/05/get-request-complete-event-of-aspnet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/6805161889331523234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/6805161889331523234'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/05/get-request-complete-event-of-aspnet.html' title='Get the request complete event of ASP.NET Update Panel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-1168269197276398408</id><published>2012-04-16T16:51:00.002+05:30</published><updated>2013-11-11T18:15:34.662+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="Comet"/><category scheme="http://www.blogger.com/atom/ns#" term="COMET or Reverse Ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="long Lived AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="Long Polling"/><category scheme="http://www.blogger.com/atom/ns#" term="Server Push"/><title type='text'>COMET or Reverse Ajax</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;This concept is the solution of problem that,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;How to send data from a server to a client without a native HTTP request made by client.&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;This can be implemented in Chatting Applications, Automatic updates of some data.&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;So what is this ?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Georgia, Times New Roman, serif; font-style: italic; line-height: 23px; text-align: -webkit-auto;&quot;&gt;Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. It allows creation of event-driven web applications which are hosted in the browser.&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Try reading from this .&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Comet_%28programming%29&quot;&gt;http://en.wikipedia.org/wiki/Comet_%28programming%29&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;From where do i got to know of this is&amp;nbsp;&lt;a href=&quot;http://stackoverflow.com/questions/3226688/web-chat-application-asp-net-jabber-ajax-wcf-comet-reverseajax-issues-faced&quot;&gt;http://stackoverflow.com/questions/3226688/web-chat-application-asp-net-jabber-ajax-wcf-comet-reverseajax-issues-faced&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;Here is finally wot i got and believe me its Awesome :)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;1. create a new c# web application&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;2. Add a new page name it Services.aspx&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;3. in the code file i.e. Services.aspx.cs add the following code.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #333333; margin: 25px 0px; padding: 10px;&quot;&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Data;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Configuration;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Web;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Web.Security;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Web.UI;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Web.UI.WebControls;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Web.UI.WebControls.WebParts;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;using System.Web.UI.HtmlControls;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public partial class Service : System.Web.UI.Page&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public static string Delimiter = &quot;|&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; protected void Page_Load(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Response.Buffer = false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (true)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Response.Write(Delimiter + DateTime.Now.ToString(&quot;HH:mm:ss.FFF&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Response.Flush();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Suspend the thread for 1/2 a second&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Threading.Thread.Sleep(500);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Yes I know we&#39;ll never get here, it&#39;s just hard not to include it!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Response.End();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;4. Good Now add a html page say home.html and add this code to it.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #333333; margin: 25px 0px; padding: 10px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;lt;head&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Comet AJAX Sample&amp;lt;/title&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; function getData()&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loadXMLDoc(&quot;Service.aspx&quot;);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; var req = false;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; function createRequest()&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // branch for native XMLHttpRequest object&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(window.XMLHttpRequest &amp;amp;&amp;amp; !(window.ActiveXObject))&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req = new XMLHttpRequest();&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch(e) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;req = false;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // branch for IE/Windows ActiveX version&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if(window.ActiveXObject) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch(e) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;req = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;} catch(e) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;req = false;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; function loadXMLDoc(url) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (req) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.abort();&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req = false;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; createRequest();&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (req) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.onreadystatechange = processReqChange;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.open(&quot;GET&quot;, url, true);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.send(&quot;&quot;);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alert(&#39;unable to create request&#39;);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (e) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alert(e.message);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; function processReqChange() {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (req.readyState == 3) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ProcessInput(req.responseText);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // At some (artibrary) length&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // recycle the connection&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (req.responseText.length &amp;gt; 3000) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastDelimiterPosition = -1;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getData();&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (e) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(e.message);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; var lastDelimiterPosition = -1;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; function ProcessInput(input)&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Make a copy of the input&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var text = input;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Search for the last instance of the delimiter&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var nextDelimiter =&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text.indexOf(&#39;|&#39;, lastDelimiterPosition+1);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (nextDelimiter != -1) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Pull out the latest message&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var timeStamp = text.substring(nextDelimiter+1);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (timeStamp.length &amp;gt; 0) {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastDelimiterPosition = nextDelimiter;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ProcessTime(timeStamp);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; function ProcessTime(time)&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var out = document.getElementById(&#39;outputZone&#39;);&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out.innerHTML = time;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;lt;/head&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;lt;body onload=&quot;getData()&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;b&amp;gt;Server Time:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;span id=&quot;outputZone&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;lt;/body&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;5. And yes you have done it Now run your html page.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #666666; font-family: Georgia, Times New Roman, serif;&quot;&gt;You will see that the time is&amp;nbsp;Continuously&amp;nbsp;updating and yeah this is server time also check out that the browser is not sending any AJAX requests.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/1168269197276398408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/04/comet-or-reverse-ajax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/1168269197276398408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/1168269197276398408'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/04/comet-or-reverse-ajax.html' title='COMET or Reverse Ajax'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-4588018863015738797</id><published>2012-04-14T15:45:00.000+05:30</published><updated>2013-11-11T18:22:50.264+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".ascx"/><category scheme="http://www.blogger.com/atom/ns#" term=".ascx load dynamically"/><category scheme="http://www.blogger.com/atom/ns#" term="custom control Dynamically to a page in ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamically"/><title type='text'>Adding a custom control Dynamically to a page in ASP.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Adding a custom control Dynamically to a page in ASP.NET&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;1. Create a control .ascx file into your project Header.ascx (say).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;2. Then add a refrence to your control&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #f3f3f3; color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;%@ Reference Control=&quot;~/modules/controls/Header.ascx&quot;%&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;3. Then in C# use below code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(controls are listed in ASP namespace)&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;ASP.Header header_ctrl= (ASP.&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Header&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;)LoadControl(&quot;~/&lt;/span&gt;&lt;span style=&quot;background-color: #f3f3f3; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Header&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;.ascx&quot;);&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Placeholder.Controls.Add(&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;header_ctrl&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;);&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;here &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Header&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;is custom control and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Placeholder&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;is a panel.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/4588018863015738797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2012/04/some-c-techniques-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/4588018863015738797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/4588018863015738797'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2012/04/some-c-techniques-1.html' title='Adding a custom control Dynamically to a page in ASP.NET'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682681908977789735.post-9183602231651073435</id><published>2011-01-25T23:17:00.000+05:30</published><updated>2013-11-11T18:24:43.176+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="What is PHP"/><title type='text'>Getting Started With PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;PHP - Stands for Hypertext PreProcessor &lt;/span&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: small;&quot;&gt;&lt;b&gt;What is PHP ?&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif; font-size: small;&quot;&gt;PHP is a server side scripting language, it is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line&amp;nbsp; mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as a standalone interpreter on most operating systems and computing platforms.. It is An open source language So feel free to create your website.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;How to begin with PHP ?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;To Start doing Php all you need is a php server eg. Apache Or Wamp Server will do. in these tutorials im using the wamp server for testing. you can &lt;a href=&quot;http://www.wampserver.com/en/&quot;&gt;Download it from here&amp;nbsp; &lt;/a&gt;.after installing start the wamp server then at the taskbar click on the icon of of wamp server &amp;gt;&amp;gt; localhost if the webpage of wamp sserver is displayed then it is ok to proceed. now you have to place all your php files in the www directory of wamp server. you can reach there by click wamp server in taskbar&amp;gt;&amp;gt; www directory and paste your php file there, then open the wamp server start page again this time you will find the name of your folder or php file on the page click it and select the file to run.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;Programming Style:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt;The PHP interpreter only executes PHP code within its delimiters. Anything outside its delimiters is not processed by PHP (although non-PHP text is still subject to control structures described within PHP code). The most common delimiters are &amp;lt;?php to open and ?&amp;gt; to close PHP sections. &amp;lt;script language=&quot;php&quot;&amp;gt; and &amp;lt;/script&amp;gt; delimiters are also available, as are the shortened forms &amp;lt;? or &amp;lt;?= (which is used to echo back a string or variable) and ?&amp;gt; as well as ASP-style short forms &amp;lt;% or &amp;lt;%= and %&amp;gt;. While short delimiters are used, they make script files less portable as support for them can be disabled in the PHP configuration, and so they are discouraged. The purpose of all these delimiters is to separate PHP code from non-PHP code, including HTML.&lt;br /&gt;
&lt;br /&gt;
The first form of delimiters, &amp;lt;?php and ?&amp;gt;, in XHTML and other XML documents, creates correctly formed XML &#39;processing instructions&#39;.This means that the resulting mixture of PHP code and other markup in the server-side file is itself well-formed XML.&lt;br /&gt;
&lt;br /&gt;
Variables are prefixed with a dollar symbol and a type does not need to be specified in advance. Unlike function and class names, variable names are case sensitive. Both double-quoted (&quot;&quot;) and heredoc strings allow the ability to embed a variable&#39;s value into the string. PHP treats newlines as whitespace in the manner of a free-form language (except when inside string quotes), and statements are terminated by a semicolon. PHP has three types of comment syntax: /* */ marks block and inline comments; // as well as # are used for one-line comments. The echo statement is one of several facilities PHP provides to output text (e.g. to a web browser).&lt;br /&gt;
&lt;br /&gt;
In terms of keywords and language syntax, PHP is similar to most high level languages that follow the C style syntax. if conditions, for and while loops, and function returns are similar in syntax to languages such as C, C++, Java and Perl.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Georgia, Times New Roman, serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Example :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table style=&quot;border: 1px solid rgb(128, 128, 128);&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre class=&quot;de1&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset=&quot;utf-8&quot; /&amp;gt;
    &amp;lt;title&amp;gt;PHP Test&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
  &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#39;Hello World&#39;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;coMULTI&quot;&gt;/* echo(&quot;Hello World&quot;); works as well, although echo isn&#39;t a
  function, but a language construct. In some cases, such
  as when multiple parameters are passed to echo, parameters
  cannot be enclosed in parentheses. */&lt;/span&gt;
  &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xtremeproz.blogspot.com/feeds/9183602231651073435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://xtremeproz.blogspot.com/2011/01/getting-started-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/9183602231651073435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682681908977789735/posts/default/9183602231651073435'/><link rel='alternate' type='text/html' href='http://xtremeproz.blogspot.com/2011/01/getting-started-with-php.html' title='Getting Started With PHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13568698942742340471</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>