The new Location bar in Firefox 3.x will, by default, take any non-URL input and:

  1. If it’s a single word (no spaces): first attempt to prepend “www.”, and/or append “.com”, then lookup in OpenDNS to see if this makes a valid server name - if so, you are automatically redirected to this found server
  2. If there is a space: it is assumed this is a search phrase, so the the input is passed (by default) to Google’s Browse By Name service. This works similarly to a standard Google web search, however if the search phrase is associated with an “authoritative” server (as deemed by Google), you are automatically redirected to this server (similar to an I’m Feeling Lucky search).

To disable these behaviors, resulting in similar functionality to Google Chrome’s address bar, just make a couple changes in Firefox’s hidden about:config settings (that is, type “about:config” in the address bar and hit Enter):

  1. Change the value of “browser.fixup.alternate.enabled” to false
  2. Change the value of “keyword.URL” to
    http://www.google.com/search?q=

    Note that there is nothing after the equal sign.

This appears to work up through Firefox 3.5b4.

I’ve had one particular network printer (installed on a local TCP/IP port) that has been incredibly slow since we’ve had it installed: it seems to be some bottleneck with the process of communicating with the printer in general, since even opening the printer properties window (or switching tabs within that window) can take 5-10 seconds, and sending over a print job generally hangs the sending application for a similar amount of time. However, pings are fine (<1ms), and two other network printers configured similarly work just fine, and I've exhausted most other possibilities (cabling, network hardware, port settings) for solving the issue.

However, it appears to be an odd bug in Windows, the workaround for which may not work in all cases, but seems to fix this issue. I had the printer installed on a local TCP/IP port (it has a built-in print server with a static IP), but by following this advice, I assigned the NetBIOS name for the printer to an unused LPT port at a command prompt:

net use LPT2 \\printserver\printername

And then, in the printer’s Properties window, under the Ports tab, I changed the port from the TCP/IP port I had originally used to LPT2.

Voila - instant fix.

IE 6 and 7 can be a nightmare for debugging Javascript, especially after working with the quality tools available for other browsers such as Firebug for Firefox. However, one small step in the right direction would be the ability to View Source for the currently rendered page, after Javascript has been executed (since typically the View Source command displays the source code as it was sent by the server, prior to any script execution).
Read the rest of this entry »

Run the following from a command prompt or batch file:

@echo|find /I /V "echo" > file.txt

Most other, more straightforward techniques will result in a file size greater than zero bytes (usually containing spaces, linefeeds, or other less-than-obvious text).

Dead Space (PC) tweaks

November 14th, 2008

Since I’ve found this game is frustrating many users (myself included) with its tendency to force your mouse to work like a console game controller, among other things, I did some digging to overcome some of the issues I was having.

  • Very sluggish mouse input: Disable v-sync in the game options. You might still be able to force v-sync in your video driver configuration (see here for Nvidia driver) to eliminate tearing.
  • Mouse input too slow / “swimmy”: You can only increase the mouse sensitivity so far in the game options, but if that’s still not sensitive enough for you, try editing the setting manually in the config file. Open the file called config.txt in this folder under Windows XP:
    C:\Documents and Settings\<YOUR USER NAME>\Local Settings\Application Data\Electronic Arts\Dead Space

    or this folder under Vista:

    C:\Users\<YOUR USER NAME>\Local Settings\Application Data\Electronic Arts\Dead Space

    Look for a setting for Control.MouseSensitivity - this only goes up to 1.0 from the in-game options menu, but you can theoretically set it quite a bit higher. I currently have it set to 2.0, which is a pretty decent improvement. Note: setting this too high will make the mouse much too sensitive in the in-game menus, so turn it up slowly and experiment.

  • Brightness too high even at lowest setting: this one can also be tweaked in the config file above. The setting is called Window.Gamma - the in-game brightness adjustment only sets this as low as 0.0, but apparently it can go negative. Currently I have it set to -0.5, and it looks much more creepy and atmospheric.

Hopefully EA will patch the claustrophobic, controller-esque feeling of the mouse at some point in the future, but otherwise these settings make a huge improvement over the out-of-the-box experience.

Stable quicksort in Javascript

October 28th, 2008

Firefox < v3.0 doesn't have a stable Array.sort() function - that is, it doesn't maintain indexes for elements of equal value. This is undefined in the ECMA spec, and has been fixed in Firefox as of version 3 (and curiously enough has been stable in IE all along). As a result, I set out to find a stable, efficient Array.sort() replacement/supplement.
Read the rest of this entry »

Typically, using SELECT in a subquery to perform an UPDATE on the same table, such as:

UPDATE table1 AS target
SET field1 = (
    SELECT field2
    FROM table1 AS source
    WHERE source.id = target.id
)

is illegal in MySQL. To achieve the desired effect, you can perform an INNER JOIN in the UPDATE:

UPDATE table1 AS target
INNER JOIN table1 AS source USING(id)
SET target.field1 = source.field2

Cache control is a potentially hit-and-miss pursuit, but the most reliable and straightforward method I’ve found (that works for IE 6+ and Firefox), although it relies on access to your Apache server configuration, is simply setting Cache-Control headers manually.
Read the rest of this entry »

(Lifted from http://www.vistax64.com/tutorials/70819-windows-explorer-folder-view-settings.html)

Vista Explorer, by default, tries to determine what type of folder you’re viewing based on its contents, and may dramatically (and seemingly unpredictably) change the folder’s view settings: Details view, or List view, or Thumbnails view, etc., as well as applying Grouping, adding or removing visible columns, and so on. To disable this behavior, and have all folders work more like XP Explorer, do the following:

  1. Delete existing folder type customizations in the registry: Open regedit.exe, and navigate to:
    HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell

    Delete the keys Bags and BagsMRU.

  2. Add new registry setting to enable common behavior: Still in Registry Editor, under the same Shell key (above), create a series of new keys: Bags, then within that AllFolders, then within that another Shell, to end up with this:
    HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell

    Inside the last Shell key, create a new string value named FolderType, with a value of NotSpecified.

    Reboot or logoff and back on again to make these changes take effect.

  3. Make changes to Vista Explorer’s view settings: In Explorer, open the Tools menu (if you don’t see the menus, hit the Alt key to temporarily display them, or click Organize->Layout and put a check next to Menu Bar), and click Folder options. Set these as you like them, paying special attention to the option Remember each folder’s view settings - if this is unchecked, and you click the Apply to Folders button at the top of the window, all folders will behave exactly the same.

When you need to update Internet Explorer on a computer without internet access (yes, it can happen):

http://support.microsoft.com/?kbid=257249

You have to jump through hoops, but it works. Just be careful with the syntax (there really are 3 quotes at the end of the command - good ol’ MS engineering ;).

NOTE: You will be asked a few times throughout this initial download process, “Are you sure you want to install/run this software?” Don’t be alarmed, the installer won’t actually run at this point, it will simply continue downloading more components. When it completes, it will explicitly tell you that the components have completed downloading, and to run ie6setup.exe in the download folder you specified to begin installation.