Wikipedia:Reference desk/Archives/Computing/2011 February 27

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< February 26 << Jan | February | Mar >> February 28 >
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.

February 27[edit]

SQL UPDATE statement to multiply each value by 10[edit]

I am trying to figure out how to run a SQL command that will multiply a given field by 10 and update that row. Basically I have a table where rows have weights, and I want to change a weight of 1 to 10, 2 to 20, 3 to 30 and so on so I can have room (BASIC line numbering style) to put weights in between. —Preceding unsigned comment added by (talk) 03:08, 27 February 2011 (UTC)

ok this is much easier than I thought. update table set weight=weight*10 works. -- (talk) 03:29, 27 February 2011 (UTC)

StuRat (talk) 21:13, 27 February 2011 (UTC)

How can a distributed p2p database work at all?[edit]

How can a distributed p2p database work at all?

take something simple. I have half the phone book (m-z), you have half the phonebook. (a-m). I ask you if Abigail Atkinson is listed, and you say "yes, there are seven Abigail Atkinsons, here are the records"

but there aren't seven. There are eight.

You are one of the 10k imposter nodes the eighth Abigail hired to keep people from finding her number.

how can a p2p database defend against that? (talk) 04:51, 27 February 2011 (UTC)

I think that peer-to-peer databases in the real world are either of a type where there are no malicious nodes (because you own all the nodes, and the benefit is the lack of a single point of failure), or they are key-value databases where the key contains enough information to authenticate the value (and the key is much shorter than the value, so you only need a low-bandwidth connection to a trusted source). It might be possible to have a network with a priori untrusted nodes and a priori unverifiable replies, using some kind of automatic trust-building process (you send identical queries to a node you trust and a node you don't trust, and if you get the same reply then you trust the second node—except a bit more sophisticated than that). I'm sure somebody is researching it. The Wikipedia articles web of trust, trust metric and reputation system might be relevant. -- BenRG (talk) 08:31, 27 February 2011 (UTC)
One other option that comes to mind, though this is not something I know anything specifically about, are situations where comprehensiveness is not a goal. Let us say that our p2p database is a list of computers you could connect to (as in actual p2p file sharing software). I find some way to get an initial list of participating computers, and then each of those nodes can expand the list to more. It's true that there could be bad data in there (RIAA computers that gave junk info), but the amount of good data should exponentially overwhelm the bad data by the nature of the p2p system (every good node connects you to X more good nodes, whereas every bad node is probably just a failure). This sort of arrangement would be very practical for a p2p system, because it doesn't all assume the need to have one giant, coherent dataset at any one time. --Mr.98 (talk) 14:11, 27 February 2011 (UTC)


I'm trying to track down a paperback copy of Samuel Butler's Hudibras, but I'm having difficulty filtering the results on so that POD books are not included. There are hundreds of results when I search [1], but it seems impossible to refine the results by – for example – publisher, or to exclude the POD titles. Any suggestions? (talk) 12:38, 27 February 2011 (UTC)

Amazon publishes some book search tips and there is an advanced search which can search by publisher. (Of course, this requires you to know the publisher in advance). I managed to narrow the results to 234 using this, but haven't been able to experiment with it further yet. --Kateshortforbob talk 17:26, 27 February 2011 (UTC)
Something else you could try is to sort by "bestselling" rather than by "relevance" (there's a list-box near the top-right of the results); this may be better with advanced search. Do you know if thre is any non-POD edition currently published?
Abe Books allows you to omit print-on-demand titles from their advanced search (although annoyingly not to search by condition or for only new books), but none of the other big booksellers do. Although Abe is mainly for secondhand, you can get some brand new books there.--Colapeninsula (talk) 17:37, 28 February 2011 (UTC)
I'm trying to find out whether there is a non-POD edition currently available, which is why I'd like to exclude the POD titles from my search. As the Magic 8 Ball says, "all signs point to no"... (talk) 19:39, 28 February 2011 (UTC)
You could try searching on other book search engines such as AddAll WorldCat or the British Library to get the ISBN number, and then go back to Amaszon and search for the ISBN number there. There was an Oxford University Press Edition paperback published in 1973. (talk) 01:14, 2 March 2011 (UTC)

java programming[edit]

a program to find out that the two are twin prime nos or not.Create a function which will return a boolean value —Preceding unsigned comment added by (talk) 16:13, 27 February 2011 (UTC)

Please do your own homework. JIP | Talk 18:52, 27 February 2011 (UTC)

LinkedIn spam[edit]

Does anyone know how to stop repeated LinkedIn invitations? The person they purport to come from claims not to be able to stop them, and there is no "unsubscribe" link in the emails.--Shantavira|feed me 17:35, 27 February 2011 (UTC)

It's probably an email with fake header. Gmail, at least, allows you to set rules to automatically delete specific email. Check your email provider for something similar. Quest09 (talk) 19:19, 27 February 2011 (UTC)
Tell your friend to do a virus scan. APL (talk) 05:48, 28 February 2011 (UTC)
The spambots now use fake LinkedIn invitations that direct you to a phishing website to try to steal your password. There is nothing that any of us can do to unsubscribe from phishing spam. The fastest solution is to delete LinkedIn e-mails that come into your inbox. (Apologies if LinkedIn phishing spam isn't the problem you're referring to. If the problem is that a single known user is sending you lots of invitations, I would write a rule in your e-mail program to detect known text strings in the e-mail and delete anything with those known text strings.) Comet Tuttle (talk) 20:45, 28 February 2011 (UTC)

Locating (and re-allocating?) Lost Disk Space on Vista[edit]

A few days ago, my HDD on my laptop started to get smaller and smaller, at a rate of around 100MB/minute. I never worked out what was causing this, but I did happen to do a malware check with Malwarebytes, and it found two infections, which were promptly removed. The problem of shrinking disk space has since gone away. Now, I was right down to 64KB on my disk at one point. After uninstalling a load of stuff, I am up to 20+GB, but I am sure there is space missing, as I had 20+GB and all those programs installed before this problem happened. I have run Disk Cleanup (inc. deleting restore points) and have use Auslogics Disk Defrag to defrag the disk, both to no avail. Is there anything I can do to see if there is indeed any disk space that is not registering? I am on Vista Home Premium SP2 (32-bit). --KägeTorä - (影虎) (TALK) 18:33, 27 February 2011 (UTC)

Well the space swallowing malware seems to have downloaded lots of stuff and put it somewhere. After eliminating the usual suspects (folders called tmp or temp, the temporary internet files, and such like), I would search the entire disk, including system and hidden files, for anything created since the malware infection took hold, particularly strange named folders. You then need to make a judgement call on what to actually delete. Note it might take Vista some time, especially if your disk is several hundred giga-bytes so this is not something to do when you are about to go out. Astronaut (talk) 20:37, 27 February 2011 (UTC)
If you right-click on a folder and select "Properties", you will get a report of the total disk space occupied by that folder. You could do some exploring to see whether the total size of your folders adds up to the size of the disk, and whether any of the folders is a lot larger than you expect it to be. I can't think of a more efficient approach. Note that it doesn't take malware to cause a problem like this -- all it takes is a buggy program that goes into a loop and keeps endlessly appending material to a file somewhere. Looie496 (talk) 22:46, 27 February 2011 (UTC)
Google disk space visualizer or file space explorer or visual disk space for several pieces of software that show you a visual map of what folders are consuming space on your hard disk. Unfortunately you have to download something, and it's not something that's built into Windows. Personally I have used SpaceMonger (here's the link) but I'm unsure whether it's totally Windows 7 compatible. Comet Tuttle (talk) 20:41, 28 February 2011 (UTC)
PS: Your mileage may vary, but I just ran SpaceMonger on my Windows 7 machine and it worked fine. Who knew that I had 12GB in my Recycle Bin.... Comet Tuttle (talk) 20:48, 28 February 2011 (UTC)
Cheers, well, I got something called 'Disktective' earlier today and tried that out. It gave me some results. I was in a hurry and just wanted to check to see what it does, so I will have to run it again and check it out again - I got a reading that said 9GB was 'unknown', but maybe I need to look again. After that, it will be a case of finding out how to reclaim the missing space (if that is it). --KägeTorä - (影虎) (TALK) 21:37, 28 February 2011 (UTC)


I need to convert 100,000 .mht files into html. I've tried Mozilla Archive Formats convert wizard, but it fails on 60% of the files. I've also tried several other free programs which claim to do this, but they mess up the links to images and css, resulting in broken pages. I'm on Windows but can try linux programs if there is one which does exactly this. Thank you (talk) 18:59, 27 February 2011 (UTC)

Our MHTML article mentions a linux program called kmhtConvert, which looks like it might do what you want. Looie496 (talk) 19:44, 27 February 2011 (UTC)
From the screenshots and documentation it seems designed to convert one file at a time manually. I have 100,000 :/ Is there a way to make it do them all in one go? I have zero experience with linux and would like to be sure it will work before I install linux over Windows 7 (talk) 23:52, 27 February 2011 (UTC)
If you have a file containing a list of the files you want to convert, it is easy (for somebody used to working in Linux, anyway) to write a script that automates the whole process. But when you said "can try linux programs", I didn't realize you meant installing Linux specifically for this purpose -- I have doubts that it would be worth doing just for this. Looie496 (talk) 01:16, 28 February 2011 (UTC)
Installing Linux to do one task would be crazy, but maybe some sort of live-disk would be reasonable. APL (talk) 05:45, 28 February 2011 (UTC)
Why don't you install Cygwin? This would provide you with a Unix-compatible interface to your existing Windows operating system. The benefits are that (1) you don't have to install a whole new operating system, as Cygwin runs as an application on Windows, (2) Cygwin's own interface is completely Unix-compatible, and (3) it has direct access to the Windows operating system's files without an abstraction layer. The only downside is that pre-built Unix/Linux binaries are incompatible with it, as Cygwin can only run native Windows binaries. You have to download the source codes and compile them from inside Cygwin. JIP | Talk 18:48, 1 March 2011 (UTC)
It looks like there is a non-interactive option, "--NoGui". If you post a few input files I'm sure someone will run it on their Linux system to see if the output's OK for you. --Sean 14:39, 28 February 2011 (UTC)

Problem with signature[edit]

I am trying to work out why my signature isn't functioning properly. Jay Σεβαστόςdiscuss 19:13, 27 February 2011 (UTC) Here it seems to work fine, but sometimes the "discuss" link does not work (e.g. here) or it goes all funny like this: [2]. What is going on here? Thanks so much for the help in advance.

Gah, it took me a ridiculous amount of time to figure this out! The link does not work because it would link to the same page that you are already on -- it is an item on your talk page linking to your talk page. The sandbox appearance looks strange because you have spaces at the front of the line -- any text that starts with spaces will be placed in a border and printed using a special font. Looie496 (talk) 20:06, 27 February 2011 (UTC)
Thank you so much - sorry it took a lot of your time to figure this one out! It was driving me crazy as well. Jay Σεβαστόςdiscuss 15:31, 28 February 2011 (UTC)