Wikipedia:Reference desk/Archives/Computing/2009 May 24
Computing desk | ||
---|---|---|
< May 23 | << Apr | May | Jun >> | May 25 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
May 24
[edit]"www." ?
[edit]Why is it that sometimes it doesn't seem to make a difference whether or not you type the "www." part at the beginning of a website address and other times it does? WHat exactly does the "www." part do? --212.120.248.41 (talk) 00:30, 24 May 2009 (UTC)
- (edit conflict) www is just a subdomain, like the 'en' in en.wikipedia.org or the 'images' in images.google.com. There's nothing intrinsically special about it. It can point wherever the domain's administrator wants it to, so it's up to them whether to make www.example.com point to the same place as example.com. Usually it's best to point them both to the same place, and most major websites do so, but I expect there are good reasons for not doing it in some cases. — Matt Eason (Talk • Contribs) 00:54, 24 May 2009 (UTC)
- When the owner of example.com registered his domain, he probably instructed his DNS server to translate both example.com and also the subdomain www.example.com to 208.77.188.166. When you type either name into your web browser, your local DNS server would translate either name into "208.77.188.166", and hence you'll get the same result. Tempshill (talk) 00:57, 24 May 2009 (UTC)
- You don't have to register your site with both www and nothing in order for both to work. I only registered 'sjbaker.org' - but both that and 'www.sjbaker.org' (and 'mail.sjbaker.org' and others) work. It's entirely up to the way you set up your HTTP server (Apache, for example). My site sends www.sjbaker.org and sjbaker.org to the same web page - but mail.sjbaker.org is handled by Squirrelmail. Go to a site like sourceforge.net and you'll find thousands of subdomains are served there. SteveBaker (talk) 02:23, 24 May 2009 (UTC)
- You have mail.sjbaker.org set to go to a different IP address than www.sjbaker.org and sjbaker.org (which both go to the same). You only have to register the domain once (the domain is just the sjbaker.org part), but you need to set the DNS records appropriately. --Tango (talk) 15:00, 24 May 2009 (UTC)
- "you need to set the DNS records appropriately." - 'you' being 'someone' - it's often set up automatically by your host — Matt Eason (Talk • Contribs) 18:40, 24 May 2009 (UTC)
- You have mail.sjbaker.org set to go to a different IP address than www.sjbaker.org and sjbaker.org (which both go to the same). You only have to register the domain once (the domain is just the sjbaker.org part), but you need to set the DNS records appropriately. --Tango (talk) 15:00, 24 May 2009 (UTC)
- You don't have to register your site with both www and nothing in order for both to work. I only registered 'sjbaker.org' - but both that and 'www.sjbaker.org' (and 'mail.sjbaker.org' and others) work. It's entirely up to the way you set up your HTTP server (Apache, for example). My site sends www.sjbaker.org and sjbaker.org to the same web page - but mail.sjbaker.org is handled by Squirrelmail. Go to a site like sourceforge.net and you'll find thousands of subdomains are served there. SteveBaker (talk) 02:23, 24 May 2009 (UTC)
- The above comments are true. As you know, there are many different domains on the Internet: microsoft.com, wikipedia.org, facebook.com, rejbrand.se, and billions (?) of others. The owner of a domain may then divide it into subdomans. For instance, you can look at en.wikipedia.org, sv.wikipedia.org, de.wikipedia.org, and so on; in this case, each subdomain contains a specific language of Wikipedia. Another example would be a fictional company "My Company", selling cars, bikes, and lawn mowers: it could have its corporate website on mycompany.com, and use the subdomains cars.mycompany.com, bikes.mycompany.com, and mowers.mycompany.com to present its different divisions. "www" as a subdomain works in no special way - in principle, www.mycompany.com and mycompany.com could be two different webpages, but usually they are identical. Most (good) websites can be accessed both with and without the "www" subdomain. For instance, you can access either microsoft.com or www.microsoft.com, or either rejbrand.se or www.rejbrand.se. Sometimes, however, website owners require the "www" subdomain. For instance, you cannot access nasa.gov, but www.nasa.gov works fine. Sometimes "www" can be used before subdomans as well: for instance, you can access both english.rejbrand.se and www.english.rejbrand.se. The only example of a website with different pages with and without the "www" subdomain I know of is one of the (very few!) websites of the North Korean government: kcce.kp is obviously a different page than www.kcce.kp. --Andreas Rejbrand (talk) 14:30, 24 May 2009 (UTC)
- So what are the advantages/disadvantages of:
- (a) requiring the www. part as in the nasa example
- (b) having www.awebsite.com and awebsite.com go to different sites as in the N Korea example? --212.120.248.41 (talk) 15:38, 24 May 2009 (UTC)
- So what are the advantages/disadvantages of:
- As I see it,
- (a) no advantages, a lot of people will try nasa.gov and give up (unless Google suggests www.nasa.gov). Still, I really wonder why they do require it.
- (a) it is only confusing. My guess is that the webmaster in North Korea is not an expert of website development...
- --Andreas Rejbrand (talk) 16:09, 24 May 2009 (UTC)
- As I see it,
- I agree with Andreas Rejbrand when he implies that it's an awful decision to have example.com and www.example.com go different places. The only thing it adds for users is confusion. There is a single situation I have encountered where you have to do this. Google Sites is a free website hosting service. They explain in detail how to configure www.example.com to point to the Google Sites web page; but they say they don't currently support the ability to direct a domain without a sub-domain, like example.com, to a Google Sites page. The (offtopic) workaround is to go ahead and point www.example.com to the Google Sites page, and use a domain registrar with a "free web hosting" service to host example.com, and just put an immediate HTML redirect tag to www.example.com, right at the top of the latter page. Tempshill (talk) 20:03, 24 May 2009 (UTC)
- Well, the technical explanations above are correct; www.* is just a subdomain and can be anything. The previous comments are implicitly assuming that most of the traffic to a particular domain is web-browser, http traffic. In fact, the internet was not designed with this intention, although it has become the norm for most mainstream web users. To be honest, it makes much more sense for nimur.com and www.nimur.com to point at different computers; one is a round-robin load balancer to a beowulf cluster, while the other is an HTTP and HTTPS server delivering HTML content. The idea originally was to have a dedicated "www" computer for this purpose. In such a network, it does NOT make make a lot of sense for the web server to be the top-level of the entire network. Because a lot of people only use internet for web browsing of HTML pages, they forget about all the other services which might be on a network, and just assume that the top level domain is should alias to the web servers. In a more complex network, there are dozens of other types of computers (databases, compute nodes, network attached storage), which would never deliver "www"-style content. I would go so far as to say that a best practice design does NOT alias the top level domain name to the web server. If there is concern about confusing end-users, a lightweight proxy server can run on the top-level server, and it should send an HTTP Redirect command to the true www. server. This provides the most scalable and correct implementation. Nimur (talk) 17:53, 25 May 2009 (UTC)
- A good point, except that according to that argument, surely the top level of the domain shouldn't be pointed at any server, since the argument can be applied equally to any of the nodes, or purposes, or clusters, within the network on that domain. As such, aliasing the top level to one of the nodes is really just a convenience, and if the main activity is HTTP, then aliasing to the web server makes perfect sense.
- If there is no one main public activity for the network, then a multi-function redirect / proxy could be set up to respond to non-sub-domain requests - again, nothing more than a convenience. - IMSoP (talk) 20:56, 25 May 2009 (UTC)
- Well, the technical explanations above are correct; www.* is just a subdomain and can be anything. The previous comments are implicitly assuming that most of the traffic to a particular domain is web-browser, http traffic. In fact, the internet was not designed with this intention, although it has become the norm for most mainstream web users. To be honest, it makes much more sense for nimur.com and www.nimur.com to point at different computers; one is a round-robin load balancer to a beowulf cluster, while the other is an HTTP and HTTPS server delivering HTML content. The idea originally was to have a dedicated "www" computer for this purpose. In such a network, it does NOT make make a lot of sense for the web server to be the top-level of the entire network. Because a lot of people only use internet for web browsing of HTML pages, they forget about all the other services which might be on a network, and just assume that the top level domain is should alias to the web servers. In a more complex network, there are dozens of other types of computers (databases, compute nodes, network attached storage), which would never deliver "www"-style content. I would go so far as to say that a best practice design does NOT alias the top level domain name to the web server. If there is concern about confusing end-users, a lightweight proxy server can run on the top-level server, and it should send an HTTP Redirect command to the true www. server. This provides the most scalable and correct implementation. Nimur (talk) 17:53, 25 May 2009 (UTC)
TI 89 Titanium
[edit]Does anybody know where one can find a complete listing of the error codes (errornum values) and their corresponding errors for the TI-89 Titanium? --72.197.202.36 (talk) 00:51, 24 May 2009 (UTC)
- Have you tried asking this question on the math and misc desks?– Elliott(Talk|Cont) 02:09, 24 May 2009 (UTC)
- I think this is the proper forum for such a question. It appear that the TI-89 Titanium Guidebook has a list of error codes in appendix B. -- Tcncv (talk) 15:03, 24 May 2009 (UTC)
Receiving VOIP/SIP calls without computer on
[edit]I am looking for relatively cheap Analog Telephone Adapters which each of my family members (I have an international family) would be able to plug into his/her Ethernet ports on their routers and with a VOIP/SIP service provider call each other directly without the use of a computer.
Can anyone recommend of anything of this sort? TheCuriousGnome (talk) 03:07, 24 May 2009 (UTC)
- I have a Linksys PAP2T and it's a good little device. Came bundled with my ISP's config file and was basically plug and play. It does tend to lose connection when I get a new IP though, so I need to restart my router every fortnight to keep my phone line running. --antilivedT | C | G 08:15, 24 May 2009 (UTC)
- Do you pay monthly fees to a special VOIP provider (like Vonage) for it to work or does it only need an internet connection and then all calls are free to other VOIP phones? I am loooking for a technological solution through which each of our family members would not need to pay a 30 $ monthly fee for it to work. TheCuriousGnome (talk) 15:38, 24 May 2009 (UTC)
- No I have Naked DSL and that is basically my replacement landline. I do get free calls to other users of the same service but otherwise it's the same as your ordinary landline, with cheaper tolls. In theory I could be half way across the world with an internet connection and still be able to use my landline and effectively free international calling but I haven't tested it out yet, so I'm not sure. --antilivedT | C | G 19:06, 24 May 2009 (UTC)
a question about dates in java
[edit]I have to get the input from a date picker from a web page coded in JSP and use the date to prepare a list of 5 consecutive days starting from that input date and write this to SQL database. But I should skip weekends from that list. i.e in that list Monday comes after Friday. For now, I just tried to implement the list of 5 dates without the weekend considerations. I got the date as a String from the date picker in the format "dd-mm-yyyy". I created a calendar object using
Calendar cal=Calendar.getInstance();
The input from the date picker is stored in a String object named "a". I put the following lines of code next:
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-mm-yyyy"); Date d = dateFormat.parse(a); cal.clear(); cal.setTime(d); cal.add(Calendar.DAY_OF_YEAR, 1);
d=cal.getTime(); I converted this "d" to java.sql.Date by using :
java.sql.Date sqlDate=new java.sql.Date(d.getTime());
But when I give 30th Jan 2009 as input from date picker it should start with 30th Jan 2009 and end with 4th Feb 2009. But when I checked the database the entry was from 1st Jan 2009 to 5th Jan 2009. What is the problem here? I will be thankful for your help. —Preceding unsigned comment added by 125.16.180.5 (talk) 07:03, 24 May 2009 (UTC)
- Spare yourself a headache and use Joda Time: http://joda-time.sourceforge.net/. Java will switch to a new api (JSR 310) based on it anyways. —Preceding unsigned comment added by 84.187.123.183 (talk) 22:38, 24 May 2009 (UTC)
linux installation
[edit]my laptop has 500 GB hard disk it has been split into two while creation itself so now in my "my computer" there are two C: and D: each of 250 GB C: is full of windows vista now i want to install linux which is the best version of linux now and how can i install?? —Preceding unsigned comment added by Srini279 (talk • contribs) 13:35, 24 May 2009 (UTC)
- I would recommend Ubuntu or Super OS (remaster of ubuntu + "vitamins" like codecs and flash), you can find plenty of info at http://help.ubuntu.com or the ubuntu forums. I would also recommend doing a wubi install -- SF007 (talk) 14:13, 24 May 2009 (UTC)
pen drive problem with linux
[edit]there is an error message " Unable to mount pen drive " in most of the computers with linux as the OS . why is it so ? —Preceding unsigned comment added by Srini279 (talk • contribs) 13:42, 24 May 2009 (UTC)
- I've never seen that message - I use Linux all the time and I have loads of USB drives that work just fine. I'm a bit puzzled that you'd see an error message with that wording because Linux doesn't know that it's a "pen drive" - it's just USB mass storage - it could be anything from a camera to a large USB hard drive. Usually, if there is a problem, it says "Can't mount device" or "Can't mount USB device". Are you sure that's the exact wording of the message? Can you tell us which Linux distribution and release number you're using and what device you're plugging in? SteveBaker (talk) 15:00, 24 May 2009 (UTC)
- I have also never seen that error. I've never known Linux to refer to a jump drive as anything other than a "USB Mass Storage Device". What program are you trying to use to mount the drive? Are you doing it at the command prompt? Or through some graphical user interface? APL (talk) 19:11, 24 May 2009 (UTC)
this is basically the problem i boot the computer and then plug in the pen drive to the usb port and there is no removable disk drive created and when i right click on some file and click on send to the pen drive it justs doesnt do and this prompt comes as cant mount pen drive . dunno whats the problem ? but the same pen drive has no problem with windows vista of the same computer Srini279 (talk) 12:44, 27 May 2009 (UTC)
Malware and Facebook
[edit]Everynow and then I'll get a bogus message from a friend linking to a phishing/malware site. When your facebook account gets hacked in this fashion, what if any actions should you take?
this just happened to my friend. he spammed out a link to "picoband.be". I've advised him to take typical antivirus actions on his computer, plus clearing out the saved passwords in his browser and changing at elast his fb password. are these steps necessary? are any other steps required/advisable? Thanks all --Shaggorama (talk) 15:24, 24 May 2009 (UTC)
- There are instructions as to what to do here. It is the first link on Facebook if you go to "Help" at the bottom of the page. --98.217.14.211 (talk) 18:29, 24 May 2009 (UTC)
- Most of the time this seems to be from the user giving his/her identity to some random website claiming to need it for something. It's not really "hacking" in the typical sense so much as social engineering. -- Consumed Crustacean (talk) 05:44, 25 May 2009 (UTC)
Perl, index, regex, positions
[edit]Perl's index function returns the first occurance of the substring within the string. The substring has to be an exact match. Wildcard or regex is not allowed.
Let's say I want to extract all the dates in a lengthy Wikipedia talk page. How do I build a hash made of, say, all the dates (values extracted using regex) and their positions (keys) within the talk page? E.g, 238 => January 2, 2005, 1045 => March 23, 2005, ... -- Toytoy (talk) 15:52, 24 May 2009 (UTC)
- This should do it:
$datepositions{$-[1]} = $1 while /(date-matching regex)/g;