2.21.08 Convert ADODB XML To JSON Through XSLT category: AJAX, DHTML
1
comm

Need an XSLT1.0 script to convert old ADODB (pre ADO.NET) XML to a nice usable JSON string?

ADODB XML such as:

<xml xmlns:s=‘uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882′
<s:Schema id=‘RowsetSchema’>
    <s:ElementType name=‘row’ content=‘eltOnly’ rs:CommandTimeout=‘30′>

    </s:ElementType>
</s:Schema>
<rs:data>

</rs:data>
</xml>

To JSON like:
[
{
guest_no:'1808354000000',
first_name:'JIMBOB',
last_name:'PALMERSKI',
birth_date:'1980-06-01T00:00:00',
address_id:'927000000000',
area_code:'(555)',
phone:'121-2121',
area_cod2:' ',
phone2:' ',
address:'2443 unit 15\'\'"',
city:'mammoth lakes\'\'2',
state:'AK ',
zip:'12345'
},
{
guest_no:'1750384000000',
first_name:'WEBOPS',
last_name:'RULEZ;',
birth_date:'1981-01-01T00:00:00'
}
]

2.13.08 Consolidate & Compress AJAX Javascript Files Through Coldfusion With JSMin category: AJAX, Coldfusion Development, DHTML
0
comm

When building a large-scale AJAX application the size and number of supporting Javascript files grows quickly. There are many projects out there to aid in the optimized delivery of so many AJAX application assets which essentially consolidate several Javascript files into one file, “compress” via JSMin and finally compress via mod_deflate or simple gzip HTTP compression.

GOAL
To take several JavaScript asset files and consolidate them into 1 file and compress using gzip so that the HTTP server does not need to compress prior to every single request.

12.24.07 mod_cache ignores mod_dir DirectoryIndex index files + workaround category: UNIX
0
comm

An interesting problem with Apache’s mod_cache (even “production” in the 2.2.X branch) is that it does not cache mod_dir’s DirectoryIndex files. For instance, if you have a
DirectoryIndex index.html index.php
declaration, neither of which will be cached by mod_cache. Here’s the quick on how to forcefully redirect the user to a mod_cache’able page:

<VirtualHost *:80>

# “disable” the default httpd.conf DirectoryIndex
DirectoryIndex __NOFILE__

# simulate DirectoryIndex index.html index.php index.cfm
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)/$
RewriteCond “%{DOCUMENT_ROOT}%{REQUEST_URI}index.html” -f
RewriteRule “^(.*)$” “$1index.html” [R=301,NE]

</VirtualHost>

12.17.07 Custom Coldfusion Caching Engine category: Coldfusion Development
2
comm

CFCACHE is a black box item. It works well for “normal” pages, but it’s one caveat since version 6 of Coldfusion was that it automatically pre-pended the cache file with a <!— URI —> right at the top of the file. This ruins any DOCTYPE declaration in IE and there’s no way around it - [...]

9.4.07 Papervision Mesh3D Terrain Map Simplification - Proof of Concept category: Flash Development
1
comm

Proof of concept using Papervision3D in Flash9 to simplify a simple Mesh Plane object via “edge decimation” based off a soft threshold z-coordinate delta:

->
7.13.07 Simple Flash Remoting Proxy Through Linux category: Flash Development, UNIX
0
comm

Every other developer trying to harness the power of Flash Remoting has to deal with the stringent cross-domain security complex that Macrodobe subscribes to. The simple fix I offer here is just a proxy through the same server that serves the initial SWF file to different network-accessible server via IPTABLES proxy.

iptables -t nat -I PREROUTING -d 192.168.10.10 -p tcp --dport 8100 -j DNAT --to 10.0.0.20:443
iptables -t nat -I PREROUTING -d 192.168.10.10 -p udp --dport 8100 -j DNAT --to 10.0.0.20:443
iptables -t nat -I POSTROUTING -d 10.0.0.20 -p tcp --dport 443 -j SNAT --to 192.168.10.10
iptables -t nat -I POSTROUTING -d 10.0.0.20 -p udp --dport 443 -j SNAT --to 192.168.10.10

7.13.07 How To Convert Apache SSL Certificate To Use With IIS category: UNIX
1
comm

Disclaimer: I figured this out from other sites and other’s hard work. Not only that but another classic case for how much we take advantage of the amazing functionality of OpenSSL.
To import your certificate to Windows, you will first need to combine your primary certificate with your private key file in a .pfx type backup [...]

7.11.07 Javascript Recursive Object Copy, Deep Object Copy, Pass By Value category: DHTML
1
comm

Use jQuery’s jQuery.extend( TRUE, target, object1, [objectN] ) “DEEP EXTEND” instead.

var tt = {one:[{two:1}]};
var ttt = $.extend(true, {}, tt);
alert(ttt.one[0].two == tt.one[0].two);   // output true
ttt.one[0].two = 2;
alert(ttt.one[0].two == tt.one[0].two)// output false
7.10.07 DHTML Date Picker, Javascript Calendar v0.3 category: DHTML
8
comm

I’ve seen my share of Dynamic HTML Date Pickers, Javascript Calendar controls, and the like. Each of which have a more horrifically ugly interface and are bloated with features. I found a need to create a simple calender piece so that a user could add a product to their cart when clicking on a specific [...]

6.20.07 DHTML Balloon Help, Tooltip, Hint That Auto Positions category: DHTML
0
comm

UPDATED - 11/28/2007

Fixed issue with scrollable document window. It will not properly position in IE6.2800, IE7, and FF2 with loose.dtd. Will test with Safari shortly.

UPDATED - 10/16/2007

fixed issue with not properly aligning the balloon vertically when on the “top” of the element it’s pointing at. This was an obvious problem when the balloon was pointing [...]

3.278s