Opera today announced a new feature of it’s browser. Their ground-breaking technology? To integrate the web server into the web browser.
For the record… I did this 9 years ago!
See my “Fishbowl Browser”
Insite into the mind of a ChronoFish
Opera today announced a new feature of it’s browser. Their ground-breaking technology? To integrate the web server into the web browser.
For the record… I did this 9 years ago!
See my “Fishbowl Browser”
Microsoft’s recent *security* update updated not only “security” issues, but also added the .net extension to my Firefox install.
Why this is an issue:
1. I didn’t ask for it AND I didn’t approve it
2. It makes Firefox *LESS* Secure
3. It means there is a mechanism to add extensions to Firefox subversively
4. The extension CAN NOT be removed without hacking the registry
Microsoft - How do I loathe The? Let me count the ways!
-CF
Here is my latest and shortest XML to array parser. It handles attributes (optionally) and multi record tags (repeat tags). It’s 12 commands long and the meat of it is 6 lines.
Let me know what you think.
/**
* ChronoFish May 2009
* www.chronofish.com
*
* xml2array will convert an XML document to an array.
* When attributes is true, resultant array will group by tag and exact-match attributes.
* When attributes is false, resultant array will group by tag and ignore attributes.
*
* The resultant array will be an associative array with tag (or tag + attributues) as the key. Each value
* will either be an XML2Array array (another associative array), or an array of value.
*
* Assumptions:
* 1. XML is well formed
* 2. White space is wrapped in CDATA
***/
function xml2array($originalXML, $attributes=true)
{
$xmlArray = array();
$search = $attributes ? '|< ((\w+?)(.*))\s*>(.*)|Ums’ : ‘|< ((\w+?)()).*>(.*)|Ums’;
// normalize data
$xml = preg_replace(’|>\s*< |', ">\n< ", $originalXML); // one tag per line
$xml = preg_replace('|<\?.*\?>|’, ”, $xml); // remove XML declarations
$xml = preg_replace(’|< (\w+?)(.*)/>|U’, ‘< $1$2>‘, $xml); //Expand singletons
if (! preg_match_all($search, $xml, $xmlMatches))
return trim($originalXML); // bail out - no XML found
foreach ($xmlMatches[1] as $index => $key)
{
if (! isset($xmlArray[$key])) $xmlArray[$key] = array();
$xmlArray[$key][] = xml2array($xmlMatches[4][$index], $attributes);
}
return $xmlArray;
}
Installing Apache 2.2 on Vista *should* be straight forward. And for the most part it is. However customizing the configuration was a bit tricky for me - and not for any good reason.
For the most part you can download Apache from the Apache Server Project and use the install wizard to get the basics up and running in no time. However I like to keep my DocumentRoot pointed to my development environment (and really - why else would you run Apache on Vista other than for testing and development?)
I found that the file I was editing (c:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf) was “different” depending on which editor I was using.
Since text is text is text, it’s not possible to have different representations of a text file. Obviously what I thought I was editing was in fact not what I was editing.
My solution was to save to different file name and then copy the file over. In doing so I found that I wasn’t even operating in the same directory. I am still perplexed by this and I have not found which file I am operating on - it’s almost like a cached file. So I went one step further and saved the file to a different directory - and then copied it over.
With in seconds I was able to get Apache to read out of the correct DocumentRoot rather than the default directory.
I’m not sure what Vista is doing here on the back-end. I’ll be checking around with my Admin friends - but clearly it’s doing *something*.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||