Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 160.39.220.66 (talk) at 03:11, 6 September 2010 (Is it safe to use an open wireless router (say, in a cafe)?: cleanup). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


September 1

A really private wiki

My colleagues and I have been discussing the possibility of creating an online reservior of stuff that local pathology residents/registrars can use to survive their training, especially things like journal article links, study notes, tutorial presentations and so forth. Many of us are re-inventing the wheel with our study so we trying to make our lives easier. I wondered about the possibility of using a mediawiki as a private wiki for these things. I did some searching and found some excellent examples of private wikis, like that of Steve Baker, but the common thing was that anyone really can look at these. Is it possibile to have a truly private wiki that is only accessible (view/edit) to registered users? This is an important requirement because there are issues of confidentiality and copyright involved, potentially, that could be breached if the site was viewable by anyone. Can wikifarms do this? Or do I need to get it hosted somewhere? I'd prefer this to be on a free platform, since anything that requires fee for access or hosting is not likely to enjoy much longevity, I'd imagine. Thanks for your help! Cheers, Mattopaedia Have a yarn 07:19, 1 September 2010 (UTC)[reply]

I was going to ask a practically identical question! I've been tasked to investigate the feasability of a wiki for a support group for people with a particular disability. It must also be "members only" as our content will include information of a very private nature. Would we be allowed to use existing Wikipedia articles that are relevant to us as a basis for developing our own articles? By that I mean for example take a copy of wheelchairs and then edit it into a new article to suit our particular requirements. I have a strong preference for using one based on MediaWiki as that would substantially flatten the learning curve. BTW we don't have any money to spend on this so it will have to be free hosting too. Roger (talk) 07:45, 1 September 2010 (UTC)[reply]

Yes, it can be done. There are many ways to control access to the wiki, including:

  • Use MediaWiki to control access: "Preventing Access" in the MediaWiki manual
  • Use your web server to prevent access, using htaccess or some other server-level authentication controls (this works great if your users already have accounts set up on your computer-system)
  • Use your network architecture to protect the server by placing it on a private LAN.

All three provide different levels and styles of protection, and you can use any or all of the above to control or deny access to anonymous users. You can also configure read- and write- permissions separately if you use MediaWiki's settings. Nimur (talk) 14:12, 1 September 2010 (UTC)[reply]

Thanks Nimur. Next thing is - how? I really have no clue and need a simple how-to if anyone can point me to one. Most of the wikipedia articles on this assume knowledge, so I'm going WTF after the first couple of paragraphs usually. I guess another question is whether this can be done on a wikifarm, or do I have to find a free-hosting service that will let me set up a wiki.? Cheers, Mattopaedia Have a yarn 04:12, 2 September 2010 (UTC)[reply]
I should step back a bit - it sounds like you don't even have a server yet. So let's break down at a very high level, and you can indicate where in the general process that you need more specific assistance. Below, I am going to recommend entirely free software, but you can run MediaWiki on many different operating systems, web servers, and so on; many alternatives exist. (Lots of the component parts are "interchangeable" with other free or commercial alternatives). And, if you have even a small budget, you can rent online, skipping over Steps 1-3 entirely. For example, DreamHost and GoDaddy both offer servers for rent and have a streamlined process to install MediaWiki. But assuming you start from nothing, with zero budget, here are the steps:
1. Get a server - you can rent one online, or you can buy a computer and connect it to your organization's network, or you can hire a contractor to do this step for you. The best choice depends on your budget and organizational size. ("Free" can be accomplished by using a computer you already own to host the wiki).
2. Install LAMP. (If you rented a server in Step 1, this may be done already). A "LAMP server" is the "standard toolkit" that contains the necessary software to make powerful dynamic websites like a Wiki work smoothly; this term is a generic term for four (free) technologies (Linux, Apache HTTP Server, MySQL, and PHP); and there are many many many variations of LAMP servers. All you really need is to "get" one - you don't need to customize it or program it or really even worry about it. Alternatively, your server can run a different operating-system and web-server and database, if you like; but I have found Ubuntu with Apache to be the most easy to administer as a MediaWiki and web server. If you have never run a server before, you will want to see a "how-to" for setting it up: Ubuntu Server Guide, or the Ubuntu LAMP for Newbies; (or if you prefer Windows or Mac or something else, you can find similar "how-to" for these systems). If you're stuck at this stage, we can direct you to more appropriate resources.
3. Install Mediawiki on your server. (If you rented a server in Step 1, this might already be done for you, or accomplished through a Configuration Page). In Ubuntu, you can do this from the Synaptic package-manager, using just a few mouseclicks. Here is a tutorial. If you desire a great amount of custom configurations, you should use the manual installation process instead of Synaptic.
4. Configure restricted access on your wiki, based on any of the options above.
By the time you reach this stage, the manual is very specific and helpful: you can Restrict Viewing of All Pages and Restrict Editing of All Pages, or read the "simple private Wiki" instructions.
You can spend as little time as a few minutes on each step; or as much as several weeks on each step. It really depends on your experience level, your desire to deviate from the "standard operating procedure", and your ability to read manuals quickly (pulling only the information you need from them). Nimur (talk) 05:11, 2 September 2010 (UTC)[reply]
Do any of the existing "free" wiki farms offer privacy options to the level of allowing only "members" to read and write? Roger (talk) 09:01, 2 September 2010 (UTC)[reply]
Not that I am aware of. For example, this is not an available option on Wikia (a popular free MediaWiki host that is loosely affiliated with Wikimedia Foundation). Nimur (talk) 20:39, 2 September 2010 (UTC)[reply]
You can't rely on confidentiality from any kind of shared hosting or wiki farm. If your wiki is going to contain any patient medical information, be aware of the HIPPA regulations. The basic answer though is that running a private MediaWiki instance isn't all that difficult. You should put it behind a TLS web server to stop the contents from being broadcast, especially if any users are likely to access it through unsecured wifi networks (like in cafés), and you should put it on a dedicated host. I've used MoinMoin for purposes along the lines of what you describe. It is simpler to install and run than mediawiki, but doesn't have anywhere near as many features, and is less suited to large wikis (anything with over 1000 pages, say).

Reading user's IP address.

I'm doing some PHP and C++/CGI scripting for an online game - and I want to be reasonably sure that the user isn't running two copies of the game in different browser windows with different login names (you have to log into the game to play it).

I am currently sticking a cookie down onto his machine with his current login in it - and validating that once in a while...which also allows for the "Stay logged in from this machine for 30 days" thing.

If he opens two windows in (say) FireFox, logs into one as AAA@example.com, it'll write the cookie with AAA@example.com - and if he then logs in again in the second window as BBB@example.com - then the cookie will get overwritten and as far as I'm concerned, he's implicitly logged himself out of AAA@example.com by doing that.

This all works great - UNLESS the devious little bastard opens a Chrome or Safari or IE session at the same time as his FireFox session! Since each browser stores cookies in a different directory - they are all different cookies and by using four browsers (maybe more!) he could have multiple separate logins, despite my best efforts to prevent that.

Urgh!

Is there a way in either PHP or C++/CGI to find out the IP address of the browser's machine? That way I could figure this out on the server side. If all else fails - can I read the person's IP address using JavaScript? Is there a better way to do this?

I guess it must be possible because MediaWiki can somehow find this out to keep track of AnonIP editors.

Any ideas?

TIA SteveBaker (talk) 09:49, 1 September 2010 (UTC)[reply]

In ASP I would use Request.Servervariables ("REMOTE_ADDR") to get the client IP address - no idea how to do this in PHP, and it's a long time since I did any web programming in C/C++. AndrewWTaylor (talk) 09:56, 1 September 2010 (UTC)[reply]
Googling shows this :http://www.plus2net.com/php_tutorial/php_ip.phpSir Stupidity (talk) 09:58, 1 September 2010 (UTC)[reply]
(ec) Ah, this post suggests that you would use $_SERVER['REMOTE_ADDR'] in PHP. AndrewWTaylor (talk) 09:59, 1 September 2010 (UTC)[reply]
Please be aware of a downside in what you are trying to do: if I have a friend over, and we both want to play your game, we won't be able to, because my NAT firewall will make your server see our computers as coming from the same IP address. The same will happen in libraries, schools, companies, even countries (see "repressive dictatorships") that sit behind a NAT firewall. You are setting yourself up for customer complaints... (Btw, google CGI IP address for how to do it.) 88.112.56.9 (talk) 10:00, 1 September 2010 (UTC)[reply]
You can easily do it with PHP, sure ($_SERVER['REMOTE_ADDR']). But your main problem is that IP both does and doesn't tell you everything you need to know — you're limiting it to one router per household, not one user. And I'm not sure how well it would work with AOL and other ISPs that use dynamic IPs. I wonder if it matters too much — OK, so a few voracious players want to have five copies of the game open at once. So what? I mean, isn't that kind of ideal, from your perspective? Five times the advertising. Players who can't get enough. Etc. OK, it's cheating, a bit. Is the possibility of some cheating of this sort worth implementing a system that will occasionally knock people out? Cheating probably won't cause customer support calls, but poorly implemented or overzealous attempts to stop cheating surely will. If it's the sort of game where multiple accounts could consolidate resources, one way to make that less profitable is to put a cap on resource transfers, for example, or to impose a "tax" (just like real life!). --Mr.98 (talk) 12:05, 1 September 2010 (UTC)[reply]
Just curious here, but what advantage would a single player gain by running multiple instances of the game? The cannot interact with more than one instance at a time - in a racing game only one instance would be able to manouvre round the track, in a fighting game only one instance would be able to make fight moves, in a sports game only one instance would be able to play, and even in real-time strategy games (if my experience is anything to go by) the player has the little idle time in which to play in another instance. Astronaut (talk) 12:57, 1 September 2010 (UTC)[reply]
Lot's and lots of ways! In a racing game, like in your example, Player could use his 'real' account to get first place against a bunch of dummy accounts. This would move him up the ratings ladder easily. In a poker game you could fill up a table with clones of yourself leaving room for only a single mark. You'd suck him dry with no difficulty. In a sword-and-sorcery adventure game he could use the dummy character as a mule to carry more loot than he would otherwise be able to carry. In a slow-paced tactical strategy game it might be to his advantage to control two armies in a sort of secret alliance. In a guessing game like "Pictionary" a secret team would have an obvious advantage. These are just generic examples off the top of my head! I'll bet SteveBaker has identified specific vulnerabilities in his game that could be exploited this way. APL (talk) 14:11, 1 September 2010 (UTC)[reply]
Agreed - it's reasonable to require one human for one login-session. But using IP addresses is a faulty way to control access, because IP addresses do not map uniquely to users; and users do not map uniquely to IP addresses. A better way to do this is to force the user to authenticate somehow at the Application Layer or session level - not at the network level. This is a serious limitation of web browsers; they do not administer anything meaningful at the session-layer, and they are the application-layer, so you can't really re-design that either. (Web browsers are meant for rendering HTML pages, and have been hijacked to serve as operating-systems). It is another reason why serious games can be limited by the capabilities of web-browsers. The best way to control access in this case is to control account creation so that one human can not have multiple accounts (or at least, not simultaneously logged in), no matter where he tries to use them from. This denies technical workarounds like having two computers side-by-side with different IP addresses: you've addressed the issue at the human-level, not at the network-level.
In any case, PHP can easily tell you the IP of the connected client: use the Server variable 'REMOTE_ADDR' - and you can get other information as well, like the port(s) they are using, web-browser (user-agent string), and so on. Nimur (talk) 14:30, 1 September 2010 (UTC)[reply]
Hmmm - good point about multiple machines behind a NAT. Urgh! The precise game I'm implementing now isn't a problem - but the next few that will follow it are indeed tactical in nature with quasi-realtime interaction. (ie, you select one or more ships/armies/people/whatever - and you say "go here and do this until I tell you to do something else") There is certainly significant advantage to be had from playing with two armies that have perfect information sharing and perfect cooperation. Of course I can't completely prevent this because someone might have two computers sitting on their desk with different IP addresses - and I can't tell the difference between one person playing using both computers and two friends who are playing honestly against each other. However, I was hoping to raise the difficulty bar at least a few notches higher.
One possible way is to randomly assign logged in users to different copies of the game world - so that the probability of you being lucky enough to be able to play with two armies in the same 'world' is very small. But that prevents two people who genuinely want to play against each other from doing so.
SteveBaker (talk) 18:59, 1 September 2010 (UTC)[reply]
If multi-browser cheating isn't useful in your current game you might take it as an opportunity to collect statistics on how many people share IP addresses.
The 'two friends playing behind the same NAT' issue might affect only a very small percentage of users. In any case, having actual numbers could only help you make a decision on the lesser of two evils. APL (talk) 19:53, 1 September 2010 (UTC)[reply]
One possibility is to just make it transparent when two connections from the same IP are playing a single "world" of the game. Anyone who thought this was bogus could just log out and start a new round. It would save you the trouble of trying to ban the possibility, and also not be a case where you were kicking anyone off. --Mr.98 (talk) 00:07, 2 September 2010 (UTC)[reply]
The only way I can think of is by using Flash cookies. They are shared across browsers on the same machine - any browser with Flash installed, that is. So, you won't have the multi-browser issue for most users. -- kainaw 01:11, 2 September 2010 (UTC)[reply]
I looked through everything I could find on JavaScript and the only cross-browser computer information that I can find is the system clock, local timezone offset, and local language. I expect all computers on a single router to have the same timezone and language. Everything else is browser dependent. So, can you uniquely identify a computer with an IP address and a clock? It might be possible. This is pure theory, but if you have a computer send its local time with the data transfer, you can keep a running offset from the server's clock. If this was the 80's, I'd be certain that multiple computers would have distinct offsets. Now, too many computers use synchronized clocks, so it is very possible that two computers with the same IP also have clocks synced within less than a second. -- kainaw 01:38, 2 September 2010 (UTC)[reply]
Brownie Points awarded to winner for a game should be in proportion to the total brownie points of loser. So if a user wins against a dummy loser the user gets almost nothing, but when a user wins again a competitive opponent the user gets a lot. Fine tuning the formula to calculate brownie points can prevent syndicated misuse. - manya (talk) 06:39, 2 September 2010 (UTC)[reply]
How about if you gathered several different items of data and combined them? The IP, the user-agent, maybe the system name or whatever else one might ask the computer about it? While computers at large facilities (libraries) tend (they usually are not) to be identical or similar, they are usually given diverse names when the network is set up (Student1, Student2, Student3...), maybe you could use that? Then, if a combination of the data you gathered suggests that two instances of the game are run from one system (ie. computer name and ip match, but the user-agent is different), this might suggest an attempt at deception. --Ouro (blah blah) 06:47, 2 September 2010 (UTC)[reply]
I see Kainaw above was already branching out... --Ouro (blah blah) 06:48, 2 September 2010 (UTC)[reply]
My entire building (that's 135 apartments, one of which is mine) is behind a single NAT router; i.e. every single one of the over one hundred computers in my building has the same public IP address. I can definitely see a big problem with filtering based on IP address... Rocketshiporion 08:23, 2 September 2010 (UTC)[reply]
What about using the MAC addresses? --Ouro (blah blah) 09:00, 2 September 2010 (UTC)[reply]
Javascript does not have access to information such as MAC address. ActiveX does have some access to machine info, but that is strictly Windows-dependent. From outside of a local network, information about MAC address cannot be fetched. -- kainaw 12:11, 2 September 2010 (UTC)[reply]
It seems possible (I've not tried this, but there's plenty of examples on the web) to use Javascript to use java's GetHost function to get the actual IP address of the machine the browser is running on (normally a private IP address). Add this to the IP address of the router that is sending the packets and you should be able to uniquely identify the machine, I think. --Phil Holmes (talk) 09:03, 2 September 2010 (UTC)[reply]
Not if there are two NATs, or a proxy, or multi-terminals, or wireless mobile devices, or any other system in use! IP addresses are insufficient to identify human-users. You should use login-based authentication, not network-detail "workarounds," to uniquely identify an individual. Nimur (talk) 20:47, 2 September 2010 (UTC)[reply]
Well, I have had a serious think about this - and it seems basically insoluable. So I'm thinking of turning the problem around a bit. I'm thinking in terms of having a 'ladder' system for advancement. To progress, you have to beat one of the people on the rung of the ladder above you - and in doing so, you push them down one rung. In the lower rungs, there are a lot of people - in the higher rungs less - and in the topmost levels, the system imposes a strict limit of one player per rung. This helps out the false cooperative play problem because if you have two accounts, only one of them can progress to the next level by cheating. Once that account is pushed two rungs up the ladder, it'll be unable to progress higher without winning a legitimate game - or having the second account pushed up to the same level. If the player is winning by cheating, he'll have to create a third account in order to get the second one up high enough to once again help out the first account. The number of accounts he'll need to create to advance to any significant degree by cheating will be huge...and since he actually needs to create a unique email address for each one, that has a significant 'hassle' factor. Moreover, the amount of games he'd have to play to continually push his 'hero' account far up the board would be huge - and while he's doing that, his hero account is vulnerable to being pulled down a level in a fair fight as someone who has the actual skills to progress passes him.
Of course this creates new problems. When there are a decreasingly number of people in the rung above you, how do you arrange to play them? If there is one specific person, then since they have nothing to gain by playing you (they can either win, and stay put on their rung - or lose and go down one) - their best strategy is to never be home when you want to play him. So we'd need some kind of a "challenge" system - whereby you issue a challenge to one of the people above you - and if they refuse to play within some reasonable timespan (a week let's say) then the person below gets a "walk over". The trouble with THAT is that the person below then has an incentive to issue his challenge and only be available to play at incredibly inconvenient times...so we really need it to be "You issue a challenge and unless the game is played within a week, you BOTH drop down a level". We'd also have to limit the frequency at which you're allowed to challenge the same person.
SteveBaker (talk) 21:07, 2 September 2010 (UTC)[reply]
Great solution. To solve the problem where the "guy above you won't play against you..." you can implement a time-based "rank decay." If you haven't played a game in, say, one week, your rank begins to fall automatically; and if you refuse to keep proving that you are better than players beneath you, you begin dropping. You can think out the details of how you want to do this; I bet you'll find inspiration from other systematic game-ranking schemes. Many use "statistical" and time-averaged ratings to force players to remain active. Also, it should be self-evident that a Rank 100 player vs. a Rank 500 player is an "expected" win for the better player - so you need to weight that kind of a win differently than, say, a "#101 vs. #105" match. Nimur (talk) 21:30, 2 September 2010 (UTC)[reply]

How do I get my Yahoo toolbar back?

It has a nice button that I can click on and go right to my Yahoo email if I have a reason to. And that button has a number on it if I get new mail.

But certain people tell me when I have a problem that I should disable add-ons (Tools, manage add-ons, click on Yahoo toolbar, click on "Disable") to see if they are causing the problem. I haven't had a problem at home that I know of--until now. I did the same steps (except to click on "Enable" instead of click on "Disable"), and I have yet to see the Yahoo toolbar.Vchimpanzee · talk · contributions · 17:17, 1 September 2010 (UTC)[reply]

Okay, I found it. It says in the box where I click "disable" to go to "Tools" and click on the "Toolbars" menu. "Yahoo" wasn't checked. So it's not as simple as clicking "Enable".Vchimpanzee · talk · contributions · 18:15, 1 September 2010 (UTC)[reply]

At least it's here if anyone is searching.Vchimpanzee · talk · contributions · 20:23, 1 September 2010 (UTC)[reply]

Windows 7 Experience Index is not working

Hello there. The other day I was trying to rate my system via Windows 7 Experience Index. During the operation, suddenly electricity went off. When electricity came back I was unable to run experience index. There's no error message at all. If I click "Rate this computer", nothing happens.I run the troubleshoot, but nothing happened. What to do? --180.234.22.32 (talk) 17:20, 1 September 2010 (UTC)[reply]

Is everything else fine with the computer? Maybe scan your drive for errors? Power outages and sudden surges can be deadly to computers. HTH. --Ouro (blah blah) 06:40, 2 September 2010 (UTC)[reply]

re-chargeable batteries

What is the significance of the mAh number with regard to operating efficiency, longevity, number of re-charges etc. Does a higher mAh number indicate a better battery or is it to do with specific uses e.g. flash camera, wall clock.

Thank you —Preceding unsigned comment added by 94.4.207.148 (talk) 20:49, 1 September 2010 (UTC)[reply]

1 mAh is 0.001 Ampere-hour. This parameter estimates the total amount of energy in the battery, (but not exactly). Another parameter, peak current, tells you the maximum amperage the batter can instantaneously deliver; and the amp-hour rating tells you how long the battery will last for a given current. Because battery chemistry is complicated, the mAh rating should not be treated as an exact parameter: the actual energy content of a battery requires integrating the time-history profile of current-draw. For example, some batteries can last much longer than their rated amp-hourage, if they "trickle" current instead of delivering it in large quantities for a short period of time. Nimur (talk) 21:19, 1 September 2010 (UTC)[reply]
The number of mAh given is known as the capacity (I suggest you read that section, it's quite good). The number of mAh will have almost nothing to do with operating efficiency, longevity, or number of recharges. Those number are almost entirely dependent on the chemistry of the battery, and to a lesser extent, the type and quality of construction. A higher mAh should power devices longer than a lower mAh battery, all else being equal, but of course with batteries, you never have all else being equal.
One thing to watch for with many rechargeable batteries (esp. NiMH, the most common type of consumer rechargeable batteries) is that larger batteries (C and D size) are often just a AA core with a casing to make it bigger. In these cases, you can look at the mAh rating to see whether this is the case (assuming that the manufacturer doesn't just lie about the rating, in which case all bets are off). Typically, AAA batteries should be rated around 600-700 mAh, AAs around 1000-1300 mAh, C around 4000-5000 mAh, and Ds at about 10000 mAh. Alkaline batteries (the most typical type of non-rechargeable batteries, at least in the U.S.) are typically rated somewhat higher than rechargeable batteries, though the actual capacity depends on load. So called "Lithium batteries" (which I believe are typically Lithium Iron Sulfide chemistry) have even higher capacities, and are often marketed for high draw devices, like digital cameras. High draw devices can also significantly decrease the actual capacity drawn from a battery. Buddy431 (talk) 23:48, 1 September 2010 (UTC)[reply]

Noise algorithm, Perlin?

What is the name of the noise algorithm described here and countless other tutorials on the web? (Basically : Generate some random 2d noise, and add it to itself at increasing scale levels with decreasing magnitude.) It's almost always described as "Perlin Noise", but I'm not convinced.

This doesn't seem, to me, to match up with the algorithm described by Professor Ken Perlin, or his original code. Besides, math aside, it doesn't really look like Perlin noise.

My question is 1) Is this really mathematically equivalent to Perlin noise? If so, can someone explain how? 2) If not, what's this algorithm really called and why did it become known as Perlin noise?

Thanks. APL (talk) 20:52, 1 September 2010 (UTC)[reply]

I think that is just shaped noise weighted by frequency, with enhancement to the low spatial frequencies. The fact that the author is using linear interpolation to upscale each image means he's effectively gaining his low-frequencies. This could be done in one step with fewer calculations (i.e. fewer pixel operations) by low-pass filtering the high-resolution white-noise. (But the author doesn't seem to know this, because "linear interpolation" is an API feature and appears "free"). It is probably spectrally equivalent to the output of Perlin's code, but I'm not sure I follow his algorithm completely. The exact parameters depend on what interpolation is in use; and how many subsampled images you combine. But the end result is that you have a 2-D matrix of random numbers; and there is a characteristic 2-dimensional spatial frequency spectrum that depends on your weightings. Nimur (talk) 21:11, 1 September 2010 (UTC)[reply]

Background Music in Microsoft Excel 2003

Having trawled through forums all over the internet, it has become apparent that it is possible to insert background music into a spreadsheet. I am, however, still at a loss as to how this may be done. Any answers would be greatly appreciated. --T.M.M. Dowd (talk) 21:18, 1 September 2010 (UTC)[reply]

It seems to involve the use of a small excel macro. You'd do this under Tools, Macro in excel 2003. Here's one example. --Tagishsimon (talk) 00:18, 2 September 2010 (UTC)[reply]
But where do I enter this code in order for it to work? --T.M.M. Dowd (talk) 13:37, 2 September 2010 (UTC)[reply]
Create a Macro, or add the audio as a Clip by opening the Clip Organizer. The clip system may be easier to use if you are not a programmer. Nimur (talk) 21:38, 2 September 2010 (UTC)[reply]

Skype and charges...

Ok, so I just downloaded skype, I did'nt put any credit card or visa or paypal information. I did a quick call to one of my friends to test it out and it worked, however according to their website calling people not on skype will cost you. Now I've used it a little, my question is will they charge me if I continue using it??? and how???? Please no assumptions or guesses, only 100% positive answers. Thanks in advance, this has been your friendly neighbourhood Wikiholicforever (talk) 21:36, 1 September 2010 (UTC)[reply]

Skype offers one free telephone-call as a "trial". If you attempt to make another, it will request payment information before permitting your call. Nimur (talk) 22:03, 1 September 2010 (UTC)[reply]
Which is also to say, they can't magically bill you without knowing your contact and payment information. You will be duly warned before any kind of charges are made. --Mr.98 (talk) 01:14, 2 September 2010 (UTC)[reply]
But if you just do Skype-Skype it remains free. --jjron (talk) 07:36, 2 September 2010 (UTC)[reply]

Thanks for the answers, I really appreciate it! I was afraid that they would somehow contact my ISP and force them to give my billing information! XD Needless to say, I wasted that one free call ):... If I make another acount on the same computer will I get another free call?? And if I live in Canada can I call someone in the US with the free call??? Thanks again. Wikiholicforever (talk) 02:46, 3 September 2010 (UTC)[reply]

Apparently you can call lots of places with your free call; follow the link given earlier and look at "Where can you make a free call to?" - that clearly includes Canada & US, including mobiles, but there's a five minute time limit. Not sure about creating new accounts, it says "All first-time downloaders automatically get their first call free" indicating the free call is linked to the software rather than the account, probably thru a registry entry or something. If you reformatted your computer and reinstalled everything you could probably get another free call, but hey, how desperate are you? ;) --jjron (talk) 08:16, 3 September 2010 (UTC)[reply]


September 2

Compiler Writing: NOT Parser Generators!

I search for compiler writing tools or compiler-compilers on Wikipedia and on Google and when I look at their websites it says they are parser generators (and are used for making domain-specific languages for analysis, not general-purpose languages which I want to do, might I add) and make no mention of compiling SDFs or whatever into compilers! It is driving me nuts. Is "parser generator" just some fancy term for compiler among compiler-writing developers or am I missing something? Is there a good tool out there for Windows that I can use to make compilers (open source, BSD or other permissive license, preferably)? --Melab±1 01:04, 2 September 2010 (UTC)[reply]

A Lexical analyzer and a parser are two major components of a compiler. The other major component is the logic of what to do with the tokens after they've been parsed. That part will pretty much have to be written by a human.
Luckily for anyone crazy enough to want to do this, this is a common "final project" for C.S. majors, so there are books and stuff on how to do it. (Personally, I opted out and wrote a video game instead.) I make no claims for the quality of either of these two sources (Like I said, I skipped this.) , but this seems to get good reviews, and some folk seem to be very impressed by this older (but probably still mostly valid) guide on the same topic. APL (talk) 02:57, 2 September 2010 (UTC)[reply]
Programs are (conceptually) tree-like things, but, because of the human mind's amazing facilities with language, it turns out to be best to represent those trees in a linear fashion, as text, in languages that are (approximately) context-free languages. Turning the text back into a tree is considered a solved problem (though there's still a little bit of research in that area!), and that's what "compiler-compilers" or "parser generators" do. But a compiler is really something that translates from one language to another, and that part is a classic programming task that's best left in the hands of humans.
There are two things that any prospective compiler writer must think about:
  • Can an interpreter do the same job? For a lot of tasks, interpreting a language is easier than compiling it, and the speed penalty isn't worth worrying about.
  • What's the best destination language? Someone has to write a compiler that takes programs to assembly language, but most people don't need to. It's far easier to compile to a pre-existing language with a good implementation. Taking this philosophy to an extreme, the macros in Lisp or (especially) Scheme amount to a tower of gradually-more-powerful languages, each compiled down to the next with an incredibly simple compiler. Common destination languages include C and LLVM, but compiling down to a high-level language like Haskell or Scheme or C++ or ML is also done.
Paul (Stansifer) 04:25, 2 September 2010 (UTC)[reply]


There's no reason you need to re-invent the parser every time you want to invent a new compiler. Parsing is the boring task of sophisticated string tokenization. There's not much to improve or innovate there - it's just a necessary, difficult, and boring part of machine text analysis. Instead of re-inventing this (and similar parts of the compiler), learn to use the already existing Flex and Bison. (Our articles may be the best place to start). These tools do the grunt work of text analysis, leaving the compiler design to you. The real meat-and-potatos of compiler design is the sophisticated process of defining your high-level language into a structured form describable by (for example) Backus-Naur form. That is the first step. Once in this kind of intermediate representation, the second step (mapping BNF to a set of machine instructions) is very pedantic. You should not waste your time re-designing that second mapping (especially if you are unfamiliar with the 900 or so instructions available on a modern Intel CPU, or other CPU architecture of your choice).
Furthermore, using standard tools means that you can plug in your language to existing systems. A lot of compilers for many different languages use the same back-end, so that they can focus on design for their language instead of for the instruction set architecture of the machine(s) they are targeting. For example, almost all of the compiler tools in the gcc kit (C, FORTRAN, Delphi, Pascal, ... and on and on and on) all use the same gcc back-end structure. This way, your Delphi and your Pascal and your C++ program can all run through the same hardware-optimization routines (and so on). (...totally and irrefutably invalidating any claim about any programming language that inherently yields "better performance" or "faster code" - but I digress).
Anyway, if you really want, you can re-invent these steps; nothing stops you from writing your own parser and lexical analyzer. You can also code a compiler in assembly language; and you can also redefine a character encoding that uniquely re-interprets machine binary representations as characters of your choice, (ASCII has many shortcomings), and you can write your own text-editor and character-mode video driver that can understand your homebrew text-encoding. There is a certain line you have to draw - decide the tradeoff between how much time you want to spend re-inventing things, and how much time you want to spend learning the existing tools. Nimur (talk) 04:34, 2 September 2010 (UTC)[reply]
Responding to your small text: there are many reasons why some languages yield smaller or faster machine code independently of the backend. For example, C doesn't specify the effect of an out-of-bounds array access. This means that an array read or write can legally be compiled down to a single indexed read/write at the machine level. Most other languages require that the index be checked against the array's upper and lower bounds (which must also be loaded from memory) and a certain exception be raised if the test fails. A correct optimizer can't drop the bounds tests unless it can prove they will always succeed (or always fail). In many cases that can't be proven because it's false, and even when it's true, proving theorems is hard even for human mathematicians and it's even harder to program a computer to do it (with useful efficiency). The best you can probably hope for is optimizing away the tests in a simple loop like for (i = 0; i < x.Length; ++i) { ... }, but even that may fail if there's a function call in the body, because it may be hard to prove that the function won't modify x's length. The programmer apparently expects it not to, but programmers are often wrong and optimizers have to preserve program semantics.
There are lots of other examples like this. In an untyped language it's hard to optimize away the extra runtime type checks. In a language with powerful runtime reflection and/or a powerful eval statement, you can't inline any function because you can't prove that it won't change at runtime. In this old thread I listed a few reasons why it's hard to efficiently compile Java and Java-like languages. Aliasing is another interesting example. A C89 compiler must assume that any two pointer expressions of the same type may alias each other unless it can prove otherwise. FORTRAN prohibits aliasing of arrays, which makes automatic vectorization easier. This is one of the reasons why FORTRAN dominated numerical computing for so long. C99 added the restrict keyword to enable optimizations that assume no aliasing. -- BenRG (talk) 23:57, 2 September 2010 (UTC)[reply]
Maybe "irrefutable" was an overly-strong word... : ) You are right, and you bring up some cases (like exceptions-handling, and pointer mangling, and function inlining, and garbage-collection) that are language-specific and could limit performance. But for many (actually, for almost any code other than numerical data-processing kernels), these optimizations have minimal impact on wall-clock execution time. The most important optimizations - substituting machine-architecture (ISA) enhancements to replace long streams of common instructions - work on code generated from any source-language. For example, GFortran translates all FORTRAN code to GIMPLE, and then runs the exact same GIMPLE optimizer as it generates machine code, (so whether your program is C++ or Java/gcj, gccwill automatically compile in SSE and 64-bit operations if your computer supports them). So exactly those optimizations you talk about - like handling pointer aliasing and so on, can be handled in a source-language-invariant way (unless the language specifically interferes with these optimizations). Overlapping arrays are the best example of a case where the language-specification will actually enable or forbid certain optimizations (like out-of-order execution on pointer operations); if the language guarantees these can not exist, the compiler is free to do fancy things. But, outside of sophisticated vector-math numerical kernels, how many programs meaningfully reap the benefit of OOE array operation optimizations? (It should be noted that even ifort defaults to assuming aliasing - probably because unless you manually specify -fno-alias, it runs through a "C-language" style optimizer that refuses to make the assumption that arrays are "safe", which is specific to FORTRAN). Here's the User Guide for IFORT, with more information than you ever wanted about optimized compilation. Nimur (talk) 00:28, 3 September 2010 (UTC)[reply]

Backing-up to a NAS drive over the Internet?

I would like to be able to attach a drive to my mum's router at home so that my computer away at University will be able to back-up via the Internet (updating the back-up to reduce the total file transfers). Is this possible, though? I contacted one or two companies a while ago, and I believe that their responses were that their NAS drives would allow back-up via the local network but not via the Internet. --89.243.142.40 (talk) 01:14, 2 September 2010 (UTC)[reply]

I believe that remote access to the NAS is possible, but you will need to configure your router to allow it. First, please note that any changes to the allow outside access into the home network represents a security risk, so you need to make sure that the proper security features (i.e. passwords) are enabled on the NAS device. I assume that your home has a typical network that includes some kind of modem (cable, ASDL, or similar), which is connected to a router, which in turn has wired and/or wireless connections to the other devices (computer(s), NAS device, etc.) in the home.
What is commonly referred to simply as a router also provides firewall and network address translation (NAT) features which act as a bridge between your private home network (LAN) and the rest of the internet (WAN). Inside your home network, devices have locally distinct IP addresses typically of the form 192.168.xx.xx, assigned by the router. However, your internet service provider will only assign a single IP address to the model, such as the 89.243.142.40 address we see in your original post. This is the address that the rest of the internet sees.
Normally, any computer inside your private network (or LAN) can initiate a connection out to the internet (the WAN), but any unsolicited attempts from the outside to connect into your network are refused. NAT serves to keep track of what's connected to what, so when one computer sends out a request, the response is routed back to the requesting computer. However, when an inbound connection request is received, the router does not automatically know which local device should receive the request, so the request is dropped. Port forwarding allows you to configure your router to send specific connection requests to specific devices, to send all requests to a designated device (sometimes called the DMZ, or a combination. Port numbers generally identify the type of internet connection request. For example, port 80 is HTTP, which you might want to route to your computer if it were running a web server. Port 21 is generally used for FTP and you may wish to configure your router to forward such requests to your NAS. (You may have already set up some port forwarding if you use some internet games.) You will need to check your router's documentation to see in detail how to configure fort forwarding. You will also need to check your NAS documentation to identify what ports and protocols are supported, and of course how to set up the security.
Port forwarding also allows you to translate port numbers, called port translation. For example, you may wish to map inbound port 8080 to port 80 in your local computer and map inbound port 12345 to port 21 on your NAS. Sometimes this is necessary because many ISPs block certain well known ports to discourage customers from running home based servers. It also allows you to assign an arbitrary number to the service to make it less likely that a hacker will detect your server using port scanning techniques.
The final key that you will need is the IP address of the home network. Ideally, it remains static over time, but ISPs generally do not guarantee this, and it may change after a power or service outage. I believe there are some services out there that allow you to periodically post the home's current IP address so that you can look it up remotely, but someone else will need to fill in these details. Once you have port forwarding configured and know the home IP address, you can remotely access the NAS as something like "ftp://89.243.142.40/" or "ftp://username:password@89.243.142.40:12345/" (where "username" and "password" are what you configured in your NAS security setup and ":12345" identifies your externally defined port). From this point you need to look at your backup software to see how to configure it to connect to your distant NAS.
Good luck. I'm sure others can fill in any missing details and correct any error in the above. -- Tom N (tcncv) talk/contrib 04:10, 2 September 2010 (UTC)[reply]
I use TeamViewer to remotely access my home PC. It allows file transfers. Not sure it it supports backups as such. ---— Gadget850 (Ed) talk 15:37, 2 September 2010 (UTC)[reply]
Re: changing IPs above, a simple solution would be to use one of the many free domain name with dynamic DNS support service. Many routers come with support for updating a dynamic DNS built in, if yours doesn't you can either install software on your mothers computer (should be easier but will obviously only work when your mothers computer is on) or since I believe many NAS devices use some sort of specialised Linux or similar you could probably install something on your NAS (if your NAS doesn't come with it built in, they may I don't know much about NAS). If you're using FTP there may be a bit more work to get it working properly however Nil Einne (talk) 08:40, 3 September 2010 (UTC)[reply]

This Type of Image

Kindly have a good look at this type of Image. Please note that my question is not about the format but the style of the image. Such images are perhaps (if I am not wrong) only found on Wikipedia. What I find intriguing as an artist is easy way with which the contrasts of colors is played upon to fool the human eye, which is very-very difficult effect to achieve even digitally let alone with brush. What I'd like to know is what this movement in computer-art is known, what tool is typically used to conjure up this kind of stuff ( I don't think its GIMP). If there is a history behind this movement, i.e. who invented it etc. Are there any Wikipeople out there who are Gurus etc.  Jon Ascton  (talk) 05:57, 2 September 2010 (UTC)[reply]

This is a vector image; it uses gradient fill (specifically, radial gradients), which are part of the SVG vector image format specification, to define the smooth color blends. This same effect can be done using GIMP on raster-images; though in this case, InkScape was used. The style could be considered pop art, but it's hard to classify. These images aren't only found on Wikipedia; but this particular image comes from a freely-licensed icon set; so it is advantageous for use on Wikipedia. You can find stylistically similar icons and logos in many other free and non-free projects.Nimur (talk) 06:12, 2 September 2010 (UTC)[reply]
I would emphatically dispute classifying it as Pop art, unless you take the perspective that everything is Pop art. A quick look at the Pop art article makes it clear how different it is; it has really nothing in common except a very broad modernist base. --Mr.98 (talk) 11:33, 2 September 2010 (UTC)[reply]
Ok, I am not an art critic, so I don't know the definitions well! I see bright colors, bold lines, and stylized cartoonish figures; but if that is not "pop art" in the ordinary definition, then I am mistaken in my classification! Nimur (talk) 20:54, 2 September 2010 (UTC) [reply]
Pop art qua Pop art is defined not so much by its appearance as by its intentions. The article discusses this quite well. It's about using the visual language of popular commodities and moving them into a high art context. So it's Andy Warhol painting Campbell's soup cans, as a way of saying, "look, I'm making art by mimicking advertisements," or Roy Lichtenstein making fake "comic book" panels, saying, "look, this wouldn't normally look like art except for the fact that I am blowing it up and claiming it is art," and so on. The general aesthetic I think you are meaning is just modernism more broadly — generally simplistic, often (but not always) basic colors, appeals to function rather than ornate form, stripped down, etc. E.g. Bauhaus or late Piet Mondrian and so forth. I'm not an art critic either, but Pop art is the wrong category altogether. --Mr.98 (talk) 22:14, 2 September 2010 (UTC)[reply]
Obviously it is a vector image, and the GIMP and Photoshop specialize in raster images. It would actually be quite easy to draw such an image in an illustration program such as Adobe Illustrator. You draw three squares. Then, you stack them on top of each other and use the Pathfinder palette to make them cut into each other. Then, you go to Effect --> 3D --> Extrude & Bevel. The light above was probably added by drawing a white circle over the shape and then lowering its opacity.
It would be even easier to construct that shape in a dedicated 3D program like Autodesk Maya, where you can add lights. It would look more realistic, as well.--Best Dog Ever (talk) 06:16, 2 September 2010 (UTC)[reply]
Which, by the way, would ruin the stylistic effect of that nice icon. Comet Tuttle (talk) 06:26, 2 September 2010 (UTC)[reply]
Irrelevant. My point is simple: the drawing is simply three squares and a circle that have been transformed. It is true that it would take a lot of skill for a human to draw that. But it was drawn by a computer. The drawing program only sees three squares and a circle with a list of tranformations. (At least, that's how it would be represented in PostScript after being drawn by Adobe Illustrator.) The work was done mostly by a computer, and it did it with ease.--Best Dog Ever (talk) 06:38, 2 September 2010 (UTC)[reply]
This is quibbling now, but saying "the work was done mostly by a computer" is false. This was created by a computer artist who utilized some software as a tool to create the image. Comet Tuttle (talk) 15:22, 2 September 2010 (UTC)[reply]
The general look of the image, with its radial gradients and soft beveling, is generally modeled after the iconography that became popular "Aqua" styles used by Apple, Inc.. (see, e.g., their logo, Mail.app icon, Safari's icon). It has since been copied/emulated/improved upon/etc. by Windows (Windows Vista's Aero theme is an obvious descendant), and a number of Linux themes (like the icon you posted there, from KDE). If you Google "Apple icon effect" you can find many tutorials; it is not very hard to accomplish with their a raster or vector editor. --Mr.98 (talk) 11:33, 2 September 2010 (UTC)[reply]
See Computer_icon, icon design, and Graphical user interface elements.Smallman12q (talk) 01:09, 4 September 2010 (UTC)[reply]

Difference between SIMD and Vector Processors

What is the exact difference between SIMD and Vector processors?

Is there any difference from computation philosophy?

I worked with few processors where 'data parallelism' is implemented by following two methodologies:

(1) Some processors(MIPS, SNE) have some instructions to treat a 32bit register as 'a set of 4( or 2) 8bit( or 16bit) independent elements' and operate over them. Vendors of such processors call it as SIMD.

(2) Some processors(SiliconHive, SPI) have special 256bit registers( vector register) and instructions to operate over these vector registers treating it as 'a set of 16 16bit elements'. Vendors of such processors call it as vector processor

Other than these increased element number, is there any difference between SIMD/Vector processing ?

—Preceding unsigned comment added by ArpanH (talkcontribs) 11:27, 2 September 2010 (UTC)[reply]

The terms are generally interchangeable. SIMD is a more specific description of how a processor operates on a vector. "Vector processor" just indicates that the processor is aware of vectors (groups) of data. Since the typical purpose for treating separate data as a single vector is to use the same operation on all of it, most vector operations are SIMD operations. Nimur (talk) 16:09, 2 September 2010 (UTC)[reply]

Conventional Explosives Simulation Software

Hi.

   Is there any software (whether open-source, freeware or commercial) which can be used to simulate the deformation and detonation of an explosive warhead? This software should be able to accept input of shape, size, dimensions, mass, etc. of both the explosive filler and the warhead-wall; and output the following numerical values.

  • Total Blast Radius
  • Lethal Blast Radius
  • Brisance

   The software must support designing with the following 22 explosives:

  1. Mercury Fulminate
  2. Triazidotrinitrobenzene
  3. Triaminotrinitrobenzene
  4. Dinitrodiazenofuroxan
  5. Trinitroaniline
  6. Trinitrobenzene
  7. Trinitrotoluene
  8. Nitroglycol
  9. Tetranitroglycoluril
  10. Nitroglycerine
  11. Mannitol Hexanitrate
  12. Pentaerythritol Tetranitrate
  13. Cyclotrimethylenetrinitramine
  14. Cyclotrimethylene Tetranitramine
  15. Hexanitrohexaazaisowurtzitane
  16. Octanitrocubane
  17. Nitroguanidine
  18. Nitrocellulose
  19. Ammonium Nitrate
  20. Methyl Nitrate
  21. Urea Nitrate
  22. Lead Azide & Silver Azide

   Basically, now I'm looking for a free-form explosive warhead design software. Thanks to everyone. Rocketshiporion 12:11, 2 September 2010 (UTC)[reply]

r u a terrorist? —Preceding unsigned comment added by Tomjohnson357 (talkcontribs) 13:29, 2 September 2010 (UTC)[reply]
You're looking for open source software to design a warhead? I refer you to the answers to your similar question above about looking for open source software to design a nuclear weapon. Comet Tuttle (talk) 15:21, 2 September 2010 (UTC)[reply]
He/She wants to simulate an explosion with software. 82.44.55.25 (talk) 15:53, 2 September 2010 (UTC)[reply]
If you want to animate an explosion, here are some tutorials: Object Explosion for 3D Studio Max, and Large Scale Explosions for Blender (software). If you want to accurately simulate, then the responses to your previous question still apply. If you really want to research this stuff, consider applying for an advanced technical degree program at a school that studies energetic materials. For example, New Mexico Tech is a science and engineering research university with a specialty in energetic materials. But they won't just hand out information, software, and material support to anybody - because this stuff can be very dangerous. The process of building credibility in these kinds of areas is long and slow and subject to regulation. Nimur (talk) 16:23, 2 September 2010 (UTC)[reply]
I should clarify; I already have the relevant information (for most of the above-mentioned explosive compunds) with which to calculate blast radii. I currently have to manually calculate the blast radii based on the RE factor and mass (and shape, in the case of a shaped-charge) of the explosive filler. What I need is just a software into which I can plug the equations for each of the above explosive compounds, in order to automate the process of calculating blast radii, and thereafter animate the explosion. Rocketshiporion 18:15, 2 September 2010 (UTC)[reply]
So go use a spreadsheet, then. Masked Booby (talk) 02:45, 3 September 2010 (UTC)[reply]

Cyclotrimethylenetrinitramine? You have some pretty potent stuff there...are you looking to make an accurate simulation of this type of military grade explosives? What exactly with and why?Smallman12q (talk) 01:14, 4 September 2010 (UTC)[reply]

Based on Steve Baker's question above and my reply... Does anyone know of a very tiny flash app that I can put on a web page and then save/fetch cookies through javascript? It would be best if it was a rather invisible little one-pixel app that could be shoved into a corner of the page and not hinder the rest of the page design. The goal is to save cookies in one web browser and fetch those same cookies in another web browser on the same computer. -- kainaw 12:14, 2 September 2010 (UTC)[reply]

Be easy to make one yourself; [1] [2] ¦ Reisio (talk) 16:28, 3 September 2010 (UTC)[reply]

broadband numbers

my isp gave me these numbers for my broadband

   34.2                   -15.4              49.8   


they said -15.4 was very bad. what do these numbers mean? —Preceding unsigned comment added by Tomjohnson357 (talkcontribs) 13:28, 2 September 2010 (UTC)[reply]

Did they really not explain further? The first thing I thought they were were speeds, but I'm not sure. Chevymontecarlo 14:15, 2 September 2010 (UTC)[reply]

What's the ISP? From looking at them, I'd guess they're downstream signal-to-noise levels measured in decibels. 82.44.55.25 (talk) 14:33, 2 September 2010 (UTC)[reply]

Yeah, probably. I'm going to guess you have a cable modem, and not DSL. If those are cable modem signal levels, the -15.4 is probably your downstream power level, which is a bit outside the recommended range. If you research it a bit (look up your cable modem model number), you can probably figure out how to check these stats directly on your cable modem's configuration page. DSL modems have transceiver statistics, which look similar, but afaik they don't usually have any negative numbers. Indeterminate (talk) 16:11, 2 September 2010 (UTC)[reply]
The poor signal power probably indicates that either you are far away from their networking equipment, or that the cable connection is degraded or has many splits. This is something the cable provider needs to handle; there is nothing you can do about it. Nimur (talk) 16:27, 2 September 2010 (UTC)[reply]

Javascript wait

Resolved

I'm trying to write a script for greasemonkey that autofills a box. However the box doesn't appear for 5 seconds after the page loads. Is there a "wait" command in javascript that could pause the script for 5 seconds before continuing? 82.44.55.25 (talk) 18:15, 2 September 2010 (UTC)[reply]

Write one function that waits with a timeout and another function that does the work. The timeout requires the function name of the second function and will have the syntax: window.setTimeout("yourSecondFunction()", 5000); // 5000 is how many microseconds to timeout for. -- kainaw 18:18, 2 September 2010 (UTC)[reply]
Thanks. What would be the function name of
document.getElementsByName("input")[0].value = "Hello";
82.44.55.25 (talk) 18:52, 2 September 2010 (UTC)[reply]
You can place that direction into the timeout as: window.setTimeout("document.getElementsByName('input')[0].value = 'Hello';", 5000); Keep an eye on those quotes. I changed to single quotes inside the double quotes to avoid escapes. -- kainaw 19:10, 2 September 2010 (UTC)[reply]
Thanks! 82.44.55.25 (talk) 19:21, 2 September 2010 (UTC)[reply]

NP theory

sir, I have been through ur article about NP,NP-Complete and NP-HARD definations and problems but i can't understand the defination of NP-HARD class And the difference between NP complete and NP hard .

What do u mean by "at least as hard as the hardest problems in NP" please explain elaborately !!!!!!!!!! —Preceding unsigned comment added by A khan0001 (talkcontribs) 18:37, 2 September 2010 (UTC)[reply]

All NP problems are decision problems. They have an answer: Yes or No. There are many examples. The NP-Complete ones are the difficult ones and they all have the same solution. For example, if I give you a 3-SAT problem, you can rewrite it as a Travelling Salesman problem and then solve the Travelling Salesman problem to solve the 3-SAT problem that I gave you. NP-Hard problems include NP-Complete problems, but much more. NP-Hard is an intersection with NP. NP-Hard includes decision problems and optimization problems. So, consider this: "Is there a way to travel over all the bridges in town without crossing a single bridge twice?" The answer is Yes/No, so it is in NP. It can be NP-Hard also (if it is NP-Complete). Consider this: "What is the shortest route that crosses all bridges in town without crossing a single bridge twice?" The answer is a route, not Yes/No, so it is not in NP. It is an optimization problem. It is at least as hard as the previous decision problem. So, if the original decision problem is NP-Complete, this is NP-Hard. -- kainaw 18:43, 2 September 2010 (UTC)[reply]
Wait a minute, not all Yes/No problems are NP, and the "vice versa" part is only formal.
For example, the problem "does a given Turing machine halt?" has a Yes/No answer, but it's not NP. It's not even decidable by a fixed algorithm. See halting problem.
For the converse, yes, it's easier to do some formal manipulations when you restrict your attention to Yes/No problems, but NP is "morally" more general than that. For example, "factor a given number into primes" is NP in every way except purely formally. --Trovatore (talk) 18:53, 2 September 2010 (UTC)[reply]
I was purposely being general because this questioner appears to still be at the "I don't understand the difference between an NP and NP-Hard problem" stage. To many details leads to confusion, not clarity. -- kainaw 18:55, 2 September 2010 (UTC)[reply]
Do you think that flat wrong answers lead to "clarity"? Your answer was not even in the right direction; it was not helpful whatsoever. --Trovatore (talk) 19:04, 2 September 2010 (UTC)[reply]
Also, factoring into primes is not in NP for two reasons. First, it isn't a decision problem. Second, it is not verifiable in polynomial time because verifying extremely large numbers are truly prime is a difficult problem. The second step of understanding NP that I normally go to is verification of the answer. It must be simple to verify. That is why the halting problem is not NP. If you say "no, it won't halt", how can I verify that answer in polynomial time? -- kainaw 18:59, 2 September 2010 (UTC)[reply]
Factoring into primes can be rephrased as a decision problem, in such a way that a polynomial-time answer to one gives you a polynomial-time solution to the other, and vice versa. Something like "given n and k, is the k'th bit from the right of the smallest prime factor of n equal to 1?".
As for your second point, that's less trivial, but in fact it is now known that it is possible to decide in polynomial time whether a given number is prime. If that weren't the case, we could still talk about "factoring" in general being NP, I think, just not "factoring into primes" (it would require more care in the statement).
Your last point is correct, but you didn't say anything about it in the response to the OP, which made your answer completely useless. --Trovatore (talk) 19:10, 2 September 2010 (UTC)[reply]
Actually, for (the decision version of) factoring into primes being NP, you don't need primality testing to be in P. It is sufficient to know that it is in NP, and this has been shown two almost three decades before AKS (and it's much simpler to prove).—Emil J. 10:18, 3 September 2010 (UTC)[reply]
Simply put, an NP-hard problem is at least at hard as the hardest problems in NP, but it may be (much) harder and therefore not itself in NP; an NP-complete problem is NP-hard and is in NP. An NP-complete problem is a hardest problem in NP. --98.114.98.162 (talk) 04:32, 3 September 2010 (UTC)[reply]

Typing credit card details into SLL-enabled CGI proxies

Is it safe? If not, is creating a bypass proxy a safe way of doing it (as described in this tutorial: http://www.erasparsa.com/Create-Your-Own-CGI-Proxy-to-Bypass-the-Great-Firewall-of-Indonesia). Thanks in advance --Mark PEA (talk) 19:58, 2 September 2010 (UTC)[reply]

I only checked the first script on that page, and that one apparently (according to its readme) offered you a form in which you can type an URL. I wouldn't trust any proxy of that type with confidential data. If the other CGIs work the same way - a form, as opposed to allowing you to set it as a proxy server in your browser - they'd be unsafe too. A proper proxy allows your browser to use the CONNECT verb (see Hypertext Transfer Protocol) for SSL, and then simply passes along the data without being able to see it. As long as you verify the SSL certificate and you trust the issuer, and as long as your browser hasn't been tampered with, such connections should then be secure. 82.75.185.247 (talk) 22:07, 2 September 2010 (UTC)[reply]
An SSL proxy would mean that the proxy would see your data...the SSL means that the traffic to the proxy is encrypted, but it doesn't mean the proxy is trustworthy.Smallman12q (talk) 01:17, 4 September 2010 (UTC)[reply]
So I assume it is something like: Me -> Proxy (HTTP), Proxy -> Website (HTTPS). Is there no way of getting a Me -> Proxy (HTTPS) connection? --Mark PEA (talk) 17:36, 4 September 2010 (UTC)[reply]
I think you misunderstand...it goes like this: You->SSL(Proxy SSL)->Proxy->SSL(website SSL)->website. If I understand correctly, what you want is to be able to securely access a website(that is also secure)...see Tunneling_protocol, Virtual_private_network, and Secure_Shell. Provided your proxy is actually secured, you shouldn't be susceptible to a Man-in-the-middle attack. Hope this helps.Smallman12q (talk) 22:45, 4 September 2010 (UTC)[reply]

Compressing

Resolved

I'm want to compress around 90,000 .mht files. I'm using 7zip with the solid compression option, which works extremely well. I've read about solid compression being susceptible to corruption, for example if one part of the file is damaged everything after it also becomes unsalvageable. Would setting the "solid block" size lower to something like 1GB secure against complete failure? If part of the file got damaged, would only the parts in that "block" be unsalvageable, but files in other blocks would be ok? Is that how sold compression blocks work? 82.44.55.25 (talk) 20:11, 2 September 2010 (UTC)[reply]

Yes. If you're worried about corruption, some PAR2 parity files will protect you better than limiting the block size. -- BenRG (talk) 00:03, 3 September 2010 (UTC)[reply]
Just make redundant backups. ¦ Reisio (talk) 02:32, 3 September 2010 (UTC)[reply]
Actually depending on how many redundant backups you create and in what form, some sort of parity files may be better. I personally prefer ICE ECC [3] although it's closed source so may not be a good solution long term Nil Einne (talk) 13:04, 4 September 2010 (UTC)[reply]
For such a specific question, I think the best answer to your question is going to actually come from experimentation. Try compressing 1000 files, using two different block sizes, then use a hex editor to overwrite part of each file with a bunch of random digits, identically, then see what happens when you try to decompress. The experiment won't take long. Comet Tuttle (talk) 15:37, 3 September 2010 (UTC)[reply]
I did a few experiments and lowering the block size drastically improves recovery. I also discovered there is very little difference in compression size between full solid mode and 16mb block mode, so obviously 16mb blocks is best the way to go. Thanks! 82.44.55.25 (talk) 18:38, 3 September 2010 (UTC)[reply]

Domain Names

Is it possible to find all the domain names that a given company have registered? Thanks Mo ainm~Talk 20:23, 2 September 2010 (UTC)[reply]

You could use this Reverse Whois which searches by owner name, but it's not free. It does give you an idea of how many domains *might* be owned by your search parameters (before you have to pay), but there's no real way of being sure that a company is using the same name for all it's domains, sub domains might be registered to smaller sister-companies or there might even be simple things like spelling errors in the owner name when it was registered. Also it wouldn't work with any domains that are using a domain privacy service to cloak the Whois information as it would literally point to the cloaking service with a reference code and wouldn't contain the company name.  ZX81  talk 20:59, 2 September 2010 (UTC)[reply]

e-mail account hijacked

My wife had her Yahoo e-mail account hijacked today. Apparently everybody in her address book (except me) got a message saying she had been robbed and was stranded in London airport and could you please wire £1500 immediately. As soon as she was able she went in and changed the password and security questions in her account.

This doesn't appear to be e-mail spoofing; one friend wrote back and asked the perpetrator for the names of two dogs. In the response one answer was actually right (our daughter's dog, dead for three years).

The question is: what happened? Did someone actually get into the account? She said some profile fields were changed. If so, how could that have happened? Did they get the password? Also, having changed the password, how safe is she now? Thanks, --Halcatalyst (talk) 22:31, 2 September 2010 (UTC)[reply]

Some possible reasons are:
  • she used the same password for something else, or the password was something too obvious (the name of her kid, or dog, or favourite band)
  • her password was too poor, and a bulk script (probably running on a botnet) guessed it
  • she left herself logged in on a public machine (e.g. at the library)
  • her normal machine is compromised by malware
  • she logged in on another machine (web cafe, library) which was compromised by malware
  • she used an insecure login method (yahoo! mail does login by default over ssl, so that'd be an odd reason) over a public wireless network (e.g. at a cafe)
  • she donated, lost, or had stolen a computer, pda, phone, or backup, and someone recovered the password from it (this is quite possible, but in practice fairly unlikely)
  • she got a crooked email, or visited a crooked website, which directed her to a site constructed to closely mimic Yahoo! Mail, but that was in fact the spammers'.
They probably know the name of the dog because they searched the email account for "dog" when interrogated.
Sensible things to do:
  • have a genuinely secure password
  • don't use the same password for multiple things (except for trivial things that you don't care about, and definitely don't use the trivial-things password for something important like shopping, banking, or email)
  • just don't type your password into a public machine at all, or into any machine you don't absolutely trust. If you need to be mobile, setup a phone or laptop to check email, and use that.
  • make sure you use SSL for login
  • keep your own computers properly maintained, with up-to-date and effective anti-virus and anti-malware software. Practice caution when installing software. Don't allow incompetent people or those with poor judgement the ability to administer the same machine you use for work, banking, or an email account that you've registered with anything important (if they control the email, crooks can have shopping or banking sites reset your password, which is emailed to them, so they've leveraged email access into something more valuable).
-- Finlay McWalterTalk 23:07, 2 September 2010 (UTC)[reply]
Another wise thing: only visit an important site like email or banking from a URL you typed in yourself, or from a link you've stored on your own computer (e.g a bookmark or a desktop shortcut). Never click on a link on some site that purports to take you to Yahoo!Mail, in case it's a malicious spoof instead. -- Finlay McWalterTalk 23:24, 2 September 2010 (UTC)[reply]
And (just to scare you more) they might have done something like this (all with a script, all very fast, trying many many options):
  • get access to the email account (by some method above)
  • search the email account for mails from financial institutions (FIs) - banking, pensions, stocks, investments
  • from these, visit the FI's website and try to login with the password they know. If that fails, do a password-reminder
  • the FI emails the Yahoo! account the reminder or temp-password, which they use to login. Only the security questions are stopping them now: how good are her answers? Is her pet's name given as "Fido" or "h!fP9+3J>Q7"? If they have access to the email account, they can search it for clues (pets, kids, favourite places)
  • transfer monies away
  • delete the password reminder email(s) to cover their tracks a bit (even a few hours will be enough for them to forward the stolen money on through a maze of compromised or untraceable accounts).
-- Finlay McWalterTalk 23:18, 2 September 2010 (UTC)[reply]
While I'm not denying the importance of keeping your email secure, if your bank has a reset password by email option, I suggest you get a new bank before doing any of the above Nil Einne (talk) 15:52, 6 September 2010 (UTC)[reply]
She may also have somehow visited a "phishing website" that appeared to be a Yahoo login screen, but was REALLY just a false front that sent her password to the scammers. (It may have actually forwarded her to the real Yahoo website so she wouldn't notice anything was wrong.)APL (talk) 02:24, 3 September 2010 (UTC)[reply]


September 3

Idiotic and Useless Emails

Why I keep on getting more and more foolish messages like proposals to get quick money (100000 $) ! etc. from a bank etc. who account holder is dead or other bullshit like that. Who is behind all this and what they gain by wasting people's time ?  Jon Ascton  (talk) 01:11, 3 September 2010 (UTC)[reply]

Have you ever heard of a phishing trip? (Now that I read that joke a couple times, it sounds really corny...) Essentially, some slob sitting in a smelly apartment somewhere is hoping you're dumb enough to hand over your most sensitive financial information. Then, they can then use it to ring up something expensive and/or illegal, or sell it to someone else who will end up doing that anyway for thousands of dollars. Of course you wouldn't hand over your credit card number for no good reason, so they cook up all sorts of crazy schemes to dupe you. Most often I hear about the Nigerian prince scam that asks you to wire money to a sketchy Nigerian "prince" so he can send you a ridiculous amount of money in return. Other suspicious e-mails include: you have won a lottery you never entered, and the company needs your bank details so they can send you the winnings; the legitimate-looking e-mail from your bank telling you that you have to change your bank website password for some reason; or there is some rich foreigner who died in a plane crash with no will or family, and you have been chosen to receive his fortune. Ignore them. It's a huge business, and many people are suckered in. You can protect yourself by just deleting them, and remembering that there is no such thing as free money. Xenon54 (talk) 02:14, 3 September 2010 (UTC)[reply]
Or set up a filter that puts mail with words like 'free money' into junk.Sir Stupidity (talk) 03:22, 3 September 2010 (UTC)[reply]
There are several of these scams out there and people fall for them every day. I read an article a couple years ago about a woman who kept giving more and more money away to someone on the net in the hopes of an eventual pay off. If I remember correctly, she gave the scammer something like US$14,000. Dismas|(talk) 04:38, 3 September 2010 (UTC)[reply]
There was an elaborate scam attempt on me the other day. I offered a cellphone for sale online in South Africa, and this person claiming to be on holiday in London wanted me to post the cellphone to his son working in an oilfield in Nigeria. Just the mention of Nigeria set off an alarm bell and I refused to give him my banking details... he even offered way more money than I was asking. Obviously this sounded too good to be true so I told him to transfer into my paypal account. Soon after I got a very authentic looking email from "paypal" but first of all, my paypal status wasn't updated and after looking at the email more carefully, I noticed the odd spelling mistake and the wrong email account being used. It was also sent by someone@gmail on behalf of services@paypal. I reported it to paypal who said they would investigate. I can imagine some derelict warehouse in Nigeria receiving thousands of free items a day and the police there just turning a blind eye. Just be careful people... even worse than material theft is identity theft... it can wreck your life. Sandman30s (talk) 06:00, 3 September 2010 (UTC)[reply]
The basics of the scam have already been clearly outlined. The scammers work on a model that expects a tiny fraction of people that fall for it - The vast majority of people will simply delete the email. However, as in the case mentioned by Dismas - when the phishers do get a 'bite' they can be in for a significant prize. If it really does annoy you, there are a number of sites set-up that give advice to people about trolling the scammers, and they also publish transcripts of the trolling communications (some can be quite funny). If you do go down that route though, be careful not to give the scammers any personal information that could be used to steal your ID Darigan (talk) 11:23, 3 September 2010 (UTC)[reply]
So why do you keep getting these foolish emails, while I haven't received any spam in months? Because I don't go spreading the email addresses I really care about all over the internet. I tell friends and relatives my real email address, I use several webmail accounts for signing up to site memberships and shopping (places that might sell my address onto a third party), and I use other webmail accounts for very occasional 'dodgy' dealings with places that will definitely sell my address onto a third party. Also, I never reply to any spam, even to request they 'unsubscribe' me. The net result is that the spam ends up in an account I only visit once or twice in 6 months, and my real address gets no spam. Astronaut (talk) 11:39, 3 September 2010 (UTC)[reply]
It's really important never, ever, to reply to spam. There is a possibility that a spammer receiving any sort of reply could make him notice that the e-mail address is live, which encourages him to send even more spam to it. Because of a similar reason, the e-mail client I use (Evolution) by default does not automatically download images in HTML e-mails. If it did, the spammer's HTTP server would register a connection from my IP address, confirming that the spam was received by a live person. So Evolution is clever enough to prevent that. JIP | Talk 19:16, 3 September 2010 (UTC)[reply]
I know the 'never respond' advice is often given. but has this ever been confirmed to (still) be true? If you have a botnet capable of sending mail to a 100 million email addresses, is a spammer actually bothering to send his second spam run to only a fraction of those? Unilynx (talk) 10:03, 4 September 2010 (UTC)[reply]

I find I receive junk e-mails with nonsensical contents and subject lines, with an attached image. I've never opened one of the images, but I wonder what this is about. --rossb (talk) 19:32, 4 September 2010 (UTC)[reply]

Is the image attached, or just embedded? If it's just linked to you can be sure that they're doing it to test for valid email addresses. (As soon as your mail client sends a request to the server the image is on, they know the email went through.)
If it's actually attached, it may not be an image. Sometimes you see files named things like
"NakedGirls.jpg                                                            .exe"
If it's attached, and if it's legitimately an image file, then I'm mystified. I don't think I've ever gotten one of those. APL (talk) 00:06, 5 September 2010 (UTC)[reply]
It may well be an attempt to get around Bayesian spam filters. The image can contain a picture of the word "Viagra" (as well as the name of their website) without tripping any filter conditions. Marnanel (talk) 15:18, 5 September 2010 (UTC)[reply]

One time I was in a mood to click a link that promised free iPhone. iPhone was indeed free, but to qualify for it web site required to sign up for number of "promotions", like half a dozen out of forty available, and each of them was non free, requiring products purchase or payments for services. Since I obviously did not trusted the site, I haven't purchase anything, but I clicked couple links that I found interesting (one was Disneyland something, important for later developments). And at the beginning I filled the form with my real address in it(but phone number thanx god was fake, duh! should have gave them local police station number!). Next thing a couple months or so later I received backpack full of toys, addressed - opps had to go, finish later. 70.52.186.74 (talk) 00:06, 5 September 2010 (UTC)[reply]

Addressed "TO: Mynamehere's child" A small backpack itself and toys looked very cheap, but were delivered to my address. Then a letters start coming into my mail, with requirements to pay for it. Sum was not big, less then $50, forty something. And letters looked scary - basically they were saying, you owe us for service/goods provided, please make a payment or call number to pay with credit card etc. And I got something from them! And it was smart on their side, backpack arrived long time I visited a site, and how many people would remember what they were doing online and exact wording of what they signed up for couple month ago while they were browsing online bored? I was even considered myself to make a payment (now it sound silly, but then, when I was reading letters - it just looked like it is better to pay rather then get into some kind of trouble). Anyway I did not paid a cent and, afraid, backpack ended up in the garbage bin, since I had no use for it. What amazes me, is that those truly random website phishers did invested some real money into products (cheap one, but anyway), and bothered themselves with not only electronic phishing. And I bet, if I would provide them with my real phone number, I would have get some automatic system calling my cellphone every other day to remind about payment and such. And in case I have paid them, they could have sent me another gift "worth" $200+. Hope you like this story. 70.52.186.74 (talk) 02:18, 5 September 2010 (UTC)[reply]

data corruption

Resolved

Is there a way to simulate data corruption on a file? Like a special program that can corrupt a file to varying levels so you can test how much the data is retrievable? 82.44.55.25 (talk) 09:47, 3 September 2010 (UTC)[reply]

A hex editor may be the simplest to use for your basic tests. If you want to be systematic, a simple program should be easy to write; you just have to define "corruption". For example, consider three different kinds of failures:
  • "zero out 1 byte at 1024 uniformly-distributed random locations in the file"
  • "zero out 1024 bytes, starting at file-offset 100,000."
  • "zero out every 8th byte, starting at file-offset 0, and ending at file-offset 8192"
  • "xor 1024 bytes in the file using the same bitmask."
These all corrupt the same number of bytes in file, but each simulate a different kind of failure-mode. Unless you know how your files might get corrupted, it's difficult to simulate (or to design a good strategy for recovery). Consider reading our error detection and correction article. Nimur (talk) 18:06, 3 September 2010 (UTC)[reply]

Thanks! 82.44.55.25 (talk) 18:35, 3 September 2010 (UTC)[reply]

Parchive

I've read the Parchive article but I don't understand how it works. It makes indexes of file hashes which can be used to repair files? How exactly is that done? What level of damage can the file be before the Parchive can't fix it? 82.44.55.25 (talk) 09:56, 3 September 2010 (UTC)[reply]

It uses a parity bit system. Parity relies on xor which is a bit operation. Just like addition is 1+1=2 and represented by a +, xor is a bit operator and is often represented with a , or a ^ in some programming languages. Xor is "one or the other but not both." So 0⊕0=0, 1⊕0=1, 0⊕1=1, 1⊕1=0.
If you're storing something, let's say a string of 1's and 0's (1100 0010). You can split it up into two blocks, then compute a third block, a parity block. So you then store 1100, 0010, and 1110 (the last one is your parity block). Now if any one block gets clobbered somehow, you can figure out what it was using the remaining blocks. If two or more get clobbered, you're out of luck.
This is the general idea. It can be expanded, applied to millions of strings like that, etc. That's how parity systems work. You might find RAID-5 interesting, it works on the same principal. Shadowjams (talk) 23:20, 3 September 2010 (UTC)[reply]
I want to point out that my explanation isn't exactly how parchive works either. It uses Reed Solomon codes which entail more detail. [4] That is the original paper that the theory's based on. But the general idea is still the same. Shadowjams (talk) 23:36, 3 September 2010 (UTC)[reply]
The general concept is called an erasure code. 67.122.211.178 (talk) 01:01, 6 September 2010 (UTC)[reply]

Webpage to PDF

Is there anything that can easily turn a webpage into a PDF? I have seen the the Firefox add-on 'PDF Download' but it is tagged as Adware, does the conversion online, and has had bad recent reviews. Thanks 92.15.11.118 (talk) 10:17, 3 September 2010 (UTC)[reply]

My Firefox allows me to print (File -> Print) to a file, and I can select PDF as the output file. Does this suit you? --Ouro (blah blah) 11:13, 3 September 2010 (UTC)[reply]
My computer (WinXP) does not offer that unfortunately. 92.15.11.197 (talk) 14:04, 3 September 2010 (UTC)[reply]
If you want something that can do it in batch (for example to snapshot a website regularly) wkhtmltopdf works well.-- Q Chris (talk) 11:23, 3 September 2010 (UTC)[reply]
That looks interesting but as Windows has deskilled me so that I only understand clicking something, I do not know how to set it up or run it. 92.15.11.197 (talk) 14:08, 3 September 2010 (UTC)[reply]
For this purpose, I installed CutePDF Writer, which does the same thing that Ouro above describes on my Windows XP system. Comet Tuttle (talk) 14:56, 3 September 2010 (UTC)[reply]
In an unexpected turn of events, I cannot check how it works, no Linux version. Sidenote, I wonder why FF for Win does not give the option to print to a PDF file. Hope Comet's solution works out for you. --Ouro (blah blah) 16:23, 3 September 2010 (UTC)[reply]
"print to file" is part of the standard desktop printing architecture in many desktop Linux distributions. It works just the same as the pseudo-printer that CutePDF installs. It's available to any desktop program that's aware of printing (strictly I think there's one plugin for Gnome and a different one for KDE, but they work much the same); they're mostly a layer built on Ghostscript. Non-gui programs have to call Ghostscript themselves to do the same job. -- Finlay McWalterTalk 16:33, 3 September 2010 (UTC)[reply]
Could be. Has to be out of the box, this install is fresh (done last week) and almost nothing had been modified because I didn't have the time to do it. On Ghostscript, I remember yeaaaaaars ago (in the days of W98SE) I had to install Ghostscript to do... a lot, print to files too I think... Thanks. --Ouro (blah blah) 16:39, 3 September 2010 (UTC)[reply]
I use PDFmyURL. It does exactly what it says on the tin - type your URL into the box and it provides a PDF to download. It does add a logo to the PDFs though. Equisetum (talk | email | contributions) 17:15, 3 September 2010 (UTC)[reply]
Quite a silly thing to do. If you merely want to archive a web page into a single file, use Mozilla Archive format (for Firefox, Internet Explorer has its own built-in which does the same thing). ¦ Reisio (talk) 02:09, 5 September 2010 (UTC)[reply]
Your assumption is wrong. Thanks for the gratuitous put-down. In any case I tried that in the past, then uninstalled it because it wasnt very good. 92.15.30.74 (talk) 12:56, 5 September 2010 (UTC)[reply]
It was a charity — any other thing you might be wanting to do other than merely archiving a web page to a single file... would be even sillier (using PDF). ¦ Reisio (talk) 19:09, 6 September 2010 (UTC)[reply]
If you're running OS X, the Print function (File --> Print) has a feature that does exactly this - in the Print window of Safari (or Firefox) there will be a 'PDF' button in the lower-right. Select it, and then "Save as PDF". Rishi.bedi (talk) 18:02, 8 September 2010 (UTC)[reply]

a/b drives

why do my computer does'nt have a, b drives —Preceding unsigned comment added by Shantanuca (talkcontribs) 10:43, 3 September 2010 (UTC)[reply]

These are usually assigned to floppy drives. If your computer doesn't have a floppy drive, then those drive letters won't be shown 82.44.55.25 (talk) 10:57, 3 September 2010 (UTC)[reply]
See Drive letter assignment. It's sad that people are already forgetting floppy disks; it makes me feel old. In any case, what happens if you have more drives than letters to assign? Do you start getting drives AA, AB, etc., or does the computer just not let you do it. Buddy431 (talk) 13:28, 3 September 2010 (UTC)[reply]
I asked a question about that a while ago, Wikipedia:Reference_desk/Archives/Computing/2010_May_2#Drive_letters 82.44.55.25 (talk) 13:42, 3 September 2010 (UTC)[reply]
That's interesting, thanks. Buddy431 (talk) 01:17, 4 September 2010 (UTC)[reply]
FWIW, MS-DOS v2 (released in 1983, and I now feel old) certainly used to let you go on beyond Z, so the next drive would be [:, and so on through the ASCII set. I don't know when this was removed. Marnanel (talk) 14:58, 5 September 2010 (UTC)[reply]

Javascript time

I want to write a greasemonkey script that will popup an alert box at a certain time, say 6pm. Sort of like an alarm clock. In javascript, is there a way to make a function execute at a set time? 82.44.55.25 (talk) 11:08, 3 September 2010 (UTC)[reply]

The window.setTimeout function will launch a function after a specified number of milliseconds. Calculate the number of milliseconds between now and 6pm. Then, use that number of milliseconds as the offset for setTimeout. -- kainaw 12:43, 3 September 2010 (UTC)[reply]

Cell Phone and Lap top

I am thinking about purchasing a cell phone and contract that will allow me about 800 anytime minutes free on weekends and evenings. (perhaps a variation, free incoming) I also want to be able to retrieve email and brouse Web. I can get such a plan for about 60.00 a month. I would then like to cancel my home internet and home phone. I only want to do this if I can plug in the new phone to my lap top and be able to read my email on the lap top and to hopefully write emails on the lap top that will be sent back through my cell phone. DOES ANYONE KNOW IF THIS IS POSSIBLE. ANY ADVICE IS APPRECIATED. I AM GOING OUT TO DO SOME HANDS ON TESTING BUT HAVE NO IDEA WHAT WOULD BE THE BEST PLAN OR PHONE. I DO SEEM TO FAVOUR THE SLIDE KEY BOARD FOR TYPING TEXTS. A bigger phone screen would also be helpful for reading texts etc. —Preceding unsigned comment added by 99.199.47.107 (talk) 17:06, 3 September 2010 (UTC)[reply]

Where are you? Your IP address suggests you're in Canada. -- Finlay McWalterTalk 17:21, 3 September 2010 (UTC)[reply]
What you're wanting to do is called tethering. Most smart phones can do it in some way or another. You will want to check with your mobile provider to see what options they offer for mobile broadband tethering. Most mobile broadband plans are designed with the idea that access is solely through your phone. Thus, most providers charge extra for this service. Also, keep in mind that mobile broadband plans are usually more restrictive in terms of bandwidth and data caps. If you're just utilizing the Internet for email, you shouldn't have a problem. However, if you're wanting bandwidth intensive applications (video, gaming, etc.) you are going to see poor performance compared with wired Internet access. --—Mitaphane Contribs | Talk 18:31, 3 September 2010 (UTC)[reply]

Methods for multiple classes

I'm trying to write a math thing in Java where there is a fraction class, a radical class, a polynomial class, and so on. When defining multiplication for fractions, I would multiply the numerator and the denominator, but there could be many things in the numerator, like an polynomial or a radical or something. First, how would i declare the class of the numerator, and second, could i write something saying "call the multiply method of whichever class this belongs to"? KyuubiSeal (talk) 21:44, 3 September 2010 (UTC)[reply]

There are several ways you can do this. Off the top of my head:
  1. You just have each type of math thingy implement multiply functions for all the things it's meaningful to multiply it by. Java's polymorphism mechanism will call the right one. So your Complex class might have a multiplyBy(Integer) method, a multiplyBy(Complex) method and so forth. This is the straightforward way to go - a (probably minor) downside is that if you add a new kind of math thingy you need to alter all the things it can multiply by so that they know about it, and you have to do that at compile time.
  2. If you needed extensibility beyond that, you can dispatch calls through a dynamic registry you maintain. That way you can add (even at runtime) new math thingies, but the code gets rather complex. Have all these math thingies be concrete implementations of an abstract base class (lets say MathThingy). MathThingy has a multiply(MathThingy A, MathThingy B) method. This is final. When this is called, it uses getClass on its arguments, looks them up in a little registry, and calls specific methods in the concrete subclasses. The registry is filled by the class constructors of each MathThingy as they're classloaded - so the Complex class registers handler methods that say they can handle intXcomplex, complexXint and complexXcomplex. This is very flexible - you can even add new operators (at a logical level; java doesn't allow you to overload or define actual java syntax operators). But a major downside (aside from the complexity) is that type errors become runtime errors rather than compile time ones (so you don't get a problem saying you can't raise a complex number to the power of a matrix until you run the program).
-- Finlay McWalterTalk 22:08, 3 September 2010 (UTC)[reply]

I get the first part about the polymorphism already, but I suppose I should rephrase my question. If I have a Fraction class, it would have an attribute numerator, right? How could I make the numerator an instance of the Polynomial or Radical or BigInteger class? And when it is, is there a way I could say numerator.multiply(5), and have it call the correct class's multiply(int)? Also, how is there no operator overloading, but "a"+"b" will give "ab"? Is that just a special case? KyuubiSeal (talk) 23:07, 3 September 2010 (UTC)[reply]

In your example, you need "Polynomial or Radical or BigInteger" or "..." to satisfy either option:
  • implements a common interface, like "Multipliable", or
  • extends a common parent class, like "MathematicalExpression"
The first way uses a Java interface, and you can follow this tutorial to learn how to use it. The second method uses inheritance - follow this tutorial to learn how to use it. The two methods are subtly different. Now, you can specify your numerator to be a "Multipliable" or a "MathematicalExpression" - and any class that either implements that interface (or extends that parent-class) is acceptable to use as a Numerator. Then, when you call a multiply() method, it will use the implementation of that method for the actual runtime type of the object. Nimur (talk) 23:33, 3 September 2010 (UTC)[reply]
Lastly, your question about Strings: these are "special things" in Java. Consider them a "special case" - they are true objects, but they are the only objects in Java that permit Operator Overloading (and this is the cause of much debate and brouhaha - but was part of the language design). Note that the language explicitly specifies this syntax - and it is not actually "operator overloading," it is special shorthand Java syntax for a new String constructor. This is to make the language "easy to use" for text processing, while staying true to certain "Java commandments" about object-oriented design. (And, take it from a seasoned programmer: you do not want operator overloading. You think you want operator overloading, but that is because you don't have it and haven't seen how horrible it is). Nimur (talk) 23:40, 3 September 2010 (UTC)[reply]
(we're rat-holing here, so I won't belabour this too much) when people say they "do not want operator overloading" I've found they mostly mean the brain-damaged operator overloading that C++ inflicts on innocent minds. Haskell's operator definition (I won't insult it by calling it overloading) lets you define type, arity, priority, and fixity (and actually deigns to let me define any operator I want, like foo or ⊕ or !!!) and combined with Haskell's non-shit type system makes for operator definition to work the way you'd sanely want it to. Sorry for the digression, as KyuubiSeal is working in an environment without such luxuries. -- Finlay McWalterTalk 01:12, 4 September 2010 (UTC)[reply]
So if I have a variable of class A (or interface B), any subclass of A (or something implementing B) can be assigned to it? This means anything can be assigned to an Object, right? And would there be any casting involved? (That's probably not too difficult to handle though) KyuubiSeal (talk) 23:55, 3 September 2010 (UTC)[reply]
Yes, you can assign an object of a subclass to a reference of any of its superclasses. And the system remembers what type it really is - so if you later upcast it (Java will make you handle a ClassCastException in this case) it's still of the same type you defined it as. The java instanceof is your friend here - you can say "is X an instance of A, or is it an instance of B, or not", and act accordingly. -- Finlay McWalterTalk 00:57, 4 September 2010 (UTC)[reply]

Okay, it's working now. Thank you so much! KyuubiSeal (talk) 01:09, 4 September 2010 (UTC)[reply]

Terminal window of safari

Where can I find the terminal window of Safari 5.0.1? I want to do some tweaking.Thanks--180.234.39.169 (talk) 23:22, 3 September 2010 (UTC)[reply]

Safari does not have a terminal; are you sure you don't mean either the operating system's terminal or the Safari Snippet Editor or Error Console ? Nimur (talk) 23:26, 3 September 2010 (UTC)[reply]
If you mean your operating system's "terminal" window, try to navigate to /Applications/Utilities and double-click on Terminal. If you still can't find it, see this.--Mithrandir (Talk!) (Opus Operis) 07:31, 4 September 2010 (UTC)[reply]

September 4

Recovery of Deleted File on SD Card

Help!

   I accidentally deleted a .zip file from a Secure Digital card. The file is about 275KB in size, and was deleted before a backup could be made. In order to stop the deleted data from being overwritten, I have made the SD card read-only by using the write-protect switch. The SD card's filesystem is NTFS, and my operating-system is Microsoft Windows 7 Professional Edition. I need to recover the deleted file ASAP - is there any free software or freeware I can use to recover my deleted file?

   Any and all help is appreciated, and thank you to everyone.

I don't know offhand what the windows software is but there is Linux software to do the same thing. There are Live Discs that do the same thing. It's likely your file's recoverable. Write protecting it is the right idea. I'm sure others will know of some windows software. Shadowjams (talk) 07:13, 4 September 2010 (UTC)[reply]
PhotoRec and Recuva both come highly recommended and can undelete basically anything as long as it hasn't been over-written. Good luck! Zunaid 07:17, 4 September 2010 (UTC)[reply]

What is the cellular 3G base station price range?

If someone want to cover around 5,000 km2 with 3G coverage - what amount of investment into cellular hardware he will be looking at? Assuming wired data network is already exist and installation costs for towers are out of scope of this question(and spectrum licenses out of scope too). One million users inside 5.000 km2. Basically, how much one base station roughly cost and how big would be the cell it will cover? Was trying to search Google, but no luck so far. —Preceding unsigned comment added by 70.52.186.74 (talk) 07:31, 4 September 2010 (UTC)[reply]

I don't know about the cost, but the number of base stations would depend on the specific mobile technology and frequency used, the local geography and the amount of bandwidth required. The table in this article suggests a CDMA-2000 network operating at 1800 MHz has cells 14 km in radius (each covering an area of ~600 km2). However, considering how close the mobile masts are in my area of the UK, I think that might be an idealised radius. Indeed, OFCOM's Mobile phone base station database indicates that a city of 100,000 people has well over 50 base stations and a city the size of Manchester has nearly a 1,000 base stations. Astronaut (talk) 08:46, 4 September 2010 (UTC)[reply]
Thank you! You actually shifted my keywords selection toward right direction and I found an article that mention number of base stations to cover Germany: they have more than 20.000 GSM base station covering 99% of the population and 13.000 UMTS base stations covering 80% of the population. That is perfect for my purposes. Still wondering about rough price estimation that cellular companies pay for base stations(preferably 3G)... 70.52.186.74 (talk) 11:15, 4 September 2010 (UTC)[reply]
Some more searches - and I found an answer! Thanks a bunch! If not you, I would still be wondering. I also think that number of base stations for Manchester is that high because there is different cell companies operate there while some stations are shares, most are not or support different types of network(like GSM vs CDMA and such). And another interesting number - total base station in UK is ~53 000... 70.52.186.74 (talk) 11:39, 4 September 2010 (UTC)[reply]
AFAIK all mobile phone networks in the UK use GSM or it's 3G decendents (UMTS etc) Nil Einne (talk) 13:00, 4 September 2010 (UTC)[reply]
The numbers I mentioned above are from a database that is aimed at people concerned about radiation exposure from mobile comms. Therefore it lists the number of masts in an area and lets you see the frequency, signal strength and company/companies on each mast (interesting because I found out why there is a dead spot round my sister's house :-) If only one operator is in an area of flat geography, then maybe fewer masts will be required, but you would still need sufficient capacity to support the bandwidth your 1 million population might use. Astronaut (talk) 23:47, 4 September 2010 (UTC)[reply]

Scanning over the network

The charity where I volunteer recently bought a new printer/copier/fax/scanner (a Xerox Workcenter 4118). It has a builtin network card which is connected to the rest of the network using a standard ethernet cable, and a standard telephone connection is used so faxes can be sent and received. However, reading the user manual it seems the scanner function can only be used if it is connected a USB or parallel cable. Is there a way to get scanning to work across the network using any PC on the network, perhaps using a third-party piece of software? Being an underfunded charity, there is a strong preference for a low price, or better still, free solution. Thanks. Astronaut (talk) 08:12, 4 September 2010 (UTC)[reply]

Go to Start --> Control Panel --> Scanners and Cameras --> Add Device --> Xerox --> Next. Then, right-click on the scanner and choose Properties --> Xerox Settings --> Add and then enter the IP address of the scanner. After scanning, double-click on the scanner, and WIA should reveal any scanned documents.--Best Dog Ever (talk) 08:24, 4 September 2010 (UTC)[reply]
Thanks, I'll try that. How can I verify whether the Xerox machin supports WIA? And will I need to install the TWAIN scan driver, or does WIA replace that functionality? Astronaut (talk) 08:52, 4 September 2010 (UTC)[reply]
Not a problem. WIA is a replacement for TWAIN. TWAIN gives you more control over the scanner, but always requires the installation of software from the manufacturer to function. TWAIN is also more tempermental. So, I always use WIA, simply because it's easier to set up. By the way, if the generic Xerox driver mentioned above doesn't work, click the "Have disk" button instead of "Next" and then point it to drivers on any disks that came with the scanner.--Best Dog Ever (talk) 09:04, 4 September 2010 (UTC)[reply]
I also work for a charity with a Xerox scanner/printer :-). In the case of our printer, the scanner does not work unless you pay a Xerox agent to enable it. At that point it will scan to a network - usually to a drive on the server. --Phil Holmes (talk) 11:19, 4 September 2010 (UTC)[reply]
Check the documentation at http://www.office.xerox.com/support/dctips/dctips.html. Looks like you need to run [[Internet Information Services|IIS]. ---— Gadget850 (Ed) talk 11:35, 4 September 2010 (UTC)[reply]

Extracting a date from a serial number in MS Excel

The number is in the form YYMMDDXXXXXXX. How do I extract the first 6 digits and reformat into an actual date? Roger (talk) 18:08, 4 September 2010 (UTC)[reply]

You can use LEFT(...,6) to extract the first six characters from an input string. You can similarly use MID(...) to extract any substring. Use these to extract the 2-character year, month, and date; and then feed them into one of the date and time functions to produce a date in the form of your choice (as a numeric value, or as a formatted string, or as a DATE object, and so on.
=CONCATENATE(MID($A$1, 3,2), "/", MID($A$1, 5,2), "/" MID($A$1, 1,2)) 
... might do the trick for you (where $A$1 is the source cell). Nimur (talk) 18:35, 4 September 2010 (UTC)[reply]
Perfect solution! Thanks. Roger (talk) 19:15, 4 September 2010 (UTC)[reply]
Just wanted to add a thanks from my side, I was thinking about this exact problem just earlier this week. I needed to extract dates of birth from I.D. numbers in our membership database. Thanks! Zunaid 08:31, 5 September 2010 (UTC)[reply]
This assumes the US-style mm/dd/yy format for the date and could go horribly wrong if the user's regional settings have dd/mm/yy. A more culture-independent version is =DATE(LEFT(A1,2)+2000, MID(A1,3,2), MID(A1,5,2)). If the date could be earlier than 2000 then the first parameter should be something like LEFT(A1,2)+ IF(VALUE(LEFT(A1,2))>50,1900,2000). AndrewWTaylor (talk) 11:01, 5 September 2010 (UTC)[reply]

September 5

Disk Defragmenter leaves lots of fragments.

I have just loaded and used 'Defraggler' from Piriform and it appears to leave literally hundreds of fragments and many fragmented files. But it gives no explanation. I then downloaded a trial copy of PerfectDisk 2000 which had great reviews. When I used that it also left loads of fragments and fragmented files but it labelled them as "excluded" as though it was not going to include them in the defrag process. Any ideas what is happening here please? Gurumaister (talk) 15:58, 5 September 2010 (UTC)[reply]

Some system files can't be moved and therefore can't be defragmented. I believe the same goes for any files which are in use be other programs. 82.44.55.25 (talk) 16:19, 5 September 2010 (UTC)[reply]

Thank you. doesn't that mean though that they also can't get fragmented in the first place? And could it account for over a hundred files and about three hundred counted fragments? Gurumaister (talk) 16:49, 5 September 2010 (UTC)[reply]

It's probably talking about the page file. What does the Windows defragmenter tell you when you click "Analyze" and then "View report"? (You can get to it by going to Start --> All Programs --> Accessories --> System Tools). I'm interested in (1) total fragmentation, (2) file fragmentation, and (3) pagefile fragmentation. Also, what is the free space percentage? The most important statistic in answering your question is the pagefile fragmentation. You can try using a program like PageDefrag, but that will only work if you have enough free space.--Best Dog Ever (talk) 20:28, 5 September 2010 (UTC)[reply]
One possible reason for the excluded files is Windows' boot-time optimization. Recent versions of Windows will arrange the clusters of some system files sequentially on the disk in the order they're needed during boot, which fragments those files but actually improves performance. Defragmenting them would be a bad idea. Also, a typical hard drive sequential read speed is ~50MB/sec and a typical seek time is 0.01 sec, so if a file's average fragment size is substantially larger than ~0.5 MB (a 1 GB file in 100 fragments, for example) then it's hardly worth defragmenting it (with the exception of the page file). There's also little point defragmenting files that you hardly ever read, or that are read slowly (e.g. an MP3 or AVI file). I don't know whether the major defragmentation tools implement these kinds of heuristics, though. -- BenRG (talk) 20:53, 5 September 2010 (UTC)[reply]

Excel Programming

I have been instructed, as part of an assignment, to enter this code:

Private Sub Workbook_Open()
RetVal = Shell("C:\Program Files\Windows Media Player\mplayer2.exe C:\My Music\Electricity.mp3")
End Sub

into something called "VBA editor". What is this editor, and how would I go about entering this code? —Preceding unsigned comment added by T.M.M. Dowd (talkcontribs) 17:39, 5 September 2010 (UTC)[reply]

I reformatted your source code above for readability. VBA is "Visual Basic for Applications". In Excel 2003 and earlier, you can access the VBA editor from the menu Tools > Macro > Visual Basic Editor. In Excel 2007 and later, you can access it through the "Visual Basic" item under the "Developer" tab on the ribbon. Alt-F11 is a shortcut in both versions. Once in, you will need to create a new module (menu Insert > Module) into which you can paste the above code. You can then execute the code by clicking on the run icon (green arrow) or pressing F5. If you get a "file not found" error, it is likely that one of the files is located in a different directory that is listed in your source code. You will need to locate then and update your source. -- Tom N (tcncv) talk/contrib 18:27, 5 September 2010 (UTC)[reply]
Thank you very much for your help! It didn't actually work but I think it was almost there. My problem is, I am trying to get background music in excel 2003, which I have been trying to do for the best part of a month with no avail. --T.M.M. Dowd (talk) 18:40, 5 September 2010 (UTC)[reply]

date

I have around 3,000 files who's creation and modified dates are 2064 because that's what the system date was set to on my old computer. They're should be dated 2003. The month and day are correct however. How can I convert them all to the right date? 82.44.55.25 (talk) 17:58, 5 September 2010 (UTC)[reply]

If you're running any kind of Unix, the "touch" command does what you want. If you're not, tell us what you're running. Marnanel (talk) 18:00, 5 September 2010 (UTC)[reply]
Windows 7 82.44.55.25 (talk) 19:11, 5 September 2010 (UTC)[reply]
We also need to know the file system. By default, Windows 7 will use NTFS, so you can modify the create- and modified- times. You can use the xcopy program (part of modern Windows) to copy file contents without copying file create-dates, for NTFS file systems. But if you're using some other file system, this may be impossible. Nimur (talk) 20:21, 5 September 2010 (UTC)[reply]
Yes, it's NTFS. 82.44.55.25 (talk) 20:37, 5 September 2010 (UTC)[reply]
It makes no difference whether it's NTFS or FAT, since they have the same three date stamps and they are modifiable in the same way. -- BenRG (talk) 22:15, 5 September 2010 (UTC)[reply]
There are many versions of touch for Windows, but none that I've found support the --forward option that you'd need to change the year without also changing the rest of the time. Even with --forward you'd have to use different offsets for dates before and after February 29 because 2064 is a leap year while 2003 isn't. (Are you sure all of the dates are correct, incidentally?) Also, most ports of Unix touch don't let you set the creation time, and I imagine many of them will fail (in unpredictable ways) when faced with years after 2038. On the other hand, you could do this pretty easily with any half-decent programming language. Windows PowerShell is one possibility, but I haven't learned it yet. -- BenRG (talk) 22:15, 5 September 2010 (UTC)[reply]

Divx wrapped in AVI container

Supposedly my new phone can play divx videos "wrapped in AVI container." The video I want to play has .divx extension. Do I just need to change the extension to .AVI and that "wraps it in an AVI container?" Or is there more to it than that? The Hero of This Nation (talk) 20:25, 5 September 2010 (UTC)[reply]

Changing the extension to .avi won't change the Container format (digital). However, .divx files (DivX Media Format) are backwards compatible with .avi, and should play on your device. If the .divx file contains chapters or subtitles those won't work, but the main video and audio should. 82.44.55.25 (talk) 20:33, 5 September 2010 (UTC)[reply]

September 6

Is it safe to use an open wireless router (say, in a cafe)?

This document suggests to me that it's unsafe, but I just watched a Q&A session where professor Eben Moglen says that's biased by misinformation (12m14s through 13m) and an audience member agrees (13m42s through 14m).

Our wireless security article is too technical for me. Thanks. 160.39.220.66 (talk) 03:10, 6 September 2010 (UTC)[reply]