Jump to content

johnrcornell

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by johnrcornell

  1. Wow so nobody knows? No one understands the difference between these things? That's disappointing.
  2. Hi Guys, I promise I read through the Zend site on this, but I'm pretty confused, about the overlap and relationship between these things: Zend Core Zend Web Server Debugger Zend Executable Debugger Zend Platform PDT Basically, I have Zend Studio and I want to be able to debug my code on my remote Linux server. It *seems* like php-devel package comes with Zend Debugger (?????) but # yum install php-devel gets Error: Missing Dependency: php = 5.1.6-3.7.fc6 is needed by package php-devel Well I've got PHP 5.2.5 installed, so I don't know how an outdated version of PHP could be a dependency. Then there's xdebug, which seems to be an alternative to Zend Debugger, which you can install by #pecl install xdebug But #pecl install zenddebugger does nothing. So I can't use yum, pecl (and obviously not pear) to install Zend Debugger? And Executable debugger? Web Server debugger? I'm so confused. Please help. Thank you.
  3. Changing the comparison operator to == makes it work in IE but not FF
  4. Here's my JS in the HEAD section: <script language="Javascript"> function toggleclock(clock) { if (clock.state = 'on') { clock.src = 'includes/png/clock_color.png' clock.state = 'off' } else if (clock.state = 'off') { clock.src = 'includes/png/clock_bw.png' clock.state = 'on' } } </script> And here's in the BODY section: <img src="includes/png/clock_bw.png" border=0 onload="this.state='off'" onclick="toggleclock(this)" style="cursor: pointer;" /> The script seems perfectly logical, I never have problems like this in PHP this is why I hate JavaScript. I can never get even simple things to work let alone complicated things. I'm sure I'm just misunderstanding. Does anyone see what's wrong? The results are that it'll toggle the image initially from clock_bw.png to clock_color.png, but once it's toggled to color it will not toggle back to black and white. Thanks for anyone with insight. This is holding up the show on this project! Ricky
  5. Hi Guys! I'm hoping one of you smart cookies out there understands regex better than I do. $street2 = "Unit 1 A"; $street2 = preg_replace('/(?<=(?:Unit|Apt)\s.)\s/','',$street2); I expect $street2 to now equal, "Unit 1A" Instead, I get, "Warning: preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 19" I barely got the regex where it's at, I cannot figure out where to apply * here in order to give me an arbitrary lookbehind length. Since the target could be: Apt 1 A Apt 23 A Unit 1 A Unit 23 A Unit 234 BF etc Any ideas anyone?
  6. The best response to this common question that I've heard recently is in this Zend Developer Zone article by Robert Peake: http://devzone.zend.com/node/view/id/1236
  7. So the object definitions are collectively the "model" All that class-external instantiation and logic is the "controller" And the easiest to understand, the system output is the "view" I think I've got it. Thank you!
  8. There's nothing wrong with MS Bob as long as you have it configured correctly. It's resource overhead is actually very low. I've been working on some OS-based multi-threaded processing with it, between the two it's surprisingly a pretty agile web platform. Parallel to the strengths of NetBSD.
  9. Hi guys, I'm new here (obviously.) When I use the [ code ] [ / code ] markup I only get plainol boring black-and-white code. But everyone else gets to have this neato color coding on their posts. What markup do I use to enable that on your forum? Hope this question is in the right place. Thank you for any help! Ricky
  10. The same could be accomplished using mod_rewrite. It's an Apache module that basically takes a requested URL, applies a regex pattern to it and transforms it server side into what it needs to be. So you could have: http://www.mysite.com/scripts/download.php?file=/dl/apps/photoshop.exe turn into: http://www.mysite.com/downloads/photoshop cool stuff eh
  11. Hey, thank you for your response! I think I've got a little better grip on it now. I have a rephrase of the question- Is it correct to say that in a properly-designed MVC implementation, no instantiation would occur in the model outside of a class?
  12. Hi All, I'm trying to see if anyone has any experience setting up a WAMP configuration on Microsoft Bob. I installed Apache 2, but I can't find httpd.conf. Is it by the fireplace? Thanks in advance for any help! John
  13. I know, put all the data you want in an array, serialize, base64 encode it, then put its value into a hidden input field on your form. Then on the next page do an extract($_REQUEST); LMAO DO NOT DO THAT
  14. If you're looking to search through the contents of an array with permutations of natural language or anything like that you'll have to write some regex. It looks intimidating at first but it's fun once you figure it out. Sorry for the vague answer, just trying to provide a next-step jumping off point if you find out that you mean something more ambitious by "search."
  15. I admit that I was too lazy to read the entire thread, so I hope my answer is appropriate- Use the Yahoo! UI library if production time is an issue. For your specific issue, here's the code: http://developer.yahoo.com/yui/examples/container/panelwait/1.html and here's an example of the implementation: http://developer.yahoo.com/yui/examples/container/panelwait/2.html
  16. I think you should use ajax, but via a framework like you said which should take care of the headaches for you. The two best in my opinion are Prototype http://www.prototypejs.organd Dojo http://dojotoolkit.org/. Dojo is a little more technical but flexible (maybe?) Prototype is more flash. I prefer Prototype in most situations.
  17. Hey, please go to my profile and email me and I will help you from there. I'm new to this forum and the thread is kind of off-topic so I don't want to keep posting to it. Some forums are very sensitive about this kind of thing (and have a right to be.)
  18. You're welcome! What you do with the images is a matter of how much time you have on your hands. I personally like the effect of PNG's alpha channels on my backgrounds so much that I create two sets if images, one set in PNG and the other in GIF. I have the files the same name, just with different extensions. Then I have JavaScript look to see if they're using IE, and if they are change the "img src" path to .gif, and if they're not use .png. If you don't have the time to make two sets of images, and write JavaScript to detect the browser, you'll have to just use GIF images. If I can figure out how to build a time machine, I will go back to Bill Gate's garage and abduct him and then you will be able to use only PNGs. Hope this helps. John
  19. Apparently __get() and __set() are useful in the implementation of singleton patterns whilst avoiding factory methods. class Singleton { private static $props = array(); public function __construct() { } public function __get($name) { if(array_key_exists($name, self::$props)) { return self::$props[$name]; } //if } // __get public function __set($name, $value) { self::$props[$name] = $value; } //__set } $a = new Singleton; $b = new Singleton; $a->property = "hello world"; print $b->property; // hello world
  20. PNG is king-of-web graphics in my opinion, because of its alpha channel properties (in other words, an opacity gradient in the image if you want it.) Unfortunately, Microsoft has fucked us again by providing no support for that, although promising support for it since 1994. Technically, the alpha channel is an optional part of the PNG specification, so this is the grounds that Microsoft uses to defend their laziness. GIF has transparency, but it is not a channel, it is on or off. With GIF, you specify a "matte" color, which is used for anti-aliasing so it blends into the transparency as much as possible. However, when you're using a background that isn't a solid color this isn't so-great of a solution.
  21. The best solution for this is probably a product called SitePal, http://www.sitepal.com which uses a TTS-engine called NeoSpeech. I've actually done a lot of research in this area, and NeoSpeech is, in my opinion, the best TTS-engine by far. It makes AT&T TrueVoice or whatever it's called sound like Microsoft Sam. Of course there's money involved in this. If you want the voice to sound like Automatron-3000 I think the AT&T engines have non-commercial free licneses available.
  22. According to these articles http://www.alternateinterior.com/2007/03/comparing-monolithic-controllers-with-task-based-controllers.html http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html Having one controller is a big mistake. I'm still trying to wrap my head around the theory of it though, so I'm not in a position to have my own opinion (yet.)
  23. Hi, Seeing the frequency of this on this board I hope no one is rolling their eyes at my topic. I posted this at comp.lang.php and got 0 responses, so I'm thinking it was the wrong place to ask. Reading some of the explanations here http://www.phpfreaks.com/forums/index.php/topic,138169.0.html it sounds like the model is just where your database abstraction/ORM takes place. Here was my original post: Greetings All, I had a question about OO implementation in the MVC pattern that is directed at anyone who feels experienced with it. My fuzziness comes from trying to learn OOP and MVC at the same time, coming from a procedural background where I used neither. I promise I'm not a dummy, and my logic skills are very strong, but this really is a whole new world for me. From my study of MVC the role of the controller component is most confusing to me. Traditionally, it seems that the controller was used in os-based software to manage input from the user, the actual data type handling, etc, where on a statically typed language or os-based software that is more of an issue. Reading a Developer's Library book called "Advanced PHP Programming" by a guy named George Schlossnagle (who seems like a fairly bright programmer) the assertion is made that the controller is irrelevant to the web because the browser handles all the input. Obviously that's not the stance of a big part of the community, as frameworks like Symfony, etc make a big deal out of the controller. The PHP-framework implementation of a controller seems to be more abstract than in os-software. So my question is, if I were to implement a controller, what I gather is basically that the model component would be comprised of only classes with no procedural execution, and that the controller would primarily be responsible for all instantiation of the model's business- logic classes? Is that the idea? I realize I may be asking for an answer that involves personal preference but if you have one, please let me know. Thank you in advance! Ricky
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.