Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. No, an IP address is one 32-bit unsigned integer. The dotted notation is for humans, not computers. So to get a random IP address you just generate a random number lower than 4294967296 and convert it to dotted format.
  2. if you ran it...then where's the code the author wont let me post it neither tell me how he did, so i just took a quick screenshot ^^, wishing anyone could suggest how'd it could be done There is a program in my textbook that I don't understand how works. Can you tell me how it works? I won't show you the source code, but surely you can tell me how it works, right?
  3. What do you mean with "looks like ASCII"? ASCII is just a character set.
  4. I can set my user agent to whatever I want, so you cannot use the user agent for that.
  5. You can only specify a constant value as default for an argument.
  6. I'm studying computer science on the University of Copenhagen, Denmark and I have a general interest in mathematics.
  7. When finding a duplicate, just subtract 1 from $i and move on. That'll give you the required number of random integers.
  8. That depends. You can reasonably say that they are: [pre]--------------------------- | Name | Value | =========================== | First Name | __________ | | Last Name | __________ | | Email | __________ | ---------------------------[/pre] The thing is just that making them a table makes it difficult to style it differently, so you're better off not doing it.
  9. Uh yeah, but something has to trigger the change after the page has loaded.
  10. How would your navigation bar suddenly change?
  11. You can do it in a much more clever way: <?php $wStatuses = array( array('min' => 0, 'title' => 'Very poor'), array('min' => 100000, 'title' => 'Poor'), array('min' => 350000, 'title' => 'Worker'), // etc. ); $money = 105032; $i = 0; $next = 1; while (isset($wStatuses[$next]) && $wStatuses[$next]['min'] < $money) { $i = $next++; } echo 'Having ' . $money . ' money, your wealth status is: ' . $wStatuses[$i]['title']; This makes it much easier adding additional wealth statuses.
  12. Right, but there are no rules in the HTML specification governing how H1 should look. It's completely up to the user agent to apply additional styles to the element. Same thing goes for a multitude of other tags like A, KBD, ACRONYM, STRONG, etc. In section 9.2.1 of the HTML 4.01 specification [1] you'll see: I am perfectly free to write a user agent that makes all text within STRONG tags 10 times larger than the normal text and flashing in red. That would provide a strong emphasis after all, and that is all the STRONG tag is supposed to do. All the places in the HTML 4.01 specification where presentational tags are described, there is a remark saying something along the lines of "but we recommend you use CSS instead". Nowadays, the preferred way of writing web pages is to not use HTML as a template, but rather as a document describing meaningful semantic information about the various parts of the content. It's very clear to see that HTML is moving further and further away from being used as presentational markup to being used as semantic markup. Moreover, in section 11 of the HTML 5 working draft [2] you'll see: This shows that HTML (in version 5) does not in any way convey presentational information. Additionally, in section 11.2 of the same document [3] you'll see: That shows it is CSS that is responsible for the visual (or aural) presentation of the content. References: [1] http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.2.1 [2] http://www.w3.org/TR/2009/WD-html5-20090825/the-xhtml-syntax.html#rendering [3] http://www.w3.org/TR/2009/WD-html5-20090825/the-xhtml-syntax.html#introduction-9
  13. How so? How does <h1> convey presentational information? It's only because the rendering engines attach certain CSS attributes to it when parsing. And they actually do it differently sometimes and the user may override it.
  14. That's not an equation. Just saying.
  15. No.
  16. Oops, sorry. They're in bzip2 format. Rename to *.tar.bz2 instead.
  17. What do you hope to achieve by reporting my post? Not to be a smart ass, but I can read all reports, and I'm highest authority around here. I think you've missed the point with getting help for free online. People will help you if they want to and when they want to. If nobody wants to help you, you just won't get help. If you want to increase the chances of getting help you just need to make sure that you are presenting a problem that is interesting enough for other people to bother using their own time on helping you for free. The fact that you are even whining about not getting any responses just shows that you are disrespecting people who potentially would help you. You aren't any more important that other people. You asked a question, and I answered it. My answer was based on why I myself wouldn't answer a topic.
  18. Whatever you say. Anyway, I was always taught that stupid questions get stupid answers. How is anyone supposed to know why nobody else is answering your topic? I listed the reason why *I* wouldn't answer a topic. Either I don't know, in which case there is not really anything I can answer with. Or perhaps you haven't explained what you want properly, in which case I won't waste my time playing 20 questions for the professor. Or perhaps I know from past experience that whenever I try to help you it goes on for several pages because you're too stupid to comprehend even the simplest concepts. I just thought of another one: Maybe you expressed some sort of dislike of me, and thus I've decided to ignore you.
  19. Without having read your topics, if you aren't getting any responses it's probably because of: 1) Nobody knows the answer. 2) You haven't explained your problem well enough. 3) People feel you're too stupid and have given up. Again, I haven't bothered reading your topics, so I don't know if it's any of those.
  20. If you read the man page you'll find out.
  21. Just do $plusMinute = strtotime('+1 minute'); If you specify a relative time only, it'll always be relative to the current time.
  22. You can use set_time_limit.
  23. They decrement with 1 point each 24 hours (but only if you haven't been warned within the last 24 hours). However, they will be permanently logged in your account. If you reach 10 you'll be put on a watch list that all moderators and administrators have access to. Whenever they see your posts or your profile they'll see that you are on that list. When you reach 30 your posts will have to be manually reviewed and approved by a staff member. When you reach 70 you will not be able to post at all. It's unlikely you'll ever get above 70 though; you'll probably be permanently banned instead.
  24. The reason why people get upset when other people use table tags as presentational markup is exactly because HTML shouldn't be used for presentation. If your content semantically is tabular, you use the table related tags, but that in itself does not in any way specify how it should look. You'll do that using CSS. That is the general idea in the concept called "separation of concerns" in regards to web pages; you split the web page up in the layers content (HTML), presentation (CSS) and behavior (Javascript).
  25. Done.
×
×
  • 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.