This Saturday (November 1) is Pumpkin Destruction Day at The Rock Ranch. This event takes place from 10am to 10pm and offers fun and exciting methods of recycling the family pumpkin and creating a fun family memory. In addition to the everyday attractions at The Rock Ranch, guests will enjoy pumpkin destruction by using:
- the pumpkin cannon (that will shoot pumpkins through an unsuspecting automobile)
- the hammer smash
- pumpkin bowling
- pumpkin pie eating contests
- pumpkin crushing (a monster truck style exhibition where large trucks and other equipment will run over pumpkins)
- the pumpkin drop (from a 40 foot lift crane)
- pumpkin bombing airplanes
- pumpkin rolling races
- pumpkin mashing (with a tractor)
Guest may choose to bring their own family pumpkin or they may use some of the pumpkins remaining from The Rock Ranch pumpkin patch.
That's just good clean fun right there. I've watched the pumpkin cannon in action before, and it rocks. When we were there last year a pumpkin shot several hundred yards across a huge pond and bounced off a cow. Yeehaw brother, yeehaw.
I also found a video of the pumpkin cannon, and surely there are more such things on YouTube. Happy Halloween y'all!
It's kind of a poor man's XPath -- not all the functionality and power, but very easy to use and understand. For example:
Set exporter = session.CreateDXLExporter(db, stream) Dim reader As New XmlNodeReader Call reader.ReadStream( stream ) Print reader.get( "database.@title" )
I used LotusScript.doc to generate the documentation and put together a few sample agents for you to play with. Hopefully it all makes sense to someone besides me. Personally, it's made it a lot easier to deal with XML in my code.
One note about this: make sure you use UNSALTED butter -- people who have commented on the recipe have mentioned that using salted butter makes it very... salty. Also, what I listed below has been modified slightly based on us not having any sliced almonds and using small/medium white mushrooms instead of large mushrooms. If you're truly using large mushrooms, see the original recipe for adjusted proportions.
INGREDIENTS
- 24 fresh white mushrooms
- 6 tablespoons unsalted butter or margarine
- 1/2 cup plain dry bread crumbs
- 1/2 envelope dry onion soup mix
- 1/4 cup shredded Parmesan cheese
DIRECTIONS
Remove stems from mushrooms and finely chop; set caps aside. In a skillet, saute chopped mushroom stems in butter until tender, about 6-8 minutes. Remove from heat; stir in bread crumbs and onion soup mix. Stuff firmly into mushroom caps. Place on a baking pan or cookie sheet; sprinkle with cheese. Bake, uncovered, at 425 degrees F for 12-15 minutes or until tender.
A short story I read in seventh grade [I think... close enough anyway] did this to me. It was called The Endless Streetcar Ride into the Night, and the Tinfoil Noose, and I finally found it on the Internet so I formatted it and saved it so I'll always have it. Click the link, you can read it for yourself.
A few things were interesting for me in the search for that story. It was really hard for me to find because I remembered ideas but not too many searchable details, and the details I remembered were ever so slightly wrong. I remembered something about a tie with an electric blue snail on it, and a deodorant advertisement that said "Do you offend?", both of which were almost right but not quite. "Almost right" is hard to search on sometimes. In fact, I've probably been trying to find that story on the 'net for a few years now, and it took this long to get the correct combination of search terms and available sources.
Another interesting thing is that the story is even better than I remember it, which isn't always how these things work out (your mind can make grand memories out of plain things). I think I re-read it 4 or 5 times in the last day or so and it keeps making me smile.
I also had no idea that it was one of the short stories from Jean Shepherd's book In God We Trust, All Others Pay Cash, which is what parts of the modern classic movie A Christmas Story is based on. I'm finally going to buy that book and read the whole thing.
Anyway, you might like it too, you might not. And maybe in some sort of way it'll explain all sorts of weird things about me, I dunno. I'm just glad to have found it again.
I almost had a need to call a JavaScript function from within a LotusScript agent the other day. It turns out that I didn't have to go that route in the end, but if I had it's actually quite easy to do -- at least if you're on Windows. Here's how:
Dim js As Variant Set js = CreateObject ("MSScriptControl.ScriptControl") js.Language = "javascript" Call js.AddCode( "function add2(num) { return num+2; }" ) '** NOTE: Eval() will not always trigger runtime errors, so you should '** make sure to trap JavaScript errors with try/catch blocks Msgbox js.Eval("add2(5)")
Pretty easy, huh? You just create an MSScriptControl object, load your JavaScript functions using AddCode(), and call Eval() with whatever parameters you want. It's even easy to modify any of the code or parameters at runtime too, so you have a lot of flexibility.
You'll also see that I left you a note in the comments that a JavaScript runtime error that results from using the Eval() method will not always trigger a runtime error in LotusScript. For example, if your JavaScript function was "{return num/0;}" it would compile just fine, but when you ran the code and got a divide-by-zero error it wouldn't be obvious that an error occurred. You still get a result, but it's a really funky string ("1.#INF" for me).
Be careful though. One of my machines has some JavaScript JIT debuggers installed and registered, and with certain runtime errors the code would halt and I would get prompted with this dialog:
You wouldn't want this happening on your client machines, and certainly not on your servers. If you set the following Windows registry entry to 0 (zero), the JIT debugger will be disabled:
HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings\JITDebug
# a value of 1 will enable JIT debugging, 0 will disable
In any case, make sure you have good try/catch blocks in any JavaScript code you run, and check your input parameters BEFORE you call Eval().
Compile errors (i.e. -- bad JavaScript syntax) WILL always trigger a LotusScript error in the AddCode() method, though. You can catch compile-time errors (and some runtime errors) with an error-handler like this:
processError: If (js Is Nothing) Then Print "LotusScript error: " & Error Elseif (js.Error.Description = "") Then Print "LotusScript error: " & Error Else '** for the various error object properties, see '** http://msdn.microsoft.com/en-us/library/aa227430(VS.60).aspx Print "JavaScript error: " & js.Error.Description End If
I don't have any "real world" production experience with this technique, so I'm not sure what kind of performance hits you might get, especially if you run the same code a bunch of times or load up a really large amount of JavaScript to use for processing. However, if you have a few relatively small chunks of JavaScript code with functionality that might be difficult to reproduce in LotusScript, this might give you a quick win.
Thanks to Thomas Gumz and others for telling us non-admin-types these things.
Oh, and I should be extra responsible by saying that you should consult your admin before issuing this command on a busy server with a big directory. But you ARE doing all your changes and testing on a development server, right?