vs page 3 - Dave's Blog

Search
My timeline on Mastodon

"The 'about' URI Scheme" - Lachlan Hunt, Mykyta Yevstifeyev

2011 Oct 17, 5:58
Essentially anybody can resolve it however they like except for tokens from the about URI special token registry which currently only contains 'blank'.
PermalinkCommentstechnical

Tesla vs Edison T-Shirt from Monsters of Grok

2011 Aug 31, 10:03Awesome shirt of Tesla/Edison in the style of the AC/DC logo.
PermalinkCommentsscience humor electricity tesla edison tshirt shirt wishlist

_opt Mnemonic

2011 May 24, 11:00

​I always have trouble remembering where the opt goes in SAL in the __deref_out case. The mnemonic is pretty simple: the _opt at the start of the SAL is for the pointer value at the start of the function. And the _opt at the end of the SAL is for the dereferenced pointer value at the end of the function.






SAL foo == nullptr allowed at function start? *foo == nullptr allowed at function end?
__deref_out void **foo No No
__deref_opt_out void **foo Yes No
__deref_out_opt void **foo No Yes
__deref_opt_out_opt void **foo Yes Yes
.
PermalinkCommentssal technical programming

JavaScript & .NET interop via WebBrowser Control

2011 Apr 5, 10:00

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.

this.webBrowser2.ObjectForScripting = this.locationState;

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:

if (window.external && window.external.Set) {
PermalinkCommentsjavascript webbrowser .net technical csharp

Mind vs. Machine - Magazine - The Atlantic

2011 Feb 17, 1:01Brian Christian on his involvement in the 2009 Turing Test and his goal of winning Most Human Human.PermalinkCommentshistory ai science

Windows 7 Accelerator Platform COM / C# Interop

2010 Aug 20, 11:20

For a new project I'm working on involving IE's installed Accelerators and OpenSearch search providers via the Windows 7 Accelerator Platform, I've created a C#/COM interop class for those APIs.

Download the osinterop.cs interop file here.

PermalinkCommentstechnical accelerator csharp com

Damn, Tourists! « Burrito Justice

2010 Jun 7, 2:40Maps of where tourists vs locals take photos in major cities like New York, San Francisco, etc. based on geotagged photos on Flickr.
PermalinkCommentsgeolocation geo geography map flickr photo tourist technical visualization

Fake electronic gear props - Boing Boing

2010 Mar 9, 5:26I have often wondered where furniture stores get their fake TVs, PCs, etc. Yes, apparently there is a store where they buy that. Now about the chotchkies in Applebees or Red Robin...PermalinkCommentselectronics fake tv pc store purchase

January 2010: Android Handset Mix « Myxer's BoomBox Report

2010 Mar 5, 6:06iPhone vs Android adoption per state and per gender. Apparently I'm out of my demographic with my G1.PermalinkCommentsandroid apple iphone g1 statistics cellphone google

Thought Experiments and Design Principles

2010 Jan 29, 3:54

Raymond Chen has some thought experiments useful for discovering various kinds of stupidity in software design:

Tim Berners-Lee's principles of Web design includes my favorite: Test of Independent Invention. This has a thought experiment containing the construction of the MMM (Multi-Media Mesh) with MRIs (Media Resource Identifiers) and MMTP (Muli-Media Transport Protocol).

The Internet design principles (RFC 1958) includes the Robustness Principle: be strict when sending and tolerant when receiving. A good one, but applied too liberally can lead to interop issues. For instance, consider web browsers. Imagine one browser becomes so popular that web devs create web pages and just test out their pages in this popular browser. They don't ensure their pages conform to standards and accidentally end up depending on the manner in which this popular browser tolerantly accepts non-standard input. This non-standard behavior ends up as de facto standard and future updates to the standard essentially has had decisions made for it.

PermalinkCommentstechnical design principles software development

Coding Horror: You're Reading The World's Most Dangerous Programming Blog

2010 Jan 20, 8:28GZip vs Deflate execution speeds. Deflate found to be much faster in particular cases and about the same in the rest.PermalinkCommentsgzip deflate performance technical http compression programming development blog

50 First-class & New Downloadable Fonts For Professional Designs » DevSnippets

2010 Jan 19, 1:49Fonts are back in! "In this collection, we’d like to present an overview of 50 of the best Free, New and High-quality Modern, Handwritten, grunge, Cartoon style fonts for clean and professional designs in 2009."PermalinkCommentsfont typography text download design free

Make: Online : Hack the box to get to the phone

2009 Dec 31, 4:40"Nokia has been struggling a bit this year, but this "hack it" to get your phone unboxing is pretty interesting. Once you "root" the box it opens up and a little puff of smoke appears, along with your phone (if you're a phone / gadget reviewer)." Makes me wonder how many devs and engineers they had working on the box to contain this phone.PermalinkCommentsphone video cellphone hack

Big Lebowski vs Lost: Dude (YouTube Doubler)

2009 Dec 17, 12:06The Waxy list of supercuts (http://waxy.org/2008/04/fanboy_supercuts_obsessive_video_montages/) is ripe material for YouTube Doubler. For instance, I simply pop in Big Lebowski dude montage and Lost dude montage and...PermalinkCommentshumor dude tv movie big-lebowski lost

Framing « Experimental Turk

2009 Dec 3, 1:54Uses Amazon's mechanical Turk program to test framing: "Framing the outcomes in positive vs. negative terms produced a reversal of participants’ preferences for the two programs. In condition 1, the majority of respondents (69.4%) favored Program A, exhibiting risk aversion. In condition 2, the majority of respondents (65.3%) favored Program B, exhibiting risk seeking."PermalinkCommentsvia:pskomoroch science experiment social risk security mechanicalturk amazon

RFC battle: Browsers vs. programming languages - cat /dev/random | grep security -

2009 Nov 25, 7:09Relative URI resolution differences in browsers vs programming language libraries.PermalinkCommentsvia:ericlaw url uri rfc web browser programming dotnet java technical

Sense and Reference on the Web

2009 Oct 30, 10:33"What does a Uniform Resource Identifier (URI) mean? Does it have a sense, and can it refer to things?" I hope it will cover some of the new scheme vs always HTTP scheme and distinct vs not distinct URLs for a real world object and its web page perma-arguments.PermalinkCommentsvia:connolly url uri w3c semanticweb http todo technical

ginger's thoughts » URI fragments vs URI queries for media fragment addressing

2009 Sep 11, 8:39"In the W3C Media Fragment Working Group (MFWG) we have had long discussions about the use of the URI query (”?”) or the URI fragment (”#”) addressing approach for addressing directly into media fragments, and the diverse new HTTP headers required to serve such URI requests, considering such side conditions as the stripping-off of fragment parameters from a URI by Web browsers, or the existence of caching Web proxies."PermalinkCommentsfragment uri via:connolly media url query http http-header

HTML vs. XHTML - WHATWG Wiki

2009 Sep 10, 6:42"Although HTML and XHTML appear to have similarities in their syntax, they are significantly different in many ways."PermalinkCommentshtml html5 xml xhtml whatwg wiki technical

Fight Against 1-day Exploits: Diffing Binaries vs Anti-diffing Binaries

2009 Aug 24, 9:52Notes on how bin diff'ing tools work and thoughts on defeating them. "We call the threat "1-day exploits". Just few minutes after the release of patches, binary diffing technique can be used to identify the vulnerabilities that the security patches are remedying."PermalinkCommentsexploit security binary diff tool research technical system:filetype:pdf system:media:document
Older EntriesNewer Entries Creative Commons License Some rights reserved.