Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. $_SERVER['HTTP_REFERER'] or you can store the current location in a session variable
  2. .josh

    my own or die

    FYI there are way better ways of doing custom error handling. Overall I would not recommend doing that ..or die() thing.
  3. preg_match_all() returns an array of matches. You need to iterate through the array with a loop. http://www.phpfreaks.com/tutorial/php-loops
  4. .josh

    my own or die

    that will work, as long as myfunction() returns something evaluated as false
  5. Also, if it's the only thing in $DepartureDate then you need to specify start and end of string, or else it will be able to match for example "blah12-12-1234" $dateregex="~^[0-9]{2}-[0-9]{2}-[0-9]{4}$~"; Also another note..this doesn't validate whether it's a real month, day or year. For example, it will validate 99-99-9999
  6. @AlexWD : my point was that yes, over the years, ability to collect data has increased, but we didn't just magically start thoroughly writing down numbers this year. Anybody can review historical data and see that 2011 has produced many times more than normal earthquakes, volcanic eruptions, tornadoes, animals dying, etc.. than usual. @MrAdam: Also want to point out that the Q&A link you posted...mentioned nothing about stuff predicted to happen this year. But even still...assertion is govt. and NASA is covering the shit up, so pointing to a website where "credited scientists from NASA" are saying "no it's not true" doesn't mean anything.
  7. The reason for the unprecedented amount of natural disasters is our unprecedented ability to detect natural disasters. Right...so in 2010 we did not have the same unprecedented ability to detect natural disasters?
  8. @MrAdam: yeah well...see problem is that the "proof" from your link basically boils down to asking the people who are accused of covering it up whether it's true or not.
  9. Actually there are a couple varying "predictions" about shit hitting the fan this year, around september/october. Google "Elenin 2011", "Planet X 2011" and/or "Niburu 2011" if you're too lazy, basically the gist is there is this "entity" floating around in space right now and the U.S. govt and NASA is claiming it's a harmless asteroid but a lot of other people including other world governments are calling b.s., saying it's really a brown dwarf and it is the reason for the unprecedented amount of natural disasters this year (stuff to do with its own gravity coupled with the sun's gravity) and it's due to "line up" between us and the sun later this year (which causes some kind of gravity well) and shit is gonna super hit the fan when that happens.
  10. Are you seriously the web dev for a company? That's the impression I'm getting from your previous posts...and yet you say this?? Good lord, people will hire anybody these days. Also, considering you are failing to even grasp fundamental principles of how web pages and code work...I would not be so quick to judge whether or not something is an error. I mean seriously, how can you sit there and say whether or not something is an error when you clearly have no idea what any of the stuff is for or how it works or what it is doing? I think maybe if you weren't so quick to dismiss what people are telling you, people around here might be a little more willing to help.
  11. How can anyone predict what is likely in the next 5 years. - obviously. == world exploding
  12. you can start by reading the manual entry for echo
  13. column
  14. There is a books resources thread stickied in this forum.
  15. As long as there is no enforced standard among all browsers, frameworks like jQuery will always exist and be a viable option.
  16. FYI we use SMF not phpbb.
  17. Okay soo...are you looking for people to find bugs or make suggestions on how to improve it on a technical level? If it is the first, then okay, thread stays here. If it is the 2nd, then this still belongs in website critique forum.
  18. Also, you're going to get copycats regardless. If you can't hire a lawyer to pursue them, then you're going to have to adopt the "do it better than them" strategy. And to a large extent, you're going to have to have that strategy anyways. First, there's no way a lawyer can completely squash all copycats. If for no other reason, because many will be sitting outside the jurisdiction of copyright laws. 2nd...it only takes so much tweaking to allow someone to call their version of your idea their idea, and you can't do nothin' about it. So you should just get it out of your head this whole fear of people "stealing" your work, because it will most certainly happen no matter what route you take. So adopt the "do it better than them" attitude and the rest will fall into place, if you're willing to put the work into it.
  19. Even if you want to sell it off to someone willing to put more money into it, your best shot at doing that would be to first put some of your own money into it. If you've already put in the time/effort/money to make it work...hosting is pretty cheap, especially if you're just trying to get enough traffic to show investors and potential buyers that it's worth putting their money into it. So that would be my first advice to you; at least invest your own money initially. It really isn't a lot, a few bucks a month. If you can afford to be online and coding this thing, you can afford a few more bucks a month for hosting. If you can't, then maybe you should back up and re-prioritize where you're putting even that money/time. My next-best bit of advice is if you want to broadcast it to potentials but don't want to do ^^, write up a summary of what your product is. And make a video/webcast demonstration to show people, instead of pointing to a live working version.
  20. IMO this question doesn't come up regularly around here. But if we were to nonetheless make a public statement about it, I certainly do not feel it should deserve its own thread, as it really does boil down to "There is no process for you to take." I would instead suggest amending the Groups, ranks, and hierarchy on PHP Freaks thread to include a brief summary of how one moves up in rank.
  21. True story...he sent me 5gb of midget-on-badger interspecies erotica from his personal collection. Though in retrospect, had I known he uses a mac, I would have demanded 10gb instead.
  22. Well for your purposes, you don't actually need $1, as you are wanting to match and remove. So you would really be doing: $description = preg_replace("#^Sl.*#", "", $description); Breakdown: # beginning pattern delimiter. preg_xxx functions require you to wrap the pattern in a delimiter. You can use pretty much any non-alphanumeric character as the delimiter. Most people use / ~ or # ^ start of string anchor. Tells the regex engine to start at the beginning of the string SI look for and match the literal characters S and I .* the dot says to "match any one character" (which matches almost anything, but I don't wanna complicate things for you). The * says match 0 or more of any of the previous thing, so together, it says to match 0 or more of anything # ending pattern delimiter. ------- As to what $n (like $1) means...basically they are temporary variables the preg_replace (and some other functions) uses to store captured groups within the pattern. For instance, the pattern Zanus originally supplied: $description = preg_replace("#^Sl(.*)#", "$1", $description); You see in there (.*) the parenthesis mean to capture that part of the pattern. That stuff will go into $1. If you have more than one set of (...) in your pattern, $n represents the captured groups, in the order that they appear in the pattern. But for your purposes, since you are looking to replace the entire matched stuff with nothing, you don't need to capture anything or use $1 or anything.
  23. We're actually working on a new forum "feature" that highlights text-book examples of good and bad threads/posts, so that people can see real-life examples of rules and etiquette.
  24. I wish I had created angry birds. Those bastards are raking in the $$. Create an Angry Badgers game!
  25. I'm just a little fuckin' worm on a big fuckin' hook. Not gonna bother trying to fight some big corporation. Just gonna accept my losses and move on.
×
×
  • 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.