Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. I like that term. I think i'll use that more in general conversation.
  2. A barcode scanner is simply an input device like a keyboard. When it scans it simply types the code into whatever just like a keyboard would.
  3. LOL What! I bet you have more kids than the Von Trapps.
  4. I didn't find this. It is something that I have looked into before as an alternative to adobe flash media server.
  5. http://osflash.org/red5
  6. Dreamweaver has plenty of syntax highlighting. In fact I think it is one of the best IDEs for design & development. The issue is, not using the WYSIWYG for creating server side code. Coding should be done in the coder view. Design done in the design view. As I have already said, I use Adobe DW CS4 purely in coder view, even if I am just creating HTML. I never use the design view or any elements of the WYSYWIG. I maybe losing out on a lot of the functionality of DW but this is purely force of habbit as I am a developer.
  7. Wow, that was easy.
  8. Only joking. May have a few scoops later. You need to be pissed to watch that shower of shi**.
  9. Brilliant, i'm already on my fifth pint!
  10. Really simple <?php // array containg 100 elements $x = range(1,100); $counter = 1; foreach($x as $item) { print $counter."<br />"; if($counter == 9) { // display images print "displaying images<br />"; $counter = 1; } else { $counter++; } } ?>
  11. This is because you are running IPv6 on your server. ::1 is the same as 127.0.0.1 (loopback address). Disable IPv6 and use IPv4.
  12. No. See below. <?php class foo { public function __construct() { } protected function dostuff() { print "Hello World"; } } class bar extends foo { public function __construct() { parent::__construct(); $this->dostuff(); } } $x = new bar(); ?> When you want it to belong to the whole class and not a specific instance of a class (object). i.e <?php class foo { protected static $counter = 0; public $num; public function __construct() { self::$counter++; $this->num = self::$counter; } } // same class - 2 individual objects $x = new foo(); print $x->num."<br />"; // prints 1 $y = new foo(); print $y->num."<br />"; // prints 2 ?> This essentially means that the static property or method means something to the class but not to the individual object. i.e <?php class foo { public static function convertLbToKg($pounds) { return $pounds * 0.45359; } } class bar { public $kg; public function __construct($pounds) { $this->kg = foo::convertLbToKg($pounds); } } // I can call the static method from outside of the class print foo::convertLbToKg(120)."kg<br />"; // Or it can be called from within another class when creating an object $x = new bar(150); print $x->kg."kg<br />"; ?> I would recommend you invest in the following: http://friendsofed.com/book.html?isbn=9781430210115
  13. I would write a little function that you can reuse. <?php /* function to match all from given start & end point return results as array */ function parseArray($string, $openTag, $closeTag, $excluding = false) { preg_match_all("($openTag(.*)$closeTag)siU", $string, $matches); if($excluding) { return $matches[1]; } return $matches[0]; } /* usage */ $string = "<id>18800<end><id>18436<end>"; $results = parseArray($string, "<id>", "<end>", true); print "<pre>"; print_r($results); print "</pre>"; ?>
  14. If the script is running from the crontab then there is absolutely nothing wrong with your cron job. I suggest doing some debugging within your php script to see where the script is failing. Maybe get it to write to a log file after it performs each task or sends you an email when it is complete. Have you tested this from the command line? php /u01/www/vhosts/www.mysite.co.uk/httpdocs/imap_get_rars.php
  15. Agreed. If you attempt to modify the code produced by DW and then revert back to using the WYSIWYG in design view to add additional PHP, DW is likely to change the modifications you have made. Do not use DW in design view to connect to your database, create queries, list data, or add any server side code really. You are better just learning a bit of PHP/MySQL and working in the coder view. DW is actually very good in code view at assisting you with PHP's huge library of functions. If you are using an older version of DW be aware that some of the function library may be obsolete. I am running Adobe DW CS4.
  16. No. This is done by obtaining the MX records from the email domain i.e joebloggs@yahoo.com, the domain is yahoo.com. Take a look at the examples here. http://php.net/manual/en/function.getmxrr.php I would not use this method as you may not always be able to perform the lookups if there are DNS issues. This is backed up by the last post stating they put 2 valid addresses in and they both failed. What you should do is validate an email address by sending out a link to the address entered. When the user clicks on the link you know that the email address is valid. Email addresses that dont validate you can have a cleanup routine to get rid of them from your database.
  17. That's ridiculous. You do not have to know anything about object oriented concepts, design patterns, etc to write clean & efficient code that is scalable. If the person asking the question is not a programmer then the response could be a load of bs that sounds good. My advice is that if you require development work done, i'm guessing that you are a designer, you should team up with a proper company with a portfollio of clients. It is a bad idea to use many developers on the same project as each will take time to work out the others code, each will have their own style of coding, and most likely they will miss things if the code is not well documented and suggest a rebuild because the existing code is a mess. If you are the website designer then state your requirements to the development company. Use your own hosting so you have FTP access, and specify that you will be modifying templates to change look and feel. A good developer will separate all the logic from the layout so you cannot break the application. If you stick with the same developers over the life of the project you should not have the issues you have now.
  18. Thats great. I like this one. http://www.youtube.com/user/PianoChatImprov#p/u/3/JTwJetox_tU
  19. My girlfriend has one. Its for kids really. The only games I like are the ten pin bowling and mario cart. Prefer games where you can shoot the crap out of everything. Thats why i've never been a huge Nintendo fan, too many cutesy characters and not enough post-apocalyptic zombie slashing gore fests. The motion controller is out for PS3 soon, just get one of them, its the same thing and the games will probably be better.
  20. Ha! Xbox fanboy to the rescue. Xbox is the better machine. The XBOX only came out when the PS2 was released
  21. Your parents were wise. They bought the better machine. Bet the Nintendo fanboys will have something to say about that, eh.
  22. By using the google maps API & the JQuery framework.
  23. I suggest creating and submitting a Google sitemap. https://www.google.com/webmasters/tools/
  24. Yep, same with the E111 card application form, absolute garbage validation, CSS, javascript, etc https://www.ehic.org.uk/Internet/startApplication.do
  25. Typical. You'd think as we paid for this (the taxpayers) they would get people who knew what they were doing. Probably cost millions to make this website.
×
×
  • 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.