Wikipedia:Reference desk/Archives/Computing/2012 August 18

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< August 17 << Jul | August | Sep >> August 19 >
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.


August 18[edit]

Cantenna[edit]

Does it matter what type of can you are using for it? I used a Quaker oats can, which seems to be from a different, lighter material than say baked beans. Comploose (talk) 17:49, 18 August 2012 (UTC)

From our article "...antennas made with an empty metal can." I have never seen a metal Quaker oats can; aren't they just plain cardboard? Pringles cans are a common choice, which are mostly cardboard, but they have a metallic lining that apparently works well. SemanticMantis (talk) 17:59, 18 August 2012 (UTC)
No, Quaker oats cans are not plain cardboard, they seem to have a kind of aluminum foil lining. Is, for example, a cardboard cylinder covered by aluminum foil useless for a cantenna? Comploose (talk) 18:07, 18 August 2012 (UTC)
I just looked at a Quaker Oats can in my kitchen and it is definitely plain cardboard, no metallic lining. Maybe there are different kinds. I have seen some other brands of oatmeal that come in metal cans, but they were a lot more expensive and I didn't understand what the benefit was supposed to be. I had heard a while back that Pringles cans were coincidentally just the right dimensions for 802.11b (2.4 ghz) but maybe for 5 ghz the required dimensions are different. 69.228.170.132 (talk) 23:51, 20 August 2012 (UTC)

Network components[edit]

What is difference between a a- router b- wireless USB adapter c- access point 123.201.86.235 (talk) 20:03, 18 August 2012 (UTC)

Look at:

a- router b- Wireless network interface controller c- access point OsmanRF34 (talk) 21:12, 18 August 2012 (UTC)

Django + jQuery[edit]

If you have a Django back-end and a jQuery front-end, how do both systems communicate with each other? I've heard of XML and JSON but how does it happens? Does one system save information in a JSON or XML file and the other reads it? And where are these files located? Comploose (talk) 21:43, 18 August 2012 (UTC)

1.   Any number of ways
2-3. Something writes to a file (in XML or JSON if you like), and then something else reads it (or the reverse, or both, or any combination)
4.   While some preassembled solutions may dictate a location, there are basically no special requirements as to location
¦ Reisio (talk) 22:33, 18 August 2012 (UTC)
Basic concept: Django is server-side (Python) — it is run by the server computer. jQuery is client-side (Javascript) — it's run by the user's browser. The standard AJAXy operation goes like this: 1. the user loads the page; 2. after the page loads, a client-side script launches which queries the server-side code; 3. the server-side code takes the query, and spits an answer back in a given format (e.g. XML or JSON) that the client-side script can understand; 4. the client-side script takes the info it has received, and does something with it (e.g. display it on the screen).
Information is generally not written to a file in the way you seem to be indicating — only server-side scripting can edit or read files. So when you do have something that needs to be saved as a file (or written to a database), the client-side scripting needs to send it to the server-side scripting, and the server-side scripting then does something with it. (As with all things, there are exceptions — e.g. Java applets can read/write files locally — but let's ignore that for now.)
Let's consider a very simple example. I want my users to be able to search a very large database in real-time without the page refreshing. I set up a server-side script that takes in search parameters and spits out results. I then make a form that, upon the user typing in a search query, has a little bit of Javascript that sends a query to the server. It waits for a response. When the server returns results, the Javascript formats it into HTML and dynamically inserts the content into the page. That's basically how Gmail and any other page that updates "instantly (without reloading) works. JSON and XML are just different ways the server and/or client scripts can format the data they are exchanging.
As for Django and jQuery, it really depends on the application. I don't use Django, but you really will want to know specifically what you're trying to exchange, data-wise, to set up code that would do it. (jQuery is just a nice front-end for Javascript, it does nothing special in this respects except it makes sending AJAX queries and parsing JSON very easy.) --Mr.98 (talk) 01:22, 19 August 2012 (UTC)

fights on a sim[edit]

Where could i get a computer fight simulator that takes in varibles and uses math to solve the fight and fights between comic characters. — Preceding unsigned comment added by 205.142.178.36 (talk) 22:18, 18 August 2012 (UTC)

Some fighting computer games do this. You pick your player based on their characteristics (the variables). Maybe you can pick your opponent as well. Play the game and see who wins the fight. The game uses the player characteristics, inbuilt game physics (things like gravity, for example), and controller inputs to determine the outcome. Turn-based games such as the Pokemon and Final fantasy series provide a different means of control, but still use input variables and maths to determine the fight outcome. Unfortunately, these don't let you select any two random comic characters for the fight. Astronaut (talk) 16:26, 20 August 2012 (UTC)