Wikipedia:Reference desk/Archives/Computing/2008 May 26
Computing desk | ||
---|---|---|
< May 25 | << Apr | May | Jun >> | May 27 > |
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 26
[edit]SODIMMs in DIMM slots
[edit]Can one or two SODIMMs be installed in a slot designed for a DIMM? NeonMerlin 00:17, 26 May 2008 (UTC)
- No, the physical connections are different sized. Whether they are compatible on an electrical level and thus only requires a mechanical adapter though, I do now know. --antilivedT | C | G 07:20, 26 May 2008 (UTC)
- Seems unlikely to me given that they have a significantly different number of pins. Even if they are simply for power, I suspect you'd still need something more complicated then a simple mechanical adapter Nil Einne (talk) 16:27, 1 June 2008 (UTC)
Meme
[edit]There's an Internet meme called "it's over 9000" that's apparently popular, but why can't I find any mention of it here on Wikipedia? 208.76.245.162 (talk) 01:13, 26 May 2008 (UTC)
- Dragon Ball Z. It's not that popular, I haven't heard anyone use it as of late. 24.76.169.85 (talk) —Preceding comment was added at 04:35, 26 May 2008 (UTC)
- It's a 4chan thing .froth. (talk) 19:31, 26 May 2008 (UTC)
Web Design Question
[edit]I am trying to create a web site which requires user generated web pages similar to wikipedia, but each page rateable on a list of aspects. There must also be a main page which can list top pages in each catagory and search the individual pages. Is there a free or low cost wiki web template that can do this? Thank you, Ryan27630 (talk) 04:56, 26 May 2008 (UTC)
- If you like Wikipedia's own MediaWiki, an extension like Review or FlaggedRevs can do some of the rest. --h2g2bob (talk) 15:02, 26 May 2008 (UTC)
It's a start, but I need the capability to rate the pages in 5 specific custom attributes, and then sort and filter them on the main page. Please let me know if you know of a way to do this. Thank you, Ryan27630 (talk) 18:38, 26 May 2008 (UTC)
- Do you mean having top page at one section and bottom rated pages at the bottom or something like that. If you do the dynamicpagelist extension could help you. Anonymous101 (talk) 18:25, 28 May 2008 (UTC)
The uses of computer in daily life
[edit]dear brilliant volunteer,
may i know what are the uses of computer?especially in:
1)education
2)finance
3)industrial
4)house whole
thats all from me218.208.92.185 (talk) 06:55, 26 May 2008 (UTC)atok
- Computing things. There's no chance that we could possibly mention every single application of computers. Read the Computer article maybe for some vague idea? 24.76.169.85 (talk) 07:04, 26 May 2008 (UTC)
- And, if this is homework, it sounds like a long-term project to me. Sandman30s (talk) 14:34, 26 May 2008 (UTC)
Programming
[edit]<Moved From Miscellaneous Desk> Fribbler (talk) 09:32, 26 May 2008 (UTC)
Hi. I know java from school only, but how do you actually make a program. With input and graphics and all. Like Runescape for example, what did those guys need to make it and how did they make it? —Preceding unsigned comment added by 71.175.120.121 (talk) 23:17, 25 May 2008 (UTC)
- I think you may get a better response if you posted this at the Computing Desk. Would you like it moved there? Fribbler (talk) 23:19, 25 May 2008 (UTC)
- Yes. —Preceding unsigned comment added by 71.175.120.121 (talk) 04:54, 26 May 2008 (UTC)
- There are graphics packages you can include in that allow you to handle all sorts of different things. For example, Sun provides a Java3D API that provides functions and methods for rendering 3D graphics in Java. Games are complex mixtures of graphics, input, logic, etc. Try something small (on the level of Tic Tac Toe, for example) before trying to make something like RuneScape (which is really beyond the reasonable capabilities of one programmer working alone). --98.217.8.46 (talk) 04:56, 26 May 2008 (UTC)
- You might find the computer programming article a useful place to start. Astronaut (talk) 14:24, 26 May 2008 (UTC)
Database querying
[edit]Hi all, First of all, stange that Wikipedia has an 'all-around' 'helpdesk' for all kinds of computer programs. But I like it, now I can ask my question whitout being flamed at.:-) I don't know much about databases and related software. I want to query Wikipedia's database 'directly'. If I'm correct, the Wikipedia website is also functioning as Wikipedia's database client. I don't like this, because now the Wikipedia webmasters are making my database client's GUI! Is there any software around which can be used as a all-around database client. So for all kinds of databases I find while surfing on the web. Do I have to enter a URL to the database in such an dedicated (non-webbased)database client? (I don't want to use PHP in any way, I just want to query the My/PostgresSQL daemon running on the server directly, like PHP does. (I'm not sure, but I think Perl's WWW::Wikipedia module is such a client, but it is a API, no GUI client. —Preceding unsigned comment added by 80.126.42.203 (talk) 12:06, 26 May 2008 (UTC)
- Virtually no websites will let you query their database directly; certainly none that I know of. If you want your own copy of the Wikipedia database, dumps are available. — Matt Eason (Talk • Contribs) 12:56, 26 May 2008 (UTC)
- Grmz... Sometimes I just -can't- see why things are the way they are. What is the problem of being able to query directly? Wouldn't that be just a very nice functionality? What is a correct place to discuss these kind of thing? BTW, then what does the Perl WWW::Wikipedia module do exactly?—Preceding unsigned comment added by 80.126.42.203 (talk) 13:03, 26 May 2008 (UTC)
- If everybody could query the database directly it would be trivial to put in queries that would slow things to a halt. The Perl module just uses the pre-existing WWW querying methods, which are cached, optimized, etc. and does nothing more than you couldn't do as an individual querying the database through your web browser. Again, if you want to run your own queries, download a database dump. But you can't query directly the same database which is constantly being updated, cached, called, etc. by hundreds of thousands of people a day. --98.217.8.46 (talk) 14:06, 26 May 2008 (UTC)
- Where can I find more information about the 'pre-existing WWW querying' methods? What do you mean can't query the same database which is contantly being updated etc. by hundreds of thousands people a day? What is the problem? When I visit an article, that gives just another database query, isn't it? No articles are saved in HTML, right? What about some dedicated protocol to do queries (no HTTP)?—Preceding unsigned comment added by 80.126.42.203 (talk) 14:17, 26 May 2008 (UTC)
- If everybody could query the database directly it would be trivial to put in queries that would slow things to a halt. The Perl module just uses the pre-existing WWW querying methods, which are cached, optimized, etc. and does nothing more than you couldn't do as an individual querying the database through your web browser. Again, if you want to run your own queries, download a database dump. But you can't query directly the same database which is constantly being updated, cached, called, etc. by hundreds of thousands of people a day. --98.217.8.46 (talk) 14:06, 26 May 2008 (UTC)
- No, pages are mostly cached so the database querying is minimized. If you think about it, it makes sense: what's a better approach for generating the HTML output for each page? Generate it each time it is visited, on the fly, or generate it once every time it changes? Obviously the latter is the only scalable approach (and exhibits the common CS practice of calculate-once, use-often, which is a standard optimization approach). See, for example, the Cache strategy description, which is probably out of date but describes how things were done just as Wikipedia started to get mega-popular and was suffering from all sorts of maladies in the beginning due to inefficiencies in the system.
- By "pre-existing WWW querying" I just mean the same sorts of queries that are made when the database gets an HTTP request (the Perl module is just a specialized web crawler). And again, a poorly thought out database query can cripple a large system, one that has millions and millions of entries. Imagine what would happen if you did a simple SQL query that told the Wikipedia article database to go through every entry and compare it against a wildcard string (with a LIKE operator) and also, while it was at it, get all of the authors from a different table who had written said articles, and then checked to make sure that all of those authors had more than 5,000 posts or so. It would be a short, trivial query, but it would take god knows how long to run against the whole database, and would have significant performance implications. By contrast, if you did all of those same operations through the WWW client, you would be sending lots of tiny queries sequentially—and they'd end up being limited in part by the amount of connections you'd be able to make and the speed of making them. The result is that it would be indistinguishable (on the most part) from regular web traffic, and all of those "tiny" queries would be heavily optimized, cached, etc. --98.217.8.46 (talk) 14:27, 26 May 2008 (UTC)
- Yes an article is another query, but what if you decided to search all articles for an arbitrary piece of text without using the correct methods or indexes? That would comprise at least a "full table scan" if not joins to many other tables - imagine scores of people with direct access trying that kind of nonsense all the time. It would kill any database. Ask me, I'm a database administrator by profession. Ad hoc reporting can NOT happen on an OLTP database. It has to controlled, in this case by the wikipedia interface. Sandman30s (talk) 14:31, 26 May 2008 (UTC)
- Thanks for you expaination. Does anyone know about a mailinglist about this subject? (Something like "databases in general" or "Human -database interaction) Maybe I've to try Usenet. —Preceding unsigned comment added by 80.126.42.203 (talk) 15:09, 26 May 2008 (UTC)
- There is a lot written about database optimization. That's all this is about. You don't let people have arbitrary query access to databases that matter to you. There are books and books and books about databases in general and about database security. It sounds to me like you just need to have more experience with how databases work; this is rather elementary stuff. --98.217.8.46 (talk) 20:39, 26 May 2008 (UTC)
- Not exacly about optimazation. Actually I was trying to discuss ways to make data available over the internet. —Preceding unsigned comment added by 80.126.42.203 (talk) 07:48, 27 May 2008 (UTC)
- There is a lot written about database optimization. That's all this is about. You don't let people have arbitrary query access to databases that matter to you. There are books and books and books about databases in general and about database security. It sounds to me like you just need to have more experience with how databases work; this is rather elementary stuff. --98.217.8.46 (talk) 20:39, 26 May 2008 (UTC)
- Thanks for you expaination. Does anyone know about a mailinglist about this subject? (Something like "databases in general" or "Human -database interaction) Maybe I've to try Usenet. —Preceding unsigned comment added by 80.126.42.203 (talk) 15:09, 26 May 2008 (UTC)
- Use the API. But rate limit to a sane value to avoid melting the servers. If possible, use the database dumps instead. --h2g2bob (talk) 14:31, 26 May 2008 (UTC)
- To be more clear, having a web page which simply fetches the wikipedia page from the api and displays it differently would be too harsh on the server - you should use the db dumps. --h2g2bob (talk) 14:36, 26 May 2008 (UTC)
linking to an especific page in pdf file
[edit]I am trying to link to a pdf file from Excel with:
file:///C:/mypdf.pdf#33
But it doesn't open the file on the page :(. What am I doing wrong? file:///C:/mypdf.pdf works fine. 217.168.1.95 (talk) 14:59, 26 May 2008 (UTC)
- Perhaps
file:///C:/mypdf.pdf#page=33
- The says: "The following only works when the HTML document is served by a web server. It will not work from a local drive." Should I give up trying to link locally to an especific pdf page? 217.168.1.95 (talk) 19:32, 26 May 2008 (UTC)
- It worked for me using Firefox and the Adobe plugin with a local file on the C drive. William Avery (talk) 20:19, 26 May 2008 (UTC)
- The says: "The following only works when the HTML document is served by a web server. It will not work from a local drive." Should I give up trying to link locally to an especific pdf page? 217.168.1.95 (talk) 19:32, 26 May 2008 (UTC)
- I've never been able to get it to go to specific pages unless you were hosting it on a server (even a locally hosted one). Never tried it in firefox, though, maybe William Avery is right that it behaves differently? --98.217.8.46 (talk) 20:35, 26 May 2008 (UTC)
What programming language to use for websites?
[edit]Hi, I want to learn how to program a website. However I'm confused about the many languages out there. There's PHP, HTML, javascript, java, python, etc. I've googled around to see what each language does, but I couldn't understand much of the jargon. They all sound similar. Why so many languages, and which one is good to learn and why? —Preceding unsigned comment added by 199.76.179.217 (talk) 18:24, 26 May 2008 (UTC)
- HTML is the most important one. Almost all of the pages you see on a web site are HTML files. HTML is a page-description language. It just formats text and places images on a page. PHP and Java are used to "activate" things like buttons. They perform actions that HTML cannot, like sending e-mail and uploading files. PHP and Java are contained inside HTML or linked to from a separate file. Besides HTML, PHP would be good language to know since it seems to be the most-popular for activating pages. WYSIWYG (what you see is what you get) editors like Microsoft Expression and Adobe/Macromedia Dreamweaver let you create a web page like you would a document in Word. But knowing the code behind the page helps a lot for doing things like removing annoying spaces that won't go away or troubleshooting a button that won't work. The code editors produce is also really bulky, so you've got the right idea.--Hello. I'm new here, but I'm sure I can help out. (talk) 18:49, 26 May 2008 (UTC)
- I wouldn't call HTML a page description language. Page description languages describe everything about the page—paper size, paragraph flow around images, headers and footers—which HTML doesn't. HTML is just rich text. -- BenRG (talk) 23:22, 26 May 2008 (UTC)
- There is...
- HTML (and XML) - the actual web page. Contains the text with marks saying "this is a heading", "this is some text", etc
- <html><body><h1>A heading</h1><p>Some <em id="f1">bold</em> text</p></body></html>
- CSS - the colors and layout of the page. Includes rules like "headings should be Sans-serif font of size 20pt and underlined"
- h1 { color: red; border: 1px green solid}
- JavaScript - code which you ask the end user to run. You can change the contents of the page and fetch new pages from your web site.
- <script> document.getElementById("f1").innerHTML = "emphasised" </script>
- PHP, JSP, ASPX, Python, and many others - used to automatically make the HTML. For example, you can have a single HTML page which contains some special code which prints "You are logged in as h2g2bob" at the appropriate place.
- <html><body><p>Your name is <?php $username="h2g2bob"; print $username; ?>.</body></html>
- HTML (and XML) - the actual web page. Contains the text with marks saying "this is a heading", "this is some text", etc
- W3Schools is the place to start. HTML and CSS are defined by W3C, here. --h2g2bob (talk) 20:21, 26 May 2008 (UTC)
- Here's the standard approach, going from most simple and basic (the "bricks", to use an architectural metaphor) to the most ornate and complicated (the "woodworking") First learn how HTML works (should take less than a week). Then learn the basics of CSS styling (you don't need to try and memorize things, just see how it works, how you can apply it, you can look up details as you need them). Then learn Javascript (the basics of its syntax, what it does, what sorts of things it is good for). Then, if you want, learn a server-side language (like PHP) (a much more complicated endeavor than the previous ones, as it is a full programming language). (Note that Javascript and Java are not the same language). --Captain Ref Desk (talk) 20:47, 26 May 2008 (UTC)
- If you are interested in learning from a book, I have been pleased with the "Head First" series from O'Reilly Media, in particular Head First HTML with CSS & XHTML and Head First Javascript. --LarryMac | Talk 13:57, 27 May 2008 (UTC)
angle between two cities on Earth
[edit]Is there a formula to calculate the angle (how many degrees skewered from true north, for example) a certain city is from another city? (I have long and lat for both cities, in degrees and decimals of degrees (no minutes)). I know the Earth is not perfectly spherical; but if it makes it easier to specify the formula, then we can assume it is spherical; that's close enough.
--206.248.172.247 (talk) 23:17, 26 May 2008 (UTC)
Apparently it's called azimuth and this can calculate it! http://www.fcc.gov/mb/audio/bickel/distance.html
--206.248.172.247 (talk) 23:32, 26 May 2008 (UTC)
- The rhumb line article seems to be trying to answer this question, but isn't doing a good job. I don't see a single formula in there that actually takes coordinates as input and gives direction or distance as output. The second external link in bearing (navigation) looks better. --tcsetattr (talk / contribs) 23:42, 26 May 2008 (UTC)
- A rhumb line is a line of constant bearing - a line that makes a constant angle with each meridian. If the difference in longitude between the cities is significant, then the rhumb line is not the shortest course between them. The shortest course is the great-circle course, which is not a rhumb line because its bearing is not constant. So it depends what sort of "angle" you are looking for. If the difference in longitude is not large (say it is less than 5 degrees) then the planar approximation
- may be close enough. Gandalf61 (talk) 09:04, 27 May 2008 (UTC)
I may be mistaken, but would you be trying to find the angle between two vectors given in spherical coordinates? Looking at Spherical coordinate system, it seems that your is your longitude, and your is . In that case, you can find the angle between them by using the dot product.
By canceling the radius terms, the angle between them should be
It's long and ugly, but it should work. If anyone can edit my code to make it a little more pretty, that'd be cool too. Daniel Olsen (talk) 09:47, 27 May 2008 (UTC)
- Are you sure that formula isn't giving the angle between them from the center of the Earth, as opposed to the angle it makes on the surface with true north? (As others have said above, though, the angle with true north is not necessarily well defined, because the shortest path does not necessarily have a constant azimuth.) rspeer / ɹəədsɹ 17:28, 27 May 2008 (UTC)
- You're right. I guess I misunderstood the question. Daniel Olsen (talk) 22:44, 27 May 2008 (UTC)
We have an article on great-circle distance. --Spoon! (talk) 10:39, 27 May 2008 (UTC)
If you represent points on the earth's surface by unit vectors then the great circle containing points and is the intersection of the surface with the plane . So the angle from true north at of the great circle containing and should be the angle between the plane of the great circle containing and and that of the great circle containing and north, i.e.
- ,
where is the north pole. This can also be written
- or
if I calculated right. The last one is probably the best from a numerical stability standpoint, since you can use atan2. -- BenRG (talk) 19:07, 27 May 2008 (UTC)
- I don't see how you can interpret the original question as anything but a request for constant bearing (rhumb line angle). And yet most of the answers are about great circles. --tcsetattr (talk / contribs) 19:21, 27 May 2008 (UTC)
- The question didn't ask for a rhumb line, it asked for the bearing of one city from another. I would certainly interpret that as asking for the bearing of a great-circle path, as measured at the starting city. This distance calculator page computes that information as well, for each end of the path, so you can use it to check against the formula given by BenRG. --Anonymous, 06:35 UTC, May 28, 2008.
- It looks like a great-circle question to me too, but for completeness you should be able to get the rhumb line angle from the Mercator projection:
- ,
- where are the latitudes, are the longitudes, and k is any integer. You probably want to choose the that gives the smallest numerator in absolute value. -- BenRG (talk) 12:31, 28 May 2008 (UTC)
- It looks like a great-circle question to me too, but for completeness you should be able to get the rhumb line angle from the Mercator projection: