Michael A. Peters wrote:
If you need something where Julian day really is better, I assume it
isn't that hard to convert between posix and julian day, though it seems
odd to me that it isn't part of the date() function. It probably should be.
Looks like unixtojd() and jdtounix() do it.
-
Paul M Foster wrote:
Typically, coders try to store dates in unix timestamps internally, and
then add 86400 seconds for every day to calculate intervals and such.
This is often inaccurate. Julian days are far more accurate.)
Paul
I use seconds from epoch in the database simply because it wor
On Mon, Jan 25, 2010 at 08:12:43PM -0800, Daevid Vincent wrote:
> > -Original Message-
> > From: Paul M Foster [mailto:pa...@quillandmouse.com]
> > Sent: Monday, January 25, 2010 8:05 PM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] If the first four characters are "", then
On Mon, Jan 25, 2010 at 09:54:40PM -0600, Skip Evans wrote:
> Hey all,
>
> I have an SQL query that's stumping me.
>
> I have two date variables, $start and $end that are in
> mm/dd/ format and two database fields, start_date and
> no_donations. The start date is mm/dd/ format and
> no_don
On Mon, Jan 25, 2010 at 11:12 PM, Daevid Vincent wrote:
>> >From what I understand, strpos() faster than a lot of other similar
>> string functions and much faster than regexps. You could do:
>>
>> if (strpos($mydata->restored, '') === 0) {
>> do_stuff();
>> }
>
> Ah. Clever use of the "
On Tue, Jan 26, 2010 at 02:02:18PM +1000, Angus Mann wrote:
> Hi all.
>
> I'm currently using the phpmailer class from phpmailer.worxware.com to send
> datatbase -populated emails to clients.
>
> At the moment I'm runninng PHP on Windows and using the built-in sendmail
> equivalent packaged wi
> -Original Message-
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: Monday, January 25, 2010 8:05 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] If the first four characters are "", then do {}
>
> On Mon, Jan 25, 2010 at 09:36:50PM -0500, John Taylor-Johnston
On Mon, Jan 25, 2010 at 10:59:43PM -0500, Robert Cummings wrote:
> Daevid Vincent wrote:
>> Like you, I have many little functions that are useful for debugging in a
>> page.
>>
>> The problem is that when you start to pepper them around, whilst debugging,
>> you can often times forget where you l
On Mon, Jan 25, 2010 at 09:36:50PM -0500, John Taylor-Johnston wrote:
> I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
>
> $mydata->restored = "-00-00";
>
> How do I express this? If the first four characters are "", then do {}
>
> What I am looking for is in strpos()
Hi all.
I'm currently using the phpmailer class from phpmailer.worxware.com to send
datatbase -populated emails to clients.
At the moment I'm runninng PHP on Windows and using the built-in sendmail
equivalent packaged with XAMPP. It uses a remote SMTP that authenticates by
prior logging into a
Daevid Vincent wrote:
Like you, I have many little functions that are useful for debugging in a
page.
The problem is that when you start to pepper them around, whilst debugging,
you can often times forget where you left them. A search isn't always
helpful since I sometimes leave them in the code
Hey all,
I have an SQL query that's stumping me.
I have two date variables, $start and $end that are in
mm/dd/ format and two database fields, start_date and
no_donations. The start date is mm/dd/ format and
no_donations is an integer that represents the number of
months from start_d
> -Original Message-
> From: paras...@gmail.com [mailto:paras...@gmail.com] On
> Behalf Of Daniel Brown
> Sent: Monday, January 25, 2010 6:43 PM
> To: John Taylor-Johnston
> Cc: PHP-General
> Subject: Re: [PHP] If the first four characters are "", then do {}
>
> On Mon, Jan 25, 2010 a
Hello list :)
I have this problem, a certain string can contain the following information:
$string = '
hi{value1;value2}
bye{value1;value3}
hi{value1;value4}
hi{value1;value2}
bye{value1;value2}
';
What I want is to be able to get this result:
$string = '
hi{value1;value2}
bye{value1;value3}
h
Like you, I have many little functions that are useful for debugging in a
page.
The problem is that when you start to pepper them around, whilst debugging,
you can often times forget where you left them. A search isn't always
helpful since I sometimes leave them in the code, but commented out, so
On Mon, Jan 25, 2010 at 10:00 PM, Michael A. Peters wrote:
> Shawn McKenzie wrote:
>>
>> Joseph Thayne wrote:
>>>
>>> That is incorrect. What will happen is as follows:
>>>
>>> 1. The value will be incremented by 1 causing the value to be greater
>>> than the maximum integer allowed.
>>> 2. MyS
On Sun, Jan 24, 2010 at 16:16, David W. Allor wrote:
> Hi!
>
> I'm using php-cli 5.3.1.
>
> When I run php from the command line, the script does not return me to
> the command prompt when exited. The script always completes, but it has
> to be killed to release it's resources.
>
> I've created a
Shawn McKenzie wrote:
Joseph Thayne wrote:
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater
than the maximum integer allowed.
2. MySQL will see this as a problem and "truncate" it to the closest
value.
3. MySQL will the
- Original Message -
From: "John Taylor-Johnston"
To: "PHP-General"
Sent: Tuesday, January 26, 2010 12:36 PM
Subject: [PHP] If the first four characters are "", then do {}
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
$mydata->restored = "-00-00";
How
On Mon, Jan 25, 2010 at 21:36, John Taylor-Johnston
wrote:
> I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
>
> $mydata->restored = "-00-00";
--
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Looking for hosting or
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
$mydata->restored = "-00-00";
How do I express this? If the first four characters are "", then do {}
What I am looking for is in strpos(), no?
if ()
{
}
--
PHP General Mailing List (http://www.php.net/)
T
On Jan 25, 2010, at 6:23 PM, Shawn McKenzie wrote:
file_put_contents() is s much easier.
Thanks Shawn I'll check that out ...
- I see it says : This function is identical to calling fopen(),
fwrite() and fclose() successively to write data to a file.
my newbie brain likes that!
Th
deal...@gmail.com wrote:
>
> On Jan 25, 2010, at 4:59 PM, Ashley Sheridan wrote:
>
>
>>
>> $fh = fopen("page.html","w");
>> fwrite($fh, $htmlcode);
>>
>>
>>
>
> Thanks so much Ashley and ALL, this looks like it will work fine.
>
> BTW: Sorry if I didn't make myself clear - I just wanted to gra
Joseph Thayne wrote:
> That is incorrect. What will happen is as follows:
>
> 1. The value will be incremented by 1 causing the value to be greater
> than the maximum integer allowed.
> 2. MySQL will see this as a problem and "truncate" it to the closest
> value.
> 3. MySQL will then try and i
On Jan 25, 2010, at 4:59 PM, Ashley Sheridan wrote:
$fh = fopen("page.html","w");
fwrite($fh, $htmlcode);
Thanks so much Ashley and ALL, this looks like it will work fine.
BTW: Sorry if I didn't make myself clear - I just wanted to grab some
data like a person from a contacts file and
> values were stored, the APC storage began to slow down *dramatically*. I
> wasn't certain if APC was using only RAM or was possibly also writing to
> disk. Performance tanked so quickly that I set it aside as an option and
> moved on.
IIRC, i think it is built over shm and there is no disk back
On 1/25/2010 8:00 PM, deal...@gmail.com wrote:
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html etc. and be able to save the page...
like:
--- save all this pre made content as .html page
... stuff
... stuff
... stuff with databas
- Original Message -
From:
To: "PHP-General"
Sent: Tuesday, January 26, 2010 11:00 AM
Subject: [PHP] Creating an Entire .html page with PHP
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html etc. and be able to save the page...
l
On Mon, 2010-01-25 at 17:00 -0800, deal...@gmail.com wrote:
> Hi Folks,
>
> I would like to create an entire .html page gathered from database
> content mixed with html etc. and be able to save the page...
>
>
> like:
>
> --- save all this pre made content as .html page
>
>
>
> ... s
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html etc. and be able to save the page...
like:
--- save all this pre made content as .html page
... stuff
... stuff
... stuff with database query results...
... stuff
Q: Is there
On Mon, 2010-01-25 at 19:21 -0500, Ernie Kemp wrote:
>
>
>
>
>
>
>
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: January-25-10 5:53 PM
> To: Ernie Kemp
> Cc: 'PHP General List'
> Subject: Re: [PHP] Upload file on IE8
>
>
>
> On Mon, 2010-01-25 at 17:41 -0500, Ernie
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: January-25-10 5:53 PM
To: Ernie Kemp
Cc: 'PHP General List'
Subject: Re: [PHP] Upload file on IE8
On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:
Good Day,
I’m having an issue with IE8, wh
On Tue, 2010-01-26 at 07:33 +0800, Eric Lee wrote:
> On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp wrote:
>
> > Good Day,
> >
> >
> >
> > I’m having an issue with IE8, when I go to load a file the
> > program is not filling the $_FILES['user_file']['type'] .
> >
> >
J Ravi Menon wrote:
PHP does expose sys V shared-memory apis (shm_* functions):
http://us2.php.net/manual/en/book.sem.php
I will look into this. I really need a key/value map, though and would
rather not have to write my own on top of SHM.
If you already have apc installed, you could als
On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp wrote:
> Good Day,
>
>
>
> I’m having an issue with IE8, when I go to load a file the
> program is not filling the $_FILES['user_file']['type'] .
>
> When I display “echo "Start".$_FILES['pix']['type']."End";”
> in I
0145-2887(30-33) ext 124
__ Información de ESET NOD32 Antivirus, versión de la base de firmas de
virus 4805 (20100125) __
ESET NOD32 Antivirus ha comprobado este mensaje.
http://www.eset.com
On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:
>
>
> Good Day,
>
>
>
> I’m having an issue with IE8, when I go to load a file
> the program is not filling the $_FILES['user_file']['type'] .
>
>
> When I display “echo "Start".$_FILES['pix']['type']."En
'Twas brillig, and Richard Quadling at 22/01/10 11:33 did gyre and gimble:
> Hello,
>
> One of the aspects of an interface is to enforce a public view of a
> class (as I see it).
>
> Within PHP, interfaces are allowed to have constants, but you cannot
> override them in a class implementing that
Good Day,
I'm having an issue with IE8, when I go to load a file the
program is not filling the $_FILES['user_file']['type'] .
When I display "echo "Start".$_FILES['pix']['type']."End";"
in IE8 I get "StartEnd" with nothing in between. I expected "image/pjp
On Mon, 25 Jan 2010 21:26:05 +, Ashley Sheridan wrote:
> On Mon, 2010-01-25 at 22:13 +0100, Nisse Engström wrote:
>
>> The HTTP spec allows cookies to be sent after the content,
>> in trailing headers, but it's not usable practically. Few
>> browsers support it, and PHP certainly doesn't. You
On Mon, Jan 25, 2010 at 18:51, Joseph Thayne wrote:
> That is incorrect. What will happen is as follows:
>
> 1. The value will be incremented by 1 causing the value to be greater than
> the maximum integer allowed.
> 2. MySQL will see this as a problem and "truncate" it to the closest
> value
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater
than the maximum integer allowed.
2. MySQL will see this as a problem and "truncate" it to the closest value.
3. MySQL will then try and insert the new row with the updat
For such a large data set, they would split into several sub tables,
otherwise the performance will be horrible
On Mon, Jan 25, 2010 at 3:39 PM, Robert Cummings wrote:
> Parham Doustdar wrote:
>
>> Hello there,
>> A friend called me today and was wondering what happens if the ID colomn
>> of an M
On Mon, Jan 25, 2010 at 17:15, Parham Doustdar wrote:
> Hello there,
> A friend called me today and was wondering what happens if the ID colomn of
> an MYSQL database, set to autoinc reaches the int limit. Will it return and
> begin choosing the ID's that have been deleted, or... what?
> Thanks!
On Mon, 2010-01-25 at 22:13 +0100, Nisse Engström wrote:
> On Thu, 21 Jan 2010 08:43:58 +1100, clanc...@cybec.com.au wrote:
>
> > When you are working with sessions, provided you start your program with
> > session_id(), you
> > can then do anything you like with session variables at any point i
On Thu, 21 Jan 2010 08:43:58 +1100, clanc...@cybec.com.au wrote:
> When you are working with sessions, provided you start your program with
> session_id(), you
> can then do anything you like with session variables at any point in your
> program. In my
> original question I asked if there was a
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
Thanks!
Ask Slashdot... I believe they hit t
On 1/25/2010 1:19 PM, Nathan Rixham wrote:
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
you
It will continue to use the max number which of course will cause an error.
Joseph
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID'
Parham Doustdar wrote:
> Hello there,
> A friend called me today and was wondering what happens if the ID colomn of
> an MYSQL database, set to autoinc reaches the int limit. Will it return and
> begin choosing the ID's that have been deleted, or... what?
you change it to bigint before that happ
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubs
PHP does expose sys V shared-memory apis (shm_* functions):
http://us2.php.net/manual/en/book.sem.php
If you already have apc installed, you could also try:
http://us2.php.net/manual/en/book.apc.php
APC also allows you to store user specific data too (it will be in a
shared memory).
Haven't tr
Richard Quadling wrote:
> 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
>
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
{
/**
* Superseded by
2010/1/25 Pete Ford :
> Richard Quadling wrote:
>>
>> 2010/1/22 Pete Ford :
>>>
>>> IMHO, a constant is not the correct beastie in this case - if you want it
>>> to
>>> be different depending on the implementation then it ain't a constant!
>>>
>>> You should probably have protected static variables
take a look at this :
http://www.phpclasses.org/browse/package/3220.html
On Mon, Jan 25, 2010 at 11:32 AM, Ashley Sheridan
wrote:
> On Mon, 2010-01-25 at 10:03 +, SED wrote:
>
> > Hi,
> >
> > Can anyone point me to tutorials on how to change a filename for each
> > download? My goal is to g
Richard Quadling wrote:
2010/1/22 Pete Ford :
IMHO, a constant is not the correct beastie in this case - if you want it to
be different depending on the implementation then it ain't a constant!
You should probably have protected static variables in the interface, and
use the implementation's co
On Mon, 2010-01-25 at 10:03 +, SED wrote:
> Hi,
>
> Can anyone point me to tutorials on how to change a filename for each
> download? My goal is to give the downloader a random name for a picture or a
> document, so he will never know what the original filename is.
>
> Regards,
> Summi
>
>
Hi,
> Can anyone point me to tutorials on how to change a filename for each
> download? My goal is to give the downloader a random name for a picture or a
> document, so he will never know what the original filename is.
Try adding a Content-Disposition header:
--
Richard Heyes
HTML5 canvas gra
Jochem Maas wrote:
highlight_string() function might be an easier route?
If I only ever wanted to highlight php it might be.
I found a workaround, though I don't like it.
add
$dom->formatOutput = false;
to the function and it displays perfectly, though viewing the generated
source isn't as
SED wrote:
Hi,
Can anyone point me to tutorials on how to change a filename for each
download? My goal is to give the downloader a random name for a picture or a
document, so he will never know what the original filename is.
http://uk.php.net/manual/en/function.tempnam.php any use ...
--
Lest
Hi,
Can anyone point me to tutorials on how to change a filename for each
download? My goal is to give the downloader a random name for a picture or a
document, so he will never know what the original filename is.
Regards,
Summi
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
highlight_string() function might be an easier route?
Op 1/25/10 9:55 AM, Michael A. Peters schreef:
> I'm experiencing a slight problem with importNODE putting unwanted
> carriage returns in the the output.
>
> Here's my function:
>
> // syntax highlighting
> include_once('Text/Highlighter.php'
Michael A. Peters wrote:
The only (untried) solution I can think of is to replace each carriage
return with a and every space with and then replace the
with a or some such hackery before running
loadXML() on it. But I would rather not do that.
Even that isn't really working but what I
I'm experiencing a slight problem with importNODE putting unwanted
carriage returns in the the output.
Here's my function:
// syntax highlighting
include_once('Text/Highlighter.php');
function syntaxHighlight($dom,$lang,$code) {
$hl =& Text_Highlighter::factory($lang);
$out = $hl->highli
65 matches
Mail list logo