Wikipedia:Reference desk/Archives/Computing/2010 December 29

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< December 28 << Nov | December | Jan >> December 30 >
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 29[edit]

Installing stuff in Linux[edit]

Installing some packages (not in the Ubuntu repository), the instructions say follow the Macintosh instruction which are:

"uncompress the folder and move it to a central location, e.g. /usr/share, and set MALTPARSERHOME to point to this location"
"install megam binary, e.g. to /usr/local/bin and set MEGAMHOME to point to this directory)."

Why do you install one package to /usr/share and the other to /usr/local/bin? Does it matter?

Where do you set the path MALTPARSERHOME and others? The packages are to be used with Python.

And a second point is about installing stuff in general. Is the standard procedure to decompress, change to the directory and ./configure -> make install -> makefile OR simply make? Are there other procedures? Like make install alone?Mr.K. (talk) 01:35, 29 December 2010 (UTC)

/usr/local/bin/ is usually on your path - so it's best to put as few files in there as possible. (Typically, only the executable/script, or a symbolic link to that, should be in the .../bin/ directory). The program may have any number of required extra program files, data files, and so on; those belong in /usr/local/share (or any other non-standard location of your choosing); and by setting the environment variable to point to it, you can specify it to be whatever you like. (See this Ubuntu help page for instructions on setting environment variables - note that the correct syntax depends on your shell and not on your version of Linux; but if you aren't sure what to do, you probably will want to edit your .bashrc file and add a line export MALTPARSERHOME=/usr/share/maltparser/ or something like that - read through these links for more information). Finally, regarding your last point: ./configure; make install; is a convention that originates with autotools, a very common standard GNU build system for compiling and installing programs from source-code. In practice, many programs use this convention, even if the programmers did not use autotools. "configure" is a script, and in the common case, it creates a Makefile. This makefile is another script designed to automate the process of compiling software; in theory, "configure" created a special version "optimized" for your particular computer (if a programmer designed "configure" to do smart things like check your CPU type or amount of RAM, for example). Then, you use the GNU program make to interpret that makefile - which contains a special instruction/routine for "install" (if the makefile script was automatically generated by autotools, or following that convention). Programmers and software designers can also write their own custom makefile; they can provide any convention for installation procedure; but following these norms makes it easier for users to compile code from source (without having to learn details of the entire software project). Usually, a makefile contains instructions for compiling, linking, and copying binary files to specific locations; but make can run any steps needed for a build. Nimur (talk) 02:01, 29 December 2010 (UTC)
Personally I'm skittish about making changes to a global settings file like .bashrc to suit a specific application (which will probably be called by via a script or makefile anyway). I've seen people get into a tragic muddle with multiple versions of things on their path, or suffering from the unexpected effects of environment variables that they had lying around. It's often good practice to write a (e.g.) do_parse script which clears the entire environment with env - and then explicitly calls executables by their full path names with only the bare minimum of specifically-set environment variables declared beforehand. So, for your maltparser example, you might end up with a script that read env - MALTPARSERHOME=/usr/share/maltparser /usr/bin/java -jar /usr/share/maltparser/bin/maltparser.jar foo bar, and you can guarantee that you'll always get that version of the program, and that your setting MALTPARSERHOME doesn't conflict with some other use of it (by some other unrelated program that you didn't know about). (talk) 14:36, 29 December 2010 (UTC)

ebooks on Nokia 5300 classic mobile[edit]

Can i read ebooks on my Nokia 5300 classic mobile? If not what software should i install in my phone that would support reading ebooks on it.? please help. (talk) 06:52, 29 December 2010 (UTC)

Search for "Nokia 5300 ebook reader" and you will find many programs you can purchase and download to read ebooks on a Nokia 5300. -- kainaw 17:44, 29 December 2010 (UTC)


When permanently deleting (ie not to recycle bin) a folder on Windows 7 with thousands of files in it, why does it take so long? (talk) 17:05, 29 December 2010 (UTC)

You are probably using the exFAT file system, which implements a chunked free space bitmap to keep track of free space. When deleting a small amount of data (where the location of newly freed space fits in memory), there is not noticeable degradation. If the amount of newly freed space cannot fit in memory, a swapping nightmare ensues as the drive continually allocates drive space on one chunk to calculate freed space on another chunk, then has to free the newly allocated space, which may require allocating space on another chunk, etc... Keep in mind that overall the free space bitmap is rather fast at quickly locating contiguous free space, which avoids fragmentation. So, this one weakness isn't too bad of a problem. -- kainaw 17:39, 29 December 2010 (UTC)
The file system is NTFS (talk) 19:11, 29 December 2010 (UTC)
I've noticed that deleting files with Windows 7's Explorer is sometimes very slow. I don't know why it happens, but it's Explorer-specific, so you could try a third-party file manager. The best list I can find on Wikipedia is Template:File_managers. Kainaw, do you have a source for what you said about exFAT? It sounds implausible to me. -- BenRG (talk) 22:35, 29 December 2010 (UTC)
It is described well in our article on free space bitmap. See the very end of the article. -- kainaw 01:11, 30 December 2010 (UTC)
That article isn't about exFAT. As far as I can tell, exFAT is no worse off than FAT16 in this regard, and slightly better off than FAT32 since it has one FAT instead of two. Calculating free space doesn't require "allocating space on another chunk". I don't think exFAT's free space bitmap is chunked in the way that article describes, but it wouldn't matter even if it were. -- BenRG (talk) 01:21, 31 December 2010 (UTC)

Wifi access[edit]

Hi there, Can I plug a wireless router into the LAN cable in my office so I can use my iPad or does it have to be plugged into the original feed from the cable modem? Thanks! —Preceding unsigned comment added by (talk) 17:33, 29 December 2010 (UTC)

You can do that, but you may run into issues with local internet use guidelines by exposing the local network to unsecured wireless access. -- kainaw 17:42, 29 December 2010 (UTC)

Can you explain that a little more? Won't securing the access with a password keep things secure? Thanks —Preceding unsigned comment added by (talk) 17:45, 29 December 2010 (UTC)

In my experience, nobody takes the time to read the manual for the router and properly add an encryption key to the router itself. They think that requiring a password to login into their Windows/Mac account means that the wireless access is also secured. Then, even if they do add encryption, it is usually WEP, which takes seconds to crack using freely downloadable programs (no, I won't provide links for the script kiddies). WPA is better, but has inherent weaknesses that allow others to hijack a key that is in use. So, users should be turning off broadcast, which only inhibits the most inferior script kiddies, and turn on MAC filtering, which inhibits slightly more experienced script kiddies. In the end, your wireless access point is an open weakness to the internal network. For that reason, rogue routers are rarely allowed. If wireless networking is required, it is usually placed on a separate network with limited access to the main wired network. -- kainaw 17:55, 29 December 2010 (UTC)
All that is true and valid. I would add that even if a hostile attacker has access to the network, there are techniques to keep data secure; so "theoretically", an insecure wireless hotspot should not be a problem for data security. Transport layer security and end-to-end encryption should be used for all sensitive data; those technologies are specifically designed to keep information safe when transmitting it across "untrustable" networks. Unfortunately, few people are careful enough to always use the SSL / HTTPS / otherwise-secure version of whatever data protocol they are using; this is unfortunately especially true on intranets, where (for reasons unknown), users implicitly trust their network to be perfectly secure. So, in practice, a wireless hotspot often is the weak entry-point that allows data security to be compromised. For this reason, you should defer to the decision of your I.T. department, who we can only hope have made a realistic and competent assessment of the security risks to your particular organization. Nimur (talk) 14:13, 30 December 2010 (UTC)
Serious question : Do you think your IT department or network admin will be cool with it? If so, why not ask them? If not, you probably shouldn't do it. They should spot it, and will probably give you no end of grief.
But technically? Yea, that should work without any trouble. APL (talk) 23:04, 29 December 2010 (UTC)

URL is not available; why does this happen?[edit]

I may have asked this question in the past. Furthermore, it is related to one of the first questions I ever asked here, but I'm not going to go looking for that one right now.

Yesterday, and several times before, on library computers with Internet Explorer, I try to go to a site and the circle beside the name of the site just goes round and round with nothing coming up. I try to enter a new URL and get the messsage "[URL] is currently unavailable." The circle never stops rotating. I go to another screen, type the same "unavailable" URL and it comes up. In fact, when I try to go to the site I couldn't go to before, I can.

Now this is similar to what happens when the Internet goes down. The computer doesn't just go to the site because the Internet came back. The circle just continues to rotate and rotate.Vchimpanzee · talk · contributions · 19:44, 29 December 2010 (UTC)

This is easily explained by an overloaded switch/router in the library. Packets are getting dropped. Your request may have never made it out of the library. It may have gone out and the response got lost in the library. After a timeout (probably about 2 minutes), a re-attempt didn't get lost. -- kainaw 19:47, 29 December 2010 (UTC)
Well, why isn't it possible just to type in a new URL where the circle is constantly rotating? And why, if the Internet goes down, does the computer never "find" the site?Vchimpanzee · talk · contributions · 19:49, 29 December 2010 (UTC)
Because that isn't how the web browser was programmed to function. If the network is down (and I say network, not Internet, since the Internet never goes down), you won't find a site because your request will never reach the site. Further, you need to understand that you are usually making two network requests. One is to the nameserver to get the IP address of the site. The other is to the site itself. If either one fails, you get a hung request that needs to time out. -- kainaw 20:03, 29 December 2010 (UTC)
Well, yes, the Internet never goes down. That's just what people say. If no one can access the Internet at the library for whatever reason or for however long, that's what we say.
The only solution seems to be to click on the red X in the upper right corner because it never does time out. It just keeps on going and going.Vchimpanzee · talk · contributions · 20:12, 29 December 2010 (UTC)
If you don't mind, Vchimpanzee, I'm quoting you at Wikipedia:Trading card game/Action plan/Phase 2:Cards/Individual card proposals#Downtime. You've inspired a trading card. Bob the Wikipedian (talkcontribs) 07:09, 31 December 2010 (UTC)

Native Dalvik on a PC?[edit]

Would it be possible to run Android apps efficiently on a PC, by using a PC-native version of the Dalvik virtual machine that Android uses to run its apps? I know that the Android SDK has an Android emulator that emulates the Android hardware and processor, but emulating a different architecture is super slow; and since Android apps are packaged as interpreted bytecode anyway, simply porting the virtual machine to PC should be enough; emulating is unnecessary. -- (talk) 22:33, 29 December 2010 (UTC)


What does #! in a url for example!/123 mean? (talk) 22:35, 29 December 2010 (UTC)

"#!" does nothing as such. The "#" is the only significant bit: it begins the "fragment" of the URL, which is traditionally used to jump to a named place on the page. It is not passed to the server as the rest of the URL is. Its use in modern AJAX websites stems from the fact that it's visible to JavaScript, so e.g.!/marnanel requests the page "/" from, but the JavaScript on that page knows to look for "marnanel" (and in this case will display my Twitter timeline). The good side of these things is that you can link to a page and give instructions to JavaScript on it at the same time, and that the JavaScript can rewrite the URL in the address bar without causing the page to reload, so you can always bookmark the page and get back to where you were in the AJAX system. The bad side of these things is that you're effectively linking to the root page of the site every time, and there is no way for people who don't have JavaScript (they do still exist!) to get to the actual sub-page you wanted. Marnanel (talk) 23:03, 29 December 2010 (UTC)
What's the advantage to using a hash tag rather than a variable (e.g. It strikes me as odd to use the hash tag to pass variables, since Javascript should be able to read query strings, but server-side scripts can't read hash tags. --Mr.98 (talk) 01:35, 30 December 2010 (UTC)
Modifying the URL to change a variable would cause the page to refresh, which would remove many of the advantages of using AJAX. Modifying the URL to change the fragment (by assigning to window.location.hash) doesn't. Marnanel (talk) 03:23, 30 December 2010 (UTC)