EndNote Add-In Causes Microsoft Word 2010 To Crash

Microsoft Word kept crashing on me and I couldn’t figure out why. The culprit: EndNote!

To disable the EndNote add-in:

  1. Go to File -> Options.
  2. Click Add-Ins.
  3. At the bottom of the screen, select “Actions” in the Manage dropdown box. Click “Go.”
  4. Uncheck the box next to “EndNote.”
  5. Click OK.
  6. Close and restart Word.

I’m not sure what the conflict is between EndNote and Word 2010 (because it worked fine with Word 2007), but at least Word 2010 runs now.

Firefox Private Browsing Causes ‘Script Panel was inactive during page load’ Message in Firebug

I recently upgraded to the new version of the Firebug plugin on Firefox. When I did, every time I brought up the Firebug Scripts panel it displayed the same message: “Script Panel was inactive during page load.”

I would click the button to “Activate Firebug for the selected tab”, and the page would refresh, but I would then see the same Script Panel message as before.

After some searching on the interwebs I found out it was because I had Private Browsing enabled in Firefox. I didn’t even realize it; I had set it to not remember or keep any history but Firefox treats that setting as a private browsing session.

Once I disabled the Private Browsing feature in Firefox, my Firebug Scripts panel worked again.

jQuery Breaks ASP.NET MVC Action Parameters

After upgrading to jQuery 1.4 my jQuery posts that passed in parameters to my MVC actions started failing. I noticed that “[]” was being appended to the parameters.

Instead of this:

It looked like this:

Turns out it had to do with how 1.4 serialized parameters. You can read more about it at the posts below. To fix it, I added this globally on the page for now:

// Enables for all serialization
.jQuery.ajaxSettings.traditional = true;


jQuery 1.4 breaks ASP.Net MVC actions with array parameters

Change Web Root Path for XAMPP on Windows

I had an existing XAMPP install on a shared location that I wanted to access using a laptop with its own local XAMPP install. I didn’t want to do any heavy lifting with the laptop, just wanted to access the web files on the shared server through the laptop’s localhost.

I also didn’t want to relocate the entire XAMPP folder on my laptop, so I instead modified the httpd.conf file on my local XAMPP install to point to the web root of the remote XAMPP install.

Here’s what I did:

  1. Locate httpd.conf file on my local XAMPP install: C:\xampp\xampp\apache\conf\httpd.conf
  2. Edit the “DocumentRoot” line to the location of the remote \htdocs folder. I changed mine from:
    “C:/xampp/xampp/htdocs” to “C:/Users/Ann/Documents/My Dropbox/Dev/Xampp/xampp/htdocs”
  3. Edit the “Directory” tag to the same remote location you set for DocumentRoot. My Directory tag looked like Directory “C:/Users/Ann/Documents/My Dropbox/Dev/Xampp/xampp/htdocs”
  4. Save the file and restart your local Apache server.
  5. Navigate to “http://localhost/” in your browser and you should see the remote web site files.

Enable curl with XAMPP on Windows

Location the directory where XAMPP is installed. For me, it was the default location at C:\xampp\xampp.

Open the following file: C:\xampp\xampp\php\php.info

Uncomment (by removing the semicolon) the following line:


Save the file and restart your Apache server.

Convert an Array of Objects to a List, Then Sort the List

I recently had to build a page that consumed a web service returning data in an array of custom objects. The array was sorted by ID, while I needed to display it sorted alphabetically by name.

First, I had to convert the array of objects to a list:

CustomObject[] objectArray;

objectArray = fancyWebServiceFunction();

System.Collections.Generic.List objectList = new System.Collections.Generic.List(objectArray);

Then I sorted the list:

  objectList.Sort(delegate(CustomObject o1, CustomObject o2)
     return o1.ObjectName.CompareTo(o2.ObjectName);

IE6 Emulator

IE6 puts the “p” in PAIN but unfortunately I still have to make pages play nicely with it. I’ve been looking for an easy way to fully test on IE6 (not just create and view screenshots).

IETester to the rescue! Sure it’s one of the old, “desktop” applications but it’s no more a behemoth than IE6 itself, right?

It works like a champ, BTW.

Download IETester for Free

Finding Difference Between Dates in Javascript

This snippet of code lets you determine the difference (in weeks, days, hours, minutes, or seconds) between two dates. For the example below I’m using the current date as one of the two.

var future = new Date("01/01/2020");
var today=new Date();

var weeks = 1000 * 60 * 60 * 24 * 7;
var days = 1000 * 60 * 60 * 24;
var hours = 1000 * 60 * 60;
var mins = 1000 * 60;
var secs = 1000;

var diffWeeks = Math.ceil((today.getTime()-future.getTime())/(weeks));
var diffDays = Math.ceil((today.getTime()-future.getTime())/(days));
var diffHours = Math.ceil((today.getTime()-future.getTime())/(hours));
var diffMinutes = Math.ceil((today.getTime()-future.getTime())/(mins));
var diffSeconds = Math.ceil((today.getTime()-future.getTime())/(secs));

Get Visitor’s IP Address in PHP

I used this snippet for a numberswiki.com

geolocation script.


Set and Read Cookies in PHP/Smarty

To set a cookie:
setcookie(‘TestCookie’,’testvalue’, time()+3600, ‘/’);

Function definition:
setcookie(“TestCookie”, $value, time()+3600, more info

“/”, “.example.com”, 1);

To read a cookie:
echo ‘Hello ‘.$_COOKIE[‘TestCookie’];

© Copyright 2009-2010 Alpha Papa Hotel . Thanks for visiting!