Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Oh and also, the dot (.) concatenates things. So for example: $x = '2a'; $y = '2c'; echo $x . $y; // output: 2a2c
  2. 2a and 2c are in the following (example): echo $correctanswer[2][0]; // 2a echo $correctanswer[2][1]; // 2c When you do if($q2 == $number2[2] . $number2[1]) you are comparing $q2 to nothing.
  3. http://www.phpfreaks.com/tutorial/basic-pagination
  4. I think he's saying his problem is for instance if the user registers as CrayonViolent but tries to login as crayonviolent he can't strtolower etc... until after the query, obviously. So he needs a way of doing a case insensitive query. Fortunately for you, mr. vicodin, non-binary strings (char, varchar and text data types) use the collation of the comparison operand you use. And fortunately for you, mr. vicodin, by default, string comparisons are not case sensitive and use the current character set. In other words, if you have: username CrayonViolent and you do this: select * from table where username='crayonviolent' you will get a result.
  5. I have FF3.0.4 no line breaks here...
  6. We'd be benefiting the community as a whole by not allowing people to fight on the boards.
  7. So what if some random dude claims you did sub-par work for them, but they paid anyways, but warns people never to hire you? I bet you'd be pretty pissed off if that wasn't true. I bet you'd want us to make him take that down.
  8. $you = 1000000000; $straight = $x; // inverse ratio of undisclosed amount of times she makes you think you'd much rather be gay $gay = money_format("$%i", ($you % $straight)); echo "You are this much gay: $gay"; output:
  9. IMO... To me, the difference between Jr. and Sr. is being told exactly what to code/do, where to do it, etc.. and figuring out what needs to be done, where, etc.. and delegating responsibility to the Jrs. In other words, your technical knowledge isn't necessarily the deciding factor between a Jr. and Sr. position. It's your ability to assume the leadership role in solving problems and making stuff happen. Now that's not to say that there are no lack of Jr. programmers doing what I just described the Sr. position to be. The smaller and non-web/technical dependent the company is, the less likely they are going to employee multiple people to fill "proper" roles.
  10. That reminds me. My mom called me the other day, freaking out. Okay so she works at home. She does data entry and some other stuff or whatever. Company supplies her computer and internet connection. Well a while back, she buys a laptop, and decides she wants to be able to use it. So she also buys a wifi router. She installs it herself. So she was in the middle of working the other day, when her internet gets cut off. So she calls up her ISP asking wtf. They told her they cut her off because she downloaded an illegal copy of Fallout3. Okay my mom is like 75. She barely knows how to turn on a computer. She knows how to use the programs she uses for work, and that's it. I'm severely impressed she even managed to plug-and-play the router in to begin with. She has no idea what Fallout3 is. She has a vague idea what video games are in general. So the CS guy at her ISP decides to turn her connection back on if she removed her router, but in no uncertain terms told her that Bethesda, at their leisure, could wtfpwn her in court. So she calls me up in hysterics, can't understand half of what she's saying from all the tears. The End.
  11. Wrong. You are not allowed to go around harassing people on the board. If you have a problem with him, that's between you and him.
  12. Unfortunately, there's really no way for us to verify if what you are saying is the truth or not.
  13. Okay so at the top of your code you have this: $Resume = file_get_contents('http://www.freewarechubs.com/upload/93819.doc'); echo("$Resume"); does nothing echo out from that?
  14. I don't think I'd call myself a hacker. I'm more of a code dilettante.
  15. well he could just reorganize his code. But okay, since his $target already has what your code suggests (from earlier), no need to reassign stuff, just use $target
  16. silly question, but why not just name it what you want it to be named in the first place, up in the move_uploaded_file? But anyways, try using $target as the first argument of rename.
  17. nono, I didn't think you were being seriously serious. Just arguing for argument's sake.
  18. count() should get you started.
  19. Oh I don't. There's plenty of people out there that will write it all off to their preconceived notions, no matter how you try to explain it to them. I'm just pointing out that there is already an established means of differentiating the two that extends beyond the hacker culture. And even if it hasn't been established at all, IMO it's a lot more intuitive than "GIAS"
  20. $ads = array ('ad1','ad2','ad3','ad4','ad5'); $ad = array_rand($ads); This will pick a random ad. Overall, it will be evened out (the whole law of averages thing). However, this does not guarantee that you will get a string of ad1 ad1 ad1 ad1 at some point in time. But overall, it will be evened out. The only way to guarantee that it will not randomly do something like ad1 ad1 ad1 ad1 is if you somehow keep track of what is being picked. Now you say that if someone goes to the site, you want a random ad picked. First thing you need to clarify is what you mean by "goes to the site." For instance, you said you want the ad to stay the same if user refreshes the current page. But what if he follows a menu link or whatever to another page? Do you want it to show the same ad, or a new one, but make sure it's not the same one as before? You can use sessions to track that. But now let's say user goes to your site, gets ad1. He leaves and comes back a couple hours later or tomorrow or whenever. Do you want to make sure that since he saw ad1 the last time he was there, that it will pick anything but ad1? If so, you're going to have to throw a cookie into the mix. Or a flatfile or db. And you still haven't really been clear on this: if userA gets ad1, do you want userB to not pick ad1, since it was just picked by userA? If so, you're definitely going to have to go the flatfile or db route. So yeah...clarify what exactly you want to happen, because "I just don't want to show one ad code on my site more than another." isn't very specific. Also, fyi: That's not really what we're here for. We'll point you in the right direction or help you fix bugs but if you want someone to do it for you, hire someone, because that's the sort of thing people get paid to do.
  21. dunno...'white hat' and 'black hat' is not indigenous to the hacker community. Those terms have already been established as 'good guy' / 'bad guy' terms. The hacker community adopted it, not the other way around. And on top of that, they adopted it a long time ago. I think a lot of people will (do) indeed understand the difference.
  22. I like sasa's option the best because it's less code, though I'm fairly certain it's not any faster than mine. Also, it's bugged. I fixed it: <?php $State = array( 0 => 20000, 1 => 20000, 2 => 0, 3 => 0, ); $ChoiceKey = array_search(min($State), $State); print_r($State); echo '<br><br>'; echo $ChoiceKey; ?>
  23. I think that's what the whole whitehat / blackhat is for.
  24. preg_match_all("/<div[^>]*>(.*?)<\/div>/",$string,$matches); [pre] Array ( [0] => Array ( [0] => <div> some text1</div> [1] => <div>sometxt2</div> [2] => <div>example</div> ) [1] => Array ( [0] => some text1 [1] => sometxt2 [2] => example ) ) [pre]
  25. I think the person who made the mod probably considers it to be a moderator action, so it's put on the moderator toolbar on the bottom left, instead of the "Reply, Notify, etc..." toolbar on the bottom right. I mean, you can set permissions on it to allow just the OP to mark it, anybody can mark it, or specific groups.
×
×
  • 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.