Archive

Archive for the ‘Tips’ Category

Webkit CSS Quirk aka Feature (Affects Chrome4/5, Safari 4+)

April 9th, 2010

I ran in to a weird rendering issue with Chrome 4/5 and Safari 4 this week. The debug tools of both browsers provided no hints as to the issue other than the fact that it wasn’t rendering the style sheets at all. Here’s the catch though, it was only a problem when accessing the domain in question without the www. prefix.

Then it dawned on me, our style sheets are loaded via the www. path. So I duplicated the style sheet linkage for both situations and presto! it works. From what I can tell this looks to be a new security feature of webkit. Looks like one of the web servers had the mime type for text/css borked and since it was loading from an alternative domain it freaked out.

The summer TODO list grows larger…

Author: admin Categories: Tips Tags:

Showing a “Message” While Performing a Task in C++

July 8th, 2009

It took me a few minutes to figure this one out, a simple MessageBox won’t do as that’s a blocking call. Then I stumbled upon this old msdn blog article:
http://blogs.msdn.com/oldnewthing/archive/2006/09/25/770536.aspx.

Basically I had a requirement for a certain project to display some sort of progress message to the end user while performing complicated logic that could take 10seconds to a couple minutes and this had to be done from within a replacement GINA for WinXP. The above article was of extreme help in understanding the way message passing works in Win32.

DialogBox (with reference to the callback function)

  • callback function.
  • show message window do all my work here.
  • then call EndDialog to return to the previous function.
Author: admin Categories: Code Snippets, Tips Tags:

MySQL .net Connector + GoDaddy Shared Hosting

May 5th, 2009

It’s been a while since I’ve messed around with asp.net web.config files. Here’s a tip for anyone trying to use the mysql connector with asp.net. You need to add the following to your web.config or it will bitch to you about trust levels.


  <system.data>
    <DbProviderFactories>
      <clear />
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
           description=".Net Framework Data Provider for MySQL"
           type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,
             Version=6.0.2.0, Culture=neutral,
             PublicKeyToken=c5687fc88969c44d" />
    </DbProviderFactories>
  </system.data>

GoDaddy has modified their medium trust environment to use the connector. All new connectors are compiled to accept partially trusted callers. It is important to note that the version in your web.config must match the version of the connector DLL.

Author: admin Categories: Code Snippets, Tips Tags: ,