<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BarneyBlog &#187; neuromancer</title>
	<atom:link href="http://www.barneyb.com/barneyblog/category/neuromancer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Mon, 02 Mar 2020 13:20:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Neuromancer 0.6.5 Released</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/24/neuromancer-065-released/</link>
		<comments>https://www.barneyb.com/barneyblog/2006/04/24/neuromancer-065-released/#comments</comments>
		<pubDate>Tue, 25 Apr 2006 03:22:25 +0000</pubDate>
		<dc:creator>barneyb</dc:creator>
				<category><![CDATA[neuromancer]]></category>

		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=158</guid>
		<description><![CDATA[Neuromancer 0.6.5 has been released, and is available for download.&#160; Along with the changes I've mentioned in previous posts, there are a few goodies from Rob in there.
We're in the process of finalizing some API changes that will comprise the next release.&#160; As the project has evolved, the initial design has put forth a few [...]]]></description>
			<content:encoded><![CDATA[<p>Neuromancer 0.6.5 has been released, and is <a href="http://neuromancer.sourceforge.net/">available for download</a>.&nbsp; Along with the changes I've mentioned in previous posts, there are a few goodies from Rob in there.</p>
<p>We're in the process of finalizing some API changes that will comprise the next release.&nbsp; As the project has evolved, the initial design has put forth a few limitations that we're going to address to make future growth easier, and to make the API a more consistent.</p>
<p>On a sad note, Rob's nightly build script doesn't run on the new Apple JVM for some unknown reasons, so nightly builds are out of commission for the moment.&nbsp; Hopefully they'll be back up and running soon.&nbsp; As always, you can get the bleeding edge from Subversion.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.barneyb.com/barneyblog/2006/04/24/neuromancer-065-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neuromancer Update</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/08/neuromancer-update/</link>
		<comments>https://www.barneyb.com/barneyblog/2006/04/08/neuromancer-update/#comments</comments>
		<pubDate>Sat, 08 Apr 2006 18:50:42 +0000</pubDate>
		<dc:creator>barneyb</dc:creator>
				<category><![CDATA[neuromancer]]></category>

		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=154</guid>
		<description><![CDATA[Rob did a bunch of work with Neuromancer last night, including appying a nice template to the site, setting up a wiki (available from the site), and committing a bunch of changes that he'd made since the 0.6.0beta was released in December, but which hadn't made it into Subversion yet.&#160; Finally, he added automated nightly [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblog.robrohan.com/">Rob</a> did a bunch of work with <a href="http://neuromancer.sourceforge.net/">Neuromancer</a> last night, including appying a nice template to the site, setting up a wiki (available from the site), and committing a bunch of changes that he'd made since the 0.6.0beta was released in December, but which hadn't made it into Subversion yet.&nbsp; Finally, he added automated nightly builds to the site, so you can get the bleeding-edge source without having to hit the Subversion repository, and I won't have to blog patches anymore.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.barneyb.com/barneyblog/2006/04/08/neuromancer-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neuromancer Again</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/05/neuromancer-again/</link>
		<comments>https://www.barneyb.com/barneyblog/2006/04/05/neuromancer-again/#comments</comments>
		<pubDate>Wed, 05 Apr 2006 17:40:26 +0000</pubDate>
		<dc:creator>barneyb</dc:creator>
				<category><![CDATA[neuromancer]]></category>

		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=148</guid>
		<description><![CDATA[While working on my CFUG preso for this month, I found another bug: dates weren't handled properly coming back from web service calls.&#160; So I added support for them.&#160; Patch file for js/io/RemoteObject.js below, or you can get the update and supporting test scripts from Subversion.
Index: RemoteObject.js
===================================================================
&#8212; RemoteObject.js     (revision 10)
+++ RemoteObject.js [...]]]></description>
			<content:encoded><![CDATA[<p>While working on my CFUG preso for this month, I found another bug: dates weren't handled properly coming back from web service calls.&nbsp; So I added support for them.&nbsp; Patch file for <code>js/io/RemoteObject.js</code> below, or you can get the update and supporting test scripts from Subversion.</p>
<div>Index: RemoteObject.js<br />
===================================================================<br />
&#8212; RemoteObject.js     (revision 10)<br />
+++ RemoteObject.js     (revision 11)<br />
@@ -26,6 +26,7 @@<br />
 var DATATYPE_BOOLEAN = &quot;soapenc:boolean&quot;;<br />
 var DATATYPE_NUMBER = &quot;soapenc:double&quot;;<br />
 var DATATYPE_NUMBER2 = &quot;xsd:double&quot;;<br />
+var DATATYPE_DATE_TIME = &quot;xsd:dateTime&quot;;</p>
<p> /**<br />
  * Variable: REMOTE_OBJECT_VERSION<br />
@@ -85,6 +86,10 @@<br />
                                        {<br />
                                                value = parseFloat(dItem.item(z).firstChild.nodeValue);<br />
                                        }<br />
+                                       else if (xsiType == DATATYPE_DATE_TIME)<br />
+                                       {<br />
+                                               value = DefaultHandler.xmlDate2JSDate(dItem.item(z).firstChild.nodeValue);<br />
+                                       }<br />
                                        else if(xsiType == DATATYPE_MAP)<br />
                                        {<br />
                                                value = new Map();<br />
@@ -95,7 +100,7 @@<br />
                                        }<br />
                                }<br />
                        }<br />
-                       nstruct.put(key,value);<br />
+                       nstruct.put(key,value);<br />
                }<br />
        }<br />
 }<br />
@@ -716,6 +721,10 @@<br />
                {<br />
                        eval(__dfh__variable + &quot; = parseFloat(resvalnodes.item(0).firstChild.nodeValue)&quot;);<br />
                }<br />
+               else if (returntype == DATATYPE_DATE_TIME)<br />
+               {<br />
+                       eval(__dfh__variable + &quot; = DefaultHandler.xmlDate2JSDate(resvalnodes.item(0).firstChild.nodeValue)&quot;);<br />
+               }<br />
        //}<br />
        //this is a structure (a coldfusion struct)<br />
        //else if(complextypeid != null &amp;&amp; complextypeid.length &gt; 1)<br />
@@ -765,6 +774,8 @@<br />
        //show the value to stdout<br />
        if(__dfh__variable == &quot;__neuro__myvar__&quot;)<br />
        {<br />
+               // TODO: this throws not defined errors.  Probably should be if(typeof neuro_SystemOut == &quot;function&quot;) instead<br />
+               // Hopefully, however, no one will ever get here, because they'll always be using a callback.<br />
                if(neuro_SystemOut != null)<br />
                {<br />
                        neuro_SystemOut(&quot;\n&quot;);<br />
@@ -774,4 +785,29 @@<br />
                                neuro_Runner(&quot;&quot;);<br />
                }<br />
        }<br />
+};<br />
+<br />
+DefaultHandler.xmlDate2JSDate = function __xmlDate2JSDate(xmlDate) {<br />
+       var val = xmlDate.split(&quot;T&quot;);<br />
+       // split it into date and time portions<br />
+       var date = val[0];<br />
+       var time = val[1];<br />
+       date = date.split(&quot;-&quot;);<br />
+       time = time.split(&quot;:&quot;);<br />
+       // rip out the date portions<br />
+       var year = date[0];<br />
+       var month = date[1] &#8211; 1; // JS uses 0-11, not 1-12<br />
+       var day = date[2];<br />
+       // rip out the time portions<br />
+       var hours = time[0];<br />
+       var minutes = time[1];<br />
+       var seconds = parseFloat(time[2]);<br />
+       // convert fractional seconds to milliseconds<br />
+       var millis = Math.round((seconds &#8211; Math.floor(seconds) ) * 1000);<br />
+       seconds = Math.floor(seconds);<br />
+       // assemble the completed date<br />
+       var completeDate = new Date(year, month, day, hours, minutes, seconds, millis);<br />
+       // adjust the time from UTC (Zulu) to local time<br />
+       // TODO: change the to check for the appropriate adjustment, rather than blindly assuming UTC<br />
+       return new Date(completeDate.getTime() &#8211; (completeDate.getTimezoneOffset() * 60 * 1000));<br />
 };
</p></div>
]]></content:encoded>
			<wfw:commentRss>https://www.barneyb.com/barneyblog/2006/04/05/neuromancer-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neuromancer [Re]Addition</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/03/neuromancer-readdition/</link>
		<comments>https://www.barneyb.com/barneyblog/2006/04/03/neuromancer-readdition/#comments</comments>
		<pubDate>Tue, 04 Apr 2006 06:51:04 +0000</pubDate>
		<dc:creator>barneyb</dc:creator>
				<category><![CDATA[neuromancer]]></category>

		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=146</guid>
		<description><![CDATA[A while back I need to do a standard form POST via Neuromancer, so I'd added a doFormPostRequest method to the JSRemote object.&#160; I just needed it again, and for whatever reason, it hadn't made it's way into the core distribution.&#160; So I merged my modded sources in (I love version control ; )), and [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I need to do a standard form POST via Neuromancer, so I'd added a doFormPostRequest method to the JSRemote object.&nbsp; I just needed it again, and for whatever reason, it hadn't made it's way into the core distribution.&nbsp; So I merged my modded sources in (I love version control ; )), and thought I'd share.</p>
<p>As before, the updates are in the Subversion repo, or you may use the patch below.&nbsp; Note that this time it's for <code>js/io/Gateway.js</code>, not <code>RemoteObject.js</code>.
</p>
<div>Index: Gateway.js<br />
===================================================================<br />
&#8212; Gateway.js  (revision 8)<br />
+++ Gateway.js  (revision 9)<br />
@@ -161,6 +161,38 @@<br />
 };</p>
<p> /**<br />
+ * Method: JSRemote.doFormPostRequest<br />
+ * This method implements a multi-field form submission via a POST,<br />
+ * using the 'fields' object as a set of name:value pairs to pass as<br />
+ * the form fields.  It simply delegates to doPostRequest for the<br />
+ * actual processing; the only functionality is serializing the fields.<br />
+ *<br />
+ * Note that this method's parameter ordering does NOT correspond to<br />
+ * doPostRequest's.<br />
+ *<br />
+ * Parameters:<br />
+ *  url &#8211; the url to POST to<br />
+ *  fields &#8211; the form fields to POST<br />
+ *  handler &#8211; the callback function to send results to<br />
+ */<br />
+JSRemote.prototype.doFormPostRequest = function _doFormPostRequest(url, fields, handler) {<br />
+       var body = &quot;&quot;;<br />
+       var headers = new Object();<br />
+       var boundary = &quot;neuro&quot; + Math.random();<br />
+<br />
+       for (var i in fields) {<br />
+               body += &quot;&#8211;&quot; + boundary + &quot;\nContent-Disposition: form-data;name=\&quot;&quot; + i + &quot;\&quot;\n&quot;;<br />
+               body += &quot;\n&quot;;<br />
+               body += fields[i] + &quot;\n&quot;;<br />
+               body += &quot;\n&quot;;<br />
+       }<br />
+       body += &quot;&#8211;&quot; + boundary + &quot;&#8211;&quot;;<br />
+<br />
+       headers[&quot;Content-Type&quot;] = &quot;multipart/form-data; boundary=&quot; + boundary;<br />
+       this.doPostRequest(url, handler, body, headers);<br />
+}<br />
+<br />
+/**<br />
  * Method: JSRemote.doPostRequest<br />
  * Does a simple post request, passing the bodyinfo as the body of the<br />
  * request &#8211; meaning the only way to get the bodyinfo out is to do<br />
@@ -171,7 +203,7 @@<br />
  *     func_handler &#8211; the callback function to send the results to<br />
  *     bodyinfo &#8211; what to send in the body of the POST<br />
  */<br />
-JSRemote.prototype.doPostRequest = function _doPostRequest(url, func_handler, bodyinfo)<br />
+JSRemote.prototype.doPostRequest = function _doPostRequest(url, func_handler, bodyinfo, extraHeaders)<br />
 {<br />
        log.info(&quot;doPostRequest to &quot; + url);<br />
        log.info(&quot;using pipe: &quot; + this.connectionid);<br />
@@ -211,6 +243,11 @@<br />
        conn.setRequestHeader(&quot;XLibrary&quot;, &quot;Neuromancer 1.5beta&quot;);<br />
        if(bodyinfo.indexOf(&quot;</p></div>
]]></content:encoded>
			<wfw:commentRss>https://www.barneyb.com/barneyblog/2006/04/03/neuromancer-readdition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Neuromancer Bug Fixed</title>
		<link>https://www.barneyb.com/barneyblog/2006/03/31/another-neuromancer-bug-fixed/</link>
		<comments>https://www.barneyb.com/barneyblog/2006/03/31/another-neuromancer-bug-fixed/#comments</comments>
		<pubDate>Sat, 01 Apr 2006 00:50:04 +0000</pubDate>
		<dc:creator>barneyb</dc:creator>
				<category><![CDATA[neuromancer]]></category>

		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=144</guid>
		<description><![CDATA[Chris Philips found another Bug in Neuromancer today.  Computed numbers, returned as members of a struct, were always deserialized as null.  Literal numbers, however, were handled correctly.  While debugging the problem, I realized the methods with returntype="numeric" simply refused to run as well, for much the same reason.  Both glitches are now fixed.

As before, the [...]]]></description>
			<content:encoded><![CDATA[<p>Chris Philips found another Bug in Neuromancer today.  <em>Computed</em> numbers, returned as members of a struct, were always deserialized as null.  <em>Literal</em> numbers, however, were handled correctly.  While debugging the problem, I realized the methods with <code>returntype="numeric"</code> simply refused to run as well, for much the same reason.  Both glitches are now fixed.
</p>
<p>As before, the zip on SourceForge has not been updated, though the changes are available in the Subversion repository.  I've included a patch below for <code>js/io/RemoteObject.js</code> that you can use to get the fix as well.  The patch should work with or without <a href="/blog/archives/000674.jsp">last night's update</a>, but I'd recommend applying them both in order.  If you want the updated test cases, you'll have to hit the SVN repository.
</p>
<div>Index: RemoteObject.js<br />
===================================================================<br />
&#8212; RemoteObject.js     (revision 6)<br />
+++ RemoteObject.js     (revision 7)<br />
@@ -24,6 +24,8 @@<br />
 var DATATYPE_STRING2 = "xsd:string";<br />
 var DATATYPE_ARRAY     = "soapenc:Array";<br />
 var DATATYPE_BOOLEAN = "soapenc:boolean";<br />
+var DATATYPE_NUMBER = "soapenc:double";<br />
+var DATATYPE_NUMBER2 = "xsd:double";</p>
<p> /**<br />
  * Variable: REMOTE_OBJECT_VERSION<br />
@@ -74,11 +76,16 @@<br />
                                        //if(dItem.item(z).getAttribute("href")== null<br />
                                        //      || typeof dItem.item(z).getAttribute("href") == "undefined"<br />
                                        //      || dItem.item(z).getAttribute("href") == "")<br />
-                                       if(dItem.item(z).getAttribute("xsi:type") == DATATYPE_STRING)<br />
+                                       var xsiType = dItem.item(z).getAttribute("xsi:type")<br />
+                                       if(xsiType == DATATYPE_STRING || xsiType == DATATYPE_STRING2)<br />
                                        {<br />
                                                value = dItem.item(z).firstChild.nodeValue;<br />
                                        }<br />
-                                       else if(dItem.item(z).getAttribute("xsi:type") == DATATYPE_MAP)<br />
+                                       else if (xsiType == DATATYPE_NUMBER || xsiType == DATATYPE_NUMBER2)<br />
+                                       {<br />
+                                               value = parseFloat(dItem.item(z).firstChild.nodeValue);<br />
+                                       }<br />
+                                       else if(xsiType == DATATYPE_MAP)<br />
                                        {<br />
                                                value = new Map();<br />
                                                //value = "!ref! " + dItem.item(z).getAttribute("href");<br />
@@ -705,6 +712,10 @@<br />
                                eval(__dfh__variable + " = resvalnodes.item(0).firstChild.nodeValue");<br />
                        }<br />
                }<br />
+               else if (returntype == DATATYPE_NUMBER || returntype == DATATYPE_NUMBER2)<br />
+               {<br />
+                       eval(__dfh__variable + " = parseFloat(resvalnodes.item(0).firstChild.nodeValue)");<br />
+               }<br />
        //}<br />
        //this is a structure (a coldfusion struct)<br />
        //else if(complextypeid != null &#038;&#038; complextypeid.length > 1)
</p></div>
<p> internetiniu svetainiu ir el parduotuviu kurimas, SEO optimizacija ir kitos reklamos paslaugos konkurencinga kaina <a href="https://seopaslaugos.com/seo-optimizacija-google/" title="seo optimizacija">https://seopaslaugos.com/seo-optimizacija-google/</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.barneyb.com/barneyblog/2006/03/31/another-neuromancer-bug-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neuromancer Bug Fixed</title>
		<link>https://www.barneyb.com/barneyblog/2006/03/30/neuromancer-bug-fixed/</link>
		<comments>https://www.barneyb.com/barneyblog/2006/03/30/neuromancer-bug-fixed/#comments</comments>
		<pubDate>Fri, 31 Mar 2006 06:23:27 +0000</pubDate>
		<dc:creator>barneyb</dc:creator>
				<category><![CDATA[neuromancer]]></category>

		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=143</guid>
		<description><![CDATA[&#160;Chris Phillips found a bug in the Neuromancer 0.6.0beta today.&#160; If you used the RemoteObjectLoader class (recommended), instead of the raw RemoteObjectFactory (way nasty), it was impossible to create multiple remote objects on a single page, because the RemoteObjectLoader class was not thread safe.&#160; The first remote object created was always returned by every RemoteObjectLoader, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;Chris Phillips found a bug in the <a href="http://sourceforge.net/project/showfiles.php?group_id=151164">Neuromancer 0.6.0beta</a> today.&nbsp; If you used the RemoteObjectLoader class (recommended), instead of the raw RemoteObjectFactory (way nasty), it was impossible to create multiple remote objects on a single page, because the RemoteObjectLoader class was not thread safe.&nbsp; The first remote object created was always returned by every RemoteObjectLoader, ragerdless of what remote object it was supposed to load.
</p>
<p>Unfortunately, Rob and I are still getting the project all set up on the SourceForge system, so a new build with the fix included hasn't been released.&nbsp; As such, the bug fix is only available via Subversion or via the patch file below.&nbsp; Subversion instructions can be found on <a href="http://sourceforge.net/svn/?group_id=151164">this page</a>, and as they suggest, you <strong>will</strong> want to append &quot;<code>/trunk</code>&quot; to the URL listed in the command.</p>
<p>Since that's not very user friendly, I've included a patch for js/io/RemoteObject.js that will update an existing 0.6.0beta version with the bug fix.&nbsp; Note that you want to patch just that one file, not the whole directory tree.
</p>
<div>Index: RemoteObject.js<br />
===================================================================<br />
&#8212; RemoteObject.js     (revision 3)<br />
+++ RemoteObject.js     (revision 4)<br />
@@ -136,8 +136,10 @@<br />
        if(typeof async == &quot;undefined&quot;)<br />
                async = false;<br />
-       RemoteObjectLoader.RemoteObjectFactory.setAsync(async);<br />
-       RemoteObjectLoader.RemoteObjectFactory.createObject(RemoteObjectLoader.HTTPConnectFactory.getInstance(), url);<br />
+       this.remoteObjectFactory = new RemoteObjectFactory();<br />
+<br />
+       this.remoteObjectFactory.setAsync(async);<br />
+       this.remoteObjectFactory.createObject(RemoteObjectLoader.HTTPConnectFactory.getInstance(), url);<br />
        var self = this;<br />
@@ -143,7 +145,7 @@<br />
        checkLoaded = function()<br />
        {<br />
-               var remObj = RemoteObjectLoader.RemoteObjectFactory.getObject();<br />
+               var remObj = self.remoteObjectFactory.getObject();<br />
                var fieldCount = 0;<br />
                for(var i in remObj)<br />
                {<br />
@@ -160,7 +162,6 @@<br />
        this.loadInterval = setInterval(checkLoaded, 100);<br />
 }<br />
 RemoteObjectLoader.HTTPConnectFactory = new HTTPConnectFactory();<br />
-RemoteObjectLoader.RemoteObjectFactory = new RemoteObjectFactory();<br />
 /////////////////////////////////////////////////////////////////////////////////////
</div>
<p>Any decent IDE (cough, Eclipse, cough) will have a patch function, or you can use the command line <code>patch</code> utility.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.barneyb.com/barneyblog/2006/03/30/neuromancer-bug-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
