Wikipedia:Reference desk/Archives/Computing/2010 March 22

= March 22 =

Microsoft Groove
What is the use of Microsoft Grove? --Extra999 (Contact me + contribs) 04:14, 22 March 2010 (UTC)


 * See Microsoft Groove. I feel the opening paragraph sums it up very well. --  k a i n a w &trade; 04:17, 22 March 2010 (UTC)

What are the future prospects for inserting highlights, annotations, and html anchors into other people's websites?
I did a google search for "annotate a website", and I was really excited by this service.
 * 1) Unfortunately, this particular service ("Jump Knowledge") has been discontinued. Do you know of any good alternatives that offer the same services?
 * 2) I think that services like this would revolutionize the work of quoting, paraphrasing, or commenting on other people's work (including in academia, law, of course Wikipedia, and probably everything else). Is it generally understood that services like this will grow in availability and popularity?  (Is this something that everyone knew about but me?)  If not, what are the obstacles to making services like this succeed?

Cheers, Andrew Gradman talk/WP:Hornbook 07:10, 22 March 2010 (UTC) (editing from an IP address, for complicated reasons, as 207.237.228.236)


 * Following up on my own question, I found Web_annotation. This is still a novel idea for me.  Please refer me to other resources if you can. Andrew Gradman talk/WP:Hornbook  —Preceding unsigned comment added by 207.237.228.236 (talk) 07:25, 22 March 2010 (UTC)


 * It's inevitable. ¦ Reisio (talk) 08:41, 22 March 2010 (UTC)


 * There are not any real technical challenges, other than the fact that if you want people to be able to see annotations easily, you have to convince a lot of people to all go to the same services (or find some way to collate them). But that sort of thing works it out pretty straightforwardly.
 * Practically, if it really took off you'd need to have some way to sort between potential annotators. I presume it would be something like Twitter or podcasts where you subscribe to particular people. One can imagine how much of a zoo it would get for popular sites. (Just take a look at the cesspool which is the comments section on any popular news site.)
 * Legally, I suspect it would count as creating a derivative work. In some countries that could raise copyright issues. How that would play out, I'm not sure. I suspect there would be a court case somewhere down the line.
 * Will it be popular? Who can say. I kind of suspect not so much. Link sites (e.g. digg) work well because they provide a narrow view at a wide spectrum of pages. Blogs work well because they allow you to connect content with commentary but again through a narrow view. Having each page on the web have potential annotations means that unless you have some narrow way to point you to pages (e.g. a blog), the odds of you hitting a page that your favorite commentator has commented on is probably low. And I guess I wonder how interesting it would actually be in practice, how much different it is that the existing experience where people who want to comment on a web page just create a new web page (e.g. a blog) about it. --Mr.98 (talk) 13:39, 22 March 2010 (UTC)

No, it'll definitely be popular eventually. You know how people say "go to domain.tld and click on FOO and right there in the second paragraph, the fourth line, look at that!"? Instead you'll just get a link that automatically highlights the relevant bit/s. It's simple to do now, it's just a matter of someone thinking up some stupid misspelt "web 2.0" name for people to associate with it. ¦ Reisio (talk) 16:32, 22 March 2010 (UTC)
 * Do people say that on a regular basis? I don't see that as actually being something that is majorly in demand. (Again, technically it is not hard to do, and has not been for ages.) I don't think it will take off unless it finds some way to harness human vanity/exhibitionism/voyeurism, which all of the really successful Web 2.0 applications (Facebook, Twitter, Wikipedia, blogging, etc.) have managed to do. Just being able to highlight stuff... it's a cute trick, I guess, but wildly popular? Maybe I'm just an old fogie here, but I am dubious. It don't see it filling a particularly big need (something not already filled by link aggregators and blogs), and don't see it catering to any basic human impulses (vanity, etc.). But who can predict the future? I probably wouldn't have thought that "microblogging" would have been popular, either, had someone pitched it. --Mr.98 (talk) 23:09, 22 March 2010 (UTC)
 * Thanks, these are great answers.
 * Mr.98, I understand you to be saying that when annotations consist of marginal notes, they might add more chaos than value. I agree with that.  I also agree with Reisio that the real value proposition is the ability to insert html anchors and to highlight text.  (Just think about how much easier it would make our work on Wikipedia!!)
 * Those two steps would make the "annotation" function obsolete, because the material that would have gone into those "annotations" could just be put into the body text of the external document (e.g. wikipedia article) that employs the link to the html anchor. One could still aggregate those annotations alongside the original document via a Google search of the entire web for hyperlinks containing that anchor (sort of like putting a "what links here" button into the document.)
 * That makes me excited, because it means that really good "web annotation" can be done on the cheap! Andrew Gradman talk/WP:Hornbook 19:48, 22 March 2010 (UTC)  —Preceding unsigned comment added by 128.59.179.216 (talk)

lib to java class/.net il ?!
Is it (at least theoritically) possible to convert .lib/.o/.so/.dll files to java (JVM/.class) or .NET (CLR/il) ?! --V4vijayakumar (talk) 09:50, 22 March 2010 (UTC)


 * It's theoretically possible (see Turing completeness), but that doesn't mean it's easy.
 * What problem are you trying to solve? Are you wanting to call library functions in a DLL (or .so library in Linux) from Java or .NET?  This can be done in Java using the Java Native Interface, and while I'm less experienced with .NET, it should be even easier from C - see e.g. --Normansmithy (talk) 12:20, 22 March 2010 (UTC)


 * If it was originally compiled from .NET, it's almost certainly still in IL, in which case .NET Reflector makes things very, very easy. &mdash;Korath (Talk) 14:45, 22 March 2010 (UTC)

How can I find out my first router's upstream IP when I'm behind several levels of NAT?
Situation: (Internet)---(final NAT router)---(possibly more NAT routers)===(first NAT router)---(Linux box) How can I find out what the IP of the NAT router in the network marked "===" is, when I'm root on the Linux box?

The Problem(s):
 * determining the IP should be possible in a non-interactive, scripted way
 * the router's GUI is inaccessible (Web only, requires User/Password, and some fancy JavaScript - Linux box is text only, and wget doesn't have a JS interpreter)
 * changing to another router brand/model is not possible

Finding out the public IP of the final NAT router would be easy (wget http://whatsmyip.de/ or a similar service and parse the result) but so far I haven't found a way to figure out the outside IP of my first NAT router. Traceroute only shows the internal IP known to the Linux box as its gateway, and the IP the next upstream NAT router has in the "===" network. Is there something like a "boomerang packet" that I could send to the next upstream NAT router and that would log and return all the IP addresses it has passed on its way? After all, on its way back, it would see the outside IP of my first NAT router, as it has to go back there... -- 78.43.60.58 (talk) 10:43, 22 March 2010 (UTC)
 * Addendum: ping -R some.ip.he.re should log the reverse route, but doesn't - one router flat out refuses to pass ping packets with a set RR flag, the other treats them like ordinary pings. :-( -- 78.43.60.58 (talk) 12:26, 22 March 2010 (UTC)


 * I think you'll need to leverage a protocol that works at the application layer because otherwise your NAT (which is doing some sort of inspection) is almost certainly going to rewrite the IP headers completely. The ping manual confirms what you say about -R, that it's not often supported.


 * I've got a few ideas, none of which are certain to work. First, you might try looking around for other protocols that could return the same information. If the NAT uses SSDP or some other management protocols, they might leak information about IPs.


 * The second one is less elegant. If the potential address range is small enough you may be able to guess at a proper IP, and then confirm through trial and error. Traceroute should tell you the gateways along the way, and from there you might be able to guess at a range of addresses. Then you could send them ICMP packets or something else you know will be returned, preferably with some sort of random number returned in each. This won't work if your NAT won't forward local addresses (or act generally weird when trying to do multiple-subnet setups, something I've seen on home routers). I may well have missed some obvious flaw here too, but maybe that gives you some idea of a place to start. Shadowjams (talk) 16:54, 23 March 2010 (UTC)


 * I left out a crucial part of the second one. The return address on the packets you send will need to be spoofed to the guess address. Then, you're going to need a way to see that packet. Two ways you could do that. If you can see the outer range of the second one, then that's easy, but then you probably already know the IP anyway. Second, you could try to do something similar to nmap's zombie scan, where it looks for a packet by checking sequence numbers. So send packet to the second gateway address with a spoofed return address of your guess. Note the sequence number of the second gateway. Then send another, noting the sequence again. If the sequence increments in between then it may have received a RST from the IP you're trying to figure out.


 * I'm assuming you own the relevant parts of the network too. I wouldn't advise sending spoofed packets onto other people's networks. In addition, there are a dozen things that could go wrong with this, I'm really thinking off the top of my head here. Shadowjams (talk) 17:08, 23 March 2010 (UTC)


 * Here's the nmap description of idlescan (zombie). You might also check out hping. Shadowjams (talk) 17:10, 23 March 2010 (UTC)

Spell check's algorithm
If you have a short text (say 4,000 words) and a list of words in a dictionary (250,000), does the spell check goes through the list of 1,000 words and the whole dictionary? That would mean 1.000,000,000 actions. Is that too much for a computer? Is there a more practical solution to optimize this thing? --ProteanEd (talk) 11:53, 22 March 2010 (UTC)


 * Simply deciding if a word is in the dictionary or not can be done in constant time (that is, it takes about the same amount of time if there's one word in the dictionary or a million) with a hash table. In this case, a hash table would be a big array, with the dictionary words scattered throughout it in such a manner that the programmer knows for a given word, where that word would be, if it were in the hash table at all.  There's a bit of extra complexity (what if two words wind up being in the same place?), but hash tables can make spell-checking quite fast.
 * Now, making spelling suggestions is harder, and I don't know off the top of my head how it's done. Since the spellchecker needs to find words that are close to the word that it is looking for, it needs to do some clever approximate string matching to run fast.  Simply running through a quarter million words and calculating the edit distance to all of them from the misspelled word would probably work on modern hardware, but there would be a noticeable pause, so they don't do it that way.  Paul Stansifer 12:22, 22 March 2010 (UTC)


 * (edit conflict) Sort your dictionary in alphabetical order and use a binary search? Or index your dictionary.  There's certainly no need to check each word in your text against all 250,000 words in the dictionary: you just need to know where the word would be in the dictionary if it existed, and then check if it is there.  If you want to find a word in a paper dictionary you wouldn't start with page 1 and read all the words on it, then try page 2... --Normansmithy (talk) 12:25, 22 March 2010 (UTC)


 * You probably don't want to use a sorted list of words directly; a hash table's faster for spellchecking, and alphabetical order's only good for finding suggestions when the error's got a few correct letters to the left of it. (in particular, "the" and "teh" have a whole lot of words between them, and you're out of luck if you type a "c" instead of a "v" at the beginning of a word). But alphabetical order is the best that we can manage for "manual" spell-check.  Paul Stansifer 01:55, 23 March 2010 (UTC)


 * To quickly search a word list, I'd have an alphabetically sorted list, indexed for the first few letters, then use a binary search beyond that. So, let's say I was looking up FREEMARTIN, I'd find the index offsets for FRE and FRF, then do a binary search between those values.


 * As for suggesting corrections, having a list of common misspellings of words would help here. If not, there could be a list of common phoneme errors, like "f" in place of "ph".  You might also want to include keyboard errors.  For example, a "b" in place of a "v" is likely, since they are adjacent on a QWERTY keyboard. StuRat (talk) 13:30, 22 March 2010 (UTC)


 * Phonic matching is based heavily on soundex. It takes constant time to calculate soundex (just replace the letters with numbers) and then constant time to lookup the soundex code in a table.  The "definition" of the soundex code will be the words that match the soundex code. --  k a i n a w &trade; 13:35, 22 March 2010 (UTC)


 * Soundex works great when it's a genuine spelling error (like if you wrote "foneem" instead of "phoneme") - but it's not so great for typos ("ghoneme", "hponeme", "phoeme", etc). For those things, you need to look for words with one letter difference, words with swapped pairs of letters, words with extra letters and words with missing letters.  For that, a binary search for likely candidates works best.  You can also use Hamming distances to find the most similar words from your dictionary.  But the time it takes to do spell checks is mostly in the time it takes for verify the correct words because (generally) the vast majority are spelled correctly...and for that a simple tree search or perhaps a hash table lookup is the fastest. SteveBaker (talk) 04:04, 23 March 2010 (UTC)
 * A fairly obvious data structure for this is a trie. For large dictionaries of relatively short keys its an excellent data structure, and not as messy and unorganized as a hash table. In fact, one can probably use a trie to find some classes of spelling errors. --Stephan Schulz (talk) 10:36, 24 March 2010 (UTC)

What is Smart Business?
I was watching Undercover Boss on Sunday night and they showed the CEO on the cover of a magazine called Smart Business? Does anyone know where I can get a copy of this magazine and what they're all about? —Preceding unsigned comment added by Markus37627 (talk • contribs) 15:01, 22 March 2010 (UTC)
 * I never heard of this magazine/newsletter, but here is their website. "Smart Business magazine subscriptions Smart Business is offered at no cost to qualified recipients. To request a subscription or to update your subscription information call our circulation department at 866-820-0329." Nimur (talk) 15:24, 22 March 2010 (UTC)

Linux, Multiple Monitors and CLI/Grub
Hi everyone,

An interesting conundrum: I've got an old laptop with no screen (so it's basically a thick keyboard), that I'm using as a server. I use it by plugging a monitor onto the external port. This works fine for the BIOS, Windows, and most of Ubuntu 9.10.

However, I can't use GRUB or the CLI. I don't ever see GRUB, and if I do ctrl-alt-f1 or gdm stop, the external screen goes blank (or freezes) and that's it.

I think this is because they're not outputting to the right screen?

This is a bit of a pain, as now that I've got everything set up, I'd like to be able to boot without gnome to minimise memory waste. I can always ssh after startup and turn off gdm that way, but it's a bit of a pain (and a bit risky) to have no way of controlling GRUB etc...

Does anyone have any clues as to how this could be solved? Is there a way of telling the CLI to "play" on both monitors?

Cheers, 213.71.21.203 (talk) 15:18, 22 March 2010 (UTC)


 * Check xorg.conf and make sure it is mirroring the screens, not spanning desktops. If it mirrors the screens, the same thing will show up on both screens.  Exactly what it should have depends on the video controller in the laptop. --  k a i n a w &trade; 15:40, 22 March 2010 (UTC)


 * Sorry, I wasn't clear enough. This isn't a problem with anything X and above, all that works fine (Ubuntu even has a handy little tool for spanning/mirroring etc now, nice addition). It's only a problem when switching off X (switch to command line only) or using GRUB. So I don't think xorg.conf would help? Then again, maybe I'm mistaken. 213.71.21.203 (talk) 15:44, 22 March 2010 (UTC)


 * If it is a true CLI and not a "fancy" one with X running, then editing xorg.conf will not help. All of my full-size machines put the CLI on all screens.  Your laptop can override that.  I have one that does.  I have to press Fn-4 to make it put screen output to external. --  k a i n a w &trade; 15:47, 22 March 2010 (UTC)


 * Give that man a banana! I never thoughtof trying to force it at a laptop level. I'll have a look tonight. Thanks, 213.71.21.203 (talk) 15:49, 22 March 2010 (UTC)


 * "Give that man a banana!" - I think this is an appreciation. which part of world you are from; which language you speak ? --V4vijayakumar (talk) 04:11, 23 March 2010 (UTC)

graph
Can I draw a graph taking values of (x,y)in fortran 90. This program is possible.Supriyochowdhury (talk) 15:47, 22 March 2010 (UTC)


 * Sure, in many ways:


 * 1) Drawing it using ASCII characters is simple, like so:

^  2 |    * *   1 |* *        +--->      1 2 3 4


 * 2) Create a graphics format pic, like JPEG or GIF or BMP. This is a lot more work.  There are a few human readable bitmap formats, that tend to make huge files, but most are in a binary formats that're more difficult to edit.  A system command can then be issued to display the pic, using something like MS Paint.


 * 3) There may be ways to make a graphic display directly in Windows or Linux from Fortran commands, without first creating a file, but I don't know of any, offhand. StuRat (talk) 16:00, 22 March 2010 (UTC)


 * Try pgplot. 213.71.21.203 (talk) 16:06, 22 March 2010 (UTC)


 * A major weakness of FORTRAN is its inability to easily generate graphical interfaces, including general purpose plots. Consider outputting your data in a tab-delimited format and piping the output to a graph program like Gnuplot.  Nimur (talk) 16:17, 22 March 2010 (UTC)

fortran
what is the quickwin application and standard graphics application in fortran 90 software.Supriyochowdhury (talk) 18:09, 22 March 2010 (UTC)


 * See QuickWin. As for a standard graphics library for Fortran, I haven't ever seen one.  The standard is console output.  There are many graphics libraries available for it, but they are not "standard". --  k a i n a w &trade; 20:04, 22 March 2010 (UTC)

Quantum computing
I've read the Quantum computer article but there are still some questions I'd like to ask please. 1) How much faster than a conventional computer will a quantum computer be? 2) Despite what the article says about qbits, will quantum computers still be working with conventional logic overlaid on top of the underlying qbit logic, or are there radically different 'magical' things they can do but which conventional computers cannot do? 3) Will a quantum computer ever be the same size and usage as as a home desktop computer or does it need an engineeering plant attached to supply -273 degree C temperatures? 4) How will the quantum part interface with a keyboard and display? Thanks 78.149.193.98 (talk) 20:33, 22 March 2010 (UTC)


 * It won't be faster (or at least, that won't be a function of using qbits), it can simply compute a whole bunch of answers at once in such a way that the "correct" answer drops out at the end.
 * From the lede of the article, it can use certain algorithms that rely on nigh infinite parallelism, but it's still a computer. No magic allowed.
 * Can't predict the future here. It all depends on what technological advances allow us to do.
 * It's not magic. You'd program it in a way similar to programming normal computers. It would likely require a regular CPU to define the problems to it; keyboards and displays simply take input and provide output, quantum really doesn't enter into the equation.
 * &mdash;ShadowRanger (talk 21:16, 22 March 2010 (UTC)

"It can simply compute a whole bunch of answers at once in such a way that the "correct" answer drops out at the end." Could it be explained how that is done please? 92.24.91.12 (talk) 23:54, 22 March 2010 (UTC)


 * (1) basically means "faster, but only for some problems". It's a similar problem to parallel computing: if you can break the problem down in a certain way, you can get the result faster as if there were a lot of computers working on it at once (in the parallel computing case (like in your graphics card), this is literally true, but in the quantum computing case, it's not.  Regarding (3) and (4), it's probably best to read the "computer" in "quantum computer" not as "personal computer", but in the general sense, as a computational device.  Unless the technology turns out to be cheap to manufacture, and consumers tend to want to factor lots of large numbers (you never know!), there's not too much reason to expect to see quantum coprocessors showing up in PCs.  Paul Stansifer 02:10, 23 March 2010 (UTC)


 * Part of the problem is that they'll only be faster for particular classes of highly parallelizable algorithms. It's highly likely that they'd be exceedingly slow for algorithms that require serial processing.  Hence, it's most likely that these gizmo's would be highly specialised "co-processors" that you'd hook up to a completely normal PC which would run the operating system, drive the peripherals, etc.  For example, it's hard to imagine how you'd use a quantum computer to render graphics for a computer game and it certainly won't help with surfing the web or doing your taxes.  But it might be just the thing you'd want for a chess playing computer because it could test all possible moves in one step and looking hundreds of moves ahead might well turn out to be child's play - that would be a truly astounding thing.  IMHO, these things will be rare, temperamental and used mostly for scientific computing, cracking encryption, weather forecasting, that kind of thing.  I doubt they'll be found in the home or office for a very long time. SteveBaker (talk) 03:48, 23 March 2010 (UTC)


 * I wonder if someone will come up with a 'quantum coprocessor' for parallelism. Highly unlikely, given the evolutionary architecture... but with enough innovation, anything's possible. Doubting they will be in the home reminds me of the IBM chairman who said that there would be a need for about 5 computers worldwide. I can think of many tasks being made parallel - for example booting up and checking a driver list for hardware changes - if all checks/IOs are done at once, we have instant boot up. Sorting large lists in parallel, compression/decompression of parallel streams then merging the results, buffering, searching caches, virus checks, etc. - many serial tasks can be done or converted to parallel. These tasks could be sent to the "quo-processor" while other serial tasks continued normally, until a point in the future when all serial tasks have algorithms to run in parallel, including rendering graphics. Sandman30s (talk) 12:49, 23 March 2010 (UTC)
 * But I/O won't benefit from parallelism; quantum computing won't do anything about, say, bus contention (barring some major development I can't imagine). Most tasks that involve a large amount of data are I/O-bound in the first place.  Even tasks that are traditionally thought of as compute-bound, like playing chess, might become bound by memory bandwidth if the CPU becomes faster.  See Non-Uniform Memory Access for work on the memory bandwidth problem.  Paul Stansifer 14:23, 23 March 2010 (UTC)
 * Who's to say, at this early stage, that qubit storage won't happen in some revolutionary way as well? Traditional IO might be as far removed as the LP is to the USB stick. Boundaries between memory and IO will become blurred as quantum storage media are able to hold exabytes and higher. Imagine being able to store (optical or other) bits at the subatomic level. This will most definitely support parallelism at a grand scale. Sandman30s (talk) 06:22, 24 March 2010 (UTC)
 * The quantum computer article is pretty good in some ways, but it understates the amount of uncertainty over whether a nontrivial quantum computer can be built at all, even in theory. "Nontrivial" doesn't mean quantum megabits or terabits, it means anything more than a dozen or so quantum bits.  You might like Scott Aaronson's lecture notes starting here if you want to learn a bit more about the topic. 66.127.52.47 (talk) 15:24, 23 March 2010 (UTC)