Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: stupid IE tricks

I was goofing around with some Ajax/dhtml stuff. I have a php script query the db and return the results as a property list xml file. Then I use dom parsing to convert it to a javascript Object/Array/String/whatever and then work with that.

This satisfies my criteria:

  1. It's fun
  2. I get to write a recursive parser
  3. It's more elegant than using eval() to instantiate an Object.

To reduce the amount of typing, I started adding some common helper methods to the Node.prototype. Opera and Firefox liked it fine. IE did not. As far as I could tell, IE does not support the Node class. Eventually, I had to replace the document.getElementByID/createElement functions to install my helper methods before returning.

if (window.ActiveXObject)
{
Node = function() {};

document.oldGetElementById = document.getElementById;
document.getElementById = function(name)
{
var x = this.oldGetElementById(name);
if (x)
{
x.removeChildren = Node.prototype.removeChildren;
x.setText = Node.prototype.setText;
}
return x;
}

document.oldCreateElement = document.createElement;
document.createElement = function(name)
{
var x = this.oldCreateElement(name);
if (x)
{
x.removeChildren = Node.prototype.removeChildren;
x.setText = Node.prototype.setText;
}
return x;
}
}

User Journal

Journal Journal: Michael Jackson: Very Fucking Weird 1

Has anybody seen the mugshot of Michael Jackson?

Shit! Where to begin?

Race: B[lack]
Sex: M[ale]

You're kidding, right? 5'11", 120 pounds. Eek.

I've seen circus clowns with less makeup. What sort of parent would let their kid hang out with him? What sort of kid would want to hang out with him?

Thriller was such a good album (26 million sold in the US, 40 million world wide). It's a shame he couldn't have died in a plane crash in 1986 or so.

User Journal

Journal Journal: spammer smackdown

You are receiving this email from "Potent Products 4 Men" Newsletter. If you are listed in our database, you will receive occasional announcements on various male-related products. If you are receiving this email unsolicited, we wish to have you r e m o v e d from our database immediately. Please see below for r e m o v a l instructions.

Occasional seems to mean "twice a day", sent from a fake aol, earthlink, or who-knows-what.com account.


Our affiliates are often provided opt-in lists that contain some addresses that are in fact not valid. If you are one of these persons, we apologize profusely, and can assure you that we will take immediate action towards r e m o v i n g your email address from any database at once. Below is a 100 percent legitimate removal link- click it and provide your email and you will never again receive any email announcements from any of our affiliates.


To u n s u b s c r i b e from this mailing list: c l i c k h e r e

100% legitimate is only 50% correct. If you try to submit an address, it will time out. I tried poking around with the php script, and ... oops, someone misconfigured their server....
 

/**
* aFormMail script - sending mail via form
*
* Author: Alex Scott
* Email: alex@cgi-central.net
* Web: http://www.cgi-central.net
* Details: The installation file
* FileName $RCSfile: aformmail.php,v $
* Release: 1.1 ($Revision: 1.6 $)
*
* Please direct bug reports,suggestions or feedback to the cgi-central forums.
* http://www.cgi-central.net/forum/
*
* aMember is free for both commercial and non-commercial use.
* Re-distribution of this script without prior consent is strictly prohibited.
*
*/ ...
$send_to = "cybermed@telus.net"; ////// Database - write CSV file with data of submitted forms //////////////
$database_enabled = 1;
$database_file = 'email.csv';
$redirect_url = 'http://www.123respmarket.biz/thankyou.htm';

you can access the csv file if you'd like, or perhaps just tell mr cybermed@telus.net what you think of him. (or opt him in for a few special offers).

User Journal

Journal Journal: what the fuck is up with overloaded comments? 1

This is fucking pissing me off. The fucktards that be seem to have decided to ignore any user settings and only show 50 comments per page.

I guess it's either to increase ads shown or (more likely) decrease the database reads. Personally, this is the sort of thing that makes me not bother reading this stuff. And the incredibly shitty stories lately.

User Journal

Journal Journal: fudge!

combine 2/3 cup milk, 2 cups sugar, a couple tablepoons of corn syrup, a couple tablespoons of cocoa powder, and a pinch of salt in a large pot.

Bring to boil, then reduce to medium heat until it gets to a medium ball stage (you can use a thremometer, I go by the water test (which is tastier :).

Remove from heat, add a couple teaspoons vanilla, and 1/4 to 1/2 stick of butter. Let it set until butter is melted, and then some more so it's cooled a bit.

Stir until it starts loosing the gloss. Then quickly transfer to a greased pan. Too much stirring = stuck in pot, too little == not set up.

Variations:

  • During stir time, add oatmeal and coconut. Use a pair of spoons to create golf-ball sized moose turds (aka no bakes)
  • Leave out cocoa powder, call it caremelicious.
  • As above. but add more salt, more butter for butterscotchy goodness.
User Journal

Journal Journal: VA Linux -- quarterly results. 1

VA Linux recently released their Quarterly earnings

Among the hilights:

  • 6 million in revenue
  • 3 million cost of revenue
  • 3.6 million net loss

The revenue was leftovers from the hardware business (181,000), software revenue (671,000), and online revenues (5,185,000).

Software revenue was sourceforge enterprise edition (10 new sales at 65,000 plus some additional licenses), and the online revenue is banner ads, /. subscriptions, and thinkgeek shit, etc.

Clearly, betting the company on sourceforge was a mistake. If VA Linux is to survive, sourceforge must die. Interestingly, the only parts of VA Linux with any potential are the pieces bought from Andover.net, and they'll be the only thing left when VA is out of the hardware and sourceforge business.

More interestingly, though, is that total assets dropped from 66 million to 51 million. That's 12 million more than than the 3.6 million loss they reported, and the loss of goodwill and equipment depreciation doesn't explain it.

User Journal

Journal Journal: of war and capitalism

It's not surprising that France, Germany, Russia, and the United Nations all want to "help" rebuild Iraq, just as it isn't surprising that they didn't want to kick out the tyrant dictator living their. All 4 have socialist tendencies -- large social safety nets.

Capitalism is based largely on risk. Those that take great risks may be rewarded for it (or, they may end up losing everything). Of course, risk alone does not make capitalism work. Every gambler learns that hte house always wins. But educated risk allows for countries like the United States to prosper.

Consider George Bush. If Iraq was another Vietnam, or even Somolia, he would be a guaranteed one-termer. A successful and short (though not yet complete) invasion/liberation proved that he was correct. In the death scale, the SARS virus is more effective than the Republican Guard. Whether or not Weapons of Mass Destruction are found, or Saddam's bones, the citizens of Baghdad sure looked happy tearing down their statues of Saddam, and, perhaps more importantly, other Arabs watched it on TV. Despite their hatred for the United States, despitetheir hope that he Iraqi Army would triumph, Arabs wathed Iraqis that were happy to see US Marines.

Meanwhile, the socialists sat on the sidelines, and belive they should be rewarded for it.

Slashdot.org

Journal Journal: a proposal for slashdot subscriptions 4

These are the premium features I would need to see before "subscribing" to slashdot:

  • Have an https gateway. And roll your own SSL sertificate (For free) rather than pay for one. When i'm at work, they do snoop on my traffic. I don't wear tinfoil or fear black helicoptors, but i do like to browse at -1. Currently, I SSH to a box and links into slashdot.
  • Allow searching of comment text, not just titles.
  • show *all* of a user's comments in the history page (not all that difficult -- slash does that if you're a moderator)
  • At least spell check/dupe check the stories you "edit", "editors"

I know the first 3 would increase bandwidth or computer resources used, but I think they would be more than offset by the additional revenue.

Anybody else have slashdot suggestions?

Slashdot Top Deals

Kleeneness is next to Godelness.

Working...