Wikipedia:Reference desk/Archives/Computing/2009 March 28

From Wikipedia, the free encyclopedia
Computing desk
< March 27 << Feb | March | Apr >> March 29 >
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.


March 28[edit]

SolidWorks[edit]

Applying a cosmetic thread to a shaft part, should it be visible as such ? Swactive (talk) 04:03, 28 March 2009 (UTC)[reply]

I don't know about SolidWorks, but in solid modeling in general, you would need to add the thread material with a union, or remove material with a subtraction. It would be more complicated if you needed to do both to create the thread (in that case you might do better to start with a smooth shaft which is either smaller than the entire thread or larger than the entire thread, so a single union or subtraction can do the whole job). Now, as for visibility, I would expect it to show unless one of the following applies:
1) You are in a simplified display mode that doesn't show that level of detail.
2) It's an internal thread and can't be seen from your current point of view. This would also depend on the display mode. A hidden line removal view, for example, would hide those threads when viewed from the far side. StuRat (talk) 04:57, 28 March 2009 (UTC)[reply]

Dispose and Finalize[edit]

In the .NET Framework many classes have a Dispose method but do not have a finalizer or their finalizer does not call Dispose. This is especially true for GUI components like Button or MenuItem. Programmers should remember to free resources by calling the Dispose method, but if they forget the resources would be leaked. Why do GUI components not implement a finalizer? Thanks in advance. --wj32 t/c 06:04, 28 March 2009 (UTC)[reply]

A finalizer shouldn't be used to free resources, because an object might never be finalized, or even if it does, it might be a long time until it does. --76.167.241.45 (talk) 06:42, 28 March 2009 (UTC)[reply]
No. Programmers should always call the Dispose method, but if they forget there will be a resource leak. Even Microsoft says [1]:

Note that even when you provide explicit control by way of Dispose, you should provide implicit cleanup using the Finalize method. Finalize provides a backup to prevent resources from permanently leaking if the programmer fails to call Dispose.

The problem is that Microsoft does not follow its own guidelines; they don't implement finalizers for most GUI components. --wj32 t/c 07:24, 28 March 2009 (UTC)[reply]
I've never understood why Java and friends go to all the trouble of providing nice garbage collection but don't make it deterministic so you can do proper resource management with RAII. It's like they consider RAM to be the only garbage that matters. --Sean 14:44, 28 March 2009 (UTC)[reply]
To make finalization deterministic, the runtime environment either would have to run the garbage collector nearly every time a reference was reassigned or went out of scope, or would have to implement some form of reference counting. Frequent execution of the garbage collector would lead to unacceptable performance. Reference counting was used successfully in Visual Basic 6 and earlier, but it has its limitations. It does not detect inaccessible objects that mutually reference each other (e.g., A references B and B references A), and it does not work well in a multithreaded environment due to the need for mutex locks when accessing the counters. These were some of the primary reasons Microsoft used to justify the switch to garbage collection in .Net. See Reference counting#Advantages and disadvantages. The end result is that if we want deterministic freeing of resources in a garbage collection environment, we are stuck with manually tracking the object's lifetime using the dispose pattern. The advantage is that if we fail or elect not to do so, the resources will eventually be freed up. -- Tcncv (talk) 05:26, 29 March 2009 (UTC)[reply]

Flash and Java on 64-bit Linux[edit]

Flash and Java plug-ins do not load for me on Firefox. Tonight I started Firefox from the command line and noticed the following output, which doesn't normally appear when I start from a K-menu or quick-launch icon:

LoadPlugin: failed to initialize shared library /usr/lib/adobe-flashplugin/libflashplayer.so [/usr/lib/adobe-flashplugin/libflashplayer.so: wrong ELF class: ELFCLASS32]

LoadPlugin: failed to initialize shared library /usr/java/jre1.6.0_12/plugin/i386/ns7/libjavaplugin_oji.so [/usr/java/jre1.6.0_12/plugin/i386/ns7/libjavaplugin_oji.so: wrong ELF class: ELFCLASS32]

LoadPlugin: failed to initialize shared library /usr/lib/firefox-addons/plugins/libflashplayer.so [/usr/lib/firefox-addons/plugins/libflashplayer.so: wrong ELF class: ELFCLASS32]

LoadPlugin: failed to initialize shared library /usr/lib/adobe-flashplugin/libflashplayer.so [/usr/lib/adobe-flashplugin/libflashplayer.so: wrong ELF class: ELFCLASS32]

How do I fix this error? I'm using the 64-bit version of Kubuntu 8.04, and my processor is a Core 2 Duo, so I suspect I need to set the plug-ins to run in a backward compatibility mode. These are closed-source plug-ins of which no 64-bit version exists. NeonMerlin 07:15, 28 March 2009 (UTC)[reply]

If really no 64-bit versions for those plugins exist, then you would have to use a 32-bit version of your browser to use those plugins (you can install 32-bit programs in a 64-bit system, you know). However, this is not the case for those plugins. You can download the 64-bit Flash plugin for Linux here. And for Java, if you get the x64 version of Sun JRE (Java Runtime Environment) 6u12 or later, it will have a Java plugin. Alternately, other open-source implementations of Java like IcedTea also have plugins. --76.167.241.45 (talk) 07:31, 28 March 2009 (UTC)[reply]
It looks like those plugins are 32-bit. --wj32 t/c 07:42, 28 March 2009 (UTC)[reply]
I think the OP already knows that they are 32-bit, as he says "of which no 64-bit version exists." I guess the thing he needs to know is that 32-bit plugins cannot be used with 64-bit browsers; they have to be the same number of bits. --76.167.241.45 (talk) 18:29, 28 March 2009 (UTC)[reply]
The solution is to install the 32-bit firefox, which works fine on 64-bit linux and runs the 32-bit plugins without a problem. If we are lucky, there will be 64-bit plugins around the time 256-bit computing is standard. Well, if we are really lucky, nobody will be stupid enough to make websites that depend on flash and pdf by then. -- kainaw 22:00, 28 March 2009 (UTC)[reply]
I have 64 bit Firefox - and Flash and Java are working just fine. The Firefox Help/About... window says:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008070400 SUSE/3.0.1-0.1 Firefox/3.0.1
The plugins I have:
  • GCJ Web Browser Plugin (using IcedTea) 1.2
  • Helix DNA Plugin: RealPlayer GD Plugin-compatible version 0.4.0.626
  • Shockwave Flash 9.0 r124
  • Shockwave Flash 8.0 r99. Gnash 0.8.2, the GNU Flash Player


Before there were 64bit plugins available, I used to use NSPluginWrapper to use the 32 bit plugins. Didn't work for Java, but it did work for Flash just fine. I suggest using the 64 bit plugins though, if they're available. -- JSBillings 01:11, 29 March 2009 (UTC)[reply]
Wow! Adobe released an alpha version of the 64-bit flash player on Feb 24. That is utterly amazing. I gave up on them well over a year ago. At this rate, we'll likely see a beta version by 2011 and a full-functioning version by 2013. I know that is a long time, but it is a lot faster than many other companies provide support for Linux. -- kainaw 21:36, 29 March 2009 (UTC)[reply]
What poor support for Linux? There's still no 64 bit Java plugin (there is a JRE but it doesn't have a plugin AFAIK) nor 64 bit Flash plugin for 64 bit Windows browsers (either IE or Firefox) as far as I am aware. :-P Nil Einne (talk) 00:43, 30 March 2009 (UTC)[reply]

Installing Microsoft Office without a CD/DVD drive[edit]

My friend has bought a new netbook (an Advent with Windows XP) to replace their old, broken laptop. They now want to install Microsoft Office but the netbook doesn't have a CD/DVD drive. Is it possible to copy the contents of their MS Office install disk onto a USB stick and install it from there? Astronaut (talk) 11:50, 28 March 2009 (UTC)[reply]

Safest approach might be to make an ISO of the CD, put that on the USB stick, then mount that with a drive emulator... --98.217.14.211 (talk) 13:57, 28 March 2009 (UTC)[reply]
Astronaut, I think you can do that. I know for a fact that you can do that with the enterprise version of Office, but I am not sure with any other versions. Try it and let us know. ---J.S (T/C/WRE) 15:40, 28 March 2009 (UTC)[reply]
You can do it easily - there is no CD-check in any version of MS Office, so you can install it from CD- or DVD-drive, flash drive, over network or even from your hard disk drive. —Preceding unsigned comment added by 194.99.216.135 (talk) 16:27, 29 March 2009 (UTC)[reply]

IIT[edit]

Moved from Miscellaneous

I am doing my third year Bachelors in technology in mechanical engineering in some crappy college in Hyderabad,India.I have a lot of technological aptitude but due to my low thinking nature and laziness I couldn't make it to Indian Institute of technology.Now my Btech aggregate may be about 50%.I may at the most raise it to 65% by the time I complete my fourth year.I dearly want to work hard for GATE and get into IIT and do my MTech in IC engines.But will IIT accept a candidate with such a low score in BTech even if I pass GATE with an excellent score.Will it sideline me for a candidate with a good BTech score and a good GATE score? —Preceding unsigned comment added by 202.63.109.14 (talk) 11:12, 28 March 2009 (UTC)[reply]

To help you out, yes it is possible, I think (but I am not sure 100%). But why do you want to go to IIT anyway. There are far better universities in the world doing far better research in IC engines. You can try to go to other country and do research (Masters) in a better university. Try to do some good projects. It might help. - DSachan (talk) 23:54, 28 March 2009 (UTC)[reply]
This was probably best left at Misc IMHO or perhaps moved to Humanities. But regardless, although I don't know how difficult it is to get in to IIT I would presume it would be rather difficult to get in to these 'far better universities with far better research research in IC engines', particularly given that for a foreign student (as I would presume is the case), the OP would almost definitely want a scholarship (else it would be rather expensive) and scholarships for Masters are usually hard to come by anyway. I'm not saying to the OP it is hopeless, rather that I wouldn't expect too much from other universities and shouldn't set your sights too high, unless you're capable of self-financing. An alternative would be to try and work in the field first before you start off you Masters since that way you would have something else other then your grades Nil Einne (talk) 00:51, 30 March 2009 (UTC)[reply]

TRS vs TS jacks for headphones and amplifiers[edit]

I was checking out some guitar headphone amps and noticed that all of them have TS, rather than TRS connectors. Is it that headphones having 1/4" TRS connectors do not work with amplifiers and musical instruments, only ones having TS connectors do? An example of the scenario I would face would be to connect a headphone having a TRS connector (not a headphone amp) to my guitar amplifier's emulated headphones jack. Would this headphone work? --Leif edling (talk) 15:21, 28 March 2009 (UTC)[reply]

Root access for brain in a vat[edit]

If I'm a brain in a vat connected to a computer, then how do I gain root access to this computer and open a command-line interface? NeonMerlin 17:37, 28 March 2009 (UTC)[reply]

Accessing data files ... one moment please .... //full stop. We require more input to complete your request. Please specify any peripheral devices available to you. Please specify connection mode. Please specify the desired operating system you wish to access. You may wish to consult our CLTO (Command Line Technical Officer). BIOS unavailable at this time. Assimilation may not be possible without further input. /root function disabled /root access denied - Terminating connection ..... — Ched ~ (yes?)/© 18:44, 28 March 2009 (UTC)[reply]
You'd need a way to send data to the computer from the brain. I imagine something like Morse code would be doable today. That is, if the brain thought a certain thing, like "raise my (now absent) right leg", it would be detected by an electrode and register a "dot". If they try to raise their left leg, it's a "dash". Using this method the brain could send Morse code signals to the computer to get it to do what the brain wants. Perhaps we could then improve on this system and recognize 128 different signals the brain can send, and we would then have a 7-bit ASCII code, which would be just like typing at the keyboard. StuRat (talk) 23:19, 28 March 2009 (UTC)[reply]
  • by the way .. I love your user page Neon - absolutely great work! :) — Ched ~ (yes?)/© 00:05, 29 March 2009 (UTC)[reply]

i would like my brian to control the computer, i imagin i could surf the intert super fast and become super intelligent —Preceding unsigned comment added by 194.80.240.66 (talk) 08:06, 29 March 2009 (UTC)[reply]

There has been a very small amount of work done in this direction - Kevin Warwick at the Reading University in the UK has actually gone so far as to have simple neural implants performed on himself. He has the means to control simple external devices using his neural system and the ability to 'feel' external impulses supplied by a computer. When the computer activates the implant, he feels a tingling feeling run up and down his fingers. When he thinks about moving his hand - the computer can register that and do pretty much any simple control task. He demonstrated this by operating a robot hand somewhere in the USA from his lab in the UK over the internet. In principle this would enable him to do what you're thinking of - but right now, the best you'd get would be some kind of low speed 'morse-code' type of interface. Far from becoming super-fast or super-intelligent - it's just a very slow replacement for mouse and keyboard. But we ARE getting there - and probably in 20 to 30 years we'll have something a bit more dramatic and useful. SteveBaker (talk) 17:44, 29 March 2009 (UTC)[reply]
Though, frankly, with enough experience with a keyboard and mouse-like device, one can already surf pretty dang fast. As for super-intelligent... people do not seem to grow any more intelligent just because they can look stuff up quicker. Superficially they can appear to know more facts, but that's about it... intelligence is about raw processing. You probably can't upgrade that... --98.217.14.211 (talk) 00:02, 30 March 2009 (UTC)[reply]

Series of tubes[edit]

How many tubes are in a typical user's own personal internets, if they don't have a website number? 209.42.106.46 (talk) 17:39, 28 March 2009 (UTC)[reply]

I'm sorry, 'Senator' Stevens, you should do your own homework... uhh, legislative research... Freedomlinux (talk) 19:04, 28 March 2009 (UTC)[reply]
over 9000 —Preceding unsigned comment added by 82.43.88.87 (talk) 21:50, 28 March 2009 (UTC)[reply]
WHAT 9000?! --Alinnisawest,Dalek Empress (extermination requests here) 00:03, 29 March 2009 (UTC)[reply]
Usually they at least have an IP number of 127.0.0.1: the loopback, otherwise they could have uninstalled tcp/ip, it could be done on windows 98 if there was no network adapter. Graeme Bartlett (talk) 21:14, 29 March 2009 (UTC)[reply]
I can has moar trux plz? --70.54.192.144 (talk) 08:55, 3 April 2009 (UTC)[reply]

Random intractable all-browser failure on non-infected machine[edit]

I have spent many hours looking on forums for a solution, but to no avail. After about three years of smooth functioning, my T5010 eMachine suddenly developed this problem: After a period of time, all browsers will fail to bring up websites. Opening and closing a few programs will sometimes get browser functionality temporarily. Changing to a different browser does not help. Ultimately, rebooting is necessary. This is especially likely to happen when I view media, including YouTube video, or PDF files, and especially quickly if I bring up Windows Media Player.

At the same time, there is never any problem with FTP, Skype, or IM. There is no Internet connection problem.

The typical solutions (reboot the router, scan for infections) have had no effect. I have seen discussions of DNS resolution problems, but the solutions I've seen involve working with registry entries that don't match my hierarchy. There is no other problem on my machine, and no other problem with any browsers (e.g., they do not freeze or lose any options). I'm using Google Chrome and IE8 currently. I installed Cacheman on the machine some time prior to this happening, but they say there are no reports of problems like this. Uninstalling did not help. I have reinstalled it.

Can anyone point me to a resolution to this kind of problem?

Thanks for any ideas!76.212.141.50 (talk) 19:26, 28 March 2009 (UTC)[reply]

If the problem only affects your web browsers, but not other internet programs, something may be causing problems with port 80 connections. Consider checking firewalls or security settings on your computer or router. --Bavi H (talk) 01:38, 29 March 2009 (UTC)[reply]


Well, first you should probably narrow down whether it's a DNS problem or an HTTP problem. When you type in a website address that you haven't visited lately, does it fail immediately, or does it spend a while trying to connect before failing? If it fails immediately, it's probably a DNS problem. As a first step, I'd try changing your DNS servers in the IPv4 settings on your network connection. On the other hand, if the browser takes a while before it fails to display the website, then you probably have an HTTP connectivity problem, where your http traffic is being dropped for some reason. If this is the case, it's possible that https connections might still work. Try going to https://mail.google.com (or another https site you know) and see if that works.
I have to say, this probably won't be an easy problem to figure out. There's no reason I can think of that your media programs should break your web browsers. It could end up being a corrupted .dll, which you'd never be able to figure out without reinstalling everything on your computer. Still, don't give up, maybe it'll be something easy to fix. Indeterminate (talk) 01:59, 29 March 2009 (UTC)[reply]


Uninstall any firewall software, then from the run window:
  • netsh winsock reset catalog
Reboot. 24.76.160.236 (talk) 06:36, 29 March 2009 (UTC)[reply]
Uninstalling the firewall is generally a bad idea. --h2g2bob (talk) 16:12, 29 March 2009 (UTC)[reply]
Thanks for the ideas. Based on your comments and what's happening, then it appears to be a DNS or DLL problem. I tried DNS fixes without result. So maybe I'll be reformatting the HD. But does this effect ever come from Internet providers squeezing bandwith when users download a lot of video or other media? I was watching a lot of YouTube and DemocracyNow, etc.76.192.217.35 (talk) 19:02, 1 April 2009 (UTC)[reply]