Category Archives: Code

The Power of the Mind, sometimes mine.

IE 6 Death Watch gets a Funeral Service and at least a few more Nails in it’s coffin

Part 2.
Six Months ago I declared One Year to Go on the IE 6 Deathwatch
In the beginning of this year it was disclosed that Google (as well as and 20+ other companies) had been the victim of Chinese cyber attack, attackers called the operation “Aurora” . Microsoft had admitted that Explorer was used [...]

Also posted in Web | Leave a comment

different behavior for Prototype JavaScript childElements() in FF and IE

Or now to lose the rest of one’s limited hair    …. I’ve come across a “doesn’t work as expect” issue while working in Prototype 1.6.0.2 JavaScript framework (”Easy Ajax and DOM manipulation for dynamic web applications” for sure!)
1$(’someIdName’).parentNode.childElements()
works fine in FireFox (v3) but not in Internet Explorer ( v6), in particular it seems [...]

Also posted in Ajax, JavaScript, Web | 1 Comment

Agile Web Development with Rails, erratum

from the Agile Web Development with Rails, Third Edition. (fourth printing), in Chapter 8.3 iteration C2: Creating a Smarter Cart (page 104), when creating the initial CartItem model class, the price function is defined thusly :
123    def price
      @product.price = @quantity
    end
Unfortunately that sets the price to the number of items [...]

Also posted in Ruby and Rails | Leave a comment

a GreaseMonkey script for Follow Rank and Follows in Common for Twitter User Profiles

I’ve released a GreaseMonkey script Follow Rank and Follows in Common for Twitter User Profiles which you can use to display the Follows in Common and the Follow Rank for a given users profile page and discover how important they are in your Twitter Social Network.
Similar in aim to FaceBooks “friends in common”, adjusted [...]

Also posted in GreaseMonkey, JavaScript, Social Networking, Web | 1 Comment

Using GreaseMonkey’s persistent data functions as a aged Cache, revised.

In eating my own dog food I have revised, corrected, improved and fixed the code I posted last week. The biggest changes are related to ensuring that all that cached data does not just accumulate and never gets cleared away.
Values set using the “GM_setValue” function are saved in the Firefox preferences back end and [...]

Also posted in Ajax, GreaseMonkey, JavaScript, Web | Leave a comment

Use GreaseMonkey’s persistent data functions as a aged Cache.

GreaseMonkey (Don’t know that GreaseMonkey is the greatest thing since slice bread? See Greasemonkey) has two persistent data function’s, GM_setValue and GM_getValue, which let you set and get values. See Mark Pilgrams excellent Dive Into Greasemonkey : Storing and retrieving persistent data for more details. (even better, go to GreaseSpot and it’s api [...]

Also posted in GreaseMonkey, JavaScript | Leave a comment

JavaScript Function to get the Intersect of 2 Arrays

In mathematics, the intersection (denoted as ∩) of two sets A and B is the set that contains all elements of A that also belong to B.
I needed the javascript array equivalent, so that given an array A = ["a","b","c", "d"] and B = ["b", "d", "e"], getIntersect(A, B) = ["b", "d"]
123456789101112function getIntersect(arr1, arr2) [...]

Also posted in JavaScript, Web | 1 Comment

False Positives on Planet Lotus

Once upon a time, 2006, there was “Show ‘n Tell Thursdays – A Project Of The Lotus Notes And Domino“, and the SNTT tag is still used, but Planet Lotus is where the action is now, an aggregation of Lotus related blogs and news.
Recently False Positives was accepted for inclusion as part of that community. [...]

Also posted in Lotus Domino, Show-n-Tell+Thursday, Site | Leave a comment

Validating URL and Email Addresses with regexp in Lotus Notes

I needed to recreate this from scratch, and so I’m documenting this here for the next time.
Most of the credit should go to Julian Robichauxand his ls2j examples db, and in particultar the JakartaOroWrapper Library
My “invention” involves creating a isValidateURL and isValidateEmailAddress Regular Expression (or regexp ) routines that worked for me.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647Uselsx "*javacon"
Use [...]

Also posted in Lotus Domino, Show-n-Tell+Thursday | Leave a comment

can’t use @ThisName in Hide-When formulas, LOTUS NOTES meta coding FAIL

I had hoped to use the “@ThisName” to get the suffix of the field name “Comment_1″ and hide it if the Field “Status_1″ is “Pending” by doing this :
1234Suffix := @Right(@ThisName; "_");
EmpListFieldName := "Status_" + Suffix;
Status_value := @GetField(EmpListFieldName);
@If( Status_value    = "Pending";@Return(@True);@Return(@False));
but it didn’t work
finally traced it down to the “@ThisName” formula and [...]

Also posted in Lotus Domino, Show-n-Tell+Thursday | 2 Comments