| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> caffinated: hello? <1> kuja: I've just realized, I have better things to do on a saturday than go over badly written code where I have to fight with the people I'm trying to help. <0> why doesn't that ****ing PHP remember the $_SESSION godammit :'( ! <2> as you speed up, relative time slows down.. right? <3> caffinated: 1) Enjoy Ruby, 2) Get laid... but I do both =) <4> name i have a simple script for you: <?php session_start(); $_SESSION[ <3> The mix quite well together. <4> 'test'] = 'w00t'; echo $_SESSION['test']; ?> <2> kuja: multi task <4> *thump thump tap tap thump thump tap* <1> name: look at where you set $debug. then look at where you try to test the condition. then listen to me next time. <0> caffinated: what? <0> caffinated: $debug = "yes"; // Just change this variable if you know what you do. <1> name: i asked you to add those two lines, not that stupid condition which won't ever succeed. <5> kuja: You were going to tell me when adding a method on the object makes sense. <3> TML: And then I told you, that I was doing something totally wrong, and that you were correct after all. I'll have to get back to you on it :)
<5> :) <3> caffinated might know of a use, do you caffinated?! <0> caffinated: ok <0> caffinated: fixed ;) <6> I guess I'm going to have to give up on this one and ask for some deeper help, here's my code: <3> TML: I don't know about adding to an instance, but certainly being able to play around in the instance's scope is a handy "feature". Stuff like: cl*** << self; return self; end <-- A metacl*** of self. <6> http://pastebin.com/584130 <6> I'm trying to set it up such that when someone comes to this particular page, if they've not been here before OR if they are coming from the wrong place it will send them to the correct place. <5> kuja: I don't understand when you'd want to metacl*** self. <7> ylon: what version of PHP are you on? <3> TML: Hold on, let me get words and no code. <6> ^Artnez: 4.3.10 <5> ylon: It's almost certainly not the problem, but just as an FYI: Location technically has a capital L <0> caffinated: ideas? <7> ylon: use $_SERVER['HTTP_REFERER'], use isset( $_COOKIE['has_visited'] ) instead of just ($_COOKIE['has_visited']) <8> hello <7> ylon: also keep in mind that HTTP_REFERER wont be around sometimes... i think it happens when someone goes straight to the site <7> all i know is i've had undefined index error every once in a while <0> caffinated: ? <8> how can i format a number like this: 143.0 -> 143 but if its 143.3 has to remain 143.3 <0> caffinated: what does this damn undefined index mean? <8> i just need to not show the decimal part if it's zero <3> TML: Considering that *everything* is an object. Everything belongs to something. In the end, Object is the grandfather. Metacl***es are useful because cl***es are objects. Yep, even the cl*** definitions. Using a metacl*** you can manipulate the cl*** itself. A metcl*** will usually refer to the object's instance of Cl***. You can dynamically define methods for a cl*** making sometimes your code more understable. For example, cl*** Foo; define_these_methods <3> :foo, :bar, :baz; foo 1; bar 2; baz 3; end <-- Note that define_these_methods is pseudo stuff, but in the end it will define methods foo/bar/baz dynamically for that cl***. <0> what have i ruined? <7> Sal: how are you getting the number? <8> from mysql or it could by the sum of more mysql fields <0> caffinated: are u there? <3> TML: http://whytheluckystiff.net/articles/seeingMetacl***esClearly.html -- This guy makes it much more easier to see :) <9> I've decided that I'm going to start my own GNU project. <9> My trial code will be in PHP available for use and download off of my site (PHP source, that is) <8> ^Artnez: any idea? <7> sal: hold <8> ok <3> TML: When you do cl*** Foo; ...code...; end, you are equivalently doing Foo = Cl***.new; Foo.cl***_eval { ...code... } <9> I'm ganna' make a tax suite!! <0> caffinated: there? <3> This makes seeing cl***es much easier, because it's much more clear now that even cl*** definitions are instances of something. <6> strange, it seems to work sometimes and sometimes not... going to have to test this some more <6> thanks much though for the help with that! <7> Sal: no clue.. i thought you could use something like sprintf() or number_format() but actually strippping the 0 at the end... dont know <7> Sal: you could of course just determine if there is a zero or not after the first decimal, then do an if/else .. but i'm sure there's a function out that there can let you do it right <7> ask another pro here :) <8> pro!! yoohoo!! <0> plz some1 help me: why did the $_SESSION stuff? <10> !tell name about aolbonics <0> Stormchaser: common <0> Stormchaser: better help me <7> name: you really need to read through some tutorials. this isnt a free PHP course and we're not instructors <0> i did@ <7> well read it again until you get it <0> how you think i did that damn code? <0> he? <3> TML: AFAIK, Python follows the cl***/attributes OO model. Where you design around your basic cl*** structure. The difference with the Ruby Way is that you design your cl***. You design your cl*** structure if that's what you want. Metacl***es may or may not be used (it all depends). <0> it's just that you don't know either ^Artnez <8> ^Artnez: if(int(num) == num) { echo num; } else { echo number_format(num, 2); } <8> ops, <8> if(int(num) == num) { echo int(num); } else { echo number_format(num, 2); } <8> that should od it i think <7> Sal: use a ternary <8> ?
<8> whats that? <10> php.net/ternary <8> oh, you mean the iif() <7> $num = ( int( $num ) == $num ) ? int( $num ) : number_format ... etc <0> i might just forget about the $SESSION <0> and add it later <8> ph.. didn't know that one <7> woops <8> :) <8> ok, thanks <7> $num = ( (int) $num == $num ) ? $num : numberformat( ... etc <11> anyone see an issue here? <11> function send_prod($_POST["product"]) { <0> i got the bug, YESS! <0> DogWater: looks weird <0> DogWater: shouldn't it be function send_prod($1){ <11> isnt that the same thing? <0> and then call it with send_prod($_POST["product"]) <11> oh. <11> right <11> duh <10> what the heck is $1?!? <7> lol <7> i'm sure you can't start a variable with an int <10> of course you can't <12> does anyone know why the DataObject implementation in zend framework was scrapped? or why it doesn't exist in the source? <10> flashbang: Um... that's not ##php question <7> flashbang: the zend framework hasn't been released yet <13> So it has been released. <12> Stormchaser: sorry.. could you point me to the right channel for that? <13> Ugh. <10> flashbang: read the support page for that framework <14> I'm working with the php sources, and they are doing 'parse_str($args, $r)', then evaluating the values in $r. They've got $r[children] being evaluated as a boolean, but I can't figure out what to set $args to to get $r[children] to be evaluated as FALSE. What I'm trying is $args='children=FALSE', doesn't seem to work. <14> working with the wordpress sources* <10> Um... 'we don't support 3rd party scripts'? <14> nevermind, finally damn found it, it's $args='children=', just don't set a value for children <14> Stormchaser: the famous #php snideness <12> jesus.. what do you guys support? <14> Stormchaser: wasn't a 3rd party script question <12> it's all php.. <10> !+g10 <15> Guideline #10) We don't support xyz script. We help you *write* PHP, not download and install/hack/use pre-written scripts <14> Stormchaser: you doing anything today? or just trying to tick off confused people on the internet? <12> Stormchaser: the channel topic even says "Zend Framework Released" <10> flashbang: Does that automatically means that we support it? <12> jesus.. forget it <16> hi, anyone familiar with SOAP and HTTP_REQUEST in here? I have a problem finding out how to p*** a new timeout value to my wsdl connection: $wsdl =& new SOAP_WSDL($this->wsdl_url); $this->client = $wsdl->getProxy(); <16> is it possible to p*** in timeout => 10 into SOAP_WSDL? i found out how to do it with SOAP_CLIENT, but I really need SOAP_WSDL <16> the title say Zend Framework 1.0 Released, somebody should probably change that to: Zend Framework 0.1.1 Released http://framework.zend.com/ <17> well then... <11> Anyone know if there is some special freakiness involved with caching form fields? <5> oh, thanks chanserv <18> TML: See, you were suppose to be poking yourself! <16> i guess i am going to ask again in a minute, since this netsplit scrolled everything away <19> fscking netsplits... <11> TML wow this is a fun ride ;-) <5> what a joke <11> better than mr. toads' at disney <5> DogWater: Are you saying that on your form you've done: '<input type="text" value="<?php echo $foo;?>" />'? <11> well no I actually did echo "<input type=\"text\" value=\"$foo\" name=\"whatever\">$foo"; <11> and the $foo in the textbox, and outside the textbox; are different. when I hit the back button <5> DogWater: And when you view source, do it say value="number you think should be there"? <5> Because browser *do* cache input values, but I wouldn't expect such to override an explicit "value=" <11> <input type="text" name="qty" size="2" value="888">888 <11> lol <11> but it says 1 888 <11> in IE <5> DogWater: Unexpected, but not *terribly* surprising. <11> is there a best practices sorta thing for browser cache settings when it sorta matters? <11> usually I could really care less; but its kind of important that this works
Return to
#php or Go to some related
logs:
eboard fc5 unmet dependencies ubuntu lmms #asm #xine selinux tomcat 8080 suse100.i686 iso south leeds python's plan9 wacom #fedora #web
|
|