Jump to content

salathe

Staff Alumni
  • Posts

    1,832
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by salathe

  1. Remember to break after each case.
  2. Could you clarify a few things, just so I can get things straight in my head (it's Monday morning!): you want to get a list of JPEG images from the images directory and all subdirectories, and sort that list by the file names? Are there other non-JPEG files in there? Do you need to recurse through all directories?
  3. Sure, except that doesn't do what the OP asked for.
  4. Hi Redex, firstly thank you for the response. The only reason I asked about the contact details is because they're a legal requirement for UK registered companies, which I guess you aren't yet? I can understand not putting the details up there, if you are able, to help prevent abuse especially if it has happened before.
  5. I can't confirm anything, but perhaps one of the bigger companies which offer training might be able to help (e.g. Ibuildings). Failing that, I might be able to get you a short list of folks who offer consulting/training and could travel to you, if that sounds like a good plan.
  6. Perhaps see http://blogs.sitepoint.com/2009/05/01/interactive-cli-password-prompt-in-php/
  7. It won't hurt to get it (unless you don't pass, then it's the torture of endless ridicule); I've yet to see any occasion where being a ZCE was a requirement (even when listed as such, it wasn't really...) but it shows you've put in the time and expense (more on that later) to receive a recognised qualification. If you're working at the moment, get your employer to foot the bill. Chances are, if you're an experienced developer, there won't even be much need for study in preparation for the exam. Out of interest, which particular certification are you looking at?
  8. Hi Redex, welcome to PHPFreaks! How are you finding setting up a new business? Do you have experience of running a business, particularly a web hosting provider, before? I'm just being nosy, but how can you be a reliable service provider after only two and a half weeks online? Also, I don't see an address or company number on your site, are you not a registered company yet? Anyhoo, enough of the grilling. Welcome once again to PHPFreaks.
  9. For what it's worth, life could be made simpler by using a regular expression which reads like match a dot which is not followed by a space character: $pattern = '/\.(?! )/'; $replace = '. '; The (?! ) is a "negative lookahead assertion" and is a fancy way of saying, "take a peek at the next character and make sure it is not a space". See http://php.net/regexp.reference.assertions
  10. salathe

    Hi guys

    Hi naike, welcome to PHPFreaks! It looks like you've got things planned, and know where to come for help. Enjoy your time here.
  11. How will your script know that oland maps to the Ă–land folder? Solving that problem seems to be the main sticking point. Do the folders change very often?
  12. Nope, everything has been running blazing fast for me.
  13. Great, now you can see what is halting the script: the max_execution_time (docs) limit is being reached after 60 seconds. Ignore rwwd about the file being "too big", a 123 MB file is fine.
  14. RAWR! Hello Adam, welcome to PHPFreaks. As a developer myself, I wish you the very best of luck in your quest to become a web developer. Good luck and we're here if you need us.
  15. The basics of clean and tidy code, perhaps. I don't mean that in any condescending way; it is a valuable skill to learn, to craft code that you (and others) can work with (and that gets the job done). Why not make life easier, for yourself in the long run, if you stand back and refactor your code into something usable? There are repeated elements which don't need to be repeated: why use the same code in multiple places to, for example, connect to the database, to issue a query and fetch the results, and even the HTML snippets are fairly repetitive. It would be much nicer if you could get the [samp]switch[/samp] itself down to a similar size and complexity as that in the first post here.
  16. I once wrote something very similar (and super, super simple) script which used PHP in conjunction with Growl (an on-screen notification system for Mac) and the afplay utility program to play some sounds (mp3 files). Make use of tools already available to you and use PHP as a glue between them.
  17. Hi Joz, welcome to PHPFreaks! Have you done any programming before? Do you like whales?
  18. Cags answered this on IRC (remember to come back and update posts!), for the benefit of other readers the dot character is not special within a character class (square brackets); i.e. it was only matching the literal dot.
  19. A simple alternative would be /^[-+]?\d+$/D which would match: one or more decimal digits optionally preceded by either a plus or a minus character. The D pattern modifier is used to disallow a newline (e.g. "12345\n") which the other suggested ones would allow.
  20. No, strpos won't match "wildcards" if that is what you are trying to ask.
  21. Thanks for letting us know.
  22. I blame Eric.
  23. You could use a regular expression to look for points in the string which have a capital letter immediately following it. How familiar are you with regular expressions? (It's OK to say not at all!) $array = preg_split('/(?!^)(?=[A-Z])/', 'KmSO4'); If that just looks like an indecipherable mess, let us know. The job can likely also be done with functions that you are more familiar with (do let us know!). See also: http://php.net/reference.pcre.pattern.syntax http://php.net/preg_split
  24. (Emphasis mine.) No you haven't. How much do the ads bring in every month? I may be willing to donate a percentage of that, if you'd be willing to hide one or more advertising blocks for all visitors.
  25. An even better fix would be to remove the ad entirely! (Yes, I'm not being helpful. Sorry.)
×
×
  • 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.