Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. okay so maybe it didn't have that, but it did have a built-in index.
  2. i think the point of having to write it out on paper was so you actually learned the code instead of rely on things like auto-complete.
  3. mmm pascal. <gets nostalgic>
  4. How are computers going to possibly become our future overlords, if they can't at the very least, know the difference? pfft. I wag my ass at our future overlords.
  5. hahaha noooo dude that was a joke - mysql won't complain about the quotes from that because it removes all of the quotes! Use mysql_real_escape_string like what was already suggested.
  6. yeah i noticed that a while back. probably something to do with their bbcode handler.
  7. well then you are probably not using the right variable that holds the source. Or your source isn't what you think it is. Or you're echoing the wrong var. My example used $string. There's no reason why that pattern wouldn't match and replace your li tags.
  8. your calculator can't divide by zero any more than your computer can. Think of it displaying the original number as its custom error message.
  9. $string = preg_replace('~<li[^>]*>~i','<li>',$string);
  10. lol dunno what to tell you man. Fine and dandy if it makes sense to you, but it obviously causes issues.
  11. well, your site is your own little sandbox, though. What if you start taking on clients, writing scripts for them, modifying stuff on their site, etc.. where you may not be the first or last programmer to mess with it? I mean, that's the core reason why people push for standards: so people can be on the same page and know what's going on and follow each other's work. I mean, that is the central theme of this very thread: MS dropping the ball on shit, right? Well, you have to practice what you preach...
  12. long names, yes, but it's not like your processor is really suffering from it, and better organization makes all the difference in the world when trying to debug or edit/modify later, especially when it's not you that's the one doing it. Good programmers do not just think in the present. They think about the future, too. I spend all day wading through other people's shit, wishing that they would have just put the extra 10 seconds worth of effort it takes to do basic shit, like name stuff better, indent, comment, etc...
  13. hmm...well tbh I think you should be using better naming conventions. For instance, if the form was a "contact us" form, I would do this: <form id="form_contactUs" name="form_contactUs" action="..." method="post"> <textarea id="form_contactUs_message" name="form_contactUs_message"></textarea> <input type="submit" name="form_contactUs_submit" id="form_contactUs_submt" /> </form> Now, whether I would actually have id AND name in all of those depends on my coding needs, but regardless of whether I do or not, I will not have any other tag/element use those names/ids.
  14. if you think that's serious, you should see what comes out the other end...
  15. that would create a tear of space-time fabric and the universe would swallow itself up.
  16. whenever I'm coding html, I always make pretend that id and name are one in the same. So if I do <div id='blah'>..</div> no other tag/element will have 'blah' as an id OR name. So whether something has an id, name or id AND name, it will always be the same thing. like <input id='something' name='something ..> etc... and no other thing on the page will ever have 'something' as an id OR name. That way, I don't have to worry about stuff like this. I don't see how that's any harder to remember than what you are doing. I can understand not wanting to go back and redo your code, but moving forward, if you do that in the first place, then it won't be a problem.
  17. wouldn't it be better to have the register act as the interface between your script and the printer? As in, have the script send what needs to be printed back to the register, and have the register print it, as it already sounds like it's setup and configured to do that.
  18. Same thing as I said in the last 100 threads about the same thing: All I care about is remote editing and syntax highlighting. folding up blocks of code is a nice add-on, but not necessary. beyond that, it's all fluff to me, and I usually end up getting lost and frustrated. If uber pimp IDE's get you off, then go for it. Not judging. Just saying, it's not for me.
  19. never ceases to amaze me all the people who post their problems but somehow assume that we know anything about their problem or situation. We aren't there sitting next to you. We have no idea how your system is setup. We have no idea what the context of what you're trying to do here is. You have to paint a picture of your situation. "add the page that you toggle" wtf does that mean? We know what a page in general is, but we don't know what your page is. We know what it means to toggle in general, but we have no idea what you are trying to toggle. Post your code. Tell us what it currently does. Tell us what you want it to do and where. draw a picture if you have to. we aren't psychic. All you are doing is saying the proverbial "I have this script and it doesn't work." Read what you post before you post it. Pretend you are someone on the other side of the world who has never been to your site, heard of your site, or heard of you. I know it's hard, but try. Read what you write and ask yourself, if I were on the other side of the world and have never seen my code/site before, would I know wtf this means?
  20. You would use your favorite paint program to make a really big image. Really big black box (or dark gray, whatever). Darker color you use, darker it will make the rest of the page. Make it semi-transparent, like 50% alpha. How transparent is up to you. Less transparent also = darker. Image would be big enough to cover the width/height of your page. You would then have a div somewhere in your script. <div class='fader'></div> that's it. And in your css file or inline in your head tags or something, your fader class would specify the background-image as the image you made, and the z-index as like 50 or something (just some level higher than the rest of your stuff. If you don't know about z-indexes then chances are, anything above 1 will do it for you, as things are by default put on level 1). You would also specify the visibility as none, so it doesn't actually show. Then, when the user plays the movie, you would have a js onclick attached to it, or an event listener, etc...depends on how you have your video player setup. onclick or event or whatever, you would use js to make that div visible. You would also have your video on a z-index layer higher than whatever you decided for your fader div, so that it doesn't get faded.
  21. right. they might have one database, but that's not really a hindrance... you can still make the tables you need. The only thing would be that since it's all under the same database as whatever they originally had there, things would be able to be cross referenced. If you really think about it, that might not actually be a bad thing, depending on circumstances..
  22. dude, if that was the only thing that IE had different going on than the rest of the world, I'd be a happy camper.
  23. I'm a noob at mod rewriting, so forgive me if I'm being ignorant here, but don't you have the pattern/$n backwards? as in, doesn't it need to be like RewriteRule product/id/$1/title/$2 product.php?id=(.*?)&title=(.*?)
  24. you could use get_magic_quotes_gpc to find out whether it's being used or not, and write your code accordingly...
  25. so...why not store the stuff in a database instead? even using mysql lite would be a step up.
×
×
  • 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.