Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Yeah sorry, feel your pain, but don't be pointing the finger at us. That's a common "feature" of the internet in general. Surely this can't have been your first ever tl;dr effort... I make a lot of tl;dr posts, so I've probably felt the pain of losing stuff more than most people and their 140 char responses. As others have mentioned, if you're going to make long posts or posts that require a long time to make (writing as you are researching/testing code/whatever)...always always ALWAYS back it up before clicking preview/post. pre-write in notepad or something. copy to clipboard. use an add-on designed for this. Etc... And this rule of thumb is not forum/site specific.
  2. I know it's not the total of what you are doing, but FYI you can also use array_pop to remove the last element of the array, and array_push to add something new to the end.
  3. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=334480.0
  4. starts with a number: SELECT column FROM table WHERE column REGEXP '^[0-9].*' starts with any non-alphabetical SELECT column FROM table WHERE column REGEXP '^[^a-zA-Z].*'
  5. What are you guys talking about...that picture is Gizmola.
  6. Right..and it would have its own cron equivalent. Virtually all systems have ability to schedule execution of something on a regular basis...I assure you that's not the issue. Issue seems to be that he's apparently not allowed to, and its probably because he has some super cheap hosting plan
  7. Do you consider yourself to be a professional coder? From your own mouth, obviously not php, but what about Lisp, Perl or Ruby? Do you consider yourself to be a professional coder in one of those languages, or some other language? Because you keep trying to blame it on your lack of knowledge of php but from reading your posts here, as well as your blog posts, just seems like it's not really because of lack of php experience specifically, but lack of experience in programming in general. And that is fine. Everybody starts somewhere. But what is not fine is you making judgments about how long things should take or what others should be able to do, when you don't have the experience to make such statements.
  8. surely godaddy has a chronjob in its cpanel, thats the way to go I'm sure they do..but he said that they said "we won't have authority to create a task". ...which means he's probably on a really cheap hosting plan. Most really cheap hosting plans do not let you do things like that.
  9. I don't know the exact context but if you are trying to extract something then you shouldn't be using preg_replace(). You should be using either preg_match() or preg_match_all(). I mean sure, you can technically get what you do want by using preg_replace() to remove everything you don't want, but that's kind of an ass-backwards way of doing it. And that's not preg_xxx specific nor is it php specific...that's a way of thinking in general, so you can't really blame your lack of php skills on that. And I have said, it's not very wise to make assumptions about something when you admit you don't know the language. As mentioned, regex is pretty advanced even for people who are otherwise proficient at php - or any other language for that matter. To a degree, I understand this, but if you are already proficient in other programming language(s), then it's not so much of a learning curve to pick up a new language as it is to start programming in general. 99% of it is simply syntax differences and formats, which are trivial, not the same as learning programming concepts in general. Especially when it comes to php, as it is actually one of the lowest learning-curve languages out there. What little you have mentioned, to me not only speaks of being a newbie in php, but of programming in general. Seasoned coders (non-language specific) do not make assumptions about things. They do not just cut and paste snippets of code they googled and use it, without understanding what is going on. Are you seriously going to put code you don't understand onto your live site? I'm not trying to pick a fight or nothin', but seriously, you are giving off the impression that it should be easy, but then trying to excuse yourself from your own judgments. Perhaps this is not what you are meaning to do, but it is what it is, and that's the impression you're giving people.
  10. Those functions are pretty straight forward if you already know regex as you claim, or string manipulation techniques in general. And the php manual is widely recognized as one of the most well written manuals..ever. I think you foolishly made a lot of assumptions about how easy something should be, and are now trying to use your lack of php knowledge as an excuse. And that may be a true statement on your part...but that same lack of knowlege applies to accurately judging time and difficulty. It sounds to me like you need a helping of humble pie. To be fair though, regex is not for the faint of heart. Very few people grasp it. Even fewer master it, even the devs who master practically everything else. You are of course welcome to post questions on the forum...if you leave the "I'm awesome, this is easy, everybody sucks, its everybody else and the language and everything else that fails" attitude at the door.
  11. can you please step back for a moment, clear your mind, pretend that you are someone else who doesn't know you or your situation, read what you just wrote, and try to determine if you could possibly solve this problem with the information you just gave? "I clicked buttons and it gave me a subdomain name" tells me...what?
  12. what did you do to setup sub.domain.com? What is your virtualhost info?
  13. So are you saying you can go to www.domain.com/config.php and that works?
  14. perhaps you are also outputting a charset meta tag on your page (or a setting in your browser) that's causing your browser to render it as a special char?
  15. fair enough...wasn't accusing you of not considering those things, just merely bringing them up as possibilities, since you were pretty vague about your beefs.
  16. .josh

    PHP or JS

    Not to be confused with Chromulent: a plugin for Google's browser. Edit: I totally submitted that to urbandictionary.com don't be jealous
  17. .josh

    PHP or JS

    Lack of education does not a smarty make.
  18. Hmm..."days to complete". Let's just say for argument's sake that 2-4 hours is an accurate estimate of how long the project should physically take. Are you sure you aren't misunderstanding others' statements of "days to complete"? Perhaps they mean it like "I will have it ready for you in a couple of days". Which is not the same as saying "I am going to bill you 48-72 hours" or whatever. Because...just because something only takes a couple of hours to physically do (allegedly..again, for the sake of argument we're assuming 2-4 hours is accurate), doesn't mean people are just sitting on their ass with nothing better to do than jump on your project immediately and focus solely on that. At any given point in time, I have at least a dozen or so projects on my plate. Just because something takes X time to do, doesn't mean you're gonna get it in X hours. Same with you...you yourself say that you can bust it out in 2-4 hours...but how long have you been sittin' on it? edit: Also, dunno about you, but where I work, we charge for more than just how long it takes to physically code. We include in our SoWs time for communication and figuring out all the details of what you actually wanna do, working with the client devs to make it go from concept to reality (knowing how to interact with a db is not the same as knowing how you have your stuff setup, what established protocols/procedures/coding conventions and other hoops you have to jump through to interact with your setup, etc..), QA processes, etc... IOW there is a lot more work involved in getting something from your head to live on your site than the actual coding. edit: And of course, none of this speaks at all towards their ability to perform the task in general. I am merely pointing out a possible misunderstanding between "how long should this take (how many hours will I be billed)" vs. "when will I actually get it", and also the fact that projects involve more time and work than just coding - something many people tend to forget, when looking for someone to do work.
  19. hmm...what about the green part below? Does that count as a match too? Or is that all part of the same block of code and that black bolded part is all you want to match? my thought is to use the red stuff below as delimiters, but that would also match the green stuff, but I don't know if that is a separate entry you're trying to match or not So here's the thing...you say you want to match the text up until the date...but you don't say what the starting point is, and you seem to only have highlighted one bit of text, even though there are several places where your "match text up until date" is applicable. I guess what I'm getting at is that you need a clear boundary (delimiter) for what you're trying to match, and there are lots of dates in this chunk of text you posted (in different formats, I might add..), so as of right now, I'm not seeing a clear boundary. Also...another question...are you sure this is really what the real content you are trying to match looks like? No html code in there somewhere?
  20. Instead of trying to match for everything except the date, how about matching just the date and then remove it, using preg_replace ? Or perhaps I misunderstand your overall goal here...perhaps it would help if you should an actual example...
  21. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=334273.0
  22. First off, preg_match_all() does not alter the subject in any way, so $continue is not "becoming empty" as you put it. 2nd, we cannot even begin to help without knowing what the value of $continue is, and what you are expecting to get out of it.
  23. .josh

    PHP or JS

    I enjoy watching the yellow angry cephalopods. And Maq exposes himself as a hentai fan. But more importantly, he exposed himself.
  24. .josh

    PHP or JS

    I'd rather watch Ice Hockey. For some reason, watching women slam balls around as hard as they can makes me cringe. I've watched some matches...I can see it in some of their eyes...I know wtf they are thinking.
  25. .josh

    PHP or JS

    Yeah... as a heterosexual male, I prefer not to be fingered.
×
×
  • 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.