<?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: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-34535147</id><updated>2012-01-18T00:53:57.920-07:00</updated><title type='text'>return Hot.Code() ?? Junk.Code();</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>54</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34535147.post-5219315087106601232</id><published>2010-03-22T12:51:00.003-06:00</published><updated>2010-03-22T13:03:13.568-06:00</updated><title type='text'>My IE trash talkin' days may have an end in sight!</title><content type='html'>I've been fairly happy with some of the new features that IE8 has brought with it (more CSS support, more correct HTML rendering). I've also been very unhappy with a slew of new issues as well (Lookahead downloader issues, like &lt;a href='http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx'&gt;this&lt;/a&gt;, along with various other random issues).&lt;br /&gt;&lt;br /&gt;But the last few posts on the &lt;a href='http://blogs.msdn.com/ie/'&gt;IE Blog&lt;/a&gt; have made the future look a little brighter (if only people upgrade their IE, or Windows does a better job of upgrading it for them)&lt;br /&gt;&lt;br /&gt;Finally SVG!, Yay!&lt;br /&gt;CSS rounded borders, hip hip horray!!&lt;br /&gt;canvas, :)&lt;br /&gt;&lt;br /&gt;It's just sad that IE7/6 is still a major contenders, ugghhh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5219315087106601232?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5219315087106601232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5219315087106601232' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5219315087106601232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5219315087106601232'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2010/03/my-ie-trash-talkin-days-may-have-end-in.html' title='My IE trash talkin&apos; days may have an end in sight!'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4162671909618871984</id><published>2009-10-19T10:00:00.002-06:00</published><updated>2009-10-19T10:22:37.422-06:00</updated><title type='text'>IE8 Image is undefined part 2</title><content type='html'>In response to my last &lt;a href="http://juztinwilzon.blogspot.com/2009/10/ie8-image-is-undefined.html"&gt;post&lt;/a&gt; about IE8 having issues with pop-up windows where the 'Image' object is undefined I was able find another fix for this issue.&lt;br /&gt;&lt;br /&gt;While I was searching for information on this topic I stumbled across &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/a250c431-9f09-441c-9b78-af067233ed78"&gt;this&lt;/a&gt; entry on Microsofts forums. The fourth comment down, by the user 'Fattymelt', stated that he was able to resolve the issue by simply removing the call to 'focus' of the pop-up.&lt;br /&gt;&lt;br /&gt;var pop = window.open(...);&lt;br /&gt;pop.focus(); // removing this prevents the Image from being undefined&lt;br /&gt;&lt;br /&gt;Wellll... It did prevent the issue, but it doesn't look like it's the 'focus' function that's causing it. 'blur' also caused the issue along with everything else I called from the 'window.open' object. Not just function calls either, a simple check against the 'closed' property also yielded the issue.&lt;br /&gt;&lt;br /&gt;So, it looks there are two options to get around this issue..&lt;br /&gt;1. Do the iframe hack from my previous post.&lt;br /&gt;2. Don't make any calls to the 'window.open' object&lt;br /&gt;&lt;br /&gt;As a side not I tried to post some of these results to the MS forums thread above, but everytime I click the reply link in the forum it takes me to my profile. I can't seem to post any replies to any threads... :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4162671909618871984?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4162671909618871984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4162671909618871984' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4162671909618871984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4162671909618871984'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/ie8-image-is-undefined-part-2.html' title='IE8 Image is undefined part 2'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-7681386591571256172</id><published>2009-10-16T20:02:00.005-06:00</published><updated>2009-10-16T20:59:02.750-06:00</updated><title type='text'>IE8 Image is undefined</title><content type='html'>I was given a wonderful bug to work on today at work. Apparently we had numerous pages where a nice little javascript exception was being thrown, which in turn broke our pages. The issue was ONLY happening while using IE8, no issues with previous version of IE or Firefox/Safari/Chrome.&lt;br /&gt;&lt;br /&gt;We use Omniture for site analytics and it was in their script that the issue was occuring. One problem we faced was the fact that their javascript is obfuscated so trying to read through their code was no fun. From what we could gather it looked as though they where using an 'Image' object with it's source set as a generated URL to report statistics.&lt;br /&gt;&lt;br /&gt;After a bit of fiddler, javascript and code commenting we where able to narrow the issue down to this scenario&lt;br /&gt;&lt;br /&gt;1. Within one window call 'window.open(...)' to open a new window&lt;br /&gt;2. On the server, during the request for the new window, do a redirect to the same page&lt;br /&gt;3. Once the page has loaded, after the redirect, you no longer have an 'Image' object&lt;br /&gt;4. If you reload the page you now, magically, have an 'Image' object&lt;br /&gt;&lt;p style='font-size:11px;color:#AAA'&gt;&lt;i&gt;(the redirect back to the same page was due to the original design of a few pages the application had. Basically a parameter is included in the query-string that notifies the server to reset a session variable, and the redirect goes back to the same page without the variable in the query-string)&lt;/i&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;According to some searching there are other scenarios where the 'Image' is undefined. Add-ons can cause this issue as well.&lt;br /&gt;&lt;br /&gt;So.. What to do about this. Well like I stated in my previous post I tried to report the issue with MS, but unfortunately I could only post a comment on one of their forums. I also have an ASP.NET sample project that can consistently reproduce this issue, but I have nowhere to send it to. Maybe they don't like bug reports? I also couldn't find any useful information during my searching that could resolve this issue so it was down to some wonderful hacking...&lt;br /&gt;&lt;br /&gt;My first attempt was to simply add this script to the top of our Omniture script&lt;br /&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12px Monaco"&gt;&lt;span style="color: #2c12fe"&gt;function&lt;/span&gt; &lt;span style="color: #1b09b1"&gt;Image&lt;/span&gt;() { }&lt;br&gt;&lt;span style="color: #848de4"&gt;Image&lt;/span&gt;.&lt;span style="color: #19a615"&gt;prototype&lt;/span&gt; &lt;span style="color: #2c12fe"&gt;=&lt;/span&gt; &lt;span style="color: #848de4"&gt;document&lt;/span&gt;.&lt;span style="color: #4f5f85"&gt;createElement&lt;/span&gt;(&lt;span style="color: #0f7d09"&gt;'image'&lt;/span&gt;)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;That doesn't create exactly what you want though. But is interesting that you can get an instance of 'Image' by using the document.createElement('image').&lt;br /&gt;&lt;br /&gt;For my next attempt I tried to see if I could get a reference from the parent window using&lt;br /&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12px Monaco; color: #848de4"&gt;Image&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2c12fe"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;window&lt;span style="color: #000000"&gt;.&lt;/span&gt;&lt;span style="color: #19a615"&gt;parent&lt;/span&gt;&lt;span style="color: #000000"&gt;.&lt;/span&gt;Image&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;But from the child window the parents Image was also null, even though it really wasn't when you actually tested it on the parent. Lovely I know.&lt;br /&gt;&lt;br /&gt;But I was getting somewhere, since I didn't have what I wanted in the pop-up I was trying to get it from another window. So then the object/iframe tags came into mind. I wondered if the problem would still exist within an object/iframe tag within the broken page since it's DOM is different than the pop-ups.&lt;br /&gt;&lt;br /&gt;I also found a post on &lt;a href="http://dean.edwards.name/weblog/2006/11/hooray/"&gt;Dean Edward's&lt;/a&gt; blog doing exactly what I needed so it saved me a bit of time/testing.&lt;br /&gt;&lt;br /&gt;Sooooo here it is in all it's glory.&lt;br /&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12px Monaco"&gt;&lt;span style="color: #2c12fe"&gt;/*@cc_on&lt;br/&gt;if&lt;/span&gt; (&lt;span style="color: #2c12fe"&gt;typeof&lt;/span&gt; &lt;span style="color: #848de4"&gt;Image&lt;/span&gt; &lt;span style="color: #2c12fe"&gt;==&lt;/span&gt; &lt;span style="color: #0f7d09"&gt;'undefined'&lt;/span&gt;) {&lt;br&gt;&amp;nbsp; &amp;nbsp; (&lt;span style="color: #2c12fe"&gt;function&lt;/span&gt;() {&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #2c12fe"&gt;function&lt;/span&gt; &lt;span style="color: #1b09b1"&gt;createImage&lt;/span&gt;() {&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #2c12fe"&gt;var&lt;/span&gt; iframe &lt;span style="color: #2c12fe"&gt;=&lt;/span&gt; &lt;span style="color: #848de4"&gt;document&lt;/span&gt;.&lt;span style="color: #4f5f85"&gt;createElement&lt;/span&gt;(&lt;span style="color: #0f7d09"&gt;'iframe'&lt;/span&gt;);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iframe.&lt;span style="color: #19a615"&gt;style&lt;/span&gt;.&lt;span style="color: #19a615"&gt;display&lt;/span&gt; &lt;span style="color: #2c12fe"&gt;=&lt;/span&gt; &lt;span style="color: #0f7d09"&gt;'none'&lt;/span&gt;;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #848de4"&gt;document&lt;/span&gt;.&lt;span style="color: #19a615"&gt;body&lt;/span&gt;.&lt;span style="color: #4f5f85"&gt;appendChild&lt;/span&gt;(iframe);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #848de4"&gt;window&lt;/span&gt;.&lt;span style="color: #19a615"&gt;frames&lt;/span&gt;[&lt;span style="color: #848de4"&gt;window&lt;/span&gt;.&lt;span style="color: #19a615"&gt;frames&lt;/span&gt;.&lt;span style="color: #19a615"&gt;length&lt;/span&gt; &lt;span style="color: #2c12fe"&gt;-&lt;/span&gt; &lt;span style="color: #230dd5"&gt;1&lt;/span&gt;].&lt;span style="color: #848de4"&gt;document&lt;/span&gt;.&lt;span style="color: #4f5f85"&gt;write&lt;/span&gt;(&lt;span style="color: #0f7d09"&gt;"&amp;lt;script&amp;gt;window.parent.Image = Image;&amp;lt;&lt;/span&gt;&lt;span style="color: #3bc026"&gt;\/&lt;/span&gt;&lt;span style="color: #0f7d09"&gt;script&amp;gt;"&lt;/span&gt;);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #307bfe"&gt;//don't uncomment the line below as it causes IE8 to throw-up&lt;br&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #307bfe"&gt;//document.body.removeChild(iframe);&lt;br&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #2c12fe"&gt;var&lt;/span&gt; wl &lt;span style="color: #2c12fe"&gt;=&lt;/span&gt; &lt;span style="color: #848de4"&gt;window&lt;/span&gt;.onload;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #848de4"&gt;window&lt;/span&gt;.&lt;span style="color: #1b09b1"&gt;onload&lt;/span&gt; &lt;span style="color: #2c12fe"&gt;=&lt;/span&gt; &lt;span style="color: #2c12fe"&gt;function&lt;/span&gt;() { createImage(); &lt;span style="color: #2c12fe"&gt;if&lt;/span&gt;(&lt;span style="color: #2c12fe"&gt;!&lt;/span&gt;(&lt;span style="color: #2c12fe"&gt;!&lt;/span&gt;(wl))) { wl() } };&lt;br&gt;&amp;nbsp; &amp;nbsp; })();&lt;br&gt;}&lt;br/&gt;@*/&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;We wouldn't have to do the anonymous function and bind to the window.onload event, but in our case this was added to the top of our Omniture script file which is used as a script include at the top of our files (before the body tag) so the additional code was added so it would still work. Otherwise you could just add it to your page at the top/bottom wherever (as long as it's before any reference to 'Image')&lt;br /&gt;&lt;br /&gt;What it does?&lt;br /&gt;Basically we just create an iframe and add it to the DOM. Then we write the script string to the iframe which causes IE to execute it immediately. From within the iframe the 'Image' isn't broken/undefined so we set the parent's(broken window) Image to the iframes(working) Image. We ended up leaving the iframe in the page after the reference was set because IE would barf otherwise. This may be due to the reference on the parent no longer pointing to anything, but who knows. Oh yeah it's also wrapped in conditional compilation so that good browsers don't have to worry about anything.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-7681386591571256172?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/7681386591571256172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=7681386591571256172' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/7681386591571256172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/7681386591571256172'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/ie8-image-is-undefined.html' title='IE8 Image is undefined'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-3039834494744852023</id><published>2009-10-16T11:12:00.002-06:00</published><updated>2009-10-16T11:16:48.983-06:00</updated><title type='text'>Google likes IE8 more than Microsoft does?</title><content type='html'>I tried to post a bug with IE8 today with Microsoft and got to talking with a colleague about Bing. We loaded it up and where curious if MS would filter any anti MS/IE related topics. So we entered in "IE8 sucks" in the search bars for both Google and Bing and let them off their leashes.&lt;br /&gt;&lt;br /&gt;Google reported 'about 67,700' results while Bing reported '1,620,000' results.&lt;br /&gt;Doh!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-3039834494744852023?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/3039834494744852023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=3039834494744852023' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3039834494744852023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3039834494744852023'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/google-likes-ie8-more-than-microsoft.html' title='Google likes IE8 more than Microsoft does?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-8287650593993978626</id><published>2009-10-09T15:53:00.006-06:00</published><updated>2009-10-09T16:16:45.613-06:00</updated><title type='text'>(Simplified) Block/Closure Extension to C/Objective C/C++</title><content type='html'>&lt;style type='text/css'&gt;.code {width:450px;margin:0 auto;}.codeHeader {color:#33C;font-style:italic;padding-left:5px;} .codeBlock {color:black;border:solid 1px #33C;background:#EEF;}.greyCode { color:#AAA; }.lbt { color:#33C; }.cm { color: #B615A2; }.cbr { color:#75482C; }.cbl { color:#548187;}.cr { color:#CB2321; }&lt;/style&gt;&lt;br /&gt;&lt;p&gt;My previous post from yesterday showed the new block/closure feature of the C language. I think I may have made the block syntax more complex looking than it needed to be by including the full interface/object code along with it. So today I'll strip off some of that unneeded code and do a comparison of just the basic syntax of C/ObjC's new block with that of C#'s anonymous method.&lt;p/&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class='code'&gt;&lt;div class='codeHeader'&gt;(block 1)&lt;/div&gt;&lt;div class='codeBlock'&gt;&lt;span class='lbt'&gt; - ObjC&lt;/span&gt;&lt;br /&gt;&lt;span class='cm'&gt;typedef void&lt;/span&gt;(^Block)(&lt;span class='cbl'&gt;char&lt;/span&gt;*);&lt;br/&gt;&lt;br /&gt;&lt;span class='lbt'&gt; - C#&lt;/span&gt;&lt;br /&gt;&lt;span class='cm'&gt;delegate void&lt;/span&gt; Block(&lt;span class='cbl'&gt;string&lt;/span&gt; msg);&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='code'&gt;&lt;br /&gt;&lt;div class='codeHeader'&gt;(block 2)&lt;/div&gt;&lt;div class='codeBlock'&gt;&lt;span class='lbt'&gt; - ObjC&lt;/span&gt;&lt;br /&gt;- (&lt;span class='cm'&gt;void&lt;/span&gt;) &lt;span class='cbr'&gt;test&lt;/span&gt;: (&lt;span class='cbl'&gt;Block&lt;/span&gt;)block {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;block(&lt;span class='cr'&gt;"msg"&lt;/span&gt;);&lt;br /&gt;}&lt;br/&gt;&lt;br /&gt;&lt;span class='lbt'&gt; - C#&lt;/span&gt;&lt;br /&gt;&lt;span class='cm'&gt;protected void&lt;/span&gt; &lt;span class='cbr'&gt;Test&lt;/span&gt;(&lt;span class='cbl'&gt;Block&lt;/span&gt; block) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;block(&lt;span class='cr'&gt;"msg"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='code'&gt;&lt;br /&gt; &lt;div class='codeHeader'&gt;(block 3)&lt;/div&gt;&lt;div class='codeBlock'&gt;&lt;span class='lbt'&gt; - ObjC&lt;/span&gt;&lt;br /&gt;&lt;span class='greyCode'&gt;int main( int argc, const char *argc[] ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MyClass *mc = [[MyClass alloc] init];&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[mc test: ^(&lt;span class='cbl'&gt;char&lt;/span&gt; *msg) { printf(&lt;span class='cr'&gt;"%s"&lt;/span&gt;), msg } ];&lt;br /&gt;&lt;span class='greyCode'&gt;}&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&lt;span class='lbt'&gt; - C#&lt;/span&gt;&lt;br /&gt;&lt;span class='greyCode'&gt;static void main( string[] args ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MyClass mc = new MyClass();&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mc.Test((&lt;span class='cbl'&gt;string&lt;/span&gt; msg) =&gt; { &lt;span class='cbl'&gt;Console&lt;/span&gt;.WriteLine(msg); } );&lt;br /&gt;&lt;span class='greyCode'&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Blocks 1 and 2 only have minor differences between the languages.&lt;br /&gt;Block 3 has the most difference between the languages due to the SmallTalk like message passing syntax of ObjC&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style='color:#55C'&gt;[obj msg]&lt;/span&gt; vs that of c#'s &lt;span style='color:#55C'&gt;obj.msg&lt;/span&gt;&lt;br /&gt;Like blocks 1 and 2, block 3 shows only minor differences between the block syntax in either language.&lt;br/&gt;&lt;br /&gt;&lt;span style='color:#55C'&gt;&lt;i&gt;^() { }&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;vs&lt;br /&gt;&lt;span style='color:#55C'&gt;&lt;i&gt;() =&gt; { }&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-8287650593993978626?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/8287650593993978626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=8287650593993978626' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8287650593993978626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8287650593993978626'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/blog-post.html' title='(Simplified) Block/Closure Extension to C/Objective C/C++'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-1577478852785452868</id><published>2009-10-09T10:12:00.002-06:00</published><updated>2009-10-09T16:17:07.073-06:00</updated><title type='text'>Chrome and the Mac</title><content type='html'>I've been waiting for Chrome for quite some time now to be released on the Mac. I've been fairly curios to see how it would stack up there compared to it's sibling Safari, as they share the same WebKit core. It's been available as a dev preview since back in June but there where many things that where not complete and crashes where reported aplenty.&lt;br /&gt;&lt;br /&gt;Many have been reporting, as of recent, about the increased stability and additional support for things such as Flash etc. I decided to give it a try today from within Snow Leopard. The download link can be found &lt;a href='http://www.google.com/chrome/intl/en/eula_dev.html?dl=mac'&gt;here&lt;/a&gt;.&lt;br /&gt;(hehe I'm blogging this post from Chrome and inserting the previous link does not work from Bloggers editor).&lt;br /&gt;&lt;br /&gt;Installing went without issues, and it loaded up no problem. I tried out a few sites and it seems to be working great thus far. I even went to &lt;a href='http://www.chromeexperiments.com/'&gt;ChromExperiments.com&lt;/a&gt; to push it a bit. I used the experiment called &lt;a href='http://www.chromeexperiments.com/detail/javascript-voxel-spacing/'&gt;Voxel Spacing&lt;/a&gt; as that one was really slow in Safari a few months back. Chrome ran it much faster than I remember Safari being able to cope from before. I decided to try it again to see if Safari had improved at all. Coincidentally it had and both Chrome and Safari where running it at almost identical FPS, Chrome having an . Firefox couldn't be let off the hook here so it had to be tested as well. It was actually the slowest of the three.&lt;br /&gt;&lt;br /&gt;Chrome 18 fps/average while moving&lt;br /&gt;Safari      17-18 fps/average while moving&lt;br /&gt;Firefox    11-12 fps/average while moving (another issue was that Firefox wouldn't allow me to hold down the arrow key, it had to be spammed to keep it moving)&lt;br /&gt;&lt;br /&gt;Some other things I've noticed is that almost all of the AJAX for Blogger doesn't work, or has issues (the auto-save fails, and quite a few of the buttons for font, links, etc don't function correctly)&lt;br /&gt;It seems to use a pretty consistent 100% cpu process at idle.&lt;br /&gt;I had to copy/publish this post from another browser because Chrome didn't like the 'PUBLISH POST' button&lt;br /&gt;&lt;br /&gt;I do like it so far though and I'm sure they'll get some of these issues resolved, it isn't even beta yet so it's working better than expected already. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-1577478852785452868?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/1577478852785452868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=1577478852785452868' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1577478852785452868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1577478852785452868'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/ive-been-waiting-for-chrome-for-quite.html' title='Chrome and the Mac'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4889936790393421708</id><published>2009-10-09T00:42:00.004-06:00</published><updated>2009-10-09T01:17:39.943-06:00</updated><title type='text'>Block/Closure Extension to C/Objective C/C++</title><content type='html'>&lt;style type='text/css'&gt;p{display:inline}&lt;/style&gt;&lt;br /&gt;I've been trying to force myself to get back into some Objective C/Cocoa development. I got a bit of an itch again after looking into the new &lt;a href="http://www.khronos.org/opencl/"&gt;OpenCL&lt;/a&gt;. If you don't want to read all about it it's basically a standard that Apple started and was able to get Intel, Nvidia and AMD on board and eventually submitted it to the Krhonos group for standardization. It basically allows you to write programs to take advantage of all the cores of cpus/gpus, similiar in what Nvidia was doing with &lt;a href="http://en.wikipedia.org/wiki/CUDA"&gt;Cuda&lt;/a&gt;. To ease development when working with OpenCL blocks/closures where also added as an addition to C.&lt;br /&gt;&lt;br /&gt;I really wanted to play around with some of these but was hard pressed to find any good examples for both C and ObjC.&lt;br /&gt;&lt;br /&gt;So here's a quick one in plain ol' C&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span style="color: #b615a2"&gt;void&lt;/span&gt; test1( &lt;span style="color: #b615a2"&gt;void&lt;/span&gt;(^block)(&lt;span style="color: #b615a2"&gt;char&lt;/span&gt;*) ) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;span style="color: #000000"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;block(&lt;/span&gt;"Message from 'block'"&lt;span style="color: #000000"&gt;);&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span style="color: #b615a2"&gt;int&lt;/span&gt; main( &lt;span style="color: #b615a2"&gt;int&lt;/span&gt; argc, &lt;span style="color: #b615a2"&gt;const&lt;/span&gt; &lt;span style="color: #b615a2"&gt;char&lt;/span&gt; *argv[] ) { &lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span style="color: #35595d"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;test1&lt;/span&gt;(^(&lt;span style="color: #b615a2"&gt;char&lt;/span&gt; *msg) { &lt;span style="color: #3f1281"&gt;printf&lt;/span&gt;(&lt;span style="color: #cb2321"&gt;"Block Message: %s\n"&lt;/span&gt;, msg); });&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;&lt;br&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;}&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;And in ObjC&lt;br /&gt;- interface&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#B615A2" face="Menlo, sans-serif" size="3"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;span class="Apple-style-span" style="color: rgb(203, 35, 33); "&gt;&lt;span style="color: #75482c"&gt;&lt;font size="2"&gt;#import &lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;&amp;lt;objc/Object.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b615a2"&gt;&lt;font size="2"&gt;typedef&lt;/font&gt; &lt;font size="2"&gt;void&lt;/font&gt;&lt;span style="color: #000000"&gt;&lt;font size="2"&gt;(^&lt;/font&gt;&lt;/span&gt;&lt;span style="color: #548187"&gt;&lt;font size="2"&gt;Block&lt;/font&gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;&lt;font size="2"&gt;)(&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;char&lt;/font&gt;&lt;span style="color: #000000"&gt;&lt;font size="2"&gt;*);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span style="color: #b615a2"&gt;&lt;font size="2"&gt;@interface&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt; HelloWorld : Object {&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;font size="2"&gt;- (&lt;/font&gt;&lt;span style="color: #b615a2"&gt;&lt;font size="2"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;) displayBlockMessage: (&lt;/font&gt;&lt;span style="color: #548187"&gt;&lt;font size="2"&gt;Block&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;)block;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b615a2"&gt;&lt;font size="2"&gt;@end&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- implementation&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;font class="Apple-style-span" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#B615A2" face="Menlo, sans-serif" size="3"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font class="Apple-style-span" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#B615A2" face="Menlo, sans-serif" size="3"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;span style="color: #75482c"&gt;#import &lt;/span&gt;"HelloWorld.h"&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b615a2"&gt;@implementation&lt;span style="color: #000000"&gt; HelloWorld&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;- (&lt;span style="color: #b615a2"&gt;void&lt;/span&gt;) displayBlockMessage: (&lt;span style="color: #548187"&gt;Block&lt;/span&gt;)block {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;block(&lt;/span&gt;"&amp;lt;HelloWorld&amp;gt; block message"&lt;span style="color: #000000"&gt;);&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b615a2"&gt;@end&lt;/p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;- main&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#B615A2" face="Menlo, sans-serif" size="3"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cb2321"&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;font class="Apple-style-span" color="#000000" face="Verdana, sans-serif" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;font class="Apple-style-span" color="#75482C" face="Menlo, sans-serif"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;span class="Apple-style-span" style="color: rgb(203, 35, 33); "&gt;&lt;span style="color: #75482c"&gt;#import &lt;/span&gt;"HelloWorld.h"&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span style="color: #b615a2"&gt;int&lt;/span&gt; main( &lt;span style="color: #b615a2"&gt;int&lt;/span&gt; argc, &lt;span style="color: #b615a2"&gt;const&lt;/span&gt; &lt;span style="color: #b615a2"&gt;char&lt;/span&gt; *argv[] ) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;span style="color: #548187"&gt;HelloWorld&lt;/span&gt; *helloWorld = [[&lt;span style="color: #548187"&gt;HelloWorld&lt;/span&gt; &lt;span style="color: #3f1281"&gt;alloc&lt;/span&gt;] &lt;span style="color: #3f1281"&gt;init&lt;/span&gt;];&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;// inline block&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;[helloWorld &lt;span style="color: #35595d"&gt;displayBlockMessage&lt;/span&gt;: ^(&lt;span style="color: #b615a2"&gt;char&lt;/span&gt; *msg) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;span style="color: #3f1281"&gt;printf&lt;/span&gt;(&lt;span style="color: #cb2321"&gt;"%s\n"&lt;/span&gt;, msg);&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}];&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #108704"&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;// declared block&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;span style="color: #548187"&gt;Block&lt;/span&gt; block = ^(&lt;span style="color: #b615a2"&gt;char&lt;/span&gt; *msg) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;span style="color: #3f1281"&gt;printf&lt;/span&gt;(&lt;span style="color: #cb2321"&gt;"-=%s=-"&lt;/span&gt;, msg);&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;};&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;[helloWorld &lt;span style="color: #35595d"&gt;displayBlockMessage&lt;/span&gt;: block];&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b615a2"&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;return&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #340ed7"&gt;0&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;One thing you'll notice is that the interface declares 'block (typedef void(^Block)(char *);' This is because you need a type for the 'displayBlockMessage' functions signature (unless there's some trick :) ). Another thing is that I'm inheriting from the base objc object type and not the Cocoa NSObject, it will work either way I was just playing around with also compiling it on Windows.&lt;br /&gt;&lt;br /&gt;I'm still surprised that C is getting block/closures before Java. C++0x is also suppose to have their own implementation as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4889936790393421708?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4889936790393421708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4889936790393421708' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4889936790393421708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4889936790393421708'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/blockclosure-extension-to-cobjective-cc.html' title='Block/Closure Extension to C/Objective C/C++'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-1395684555316292680</id><published>2009-10-09T00:19:00.004-06:00</published><updated>2009-10-09T01:18:46.591-06:00</updated><title type='text'>TextMate Snow Leopard and</title><content type='html'>During my previous post I needed to copy RTF from a text-editor for code snippets for this blog. XCode does this by default and so does Eclipse. But TextMate does not. Google told me that &lt;a href="http://github.com/drnic/copy-as-rtf-tmbundle"&gt;this&lt;/a&gt; should do the trick. It's a bundle for TextMate called 'Copy as RTF' by Dr Nic Williams. I found numerous people praising this little plugin so I decided to downloaded it.&lt;br /&gt;&lt;br /&gt;If you don't install it by using GIT, as the instructions say, you can simply download it from the above site and once un-tar'd change the name of the folder (something like 'drnic-copy-as-rtf-tmbundle-e490dbf') to 'Copy as RTF.tmbundle'. Then copy this to ~/Library/Application\ Support/TextMate/Bundles. If the bundles directory is not there then simply create it and then copy.&lt;br /&gt;&lt;br /&gt;If TextMate is already running then click 'Bundles -&gt; Bundle Editor -&gt; Reload Bundles' to reload the bundles. It should work from here. I had an issue where it wasn't doing anything. I was able to track down the issue by altering the output of the bundle to get the exception. I'm by no means a TextMate expert I just happened to stumble across this. I went to 'Bundles -&gt; Bundle Editor -&gt; Show Bundle Editor' expanded the 'Copy as RTF' and selected the node. Then on the right pane changed the 'Output' drop-down from 'Discard' to 'Show as HTML'.&lt;br /&gt;&lt;br /&gt;&lt;div style='width:314px;height:325px;margin:0 auto'&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_42YYHgpVH8M/Ss7ZcpSr3rI/AAAAAAAAABk/ocXaQXsH-QE/s1600-h/Screen+shot+2009-10-09+at+12.30.32+AM.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 314px; height: 320px;" src="http://2.bp.blogspot.com/_42YYHgpVH8M/Ss7ZcpSr3rI/AAAAAAAAABk/ocXaQXsH-QE/s320/Screen+shot+2009-10-09+at+12.30.32+AM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5390484890152853170" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I was getting a Ruby deprecation warning and an exception about a corrupt theme. I didn't have any themes installed though. I looked through the Ruby code for the plugin where that error message was and found that it was looping through my non-existent 'Themes' folder. I downloaded a random theme and installed it and after that the exception went away and I can now get RTF output for any language in TextMate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-1395684555316292680?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/1395684555316292680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=1395684555316292680' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1395684555316292680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1395684555316292680'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/textmate-snow-leopard-and.html' title='TextMate Snow Leopard and'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_42YYHgpVH8M/Ss7ZcpSr3rI/AAAAAAAAABk/ocXaQXsH-QE/s72-c/Screen+shot+2009-10-09+at+12.30.32+AM.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-6557458952572040884</id><published>2009-10-08T21:28:00.004-06:00</published><updated>2009-10-09T01:21:02.892-06:00</updated><title type='text'>Syntax Highlighting in Your Blog</title><content type='html'>A few years ago I used to use Apple's Pages program to do my blogs. Pages would allow me to save a document as HTML, much the same way that Word would. So I would set off constructing my blog in Pages much like I would a normal document. I was able to copy code from Eclipse into Pages and it would preserve the formatting and colors. Now the HTML wasn't perfect and needed a tiny bit of work for a seamless transfer into Blogger. I created a small Ruby script to strip out the un-needed things and add in the other bits. In the end I was able to save my document as HTML, run my Ruby script against it and paste the resulting text straight into blogger and it would look just as it had in Pages.&lt;br /&gt;&lt;br /&gt;Well... Apple removed that feature from Pages and I was stuck looking for other options. I was searching tonight and noticed a few people using the demo of &lt;a href="http://qbnz.com/highlighter/demo.php"&gt;GeSHi&lt;/a&gt; and editing the resulting page source etc. That was a bit more work than I was willing to do.&lt;br /&gt;&lt;br /&gt;I remembered a while back that Google Docs would also preserve &lt;a href="http://en.wikipedia.org/wiki/Rich_Text_Format"&gt;RTF&lt;/a&gt; when pasting. So I embarked on a test. I copied some source code from &lt;a href="http://developer.apple.com/TOOLS/Xcode/"&gt;XCode&lt;/a&gt; and pasted it into Google Docs. Then I did a quick look at the DOM and found exactly the piece I wanted. I then added this bit in the URL(as one line)&lt;br /&gt;&lt;br /&gt;&lt;font size="1"&gt;javascript:&lt;/font&gt;&lt;span style="COLOR:#4f5f85"&gt;&lt;font size="1"&gt;alert&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;(&lt;/font&gt;&lt;span style="COLOR:#848de4"&gt;&lt;font size="1"&gt;document&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;.&lt;/font&gt;&lt;span style="COLOR:#4f5f85"&gt;&lt;font size="1"&gt;getElementById&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;(&lt;/font&gt;&lt;span style="COLOR:#0f7d09"&gt;&lt;font size="1"&gt;'wys_frame'&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.contentDocument.&lt;span style="COLOR:#4f5f85"&gt;&lt;font size="1"&gt;getElementsByTagName&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;(&lt;/font&gt;&lt;span style="COLOR:#0f7d09"&gt;&lt;font size="1"&gt;'body'&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;)[&lt;/font&gt;&lt;span style="COLOR:#230dd5"&gt;&lt;font size="1"&gt;0&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;].innerHTML)&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;And copied the result from the pop-up and pasted it into my blog. The only caveat is the editor you're copying from needs to copy your snippet as RTF&lt;br /&gt;&lt;br /&gt;(I used this to generate the above javascript)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-6557458952572040884?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/6557458952572040884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=6557458952572040884' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/6557458952572040884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/6557458952572040884'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/syntax-highlighting-in-your-blog.html' title='Syntax Highlighting in Your Blog'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-3962896427500507181</id><published>2009-10-02T23:08:00.006-06:00</published><updated>2009-10-02T23:58:27.831-06:00</updated><title type='text'>Snow Leopard Python 32-bit Script</title><content type='html'>With the release of Snow Leopard Apple has made good by making a big switch in the core applications to 64-bit. You can read all about it. How they shrunk the size of them, made them quicker, etc. iTunes however is still 32 :( Not that it really matters.&lt;br /&gt;&lt;br /&gt;One that has mattered for me however is Python. Snow Leopard comes with Python 2.6 instead of 2.5 which it's predecessor included. The 2.6 that's included in SL also defaults to 64 bit. Although this is 'geeky' cool it has caused quite a few problems with other python applications/libraries. I'm sure this will change in the future but for now it's not so much fun.&lt;br /&gt;&lt;br /&gt;A quick fix that quite a few people have done is doing either from the terminal&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;i style='color:#55C'&gt;defaults write com.apple.versioner.python Prefer-32-Bit -bool yes&lt;/i&gt;&lt;br /&gt;or&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;i style='color:#55C'&gt;export VERSIONER_PYTHON_PREFER_32_BIT=yes&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;With the first it's a permanent change, unless you re-execute it with 'no' in place of 'yes'.&lt;br /&gt;The second is per session.&lt;br /&gt;&lt;br /&gt;I didn't like the idea of making it permanent, and switching it all the time so I created a quick script.&lt;br /&gt;&lt;i style='color:#55C'&gt;&lt;br /&gt;#! bin/sh&lt;br /&gt;&lt;br /&gt;PY_ARG="$1"&lt;br /&gt;export VERSIONER_PYTHON_PREFER_32_BIT=yes&lt;br /&gt;python $PY_ARG&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;I also created the directory /usr/local/bin, as this isn't created in the default SL install but it is included in the default &lt;i style='color:#55C'&gt;.bash_profile&lt;/i&gt; path variable so you don't have to update your path.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;(I saved mine as python32.sh)&lt;/i&gt;&lt;br /&gt;Then do a quick &lt;i style='color:#55C'&gt;chmod&lt;/i&gt; to add the executable bits (&lt;i style='color:#55C'&gt;sudo chmod 755 python32.sh&lt;/i&gt; or &lt;i style='color:#55C'&gt;sudo chmod u+x python32.sh&lt;/i&gt;)&lt;br /&gt;&lt;br /&gt;Now I can simply type in '&lt;i style='color:#55C'&gt;python32.sh&lt;/i&gt;' and I've got Python 2.6 in 32-bits. Or if I wanted to run a python app/script in 32-bit I could type in '&lt;i style='color:#55C'&gt;python32.sh myscript.py&lt;/i&gt;'&lt;br /&gt;&lt;br /&gt;Happy scripting!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-3962896427500507181?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/3962896427500507181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=3962896427500507181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3962896427500507181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3962896427500507181'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/snow-leopard-python-32-bit-script.html' title='Snow Leopard Python 32-bit Script'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5020434137609319824</id><published>2009-10-02T22:19:00.003-06:00</published><updated>2009-10-02T22:31:06.560-06:00</updated><title type='text'>Taskbar At The Top Is Naughty</title><content type='html'>I used to like my Windows taskbar on the side but after using Ubuntu a bit, and using a Mac for quite some time I'm now a bit biased to having it at the top. I noticed something cool today that my new Windows 7 box does for me. An application that I was using opens up a new instance of IE8 for me and sets it to full screen. After it loads I hit 'ALT' and then '[T]ools' and select 'Developer Tools'. It loads up the much improved IE Developer Tools with one small little glitch. The top of the application is underneath my taskbar.&lt;br /&gt;&lt;br /&gt;Awright, I right click on the app in the taskbar expecting the 'move' option that's in XP. Ummm.. it's gone.. Awright lets move my taskbar back to the bottom of the screen and then move the window and then move the taskbar back to the top. I got inconsistent results with this step. Sometimes when I moved the taskbar back to the top it would be a pal and move the application back under the taskbar and sometimes it would leave it where it was after I moved it.&lt;br /&gt;&lt;br /&gt;It would consistently open the dev tools under the task bar if IE was loaded to a full screen.&lt;br /&gt;&lt;br /&gt;I love features! They give me something to do when I'm bored&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5020434137609319824?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5020434137609319824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5020434137609319824' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5020434137609319824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5020434137609319824'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/taskbar-at-top-is-naughty.html' title='Taskbar At The Top Is Naughty'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-3385651096229823351</id><published>2009-10-02T21:44:00.004-06:00</published><updated>2009-10-02T22:17:08.578-06:00</updated><title type='text'>Windows 7, .NET and IPv6</title><content type='html'>I'm still recovering from my recent Windows VM death at work and still learning the ropes with Windows 7. I stumbled across another one of those 'uggghh' moments today.&lt;br /&gt;&lt;br /&gt;We have an application that does some impersonation if you are within our firewall and part of the same non-routable subnet blah blah... I noticed that from within my Windows 7 VM I could not hit a portion of our application. A nice little exception was occurring. From outside my VM I didn't have any issues.&lt;br /&gt;&lt;br /&gt;After a quick look it was due to local connections to IIS defaulting to an IPv6 address, no 'localhost'. So I navigated through the windows to get to the network card settings and disabled the IPv6 protocol for the card. 'That should do it' I thought. Nope! It still used the IPv6 for loopback.&lt;br /&gt;&lt;br /&gt;Awright Google, lead me towards the light. This &lt;a href="http://www.lboro.ac.uk/it/vista/ipv6.html"&gt;post&lt;/a&gt; started out the same way. Disabling the IPv6 for the card, but towards the bottom there's a lovely registry, &lt;span style="font-style:italic;"&gt;cringe&lt;/span&gt;, modification. Basically it's in 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters. Add a 32-bit DWORD item with the name of 'DisabledComponents' and a value of '1'. You also have to reboot :(&lt;br /&gt;&lt;br /&gt;'Awright, now I'm good'.... WRONG! Now it was using '::1' for the loopback. Awright, lets see what's in the 'hosts' file. Go to 'C:\Windows\System32\drivers\etc' and open the 'hosts' file. And we find out that we can't simply edit it. Just like my previous .sln &lt;a href="http://juztinwilzon.blogspot.com/2009/09/windows-7-and-visual-studio-sln-files.html"&gt;post&lt;/a&gt; you have to first load notepad, or whatever, as admin and then open the file. You'll have to re-navigate to the file since you also can't simply drag and drop the file onto your open session of notepad. Extra steps build character :)&lt;br /&gt;Comment out the entry&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style='color:#55C'&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.host&lt;/span&gt;&lt;br /&gt;with a '#'&lt;br /&gt;&lt;br /&gt;Yay! now it finally works like it used to....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-3385651096229823351?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/3385651096229823351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=3385651096229823351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3385651096229823351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3385651096229823351'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/10/windows-7-net-and-ipv6.html' title='Windows 7, .NET and IPv6'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2948344490294836305</id><published>2009-09-21T00:04:00.007-06:00</published><updated>2009-09-21T01:11:16.589-06:00</updated><title type='text'>Snow Leopard 64 bit kernel on a MacBook5,1</title><content type='html'>&lt;div&gt;&lt;br /&gt;I was playing around with Snow Leopard today and for no better reason than "It's neat" I decided to try and boot into the 64 bit kernel. Apple has left the default kernel, on non server editions, to default to 32 bit. Many people have complained about this stating it's slower and can't access &gt; 4GB of memory and can't run 64 bit apps correctly etc etc. Well it's all a little bit of FUD. Apple also included the 64 bit kernel ability but defaulted it to 32 mainly to avoid 3rd party software/drivers/kexts that rely on the 32 bit kernel. Windows Vista 64 had similar issues with drivers etc. And while in 32 bit kernel mode applications can still run in 64 bit mode just fine, without any type of 64 to 32 virtualization. So right now there really is no reason, for most, to run in 64 kernel mode other than "It's neat".&lt;br /&gt;&lt;br /&gt;If you'd like to try, and have a 64 bit cpu with 64 bit EFI (Core 2 duo / Xeon), simply reboot/turn-on and hold down the '6' and '4' keys. If it works your computer will boot a little bit slower as it makes the switch (if you set it to always boot in 64 bit mode you wont see this delay). You can check wether it worked or not by either checking the kernel process in the Activity Monitor or type&lt;br /&gt;&lt;i style='color:#55C'&gt;&amp;nbsp;&amp;nbsp;uname -a&lt;/i&gt;&lt;br /&gt;in the terminal. The result will end in 'x86_64' if it worked. Or you can also click the 'Apple' and go to 'About This Mac' and click the 'More Info...' button. From there click the 'Software' group towards the bottom. The line that says '64-bit Kernel and Extensions' should say 'Yes'.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style='height:325px'&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_42YYHgpVH8M/Srcbf6P2q8I/AAAAAAAAABc/HOUbkrIJFU4/s1600-h/Screen+shot+2009-09-20+at+10.08.39+PM.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 287px; height: 320px;" src="http://3.bp.blogspot.com/_42YYHgpVH8M/Srcbf6P2q8I/AAAAAAAAABc/HOUbkrIJFU4/s320/Screen+shot+2009-09-20+at+10.08.39+PM.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5383802114570365890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;If it didn't work then you may be lucky like me and have a MacBook or Air etc. Apple has black-listed these and deemed it an option only available for the elite Pros (MacBook Pros, MacPros...and XServes). But you can still try it thanks to &lt;a href="http://www.osxbook.com/blog/2009/08/31/is-your-machine-good-enough-for-snow-leopard-k64/"&gt;this&lt;/a&gt; guy, Amit Singh. It's been a while since I've had to use a hex-editor for something like this but it was fun :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.suavetech.com/0xed/0xed.html"&gt;0xED&lt;/a&gt;, and &lt;a href="http://ridiculousfish.com/hexfiend/"&gt;Hex Fiend&lt;/a&gt; are both good...&lt;br /&gt;&lt;br /&gt;Basically I followed his post pretty close. Simply made a copy of /usr/standalone/i386/boot.efi (I called it boot64.egi) as &amp;nbsp;&amp;nbsp;/System/Library/CoreServices/boot64.efi&lt;br /&gt;Then opened it with a hex editor and adjusted the 'black-flag' bit value for my corresponding machine.&lt;br /&gt;(I didn't have to chown the file or chflags as my copy was already set)&lt;br /&gt;Then blessed it with&lt;br /&gt;&lt;i style='color:#55C'&gt;&amp;nbsp;&amp;nbsp;sudo bless --folder /System/Library/CoreServices --file /System/Library/CoreServices/boot64.efi&lt;/i&gt;&lt;br /&gt;This sets the newly modified .efi to be used during boot.&lt;br /&gt;&lt;br /&gt;After that you can now use the '6' + '4' and the '3' + '2' options while booting/restarting.&lt;br /&gt;&lt;br /&gt;I also set mine to always load using the 64 bit kernel, again for no better reason than "it's neat-o". This can be done by editing the file&lt;br /&gt;&lt;i style='color:#55C'&gt;&amp;nbsp;&amp;nbsp;/Library/Preferences/SystemConfiguration/com.apple.Boot.plist&lt;/i&gt;&lt;br /&gt;And change this&lt;br /&gt;&lt;i style='color:#55C'&gt;&amp;nbsp;&amp;nbsp;&amp;lt;key&amp;gt;Kernel Flags&amp;lt;/key&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;string&amp;gt;&amp;lt;/string&amp;gt;&lt;/i&gt;&lt;br /&gt;to this&lt;br /&gt;&lt;i style='color:#55C'&gt;&amp;nbsp;&amp;nbsp;&amp;lt;key&amp;gt;Kernel Flags&amp;lt;/key&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;string&amp;gt;arch=x86_64&amp;lt;/string&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Now Snow Leopard will boot by default with the 64 bit kernel, you can still hold down the '3' + '2' to boot using the 32 bit kernel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Problems:&lt;br /&gt;I'm running on a pretty fresh install of Snow Leopard and haven't done a whole lot of testing yet. But so far most things run great. 32 bit applications still function fine in their 32 bit modes as well. The only application that hasn't worked so far is VMWare Fusion, but this may change with the next version or so. VirtualBox does indeed work with the 64 bit kernel though so I will be trying that out with Windows 7 in the next few days.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2948344490294836305?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2948344490294836305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2948344490294836305' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2948344490294836305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2948344490294836305'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/09/snow-leopard-64-bit-kernel-on-macbook51.html' title='Snow Leopard 64 bit kernel on a MacBook5,1'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_42YYHgpVH8M/Srcbf6P2q8I/AAAAAAAAABc/HOUbkrIJFU4/s72-c/Screen+shot+2009-09-20+at+10.08.39+PM.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-942984163958577396</id><published>2009-09-18T15:01:00.002-06:00</published><updated>2009-09-18T15:16:06.703-06:00</updated><title type='text'>Windows 7 and Visual Studio SLN files.... uggh</title><content type='html'>My 2003 server VM went out the other day at work so I figured I try out the new Windows 7 that I've been hearing so much goodness about.&lt;br /&gt;&lt;br /&gt;I downloaded the ISO and began the install (installing within Fusion). I left to go get a drink thinking it would take no less than an hour. I came back to my desk and was very nicely surprised to see that the install had finished. I think this was the fastest Windows install I've ever done.&lt;br /&gt;&lt;br /&gt;Another nice thing I've noticed so far is how much easier it is on my system. Before 2003 was always using some of my cpu doing whatever it is that it does. 7 on the other hand lets my system idle at around 3.5% (running in Fusion). It also seems snappier as well. So far I was really quite impressed, well first impressions anyway.&lt;br /&gt;&lt;br /&gt;Then some ugliness started shining through. The "Yes I really really really do want to run this application" UAC stuff isn't as bad as it is in Vista, but it's still pretty annoying at best. I began loading my work projects over and tried to double click a web solution. Well, it threw up about 4 dialogs that I had to click whatever on to make them go away. These where all UAC related dialogs. I then set VS to always run as administrator, so much for the UAC protection eh. Then all seemed to be good in the world, until I tried to double click the solution again. I watched as the little loading spinner briefly popped up and then went away. Then I waited... and waited... Nothing, no error message, no UAC.... NOTHING. So I took the option to always run as admin off and I was back to where I started.&lt;br /&gt;&lt;br /&gt;I found this &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=263221"&gt; 'feature' according to MS &lt;/a&gt;&lt;br /&gt;That is quite frankly, stupid.&lt;br /&gt;I guess you can set .sln files to always load with VS2008, or whatever, and that fixes it. But it's just kinda ugly. The sad thing is that the bug was reported back in 2007 so I don't think it will be resolved any time soon.&lt;br /&gt;&lt;br /&gt;I guess I'll hope that I love everything else about it and that nothing else is wrong..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-942984163958577396?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/942984163958577396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=942984163958577396' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/942984163958577396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/942984163958577396'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/09/windows-7-and-visual-studio-sln-files.html' title='Windows 7 and Visual Studio SLN files.... uggh'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-7802949787802115157</id><published>2009-09-08T20:36:00.002-06:00</published><updated>2009-09-08T20:41:37.805-06:00</updated><title type='text'>I guess after six years I can't complain</title><content type='html'>I was a little late paying my internet bill this month to Comcast, as they kinda screwed it up the month before.... It went out today and I thought it may have been just because the bill was late.&lt;br /&gt;&lt;br /&gt;For the last six years I've had two cable modems on a single account. Comcast hadn't ever quite figured it out. It's been nice having Vonage on one modem with a wireless router and everything else on the other modem.&lt;br /&gt;&lt;br /&gt;Well when I finally called in today to see if it had just been disabled because of my bill the support person informed me that they had removed a 'rogue' modem that had been on my account.&lt;br /&gt;&lt;br /&gt;It's been there for six years so I can't complain I guess. But I sure will miss the thing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-7802949787802115157?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/7802949787802115157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=7802949787802115157' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/7802949787802115157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/7802949787802115157'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/09/i-guess-after-six-years-i-cant-complain.html' title='I guess after six years I can&apos;t complain'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-8300198419392387626</id><published>2009-09-07T13:07:00.002-06:00</published><updated>2009-09-07T13:51:59.770-06:00</updated><title type='text'>IE8 document.compatMode</title><content type='html'>With all the proliferate hacks out there for IE browsers, IE8 stacks some more on top.&lt;br /&gt;&lt;br /&gt;During our last release cycle our QA department started sending back issues revolving around the new IE8 browser. Many of these where related to javascript. One simple fix to get this out the door was to just force IE8 into compatibility mode until we had more time to deduce all the little issues. Unfortunately this fixed some issues while creating others, ugh.&lt;br /&gt;&lt;br /&gt;Basically it boiled down to  this. Our ASP application says that the browser is IE8, and in javascript it will also say that it is version eight, while in normal mode. The issue, when in compatibility mode, is that it still registers in ASP as IE version eight, but in javascript it now says it is version seven, or whatever compatibility mode is used. So additional IE specific code was added on top of already IE specific code to now check document.documentMode as well.&lt;br /&gt;&lt;br /&gt;I do like working with IE8 much more than it's predecessors, but it is still not quite up to par which just adds more development time to now make things work in all the different, very different, flavors of IE.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ejohn.org/blog/javascript-in-internet-explorer-8/"&gt;Here's&lt;/a&gt; a good summary of things IE8 finally got right and others that are still not.&lt;br /&gt;&lt;br /&gt;And &lt;a href="http://ajaxian.com/archives/the-vml-changes-in-ie-8"&gt;VML&lt;/a&gt; also took a hit with the new browser.&lt;br /&gt;&lt;br /&gt;Another issue with VML that I noticed the other day was that IE8 now supports element.hasAttribute/getAttribute. But I guess the support is not that great, at-least for VML.&lt;br /&gt;I had a simple script that works with both SVG, the standard, and VML, the non-standard.&lt;br /&gt;There was a method that did something like&lt;br /&gt;&lt;br /&gt;if(elem.hasAttribute) { do standard SVG stuff here }&lt;br /&gt;else { do non-standard VML here }&lt;br /&gt;&lt;br /&gt;With IE8 the first condition will now be hit, which is good but also bad since IE doesn't support SVG. So yet more IE code was added to resolve this issue. I figured I'd take advantage of the newly getAttribute functionality in IE8 to get the 'fillColor' attribute of a VML element.&lt;br /&gt;&lt;br /&gt;Well, this didn't quite exactly work. The attribute was never found. IE8 seems to only report a single attribute for every VML element regardless of how many are actually in the XML. So I could get the first attribute using the new 'getAttribute' in IE8, but unfortunately 'fillColor' was not the first attribute within my VML, so it was back to changing the code yet again for IE to ignore the newly added 'getAttribute' and go back to elem['attrib'] instead, since this would actually give me ALL of the attributes per element.&lt;br /&gt;&lt;br /&gt;I guess this is what we have to look forward to until ver. 9 :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-8300198419392387626?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/8300198419392387626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=8300198419392387626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8300198419392387626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8300198419392387626'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/09/ie8-documentcompatmode.html' title='IE8 document.compatMode'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5315174215814344523</id><published>2009-09-07T12:31:00.003-06:00</published><updated>2009-09-07T12:46:45.750-06:00</updated><title type='text'>The Way It Should Be</title><content type='html'>Upgrading/Moving from one computer to another is always painful and usually the only thing that makes it worthwhile is if you're moving to a newer, much nicer, machine. I recently got a MacBook 13.3" (3 weeks before the pro was released, sad) and have been living partially on that. My tower, Mac Pro, has been feeling somewhat neglected. My wife has been doing more video editing lately and needed something a bit faster. I decided to give her my tower, gulp, since I haven't been using it much anyhow.&lt;br /&gt;&lt;br /&gt;I was already partially up on my laptop so it was just a matter of copying over any remaining items. After this was done I did a fresh install on  the tower. I've seen the 'MIgration Assistant' application before but had never really given it much thought. I had made the basic assumption that it wouldn't do exactly what I wanted and there would be a bunch of manual intervention as well. I had installed the new Snow Leopard on the tower while her old laptop was running the previous Leopard. I decided to give the Migration Assistant a try, expecting a lot of additional work afterwards. I hooked up the computers via Firewire and started the Migration....&lt;br /&gt;&lt;br /&gt;The assistant started up and located the old mac right away. Then it searched through it and gave me a check box list of items I could move/leave. I left everything default and let it run. My wife has our whole family album all digitized in iPhoto, about 130 Gigs not including videos, so you can imagine that it did take some time.&lt;br /&gt;&lt;br /&gt;Once this was all finished I was very surprised by the results. It actually migrated over her user from the old computer. It kept her login items, login image etc. It even set her wallpaper to what it was before with all the same settings. Screen saver was the same, along with settings. "That's pretty neat" I thought as I opened up iTunes. Wow, iTunes kept everything just as it was on the old machine, ratings etc. Next I opened up her email. All her emails where setup and it even moved over her existing inbox emails! Her calendar kept all her events and so did Address Book. Then I looked down in her application bar. It was setup just as it was on her previous computer. It even moved over applications that hadn't been installed yet!&lt;br /&gt;&lt;br /&gt;When everything was said and done the only thing she noticed after the move was that her computer was faster. There was nothing else that she noticed different from the day before.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5315174215814344523?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5315174215814344523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5315174215814344523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5315174215814344523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5315174215814344523'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/09/way-it-should-be.html' title='The Way It Should Be'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4767354761917441006</id><published>2009-04-23T21:20:00.002-06:00</published><updated>2009-04-23T21:44:39.817-06:00</updated><title type='text'>IE still sucks...</title><content type='html'>I was given a small internal web project to work on last week. The best part about it was that I was given free reign on it's design and technologies used. I was pretty excited since I could finally use all of the new HTML/CSS/ECMAScript standards (existing and proposed). This was mainly nice since I didn't have to do stupid hacks and things for all of the different flavors of IE.&lt;br /&gt;&lt;br /&gt;I didn't 'have' to support IE for this project but decided that I'd finish the project and then see how the new IE8 faired.&lt;br /&gt;&lt;br /&gt;Well... I was, not surprisingly, let down again by IE. Here are a few things I noticed right off the bat.&lt;br /&gt;&lt;br /&gt;1) No canvas support :(  STILL!!! Firefox, Safari, Chrome and Opera support this. I guess MS is not being pro-active about supporting new standards as the canvas tag is part of the HTML5 spec. There is however this project &lt;a href="http://code.google.com/p/explorercanvas/"&gt;ExplorerCanvas&lt;/a&gt; which does some nice javascript conversions to VML for IE so that you can use most of the features of the canvas tag.&lt;br /&gt;&lt;br /&gt;2) Proposed ECMAScript Harmony features have been left out. This is funny since MS was one of the big proponents of limiting the proposed features of ES4 and yet they still can't get the limited functionality implemented (of which Firefox and Safari already support). For instance the new getters/setters and 'foreach' function of arrays makes IE8 confused (these are just a couple I noticed).&lt;br /&gt;&lt;br /&gt;I wasn't too surprised by this lack of new features. But I was surprised to see some CSS3 selectors working, and that the site rendered very close to how Firefox and Safari/Chrome did (but not exactly, as there where still some things that where off). So I guess I'm happy that IE has made a huge jump since IE7, but it's still not there which sucks since IE6 is still one of the most dominant browsers used so I guess we can all look forward to missing things in IE8 for the foreseeable future. Ugghh..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4767354761917441006?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4767354761917441006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4767354761917441006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4767354761917441006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4767354761917441006'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2009/04/ie-still-sucks.html' title='IE still sucks...'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4130459157482503319</id><published>2008-05-14T01:14:00.004-06:00</published><updated>2008-05-14T01:39:32.650-06:00</updated><title type='text'>missing ( before formal parameters</title><content type='html'>&lt;div id="q05u1"&gt;&lt;font face="'Lucida Grande'" size="3" id="q05u2"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="q05u3"&gt;&lt;br id="q05u4"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="q05u6"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="q05u7"&gt;I ran across this little error the other day when I ran some javascript that was working fine in IE but Firefox just didn't like.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="q05u6"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="q05u7"&gt;It was pretty easy, but vague, to track down what Firefox was complaining about and it was just another difference between JScript and Javascript ugh.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="v8ty0"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="v8ty1"&gt;Here's a little example of what was causing this issue.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="kbip0"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="kbip1"&gt;&lt;br id="kbip2"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l0"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l1"&gt;&amp;lt;script type=&lt;font color="#274E13" id="qx4l2"&gt;"text/javascript"&lt;/font&gt;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l3"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l4"&gt;&lt;font color="#274E13" id="tn770"&gt;// just create some dummy variables for namespaces&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l5"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l6"&gt;&lt;font color="#0000FF" id="hl480"&gt;var&lt;/font&gt; some = {};&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l7"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l8"&gt;some.namespace = {};&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l9"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l10"&gt;&lt;br id="qx4l11"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l12"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l13"&gt;(&lt;font color="#0000FF" id="hl482"&gt;function&lt;/font&gt;($) {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="hl483"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="hl484"&gt;    &lt;font color="#0000FF" id="rwcg0"&gt;function&lt;/font&gt; $.testFunc() { &lt;font color="#274E13" id="rwcg1"&gt;/*some code here*/&lt;/font&gt; }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l14"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l15"&gt;})(some.namespace);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l16"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="qx4l17"&gt;&amp;lt;/script&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="rwcg2"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="rwcg3"&gt;&lt;br id="rwcg4"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="rwcg5"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="rwcg6"&gt;The problem is when creating the testFunc function. JScript allows the '.' in the declaration and Javascript does not. Here is a quick and simple fix for this that will work in both IE and Firefox (and Safari).&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="vodu0"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="vodu1"&gt;&lt;br id="vodu2"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5"&gt;&lt;font face="'Lucida Grande'" size="3" id="vodu3"&gt;&lt;span style="font-size: 11px; white-space: pre;" id="vodu4"&gt;&lt;span style="font-family: Verdana; font-size: 13px; white-space: normal; " id="vodu5"&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l0"&gt;&lt;span id="qx4l1" style="font-size: 11px; white-space: pre; "&gt;&amp;lt;script type=&lt;font color="#274E13" id="qx4l2"&gt;"text/javascript"&lt;/font&gt;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l3"&gt;&lt;span id="qx4l4" style="font-size: 11px; white-space: pre; "&gt;&lt;font color="#274E13" id="tn770"&gt;// just create some dummy variables for namespaces&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l5"&gt;&lt;span id="qx4l6" style="font-size: 11px; white-space: pre; "&gt;&lt;font color="#0000FF" id="hl480"&gt;var&lt;/font&gt; some = {};&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l7"&gt;&lt;span id="qx4l8" style="font-size: 11px; white-space: pre; "&gt;some.namespace = {};&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l9"&gt;&lt;span id="qx4l10" style="font-size: 11px; white-space: pre; "&gt;&lt;br id="qx4l11"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l12"&gt;&lt;span id="qx4l13" style="font-size: 11px; white-space: pre; "&gt;(&lt;font color="#0000FF" id="hl482"&gt;function&lt;/font&gt;($) {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="hl483"&gt;&lt;span id="hl484" style="font-size: 11px; white-space: pre; "&gt;    &lt;font id="vodu6"&gt;$.testFunc = function() { /*some code here*/ }&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l14"&gt;&lt;span id="qx4l15" style="font-size: 11px; white-space: pre; "&gt;})(some.namespace);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id="q05u5" style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;font face="'Lucida Grande'" size="3" id="qx4l16"&gt;&lt;span id="qx4l17" style="font-size: 11px; white-space: pre; "&gt;&amp;lt;/script&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4130459157482503319?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4130459157482503319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4130459157482503319' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4130459157482503319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4130459157482503319'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2008/05/missing-before-formal-parameters.html' title='missing ( before formal parameters'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2914400745044855704</id><published>2008-02-28T01:09:00.001-07:00</published><updated>2008-02-28T01:09:04.757-07:00</updated><title type='text'>Some Fun Generating 'the power of' With F#</title><content type='html'>&lt;p&gt;So for my first bit of fun with F# I figured it'd be fun to play with the BigNum (used for crazy big numbers) I figured I write up some quick functions that simple generate the power of some number, resulting in some crazy big numbers :)&lt;/p&gt;  &lt;p&gt;(*all of my examples include '#light')&lt;/p&gt;  &lt;p&gt;My first function doesn't use the BigNum but it's very simplistic.&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;let&lt;/font&gt; rec pwrof x y =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;if&lt;/font&gt; y = 1 &lt;font color="#0000ff"&gt;then&lt;/font&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;else&lt;/font&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; x * pwrof x (y - 1)&lt;/p&gt;  &lt;p&gt;So for everyone new to F# 'pwrof' is a recursive function that takes 2 ints. 'rec' lets the compiler know that the function is recursive and the 2 parameters get resolved down to being ints at compile time. This came pretty naturally for me coming from a C# world, so lets try to mix it up a bit.&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;let rec&lt;/font&gt; pwrof x y =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;match&lt;/font&gt; y with    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | 1&lt;font color="#0000ff"&gt; -&amp;gt;&lt;/font&gt; x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | _ &lt;font color="#0000ff"&gt;-&amp;gt;&lt;/font&gt; x * pwrof x (y - 1)&lt;/p&gt;  &lt;p&gt;This function does the exact same thing, but instead of using a familiar if/else statement we're using pattern matching (these are widely used in F#). It's like a switch statement. If y matches 1 then we return x, otherwise if y matches anything else, '_', then we recurse.&lt;/p&gt;  &lt;p&gt;These were kinda fun, but I wanted to calculate crazy big power of calculations like 5000^5000. So here's an example that resembles my first function&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;let&lt;/font&gt; bpwrof x y =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;let&lt;/font&gt; x = Microsoft.FSharp.Math.BigNum.of_int x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;let&lt;/font&gt; pwr = x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;let&lt;/font&gt; rec pwrof x y =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;if&lt;/font&gt; y = 1 &lt;font color="#0000ff"&gt;then&lt;/font&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;else&lt;/font&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pwrof (x * pwr) (y - 1)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; pwrof x y&lt;/p&gt;  &lt;p&gt;And here's an example that resembles my second function&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;let&lt;/font&gt; bpwrof x y =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;let&lt;/font&gt; x = Microsoft.FSharp.Math.BigNum.of_int x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;let&lt;/font&gt; pwr = x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;let rec&lt;/font&gt; pwrof x y =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;match&lt;/font&gt; y &lt;font color="#0000ff"&gt;with&lt;/font&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | 1 &lt;font color="#0000ff"&gt;-&amp;gt;&lt;/font&gt; x    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | _&lt;font color="#0000ff"&gt; -&amp;gt;&lt;/font&gt; pwrof (x * pwr) (y - 1)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; pwrof x y&lt;/p&gt;  &lt;p&gt;These are tail recursive so you can create some really, REALLY big numbers. If you call one of the last 2 functions you can calculate say 5000 to the 9000th power. It ends up taking a lot more time to print the result to the screen than it does to do the calculation(its pages and pages of number madness). I even tried 5000 to the 90,000th pwr, that's a big number.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Oh well, that's all for now...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2914400745044855704?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2914400745044855704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2914400745044855704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2914400745044855704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2914400745044855704'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2008/02/some-fun-generating-power-of-with-f.html' title='Some Fun Generating &amp;#39;the power of&amp;#39; With F#'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-8826376494362779701</id><published>2008-02-17T15:24:00.002-07:00</published><updated>2008-02-17T15:39:32.213-07:00</updated><title type='text'>F# again</title><content type='html'>I had blogged about &lt;a href="http://research.microsoft.com/fsharp/fsharp.aspx"&gt;F#&lt;/a&gt; a while back and though I had tinkered around with it a bit, I got a little busy, and a little lazy. I've decided I'm gonna stick with it this time and learn it :) which means more upcoming blogs about F# (I haven't blogged in a while either so this will get me motivated)&lt;br /&gt;&lt;br /&gt;I'm not one that enjoys scouring the web for information on things so I usually just go buy a book on whatever it is that I'm interested in. I decided the other day to head down to the local Borders and there was one copy left of &lt;a href="http://www.strangelights.com"&gt;Robert Pickering's&lt;/a&gt; F# book, titled '&lt;a href="http://www.amazon.com/dp/1590597575?tag=strangelights-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=1590597575&amp;adid=19C6XAG17YJ26EGZ3H5Y&amp;"&gt;Foundations of F#&lt;/a&gt;'. I'm currently only a few chapters in but it seems like a pretty good book thus far. It hasn't required a background in functional programming which is good and also seems to be a good read for the novice to expert programmers.&lt;br /&gt;&lt;br /&gt;Well that's all for now, maybe next time I'll have some F# knowledge to share :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-8826376494362779701?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/8826376494362779701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=8826376494362779701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8826376494362779701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8826376494362779701'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2008/02/f-again.html' title='F# again'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5649794668619579310</id><published>2007-11-19T10:36:00.003-07:00</published><updated>2007-11-19T10:40:15.382-07:00</updated><title type='text'>14% done VS-2008</title><content type='html'>Eber told me today that the VS2008 was on MSDN.. I was pretty excited so we both logged into MSDN (which was amazingly slow today :)..&lt;br /&gt;But we couldn't find it listed in the DevTools section..&lt;br /&gt;&lt;br /&gt;We ended up finding it on the main page of &lt;a href="http://msdn2.microsoft.com/en-us/subscriptions/default.aspx"&gt;MSDN&lt;/a&gt;(before you log in).&lt;br /&gt;&lt;br /&gt;It's under the 'Top Downloads' section..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5649794668619579310?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5649794668619579310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5649794668619579310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5649794668619579310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5649794668619579310'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/11/14-done-vs-2008.html' title='14% done VS-2008'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-8173031696820878460</id><published>2007-10-28T21:57:00.000-06:00</published><updated>2007-10-28T22:17:39.019-06:00</updated><title type='text'>Leopard</title><content type='html'>&lt;div&gt;Leopard came out the other day and I started to loose anticipation for the release when it seemed more and more features were being dropped, or were just not being added as features. I was expecting that with the new Boot Camp there would better NTFS support, but the sales pitch from Apple on this is “Leopard understands the Windows FAT32 disk format”. I guess I could use &lt;a href="http://www.ntfs-3g.org/"&gt;NTFS-3G’s&lt;/a&gt; driver for this, but I guess I’ve been spoiled for too long and wanted it built right in :).&lt;/div&gt;&lt;br&gt;&lt;div&gt;A feature that was actually on Apple’s web-site but then mysteriously disappeared was “Fast Switching” for Boot Camp. This would basically put one OS into hibernation and load up the other OS (Awesome if you don’t want to close all your programs down before switching).&lt;/div&gt;&lt;br&gt;&lt;div&gt;BUT! There are a lot of things that I really like about the new OS. Probably one of my favorite things is the path bar in Finder (bread crumb like trail of where you are in the file system). This is one thing that always drove me nuts, when you had a file up and you had to do info or something on it to know where it was in the FS.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Spaces is probably one of my other favorite things. If you have a laptop and need a lot of stuff on the screen it’s nice to be able to place things in different spaces. I wasn’t too excited about this until after I loaded up Parallels and I could go full screen on one space and easily go back to a screen with all my Mac stuff. Parallels has Coherence but with all the Windows stuff I sometimes have loaded it’s easy for my screen to get cluttered.&lt;/div&gt;&lt;br&gt;&lt;div&gt;I’ve never used iChat, simply because most of my contacts are using MSN. Well iChat still doesn’t support MSN BUT it does support Jabber now (as well as Google Talk, since it’s a Jabber too). So all I had to do was find a Jabber server that had MSN/AOL/Yahoo etc transports. The only bad thing was that I had to use &lt;a href="http://psi-im.org/"&gt;Psi&lt;/a&gt; to create an account on the Jabber server I found to create my Jabber account. Once my Jabber account was created I could point iChat to it and I can now talk to all my MSN/Yahoo..... contacts. The other downside is that if you have Google Talk and a Jabber account (or more than one account of anything iChat supports) then each account gets loaded in it’s own window, instead of consolidating all your contacts into just one window. I’m still up in the air about iChat, I may still go back to using &lt;a href="http://www.adiumx.com/"&gt;Adium&lt;/a&gt; since it pretty much supports anything you’d ever use, and they have announced that they are going to support video chats in the near future.&lt;/div&gt;&lt;br&gt;&lt;div&gt;So far for the most part I like Time Machine. I don’t like the dock if it’s on the bottom (don’t like the reflective thing the icons sit on) good thing I always place it on the left (no reflectiveness if the dock is on the sides of the screen) I guess you can turn it off, I found a quick little shell command to do it but didn’t bookmark the site where I found it :). I don’t care for the little cross-walk in the dock (used for changing the dock size). Oh I forgot, I love the new Quick View feature too, much quicker to quickly grab something from a dock instead of loading up whatever to view it. Other than that I’m happy with it, they didn’t make major changes to where everything is so I didn’t feel lost like I did with Vista.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Whoa whoa! just as I finished writing this I think I just found my biggest complaint! I use Pages to do my blogging, I export it as HTML and use a Ruby script to make it Blogspot happy and get rid of the extra CSS it generates. Well just as I finished I went to export it as HTML and well.... that feature is GONE! (Right after I installed Leopard there was a Pages update so I figure that removed it). I’m not quite sure why they removed that :(.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-8173031696820878460?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/8173031696820878460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=8173031696820878460' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8173031696820878460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/8173031696820878460'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/10/leopard.html' title='Leopard'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4158387340045444953</id><published>2007-09-01T21:19:00.000-06:00</published><updated>2007-09-01T21:26:20.413-06:00</updated><title type='text'>I love c#.. but lately.. whoa!</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div style="line-height: 14pt; padding-top: 0pt; "&gt;&lt;span&gt;So lately I’ve been wanting to get into some programming on my Mac (yes I own a mac and develop .NET at work). Well I don’t really have a lot of time to devote to some new language like &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Objective-C" title="http://en.wikipedia.org/wiki/Objective-C" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;Objective-C&lt;/a&gt;&lt;span&gt;. Yes I could use Java.... but I’ve really started to like c# a lot better than Java lately (maybe because it’s just what I’m used to, and I want to avoid people bashing me for taking sides :) ).&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Anyways I’ve kept tabs on the &lt;/span&gt;&lt;a href="http://www.monoproject.com/" title="http://www.monoproject.com/" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;Mono&lt;/a&gt;&lt;span&gt; project every now and again and recently decided I’d give it a go. So I downloaded the latest (right now it’s 1.2.5) and started to tinker. I did the cheesy ‘Hello World’ console stuff just to start out. Well I’d really like to develop ‘real’ things, ‘useful’ things, but I was a little concerned about the GUI aspect (WinForms). I’d read a few places saying you need to install &lt;/span&gt;&lt;a href="http://www.gtk.org/" title="http://www.gtk.org/" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;GTK&lt;/a&gt;&lt;span&gt; and blah blah to get it working and that kinda turned me off of the whole thing.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Well I think I had been reading some slightly out-dated material. I wrote a little program to just pop-up a MessageBox and what do you know.. it worked!... and it worked on my Mac! (well you do have to run &lt;/span&gt;&lt;a href="http://www.apple.com/macosx/features/x11/" title="http://www.apple.com/macosx/features/x11/" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;X11&lt;/a&gt;&lt;span&gt; first, but hey it’s a small price to pay)..&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;Then I wanted to see what new stuff was added to Mono. So I implemented a quick Lambda just for fun. Well it didn’t work right off the bat but after a couple Google searches I found the answer.&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;To use Lambdas, and some of the other c# 3.0 features, you need to use the ‘gmcs’ not the ‘mcs’ mono compiler command. (I remember reading that gmcs was newer and they plan on getting rid of mcs I think with v 2.0... don’t quote me though that’s from my wonderfully not so good memory). AND you need to provide this argument to compiler ‘-langversion:linq’. And that’s it!&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;So here’s my little program I did..&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;using&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; &lt;/span&gt;&lt;span style="color: #000000; line-height: 14pt; opacity: 1.00; "&gt;System;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; line-height: 14pt; opacity: 1.00; "&gt; System.Windows.Forms&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; line-height: 14pt;  text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;namespace&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; &lt;/span&gt;&lt;span style="color: #000000; line-height: 14pt; opacity: 1.00; "&gt;Test&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; {&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;   &lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;delegate&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; &lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;string&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; &lt;/span&gt;&lt;span style="color: #000000; line-height: 14pt; opacity: 1.00; "&gt;GetMessageDelegate&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;(&lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;string&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; name);&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;      &lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;public class&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt; Test {&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;         &lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;public static void Main&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;(&lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;string&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;[] args) {&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;            &lt;/span&gt;&lt;span style="color: #1a80fd; line-height: 14pt; opacity: 1.00; "&gt;Console&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.WriteLine(&lt;/span&gt;&lt;span style="color: #7d0507; line-height: 14pt; opacity: 1.00; "&gt;“Hello from the console”&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;            GetMessageDelegate getMsg = name =&amp;gt; &lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;string&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.Format(&lt;/span&gt;&lt;span style="color: #7d0507; line-height: 14pt; opacity: 1.00; "&gt;“Hello {0}”&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;, name);&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;            &lt;/span&gt;&lt;span style="color: #150efd; line-height: 14pt; opacity: 1.00; "&gt;MessageBox&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.Show(getMsg(&lt;/span&gt;&lt;span style="color: #7d0507; line-height: 14pt; opacity: 1.00; "&gt;“Frank”&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; line-height: 14pt;"&gt;      }&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; line-height: 14pt;"&gt;   }&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; line-height: 14pt;"&gt;}&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;And here’s what I did to compile and run.&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;gmcs -langversion:linq -r:System.Windows.Forms Test.cs&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;So basically you’ll get the message on the console and a message box that displays “Hello Frank”;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; padding-bottom: 0pt; "&gt;So I’m pretty sure I’m gonna stick with Mono/c# as my choice for development on my Mac :)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4158387340045444953?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4158387340045444953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4158387340045444953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4158387340045444953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4158387340045444953'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/09/i-love-c-but-lately-whoa.html' title='I love c#.. but lately.. whoa!'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5889585021960436675</id><published>2007-08-19T00:08:00.000-06:00</published><updated>2007-08-19T00:09:23.080-06:00</updated><title type='text'>ASP.NET color priority</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-top: 0pt; line-height: 14pt;"&gt;This is fun :)&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; line-height: 14pt;  text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; "&gt;&lt;span style="color: #0a077f; line-height: 14pt; opacity: 1.00; "&gt;WebControl&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.Style[&lt;/span&gt;&lt;span style="color: #0a077f; line-height: 14pt; opacity: 1.00; "&gt;HtmlTextWriterStyle&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.BackgroundColor] = &lt;/span&gt;&lt;span style="color: #0a077f; line-height: 14pt; opacity: 1.00; "&gt;Color&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.White.Name; &lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; "&gt;&lt;span style="color: #fb8010; line-height: 14pt; opacity: 1.00; "&gt;OVERRIDES&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="color: #0a077f; line-height: 14pt; opacity: 1.00; "&gt;WebControl&lt;/span&gt;&lt;span style="line-height: 14pt; "&gt;.BackColor = ColorWhite;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5889585021960436675?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5889585021960436675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5889585021960436675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5889585021960436675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5889585021960436675'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/08/aspnet-color-priority.html' title='ASP.NET color priority'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-1529303534739034728</id><published>2007-08-18T23:50:00.000-06:00</published><updated>2007-08-18T23:57:57.559-06:00</updated><title type='text'>Setting up SVN to authenticate against a domain</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div style="line-height: 14pt; padding-top: 0pt; "&gt;At work we’ve been developing our latest and greatest project and when we first started we inherited a version control application from a previous team. It has worked okay so far, but we’ve hit the point now where we want to start doing releases for different clients keep specific features with certain versions etc. Our inherited version control software didn’t do the whole versioning thing very nicely so we began looking into different options.&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;SVN ended up being the final choice. A few reasons went into the decision factor. For one it’s free, it’s also widely used, tried and true, and it does versioning much less painfully than our current solution. One thing we wanted to get rid of was having a different set of credentials for our version control. We wanted to just use our domain authentication so we don’t have different passwords for everything. SVN makes this pretty easy to accomplish, so for this article I’m going to give some quick steps on how to achieve this.&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;First you’ll need &lt;/span&gt;&lt;a href="http://subversion.tigris.org/project_packages.html" title="http://subversion.tigris.org/project_packages.html" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;SVN&lt;/a&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Second you’ll also need to download &lt;/span&gt;&lt;a href="http://httpd.apache.org/" title="http://httpd.apache.org/" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;Apache&lt;/a&gt;&lt;span&gt;. Why do you need Apache for version control?? Well you don’t HAVE to have it, but if you want to authenticate against a domain controller then just download it :)&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Third you’ll want to download &lt;/span&gt;&lt;a href="http://sourceforge.net/projects/mod-auth-sspi" title="http://sourceforge.net/projects/mod-auth-sspi" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;mod_auth_sspi&lt;/a&gt;&lt;span&gt; for domain authentication with Apache.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;Awright now we’re ready to go. Install Apache, this is pretty straightforward, once you’ve got this installed you should be able to view the default root page from a web browser, if not check out the Apache docs :( (Apache should install without a hitch though)&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Next copy over the files &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;mod_authz_svn.so&lt;/span&gt;&lt;span&gt; and &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;mod_dav_svn.so&lt;/span&gt;&lt;span&gt; from the bin folder of SVN into Apache’s module folder. And while were copying files we might as well copy the &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;mod_auth_sspi.so&lt;/span&gt;&lt;span&gt; file there as well.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Now lets go ahead and install subversion. This should be pretty straightforward as well. Once you’ve downloaded it just make sure to add the &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;bin&lt;/span&gt;&lt;span&gt; folder to the path. After you’ve done this create your initial repository using something like this&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    svndmin create c:/some/path/your/want/to/use&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;Now open up the &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;httpd.conf&lt;/span&gt;&lt;span&gt; file and add these lines into the modules section&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; "&gt;&lt;span style="line-height: 14pt; "&gt;    &lt;/span&gt;&lt;span style="color: #0a077f; line-height: 14pt; opacity: 1.00; "&gt;LoadModule dav_module modules/mod_dav.so&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    LoadModule dav_svn_module modules/mod_dav_svn.so&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    LoadModule sspi_auth_module modules/mod_auth_sspi.so&lt;/div&gt;&lt;div style="line-height: 14pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    LoadModule authz_svn_module modules/mod_authz_svn.so&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;Also at the bottom somewhere add this line&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    Include c:/some/path/to/your/repository/subversion.conf&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;Don’t worry that file doesn’t exist yet but we’ll get to that right now!&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;So in your repository path (the one we created just a bit ago) go ahead and create a text file called &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;subversion.conf&lt;/span&gt;&lt;span&gt;. Edit the file and add something like this.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;&amp;lt;Location /some/url/for/apache/to/use/&amp;gt;        #make sure to add the last ‘/’ in the url&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    DAV svn&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    SVNParentPath c:/svn/project/path&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    SVNListParentPath on  #this just allows you to view the contents from a web browser&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    AuthName “put whatever you want here”&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    AuthType SSPI&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    SSPIOmitDomain on #allows you to not supply your domain with your user name every time&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    SSPIAuthoritative On&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    SSPIDomain yourDomainThatYouLogInto.com&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    SSPIOfferBasic On&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    Require valid-user&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;    AuthZSVNAccessFile “c:/the/path/to/your/repository/svnaccess.conf”&lt;/div&gt;&lt;div style="line-height: 14pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;&amp;lt;/Location&amp;gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;You can also add support to authenticate against multiple domains, or one domain and username/password pairs in a text file etc. All you need to do is just add those after one another in the &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;Location&lt;/span&gt;&lt;span&gt; tag.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;span&gt;And finally edit the &lt;/span&gt;&lt;span style="color: #333333; line-height: 14pt; opacity: 1.00; "&gt;svnaccess.conf&lt;/span&gt;&lt;span&gt; file for the repository we created earlier. Here is a sampler&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;[groups]&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;svnadmins = DOMAIN\joe.williams, Joe.Williams, joe.williams&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;developers = DOMAIN\bob.williams, Bob.Williams, bob.williams&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;  text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;  text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;[/]&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;@svnadmins = rw&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;[yourSVNProjectName:/]&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;@svnadmins = rw&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;@developers = r&lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;[yourSVNProjectName:/trunk]&lt;/div&gt;&lt;div style="line-height: 14pt; color: #0a077f; line-height: 14pt; opacity: 1.00;"&gt;@developers = rw&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;You’ll notice we have three entries for each user. This is because different apps may use one of the three variations so to avoid some headaches just add all three for each user. You only have to do it once anyway.&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;So that’s pretty much the quick run-through for setting it up.. Below is a list of links that I found useful when setting this up :) enjoy&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;a href="http://subversion.tigris.org/faq.html%23sspi" title="http://subversion.tigris.org/faq.html%23sspi" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;http://subversion.tigris.org/faq.html#sspi&lt;/a&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html%23tsvn-serversetup-apache-5" title="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html%23tsvn-serversetup-apache-5" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html#tsvn-serversetup-apache-5&lt;/a&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;a href="http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx" title="http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx&lt;/a&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;a href="http://www.timfanelli.com/item/105" title="http://www.timfanelli.com/item/105" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;http://www.timfanelli.com/item/105&lt;/a&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;a href="http://www.codeproject.com/w2k/SubversionApache.asp" title="http://www.codeproject.com/w2k/SubversionApache.asp" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;http://www.codeproject.com/w2k/SubversionApache.asp&lt;/a&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; "&gt;&lt;a href="http://svn.spears.at" title="http://svn.spears.at" style="color: #0d0898; line-height: 14pt; opacity: 1.00; text-decoration: underline; "&gt;http://svn.spears.at&lt;/a&gt;&lt;span&gt;/&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 14pt; text-decoration: none;"&gt; &lt;/div&gt;&lt;div style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; line-height: 14pt;  text-decoration: none;"&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-1529303534739034728?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/1529303534739034728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=1529303534739034728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1529303534739034728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1529303534739034728'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/08/setting-up-svn-to-authenticate-against.html' title='Setting up SVN to authenticate against a domain'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2202775458007547714</id><published>2007-06-12T00:59:00.000-06:00</published><updated>2007-06-12T01:19:40.442-06:00</updated><title type='text'>ASP.NET Html Encoding</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;So have you ever had an ASP.NET application where you placed a couple of TextBox’s on but soon realized that when you entered in something like ‘1 is &amp;lt; 2’ or even more blunt and to the point “&amp;lt;div&amp;gt; hello &amp;lt;/div&amp;gt;&amp;lt;script type=’text/javascript’&amp;gt;alert(‘something bad’)&amp;lt;/script&amp;gt;” and when you performed a post back you would get a nice little error from the server? Well if you haven’t had this happen you may experience this some time in the future so hopefully you’ll remember this bit of info and you wont be left scratching you head.&lt;/div&gt;&lt;br/&gt;&lt;div&gt;So this is actually a feature. I mean if you mistakenly forgot to verify some user input you might end up with some nice html injections on your site, and no-one wants those right. So this will display an error (not just a little ‘hello here I am now you can move on’ error, but an error that you probably don’t want people seeing either). So if you want to handle on your own you can disable the error that gets displayed by adding this little bit of text to your page directive (you can also add a setting to the web.config to make a system wide change, but I don’t think it’s recommended since you may overlook a place where they’re not being handled)&lt;/div&gt;&lt;br/&gt;&lt;div&gt;ValidateRequest=”false”&lt;/div&gt;&lt;br/&gt;&lt;div&gt;&lt;span&gt;Now you’ll no longer get the errors. But now what? How are you going to handle these potential pests? Another little built in feature is the HTML encode/decode functions of the &lt;/span&gt;&lt;span style="color: #117f7f; line-height: 14pt; opacity: 1.00; "&gt;HttpServerUtility&lt;/span&gt;&lt;span&gt; class. You might quickly find out though that this is a sealed class with no available constructors so there’s no making your own instance of this class. This class is however available to your Pages through the &lt;/span&gt;&lt;span style="color: #117f7f; line-height: 14pt; opacity: 1.00; "&gt;Server&lt;/span&gt;&lt;span&gt; object (&lt;/span&gt;&lt;span style="color: #117f7f; line-height: 14pt; opacity: 1.00; "&gt;Server&lt;/span&gt;&lt;span&gt;.HtmlEncode / &lt;/span&gt;&lt;span style="color: #117f7f; line-height: 14pt; opacity: 1.00; "&gt;Server&lt;/span&gt;&lt;span&gt;.HtmlDecode). So now when someone sends in ‘&amp;lt;div&amp;gt;hello’ you can handle this by passing the text into the HtmlEncode(string) method and you’ll get back the encoded text ‘&amp;amp;ltdiv&amp;amp;gthello’ and if you want to update your text-box with the newly added info you can simply make a call to HtmlDecode(string) and get back ‘&amp;lt;div&amp;gt;hello’.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2202775458007547714?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2202775458007547714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2202775458007547714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2202775458007547714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2202775458007547714'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/06/aspnet-html-encoding.html' title='ASP.NET Html Encoding'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-6227752811623249633</id><published>2007-06-10T20:36:00.001-06:00</published><updated>2007-06-10T20:36:45.567-06:00</updated><title type='text'>Fun data retrieval</title><content type='html'>&lt;p&gt;So I have a cousin who just bought his girlfriend a laptop. Well I guess he had the laptop for a couple weeks when someone gave him a.. well... not so legal copy of Windows and told him that it had everything he needed on it (Office etc). He figured it'd be pretty simple to get it installed and everything..&lt;/p&gt;  &lt;p&gt;I got a call from him basically saying that the laptop would no longer boot, and he had installed Windows 3 times and now he just gets a blue screen. He asked if I could take a look at it for him. Well he bought it from HP so it had an XP Home edition license sticker on the bottom so I don't ask me why he was installing this other copy of XP. I figured it'd be pretty easy. I have a little USB adapter that I can plug into laptop hard drives that have the standard pin setup. We'll he brought it over and I took the drive out and it was some other different configuration (go go standards) so my little USB conversion wouldn't work. I needed to get the data he had on there off (didn't want to loose their files etc). I coulda installed Windows on an external drive and then booted from that to get to the files on the drive, but that'd take too long. Then I remembered my good ol' days of tinker-ing with &lt;a href="http://www.bsd.org/"&gt;BSD&lt;/a&gt;'s and Linux and downloaded a Linux 'Live' distro (you know.. the ones that boot completely off of a cd). I decided upon using &lt;a href="http://www.ubuntu.com"&gt;Ubunto&lt;/a&gt; because it's been getting a lot of rave lately. So I popped it in, booted up, and the only thing I had to do was get Nautilus running with super user rights to access the NTFS file system. The rest was down hill. I copied everything over and formatted the drive. Then I installed his original copy of Windows using the license that was issued to the laptop and he was on his way. So the next time I need to get data off of a non-bootable computer that I can't easily just take the HD out and plug it into a functioning computer I'll remember the little trick I did this time.&lt;br/&gt; &lt;/p&gt;  &lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-6227752811623249633?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/6227752811623249633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=6227752811623249633' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/6227752811623249633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/6227752811623249633'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/06/fun-data-retrieval.html' title='Fun data retrieval'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5630354187545784907</id><published>2007-06-10T18:25:00.001-06:00</published><updated>2007-06-10T18:26:35.678-06:00</updated><title type='text'>Need an SSL cert to test your site?</title><content type='html'>&lt;p&gt;Sometimes when you're developing a website that you know will be served on 'https' it's nice to be able to test using 'https' to make sure things work as expected. You could go the route of creating your own certificate using something like&lt;/p&gt;  &lt;p&gt;&lt;i&gt;makecert -r -pe -n "CN="%computername% -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;but then you have to deal with the pesky messages that let you know that it's NOT a valid certificate, and/or adjust your browsers settings for your site etc. There is an easier approach to this. Many certificate authorities are now offering trial certificates. All you have to do is just give them a little bit of info about yourself (I guess you could use someone elses though) and you're good to go for a period of time.&lt;/p&gt;  &lt;p&gt;I recently received a certificate from &lt;a href="http://www.thawte.com"&gt;Thawte&lt;/a&gt; that will last me 90 days. This is plenty long enough for dev/testing of our site on SSL and I have a valid certificate that wont cause my browser to yell at me. Thawte was just the one that I happened to go through you can also get a trial from &lt;a href="http://www.verisign.com"&gt;VeriSign&lt;/a&gt; although the trial isn't as long.&lt;br/&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5630354187545784907?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5630354187545784907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5630354187545784907' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5630354187545784907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5630354187545784907'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/06/need-ssl-cert-to-test-your-site.html' title='Need an SSL cert to test your site?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2610857387973798925</id><published>2007-06-02T02:57:00.001-06:00</published><updated>2007-06-02T02:57:54.678-06:00</updated><title type='text'>Source Code Formatting... ugh</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;So I started a new &lt;a href='http://BrightRedRuby.blogspot.com'&gt;blog&lt;/a&gt; and do most of the work for that blog on a Mac. I mainly use windows for this blog (since I post mainly about .NET) and have been fairly happy with Windows Live Writer and a code formatting plugin. Well I was looking for a good blogging tool for my Mac to use for my new blog. I looked into &lt;a href='http://ecto.kung-foo.tv/'&gt;Ecto&lt;/a&gt;, &lt;a href='http://www.qumana.com/'&gt;Qumana&lt;/a&gt;, &lt;a href='http://scribefire.com/'&gt;ScribeFire&lt;/a&gt; and I wasn't extremely thrilled about any of them. They would screw up my formatting mainly when doing code snippets. Why does it have to be such a pain to simply just post some source code in a blog as it appears in your code editor? Well after an hour of playing around with some of the mentioned blogging tools I finally remembered "Hey you're making this harder than you need to, remember you have a Mac and things are easier". After that little thought it took me a few seconds to get some source code into nice HTML form.&lt;br&gt;&lt;/br&gt;First I just did a simple copy of the source code straight from &lt;a href='http://www.eclipse.org/'&gt;Eclipse&lt;/a&gt;.&lt;br&gt;&lt;/br&gt;Then I loaded up &lt;a href='http://www.apple.com/iwork/pages/'&gt;Pages&lt;/a&gt; and pasted what I copied.&lt;br&gt;&lt;/br&gt;Then I exported it to HTML and voila! Magic!&lt;br&gt;&lt;/br&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2610857387973798925?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2610857387973798925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2610857387973798925' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2610857387973798925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2610857387973798925'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/06/source-code-formatting-ugh.html' title='Source Code Formatting... ugh'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-3661813327523869241</id><published>2007-05-24T14:35:00.001-06:00</published><updated>2007-05-24T14:35:21.958-06:00</updated><title type='text'>asp:FileUpload not posting back?</title><content type='html'>&lt;p&gt;This is fun.&lt;/p&gt; &lt;p&gt;Didn't really find a whole lot out there on this so I figured I'd post it just in case I ever forget :)&lt;br&gt;We had a little upload pop-up in an ASP.NET application. We are just using the 'asp:FileUpload' control for this. We have another regular ASP button that has a server-side click event that will perform some validation and then save the file into a database and a few other things. Well someone reported a bug stating that if you just typed in anything (ie 'asdf') then it wouldn't let you know that it was an invalid file. No validation would be performed. We'll I started looking into this and noticed that the button click event&amp;nbsp;wouldn't even post back? It would only post back if you had something that was somewhat valid entered in. (ie. 'c:\bob.txt').&lt;br&gt;Well here's the reason. This happens only when using IE. This is an IE specific issue. If you try this same thing in FireFox or Opera you'll notice that the post back will be fire off just as expected. IE trys to validate this before calling back. So if you enter something in that is just invalid IE wont even bother posting back, thus you'll never see your lovely button click event ever being called.&lt;br&gt;&lt;br&gt;Don't believe me. Try it for yourself. Here's a &lt;a href="http://msconline.maconstate.edu/tutorials/ASPNET20/ASPNET10/aspnet10-04.aspx"&gt;link&lt;/a&gt; to a site that already has a sample 'asp:FileUpload' control loaded. Try it in IE and then in some other browser both with valid files and some junk like 'asdf'. You'll notice you only get the postback with the junk data on non-IE browsers.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-3661813327523869241?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/3661813327523869241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=3661813327523869241' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3661813327523869241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3661813327523869241'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/05/aspfileupload-not-posting-back.html' title='asp:FileUpload not posting back?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2379245402216462116</id><published>2007-05-22T09:49:00.000-06:00</published><updated>2007-05-22T09:53:41.288-06:00</updated><title type='text'>Silverlight Airlines</title><content type='html'>I stumbled across &lt;a href="http://delay.members.winisp.net/SilverlightAirlinesDemo/"&gt;this&lt;/a&gt; today and had to link it here. It's just a cool Silverlight demo application from Microsoft that shows a few of the new really cool things you can accomplish with the new Silverlight (previously WPF/E) project.&lt;br /&gt;&lt;br /&gt;If you don't already have the Silverlight 1.1 installed you'll need it before the demo will work. You can download it &lt;a href="http://msdn2.microsoft.com/en-us/silverlight/bb419317.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2379245402216462116?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2379245402216462116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2379245402216462116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2379245402216462116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2379245402216462116'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/05/silverlight-airlines.html' title='Silverlight Airlines'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-1672496834011532570</id><published>2007-05-21T23:40:00.001-06:00</published><updated>2007-05-22T08:45:33.779-06:00</updated><title type='text'>.NET ActiveX Example. Javascript event wireup. SSL</title><content type='html'>&lt;p&gt;Okay if you read my last &lt;a href="http://juztinwilzon.blogspot.com/2007/05/net-and-activex.html#links"&gt;post&lt;/a&gt; and are wanting some answers (visual ones that is) then here ya go! :)&lt;/p&gt; &lt;p&gt;Skipping along to step#2&lt;br&gt;Here's an example of an interface used for events that you wanna hook up with in JS&lt;/p&gt;&lt;pre&gt;    [Guid("&lt;span style="color: #8b0000"&gt;00000000-0000-0000-0000-000000000000&lt;/span&gt;")]&lt;br /&gt;    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]&lt;br /&gt;    [ComVisible(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IExposedEvents{&lt;br /&gt;        [DispId(0x60050000)]&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DoSomething(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; someString);&lt;br /&gt;        [DispId(0x60050001)]&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DoItAgain(&lt;span style="color: #0000ff"&gt;int &lt;/span&gt;someInt);&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Obviously you're gonna wanna put a valid GUID in there. So basically the second attribute, after the GUID, just says that this is a dispatch interface that will be exposed to COM. The second line is just re-iterating that this will be visible to COM. The [DispID]'s are used to uniquely identify the events to COM. These id's can be simple ints '[DispID(0)]' if you'd like, just make sure they're unique. You don't wanna have 2 events with the same dispId.&lt;br&gt;&lt;br&gt;Next is the interfaces used to expose properties/methods...&lt;/p&gt;&lt;pre&gt;    [Guid("&lt;span style="color: #8b0000"&gt;00000000-0000-0000-0000-000000000000&lt;/span&gt;")]&lt;br /&gt;    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]&lt;br /&gt;    [ComVisible(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IExposedMethods{&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetSomeVariable(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; newVar);&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetSomeVariable();&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Again you want a unique GUID. This interface is nearly identical to the Events interface. The only difference is that you don't need the dispId's for the properties/methods that will be exposed.&lt;br&gt;&lt;br&gt;Now here is the UserControl class&lt;br&gt;&lt;/p&gt;&lt;pre&gt;    [Guid("&lt;span style="color: #8b0000"&gt;&lt;span style="color: #8b0000"&gt;00000000-0000-0000-0000-000000000000&lt;/span&gt;&lt;/span&gt;")]&lt;br /&gt;    [ProgId("&lt;span style="color: #8b0000"&gt;WindowsFormsUserControl.UserControl&lt;/span&gt;")]&lt;br /&gt;    [ClassInterface(ClassInterfaceType.None), ComSourceInterfaces(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(IExposedEvents))]&lt;br /&gt;    [ComVisible(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; partial &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; MyControl: UserControl, IExposedMethods { &lt;font color="#008000"&gt;//your code&lt;/font&gt; }&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Okay so this one is a little different now. You still need the GUID (Well you don't HAVE to, read my last &lt;a href="http://juztinwilzon.blogspot.com/2007/05/net-and-activex.html#links"&gt;post&lt;/a&gt;. But if you wanna expose events in JS and use SSL then you need it). The ProgID is used to simply return the programmatic identifier for the specified COMAddin object. The next line starts off by saying what kind of interface is going to be generated for the exposed COM object. Here we are saying we don't want to generate one 'ClassInterfaceType.None'. The other 2 options are AutoDispatch and AutoDual which will auto generate an interface to expose for you (If you don't have any events to expose you could just write the user control with no interfaces and select one of these 2 options). The last part of this line is saying we want to use a specific type to expose this attributed class's events to COM.&lt;br&gt;&lt;br&gt;So once you've got your control ready to go (created strong name, regasm'd it, etc) then you're ready to write the Javascript code in your .asmx file.&lt;/p&gt;&lt;pre&gt;&amp;lt;&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; id="&lt;span style="color: #8b0000"&gt;Bob&lt;/span&gt;" classid="&lt;span style="color: #8b0000"&gt;clsid:&lt;span style="color: #8b0000"&gt;&lt;span style="color: #8b0000"&gt;00000000-0000-0000-0000-000000000000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;"&amp;gt;&amp;lt;/&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This will place the custom control onto your form (if it's within the right tags, ie &amp;lt;div&amp;gt; &amp;lt;body&amp;gt; etc.). Next all you need to do is hook the event&lt;/p&gt;&lt;pre&gt;&amp;lt;script &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;="&lt;span style="color: #8b0000"&gt;Bob&lt;/span&gt;" &lt;span style="color: #0000ff"&gt;event&lt;/span&gt;="&lt;span style="color: #8b0000"&gt;DoSomething(someString)&lt;/span&gt;"&amp;gt;&lt;br /&gt; &lt;span style="color: #008000"&gt;//Some code here... whatever you want to do :)&lt;/span&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Like I said in my previous &lt;a href="http://juztinwilzon.blogspot.com/2007/05/net-and-activex.html#links"&gt;post&lt;/a&gt; you could also do it this way&lt;/p&gt;&lt;pre&gt;&amp;lt;script&amp;gt;&lt;br /&gt; function Bob::DoSomething(someString) {&lt;br /&gt;  &lt;span style="color: #008000"&gt;//some code&lt;/span&gt;&lt;br /&gt; }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;I've had more success with the first approach,&amp;nbsp;but it's silent so if you have a problem you wont know until you fire your event and it simply doesn't work.&lt;br&gt;Now you should be able to write some Custom Controls that you can hook up to JS events AND work with over SSL (Just make sure you register the assembly on the machine you want to see the controls on)&lt;br&gt;And again this is for SSL/event controls. If you just want to make a control for a public site over non-ssl without registering the controls on the clients then you don't have to take this exact approach. There is another way! Hopefully I can get some time and I'll do another post or two on this topic..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-1672496834011532570?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/1672496834011532570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=1672496834011532570' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1672496834011532570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1672496834011532570'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/05/net-activex-example-javascript-event.html' title='.NET ActiveX Example. Javascript event wireup. SSL'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-3580056361016812461</id><published>2007-05-21T23:04:00.001-06:00</published><updated>2007-05-22T08:50:15.225-06:00</updated><title type='text'>.NET and ActiveX</title><content type='html'>&lt;p&gt;Wow, what a lot of trouble&amp;nbsp;it can be to just get some ActiveX going in ASP.NET. Some may ask why you would want to even&amp;nbsp;incorporate this technology which is only supported in Internet Explorer and which opens up a can of security worms. Well sometimes you gotta do what you gotta do and this is the best thing to use for some situations. The project I'm currently working on is a web based&amp;nbsp;customer service type application and one request from one of our customers is that they would like our application to respond to their phone &lt;a href="http://en.wikipedia.org/wiki/Interactive_voice_response"&gt;IVR&lt;/a&gt;. So that when employees receive calls, our web app will automatically respond by loading the customers info before the agent answers the phone. Hey it's nice to be greeted by 'Good morning Mr. Wilson what can I help you with". This is a situation where we kinda needed to use ActiveX. Well the good news is is that you can do this in .NET, the bad news is is that it can be very picky sometimes and it seems there isn't a whole lot of info out there about this topic (There is on Win32, but not .NET).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Okay, so here's the good stuff you came here for :)&lt;br&gt;&lt;strong&gt;First&lt;/strong&gt; -&amp;nbsp;you're gonna want to create a custom control that you can drop somewhere on your ASP page.&amp;nbsp;We kept ours out of our existing solution and made a new solution just for our ActiveX stuff. (&lt;em&gt;new class library solution -&amp;gt; new user control&lt;/em&gt;)&lt;br&gt;&lt;strong&gt;Second&lt;/strong&gt; - If you're gonna want to be able to call methods / set variables etc AND respond to events (like mouse click, or custom events like the IVR is sending you a call) you MUST create two interfaces. One for events only and the other for methods/properties etc. These interfaces will be exposed to COM and will be the things your web page / other applications will communicate with. (example of all this will be on the next post)&lt;br&gt;&lt;strong&gt;Third &lt;/strong&gt;- You will need to give all of your events [DispId(some unique int)] attributes&lt;br&gt;&lt;strong&gt;Fourth&lt;/strong&gt;- You need GUIDs for your interfaces and custom control class/object. If you're using VS2005 it's easy just do 'Tools -&amp;gt; Create GUID'. (You don't HAVE to have GUIDs if you're making a plain jane control.. But if you want to use it over SSL and hook up events in JavaScript then you're gonna need to use them for sure)&lt;br&gt;&lt;strong&gt;Fifth &lt;/strong&gt;- Right click on your the project your custom control is within and select 'Properties', go the the 'Build' settings and check the 'Register for COM interop' box. If you wanna be able to respond to COM you gotta set it.&lt;br&gt;&lt;strong&gt;Sixth&lt;/strong&gt; - Register your new dll created when you compiled your new custom control. The old way, Win32 way, to do this was with 'regsvr32.exe'. The way you do it in .NET is to open up the VS Command Prompt, navigate to your .dll and type 'regasm /codebase customControl.dll'. Regasm is short for 'RegisterAssembly'. The '/codebase' will set the codebase in the registry. (Now you don't HAVE to do this step either... But again, if you wanna use it over SSL and respond to events and things your gonna need to register. Otherwise you don't have to)&lt;br&gt;&lt;strong&gt;Seventh&lt;/strong&gt; - Add your new custom control to your ASP page. '&amp;lt;object id="Bob" classid="clsid:00000000-0000-0000-0000-000000000000"&amp;gt;&amp;lt;/object&amp;gt;'. Replace the 000... GUID with the one you used for your custom control. If all went well you should be able to see your custom control on your page. There is another approach to this, you could use 'classid="customControl.dll#namespace.classname' but then the dll has to reside in your ASP site, AND the KICKER is that this will NOT work if you plan on using SSL. So it's just easier to use the GUID :)... (But you don't HAVE to do it this way, you can use the second way 'dll#namespace.class' but.. it just wont work with SSL :)&lt;br&gt;&lt;strong&gt;Eigth&lt;/strong&gt; - To wire up your events there are also two approaches. The first '&amp;lt;script for="Bob" event="yourEvent(args)"&amp;gt; some script &amp;lt;/script&amp;gt;' is the the approach that seems to work the best. This will also not throw JS exceptions if it doesn't hook/sink correclty. The second approach which may let you know there are problems is '&amp;lt;script&amp;gt; function Bob::yourEvent(args) { } &amp;lt;/script&amp;gt;'. I would recommend the first since it seems to work a little more often.&lt;br&gt;&lt;strong&gt;Ninth&lt;/strong&gt; - Okay the last step is to strong name your assembly. This is pretty easy. Just right click on your project -&amp;gt; properties. Go to the bottom tab 'Signing' and check the box 'Sign the assembly'. Then in the drop down select 'New'. This will bring up a pop-up. Type in a name for your key file (this can be anything you'd like) and you can supply a password or uncheck the 'Protect my key file with password' if you don't want a password. Click 'okay' and you're done!&lt;br&gt;So there are the basics. Now we'll do some code examples in the next post,&amp;nbsp;if you're a visual kinda person like me :)&lt;/p&gt; &lt;p&gt;Also check out Eber's &lt;a href="http://ebersys.blogspot.com"&gt;blog&lt;/a&gt; to. We both worked on many of the ActiveX problems so we'll both be posting about some of the issues. So if I don't answer you question he may have it in his blog :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-3580056361016812461?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/3580056361016812461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=3580056361016812461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3580056361016812461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/3580056361016812461'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/05/net-and-activex.html' title='.NET and ActiveX'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2996243190063945671</id><published>2007-05-08T09:01:00.001-06:00</published><updated>2007-05-22T09:48:38.538-06:00</updated><title type='text'>Ignoring SSL Certificate Problems</title><content type='html'>&lt;p&gt;Have you ever run across these problems when trying to connect to a secure web service?&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;em&gt;The remote certificate is invalid according to the validation procedure&lt;/em&gt;",&lt;br /&gt;"&lt;em&gt;The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.&lt;/em&gt;"&lt;/span&gt;&lt;/blockquote&gt; &lt;p&gt;Usually this is caused by a bad certificate on the server side, but what if you want to connect anyway, maybe you trust the remote system and just don't care. How do you get around this? How do you get your code to ignore these warnings and continue? We'll if you're using .NET 2.0 it's really easy (still pretty easy in .NET 1 but it takes a little more work). You'll need to use the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.servicepointmanager.aspx"&gt;ServicePointManager&lt;/a&gt; class, and add this using statement (if you don't want to use the fully qualified names anyway).&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System.Security.Cryptography.X509Certificates;&lt;/span&gt;&lt;/pre&gt;Now all you need to do is add this bit of code somewhere before you make the call to the web service.&lt;br /&gt;&lt;span style="color: rgb(0, 128, 192);"&gt;ServicePointManager&lt;/span&gt;.ServerCertificateValidationCallback = &lt;span style="color: rgb(0, 0, 255);"&gt;delegate&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt; sender, &lt;span style="color: rgb(0, 128, 192);"&gt;X509Certificate&lt;/span&gt; cert, &lt;span style="color: rgb(0, 128, 192);"&gt;X509Chain&lt;/span&gt; chain, &lt;span style="color: rgb(0, 128, 192);"&gt;SslPolicyErrors&lt;/span&gt; policyErrors) {&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;        return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;;&lt;br /&gt;          };&lt;br /&gt;The 'ServerCertificateValidationCallback' is used to custom validate server certificates. By default it is null, and since the above code just returns 'true' all certificates will be valid now. You could add some more custom code to this if you wanted to do your own validation, say you only want it to be valid if the cert comes from a specific place etc.&lt;br /&gt;You can also check out this MS &lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.servicepointmanager.servercertificatevalidationcallback.aspx"&gt;link&lt;/a&gt; as well that has the same code as above&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2996243190063945671?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2996243190063945671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2996243190063945671' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2996243190063945671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2996243190063945671'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/05/ignoring-ssl-certificate-problems.html' title='Ignoring SSL Certificate Problems'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5988489831927385420</id><published>2007-05-01T11:30:00.001-06:00</published><updated>2007-05-01T12:01:43.538-06:00</updated><title type='text'>F#... Hot or Not?</title><content type='html'>&lt;p&gt;&lt;a href="http://ebersys.blogspot.com/"&gt;Eber&lt;/a&gt;&amp;nbsp;and I recently decided we wanted to play around with a new language. We looked into a few of the current popular ones like Ruby or Python (Since we can use them in VS, &lt;a href="http://www.wilcob.com/Wilco/IronRuby.aspx"&gt;IronRuby&lt;/a&gt; / &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython"&gt;IronPython&lt;/a&gt;), but they are all 'fairly' similar. (I put in IronRuby instead of &lt;a href="http://www.sapphiresteel.com/"&gt;Ruby in Steel&lt;/a&gt; because one is $199 and the other is not, and hey... free is good ;)&amp;nbsp; ) So we decided to go somewhere new, a language that is quite a bit different, &lt;a href="http://research.microsoft.com/fsharp/fsharp.aspx"&gt;F#&lt;/a&gt;. F# is an experimental language from Microsoft that shares the same syntax style as&amp;nbsp;&lt;a href="http://caml.inria.fr/ocaml/"&gt;OCAML&lt;/a&gt; (Object CAML). It's a &lt;a href="http://en.wikipedia.org/wiki/Functional_programming"&gt;functional language&lt;/a&gt; which made it different enough for us.&lt;/p&gt; &lt;p&gt;So if you wanna play along here's what you're gonna need:&lt;br /&gt; &lt;blockquote&gt; &lt;font color="#000000"&gt;1-Visual Studio 2005 (does not currently work on Orcas)&lt;/font&gt;&lt;br /&gt;&lt;font color="#000000"&gt;2-F# (download the newest version (1.9.1)&amp;nbsp;&lt;/font&gt;&lt;a href="http://research.microsoft.com/research/downloads/details/b46c7032-149c-4da3-a027-7768210a158d/details.aspx"&gt;&lt;font color="#000000"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000"&gt;, the F# home page currently doesn't have the newest release listed)&lt;/font&gt;&lt;br /&gt;&lt;font color="#000000"&gt;3-Some patience since there is not a whole lot of stuff out there about F#. But there is quite a bit of stuff out there for OCAML (Which is where I've been getting most of my info since most of it will work in F#)&lt;/font&gt;&lt;br /&gt;&lt;/blockquote&gt;One other things that led us to F# was the amount of influence it has had on C#. What you say? Well yes there are many things from F# that have made their way into C# from this experimental language. One of the newest things are &lt;a href="http://en.wikipedia.org/wiki/Lambda_calculus"&gt;Lambdas&lt;/a&gt;, as of C# 3.0,&amp;nbsp;which&amp;nbsp;make the new&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx"&gt;LINQ&lt;/a&gt; possible (where they are used everywhere!). So if all of this hasn't gotten you the least bit excited it's also a type safe language, you can do scripting, or objects, and since it's a .NET supported language you can access your F# DLL's from your C# projects, and vice-versa. Since it is a .NET supported language and it isn't widely used you will find lots of examples out there that use quite a bit of the .NET librarys.&lt;/p&gt; &lt;p&gt;ex. You may see quite of bit of this&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;Console.WriteLine("Hello");; // Looks familiar if you use C#&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;instead of this&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;print_string("Hello");; // This is the F# stuff (which is also the same in OCAML)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000"&gt;print_newling();;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So one thing you may notice right of the bat is the double ';' at the end of&amp;nbsp;the lines. This is one of the first things that had stumped me, and I was hard pressed to find anything on the F# website. So I started looking around the OCAML pages and found &lt;a href="http://www.ocaml-tutorial.org/the_structure_of_ocaml_programs"&gt;this&lt;/a&gt; nice explanation of when to use no ';' when to use a single ';' and when to use double ';' (scroll down a little over half way down the page until you find '&lt;em&gt;Using and omitting &lt;code&gt;;;&lt;/code&gt; and &lt;code&gt;;&lt;/code&gt;&lt;/em&gt;')&lt;/p&gt; &lt;p&gt;So far I give F# a potential&amp;nbsp;'HOT' vote, since I haven't done a lot with it&amp;nbsp;as of yet. It's a different way of thinking, since it is a functional language, and it's also&amp;nbsp;a pretty flexible language. &lt;a href="http://ebersys.blogspot.com/"&gt;Eber&lt;/a&gt; and I plan on doing more with F# so expect more blogs from the both of us in the future, if you're interested in F# if not keep checking our blogs for other fun stuff :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5988489831927385420?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5988489831927385420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5988489831927385420' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5988489831927385420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5988489831927385420'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/05/f-hot-or-not.html' title='F#... Hot or Not?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2096885241256502427</id><published>2007-04-30T14:21:00.001-06:00</published><updated>2007-04-30T14:21:59.979-06:00</updated><title type='text'>Visual Studio Acting Up</title><content type='html'>&lt;p&gt;Has Visual Studio ever started 'acting up' on you? Every once in a while I notice that VS just acts plain weird for me. For example, it will&amp;nbsp;quit compiling certain projects for me, or sometimes&amp;nbsp;project A, that has a ref to project B, quits seeing updates to project B. Just little nuances like these every once in a while can be a pain to figure out, and are just plain frustrating.&amp;nbsp;&lt;a href="http://ebersys.blogspot.com/"&gt;Eber&lt;/a&gt; had a strange issue last week where if he compiled the projects within a solution individually they would work fine,&amp;nbsp;but&amp;nbsp;If he compiled the entire&amp;nbsp;solution certain projects dll's&amp;nbsp;would revert back to a previous build in referencing projects??&lt;/p&gt; &lt;p&gt;This was just plain weird! He would changed the version number of one of the projects, build the solution and in the referencing project the dll would revert back to the old version. Tried deleting all the dll's and rebuilding, tried removing and re-adding the reference, tried deleting cache. None of these worked, and&amp;nbsp;we were both kinda stumped on this one. I remembered a while back I was having some issue after getting a bunch of files from our current projects repository, and I had deleted the .&lt;a href="http://msdn2.microsoft.com/en-us/library/xhkhh4zs(VS.80).aspx"&gt;suo&lt;/a&gt; file just for fun :) and after I re-opened the project&amp;nbsp;everything started working again for me. So we figured we'd give that a try and see if it would some how fix the issue he was having. Voila! and what do you know... it fixed this strange problem.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Weird..&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2096885241256502427?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2096885241256502427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2096885241256502427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2096885241256502427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2096885241256502427'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/04/visual-studio-acting-up.html' title='Visual Studio Acting Up'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4449052878741049685</id><published>2007-04-28T15:11:00.001-06:00</published><updated>2007-04-28T15:15:08.476-06:00</updated><title type='text'>Vista - Security and Usability</title><content type='html'>&lt;p&gt;I recently installed Vista on my wife's computer (I figured maybe it would be a little harder for her to break). I had installed it before, but wasn't happy with VS2005 support and a few other things, but I thought it would be great for her. One thing I had been meaning to do for a while was setup some sort of back-up for all of her stuff (She keeps all videos, pictures etc on her computer and if a hard drive crashed she would loose 8+ years of photos). I set up a striping array for a general safety net, which when doing this on XP you have to add a floppy drive to install drivers so that you can even use any type of RAID setup. Basically with XP it's a pain, especially if you don't have a floppy drive in the computer. I was happy to see that I didn't have to do a thing to get the RAID recognized in Vista. The installer came up and just asked where I wanted to install and right there was the RAID array all ready to go. This is one improvement that I've been waiting for :)&lt;/p&gt; &lt;p&gt;Here's the downside though. Have you seen some of the new &lt;a href="http://www.apple.com/getamac/ads/" target="_blank"&gt;Apple commercials?&lt;/a&gt; The one where the 'Windows' guy has the security guy behind him asking him to 'deny' or 'accept' everything? Well... that can get kinda irritating, but what about when stuff just doesn't work? My wife has an iPaq, and pretty much all we needed to do on XP was just plug it in and tell&amp;nbsp;&lt;a href="http://www.microsoft.com/windowsmobile/activesync/default.mspx"&gt;ActiveSync&lt;/a&gt; what should be synchronized. Well once I was done with the Vista install I figured 'Hey the RAID was sooo easy to get going that the iPaq should be a sinch'. Man, I was wrong. I plugged it in and it installed a 'generic' driver and that was it. One thing with Vista is that there is no more ActiveSync, it's being replaced&amp;nbsp;with&amp;nbsp;&lt;a href="http://www.microsoft.com/windowsmobile/devicecenter.mspx"&gt;Windows Mobile Device Center&lt;/a&gt;. So I loaded the device center up thinking the iPaq would be there... Nope.&lt;/p&gt; &lt;p&gt;Basically after a little searching I stumbled across this &lt;a href="http://www.microsoft.com/windowsmobile/devicecenter/onecare.mspx"&gt;link&lt;/a&gt;. Wow what a lot of setup just to get Vista to work with the iPaq. I don't think someone with decent knowledge of Windows, like my wife, would have found this easily. I also don't think the basic user, like my grandmother, would have&amp;nbsp;ever been able to figure this out without help. So is forcing the user to have more knowledge of the underlying system the 'Best' approach to solving some of Windows security issues??&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4449052878741049685?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4449052878741049685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4449052878741049685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4449052878741049685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4449052878741049685'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/04/vista-security-and-usability.html' title='Vista - Security and Usability'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-1727050582650458596</id><published>2007-04-13T14:11:00.001-06:00</published><updated>2007-04-13T14:44:43.259-06:00</updated><title type='text'>Calling static class A&amp;#39s static methods from a singleton class C where C does not reference A?</title><content type='html'>&lt;p&gt;Whoa.. I ran across this little scenario the other day.&lt;/p&gt; &lt;p&gt;In the application I'm currently working on we have a static class with static methods that are used for some logging purposes throughout the rest of the app.&amp;nbsp;(The static methods link to a back-end singleton class). This logging&amp;nbsp;class lives within our objects. We also have a bunch of interfaces for these objects that are passed around in the rest of the app. &lt;u&gt;Our objects hold a reference to the interfaces but the interfaces do not hold a ref to our objects&lt;/u&gt;. We have another Singleton class in a plugins project that only gets passed interfaces (the plugins also hold a ref to the interfaces, but not the objects). We needed to be able to do some logging (preferably using the already implemented object) from this singleton but ran into this fun little scenario.&lt;/p&gt; &lt;p&gt;So basically (If you didn't want to read the above paragraph)&lt;/p&gt; &lt;p&gt;Class A(singleton) has a reference to Class B(interfaces)&lt;/p&gt; &lt;p&gt;Class C(objects) has a reference to B&lt;/p&gt; &lt;p&gt;A does not ref&amp;nbsp;C and&amp;nbsp;C does not ref A&lt;/p&gt; &lt;p&gt;How does A call a static class' static methods of C?&lt;/p&gt; &lt;p&gt;Well, here goes.. Our singleton (class A) gets started up and no one ever calls methods against it.. It just runs and periodically does some checking. We need to log though using class B..&lt;/p&gt; &lt;p&gt;When we do our startup and begin the singleton of A we pass in the methods needed from C. We added an Init method that is called at startup that takes local delegate types&amp;nbsp;with matching signatures of class C's methods. Then we keep local copies of these an can call them whenever we need to, thus calling into class C's methods that we don't really have access to...&lt;/p&gt; &lt;p&gt;Some sample code:&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; C {&lt;br /&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; LogA(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s) {}&lt;br /&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; LogB(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i) {}&lt;br /&gt; ...&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; A {&lt;br /&gt; &lt;span style="color: #008000"&gt;//Some singleton stuff here//&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; LogADelegate(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s);&lt;br /&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; LogBDelegate(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i);&lt;br /&gt;&lt;br /&gt; &lt;font color="#0080c0"&gt;LogADelegate&lt;/font&gt; _logA;&lt;br /&gt; &lt;font color="#0080c0"&gt;LogBDelegate&lt;/font&gt; _logB;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Init(LogADelegate a, LogBDelegate b) {&lt;br /&gt;  _logA = a;&lt;br /&gt;  _logB = b;&lt;br /&gt;  &lt;span style="color: #008000"&gt;//more init code//&lt;/span&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: #008000"&gt;//Code from a startup class&lt;/span&gt;&lt;br /&gt;&lt;font color="#0080c0"&gt;A&lt;/font&gt;.Init(&lt;font color="#0080c0"&gt;C&lt;/font&gt;.LogA, &lt;font color="#0080c0"&gt;C&lt;/font&gt;.LogB);&lt;/pre&gt;&lt;p&gt;The neat thing is that your passing a static method and storing it and using it as though it where an instance method.&lt;br/&gt;One other quick neat thing is if you have multiple overrides of LogA&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; LogA(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s) {}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; LogA(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; a, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; b) {}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; LogA(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i) {}&lt;/pre&gt;&lt;p&gt;The compiler automatically infers which one to pass when calling the Init() function based on the delegate's signature.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;I thought it was pretty neat anyways ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-1727050582650458596?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/1727050582650458596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=1727050582650458596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1727050582650458596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/1727050582650458596'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/04/calling-static-class-static-methods.html' title='Calling static class A&amp;#39s static methods from a singleton class C where C does not reference A?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-4744478400795007004</id><published>2007-04-06T10:40:00.001-06:00</published><updated>2007-05-17T13:06:56.769-06:00</updated><title type='text'>Crystal Reports Revisited</title><content type='html'>&lt;p&gt;I setup &lt;a href="http://www.google.com/analytics/"&gt;Google's Analytics&lt;/a&gt; yesterday after I noticed that I actually had some visits to my blog, Woo Hoo ;) I noticed that I was getting some hits about a &lt;!--&lt;a href="#Crystal Reports Madness (Formulas / Datasets)"&gt;post&lt;/a&gt;--&gt;&lt;a href="http://juztinwilzon.blogspot.com/2007/02/crystal-reports-madness-formulas.html"&gt;post&lt;/a&gt; I did on the 'grouping' feature&amp;nbsp;of formulas in&amp;nbsp;Crystal Reports. I guess I shouldn't be too surprised, the documentation for CR is not good at best.&lt;/p&gt; &lt;p&gt;I'm going to do some more research into this, since it has been a little while, and do another post that will, hopefully, explain the formula/grouping a little better.&lt;/p&gt; &lt;p&gt;So hang tight! it'll be posted here in a little while ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-4744478400795007004?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/4744478400795007004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=4744478400795007004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4744478400795007004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/4744478400795007004'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/04/crystal-reports-revisited.html' title='Crystal Reports Revisited'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5933888160104669372</id><published>2007-04-02T10:33:00.001-06:00</published><updated>2007-04-13T14:41:53.160-06:00</updated><title type='text'>&lt; &gt; Abstraction</title><content type='html'>&lt;p&gt;I was refactoring some code last week and ran across a little section I thought was kinda neat.&amp;nbsp;We had&amp;nbsp;a method in some object that basically would try and get the next lowest item from a collection. Not the lowest, but the next lowest. There was also a method that did the exact same thing for the next highest item as well. &lt;/p&gt; &lt;p&gt;So basically if we had this collection &lt;font color="#0080c0"&gt;{ 2, 4, 5, 7, 9 }&lt;/font&gt;&lt;font color="#000000"&gt; we would pass in one of those values to the method which would return the next lowest/highest. So if we called the next lowest function passing in '9' we would get '7' in return.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Here's the basics of the next lowest function&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;font color="#0080c0"&gt;Item&lt;/font&gt; GetNextLowest(&lt;font color="#0080c0"&gt;Item&lt;/font&gt; item) {&lt;br /&gt; &lt;font color="#0080c0"&gt;Item&lt;/font&gt; result = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: #008000"&gt;//Some other checking here&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;font color="#0080c0"&gt;Item&lt;/font&gt; i &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; Values) {&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(i &amp;lt; item) {&lt;br /&gt;   &lt;span style="color: #008000"&gt;//Set the result&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (result == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) result = i;&lt;br /&gt;   &lt;span style="color: #008000"&gt;//There is a lower item, but make sure it's the next lower&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (result &amp;gt; i) result = i;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; result;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Reversing the '&amp;lt; &amp;gt;' in the next higher function made the two methods identical so I needed a way to abstract this out. One way would be to pass some delegate in that did the comparison for you, but that would add a bunch of code elsewhere, and we're trying to shorten the amount of code. Another way would be to pass in a boolean and then do some if/else statements to determine if we want '&amp;lt;' or '&amp;gt;', but this adds unecessary logic that occurs quite often. So the solution that I finally implemented was this.&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;font color="#0080c0"&gt;Item&lt;/font&gt; GetNextLower(&lt;font color="#0080c0"&gt;Item&lt;/font&gt; item) {&lt;br /&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetNextItem(item, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;font color="#0080c0"&gt;Item&lt;/font&gt; GetNextHigher(&lt;font color="#0080c0"&gt;Item&lt;/font&gt; item) {&lt;br /&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetNextItem(item, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Item GetNextItem(&lt;font color="#0080c0"&gt;Item&lt;/font&gt; item, &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; higher) {&lt;br /&gt; &lt;span style="color: #008000"&gt;//Use this to figure out if we want &amp;lt; or &amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; compare = (higher) ? 1 : -1;&lt;br /&gt; &lt;font color="#0080c0"&gt;Item&lt;/font&gt; result = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: #008000"&gt;//Some other checking here&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;font color="#0080c0"&gt;Item&lt;/font&gt; i &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; Values) {&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(i.CompareTo(item) == compare) {&lt;br /&gt;   &lt;span style="color: #008000"&gt;//Set the result&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (result == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) result = i;&lt;br /&gt;   &lt;span style="color: #008000"&gt;//There is a lower item, but make sure it's the next lower&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (i.CompareTo(result) == compare) result = i;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; result;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;So basically all that was added was the abstracted method and the 'compare' int that is used to determine if we wanted the next lower or higher Item.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5933888160104669372?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5933888160104669372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5933888160104669372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5933888160104669372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5933888160104669372'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/04/abstraction.html' title='&amp;lt; &amp;gt; Abstraction'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-7445998076736935583</id><published>2007-03-01T00:08:00.000-07:00</published><updated>2007-03-01T00:27:39.738-07:00</updated><title type='text'>Javascript is cool?</title><content type='html'>So I was gonna blog about this yesterday... but It was late and 'The Greatest Thing Ever' was a tad bit higher on my priority list.&lt;br /&gt;Well here goes another blog.&lt;br /&gt;The project I'm currntly working on has sooooo much AJAX madness. (It's like way after my bed-time so bear with me), and I'm not an 'Expert' on JavaScript... yet. So I started looking for some cool tools that might benefit me a lil' bit. I found ActiveState's and IntelliJ's solutions but I didn't want to pay alot of money. I finally stumbled acrossed &lt;a href="http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/"&gt;this&lt;/a&gt; plugin for Eclipse that looked promising. It's from Adobe (previously Interak). So I downloaded it, installed it..... And EXCEPTIONS!... Wow!&lt;br /&gt;&lt;br /&gt;Well I started looking into this a bit... and apparently this is something that just happened to make its way into the release. I found some info on Adobe's website, but none of it was promising. Basically everyone was saying "Just upgrade to Java 5", well my OS X pc has 5.0 ready-to-go. I kept getting this error "The selected wizard could not be started", "Plugin-in com.interakonline.jseclipse was unable to load class com.interaktonline.jseclipse.ui.newwizard.JSClass".&lt;br /&gt;&lt;br /&gt;The solution is  basically to just ignore this error!?!? I mean don't worry about, Adobe hasn't done any upgrades for this product in a while, and there's not a whole lot of info out there for this fix. So to use this plugin all you need to do is just add a new 'File' to your project and give it a '.js' extension. This will bypass the previous error  and let you get down to business. Code completion works good, and best of all it's not $200 + to use it. So if you're not using Orcas (or can't) then this is a good solution if you want to develop some JS code but don't want to fork out a lotta cash!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-7445998076736935583?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/7445998076736935583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=7445998076736935583' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/7445998076736935583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/7445998076736935583'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/03/javascript-is-cool.html' title='Javascript is cool?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-2698171143678660228</id><published>2007-02-28T12:25:00.000-07:00</published><updated>2007-02-28T12:46:41.412-07:00</updated><title type='text'>The Greatest Thing Ever!</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_42YYHgpVH8M/ReXXNkKNPZI/AAAAAAAAAA8/YP_uTefDFLM/s1600-h/TheGreatestThingInTheWorld.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 396px; height: 249px;" src="http://3.bp.blogspot.com/_42YYHgpVH8M/ReXXNkKNPZI/AAAAAAAAAA8/YP_uTefDFLM/s200/TheGreatestThingInTheWorld.JPG" alt="" id="BLOGGER_PHOTO_ID_5036668386328526226" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;This picture pretty much sums it up :)&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;    Have you ever wanted to be able to do everything you ever wanted on just one computer, without the need for reboots, special setups, or very hindered performance? Well now you can!&lt;br /&gt;&lt;br /&gt;    In my professional life I'm a windows kinda guy, I go to work, I log into a windows domain, I develop in c# and Visual Studio. In my personal life I'm an Apple kind of a guy, I love the stability and easy to use applications, the BSD core, etc.&lt;br /&gt;&lt;br /&gt;    Well sometimes when I'm at home I want to be able to do some c# coding. Yes I could use &lt;a href="http://www.mono-project.com/Main_Page"&gt;Mono&lt;/a&gt;, but the IDE options are sparse, or require a lot of setup, and I can't use a lot of the new features in .NET 3. I originally used &lt;a href="http://www.parallels.com/en/products/desktop/"&gt;Parallels&lt;/a&gt; but hated being limited to one screen, hard to use USB devices etc. I eventually switched to &lt;a href="http://www.apple.com/macosx/bootcamp/"&gt;Boot Camp&lt;/a&gt; and Vista, but Vista has a whole slew of issues with VS2005 and little support for &lt;a href="http://wpf.netfx3.com/"&gt;WPF&lt;/a&gt; in &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700830.aspx"&gt;Orcas&lt;/a&gt;, AND I also had to reboot. I had my iTunes and stuff in OS X and didn't want to duplicate stuff so I wasn't 100% happy.... yet. Well last night I noticed that Parallels had posted a new release. WOW! They have made some huge &lt;a href="http://www.parallels.com/products/desktop/ga/features/"&gt;improvements&lt;/a&gt;. First off my favorite new thing, &lt;a href="http://www.parallels.com/products/coherence/"&gt;Coherence&lt;/a&gt;. To enable this just load up Parallels and select 'View' - 'Coherence' and BAM! done. Your desktop now has both the Windows task bar AND the Apple app launcher! How hot is that! Well like I had said before I really didn't like being limited to one monitor with Parallels. Well it just got better. If you go back to Parallels and select 'View' - 'Customize' you'll notice my other favorite new feature, a little option that says 'Use multiple desktops'. No I can drag applications (Both Windows and OS X) back and forth between my monitors.&lt;br /&gt;&lt;br /&gt;    So now I'm very happy! When I'm at home I can have my Visual Studio up on one monitor along with iTunes, and my browsers (Safari, Firefox, IE) on my other monitor. AND If I really wanted to I can boot up my Boot Camp OS using Parallels, so there is absolutely no need to reboot anymore!&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-2698171143678660228?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/2698171143678660228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=2698171143678660228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2698171143678660228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/2698171143678660228'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/greatest-thing-ever.html' title='The Greatest Thing Ever!'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_42YYHgpVH8M/ReXXNkKNPZI/AAAAAAAAAA8/YP_uTefDFLM/s72-c/TheGreatestThingInTheWorld.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-5330585637057629012</id><published>2007-02-13T00:00:00.000-07:00</published><updated>2007-02-14T11:45:12.486-07:00</updated><title type='text'>It made me giggle a little</title><content type='html'>Maybe I was tired, or my brain was a little wrecked, but I was doing a little surfing last night and &lt;a href="http://t-a-w.blogspot.com/2006/07/language-popularity-metrics.html"&gt;this&lt;/a&gt; blog made me smile a bit. I just love all the "sucks" in there HA!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-5330585637057629012?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/5330585637057629012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=5330585637057629012' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5330585637057629012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/5330585637057629012'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/it-made-me-giggle-little.html' title='It made me giggle a little'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117118822066517930</id><published>2007-02-11T03:03:00.000-07:00</published><updated>2007-02-11T03:05:06.790-07:00</updated><title type='text'>WPF/E - getting started</title><content type='html'>&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx"&gt;WPF/E&lt;/a&gt; is one of Microsofts latest "Hot" things. It's used to create very rich, cross-platfrom, interactive web applications.&lt;/p&gt;&lt;p&gt;It's fairly easy to get this working. Here's some things you'll need&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Windows XP / Vista with .NET 3.0&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Visual Studio 2005 (Orcas 'JAN CTP' does not work with WPF)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c744cbb8-d4d9-4bf9-ad5c-eef36e064911&amp;amp;displaylang=en"&gt;WPF/E SDK&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Once you have these you're pretty much ready to go. The WPF/E SDK will install the template for VS2005. Now there are two ways to start playing around with this. The first is to open up VS and create a new project. ***Make sure you don't select New Web Site unless you follow the article mentioned below, just click the new project. Under the 'My Templates' section you see "WPF/E Javascript Application". This creates a web site with no aspx files, just straight up html,javascript, and XAML.&lt;/p&gt;&lt;p&gt;I could go into how to setup a web site with good old aspx files, but the information is already out there.. You can find it in this good &lt;a href="http://msdn2.microsoft.com/en-us/library/bb190632.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Hopefully I can get some better posts up about WPF in the near future (I'm just green on this technology right now :) )&lt;/p&gt;&lt;p&gt;Stay Tuned!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117118822066517930?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117118822066517930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117118822066517930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117118822066517930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117118822066517930'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/wpfe-getting-started.html' title='WPF/E - getting started'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117118527498519765</id><published>2007-02-11T02:14:00.000-07:00</published><updated>2007-02-11T02:16:54.440-07:00</updated><title type='text'>Crystal Reports Madness (Setter Exception)</title><content type='html'>&lt;p&gt;Ran accross this fun little issue with a report that sets a &lt;span style="color:#0080c0;"&gt;Group&lt;/span&gt; &lt;em&gt;condition...&lt;/em&gt;&lt;/p&gt;&lt;p&gt;We had some code like this:&lt;/p&gt;&lt;pre&gt;&lt;span style="color:#0080c0;"&gt;Group&lt;/span&gt; group = report.DataDefinition.Groups[4];&lt;br /&gt;group.GroupOptions.Condition = condition;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;We used this to set a &lt;span style="color:#0080c0;"&gt;DateTimeCondition &lt;/span&gt;&lt;span style="color:#000000;"&gt;property of one of our reports. But everytime it hit this code an exception was thrown :(.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;After spending a fair amount of time trying to track down a solution to this problem we found it to be an issue with the Setter for this object.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We changed our code to this and all is well again.&lt;/p&gt;&lt;pre&gt;&lt;span style="color:#0080c0;"&gt;Group&lt;/span&gt; group = report.DataDefinition.Groups[4];&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;try&lt;/span&gt; {&lt;br /&gt;    group.GroupOptions.Condition = condition;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; { }&lt;br /&gt;group.GroupOptions.Condition = condition;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Basically we let it exception once, and don't handle it, and then set the property again. For some reason it always exceptions on the first attempt, but then sets the property fine the second time.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We found this solution by changing this value at runtime using the VS debugger. It would change the value fine at runtime if we modified the value in the watch window, but if we let it just try and pass through without manually changing the value then it would exception. If we manually changed the value and then stepped over the code, then it would work??&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This is a strange one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117118527498519765?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117118527498519765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117118527498519765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117118527498519765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117118527498519765'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/crystal-reports-madness-setter.html' title='Crystal Reports Madness (Setter Exception)'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117118441069437494</id><published>2007-02-11T02:00:00.000-07:00</published><updated>2007-04-06T10:34:48.948-06:00</updated><title type='text'>Crystal Reports Madness (Formulas / Datasets)</title><content type='html'>&lt;a name="Crystal Reports Madness (Formulas / Datasets)"&gt;&lt;/a&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;&lt;em&gt;"There must be a group that matches this field."&lt;/em&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;I recently was given the task at work to get a bunch of crystal reports working from a win32 application, that we inherited, to our new web app version. I had never done anything with Crystal Reports before so I wasn't sure what I was getting myself into.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Crystal Reports ended up being pretty straightforward and easy to figure out, but that wasn't the hard part. The current reports we had connected directly with the database to get the information they needed. We didn't really like this '&lt;em&gt;pull&lt;/em&gt;' model for a couple reasons.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;1 - The current application only connected to Oracle. The new web application was not DB specific.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;2 - Didn't really like the idea of having the credentials stored within each report file.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;3 - Changing DataSets was a pain, and had caused problems with the report files themselves in the past.&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;So we decided to implement the '&lt;em&gt;push&lt;/em&gt;' modal.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;(&lt;a href="http://www.builderau.com.au/architect/webservices/soa/Choose_the_right_data_access_strategy_when_using_Crystal_Reports_with_NET/0,339024590,320269823,00.htm"&gt;Push / Pull explained here...&lt;/a&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;This seemed pretty straight forward. We created XSD's for each report, and then changed the datasource location in the report file using VS2005.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Well... This ended up not working It wasn't until I stumbled accross some very sparse information on the web explaining that it's best to disconnect the report from the DB and THEN change the DS location. This finally ended up working for us (Task 1 DONE!)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;The next issue was that we changed some of the report paramater names to make more sense. I figured this wouldn't be much of a problem, but boy was I wrong. When I saved the report I received multiple complaints from the report. Most of which were due to some of the report formulas. I loaded up a few of these formulas and received this error when I tried to save them&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#004080" size="2"&gt;"&lt;em&gt;There must be a group that matches this field.&lt;/em&gt;"&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;I searched the web trying to figure out what it wanted, but I mostly stumbled accross web sites only offering training, actual documentation was kinda sparse, or not really that great.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Basically the solution boils down to this.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Our formulas group options were being set dynamically in code behind, so this condition wasn't in the original formulas which caused the error. The weird thing is that they had worked before we changed the dataSets, now we had to set it (we set it to 'for each month') but it would then be changed when the report was run dynamically. hmmm&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;The '&lt;em&gt;Average'&lt;/em&gt; function follows these signatures&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;font color="#808080"&gt;Average(field), or Average(field, condFld), or Average(field, condFld, cond), or Average(x).&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000"&gt;The third param 'cond' had to be set to match it's corresponding groups grouping. Now if you go to the group on the report, right click, and go to 'group expert' you can view/change the grouping (Monthly, Annually, etc) but in the formula it's not so clear as what to use. I looked in the actual CR documentation and they actually refer to the wrong thing to use for this (Many peoples posts, blogs etc had complained about CR's documentation) I stumbled accross the correct value to use and the reports save fine now, and also work, even though it's just dummy data that is changed at run time &amp;gt;(&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Oh well... I hope this may help some poor sould out there&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117118441069437494?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117118441069437494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117118441069437494' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117118441069437494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117118441069437494'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/crystal-reports-madness-formulas.html' title='Crystal Reports Madness (Formulas / Datasets)'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117117924130181839</id><published>2007-02-11T00:34:00.000-07:00</published><updated>2007-02-11T00:34:01.516-07:00</updated><title type='text'>Crystal Reports Madness (Orcas)</title><content type='html'>&lt;p&gt;I sat down today to write a blog on some information about&amp;nbsp;Crystal Reports. Little did I know this would turn into 2 blogs.&lt;/p&gt; &lt;p&gt;I downloaded Vista Ultimate from good old MSDN a few months back and&amp;nbsp;everything was working great with it. I had installed Visual Studio 2005 and was able to do some development for work, which HAD worked great. Up until a few weeks ago I hadn't had to many issues with Vista (Except for the Cisco VPN client, which doesn't work with the released version of Vista). Now some of the issues are starting to bleed through. VS2005 crashes, OFTEN,&amp;nbsp;which led me to install the new Orcas (Jan CTP). This worked much better than 2005 so far, minues the WPF support :(&lt;/p&gt; &lt;p&gt;So leading back into the topic of this blog, I loaded up Orcas and opened my work project. I went in and double clicked a report file to refresh me on what I was going to blog about AND..... I got a straight up HEX view of the report! Apparantly that too doesn't work with Orcas... So back to 2005 I go hoping I don't make it mad enought to crash :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117117924130181839?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117117924130181839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117117924130181839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117117924130181839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117117924130181839'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/crystal-reports-madness-orcas.html' title='Crystal Reports Madness (Orcas)'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117096437228419031</id><published>2007-02-08T12:52:00.000-07:00</published><updated>2007-02-08T12:52:52.373-07:00</updated><title type='text'>Protected Internal??</title><content type='html'>&lt;p&gt;So I was writing some code today that I thought was great! I went to show my &lt;a href="http://eberysys.blogspot.com"&gt;Buddy&lt;/a&gt;&amp;nbsp;and he pointed one thing out to me. I had a few methods in a base class marked as &lt;font color="#004080"&gt;protected internal&lt;/font&gt;&lt;font color="#000000"&gt;. He told me "I don't think that's doing what you think it's doing". I was thinking that these methods would only be accessible to inherited members AND members within the same assembly. I guess I just made the assumption since &lt;/font&gt;&lt;font color="#004080"&gt;public static&lt;/font&gt;&lt;font color="#000000"&gt; marks the member as both available to all AND a&amp;nbsp;non instance member.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Anyways I decided to take a look at the good old &lt;a href="http://msdn2.microsoft.com/en-us/library/ms173121.aspx"&gt;msdn&lt;/a&gt;&amp;nbsp;site to see exactly what it says. Basically this says it all "&lt;a&gt;&lt;em&gt;only derived types or types within the same assembly can access that member&lt;/em&gt;&lt;/a&gt;". Notice the keyword "OR" in there. So my members were either available to inherited members OR members within the same assembly.... &lt;/p&gt; &lt;p&gt;But this is not what I wanted.. I wanted what it sounded like! a member that was available ONLY to inherited AND same assembly members! So the quick solution to this was to just mark my class as &lt;font color="#004080"&gt;Internal&lt;/font&gt;&lt;font color="#000000"&gt; and it's members &lt;/font&gt;&lt;font color="#004080"&gt;Protected&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;ex.&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; SameAssemblyClass {&lt;br /&gt;   &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; InheritedMethod() { }&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117096437228419031?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117096437228419031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117096437228419031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117096437228419031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117096437228419031'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/protected-internal.html' title='Protected Internal??'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117069694366836568</id><published>2007-02-05T10:35:00.000-07:00</published><updated>2007-02-05T11:01:05.556-07:00</updated><title type='text'>Orcas, Vista, Linq, WPF, XNA ????</title><content type='html'>&lt;p&gt;So a buddy and I have been wanting to play around with some of the very new and exciting upcoming technologies from Microsoft, well I guess Vista is officially out now. We didn't do a whole lot of research when we began this endeavor, I guess we were just a little excited. So here is the lowdown :)&lt;/p&gt; &lt;p&gt;Vista comes with the new .net 3.5 framework so this was good since Linq and WPF use it. Orcas is the new Visual Studio that will be used to take advantage of all of these new features, so this should be good. Well...... maybe :(&lt;/p&gt; &lt;p&gt;Orcas (Jan CTP) installed without a hitch, and seemed to work pretty good. The first thing we tried to do was play around with Linq. We found the '101 samples' website for Linq and started writing some queries. This was a 'no-go', VS didn't seem to like the syntax. We started to think 'What gives!' so we began our Google searches. Apparently you need to reference the 'System.Core.dll' which is found 'Windows\Microsoft.NET\Framework\v3.5\'.. Whoa.. you think this would be a little more straight-forward since this is a new feature that showcases the new .NET 3 and Orcas. Anyways after some looking around we got it working. It's pretty neat to say the least!&lt;/p&gt; &lt;p&gt;Next was WPF. Orcas didn't come pre-loaded with a WPF template? hmmm. 'Okay there must be a plugin' we thought. The only plugin we could find was for VS2005! This was no good, we wanted to use the new Orcas and the new WPF to write some new applications! Oh well, guess we'll be waiting on that one AND using 2005 for development, bummer.&lt;/p&gt; &lt;p&gt;Last but not least was XNA, surely this must work I mean it's a release version now and VS2005 kinda works with Vista(keep reading for this). Well you still have to have VS2005 Express to use XNA Game Studio Express. So we got this installed and then XNA. Went to load up a pacman style game we've been working on and...... NOTHING! Come to find out, after some more Googling, XNA does NOT work with Vista, double bummer.&lt;/p&gt; &lt;p&gt;Oh and the VS2005 kinda working with Vista well... Even with the SP1 for VS2005, it still has issues. It consistantly crashes at random times, among other small issues. So I guess if you want to play around with WPF, XNA Linq and many of the other new features coming out I would stick with XP and VS2005 for a while, atleast until they get some of this worked out... So I guess we'll revisit this in a couple months ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117069694366836568?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117069694366836568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117069694366836568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117069694366836568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117069694366836568'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/orcas-vista-linq-wpf-xna.html' title='Orcas, Vista, Linq, WPF, XNA ????'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-117046460960267571</id><published>2007-02-02T18:03:00.000-07:00</published><updated>2007-02-02T18:03:29.653-07:00</updated><title type='text'>Google Math. How high can you go¿?</title><content type='html'>&lt;p&gt;Sitting around the office the other day me and 2 of my buddies were talking about regular geek stuff. I brought up the whole 'Can you fold a piece of paper in half more than 7 times' debate. I watched the Mythbusters episode about it the night before. This eventually led to a discussion about Fibonacci. Which then led to a further debate on what the highest number you could achieve using Google.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Can you beat &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=5%5E441&amp;amp;btnG=Search"&gt;this&lt;/a&gt;&amp;nbsp;number??&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-117046460960267571?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/117046460960267571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=117046460960267571' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117046460960267571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/117046460960267571'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2007/02/google-math-how-high-can-you-go.html' title='Google Math. How high can you go¿?'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-116164081948368871</id><published>2006-10-23T16:00:00.000-06:00</published><updated>2006-10-23T16:00:19.536-06:00</updated><title type='text'>Setting a Nullable Enum Through Reflection</title><content type='html'>&lt;p&gt;A colleague and I had recently put together an ORM mapper that uses reflection to set all of our objects dynamically within our application. Things were going great, and it was doing everything we asked of it. It worked with mulitple databases, was much quicker, and easier to use, than some of the other popular ORMs out there.&lt;/p&gt; &lt;p&gt;That was until we ran into a hickup with Nullable Enumerations. With nullable ints, DateTimes etc. it's easy because c# auto box's these for you. But with custom Enum types it can't really do the boxing for you as they're custom types. So with this Enumeration&lt;/p&gt; &lt;p&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;enum&lt;/span&gt; &lt;font color="#0080c0"&gt;Status&lt;/font&gt; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Open,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Closed,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pending,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Waiting&lt;br&gt;}&lt;/p&gt; &lt;p&gt;And this property&lt;/p&gt; &lt;p&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;font color="#0080c0"&gt;Status&lt;/font&gt;? Status;&lt;/p&gt; &lt;p&gt;You could set the property this way&lt;/p&gt;&lt;pre&gt;&lt;font color="#0080c0"&gt;Type&lt;/font&gt; type = t.GetType();&lt;br /&gt;&lt;font color="#0080c0"&gt;PropertyInfo&lt;/font&gt; pi = type.GetProperty("&lt;span style="color: #8b0000"&gt;Status&lt;/span&gt;",&lt;br /&gt;	&lt;font color="#0080c0"&gt;BindingFlags&lt;/font&gt;.Public | &lt;br /&gt;	&lt;font color="#0080c0"&gt;BindingFlags&lt;/font&gt;.IgnoreCase | &lt;br /&gt;	&lt;font color="#0080c0"&gt;BindingFlags&lt;/font&gt;.Instance);&lt;br /&gt;pi.SetValue(t, (&lt;font color="#0080c0"&gt;Status&lt;/font&gt;?)2, &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;But you HAVE to know the type at this point to do this casting. With our ORM tool we use one class that sets ALL of our objects. Some of these may have a nullable Enums, and most will not. So we will never know the type. So... to get around this here is what we ended up doing. (After much searching on the net without any solutions)&lt;/p&gt;&lt;pre&gt;&lt;font color="#0080c0"&gt;Type&lt;/font&gt; propType = pi.PropertyType;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (propType.IsGenericType &amp;amp;&amp;amp; &lt;br /&gt;      propType.GetGenericTypeDefinition()==&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;typeof&lt;/span&gt;(&lt;font color="#0080c0"&gt;Nullable&lt;/font&gt;&amp;lt;&amp;gt;)) {&lt;br /&gt;  &lt;font color="#0080c0"&gt;Type&lt;/font&gt;[] typeCol = propType.GetGenericArguments();&lt;br /&gt;  &lt;font color="#0080c0"&gt;Type&lt;/font&gt; nullableType;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (typeCol.Length &amp;gt; 0) {&lt;br /&gt;     nullableType = typeCol[0];&lt;br /&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (nullableType.BaseType == &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;font color="#0080c0"&gt;Enum&lt;/font&gt;)) {&lt;br /&gt;       &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; o = &lt;font color="#0080c0"&gt;Enum&lt;/font&gt;.Parse(nullableType, "&lt;span style="color: #8b0000"&gt;2&lt;/span&gt;");&lt;br /&gt;       pi.SetValue(t, o, &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;);&lt;br /&gt;     }&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;We first check that the PropertyType is a Generic and that it is a Nullable&amp;lt;&amp;gt; type. Next we generate an array of Types, and then we get the first item in that collection (Which will be the Custom Enumeration type).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Next we check that the baseType is a type of Enumeration (Just another check). Then we make a new object, because we don't know the type, using the Enum.Parse where we pass in the Type and the value, which could be an int.toString or whatever. Then finally we use the PropertyInfo.SetValue method where the first 2 params are objects. Since everything is set and we have the custom type of the nullable enum we can now set this property of our object dynamically at run time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-116164081948368871?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/116164081948368871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=116164081948368871' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/116164081948368871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/116164081948368871'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2006/10/setting-nullable-enum-through.html' title='Setting a Nullable Enum Through Reflection'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-116007186757047003</id><published>2006-10-05T12:11:00.000-06:00</published><updated>2006-10-06T09:11:43.830-06:00</updated><title type='text'>:: Operator</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-family:Times New Roman;font-size:180%;"&gt;The namespace alias qualifier operator.&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;I ran across this operator for the first time the other day in a c# application (an XNA app, pretty cool stuff :) ). Anyhow, it looked like some c / objective c code at first to me. I'd never seen this used in c# before.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Basically here's what it does, with a not so elegant example:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;(Here's a class that belongs to an ungodly deep namespace)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;namespace &lt;span style="color:#000000;"&gt;some.really.big.nested.namespac {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="color:#0000ff;"&gt;public &lt;/span&gt;&lt;span style="color:#0080c0;"&gt;SomeClass&lt;/span&gt;&lt;span style="color:#000000;"&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;public enum &lt;span style="color:#0080ff;"&gt;&lt;span style="color:#0080c0;"&gt;Number&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;small,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;medium,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;large&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;(Here's a class that needs to use the above class, but this class also has a method with the same name as the above class name)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;namespace &lt;span style="color:#000000;"&gt;smallNamespace {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;class &lt;span style="color:#0080c0;"&gt;SomeOtherClass &lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;&lt;span style="color:#0000ff;"&gt;public void &lt;/span&gt;&lt;span style="color:#000000;"&gt;Number(&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; size) {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt;((&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;)some.really.big.nested.namespace.&lt;span style="color:#0080c0;"&gt;Number.&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;small == size)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;&lt;span style="color:#0080c0;"&gt;// do something&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Now that is pretty ugly stuff..&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;In a large project you may end up with a situation where a class name in one namespace is used in another namespace as a field, method etc. In which case you would have to use the fully qualified name to let the compiler know which 'thing' your talking about.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Now here is a better way to do this, it shrinks down your code, and is easy to understand:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;namespace &lt;span style="color:#000000;"&gt;smallNamespace {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;using &lt;span style="color:#000000;"&gt;bigNameSpace = some.really.big.nested.namespac;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#0000ff;"&gt;class &lt;span style="color:#0080c0;"&gt;SomeOtherClass &lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;&lt;span style="color:#0000ff;"&gt;public void &lt;/span&gt;&lt;span style="color:#000000;"&gt;Number(&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; size) {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt;((&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;)bigNameSpace::&lt;span style="color:#0080c0;"&gt;Number.&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;small == size)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;&lt;span style="color:#0080c0;"&gt;// do something&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Create a namespace alias with the using statement.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;the '::' is placed between the two identifiers, and invokes a different lookup for the item.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Another common use of this variable is for the global namespace&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;color:#000000;"&gt;"global::Console.WriteLint("Hello World");"&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-116007186757047003?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/116007186757047003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=116007186757047003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/116007186757047003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/116007186757047003'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2006/10/operator.html' title=':: Operator'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535147.post-115893827690213177</id><published>2006-09-22T09:17:00.000-06:00</published><updated>2006-09-22T09:17:56.903-06:00</updated><title type='text'>1st post</title><content type='html'>Hello world&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535147-115893827690213177?l=juztinwilzon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://juztinwilzon.blogspot.com/feeds/115893827690213177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535147&amp;postID=115893827690213177' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/115893827690213177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535147/posts/default/115893827690213177'/><link rel='alternate' type='text/html' href='http://juztinwilzon.blogspot.com/2006/09/1st-post.html' title='1st post'/><author><name>Justin Wilson</name><uri>http://www.blogger.com/profile/10544675035891680117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
