Jump to content

neylitalo

Staff Alumni
  • Posts

    1,853
  • Joined

  • Last visited

    Never

Everything posted by neylitalo

  1. The flavors of Ubuntu do not allow logging in as root, nor switching to root. To access root privileges, use the "sudo" command: [code]$ sudo <command>[/code] You'll then be asked for a password. So, for example, to run "ifconfig", a program normally only accessible to superusers, you execute this command: [code]$ sudo ifconfig[/code]
  2. Nope - only in the help request forums.
  3. The BIND DNS server is very popular, as well as Microsoft's DNS server - BIND is free, Microsoft's is not. :)
  4. [quote author=michaellunsford link=topic=120542.msg495040#msg495040 date=1167708186] Now, as for the multiple name servers, why not have the name server and the hosting server be one in the same? [/quote] You could do that, but it would be impractical in a large-scale situation. A big hosting company will usually have one or three nameservers that keep track of dozens/hundreds of servers. If you had a small network, though, and only one web server, then it would be perfectly acceptable to have it handle DNS as well.
  5. Well written, but I'll try and clarify those points a little bit. Point #1: Say, for example, you send an email to user@example.com. The email client asks its DNS server for an MX record for "example.com", so it knows the IP address to send the mail to. (This all happens in the blink of an eye.) When the DNS server gets the request for an MX record, it checks to see if the host in the primary MX record is available. If so, it returns that machine's IP address. If not, then it checks to see if there are any other MX records belonging to example.com, and if so, it returns the highest available record. Once the mail client has the IP address, then it sends the email to that IP address and it's all up to the other server from that point. And point #2: If the website server is down, there's nothing that you can do. Any number of name servers won't do anything if the website server is down. The extra name servers come in handy in case one of the NAME servers goes down. If the primary name server goes down, then there's another server to fall back on.
  6. /usr/bin/uptime on my system is provided by procps - http://procps.sourceforge.net/
  7. Can you re-phrase the question, preferably with a question mark? That way we'll be able to know what we're responding to...
  8. [quote author=Daniel0 link=topic=120079.msg492565#msg492565 date=1167316442] [quote author=SemiApocalyptic link=topic=120079.msg492521#msg492521 date=1167309171] You appear rather immature for a 28 year old, phrozenflame... You must be in your early teens, masquerading as an adult, surely? [/quote] oldmanice [/quote] You're good. ;)
  9. If you're looking for a place to introduce yourself, right here is fine - or you can respond to the "Get to know your fellow coder" thread stickied to the top of this forum. If it's a different kind of introduction,  you'll have to elaborate.
  10. [quote author=AV1611 link=topic=120002.msg492188#msg492188 date=1167243010]In linux, do you not have that problem?  there is no "registry" so is simply restoring an application to it's original path all that has to happen?[/quote] That is correct. rsync is an excellent tool to accomplish this - and /usr, /lib and /etc (the most common directories for binaries, libraries, and config files) are usually very small. It would take a simple command execution once a week to keep your backup up-to-date, and another simple command to restore a backup. One little note: You rarely need backups, with Linux.
  11. I apologize - it's hard to tell sarcasm or joking on the internet. (I'm going to leave my post up, though, to serve as a warning to anybody who wants to genuinely insult us. ;D)
  12. [quote author=extrovertive link=topic=119524.msg491252#msg491252 date=1167025974] Fighting each other over programming..how geeky! [/quote] Hm. I take it you've never been in a situation where you would like to do something better than the other guy? Evidently these programmers like to see who's the best in their area. I see nothing geeky in trying to do the best work you can. And you do realize that you're on a forum that focuses specifically on software-related topics? Methinks you'd be better off insulting programmers somewhere else.
  13. neylitalo

    captured ports

    Can you give us the error? Also, give us the output of [code]$ netstat -l --numeric-ports[/code]
  14. It shouldn't require too many functions, just some simple string manipulation - you're two-thirds of the way there, why not just bump out the code?
  15. The Rico library is a Javascript library that lets you quickly and easily create beautiful and functional DHTML objects, and the ever-annoying AJAX functionality. (There may be more - that's all I've used, though.) I've been using this extensively for work, and have fallen in love with it. And it's open source, as it should be. http://openrico.org You can see demos at http://openrico.org/rico/demos.page
  16. The Rico library - pre-build AJAX functionality. It's absolutely gorgeous. http://openrico.org/ http://www.phpfreaks.com/forums/index.php/topic,79168.0.html http://www.ajaxprojects.com/
  17. oh, crap... I didn't think of that. I was thinking of more of a "for" loop type of thing... but I suppose that's one skill this thing teaches people: Find shortcuts.
  18. Ah, my apologies - I thought The Little Guy was going to do a do-over. :) Next challenge: Duplicate the functionality of the str_shuffle function. Without using the str_shuffle function. ;)
  19. Mark, you're kinda correct - it's not a theory, it's a law. ;) But I felt like doing it properly, so here it is. :P Ahh, fun with physics and sarcasm. [code]<?php function getFirstToHit($bowlingBallMass, $paperBallMass, $dropHeight) {     /*         The masses are in g and the dropheight is in m.         However, the object's mass is not a factor in         calculating vertical acceleration, so don't be         alarmed if you don't see $bowlingBallMass or $paperBallMass         anywhere in the rest of this function.     */       // Acceleration due to gravity, in m/s/s     $acceleration = 9.81;     // The equation to use in this case is t = sqrt(2y)/sqrt(g). t is the time taken to fall, g is acceleration due to gravity, and y is the vertical distance the object falls.       // Since the equations are exactly the same, I'm only going to calculate it once...     $timeToHit = sqrt(2*$dropHeight)/sqrt($acceleration);     return "\n\tSince mass has nothing at all to do with calculating     vertical acceleration or velocity, we're going to make a few     assumptions which will lead us to the conclusion that they     hit at the exact same time. We'll assume that:         A)  They have the same surface area. This is required due             to the fact that we cannot easily calculate vertical             acceleration with compensation for surface area.         B)  They have no initial velocity.\n         With these assumptions, they hit the ground after ".number_format($timeToHit, 3)." seconds.\n\n"; } ?>[/code] And I, too, think that he needs to come up with something valid. ;D
  20. I actually think thorpe was being sarcastic, trying to point out that the extensions are there for a reason: Because they're useful, and save a lot of time. Which you acknowledged in your edit.
  21. This video sums it up for me: (good for a few laughs, particularly if you like Weird Al) http://www.youtube.com/watch?v=N9tPx8VE8qc Summary: He has no talent.
  22. We are, contrary to popular belief, intelligent enough to know the meaning of "bank teller". (Apologies if that's not what your position is called in England.)
  23. If they do teach PHP at universities, I'm sure it's not a concentrated area. I learned the basics on my own, but about a year later, I was recruited by a local software company, and they professionally trained me in the arts of MVC, object-orientation, and various other techniques. I hadn't had much experience with PHP (as I know now), but luckily I was able to learn quickly. I've got only two theories as to why they hired me: Either they saw potential, or they were really desperate. My "formal schooling" in programming was little - two semesters in high school of copying code out of a book, the principal knew more about the subject matter than the teacher, and the instructor didn't know how to type. He just wasn't cut out for the programming world. :|
  24. [code]<?php /** * Converts a hexadecimal color code to a color in R, G, B format. * * @param mixed $colorCode The hexadecimal color code to be converted. * @access public * @return string The color in R, G, B format. */ function hexToRGB($colorCode) {     $red = substr($colorCode, 0, 2);     $green = substr($colorCode, 2, 2);     $blue = substr($colorCode, 4, 2);     return hexdec($red).", ".hexdec($green).", ".hexdec($blue); } /** * Converts a color in R, G, B form to hexadecimal color code. * * @param int $red The red component of the color. * @param int $green The green component of the color. * @param int $blue The blue component of the color. * @access public * @return string */ function RGBToHex($red, $green, $blue) {     $red = $red == 0 ? "00" : dechex($red);     $green = $green == 0 ? "00" : dechex($green);     $blue = $blue == 0 ? "00" : dechex($blue);     return $red.$green.$blue; } echo hexToRGB("FFOOFF"); // returns "255, 0, 255" echo RGBToHex(255, 0, 255); //returns "ff00ff" ?>[/code] [b]Next challenge: [/b] Think up a challenge. I've got nothin'.
  25. This isn't quite what you were looking for, I'm sure, but here it is. :) It requires the calendar extension. [code]<?php function getDayOfWeek($day, $month, $year) {     return JDDayOfWeek(cal_to_jd(CAL_GREGORIAN, $month, $day, $year), 1); } ?>[/code] And for the next challenge: Create a function that takes a phrase, paragraph, what-have-you, and mixes up the letters in each of the words, except leaves the first and last letters untouched. This is to illustrate that the mind doesn't read the whole word. Rather, it just scans over them, and as long as the first and last letters are left alone, you can read the phrase with little or no trouble. In exemplum: "This is a simple test to see if your brain can read this correctly." turns into something like "Tihs is a sipmle tset to see if yuor brian can raed this croctlrey."
×
×
  • 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.