Mal: Cut it out. Job's not done until we're back on Serenity. Zoe: Sorry, sir. Didn't mean to enjoy the moment.

'Ariel'


Buffistechnology 2: You Made Her So She Growls?  

Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!


Steph L. - May 05, 2005 6:15:38 am PDT #2740 of 10003
I look more rad than Lutheranism

I've since been totally sucked into the Cult of Mac.

Oh, yes. I've always loved Macs -- they were the first computer I used, way the hell back in the 80s. We used them for the newspaper in college, and then my first job out of college I suffered through using a 486 (hey, it was 1994 -- 486s were still not too shabby). But they fired me after 18 months, and the next job I got is the job I have now, which is Mac city. LOVE.


Rob - May 05, 2005 8:06:54 am PDT #2741 of 10003

I'd like to loop through the properties in a class -- automatically. Sort of like a foreach -- is that possible?

ita, Still trying to do this?


§ ita § - May 05, 2005 8:10:21 am PDT #2742 of 10003
Well not canonically, no, but this is transformative fiction.

I coded around it, but am interested in knowing if it can be done in 4.x.


Rob - May 05, 2005 8:34:47 am PDT #2743 of 10003

It looks like get_object_vars will do what you want for you in either PHP 4.2 or 5. Before 4.2, not so much, as unset object properties aren't reported.


§ ita § - May 05, 2005 8:35:54 am PDT #2744 of 10003
Well not canonically, no, but this is transformative fiction.

Kewl. Thanks.


Stephanie - May 05, 2005 9:16:26 am PDT #2745 of 10003
Trust my rage

Thanks, Tom. Problem solved.


tommyrot - May 05, 2005 12:23:51 pm PDT #2746 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

I don't know if anyone will know this but... I'm working with xml and xsl, using JavaScript. I have a param in the xsl called "parSelected", and I've proven that I can pass values to it from JavaScript. Now I want to have something in the xsl that compared the value of the param to something in the xml. Something like this:

<xsl:when test="@n = " + <xsl:value-of select="$parSelected" />>

But not the same as that, as that doesn't work. Apparantly is is not valid xsl.

I also don't know if the '+' is correct to concatenate....


Tom Scola - May 05, 2005 12:26:09 pm PDT #2747 of 10003
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

You have to use the concat() function.


tommyrot - May 05, 2005 12:54:33 pm PDT #2748 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Thanks, Tom.

But on further research on the internets, it seems I can't construct the test string on-the-fly, so some other solution not involving concatenation of this type may be required.

Going home now....

eta: I am an idiot. At first I thought it would be something simple like:

<xsl:when test="@n = $parSelected">

but that didn't work. Turns out I was passing the wrong variable into $parSelected. I wasted three hours yesterday because of this. OTOH, it's nice how a night's sleep can improve one's perspective.


tommyrot - May 06, 2005 9:42:11 am PDT #2749 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Court Nixes 'Broadcast Flag'

WASHINGTON -- In a blow to the entertainment industry, a federal appeals court on Friday found that federal regulators overstepped their authority by requiring consumer-electronics manufacturers to help restrict digital home recording.

The U.S. Court of Appeals for the District of Columbia reversed a Federal Communications Commission order requiring that makers of consumer-electronics devices capable of receiving broadcast digital TV signals recognize a "broadcast flag," which is code that allows content owners to place limits on redistribution of digital content streams. The rule was to apply to devices manufactured on or after July 1, 2005.

[link]

How 'bout that?