2011 Jul 26, 10:00Opera has stats on what an 'average' web page looks like it in terms of HTML elemenets and attributes used etc.webdevelopmenthtmlstatisticstechnicalopera
2011 Jul 6, 7:28"Over this past Fourth Of July weekend, we neglected to note that it was the 15th anniversary of Roland Emmerich’s 1996 blockbuster Independence Day. New York comedian Sean Kleier remembered, and
decided to make his own tribute, going to various locations around New York City—Times Square, the Brooklyn Bridge, the subway, and inside a Victoria’s Secret—reciting Bill Pullman’s rousing speech
before the movie's final battle sequence, megaphone and all." humorvideobill-pullmanindependence-daynew-york
2011 Jul 4, 4:05Just watched the Dusty 45s play the Seattle New Years event. You must enjoy the flaming trumpet! And that's a literal flaming trumpet - check out 4:05: musicrockabillyswingbandsvideoyoutubeseattledusty-45s
2011 Jul 1, 10:12" Historically, protocol designers and implementers distinguished
between "standard" and "non-standard" parameters by prefixing the
latter with the string "X-". On balance, this "X-" convention has
more costs than benefits, although it can be appropriate in certain
circumstances."prefixtechnicalstandradrfcuriurlx-
2011 May 23, 4:26Applying CORS to the media elements: "I've added a content attribute to <img>, <video>, and <audio> that makes the image or media resource be fetched with CORS And have the origin
of the page if CORS succeeded. The attribute is "cross-origin" and it has two allowed values, "use-credentials" and "anonymous". The latter is the default, so you can just say <img cross-origin
src="data.png">."corscrossdomainwebbrowserwebbrowserhtmltechnical
2011 Apr 8, 2:32"Since writing lock-free code is issuch a headache-inducer,you're probably best off making some other people suffer the headachesfor you. And those other people are the kernel folks, who have
developedquite a few lock-free building blocks so you don't have to. For example, there's a collection of functions for manipulatinginterlocked lists.But today we're going to look at theone-time
initialization functions."technicalwindowsprogrammingraymond-chenlockthread-safety
For my GeolocMock weekend project I intended to use the Bing Maps API to display a map in a WebBrowser control and allow the user to
interact with that to select a location to be consumed by my application. Getting my .NET code to talk to the JavaScript in the WebBrowser control was surprisingly easy.
To have .NET execute JavaScript code you can use the InvokeScript method passing the name of the JavaScript function to execute and an object array of parameters to pass:
this.webBrowser2.Document.InvokeScript("onLocationStateChanged", new object[] { latitudeTextBoxText, longitudeTextBoxText, altitudeTextBoxText, uncertaintyTextBoxText });
The other direction, having JavaScript call into .NET is slightly more complicated but still pretty easy as far as language interop goes. The first step is to mark your assembly as ComVisible so
that it can interact with JavaScript via COM. VS had already added a ComVisible declaration to my project I just had to change the value to true.
[assembly: ComVisible(true)]
Next set ObjectForScripting attribute to the object you want to expose to JavaScript.
Now that object is exposed as window.external in JavaScript and you can call methods on it.
window.external.Set(lat, long, alt, gUncert);
However you don't seem to be able to test for the existence of methods off of it. For example the following JavaScript generates an exception for me even though I have a Set method:
I've made two simple command line tools related to the console window and Win7 jump lists. The source is available for both but neither is much more than the sort of samples you'd find on MSDN
=).
SetAppUserModelId lets you change the Application User Model ID for the current console window. The AppUserModelId is the value Win7 uses to group together icons on the task bar and is what the
task bar's jump lists are associated with. The tool lets you change that as well as the icon and name that appear in the task bar for the window, and the command to launch if the user attempts to
re-launch the application from its task bar icon.
SetJumpList lets you set the jump list associated with a particular AppUserModelId. You pass the AppUserModelId as the only parameter and then in its standard input you give it lines specifying
items that should appear in the jump list and what to execute when those items are picked.
I put these together to make my build environment easier to deal with at work. I have to deal with multiple enlistments in many different branches and so I wrote a simple script around these two
tools to group my build windows by branch name in the task bar, and to add the history of commands I've used to launch the build environment console windows to the jump list of each.
2010 Sep 24, 3:00You'd imagine that putting the folks from the funny podcast The Nerdist onto the funny podcast Doug Loves Movies would be even funnier still -- and you'd be correct: 'Doug welcomes his podcast
brethren Chris Hardwick, Jonah Ray and Matt Mira of "The Nerdist" to the show.'humorpodcastchris-hardwickdoug-bensondoug-loves-movies
2010 Aug 13, 11:46RESTful machine learning API from Google... "The Prediction API implements supervised learning algorithms as a RESTful web service to let you leverage patterns in your data, providing more relevant
information to your users. Run your predictions on Google's infrastructure and scale effortlessly as your data grows in size and complexity."restaigoogleprogramminganalysismachine-learningdevelopmenttechnical
2010 Jul 5, 4:23Cross-site scripting attack on YouTube over the weekend: "That turned out to be as simple as using two script tags in a row (<script><script>fun scripting stuff goes here!), as noted by
F-Secure researcher Mikko H. Hypponen on Twitter—the first of the two tags would get stripped, and the second was allowed through."technicalyoutubesecuritycross-site-scriptingjavascript