I usually roll my own, unless there's a free lib / cms that does the
trick near-perfectly, and is well-written (so extensible)
About 80-90% of my tasks require me to use one of my own frameworks (i
have 2, one "simple" and one with many graphical gimmicks), and i
re-use / improve the mid-level fun
Shortly ago, moving from programming in Gtk+ / C++ to PHP for the first
time in my life, I made a good study of the available rapid application
development options out there, studied a few PHP frameworks, read the
opinions on the internet about it, then initially decided to use a
framework to speed
On 27 Jan 2010, at 00:17, Daevid Vincent wrote:
> And for those interested, here are the results of the last poll:
>
> "To add the final ?> in PHP or not..."
> http://www.rapidpoll.net/show.aspx?id=arc1opy
>
> I'm relieved to know I'm in the majority (almost 2:1) who close their
> opening PHP tag
2010/1/25 Richard Quadling :
> Hi.
>
> I'm in the process of building a web service which incorporates the
> ability for the server to inform the client that a particular call has
> been superseded by another.
>
> So, cut down (I've removed all the other details), ...
>
> class ServiceDetails
>
Hypothetically say that I have MySQL with petabytes of data. I want to
use XSL as my template language. But in order to use XSL, I need to make
XML filled with petabytes of data. This does not sound elaborate way to
use XSL/XML; I would rather use PHP/MySQL/Smarty. Is there a way around
this so
On Wed, 2010-01-27 at 03:31 -0800, Ryan Park wrote:
> Hypothetically say that I have MySQL with petabytes of data. I want to
> use XSL as my template language. But in order to use XSL, I need to make
> XML filled with petabytes of data. This does not sound elaborate way to
> use XSL/XML; I woul
My only reason doing this because I could use XSL as my templating
engine; achieve the separation of content, design, and code. But in
order to use XSL I need to use XML. XML needs to big if I want to use
the data from the huge MySQL database.
On 1/27/2010 3:32 AM, Ashley Sheridan wrote:
On W
On Wed, 2010-01-27 at 03:39 -0800, Ryan Park wrote:
> My only reason doing this because I could use XSL as my templating
> engine; achieve the separation of content, design, and code. But in
> order to use XSL I need to use XML. XML needs to big if I want to use
> the data from the huge MySQL d
On Tue, 2010-01-26 at 18:54 +0100, PEPITOVADECURT wrote:
> Exists any reports generator that exports directly to html/php?
>
>
What do you want to generate reports on? I would assume this would be
some sort of data from a database, and that you're looking for a
PHP-based reporting tool that ca
Hi All,
I know that a class can only inherit from one other single class in PHP,
but how would I go about simulating a multiple class inheritance? For
example, if I had several small classes that dealt with things like form
generation, navbar generation, etc, how could I create a class in which
th
> -Original Message-
> From: Daevid Vincent [mailto:dae...@daevid.com]
> Sent: 26 January 2010 03:52
>
> if (substr($mydata->restored,0,4) == "") { }
>
> Or in your very specific case you could do the harder way and note
> that
> strings work like simple arrays too in a way, so $mydat
Ryan Park wrote:
Hypothetically say that I have MySQL with petabytes of data. I want to
use XSL as my template language. But in order to use XSL, I need to
make XML filled with petabytes of data. This does not sound elaborate
way to use XSL/XML; I would rather use PHP/MySQL/Smarty. Is there a
If you want m-inheritance, you can "include" (encapsulate is the word
i think) your smaller classes in "midware" and "big top-level" classes
that expose (part of) their interfaces. It's easy.
But guard against creating too many dependencies between different
smaller classes to and "bigger" classes
Oh, and i'd allow 1 (or _maybe_ 2) "very big" super-class(es) at the
top level of a framework / cms, that do include 50-100 smaller
classes.
"midware" classes can evolve (be extracted) from the superclass, as
your app evolves.
Try to keep groups of functions relating to as few smaller/lower
classe
On Tue, Jan 26, 2010 at 19:48, Daevid Vincent wrote:
>
> Another thing I just noticed, is that we (that is Dan and I) should NOT
> have used count()
> This is bad form and wasted cycles.
This is certainly correct, but it should also be noted that my
original code used it once (thus, it was in
1, you can implement multiple interfaces
2, you may want to return object instead of extending classes,
eg.
class Small_Class_Abstract
{
public function getFormGeneration()
{
return new Form_Generation();
}
}
class Small_Class_A extends Small_Class_Abstract
{
}
$A = new Small_Class_A();
2010/1/27 Ryan Sun :
> 1, you can implement multiple interfaces
>
> 2, you may want to return object instead of extending classes,
> eg.
> class Small_Class_Abstract
> {
> public function getFormGeneration()
> {
> return new Form_Generation();
> }
> }
> class Small_Class_A extends Small_Class
On Wed, Jan 27, 2010 at 5:52 AM, Ashley Sheridan
wrote:
> Hi All,
>
> I know that a class can only inherit from one other single class in PHP,
> but how would I go about simulating a multiple class inheritance? For
> example, if I had several small classes that dealt with things like form
> genera
"... should be obvious - but are often overlooked - points within coding
practice that can cause the programmer to develop bad habits and bad
code." - Dan Brown
Tip #1:
Don't use count() in loops unless there are very few items to count and
performance doesn't matter, or the number will vary over
On Wed, 2010-01-27 at 10:42 -0500, Paul M Foster wrote:
> "... should be obvious - but are often overlooked - points within coding
> practice that can cause the programmer to develop bad habits and bad
> code." - Dan Brown
>
> Tip #1:
>
> Don't use count() in loops unless there are very few item
Paul M Foster wrote:
"... should be obvious - but are often overlooked - points within coding
practice that can cause the programmer to develop bad habits and bad
code." - Dan Brown
Tip #1:
Don't use count() in loops unless there are very few items to count and
performance doesn't matter, or th
On Wed, 2010-01-27 at 08:01 -0800, Michael A. Peters wrote:
> Paul M Foster wrote:
> > "... should be obvious - but are often overlooked - points within coding
> > practice that can cause the programmer to develop bad habits and bad
> > code." - Dan Brown
> >
> > Tip #1:
> >
> > Don't use count(
On Wed, Jan 27, 2010 at 11:44 PM, Ashley Sheridan
wrote:
> On Wed, 2010-01-27 at 10:42 -0500, Paul M Foster wrote:
>
> > "... should be obvious - but are often overlooked - points within coding
> > practice that can cause the programmer to develop bad habits and bad
> > code." - Dan Brown
> >
> >
On Thu, 2010-01-28 at 00:08 +0800, Eric Lee wrote:
> On Wed, Jan 27, 2010 at 11:44 PM, Ashley Sheridan
> wrote:
>
> > On Wed, 2010-01-27 at 10:42 -0500, Paul M Foster wrote:
> >
> > > "... should be obvious - but are often overlooked - points within coding
> > > practice that can cause the progra
2010/1/27 Michael A. Peters :
> Paul M Foster wrote:
>>
>> "... should be obvious - but are often overlooked - points within coding
>> practice that can cause the programmer to develop bad habits and bad
>> code." - Dan Brown
>>
>> Tip #1:
>>
>> Don't use count() in loops unless there are very few
Richard Quadling wrote:
for ($i = 0, $j = count($a) ; $i < $j ; ++$i) {
}
is a very common way to handle that.
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2010/1/27 Richard Quadling :
> 2010/1/27 Michael A. Peters :
>> Paul M Foster wrote:
>>>
>>> "... should be obvious - but are often overlooked - points within coding
>>> practice that can cause the programmer to develop bad habits and bad
>>> code." - Dan Brown
>>>
>>> Tip #1:
>>>
>>> Don't use cou
At 3:39 AM -0800 1/27/10, Ryan Park wrote:
My only reason doing this because I could use XSL as my templating
engine; achieve the separation of content, design, and code. But in
order to use XSL I need to use XML. XML needs to big if I want to
use the data from the huge MySQL database.
On 1/2
On Wed, Jan 27, 2010 at 16:44, Ashley Sheridan
wrote:
> What about using the right type of quotation marks for output:
>
> I use double quotes(") if I expect to output variables within the
> string, and single quotes when it's just a simple string.
>
> It's only a general rule of thumb and should
On Wed, Jan 27, 2010 at 12:08, Daniel Egeberg wrote:
>
> There is virtually no difference nowadays. It's a long time since
> anything like that has mattered.
Actually, that's not true enough to be dismissive. It depends on
several factors.
--
daniel.br...@parasane.net || danbr...@php.net
On Wed, Jan 27, 2010 at 18:13, Daniel Brown wrote:
> On Wed, Jan 27, 2010 at 12:08, Daniel Egeberg wrote:
>>
>> There is virtually no difference nowadays. It's a long time since
>> anything like that has mattered.
>
> Actually, that's not true enough to be dismissive. It depends on
> several
On Wed, 2010-01-27 at 18:26 +0100, Daniel Egeberg wrote:
> On Wed, Jan 27, 2010 at 18:13, Daniel Brown wrote:
> > On Wed, Jan 27, 2010 at 12:08, Daniel Egeberg wrote:
> >>
> >> There is virtually no difference nowadays. It's a long time since
> >> anything like that has mattered.
> >
> >Actu
On Wed, Jan 27, 2010 at 12:26, Daniel Egeberg wrote:
>
> Well, I would still say it's far too insignificant to bother with.
And for the most part, you'd be right but it still isn't good
practice to *not* teach something strictly because it's not entirely
significant.
For example, pol
Ashley Sheridan wrote:
On Wed, 2010-01-27 at 18:26 +0100, Daniel Egeberg wrote:
On Wed, Jan 27, 2010 at 18:13, Daniel Brown wrote:
On Wed, Jan 27, 2010 at 12:08, Daniel Egeberg wrote:
There is virtually no difference nowadays. It's a long time since
anything like that has mattered.
Actu
On Wed, Jan 27, 2010 at 12:27, Ashley Sheridan
wrote:
>
> Depends I guess on how far you need to optimise the code. I'd imagine that to
> something like Facebook, every split-second of optimisation is worth it, as
> even a 100th of a second becomes minutes of wasted time over the course of a
>
Daniel Brown wrote:
On Wed, Jan 27, 2010 at 12:27, Ashley Sheridan
wrote:
Depends I guess on how far you need to optimise the code. I'd imagine that to
something like Facebook, every split-second of optimisation is worth it, as
even a 100th of a second becomes minutes of wasted time over t
On 1/26/2010 6:08 PM, clanc...@cybec.com.au wrote:
In principle this is extremely simple. Take your existing procedure to generate
the page
then:
1. $page = '';
2. Replace every echo 'whatever'; statement with $page .= 'whatever';, and
every
with $page .= '';
3. file_put_contents($page,$fil
Hello,
I'm pretty "sure" (in realty I do not understand a lot about the problem... :(
) this is a distribution or a version problem but maybe some PHP/bash expert
here could have some idea and tell me what I could try to solve the problem
described here :
http://ubuntuforums.org/showthread.ph
Kim Madsen wrote:
But Skip, as the others say, use a date class, since you're passing a
php var on to the SQL anyway, then you could determine the exact days
from start to end of donation. Combine this with to_days and you have
your solution
Yes, this sounds like the best way to go.
Than
Have you tried letting the php script output "\r\n" instead of just
"\n" as newline ?
On Wed, Jan 27, 2010 at 10:46 PM, Alexandre Simon wrote:
> Hello,
>
> I'm pretty "sure" (in realty I do not understand a lot about the problem...
> :( ) this is a distribution or a version problem but maybe so
I'd like to add that when dealing with large memory structures,
usually arrays, combining them is fastest when done like this:
$array1 += $array2;
This will not always produce correct results when dealing with arrays
that contain identical keys, but for non-overlapping arrays it is far
faster tha
Hey all,
I'm looking for recommendations on how to replace accented
characters, like e and u with those two little dots above
them, with the regular e and u characters.
I'm finding some solutions via Google, but would like to hear
from some of you to hear how you handle those situations.
T
Hi Everyone,
I'm sure I'm missing something simple. I'm trying to store dates of birth
prior to 1970 in mysql. I've tried mysql's date_format but am hitting a
wall. I'm chasing my tail and was hoping for the best practice.
Many Thanks
Haig
Looks like strtr() is the way to go?
Skip
Skip Evans wrote:
Hey all,
I'm looking for recommendations on how to replace accented characters,
like e and u with those two little dots above them, with the regular e
and u characters.
I'm finding some solutions via Google, but would like to hear
Haig,
What kind of problems are you having? I do this by using the date
function to convert to the -MM-DD format for MySQL. I've had no problems
with birth dates prior to 1970.
Take care,
Floyd
On Jan 27, 2010, at 5:58 PM, Haig Davis wrote:
> Hi Everyone,
>
> I'm sure I'm missin
On Wed, 27 Jan 2010 16:55:46 -0600, Skip Evans wrote:
>I'm looking for recommendations on how to replace accented
>characters, like e and u with those two little dots above
>them, with the regular e and u characters.
$newText = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
But ensure you have set
On Wed, 27 Jan 2010 10:21:00 -0800, deal...@gmail.com (dealtek) wrote:
>On 1/26/2010 6:08 PM, clanc...@cybec.com.au wrote:
>
>> In principle this is extremely simple. Take your existing procedure to
>> generate the page
>> then:
>>
>> 1. $page = '';
>>
>> 2. Replace every echo 'whatever'; stateme
On Wed, Jan 27, 2010 at 7:58 PM, Haig Davis wrote:
> Hi Everyone,
>
> I'm sure I'm missing something simple. I'm trying to store dates of birth
> prior to 1970 in mysql. I've tried mysql's date_format but am hitting a
> wall. I'm chasing my tail and was hoping for the best practice.
>
> Many Thank
On Thu, 2010-01-28 at 10:25 +1100, Ross McKay wrote:
> On Wed, 27 Jan 2010 16:55:46 -0600, Skip Evans wrote:
>
> >I'm looking for recommendations on how to replace accented
> >characters, like e and u with those two little dots above
> >them, with the regular e and u characters.
>
> $newText =
On Wed, 2010-01-27 at 20:38 -0300, Jonathan Tapicer wrote:
> On Wed, Jan 27, 2010 at 7:58 PM, Haig Davis wrote:
> > Hi Everyone,
> >
> > I'm sure I'm missing something simple. I'm trying to store dates of birth
> > prior to 1970 in mysql. I've tried mysql's date_format but am hitting a
> > wall.
On Wed, 2010-01-27 at 23:27 +0100, Rene Veerman wrote:
> Have you tried letting the php script output "\r\n" instead of just
> "\n" as newline ?
>
> On Wed, Jan 27, 2010 at 10:46 PM, Alexandre Simon wrote:
> > Hello,
> >
> > I'm pretty "sure" (in realty I do not understand a lot about the proble
On Wed, 27 Jan 2010 23:38:42 +, Ashley Sheridan wrote:
>Don't forget that changing some characters can actually change the words
>and meanings of words. While an ë might look like and e, it's actually a
>completely different character, with a different pronunciation to go
>with it. [...]
True
Ryan Park wrote:
> Hypothetically say that I have MySQL with petabytes of data. I want to
> use XSL as my template language. But in order to use XSL, I need to make
> XML filled with petabytes of data. This does not sound elaborate way to
> use XSL/XML; I would rather use PHP/MySQL/Smarty. Is there
Ashley Sheridan wrote:
> Hi All,
>
> I know that a class can only inherit from one other single class in PHP,
> but how would I go about simulating a multiple class inheritance? For
> example, if I had several small classes that dealt with things like form
> generation, navbar generation, etc, how
Daniel Egeberg wrote:
> On Wed, Jan 27, 2010 at 18:13, Daniel Brown wrote:
>> On Wed, Jan 27, 2010 at 12:08, Daniel Egeberg wrote:
>>> There is virtually no difference nowadays. It's a long time since
>>> anything like that has mattered.
>>Actually, that's not true enough to be dismissive. I
Richard Quadling wrote:
> 2010/1/27 Richard Quadling :
>> 2010/1/27 Michael A. Peters :
>>> Paul M Foster wrote:
"... should be obvious - but are often overlooked - points within coding
practice that can cause the programmer to develop bad habits and bad
code." - Dan Brown
Nathan Rixham wrote:
> Daniel Egeberg wrote:
>> On Wed, Jan 27, 2010 at 18:13, Daniel Brown wrote:
>>> On Wed, Jan 27, 2010 at 12:08, Daniel Egeberg wrote:
There is virtually no difference nowadays. It's a long time since
anything like that has mattered.
>>>Actually, that's not true
On Wed, Jan 27, 2010 at 04:55:46PM -0600, Skip Evans wrote:
> Hey all,
>
> I'm looking for recommendations on how to replace accented
> characters, like e and u with those two little dots above
> them, with the regular e and u characters.
FWIW, those two dots are called an "umlaut".
Paul
--
Pa
I think someone has been having fun with the Poll... ;-)
It used to be like 10::20 and now it's 71::31... Hmmm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I actually started on a report class yesterday, and I have a few questions,
but first some details:
- Reports will be on user orders (ticket reservations).
- Need to be able to build a large variety of reports based on existing data
+ Orders by a specific user
+ Orders for a specific product (ev
On Wed, Jan 27, 2010 at 08:20:21PM -0800, Allen McCabe wrote:
> I actually started on a report class yesterday, and I have a few questions,
> but first some details:
>
> - Reports will be on user orders (ticket reservations).
> - Need to be able to build a large variety of reports based on existi
Allen, i think your primary design consideration is this;
> - Need to be able to build a large variety of reports based on existing data
This would lead me to jump at a 'plugin' solution.
I'd make:
- 1 superclass as interface to the rest of your webapp(s)
- 1 "top-class" that has the
I'd give short-but-descriptive variable- and function-naming a much
higher priority than something that not really affects
code-reliability.
And i'd insist on doing all names and comments in english, even if
it's broken english.
It makes code much easier to be taken over by someone of another nati
The problem has nothing to do with "myscript.php" output.
The problem is in bash completion process wich involves only
"echoscrip.[php|sh]". These scripts only have (to my comprehension) to output a
single string, without newline and it is what they do.
The fact is, and I do not understand why be
Le 28 janv. 2010 à 00:42, Ashley Sheridan a écrit :
On Wed, 2010-01-27 at 23:27 +0100, Rene Veerman wrote:
> My initial goal is to complete a PHP script, using the PHP script itselfs as function for bash completion. Mechanism that works perfectly on some other platforms (with different PHP AND b
65 matches
Mail list logo