Re: [PHP] Algorithm Help

2013-10-20 Thread German Geek
) such that the total weight of all edges connecting the 5*4 nodes is minimum , how do you go about finding this set once you have constructed and maintained this graph and what will be the complexity?? On Sun, Oct 20, 2013 at 11:49 AM, German Geek geek...@gmail.com wrote: Oh and it also assumes

Re: [PHP] Re: Programmers and developers needed

2012-09-19 Thread German Geek
See below. On 19 September 2012 04:45, Matijn Woudt tijn...@gmail.com wrote: On Tue, Sep 18, 2012 at 8:52 AM, agbo onyador onya...@gmail.com wrote: The growing power of the internet and global networks. (on the world’s politics, economies and even on daily life of ordinary people)

Re: [PHP] Node.PHP

2012-03-30 Thread German Geek
Maybe stupid question, but is node.php really necessary? If you can program PHP and it performs better than node.js, why would you need to have another wrapper around things. Why not just program normal PHP? twitter: geekdenz Blog: http://www.thheuer.com On Sat, Mar 31, 2012 at 10:39 AM, Hiyarli

Re: [PHP] Apache 2.4.1 and php?

2012-02-24 Thread German Geek
Hi Daniel, You should be able to. Haven't tried it with that specific version, but generally PHP is designed to run with any version of Apache. If it doesn't work as a module you should always be able to compile it as a fastcgi application and that should work. Then you can even setup different

Re: [PHP] Developer needed, right place for it?

2010-12-30 Thread German Geek
Hi Bill, I'm a senior PHP/Javascript/Actionscript 3 developer. If you need some PHP work done, contact me off-list and I can see what I can do for you. Regards, Tim ++Tim Hinnerk Heuer++ http://www.ihostnz.com On 31 December 2010 09:44, Bill Marcy bill.ma...@gmail.com wrote: Looking to get a

Re: [PHP] Facebook PHP compiler

2010-02-05 Thread German Geek
Yes. Totally agree. Would like to try asap. ++Tim Hinnerk Heuer++ http://www.ihostnz.com On 3 February 2010 10:15, Adam Richardson simples...@gmail.com wrote: Looks very promising !!! On Tue, Feb 2, 2010 at 1:12 PM, Robert Cummings rob...@interjinn.com wrote: Cesar D. Rodas wrote:

Re: [PHP] POLL: To add the final ? or not...

2010-01-08 Thread German Geek
I would leave this to personal preference, whether there is a closing ? or not wouldn't bother me. I could argue both ways: Pro: You should put a final ? for neatness and XML compatibility. Con: It makes the script fractionally slower because 2 more characters have to be processed and there might

[PHP] Howto Install XAMPP XDebug Netbeans

2010-01-04 Thread German Geek
Hi All, Just to save some of you some time: http://www.ihostnz.com/howto-install-xampp-windows-7-xdebug-netbeans Happy new year! Cheers, Tim ++Tim Hinnerk Heuer++ http://www.ihostnz.com

[PHP] PHP/SWFUpload progress

2009-12-24 Thread German Geek
Hi all, Wishing you a merry xmas! As a gift to you a little thing that I figured out through long googling and trial and error: We are using the swfupload (flash) upload tool to upload files to a php script. For a rather cryptic reason on some clients the progress would show too quickly when AVG

Re: [PHP] Live PHP Code Templates for NetBeans - accelerate your php development.

2009-12-07 Thread German Geek
Hi, I would like to check this out. How do you enable these code templates in NetBeans? 2009/12/8 Raymond Irving xwis...@yahoo.com Hello Everyone, I've made a few code templates (HTML, PHP) available for everyone to download and use with NetBeans 6.7 or higher. It will greatly accelerate

Re: [PHP] File To Blob Corruption

2009-11-14 Thread German Geek
Hi, Could it have something to do with an eof character being encoded or something like that? Do you really need to store the files in the DB? It uses more processing power if stored in the DB because on retrieval, you have to unescape the string and return it. Modern filesystems are optimised

Re: [PHP] uniqid() and repetition of numbers generated

2009-11-14 Thread German Geek
2009/11/14 tedd tedd.sperl...@gmail.com A Interesting thought. My idea on this is to use the approach used when replicating a DB. It is similar to the namespace idea if not the same: Say you have 3 databases, you could use mod 3 numbers for A=0, B=1 and C=2 So on A you would have 0, 3, 6, 9,

Re: [PHP] What method is best for generating thumbnails in PHP from PDF's?

2009-11-14 Thread German Geek
Hi, I've spent ages trying to figure out a good way for this. Ghostscript and ImageMagick were slow and not giving satisfactory results because the colors were wrong in some instances. The solution for me was to use ImageMagick with X-PDF. You can install xpdf in any linux distro or even on

Re: [PHP] Re: Need suggestions on PHP frameworks

2009-11-14 Thread German Geek
Which framework to use is more of a religious war than anything, but I would recommend Symfony. It has a nice architechture and is very extendable. ++Tim Hinnerk Heuer++ http://www.ihostnz.com 2009/11/13 Sudheer Satyanarayana sudhee...@sudheer.net I doubt you'll get a reasoned bunch of

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-02 Thread German Geek
Hi, It's definitely possible to do when you do it in PHP, but not sure about on the database side. You could read all records into memory and then iterate over it with something like: $toSearch = 4D24487PS $charsToIgnore = array('-','+',...); foreach ($items as $k=$item) { $itemVal =

Re: [PHP] Script to Compare Database Structures

2009-07-31 Thread German Geek
have you tried mysqldiff? ++Tim Hinnerk Heuer++ http://www.ihostnz.com (should be .org) Sponsors welcome to put ads under a linked to page. This is not automated just yet. Only image, swf or preferably text or short html ads, no animations please. Price negotiable. 2009/8/1 Matt Neimeyer

Re: [PHP] Sorting times (SOLVED)

2009-05-16 Thread German Geek
Just a draft i thought should not go unnoticed on the list :-) just cleaning up. OK, How about a super efficient soln where each string is only converted once and a fast sorting algorithm is used: ?php function time_sort($a, $b) { static $now = time(); if (strtotime($a, $now) ==

[PHP] Fwd: catching up

2009-04-16 Thread German Geek
just in case/tim(e). Yes its me :) Tim-Hinnerk Heuer http://www.ihostnz.com Mitch Hedberghttp://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html - I drank some boiling water because I wanted to whistle. -- Forwarded message -- From: Tim | iHostNZ t...@ihostnz.com Date:

Re: [PHP] array manipulation

2009-04-16 Thread German Geek
soln: YOU NEED A 2 WEEK HOLLIDAY at least! You need to learn to say no. Tim-Hinnerk Heuer http://www.ihostnz.com Samuel Goldwynhttp://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html - A wide screen just makes a bad film twice as bad. 2009/4/17 PJ af.gour...@videotron.ca The more I get

Re: [PHP] pup

2009-04-16 Thread German Geek
From What i learned, yes you can write pup here. Does anyone print this mailing list? wtf?? i keep overestimating people's intelligence, im sorry! Tim-Hinnerk Heuer http://www.ihostnz.com Charles de Gaullehttp://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html - The better I get to

Re: [PHP] 0.T Java IDE

2009-03-03 Thread German Geek
Give the free eclipse a go. If you need an easy to use gui editor IBM Websphere (which is also based on Eclipse): http://www-01.ibm.com/software/websphere/ Eclipse is great, has PDT (PHP Development Tools) too... Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Dick Cavett - If your

Re: [PHP] www.soongy.com

2009-03-01 Thread German Geek
Also check this one out: google uses it in gmail: http://code.google.com/p/jquery-multifile-plugin/downloads/detail?name=multiple-file-upload.zipcan=2q= Cheers, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Groucho Marx - I have had a perfectly wonderful evening, but this wasn't it. 2009/3/2

[PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
Hi All, We have an application that generates dynamic ebooks. One of the (minor) problems (but yet annoying) is that when a user comes back to an ebook, they have to actually delete the cache and reload the page to not get the cached version which might be wrong because the content or even the

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
don't make a right, try three. 2009/2/23 Per Jessen p...@computer.org German Geek wrote: Hi All, We have an application that generates dynamic ebooks. One of the (minor) problems (but yet annoying) is that when a user comes back to an ebook, they have to actually delete the cache

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
2009/2/23 Per Jessen p...@computer.org German Geek wrote: Yes, that's what i thought, but with my FF 3.0 the resources (swf,png,jpg) don't get reloaded. I have to reload the page (after deleting cache). Something to do with the Apache configuration? Hi Tim, Try loading up just

Re: [PHP] adding whitespace to a timestamp

2009-02-23 Thread German Geek
Maybe the issue is that you are displaying the output in a browser and spaces are not shown. Try puttung nbsp; instead of a literal space. Tim-Hinnerk Heuer http://www.ihostnz.com Henny Youngman - When I told my doctor I couldn't afford an operation, he offered to touch-up my X-rays.

Re: [PHP] Re: mysql_real_escape_string(asdasddas) ??? wtf

2009-02-21 Thread German Geek
Ah, ic. Mh, why wouldn't a function like that function without a db connection? Does it use the db? Isn't that less efficient? I might just use str_replace, because i can't think of any way that one could get a sql injection into str_replace(', \\\', $value); // might need to replace a literal \

[PHP] XML - XSLT transformation using XSLTProcessor class

2009-02-20 Thread German Geek
Hi All, We are trying to import some xml data into the database. My idea was to make an xslt and then transform the xml to php code which generates the queries necessary and then gets evaled as php code for the actual import... Anyway, i got it working (mostly)! But i need to get the current

Re: [PHP] XML - XSLT transformation using XSLTProcessor class

2009-02-20 Thread German Geek
Of German Geek Sent: Friday, February 20, 2009 9:18 AM To: PHP General list Subject: [PHP] XML - XSLT transformation using XSLTProcessor class Hi All, We are trying to import some xml data into the database. My idea was to make an xslt and then transform the xml to php code which

Re: [PHP] Accessors

2009-02-19 Thread German Geek
It's not a bad idea but usually having accessor and mutator methods are used to validate the data first before writing it to the properties. If you don't have validation, you might as well set them directly and make them public and don't really need a generic setter/getter method. Although, this

[PHP] shell_exec - asynchronous would be cool!

2009-02-18 Thread German Geek
Hi all, A while ago, i had a problem with shell_exec: I was writing some code to execute imagemagick to convert a bunch of images. This could take ages to execute and the page therefore ages to load. The solution was to get a linux box and append a at the end to do it in the background or make

Re: [PHP] shell_exec - asynchronous would be cool!

2009-02-18 Thread German Geek
cli? Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com George Burns - I would go out with women my age, but there are no women my age. 2009/2/19 Ashley Sheridan a...@ashleysheridan.co.uk On Thu, 2009-02-19 at 10:30 +1300, German Geek wrote: Hi all, A while ago, i had a problem

Re: [PHP] Back to Basics - Re: [PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread German Geek
of securing a non-ssl login form, i'd like to hear about it too. Michael A. Peters wrote: Colin Guthrie wrote: 'Twas brillig, and German Geek at 15/02/09 22:32 did gyre and gimble: Please enlighten me why it is so expensive? Is it maybe just the hassle of setting it up? The whole thing

Re: [PHP] Re: Sorting times (SOLVED before tedds crappy SOLVED)

2009-02-16 Thread German Geek
Remember we have copy-on-write in PHP. Beat this :P : ?php $timeArray = array(/* your string time data */); function timeStamps($ar) { $stamps = array(); foreach ($ar as $timeString) { $stamps[strtotime($timeString)] = $timeString; } return $stamps; } function sortTime($ar) {

Re: [PHP] Full versus relative URLs

2009-02-16 Thread German Geek
Should be the same as the dns request is cached and a request needs to be made anyway. You could argue that relative URLs are less secure, but i cannot really see why. Well i guess someone can easier steal your source but it doesnt get much harder with absolute URLs. Tim-Hinnerk Heuer

Re: [PHP] Apache odd behavior

2009-02-16 Thread German Geek
Symfony uses exactly this method for pretty urls. Check it out. Maybe it has everything you want :). Have a look at symfony's .htaccess rewrite rules at least. You have a few possibilities here: You can make ur own rewrite for urls that contain index.php or rewrite

Re: [PHP] Back to Basics - Re: [PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread German Geek
to be an orange. 2009/2/17 Jason Pruim ja...@jasonpruim.com On Feb 16, 2009, at 6:11 AM, German Geek wrote: Brilliant. Someone who understood my intentions :) It's not only a good exercise but also useful. Once done in PHP and various JS frameworks, we could port it to other languages

Re: [PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread German Geek
, and German Geek at 15/02/09 22:32 did gyre and gimble: Please enlighten me why it is so expensive? Is it maybe just the hassle of setting it up? The whole thing is about trust. Getting a certificate is nothing if the system is not backed up by a trust system. If a CA was setup that gave out

Re: [PHP] Full versus relative URLs

2009-02-16 Thread German Geek
Tim-Hinnerk Heuer http://www.ihostnz.com Mike Ditka - If God had wanted man to play soccer, he wouldn't have given us arms. 2009/2/17 Paul M Foster pa...@quillandmouse.com On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote: Here's a question related to my last post. When specifying

Re: [PHP] Opinions Please, Describing PHP as Web Framework of C and C++

2009-02-16 Thread German Geek
I thought its an interface as in Common Gateway Interface. :-P You are right it isn't a specific connection to C. CGI can basically be used with any language. A protocol to me is something like TCP/IP or http etc. Like a language between a network of nodes. Tim-Hinnerk Heuer

Re: [PHP] for the security minded web developer - secure way to login?

2009-02-15 Thread German Geek
OK, i hear about this self signed certificate. Whenever i signed anything it just came up with all these warnings in FF which confuses users and i think is not good at all. Can someone paste a link in here to a website with a self signed cert please? Would like to see if there are any warnings

Re: [PHP] for the security minded web developer - secure way to login?

2009-02-15 Thread German Geek
just the hassle of setting it up? Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Fred Allen - California is a fine place to live - if you happen to be an orange. 2009/2/16 Michael A. Peters mpet...@mac.com German Geek wrote: OK, i hear about this self signed certificate. Whenever i

Re: [PHP] Re: Sorting times

2009-02-15 Thread German Geek
The easiest would probably to use http://nz.php.net/manual/en/function.strnatcmp.php . It would happen to sort it the right way because am is before pm ;-). You can of course make it more challenging by converting it into a timestamp etc. That would be better if you want to sort by date as well

Re: [PHP] Re: Sorting times

2009-02-15 Thread German Geek
place to live - if you happen to be an orange. 2009/2/16 Mattias Thorslund matt...@thorslund.us German Geek wrote: The easiest would probably to use http://nz.php.net/manual/en/function.strnatcmp.php . It would happen to sort it the right way because am is before pm ;-). Nope

[PHP] for the security minded web developer - secure way to login?

2009-02-14 Thread German Geek
Hi All, A few months ago it came to my mind, that it might be possible to make non-https session (reasonably) secure by at least not letting people login that shouldn't because they might have sniffed the password from a user. Please let me know if you can find a loop hole in this process. I

Re: [PHP] [Fwd] How to make a secured login form

2009-02-14 Thread German Geek
Have a look at my post called for the security minded web developer - secure way to login?. It seems like a similar idea with less overhead. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Joan Rivers - Never floss with a stranger. 2009/2/14 Virgilio Quilario virgilio.quila...@gmail.com

Re: [PHP] Execute EXE with variables

2009-02-14 Thread German Geek
Hi, I've had a lot of problems with shell_exec too. Mostly it was permissions or environment variables not being set. i dont know if there is a way to set environment variables in the php.ini but if not you can set them with shell_exec as well, at least on unix it works. You can simply

Re: [PHP] list all constitute group of array ?

2009-02-14 Thread German Geek
Do you want exactly that list or simply all the possible combinations? If you want all possible combinations, search for a permute or permutation function in php... Does sound like homework lol. :-) Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Alanis Morissette - We'll love you just

Re: [PHP] for the security minded web developer - secure way to login?

2009-02-14 Thread German Geek
Hi gang, Was just thinking of a cheap solution for sites that don't require absolute security. A SSL cert cost about $150 a year. Sites like facebook could use this... Of course it's not for banks etc. You could degrade gracefully when javascript is turned off to just sending the form and

Re: [PHP] Happy 1234567890 day!

2009-02-13 Thread German Geek
It's not the 1234567890th day! Its the 12345Gmail - [PHP] Happy 1234567890 day! - th.he...@gmail.com ?shva=1#label/PHP/11f70b391d7613f767890 second since beginning of 1970: 2009-02-14 12:31:30 is the result of $a = 1234567890;// * 60*60*24; die(date(Y-m-d H:i:s, $a)); Anyway happy 1234567890

Re: [PHP] Simple open source CMS as a starting point

2009-02-12 Thread German Geek
Drupal is probably not the easiest at first, but has a good API and buckets full of modules, themes and all that stuff. If a framework would be what you are looking for, i would recommend Symfony. Also heard good things about eZ Publish, Textpattern, Typo3, Website Baker and WordPress. You can

Re: [PHP] PHP OOP

2009-02-10 Thread German Geek
A loosely typed language like PHP might not be the best choice for teaching OOP, because even though PHP makes it easier with loose types, you should know about them and how they are stored etc. PHP is a great language but maybe not strict enough for students to understand all the errors that can

[PHP] (Perl) Regular Expressions - oposite match or get the non-matches of a substring

2009-02-10 Thread German Geek
Hi all, I consider myself quite good with Regular Expression, but i could never find out how to match something like: match this but not this and that so i would like to match the first match this (or another this) but not not this. Seems pretty straight forward but i haven't found a (good)

Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread German Geek
I try to avoid nesting loops altogether if possible. Usually dont go beyond 3 levels of nesting... How can you require 8 levels of nesting? surely there must be something wrong or a more efficient algorithm... Tim-Hinnerk Heuer http://www.ihostnz.com Garry Shandling - I'm dating a woman now

Re: [PHP] Session variables

2009-02-07 Thread German Geek
Yeah i guess the cookie doesn't need to be stored on the server since it's in the header anyway. Thanks for clearing that up. Tim-Hinnerk Heuer http://www.ihostnz.com Charles M. Schulz - I love mankind; it's people I can't stand. 2009/2/7 Stuart stut...@gmail.com 2009/2/7 Paul M Foster

Re: [PHP] Re: move_uploaded_file() problem

2009-02-07 Thread German Geek
make sure the permissions on the folders are right, so at least read for the httpd in the tmp folder and write in the destination folder. since its moving i would make them both writeable to the webserver daemon user. permissions can be annoying are necessary though... They caught me quite a few

Re: [PHP] Session variables

2009-02-06 Thread German Geek
The session data is stored on the server. In the user's browser, only a session cookie is stored, usually a random session id string. I could never retrieve the session variables with any browser tools, always only with PHP by echoing them out or something. Also, a cookie is simply a text file

Re: [PHP] Sometime the code works and sometimes doesn't

2009-02-05 Thread German Geek
I would also suggest that you hash the passwords at least (better even with a salt value) and then reset the password to something random before sending it to the user. Email can be sniffed relatively easily and this would expose a possible carefully chosen password by the user and then they have

Re: [PHP] function_exists question

2009-02-05 Thread German Geek
Why can't you update to Version 5? I might be a bit anal about trying to always get the newest version of everything, but seriously version 3 has surely more known security issues as well as performance costs. What's the cost of upgrading compared to the cost of writing code that works in every

Re: [PHP] German characters Ö,Ä etc. show up as ?

2009-02-05 Thread German Geek
Do they show up as ? just in the web page or in the source returned? Did you check the source of the page? I had this problem before and as far as i remember, i just needed to encode them like oe (have an american keyboard ;-) ouml; etc. If it's a literal ? in the source, it's PHP and you might

Re: [PHP] How can I use a function's default arguments but change one of the end ones in the list?

2009-02-05 Thread German Geek
I've thought about this problem before but couldn't think of a solution either. How does func_get_args() solve this? You could make a wrapper function without that. How would u (php) know which parameter u mean in a particular case? I think it would just be useful to have an IDE that can write

Re: [PHP] Question about version control.. sorta..

2009-02-05 Thread German Geek
I use GIT and Subversion. Subversion is still a bit hard to use (branching etc) and not distributed but that was before i knew about GIT :-P. You have a central repository that you need to commit to and it's still quite CVS like (which is really confusing and horrible). GIT is nice and fast and

Re: [PHP] PHP Linux/Windows Outlook 2003 HTML email problem

2009-02-02 Thread German Geek
It seems like this solves the issue: http://pear.php.net/bugs/bug.php?id=12032 Sorry, just hadn't found this before. Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Feb 2, 2009 at 7:24 PM, Chris dmag...@gmail.com wrote: German Geek wrote: Hi All, We've got a problem with our Ubuntu

[PHP] PHP Linux/Windows Outlook 2003 HTML email problem

2009-02-01 Thread German Geek
Hi All, We've got a problem with our Ubuntu Linux machine sending HTML emails to Outlook 2003: It's an Ubuntu Server (uname -a Linux CDR2-221 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686 GNU/Linux) with the newest version of Postfix installed as the Mail server. Unfortunately, all

Re: [PHP] shell_exec seems to hang other web requests while running convert

2008-12-23 Thread German Geek
though. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:41 PM, Nathan Nobbe quickshif...@gmail.comwrote: On Mon, Dec 22, 2008 at 11:34 PM, German Geek geek...@gmail.com wrote: cron is a good idea, havent thought about that. One could use the nice program

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-23 Thread German Geek
oops, yes of course lol Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:43 PM, Lars Torben Wilson larstor...@gmail.comwrote: 2008/12/22 German Geek geek...@gmail.com: agree, ++$i wont save u nething, it just means that the variable is incremented after it is used: You

Re: [PHP] eof bof in php

2008-12-23 Thread German Geek
Totally agree. Whenever i can i put html outside of php tags mainly because the code gets more readable because in eclipse u get syntax highlighting etc. Tim-Hinnerk Heuer http://www.ihostnz.com On Wed, Dec 24, 2008 at 4:13 AM, tedd tedd.sperl...@gmail.com wrote: At 2:21 PM -0500 12/22/08,

[PHP] MERRY XMAS

2008-12-23 Thread German Geek
Merry xmas to everyone! Thanks for the support and fun discussions. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com

[PHP] shell_exec seems to hang other web requests while running convert

2008-12-22 Thread German Geek
Hi All, The following problem: Our client is converting pdfs to images with a web interface. At the moment I'm using convert from imagemagick with shell_exec (i know i could use the imagick module, but this would require quite a bit of recoding and time at the moment, it was originally running

Re: [PHP] shell_exec seems to hang other web requests while running convert

2008-12-22 Thread German Geek
, Dec 22, 2008 at 9:06 PM, German Geek geek...@gmail.com wrote: Hi All, The following problem: Our client is converting pdfs to images with a web interface. At the moment I'm using convert from imagemagick with shell_exec (i know i could use the imagick module, but this would require quite

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-22 Thread German Geek
agree, ++$i wont save u nething, it just means that the variable is incremented after it is used: $i = 0; while ($i 4) echo $i++; will output 0123 while $i = 0; while ($i 4) echo ++$i; will output 1234 Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:25 PM, Nathan

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
$users is an array and you are trying to simply put it in a string. $x seems to be undefined ergo it's not printing anything. If 'U' is the index in the array for your variable, use the '.' operator to concatenate strings: echo tr td width='110' bgcolor='$row_color' nowrap ' .

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
://www.ihostnz.com On Mon, Dec 22, 2008 at 11:12 AM, Marc Steinert li...@bithub.net wrote: German Geek schrieb: Why is the first method faster and uses less memory? Because the concatenation operator first reassembles a new string, stores it in memory then passes this newly created string

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
Why is the first method faster and uses less memory? Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 22, 2008 at 10:59 AM, Marc Steinert li...@bithub.net wrote: MikeP schrieb: I have tried putting the quotes all over and all I get is: 'Array[U]'. Try to avoid accessing the

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
Yes, i agree with this. Even if it takes a few nano seconds more to write out more understandable code, it's worth doing it because code management is more important than sqeezing out the last nano second. And then also an $var = Hello; echo $val World; has less characters than and is more

Re: [PHP] SimpleXML - issue with getting data out of the object returned

2008-12-18 Thread German Geek
Tim-Hinnerk Heuer http://www.ihostnz.com On Fri, Dec 19, 2008 at 3:50 PM, Dan Joseph dmjos...@gmail.com wrote: Hi, I have a basic XML document that I am grabbing with simplexml_load_string(), here is the print_r: SimpleXMLElement Object ( [Package] = SimpleXMLElement Object

Re: [PHP] Create unique non-autoincrement key for 700,000 records?

2008-12-15 Thread German Geek
If i had to guess, it would be the column/field in the table that has the autoincrement value. Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 16, 2008 at 5:29 PM, Rob Gould gould...@mac.com wrote: update mytable set hash_field = md5(AutoIdField + unix_timestamp()) I _think_ I

Re: [PHP] php client

2008-12-14 Thread German Geek
On Mon, Dec 15, 2008 at 11:07 AM, Stephen stephe...@rogers.com wrote: idan72 wrote: Hi, I am new to PHP. I want to write a web client in PHP that will data to a server written in Java. I want that the client will send an object to the server. Don't know if that would be easy in PHP. I

Re: [PHP] Good PHP book?

2008-12-14 Thread German Geek
The best book is php.net, if you already know a programming language ;-). Otherwise Ashley is probably right. I haven't read any books on php, got all the info off the web, but it's still my main language atm. Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 15, 2008 at 11:48 AM, Ashley

Re: [PHP] Chrome 1.0 released

2008-12-14 Thread German Geek
Conspiracy against M$? I thought they were conspiring against the world :-) Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 15, 2008 at 2:22 PM, Yeti y...@myhich.com wrote: It more and more seems like a conspiracy against M$ to me. A company trying to make up its own standards every

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread German Geek
On Fri, Dec 12, 2008 at 7:03 AM, tedd tedd.sperl...@gmail.com wrote: At 11:23 AM -0500 12/11/08, Robert Cummings wrote: On Thu, 2008-12-11 at 11:05 -0500, tedd wrote: When I say Hack a site I mean to do something to get the site to provide an unintended result as expected by the author.

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread German Geek
This list seems to be turning into a MySQL list with a few PHP questions... Tim-Hinnerk Heuer http://www.ihostnz.com On Fri, Dec 12, 2008 at 1:53 PM, bruce bedoug...@earthlink.net wrote: Hi guys. Architecting an app that's going to have users interacting with different levels of the

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread German Geek
Christmas... the season of giving and tolerance :| On Fri, 2008-12-12 at 13:56 +1300, German Geek wrote: This list seems to be turning into a MySQL list with a few PHP questions... Tim-Hinnerk Heuer http://www.ihostnz.com On Fri, Dec 12, 2008 at 1:53 PM, bruce bedoug

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread German Geek
On Wed, Dec 10, 2008 at 10:27 PM, Stut [EMAIL PROTECTED] wrote: On 10 Dec 2008, at 04:15, German Geek wrote: I need to sort an array of objects. I found this ( at a url that didnt let me send this msg... ) and I would know how to do it, but I believe there might be a cleaner, more elegant

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 6:43 AM, Robert Cummings [EMAIL PROTECTED]wrote: On Thu, 2008-12-11 at 01:31 +1300, German Geek wrote: On Wed, Dec 10, 2008 at 10:27 PM, Stut [EMAIL PROTECTED] wrote: On 10 Dec 2008, at 04:15, German Geek wrote: I need to sort an array of objects. I found

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 12:28 PM, [EMAIL PROTECTED] wrote: Inefficiency for me is when it takes longer to code. How long can this take? That's why i like PHP. It's very quick to do stuff in, even if arrays are not always the ultimate data structure, they're easy to handle with all the nice

Re: [PHP] Can GD make a JPG thumbnail of a PDF?

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 1:59 PM, Stephen Johnson [EMAIL PROTECTED] wrote: I think you want something like this : exec(convert -density 360x360 -enhance $pdfFile $pdfFile.gif); Yes, that's how i did it here. Didn't find a better solution yet. Was looking at the php module for imagemagick

Re: [PHP] Re: converting a vid with ffmpeg - howto do progress bars?

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 1:53 PM, Rene Veerman [EMAIL PROTECTED] wrote: Colin Guthrie wrote: 'Twas brillig, and Rene Veerman at 10/12/08 23:03 did gyre and gimble: Well, nowhere can i find the frame count being printed, but there _is_ a duration: hh:mm:ss:ms field outputted, and the updating

Re: [PHP] Re: converting a vid with ffmpeg - howto do progress bars?

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 2:27 PM, Rene Veerman [EMAIL PROTECTED] wrote: German Geek wrote: On Thu, Dec 11, 2008 at 1:53 PM, Rene Veerman [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Colin Guthrie wrote: 'Twas brillig, and Rene Veerman at 10/12/08 23:03 did gyre

Re: [PHP] array_intersect question

2008-12-10 Thread German Geek
On Tue, Dec 2, 2008 at 11:06 PM, Andrej Kastrin [EMAIL PROTECTED]wrote: It works like a charm. Thanks, Andrej Tim | iHostNZ wrote: I know there must be a more elegant way with array_reduce or something, but I would simply write a function called function array_intersect_m($m_array) {

Re: [PHP] Need help on MySQL query

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 4:52 PM, Rahat Bashir [EMAIL PROTECTED]wrote: Hi Experts, EID Mubarak to all. I need your help on writing a MySQL query. Scenario: CREATE TABLE transaction ( `id` int NOT NULL ATUTO INCREMENT, `date` datetime NOT NULL, `withdrawn` double (12,2) NULL,

Re: [PHP] Accounting component in PHP

2008-12-09 Thread German Geek
You can do raw queries also... Just makes trivial queries and your model (if you believe in modelling) easier to manage. Believe me, I thought like you did before using symfony. On Tue, Dec 9, 2008 at 10:52 PM, altern [EMAIL PROTECTED] wrote: All my queries are complex. If I will use ORM, then

Re: [PHP] A MySQL Question

2008-12-09 Thread German Geek
On Tue, Dec 9, 2008 at 10:49 PM, Yeti [EMAIL PROTECTED] wrote: As a matter of fact, in space you can't even scream. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I don't know if there is a better or best solution to this, but an

[PHP] pear Mail/Mime problem on new Ubuntu Linux server

2008-12-09 Thread German Geek
Hi All, Can someone think of a reason why when changing from a Windows 2003 Web Edition server running PHP 5.2 to a Ubuntu machine, also with PHP 5.2 can cause the following problem: The emails sent from the server, which should be in HTML format (the client wanted this specifically) now only

Re: [PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread German Geek
On Wed, Dec 10, 2008 at 1:13 PM, Stut [EMAIL PROTECTED] wrote: On 9 Dec 2008, at 23:24, Daniel Kolbo wrote: Maciek Sokolewicz wrote: Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one

[PHP] usort for sorting an array of objects

2008-12-09 Thread German Geek
Hi Guys, I need to sort an array of objects. I found this ( at a url that didnt let me send this msg... ) and I would know how to do it, but I believe there might be a cleaner, more elegant way to do it. In Java, you just need to implement the interface Comparable and provide a method called

Re: [PHP] Include directive..

2008-12-08 Thread German Geek
On Tue, Dec 9, 2008 at 12:47 AM, dele454 [EMAIL PROTECTED] wrote: Hi, I am modifying the apache config file on my domain to include the path to the Zend Framework on a specified location outside the public folder. So in my http.conf file i simply include the path to where the includes

Re: [PHP] Accounting component in PHP

2008-12-08 Thread German Geek
You can do raw SQL queries with ORM as well, at least in symfony ;). An ORM makes other, rather trivial queries a whole lot easier though and a framework like symfony makes development of generic requirements a lot faster and cleaner. On Tue, Dec 9, 2008 at 4:07 AM, altern [EMAIL PROTECTED]

Re: [PHP] A MySQL Question

2008-12-08 Thread German Geek
On Tue, Dec 9, 2008 at 2:46 PM, Micah Gersten [EMAIL PROTECTED] wrote: Robert Cummings wrote: On Tue, 2008-12-09 at 00:16 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Mon, 2008-12-08 at 23:23 +, [EMAIL PROTECTED] wrote: Presumable, the EXISTS sub-query can be optimized

Re: [PHP] A MySQL Question

2008-12-08 Thread German Geek
On Tue, Dec 9, 2008 at 3:51 PM, Micah Gersten [EMAIL PROTECTED] wrote: German Geek wrote: On Tue, Dec 9, 2008 at 2:46 PM, Micah Gersten [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Robert Cummings wrote: On Tue, 2008-12-09 at 00:16 +, Nathan Rixham wrote

  1   2   >