Archive for January, 2006

Greasemonkey Scripts – How to Configure

Friday, January 13th, 2006

You can see all the stored configuration values by visiting about:config and filtering on greasemonkey.scriptvals.

I found this answer on this Dive into Greasemonkey website.

[tags]Greasemonkey,javascript,Firefox,Greasemonkey Configuration[/tags]

Excel – a Formula To Count the Number of Occurrences of a String in a Cell

Wednesday, January 11th, 2006

Short answer:

=LEN(cell_ref)-LEN(SUBSTITUTE(cell_ref,"a",""))

Long Answer:

Isn’t it strange that there is no formula built into Excel like “instr” or “contains”? The “Search” and “Find” formulas just return a #Value error if they don’t find a string. So believe it or not you are forced to use the above formula to determine whether a cell contains some text.

This Microsoft page explains lot of other similiar formulas such as counting the number of occurances of a string in a range of cells.
This page is where I found my answer above.

[tags]Excel, Excel Formulas, instr, workaround[/tags]

QuickBooks – How to Run an Integrated Program as a Scheduled Task When No One Logged In

Tuesday, January 10th, 2006

Quick Answer:

Don’t!

Figure out a way to stay logged instead. You can leave yourself or some other user logged in at the console, or you can even log in under terminal services but just don’t log out. (Closing terminal services is ok.)

What if the computer automatically logs you out after a set period of inactivity? See this post which does work in windows XP as well.

Sorry this is sucky from a security perspective but here’s why you have to do it:
The long answer:
(more…)

AWStats – How is the Add To Favorites (Estimated) Feature Calculated?

Monday, January 9th, 2006

Quick Answer:
A quote from the AWStats glossary:

Add To Favourites:
This value, available in the “miscellanous chart”, reports an estimated indicator that can be used to have an idea of the number of times a visitor has added your web site into its favourite bookmarks.
The technical rules for that is the following formula:
Number of Add to Favourites = round((x+y) / r)
where
x = Number of hits made by IE browsers for “/anydir/favicon.ico”, with a referer field not defined, and with no 404 error code
y = Number of hits made by IE browsers for “/favicon.ico”, with a referer field not defined, with or without 404 error code
r = Ratio of hits made by IE browsers compared to hits made by all browsers (r < = 1)

As you can see in formula, only IE is used to count reliable "add", the "Add to favourites" for other browsers are estimated using ratio of other browsers usage compared to ratio of IE usage. The reason is that only IE do a hit on favicon.ico nearly ONLY when a user add the page to its favourites. The other browsers make often hits on this file also for other reasons so we can't count one "hit" as one "add" since it might be a hit for another reason.
AWStats differentiate also hits with error and not to avoid counting multiple hits made recursively in upper path when favicon.ico file is not found in deeper directory of path.
Note that this number is just an indicator that is in most case higher than true value. The reason is that even IE browser sometimes make hit on favicon without an "Add to favourites" action by a user.

(more…)

Adhesive Plugin – Styling not working

Monday, January 9th, 2006

The Adhesive WordPress Plugin lets you mark certain posts as “sticky” so that they always stay at the top of your website. I think this is particularly useful for providing an introduction to a blog, or it would help you to use WordPress as a more of a content management system than a blogging platform. For example your front page content appears at the top of your website, and then all of the blog posts under that appear like news updates perhaps.

The problem I was having was that it was not adding an “adhesive_post” class correctly to the entry that was sticky. It seemed to be wrapping my entire website in that class.
(more…)