php-general Digest 30 Sep 2008 08:53:50 -0000 Issue 5710

Topics (messages 281136 through 281151):

Time Loop
        281136 by: MDB
        281137 by: Robert Cummings

Re: How to submit form via PHP
        281138 by: Lupus Michaelis
        281141 by: Ashley Sheridan
        281142 by: Ashley Sheridan
        281143 by: Lupus Michaelis
        281144 by: Nisse Engström
        281145 by: Shawn McKenzie
        281146 by: Richard Lynch
        281147 by: Waynn Lue

Re: Wanted PHP Developers LogicManse
        281139 by: Bastien Koert

Re: [PHP-DB] Using oci_execute
        281140 by: Chris

question about <<<EOF
        281148 by: LKSunny
        281149 by: Jochem Maas
        281150 by: Ross McKay

Name of graph
        281151 by: Richard Heyes

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- Hello All, I am trying to figure out how to loop through 2 given times. I have a start time and a end time and want to look through every X mins and add a radio button. Below is my latest try, can someone please help me out?


     $endTime = "17:00:00";
     $currentTime="09:00:00";

     $num_intervals = floor(($endTime - $currentTime) / 30);

     echo ("Num_INter: ".$num_intervals."</br>");

     $buffer_time = $currentTime;
     for($i = 0; $i < $num_intervals; $i++)
     {
       echo ("<tr>");
       echo ("<td>".$currentTime."</td>");

       foreach ($days as $day)
       {
           echo ("<td>");
echo ("<input type='radio' name='dateTimeSelection' value=$day>");

           echo ("</td>");
       }


       $buffer_time += $interval;
       echo ("</tr>");
     }



ps I was having problems with my news reader, this may be posted twice, if so. Sorry.

TIA
--- End Message ---
--- Begin Message ---
On Mon, 2008-09-29 at 17:01 -0400, MDB wrote:
> Hello All, I am trying to figure out how to loop through 2 given times.  I 
> have a start time and a end time and want to look through every X mins and 
> add a radio button.  Below is my latest try, can someone please help me out?
> 
> 
>       $endTime = "17:00:00";
>       $currentTime="09:00:00";
> 
>       $num_intervals = floor(($endTime - $currentTime) / 30);

You should convert your times to minutes so you can use minute
intervals... the following was written directly into the email and so it
is UNTESTED:

<?php

    $bits = explode( ':', $currentTime );
    $currentTime = $bits[0] * 60 + $bits[1];

    $bits = explode( ':', $endTime );
    $endTime = $bits[0] * 60 + $bits[1];

    $interval = 15; // minutes
    for( $i = $currentTime; $i <= $endTime; $i += $interval )
    {
        $time = floor( $i / 60 ).':'.($i % 60).':00';
    }

?>

Adapt to fit your needs.

Note: I used a time interval like you state in your above description (X
mins). But the code you submitted used appeared to use number of time
slices instead.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
Micah Gersten a écrit :
Not according to this:
http://www.w3.org/TR/html401/interact/forms.html#adef-action

The only defined behaviour is when you specify a URI.

The empty string into an HTML document is a valid relative URI ;) According the same document gave (just follow the references ;) ).

--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--- End Message ---
--- Begin Message ---
On Mon, 2008-09-29 at 23:56 +0200, Lupus Michaelis wrote:
> Micah Gersten a écrit :
> > Not according to this:
> > http://www.w3.org/TR/html401/interact/forms.html#adef-action
> > 
> > The only defined behaviour is when you specify a URI.
> 
>    The empty string into an HTML document is a valid relative URI ;) 
> According the same document gave (just follow the references ;) ).
> 
> -- 
> Mickaël Wolff aka Lupus Michaelis
> http://lupusmic.org
> 
Do you have a reference for that, because I don't see it...


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Mon, 2008-09-29 at 23:40 +0100, Ashley Sheridan wrote:
> On Mon, 2008-09-29 at 23:56 +0200, Lupus Michaelis wrote:
> > Micah Gersten a écrit :
> > > Not according to this:
> > > http://www.w3.org/TR/html401/interact/forms.html#adef-action
> > > 
> > > The only defined behaviour is when you specify a URI.
> > 
> >    The empty string into an HTML document is a valid relative URI ;) 
> > According the same document gave (just follow the references ;) ).
> > 
> > -- 
> > Mickaël Wolff aka Lupus Michaelis
> > http://lupusmic.org
> > 
> Do you have a reference for that, because I don't see it...
> 
> 
> Ash
> www.ashleysheridan.co.uk
> 
> 
Sorry, my bad, I see it!


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
Ashley Sheridan a écrit :

From the link you gave, we stick on <http://www.w3.org/TR/html401/types.html#type-uri>, so it references an IETF RFC <http://www.ietf.org/rfc/rfc1808.txt> that describes what is an URI.

The fourth section describes how we have to determine the resolution of an URI. The point that are in our scope is the next I quote :

«
a) If the embedded URL is entirely empty, it inherits the
              entire base URL (i.e., is set equal to the base URL)
              and we are done.
»

  If you have any doubt, just enjoy reading the full document ;)

But for me, it is quite clear that an empty string is a valid URI *into* a document served by HTTP.

--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--- End Message ---
--- Begin Message ---
On Mon, 29 Sep 2008 11:33:41 -0500, Richard Lynch wrote:

> Actually, I believe action="" submitting to the same URL is *documented* HTTP 
> spec behavior.
> 
> I welcome correction/confirmation if somebody wants to wade through the docs 
> again...

HTML 4.01 says:

    action = uri [CT]
    This attribute specifies a form processing agent. User agent
    behavior for a value other than an HTTP URI is undefined.

The "uri" is a reference to RFC 2396, which says:

    4.2. Same-document References

    A URI reference that does not contain a URI is a reference to the
    current document.  In other words, an empty URI reference within a
    document is interpreted as a reference to the start of that document,

[For some reason, the syntax does not allow empty URI
 references. However, RFC 2396 has been obsoleted by
 RFC 3986 which /does/ allow empty URI references.]

[And yes, the HTML spec should probably refer to URI
 *references* rather than URIs...]

On the other hand, I seem to recall that it has been
rumoured that some have claimed that browser support
for empty action attribute is (or was) patchy.
I don't know.


/Nisse

--- End Message ---
--- Begin Message ---
Lupus Michaelis wrote:
> Ashley Sheridan a écrit :
> 
>   From the link you gave, we stick on
> <http://www.w3.org/TR/html401/types.html#type-uri>, so it references an
> IETF RFC <http://www.ietf.org/rfc/rfc1808.txt> that describes what is an
> URI.
> 
>   The fourth section describes how we have to determine the resolution
> of an URI. The point that are in our scope is the next I quote :
> 
> «
> a) If the embedded URL is entirely empty, it inherits the
>               entire base URL (i.e., is set equal to the base URL)
>               and we are done.
> »
> 
>   If you have any doubt, just enjoy reading the full document ;)
> 
>   But for me, it is quite clear that an empty string is a valid URI
> *into* a document served by HTTP.
> 

I almost got used to the "schreefing" and now the "a écriting"!

-Shawn

--- End Message ---
--- Begin Message ---
I can't speak to cell phones, but it works on all "normal" browsers I've ever 
seen...
________________________________________
From: Nisse Engström [EMAIL PROTECTED]
Sent: Monday, September 29, 2008 6:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to submit form via PHP

On Mon, 29 Sep 2008 11:33:41 -0500, Richard Lynch wrote:

> Actually, I believe action="" submitting to the same URL is *documented* HTTP 
> spec behavior.
>
> I welcome correction/confirmation if somebody wants to wade through the docs 
> again...

HTML 4.01 says:

    action = uri [CT]
    This attribute specifies a form processing agent. User agent
    behavior for a value other than an HTTP URI is undefined.

The "uri" is a reference to RFC 2396, which says:

    4.2. Same-document References

    A URI reference that does not contain a URI is a reference to the
    current document.  In other words, an empty URI reference within a
    document is interpreted as a reference to the start of that document,

[For some reason, the syntax does not allow empty URI
 references. However, RFC 2396 has been obsoleted by
 RFC 3986 which /does/ allow empty URI references.]

[And yes, the HTML spec should probably refer to URI
 *references* rather than URIs...]

On the other hand, I seem to recall that it has been
rumoured that some have claimed that browser support
for empty action attribute is (or was) patchy.
I don't know.


/Nisse

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


_______________________________________________________

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214

--- End Message ---
--- Begin Message ---
Hm, it specifies base though. Does that mean the full query string
won't be guaranteed to be passed along?



On 9/29/08, Lupus Michaelis <[EMAIL PROTECTED]> wrote:
> Ashley Sheridan a écrit :
>
>    From the link you gave, we stick on
> <http://www.w3.org/TR/html401/types.html#type-uri>, so it references an
> IETF RFC <http://www.ietf.org/rfc/rfc1808.txt> that describes what is an
> URI.
>
>    The fourth section describes how we have to determine the resolution
> of an URI. The point that are in our scope is the next I quote :
>
> «
> a) If the embedded URL is entirely empty, it inherits the
>                entire base URL (i.e., is set equal to the base URL)
>                and we are done.
> »
>
>    If you have any doubt, just enjoy reading the full document ;)
>
>    But for me, it is quite clear that an empty string is a valid URI
> *into* a document served by HTTP.
>
> --
> Mickaël Wolff aka Lupus Michaelis
> http://lupusmic.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On Mon, Sep 29, 2008 at 1:28 PM, logicmanse solutions <[EMAIL PROTECTED]
> wrote:

>
> LogicManse is an ambitious, growing Multinational Web and Mobile services
> development firm
> headquartered in Canada. We have completed 18 months of operations,
> developing WebApps on LAMP
> and MS/.NET stacks for clients from all over the world. We are now seeking
> to expand our workforce with
>  highy motivated and smart fresher and Experienced developers, for our
> Development center.
>
>  Technical Expectations
>
> LogicManse expect people who want to work with us to have the following
> basic
> technical skills and experience:
> - Basic knowledge of networking, Internet and Internet protocols (since
> our workflow depends on having strong fundamentals viz the Internet)
> - Strong Problem identification skills.
> - Ability to  read and grasp a specification document written in PLAIN
> English and a little jargon.
> - Break down complex problems into reducible sub-problems that can be
> worked on independently
> - Identify bottlenecks and research the most efficient
> workarounds/re-engineering.
> - Must be able to adapt quickly to new technologies and frameworks as
> the company technology strategy evolves over time, to compete with
> Global players in the WebApps industry.
> - And MOST importantly, Must be able to use
> Google/[insertFavouriteSearchEngine HERE] , to read and understand
> documentation and examples online to better understand and grok the
> technology we use. We almost exclusively use Mature Open Source
> projects/Frameworks for all our development needs.
>
>
> - Notice, that LogicManse do not explicitly ask for LAMP/other web stack
> experience. Experience is always a plus; we believe firmly that a
> candidate with the right attitude and a nimble mind, can be trained and
> indoctrinated to work better and excel; than a coder who is set in
> his/her stubborn, lazy ways.
>
> - And lastly, if you have any technical certifications/degrees from an
> accredited institution/university, feel free to bring them along; But,
> degrees will only get you so far in your career. Your skills and
> attitude will print your paycheques in our shop!!
>
>
>
>
> Non-technical Expectations
>
>  Though our work requires a lot of excellent and hands-on technical
> knowledge, that is not all that is needed to function in these roles. We
> look at a LOT of other things when meeting potential colleagues and a
> lot of times these non-technical considerations seriously out-weigh
> technical ones:
> - Excellent email & communication skills,
> - An insatiable thirst for knowledge and the desire to do more wicked
> things with just a browser and server-side Magic.
> - Ability to work over the Internet and using Internet / web-based
> workflows and applications
> - Awareness of free and open source software development methods
> - A desire to develop products fit for REAL people, not some imaginary
> constructs of the developer's mind.
> - We place a high emphasis on Productivity and performance measurement.
> Needless, to say, we firmly believe that salary incentives/bonuses are
> an excellent way to motivate staff to work smarter, and most importantly
> enjoy your work. Talk about having your cake and eating it too!!
> - Only passionate people with a zest for life and its infinite
> possibilities need apply. Negative attitudes are contagious.
> - Anyone who reads technology journals for leisure/in_the_bathroom is
> probably our ideal candidate. Once again, Passion is King here.
>
>
> To apply or to get more details, please do email us at:
>
> [EMAIL PROTECTED]
>
> We would encourage you to write a short informal email to us about your
> motivation to work with us and your past work, projects and
> achievements. If you include URLs pointing to your blog or participation
> in Free Software projects or Any real projects (as a user or developer),
> that would be very nice. We would love to be blown off our feet by work
> you've already been doing!
>
> Not just that - we would also like to know more about you as a person.
> So if you have written (technical or non-technical) articles or content
> for online or print publications, or you love to sing or play a musical
> instrument or even know how to brew a mean pot of coffee, please do
> write about that as well. We would be equally interested in knowing
> about other things that drive you in life.
>
> [EMAIL PROTECTED]
> --
> View this message in context:
> http://www.nabble.com/Wanted-PHP-Developers-LogicManse-tp19728199p19728199.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
looks like spam/scam to me

-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
Walter Galvão wrote:
What version of PHP?  *5*
What version of Instant Client?  *
instantclient-basic-win32-10.2.0.3-20061115*
What version of the DB? *10G
*
Are you exceeding the PHP script time out, or exceeding the memory limit? *I
dont know. Doesnt appear any message. The script prints the last message
before the oci_execute call.*

error_reporting(E_ALL);
ini_set('display_errors', true);

Any warnings/notices?

--
Postgresql & php tutorials
http://www.designmagick.com/


--- End Message ---
--- Begin Message ---
Hello,

i want on inner EOF do something, calculate and call function ? can not ? if 
yes, how to ?

<?
echo <<<EOF
some text....
can i calculate on inner EOF ? 10*100 display 1000 ?
can i add function on inner EOF ? date('Y') display 2008 ?
any more text.
EOF;
//i want output is
/*
some text....
can i calculate on inner EOF ? 1000 display 1000 ?
can i add function on inner EOF ? 2008 display 2008 ?
any more text.
*/
?>

Thank You. 



--- End Message ---
--- Begin Message ---
LKSunny schreef:
> Hello,
> 
> i want on inner EOF do something, calculate and call function ? can not ? if 
> yes, how to ?

no you can't, store the results of calculation and function calls in
variables and use them in the HEREDOC statement.

a HEREDOC declaration is just a string declaration like these:

$s = 'foo';
$t = "bar";

they can't contain expressions, function calls or anything like that.

> 
> <?
> echo <<<EOF
> some text....
> can i calculate on inner EOF ? 10*100 display 1000 ?
> can i add function on inner EOF ? date('Y') display 2008 ?
> any more text.
> EOF;
> //i want output is
> /*
> some text....
> can i calculate on inner EOF ? 1000 display 1000 ?
> can i add function on inner EOF ? 2008 display 2008 ?
> any more text.
> */
> ?>
> 
> Thank You. 
> 
> 
> 


--- End Message ---
--- Begin Message ---
On Tue, 30 Sep 2008 12:48:35 +0800, LKSunny wrote:

>i want on inner EOF do something, calculate and call function ? can not ? if 
>yes, how to ?

Same way as you do with "" strings. e.g.

<?php
class foo {
  function bar() {
    return 'world!';
  }

  function hello() {
    echo <<<ENDHELLO
Hello, {$this->bar()}
ENDHELLO;
  }
}

$foo = new foo();
$foo->hello();
?>
-- 
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin

--- End Message ---
--- Begin Message ---
Hi,

Anyone know what the line in the first bar chart is called? I call it
a "summary" line, but that's wrong. ISTR it being referred to
something that involved the word "frequency", but I may be off my
trolley...

You'll need a browser other then MSIE to see them. Thanks.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

--- End Message ---

Reply via email to