Hans Åhlin | 1 Jul 2010 01:40

Re: Re: Is this a bug with date() ?

A year can have 52 or 53 weeks and it can begin with week nr 1, 52 or 53
check this algorithm
http://www.threesides.se/blogg/2010/04/15/date-calculation-algorithm/

**********************************************
 Hans Åhlin
   Tel: +46761488019
   icq: 275232967
   http://www.kronan-net.com/
   irc://irc.freenode.net:6667 - TheCoin
**********************************************

2010/6/30 Lester Caine <lester <at> lsces.co.uk>:
> Michael Alaimo wrote:
>>
>> I have found a bug report.  This is the correct functionality.
>>
>> Mike
>>
>>> I understand that technically there are more than 52 weeks in a year.
>>> Well at least google says 1 year = 52.177457 weeks.
>>>
>>> So I run the command:
>>> php>  echo date('W' , mktime(0, 0, 0, 1, 1, date('Y')));
>>> 53
>>>
>>> As you can see the result is 53.
>>>
>>> Any thoughts on this?
>
(Continue reading)

David McGlone | 1 Jul 2010 02:05

Past discussion

Hi everyone,

I have been searching the archives for a past discussion where some software 
that some folks use to (I think) save code snippets from e-mails for future 
references or something of such.

Does anyone remember that discussion? I am trying to figure out a good way to 
create my own "wiki" type thing so I can use it to help me and be able to go 
back and review very helpful e-mails or code that was very helpful to my 
understanding of how it works.

Here lately I've been remembering things that were brought up on the list that 
had very helpful info, but remembering what thread they were in or what topic, 
so I can find it in the archives is harder than I thought it would be.

Anyone have any suggestions, techniques or remember that discussion so I can 
find it in the archives again?

-- 
Blessings,
David M.

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

David Mehler | 1 Jul 2010 03:16
Picon

php processing name vs. id field

Hello,
I've got a php form processing question. I've got a text field like so:

<div>
<label for="txtname">Name*:</label>
<input type="text" name="name" id="name" size="30" value="<?php echo
htmlspecialchars($_POST['name']), ENT_QUOTES, UTF-8; ?>" /> <br />
</div>

My question is what is the purpose of the id field? I know the name
field is what php references, but am not sure what id is for?
Thanks.
Dave.

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Adam Richardson | 1 Jul 2010 03:39
Picon
Gravatar

Re: php processing name vs. id field

On Wed, Jun 30, 2010 at 9:16 PM, David Mehler <dave.mehler <at> gmail.com> wrote:

> Hello,
> I've got a php form processing question. I've got a text field like so:
>
> <div>
> <label for="txtname">Name*:</label>
> <input type="text" name="name" id="name" size="30" value="<?php echo
> htmlspecialchars($_POST['name']), ENT_QUOTES, UTF-8; ?>" /> <br />
> </div>
>
> My question is what is the purpose of the id field? I know the name
> field is what php references, but am not sure what id is for?
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hi Dave,

Sometimes it's helpful to target a specific element for stylistic or
functional purposes, and that's when you'll find an id attribute helpful.

In your example above, label elements use the id in the 'for' attribute
(and, speaking to your example, you should have for="name" instead of
for="txtname"):
http://www.w3schools.com/tags/tag_label.asp
(Continue reading)

David McGlone | 1 Jul 2010 04:02

Integers

Hi again

I'm trying to learn about octal numbers and I don't understand this:

Binary: 001000101111
breakdown: (001)= 1 (000)= 0 (101)=5 (111)=7

I know it's similar to unix permissions, but I'm not understanding where for 
example: 111 = 7

wikipedia has got me all confused.

-- 
Blessings,
David M.

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Stephen | 1 Jul 2010 04:12
Favicon

Re: Integers

On 10-06-30 10:02 PM, David McGlone wrote:
> Hi again
>
> I'm trying to learn about octal numbers and I don't understand this:
>
> Binary: 001000101111
> breakdown: (001)= 1 (000)= 0 (101)=5 (111)=7
>
> I know it's similar to unix permissions, but I'm not understanding where for
> example: 111 = 7
>    
In base 10, which you use every day, we go
0
1
2
3
4
5
6
7
8
9
10

The number 10 is the number of distinct digits we use.

In binary we only us two, 0 and 1, so 10 is 2 decimal

So we go

(Continue reading)

kronos | 1 Jul 2010 04:45
Favicon

Re: Exec not functioning [SOLVED]

I forgot that PHP saves stuff in the /tmp directory (in my case
/var/www/html/tmp [with permissins/owner set accordingly].

So, it works with:

<?php

  	$command = "/usr/bin/espeak -g0 -ven+m3 -p22 -s170 'Hallo Toofie' -w
                     /var/www/html/tmp/aba.wav";
  	
  	exec($command);

?>

Btw, it sounds pretty awful!

On Tue, 29 Jun 2010 17:46:01 -0400, <kronos <at> aolohr.com> wrote:

> Hi,
>
> I'm trying to utilize EXEC to have some text from a db query converted  
> to a wav file using 'espeak'.
> The 'espeak' command works admirably by cli, but no matter what I do,  
> exec does not
> seem to function on my Linux box, even though safe_mode is off.
>
> I've stripped the db query out, and ran a simplified text, 'Hallo  
> Toofie' in the code. First off,
> I made sure that the espeak code worked by cli. It does.
>
(Continue reading)

kronos | 1 Jul 2010 04:45
Favicon

Exec not functioning

Hi,

I'm trying to utilize EXEC to have some text from a db query converted to  
a wav file using 'espeak'.
The 'espeak' command works admirably by cli, but no matter what I do, exec  
does not
seem to function on my Linux box, even though safe_mode is off.

I've stripped the db query out, and ran a simplified text, 'Hallo Toofie'  
in the code. First off,
I made sure that the espeak code worked by cli. It does.

The code:

<?php

	$command = "/usr/bin/espeak -g0 -ven+m3 -p22 -s170 'Hallo Toofie' -w  
aba.wav";
	
	exec($command);

?>

I've tried every combination I can think of including using 'espeak'  
without '/usr/bin',
directing wav output to '-f /home/kronos/aba.wav'.

What am I doing wrong?

Any help, pointers, suggestions appreciated!
(Continue reading)

George Langley | 1 Jul 2010 07:45
Picon
Favicon
Gravatar

Re: Brandon Rampersad wants to chat

	Actually, it's been SEVEN times since 19 May, including today's.  
Perhaps the List Mom could step in here?

George

On 10-Jun-10, at 3:07 PM, Ashley Sheridan wrote:

> Please could you not send out these auto messages Brandon as I believe
> this is the second time a message has hit both my email address and  
> the
> mailing list with a request for Google chat from you.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
> On Thu, 2010-06-10 at 13:46 -0700, Brandon Rampersad wrote:
>
>> -----------------------------------------------------------------------
>>
>> Brandon Rampersad wants to stay in better touch using some of  
>> Google's
>> coolest new
>> products.
>>
>> If you already have Gmail or Google Talk, visit:
>> http://mail.google.com/mail/b-b89a7a894d-87f44ca42c-QxVqdDj-Y-taKgwQ_V0g-Q8WRBY
>> You'll need to click this link to be able to chat with Brandon  
(Continue reading)

Gaurav Kumar | 1 Jul 2010 07:47
Picon

Re: Regular Expression to get the whole Comma Separated String in Array Key

Hey Richard,

Thanks!!! You have resolved my problem..

GK

On Wed, Jun 30, 2010 at 7:42 PM, Gaurav Kumar
<kumargauravjukebox <at> gmail.com>wrote:

> Hi All,
>
> Need help in resolving the below problem-
>
>
> I would like to get the whole comma separated string into an array value-
>
> 1. $postText = "chapters 5, 6, 7, 8";
> OR
> 2. $postText = "chapters 5, 6;
> OR
> 3. $postText = "chapters 5, 6, 7";
>
> What i have done so far is-
> preg_match('/chapter[s]*[ ]*(\d+, \d+, \d+)/i', $postText, $matches);
>
> The above will exactly match the third value $postText = "chapters 5, 6,
> 7";
>
> By Above $matches will contain a value of : $matches[1] = '5, 6, 7';
>
(Continue reading)


Gmane