Re: [PHP] create/write to psd file

2008-10-26 Thread Martin Zvarík
What I know is that you can control GIMP over the command line = you can use PHP to do this. Though I guess GIMP doesn't support PSD files, I had to express myself anyways. vuthecuong napsal(a): Hi all Is there a way to create/read/write to psd file? (photoshop format) I would like to hea

Re: [PHP] create/write to psd file

2008-10-26 Thread vuthecuong
Ashley Sheridan-3 wrote: > > On Sun, 2008-10-26 at 23:45 -0700, vuthecuong wrote: >> >> >> Ashley Sheridan-3 wrote: >> > >> > Off the top of my head, I don't think this is possible. A quick Google >> > yields nothing either. I'm assuming it has to be a PSD for the layers? >> > >> Sure. I wo

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Martin Zvarík
:-D :-D :-D :-D :-D :-D :-D :-D ok :) Robert Cummings napsal(a): On Mon, 2008-10-27 at 02:09 -0400, Robert Cummings wrote: On Sun, 2008-10-26 at 22:39 -0700, Jim Lucas wrote: Even slimmer It's buggy... you need to test for an blank string to properly handle the append to arr

Re: [PHP] create/write to psd file

2008-10-26 Thread Ashley Sheridan
On Sun, 2008-10-26 at 23:45 -0700, vuthecuong wrote: > > > Ashley Sheridan-3 wrote: > > > > Off the top of my head, I don't think this is possible. A quick Google > > yields nothing either. I'm assuming it has to be a PSD for the layers? > > > Sure. I woudd like to read PSd files with multiple

Re: [PHP] create/write to psd file

2008-10-26 Thread vuthecuong
Ashley Sheridan-3 wrote: > > Off the top of my head, I don't think this is possible. A quick Google > yields nothing either. I'm assuming it has to be a PSD for the layers? > Sure. I woudd like to read PSd files with multiple layes, and of course when I write to it, I should keep it's layers s

Re: [PHP] create/write to psd file

2008-10-26 Thread Ashley Sheridan
On Sun, 2008-10-26 at 23:34 -0700, vuthecuong wrote: > Hi all > Is there a way to create/read/write to psd file? (photoshop format) > > I would like to hear opinion form you: > Do you recommend gd2 or imageMagick to perform this task? and why > thanks in advanced > -- > View this message in cont

[PHP] create/write to psd file

2008-10-26 Thread vuthecuong
Hi all Is there a way to create/read/write to psd file? (photoshop format) I would like to hear opinion form you: Do you recommend gd2 or imageMagick to perform this task? and why thanks in advanced -- View this message in context: http://www.nabble.com/create-write-to-psd-file-tp20182477p2018

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Robert Cummings
On Mon, 2008-10-27 at 02:09 -0400, Robert Cummings wrote: > On Sun, 2008-10-26 at 22:39 -0700, Jim Lucas wrote: > > > > Even slimmer > > > > > > > $node = '[5][1][]'; > > $text = 'some text'; > > > > preg_match_all('|\[([^\]\[]*)\]|', $node, $matches, > > PREG_PATTERN_ORDER); > > > > $recursiv

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Robert Cummings
On Sun, 2008-10-26 at 22:39 -0700, Jim Lucas wrote: > > Even slimmer > > > $node = '[5][1][]'; > $text = 'some text'; > > preg_match_all('|\[([^\]\[]*)\]|', $node, $matches, > PREG_PATTERN_ORDER); > > $recursive = $matches[1]; > > $recursive = array_reverse($recursive); > > foreach ( $recurs

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Jim Lucas
Jim Lucas wrote: Martin Zvarík wrote: Nope, you have to use the eval() everytime for read/write. Wrong. Their is always more then one way to skin a cat! $text); $out = array(); foreach ( $recursive AS $index ) { $out = array(); $out[(int)$index] = $in; $in = $out; }

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Jim Lucas
Martin Zvarík wrote: Nope, you have to use the eval() everytime for read/write. Wrong. Their is always more then one way to skin a cat! $text); $out = array(); foreach ( $recursive AS $index ) { $out = array(); $out[(int)$index] = $in; $in = $out; } pr

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Martin Zvarík
Nope, you have to use the eval() everytime for read/write. Martin Zvarík napsal(a): No offense, but I thought it's obvious what I want to print. print_r() shows null, and it should print what you just wrote = array field. It works when first defining with eval(): eval('$tpl'.$node.'=array(

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Martin Zvarík
No offense, but I thought it's obvious what I want to print. print_r() shows null, and it should print what you just wrote = array field. It works when first defining with eval(): eval('$tpl'.$node.'=array();'); I guess that's the only way. Anyway, I appreciate your quick reply, Martin Jim L

Re: [PHP] Dynamically creating multi-array field

2008-10-26 Thread Jim Lucas
Martin Zvarík wrote: PHP Version 5.2.4 I really don't like to use the EVAL function, but do I have choice?? This sucks. You should print the results that you are looking for! Are you looking for something like this? Array ( [5] => Array ( [1] => Array

[PHP] Dynamically creating multi-array field

2008-10-26 Thread Martin Zvarík
PHP Version 5.2.4 I really don't like to use the EVAL function, but do I have choice?? This sucks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] question about using sql server with php

2008-10-26 Thread Chris
if i have to connect to a sql databse instead of my sql database as some companies use sql database, how can i change the php code to connect, run a query and close connection to the sql database. apart from changing the code to connect to sql database is there something else i need to do. RT

[PHP] question about using sql server with php

2008-10-26 Thread Sudhakar
i have a question about how to use sql database with php instead of using my sql database when i use my sql database the php code to connect to the my sql database is = $conn = mysql_connect($hostname, $user, $password); if(!$conn) { echo "Unable to connect to Database"; } else { mysql_select_d

Re: [PHP] clear a mysql table

2008-10-26 Thread Bastien Koert
> > > truncate cash; > Hey, my wife does that all the time! -- Bastien Cat, the other other white meat

Re: [PHP] clear a mysql table

2008-10-26 Thread Chris
Ronald Wiplinger (Lists) wrote: I need to clear a table (cache) from a database based on the database size. Our web site uses cached pages. Our webhost only allow us 100 MB storage. Usually the database is just 10 MB, but when a search engine crawls our calendar, then the storage is quickly 108

Re: [PHP] PHP XSLT caching

2008-10-26 Thread Per Jessen
vladimirn wrote: > i was wondering whats the best approach to do next. > I have an xml file delivered from service of my partner. On my web > server (windows) i have xslt files used for xml transformation. > Those files are getting bigger, so i have request to cash them and use > cashed. Your xs

Re: [PHP] Replacing with f*ck and f*cking

2008-10-26 Thread Larry Garfield
On Sunday 26 October 2008 5:06:09 am Ashley Sheridan wrote: > Obviously, this list could get pretty comprehensive, so like Andrew > said, maybe you should look to see how some of the open source projects > do it. > > > Ash > www.ashleysheridan.co.uk The way Drupal handles such filtering is simple

Re: [PHP] Interactive canvas example

2008-10-26 Thread Richard Heyes
> ... Ok, a little more playing and I've managed to whittle the public API down, so animated bar charts galore! -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated October 25th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

[PHP] Re: PHP XSLT caching

2008-10-26 Thread Colin Guthrie
vladimirn wrote: Thank you Col I will go into Zend_Cache as you suggested. One more thing- does Zend_Cache saces data into file or use a server memory? As I said in my original mail, but perhaps wasn't clear, Zend_Cache can support file, memcache, APC and other backends. Col -- Colin Guthr

Re: [PHP] Interactive canvas example

2008-10-26 Thread Richard Heyes
> Hmm, should be as easy as changing the event from onclick to on > mouseover. I think. But yes, onmouseover would be far better. But it's not, since the mouse is already over the canvas when you move it over a bar, thus not triggering a new event. Ho hum. -- Richard Heyes HTML5 Graphing for FF

Re: [PHP] Interactive canvas example

2008-10-26 Thread Richard Heyes
> Very nice graph. > > Instead of requiring the user to click, try using css and have it produce > the details on roll-over, like so: Hmm, should be as easy as changing the event from onclick to on mouseover. I think. But yes, onmouseover would be far better. -- Richard Heyes HTML5 Graphing for

Re: [PHP] Re: Interactive canvas example

2008-10-26 Thread Richard Heyes
> Now I wonder why you are creating a new tooltip each time the user > clicks on the graph? Why not? There's no need to cache it and it lessens the complexity if I don't. > Why not do it the following way? Which is? > Secondly CanvasTextFunctions.letters() really is in a class of its own. I d

Re: [PHP] Re: Interactive canvas example

2008-10-26 Thread Richard Heyes
> Very nice. Looks good on Kubuntu FF3. The only issue I see is that no > matter which bar I click on, it says "January 2007 Sales: 80%", which > may just be your example, but I would think each bar should be different. Yes, I've still got to make an easy way to tie in differing tooltips. -- R

Re: [PHP] Interactive canvas example

2008-10-26 Thread tedd
At 10:57 AM + 10/26/08, Richard Heyes wrote: Hi, Had to show this off - I'm so proud. READ: full of myself... I've tried it in Firefox 3, Opera 9.6, Chrome and Safari, all on Windows. http://dev.rgraph.org/examples/interactive.html -- Richard Heyes Richard: Very nice graph. Instead of

Re: [PHP] PHP XSLT caching

2008-10-26 Thread vladimirn
Thank you Col I will go into Zend_Cache as you suggested. One more thing- does Zend_Cache saces data into file or use a server memory? Colin Guthrie-6 wrote: > > vladimirn wrote: >> Hi all, >> i was wondering whats the best approach to do next. >> I have an xml file delivered from service of my

Re: [PHP] Re: Interactive canvas example

2008-10-26 Thread Yeti
>JS I suppose. Though it creates a DIV element on demand. The function >in question is RGraph.Tooltip() in RGraph.common.js. OK, I found it. Thank you for showing me. I was thinking of something similar recently. /** * Shows a tooltip next to the mouse pointer * * @param text The tooltip text * @

[PHP] Re: PHP XSLT caching

2008-10-26 Thread Colin Guthrie
vladimirn wrote: Hi all, i was wondering whats the best approach to do next. I have an xml file delivered from service of my partner. On my web server (windows) i have xslt files used for xml transformation. Those files are getting bigger, so i have request to cash them and use cashed. I was t

[PHP] Re: Interactive canvas example

2008-10-26 Thread Shawn McKenzie
Richard Heyes wrote: > Hi, > > Had to show this off - I'm so proud. READ: full of myself... I've > tried it in Firefox 3, Opera 9.6, Chrome and Safari, all on Windows. > > http://dev.rgraph.org/examples/interactive.html > Very nice. Looks good on Kubuntu FF3. The only issue I see is that no ma

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-26 Thread Carlos Medina
Rob Gould schrieb: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a "wine producer-name" is a word like: Château Bahans Haut-Brion or La Chapelle de La Mission Haut-Brion or Le Clarence

[PHP] PHP XSLT caching

2008-10-26 Thread vladimirn
Hi all, i was wondering whats the best approach to do next. I have an xml file delivered from service of my partner. On my web server (windows) i have xslt files used for xml transformation. Those files are getting bigger, so i have request to cash them and use cashed. I was thinkging about memc

Re: [PHP] Interactive canvas example

2008-10-26 Thread Richard Heyes
> It worked for me. Although I had some quite CPU intensive processes > running, so it lagged a bit. > Had no time to look into the code, so I was wondering if you could > answer my question ... > That yellow information box popping up onclick(), is it drawn by JS or > is it something like a hidden

Re: [PHP] Interactive canvas example

2008-10-26 Thread Yeti
It worked for me. Although I had some quite CPU intensive processes running, so it lagged a bit. Had no time to look into the code, so I was wondering if you could answer my question ... That yellow information box popping up onclick(), is it drawn by JS or is it something like a hidden div? Congr

Re: [PHP] Re: Replacing with f*ck and f*cking

2008-10-26 Thread Dotan Cohen
2008/10/26 Colin Guthrie <[EMAIL PROTECTED]>: > Ashley Sheridan wrote: >> >> What you really need to watch out for is words which you're going to >> censor which might be part of other names. Sex is an obvious one, as it >> appeared in the borough name of my old address: Middlesex. > > I can't beli

Re: [PHP] Interactive canvas example

2008-10-26 Thread Nick Stinemates
On Sun, Oct 26, 2008 at 10:57:19AM +, Richard Heyes wrote: > Hi, > > Had to show this off - I'm so proud. READ: full of myself... I've > tried it in Firefox 3, Opera 9.6, Chrome and Safari, all on Windows. > > http://dev.rgraph.org/examples/interactive.html > > -- > Richard Heyes > > HTML5

Re: [PHP] Re: Replacing with f*ck and f*cking

2008-10-26 Thread Ashley Sheridan
On Sun, 2008-10-26 at 11:06 +, Colin Guthrie wrote: > Ashley Sheridan wrote: > > What you really need to watch out for is words which you're going to > > censor which might be part of other names. Sex is an obvious one, as it > > appeared in the borough name of my old address: Middlesex. > > I

[PHP] Re: Replacing with f*ck and f*cking

2008-10-26 Thread Colin Guthrie
Ashley Sheridan wrote: What you really need to watch out for is words which you're going to censor which might be part of other names. Sex is an obvious one, as it appeared in the borough name of my old address: Middlesex. I can't believe you didn't use the infamous "Scunthorpe" as your example

[PHP] Re: Replacing with f*ck and f*cking

2008-10-26 Thread Maciek Sokolewicz
Ryan S wrote: Hey! I'm just trying to replace some of the more bad words with their slightly censored counterparts like so $bad_words = array(/*Well you know the words so am not going to write them here*/); $bad_words_replacements = array("f*ck", "f*cking"); $comment = str_replace("$bad_words"

[PHP] Interactive canvas example

2008-10-26 Thread Richard Heyes
Hi, Had to show this off - I'm so proud. READ: full of myself... I've tried it in Firefox 3, Opera 9.6, Chrome and Safari, all on Windows. http://dev.rgraph.org/examples/interactive.html -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated October 25

Re: [PHP] Replacing with f*ck and f*cking

2008-10-26 Thread Ashley Sheridan
On Sun, 2008-10-26 at 10:18 +0200, Stan Vassilev | FM wrote: > > My question is this, for just two words its fine to use the above, but a > > pal tells me that if using a lot of words (eg: 15) and the $comment is big > > then it can take quite some time and be a bit of a processing strain as > >

Re: [PHP] clear a mysql table

2008-10-26 Thread Ashley Sheridan
On Sat, 2008-10-25 at 20:47 -0500, Micah Gersten wrote: > > Ronald Wiplinger (Lists) wrote: > > I need to clear a table (cache) from a database based on the database size. > > > > Our web site uses cached pages. Our webhost only allow us 100 MB > > storage. Usually the database is just 10 MB, but

Re: [PHP] Replacing with f*ck and f*cking

2008-10-26 Thread Stan Vassilev | FM
My question is this, for just two words its fine to use the above, but a pal tells me that if using a lot of words (eg: 15) and the $comment is big then it can take quite some time and be a bit of a processing strain as well because php first checks the first word from the good list against all