Computing desk
< December 9 << Nov | December | Jan >> December 11 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


December 10

Program oddity[edit]

I wrote this program to solve Project Euler 125. It seems to work perfectly, but the sum is off by 3. When I put the numbers in a list, however, ([1]), it outputs the correct answer. Why is the first sum off? Nadando (talk) 06:53, 10 December 2009 (UTC)[reply]

In case anyone is taking a stab at this, the problem is to Find the sum of all the numbers less than 108 that are both palindromic and can be written as the sum of consecutive squares.[2] decltype (talk) 09:10, 10 December 2009 (UTC)[reply]
In the first program there is sum += int(m) (line 36). It corresponds to second program's sum += g (line 37). The difference is that in first program you use int(m), which truncates floating number (i.e. from 1.999999 it makes 1 instead of 2 ...python doc). Apparently this happens total 3 times in the run of program as the difference between outputs is 3. I didnt looked so much into your code, but maybe use of round would fix the problem. Lukipuk (talk) 13:23, 10 December 2009 (UTC)[reply]

Getting the URL of a frame, pop-up, etc[edit]

I'm writing a brief guide for the computer-illiterate/impatient that very incidentally advises them that when they want to refer in their own written material to a particular web page, they should normally provide the URL of that specific web page.

Thanks to frames (incl. cloaking) and Javascript, this information is often hidden. If I have to look for it, I know how to do so within the source code. But I don't want to explain this stuff: most of my potential readers wouldn't want to read it. Instead, I want to say "In any of most good recent browsers, right click in the area that interests you; then choose 'view this frame only' or similar, and save the URL of the page that's of interest." (Yes, "Command-click" for a Mac with a single mouse button.)

However, I find that this doesn't work with MSIE (which I rarely get to use) or even Safari or Opera. I think that these are all covered by: "Right-click the link that leads to the page concerned and take the option to copy the 'link location', 'link address', or 'shortcut'. You should cite this URL"

But I'm not keen on this as it sounds convoluted. Is there a simpler or better alternative? Tama1988 (talk) 06:59, 10 December 2009 (UTC)[reply]

Right-click on the page (frame, popup etc.) and click Properties. There you can read the URL. --Andreas Rejbrand (talk) 15:22, 10 December 2009 (UTC)[reply]
Ah, I didn't think of looking for that. But thank you for the tip: now that I do look for it, I see that it's an option in MSIE but not in any other browser I tried. The good news is that those other browsers (Opera, Safari, Konqueror) have what I hadn't noticed, a "Frame" option title leading to a submenu in which there are options such as "Open frame in new tab". So I think what I need would be captured by In any of most recent browsers, right click (or if using a Mac with a single-button mouse, Control-click) in the area that interests you; then either choose either (a) 'view this frame only' or similar (perhaps a sub-option under "Frame") or (b) 'Properties', and save the URL of the page that's of interest. Though I probably need to break this long sentence into shorter and more digestible chunks. Tama1988 (talk) 05:31, 11 December 2009 (UTC)[reply]

Serial Mouse on Ubuntu[edit]

How do I get my Serial Mouse to work on Ubuntu? Thanks!--Elatanatari (talk) 07:18, 10 December 2009 (UTC)[reply]

Presumably you mean X windows, not ubuntu. Maybe this will help. Also take at a look at the gpm program which can translate mouse protocols. Ariel. (talk) 10:55, 10 December 2009 (UTC)[reply]

What's X windows? In any case, a new problem has emerged. When starting up Ubuntu, I get this message: "Install Problem! The configuration defaults for GNOME Power Manager have not been installed correctly. Please contact your computer administrator." I try to login in, then the screen goes black . . . --Elatanatari (talk) 02:24, 12 December 2009 (UTC)[reply]

Orconfig.h[edit]

Hey all, I have been trying to run a C project on Visual C. However, when I build it, it shows FATAL ERROR: config.h not found. I have already included the header file though. Kindly,help. —Preceding unsigned comment added by Books2491 (talk • contribs) 08:34, 10 December 2009 (UTC)[reply]

If the file resides in a different directory than the rest of your project, make sure you have added that directory to the list of include directories. This can be done in Project properties -> C/C++ -> Additional include directories (may vary based on which version of the IDE you're using), or with the /I flag if you are compiling from the command line. decltype (talk) 09:23, 10 December 2009 (UTC)[reply]
Did you did #include <config.h> or #include "config.h" - they are not the same. One looks in the system directories, the other in the local directory. Ariel. (talk) 10:56, 10 December 2009 (UTC)[reply]

Repairing Camstudio temp files[edit]

I use Camstudio to screencapture occasionally, and recently I've suffered a crash in the middle of a recording that I would like to recover. The Camstudio wepage: http://camstudio.org/faq.htm#Recover lead me to the temp file, which I copied, and now I'm trying to figure out how to repair it. It not huge (about 3 megs) but it's big enough, and I've tried a few different programs (DivXRepair just produces a blank progress report, i.e. does nothing, and AVI previewer doesn't think it's an AVI file), but have had no luck. If the page is to be believed, and there is actually a chance of saving the file, how might I progress? The codec I'm using is called Microsoft MPEG-4 Video Codec V2, and I have a feeling that may be one of the problems. I would use a more normal codec but I recently came into troubles recording at different sizes, so I just found one that worked.

Thanks in advance! 210.254.117.185 (talk) 14:06, 10 December 2009 (UTC)[reply]

VLC has an inbuilt video repair function which activates when you try and open a broken video in it, I've had success with it in the past. Chris Rocen (talk) 20:57, 10 December 2009 (UTC)[reply]
Yeah, I use VLC but it didn't work, unfortunately :'( 219.102.221.182 (talk) 00:55, 11 December 2009 (UTC)[reply]

Netbeans problem[edit]

I have written some coding in Netbeans relating to a GUI. Currently the first form requires you to input a name and sales amount, all this works fine when entered correctly. What I need to fix is when people enter no values for one/either input or a string for the sales amount. I've come up with the following coding that seems to restrict advancing to the next page in all the situations except when I enter a value for the sales amount but no name.

try {
  int ErrorChecker = Integer.parseInt(SalesFigureField);
}
catch(NumberFormatException nFE){
  System.out.println ("This is not a number");
}

if (Name.equals("")) {
  System.out.println("Nothing entered in Name Field");
}

So firstly how can I stop the next form from being linked to when no name is entered. Secondly how do I go about changing the System.out.println messages into an error/dialogue box displayed so the user knows what they have completed incorrectly. Also I need the form to recognise using numbers such as 17.99 with the decimal place in (if possible).

Many thanks in advance. --195.49.180.146 (talk) 14:11, 10 December 2009 (UTC)[reply]

(I reformatted your code and put it in a <source> tag.) First, if you just want to provoke an exception, you need not assign the result of the function to a variable (so you can dispense with ErrorChecker entirely). (You do need to assign if you're trying to provoke a ClassCastException: (GoodClass)mightReturnBadClass(); isn't a valid statement.) You seem to already be checking for the name to be the null string (not null!); you could also use tf.getText().length() to see how many characters are in it. If that's not working, provide more of your code for context and ask again. As far as making dialog boxes goes, the easiest thing for simple dialogs is the JOptionPane class. --Tardis (talk) 21:20, 10 December 2009 (UTC)[reply]

AppleMac "Address Book"[edit]

I regularly backup my address book when ever I make changes or additions to it. However I sometimes would like to look back at a saved version, but when I try to open it it always says that this will overwrite the existing Address Book. That I do not want to do. How can that be avoided, anybody know please? Thanks in anticipation.--88.109.243.127 (talk) 16:03, 10 December 2009 (UTC)[reply]

Any reason you don't just backup your current address book, then allow the program to override with the old one, get the info you need, then restore from the backup you just made? —ShadowRanger (talk|stalk) 21:16, 10 December 2009 (UTC)[reply]

No good reason at all, hadn't thought of that, thanks. But why does it seem necessary to do that, why cannot I just see the old Address Book without it having to overide the current one?--88.109.243.127 (talk) 07:56, 11 December 2009 (UTC)[reply]

Time Machine might help in future, although I haven't started using it yet so I'm not sure if it would help with Address Book. Brammers (talk) 10:50, 11 December 2009 (UTC)[reply]

Facebook privacy update[edit]

Following the (fairly unimpressive) Facebook privacy updates of the last day or so, am I right in thinking that it is now [U]impossible[/U] to edit which news-feed stories appear on your wall? For example, previously, I had it set that when I liked someone else's status, my profile wouldn't automatically say, "So-and-so likes P's status." All that seems to have gone now? Any help appreciated! ╟─TreasuryTagconsulate─╢ 16:29, 10 December 2009 (UTC)[reply]

As far as I know, the privacy updates didn't have anything to do with those settings, so I don't see why you can't. I haven't tried myself yet though. The privacy update was mainly to stop people from obtaining information through massive geographical networks, which was a long-standing issue on Facebook. 219.102.221.182 (talk) 00:35, 11 December 2009 (UTC)[reply]
The settings were under "/privacy&view=feed" or something, which doesn't seem to exist any more! ╟─TreasuryTagstannary parliament─╢ 07:03, 11 December 2009 (UTC)[reply]

Gateway/tigerdirect accidental warranty[edit]

Hi, I purchased a gateway laptop on tigerdirect and I got the accidental protection warranty. A friend had a similar warranty (from best buy) and when he was dumb enough to spill soda on it he got a new (and better) laptop for free.

Now, I'm naturally more careful with my expensive purchases, but let's say this purchase was on the verge of becoming obsolete, what kind of "accident" would be very likely to lead me to a similar outcome with little worry on my side. I don't have the exact text of the warranty at hand but will put it up later hopefully. Chris M. (talk) 17:06, 10 December 2009 (UTC)[reply]

You're asking us to help you commit fraud, so I won't help you, and hopefully nobody else on the Refdesk will, either. Comet Tuttle (talk) 18:23, 10 December 2009 (UTC)[reply]
Realistically it's a genuine question about what kind of coverage they have been known to cover, liquids, drops, electrical damage, screen damage. I'm not asking someone to help me commit fraud, I'm asking for someoen who has had experience with their warranties to let me know what accidents are covered. If you don't want to answer, then it's pretty easy to not post, you don't have to tell others not to help me with information either. I've seen people help others use piratebay/torrents on here, and while it's POSSIBLE this was for a non-illegal purpose, it's exceedingly unlikely. So please don't respond to this unless you intend to help me. Chris M. (talk) 19:31, 10 December 2009 (UTC)[reply]
If you've seen others on the Reference Desk help people use Pirate Bay and torrents, then that was an error on the part of the helper. In some cases, you'll see Reference Desk regulars answer questions about illegal activity, on the grounds that it may be legal where the poster is posting from — recently a poster asked for and received some advice about visiting a prostitute, which is apparently "not fully illegal" in Hong Kong, where the poster was allegedly visiting from — even this help is somewhat controversial at the Refdesk. But in your case, you're obviously asking for advice on how to best defraud Tiger Direct, which is illegal; and aiding and abetting this crime is also illegal. On a personal note, I think you should be ashamed anyway; this is stealing, and most would agree it's much worse than copying a music file via a torrent. Please don't try to use the Reference Desk for this purpose. Comet Tuttle (talk) 20:02, 10 December 2009 (UTC)[reply]
There are of course plenty of legal torrents and they are a very common means of distribution of large open source software nowadays and in some cases even closed source software. If the OP thinks anything to do with torrents is illegal, that says more about the OP then anything else. In terms of the PirateBay, while it's perhaps harder to WP:AGF , it's not impossible since there is some legitimate content on PirateBay and so that's ultimately up to the question answerer IMHO. However if someone came here asking for help downloading say Windows 7, you can be assured they would get no answer even if they later said it was a 'genuine question' about how to download stuff off Pirate Bay and/or use Torrents. In any case, from my experience many P2P related questions only tend to receive minimal help Nil Einne (talk) 20:42, 10 December 2009 (UTC)[reply]
"and" struck above accordingly, thanks. Comet Tuttle (talk) 20:47, 10 December 2009 (UTC)[reply]
I'm afraid no amount of AGF convinces me that the wording on the OP's part is incredibly suspicious. It is pretty obvious that the OP wishes to cause said "accident", not least because of the phrasing in the penultimate sentence. The intent is pretty obvious. Chris Rocen (talk) 20:55, 10 December 2009 (UTC)[reply]
See moral hazard. --Tardis (talk) 21:04, 10 December 2009 (UTC)[reply]
I don't see how that is related, anyway, I will boldly archive this if further discussion occurs related to the OP's post. Chris Rocen (talk) 21:14, 10 December 2009 (UTC)[reply]
It describes the condition that the OP is in: given that an accident will result in no loss (or even a net gain, since the technology continues to improve), the natural desire to protect one's "expensive purchases" is much impaired, and may even be inverted (in the less scrupulous). --Tardis (talk) 21:22, 10 December 2009 (UTC)[reply]
You're counting on the fact that your friend didn't just get lucky. Most, if not all, extended warranties contain numerous loopholes for the seller, not the buyer. Imagine Reason (talk) 22:05, 11 December 2009 (UTC)[reply]

One-time numbers for credit cards[edit]

You know those little plastic cards that high-security people use, which have a number screen that has a pseudo-randomly changing number on it? And they use that number as a password? What are those called?

Anyway, why do credit card companies not use that technology? Each card has a pseudo-random number generator, and the numbers change every hour. Each number would only be valid during that hour.

Or, better, since people taking card information may not get it processed immediately, you could have a card that spits out a new number every time you click it. Each of those numbers is valid once they've been generated, but each may only be used one single time. Possibly one would also have a second, permanent number to match this (like the three digits at the back of regular cards) as a check that someone isn't just guessing numbers and that no two cards have valid numbers out at the same time.

Would that work? Would it help prevent credit card fraud? — Sam 63.138.152.120 (talk) 17:16, 10 December 2009 (UTC)[reply]

Firstly, you can get one-time CC numbers (from a number of CC issuers) for online use - see this article. Secondly, for payer-present transactions, many banks are issuing EMV-compliant smartcards, which make stolen card use much more difficult. This does still leave the problem of abuse of stolen numbers for payer-absent transactions (that is, mail-based fraud). -- Finlay McWalterTalk 17:42, 10 December 2009 (UTC)[reply]
The issue is just what you describe; there are too many ways for cards to be used for any one solution to work, and without all of the solutions the fraud problem won't go down (since fraudsters will simply use a different avenue once the main one is blocked off), so card issuers really have little motivation to better secure the system. Most of it comes down to cost/benefit, and since a lot of fraud results in the card issuer/bank getting their money back from the store that failed to properly verify the cardholder's identity, the banks have little motivation to shut off that avenue of fraud. The stores are just lucky if the customers are only stealing/defrauding as much as the employees are, so the issue of improving identity verification isn't high on their priority list. --66.195.232.121 (talk) 18:34, 10 December 2009 (UTC)[reply]
Security token is our article on those randomly-changing things. -- Finlay McWalterTalk 17:49, 10 December 2009 (UTC)[reply]
Those one time use credit card numbers are called Controlled payment numbers not too many issuers have them though. But they are great. Ariel. (talk) 11:25, 11 December 2009 (UTC)[reply]
Part of why they aren't more common is because those tokens do not come cheap. Shadowjams (talk) 05:35, 12 December 2009 (UTC)[reply]

Mail recommendation please[edit]

I have been happy with the email provided by Orange, but now need a wider range of facilities. In particular I need to email the membership of an association. There are so many providers I shall welcome comments and recommendations. I operate an iMac using MacOS 10.5.8 at present. Thanks in advance.Froggie34 (talk) 17:20, 10 December 2009 (UTC)Froggie34[reply]

When you say you want to "email the membership of an association", I assume you mean you want to do a mass-mailing to a list of people who are opt-in members of this association? If that's the case, you might do well to set up a Yahoo! Groups account (or its competitors), or use the groups function in your email client (outlook, thunderbird, and web-based services like Gmail all have this feature). Personally I recommend people not use the email account supplied by their ISP (or mobile ISP) for anything important, as they'll generally lose that when they change provider. There's no shortage of free email services; Gmail, Yahoo, and MSN(HoTMaiL) among them. -- Finlay McWalterTalk 17:46, 10 December 2009 (UTC)[reply]
Gmail supports mailing multiple contacts at a time, then again most mainstream email providers do nowadays. Gmail is definitely my preferred provider, but any mainstream provider like Gmail, Hotmail, Yahoo or the like should do in terms of simple mass mailing. Chris Rocen (talk) 20:48, 10 December 2009 (UTC)[reply]

Many thanks. Yes I do want to do mass mailing. My ISP allows only one to mail to 10 people, and the attachment allowance is very low!Froggie34 (talk) 09:38, 11 December 2009 (UTC)Froggie34[reply]

Gmail all the way. Rjwilmsi 20:17, 11 December 2009 (UTC)[reply]

Proxy servers in France or Germany[edit]

Hey guys, I really need a proxy server that is physically located in either France or Germany. Thank you! --Belchman (talk) 21:05, 10 December 2009 (UTC)[reply]

First result for 'proxy france' on Google. [3] Chris Rocen (talk) 21:12, 10 December 2009 (UTC)[reply]
For some reason, when I tried the fastest one from that list, it wasn't working. But now it is! Thanks!! --Belchman (talk) 21:55, 10 December 2009 (UTC)[reply]

Stop Windows Messenger turning itself on[edit]

Have just got a new notebook, Windows XP. How do I stop the Windows Messenger thingy turning itself on every time I turn the computer on? I don't want to uninstall it, just stop it leaping out at me when I don't want it. Thanks. DuncanHill (talk) 22:07, 10 December 2009 (UTC)[reply]

Install the freeware Startup Control Panel by Mike Lin, and stop it (and a lot of other unwanted stuff) from running at startup. 89.242.147.237 (talk) 22:46, 10 December 2009 (UTC)[reply]
Go to Start --> Run... and type cmd /k sc config Messenger start= disabled. A black window should then pop up with the words, "[SC] ChangeServiceConfig SUCCESS." That's the Messenger Service.
If you're talking about the chat client, then go to Start --> Run.. and type appwiz.cpl and click on "Add/Remove Windows Components." Deselect Windows Messenger and then click OK.--Drknkn (talk) 22:50, 10 December 2009 (UTC)[reply]
It is relatively safe to do both the former and the latter (if you don't know what the Messenger service does, you likely don't need it running), but the one you're talking about is the latter. Chris Rocen (talk) 23:08, 10 December 2009 (UTC)[reply]
If I do that will I still be able to turn it on when I want it? DuncanHill (talk) 23:14, 10 December 2009 (UTC)[reply]
Yes. You would replace the word "disabled" above with "auto" and re-check the box in the Add/Remove Programs dialog box. In other words, you would do the reverse of the above procedure.--Drknkn (talk) 23:22, 10 December 2009 (UTC)[reply]
You could also do it from within services.msc. :) Chris Rocen (talk) 23:28, 10 December 2009 (UTC)[reply]
I'm sure there must be a simpler way that just stops it starting on start-up and I can then start it when I want to from start/all programs. I'm sure I did something like that on my desktop. I don't know what services.msc is. DuncanHill (talk) 23:36, 10 December 2009 (UTC)[reply]
No, services.msc is used to operate services -- the Messenger service is completely unrelated to Windows Messenger, that was just a side note by Drknkn which I commented on. To directly remove startup entries you can go to Run keys like HKLM/Run and remove the string. You're probably thinking of All Programs > Startup, but I doubt it would be in there. Chris Rocen (talk) 23:42, 10 December 2009 (UTC)[reply]
What I remember is doing something in start/run and editing something there, and after that if I wanted to use the Windows Messenger I just went into all programs and clicked on it just like for any other program. DuncanHill (talk) 23:50, 10 December 2009 (UTC)[reply]
The autostart of Windows Live Messenger for Windows Vista can be disabled in the program settings dialog box. Surely the same applies to the old XP version? --Andreas Rejbrand (talk) 23:48, 10 December 2009 (UTC)[reply]
That makes more sense - tools/options then uncheck the start on windows start up box. Thanks. DuncanHill (talk) 23:56, 10 December 2009 (UTC)[reply]

WoW[edit]

I have been playing World of Warcraft trial version recently, the trial version only lasts for 10 day, I feel I may be hooked, I fullu play on buying the full copy of the game, however being just before Christmas I would like to wait until after Christmas to buy it, is it posible for me to play the trial version again 3 or 4 times before I buy the real thing? I have tried deleting it and re-dowloading it but to no avail, I cant see any reason why one would not be allowed to play it a number of times prior to buying it, can some one please answer this for me as I would really like to keep playing as if I stop now I fear that ina few weeks when I am in a possition to buy the real thing I will have lost my enthusiasm for it and will no longer want to spend £20 on the box set and first 2 months. Thanks people, and please donate to wiki. —Preceding unsigned comment added by 86.18.35.133 (talk) 22:18, 10 December 2009 (UTC)[reply]

Let me get this straight — you are afraid that you will lose your addiction? Comet Tuttle (talk) 22:36, 10 December 2009 (UTC)[reply]
You can keep playing the trial version, but it will have to be on a different account, so you won't be able to keep playing the same character. No need to download the client multiple times, just make a new account. If you know someone that plays or are willing to find someone that does you could ask that person to send you a "refer-a-friend" referral (if Blizzard is offering that for European realms, I have no clue). If memory serves you then get an unrestricted 30 day trial with a bonus to experience gain, as well as some other goodies once you buy a license and game time. 161.222.160.8 (talk) 23:02, 10 December 2009 (UTC)[reply]

I've done this quite a few times. Don't delete what you downloaded, just create a new account and log in with that. Good luck! Thanks, 174.114.4.18 (talk) 21:04, 11 December 2009 (UTC)[reply]