Jump to content

Wikipedia:Reference desk/Archives/Computing/2009 April 19

From Wikipedia, the free encyclopedia
Computing desk
< April 18 << Mar | April | May >> April 20 >
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.


April 19[edit]

Gateway Laptop completely freezes when AC cable is unplugged.[edit]

Hi everyone,

Somewhere around half of the times that I unplug my AC plug from my laptop when it's turned on the computer completely freezes. Clock doesn't move, mouse stops, everything. The only way to fix it is to hold down the power for a few seconds until it turns off then turn it back on.

I can't think of anything I did that might have caused this, and I've ran numerous virus/spyware scans (ad-aware/avg/hijackthis). This leads me to believe something in the hardware is failing, or it's some setting I changed somehow without knowing.

The fact that it doesn't always happen bothers me, also rarely when I remove or plug in a USB device while the laptop is on, it does the same thing.

I have a Gateway M-6851, running Windows Vista SP1. Any ideas? Thanks!

Chris M. (talk) 00:19, 19 April 2009 (UTC)[reply]

I'm no expert, but it sounds like it's causing a momentary power fluctuation - which sometimes is bad enough to crash the laptop but sometimes not. Exxolon (talk) 02:38, 19 April 2009 (UTC)[reply]
That's just what I was thinking. Try unplugging the other end of the power cord first, and see if that makes a difference. Also, if you have an outlet hooked up to a wall switch, try turning it off at the wall switch before you unplug. You could also use a power strip and flip that switch off before you unplug. StuRat (talk) 15:20, 19 April 2009 (UTC)[reply]

Awesome window manager[edit]

I need some help with the Awesome window manager. I basically want it to look like this. I'm looking for the name of that font, what terminal/console that users is using and what the best file manager would be for Awesome. File managers always look horribly when I use them with Awesome. --BiT (talk) 00:51, 19 April 2009 (UTC)[reply]

Also, can someone tell me what file managers are being used in the aforementioned link and in this one? They both seem to have the GNOME icon but they don't look like Nautilus or anything like that. --BiT (talk) 01:06, 19 April 2009 (UTC)[reply]
Pretty sure the file manager is Thunar. It's the default file manager for Xfce. Indeterminate (talk) 00:41, 20 April 2009 (UTC)[reply]
Are you sure? I've tried Thunar and the form looks rather like it but as you can see the Thunar manager doesn't have the GNOME icon in the corner. --BiT (talk) 01:12, 20 April 2009 (UTC)[reply]
Yep, I installed it on my ubuntu system here and it's got a little gnome icon in the corner. I don't know what build they're using in that picture. Indeterminate (talk) 01:40, 20 April 2009 (UTC)[reply]
But I'm currently using Thunar with Awesome and there isn't a GNOME icon there? Also, have you got any idea what theme those people are using? --BiT (talk) 01:47, 20 April 2009 (UTC)[reply]
Hmm, strange. Maybe it depends on what distribution you're using and what version of Thunar. Anyway, sorry I can't help much, I haven't used AwesomeWM before. Indeterminate (talk) 09:54, 20 April 2009 (UTC)[reply]

Installing MakeHuman[edit]

I've just downloaded MakeHuman, and extracted all the files from the zipped folder, now how do I actually install it? (I'm running Windows XP SP3). Thanks! 203.40.181.54 (talk) 01:16, 19 April 2009 (UTC)[reply]

I believe it's a "plugin" for the blender (software) 3D modeller - right? That being the case, I think you need to find the blender instructions for installing plugins from the blender website - at which point (hopefully) it'll be obvious. SteveBaker (talk) 00:30, 20 April 2009 (UTC)[reply]
Umm... I don't think it is, Wikipedia says it is a stand-alone piece of software (http://wiki.riteme.site/wiki/MakeHuman), not a plug-in for anything else... 144.138.21.31 (talk) 03:38, 20 April 2009 (UTC)[reply]
Hmmm - evidently it WAS a blender plugin back in 2005 (which is about the last time I played with it) - but has since gone stand-alone - so at least I'm not completely crazy! SteveBaker (talk) 21:19, 21 April 2009 (UTC)[reply]
[Check this out]. Apparently you need to install the Microsoft package and then double-click the makehuman.exe file. Indeterminate (talk) 09:58, 20 April 2009 (UTC)[reply]

Learning VisualBasic[edit]

I downloaded the visual basic thingy...from...somewhere (it was a long time ago). Is the in-built tutorial (which, from what I did, is pretty in-depth) a particularly good or bad way to learn my first programming language? I ask because I'm unable to learn anything from it. Vimescarrot (talk) 12:40, 19 April 2009 (UTC)[reply]

I've never seen this tutorial but the language I'm most familiar with is visual basic and I've done a lot of work with it. After I had learned some I had grabbed VB 6 for dummies (on amazon), which I thought was impressively well written and easy to understand, even though I had done a lot of it, the parts that were new were very clear. If you're using a new version (.net, or 2008 for example) there are equivalent books I assume would be valuable. On the other hand, a free but very effective tool to learn visual basic is the wikibook. Several of my friends learned with this source (link) and feel that they understand it well enough to use it. It also goes into some more advanced things the dummies books wouldn't, which is nice for the future. Chris M. (talk) 15:10, 19 April 2009 (UTC)[reply]
Thank you for that information but it didn't actually answer the question I asked. ;-) Vimescarrot (talk) 19:05, 19 April 2009 (UTC)[reply]
Sorry, the answer was more subtle then I had intended. You said that you weren't able to learn anything from it. I said that it's not hard to learn from several other sources, and so by saying that I was implying that it wasn't a particularly good source, or I would expect you'd have more success. 74.218.161.17 (talk) —Preceding undated comment added 19:56, 19 April 2009 (UTC).[reply]
But the logic of that is flawed. It may be my sheer ineptness which prevents me from learning, not the tutorial. Vimescarrot (talk) 21:11, 19 April 2009 (UTC)[reply]
I don't know the answer - but unless you have a specific need to learn VB (eg for your job) - I would pick a different language to learn as your first. VB is an evolutionary dead end. Learn Java first. SteveBaker (talk) 00:31, 20 April 2009 (UTC)[reply]
"VB is an evolutionary dead end." Care to back that up? Granted, I haven't done any VB development in years, but I still see job ads for VB and Microsoft keeps updating it so I'm not sure how VB is an evolutionary dead end. A Quest For Knowledge (talk) 01:28, 20 April 2009 (UTC)[reply]
I was recommended VB as an easy language. But I'd be happy to hear reasons to learn something else. Vimescarrot (talk) 10:54, 20 April 2009 (UTC)[reply]
Well, the main problem I have with VB is that it combines legacy features from VB6 with modern OO features and Microsoft provides no real distinction between the two (i.e. Len(myString) versus myString.Length()). For those that care about code quality, things like that will drive you nuts. Another option is Small Basic.[1] What kind of applications do you want to write? A Quest For Knowledge (talk) 12:20, 20 April 2009 (UTC)[reply]
I wasn't thinking of writing any kind of application. I just wanted to learn it. I spend all of my free time on my computer; I thought it was a useful, non-timewasting thing to do...(I'm happy to hear the answers to this, but may I point out my original question remains unanswered? :) ) Vimescarrot (talk) 14:07, 20 April 2009 (UTC)[reply]
Think up a specific application that you could use. In the work it takes to figure out how to implement it, you'll end up learning a ton. There's really no other way I know of to do it—you have to jump in with two feet. Feel free to ask on here for good "beginner" applications (don't try and write a BitTorrent client right off the bat!). How about a simple address book? Tackling that will show you the basics of GUI development, data processing, maybe even some mild databasing. All good things to know how to do! --98.217.14.211 (talk) 22:48, 21 April 2009 (UTC)[reply]
(outdent). Oh, you want your question answered? Why didn't you say so!  :) OK, which tutorial are you referring to? Is it the "Visual Basic Guided Tour" found in help? If so, no it doesn't look like a good way to learn programming. If it's "Creating Your First Visual Basic Program" also found in the help, that looks a little better. I recommend going out and buying an intro VB book. Alternatively, you can take an intro to programming class. A Quest For Knowledge (talk) 14:18, 20 April 2009 (UTC)[reply]
Thanks. I can't remember what the tutorial was; it was on an old PC, so I don't actually have access to VB now anyway. No doubt I'll be just as incompetent at it no matter what method I try to use to learn it. Vimescarrot (talk) 17:04, 20 April 2009 (UTC)[reply]
  • The first programming language I learned was Visual Basic.NET. It's a very common beginner's language. It is also very powerful. It makes learning other languages much easier, so there's no reason not to learn it. Visual Basic 6 is much different from Visual Basic.NET, by the way, and Microsoft no longer supports VB 6. You can't do nearly as much in VB 6 as VB.NET. You can do almost anything you want in Visual Basic.NET -- anything you can do in C++ or Java. In fact, unlike C++, it has built-in garbage collection. You can also use it in web pages via ASP.NET. The programs run very fast, too, because they use the .NET Framework, although the end user has to have the .NET Framework installed in order to run your apps. It's very intuitive, although I wouldn't mind having C-style braces to aid code readability. Multi-line comments would be nice, too. My favorite part of coding in VB.NET is the IDE -- Visual Studio. I've tried Eclipse for Java, and that is one of the biggest pieces of shit on planet Earth. (No wonder they give it away for free.) Visual Studio's debugger tells you exactly what the problem is and highlights the error. The auto-complete function saves you a lot of time, too.--Tim james 5 (talk) 17:36, 20 April 2009 (UTC)[reply]
VB6 is in my estimation reasonably easy. VB.NET is not as easy but it is more regularly structured. Languages that are more regularly structured (Actionscript, as one random example) are in my opinion a LOT easier than either VB or VB.NET. --98.217.14.211 (talk) 22:45, 21 April 2009 (UTC)[reply]
This is purely WP:OR (although I am a published author in this field), but a lot of people who say that VB6 is easier than VB.NET started learning VB with VB6. Thus, VB6 seems easier because they already knew it. IMHO, if you took someone who was completely new at VB, VB.NET would be easier to learn than VB6. A Quest For Knowledge (talk) 12:45, 22 April 2009 (UTC)[reply]

Creative SoundBlaster Live! Sound Problems[edit]

Hi.

I have a Creative SoundBlaster Live!, its not the one with the full chip, but the cut-down version. (I like the MIDI SoundBank manager better on this version.)

I have two problems with this sound card which cropped up last year. I was on XP SP2 and it worked fine, upgraded to SP3 and it was still fine for a while, but then these problems started appearing. Me being the type of person I am, I had to re-install Windows after fiddling with it. I am now using XP SP2 again and the problems are still here.

1.) If I have my sound volume very low, the sound card will actually turn its self off. i.e. nothing plays, not even the small buzzing that usually comes out of speakers. The only way to cure this is to move the main slider (called playback) on the Mixer up to a higher level, let go of the mouse and it plays the XP error noise (like it should) and then move it back low again.

2.) If I use certain programs then my P.C. after a little while, randomly each time between about 10 and 30 seconds, will pause with the sound jamming and playing the last "second" over and over again. The only way to get rid of this is to do a hard reboot.

Known programs that cause this error:

Audacity - version 1.2.6 (Recording or Playing), Notation Player - version 2.1.2

It might help to know this piece of information. Its a nightmare trying to find drivers from Creative. They have this soundcard in about 5 or 6 different varieties. It is possible I have the wrong drivers installed. I used Creative's Auto-Update service to determine what my soundcard was, and then manually downloaded the drivers from their website. I manually downloaded them because Creative seems to not Auto-Update everything like it claims to.

I have disabled the onboard audio, and as this sound card wasn't with the P.C. (Its basically been built from scratch, but with HDD and RAM from an older P.C. which used an onboard chip. The old sound drivers (C-Media) won't uninstall and that could be the problem. Everytime I go to uninstall them it says uninstalling and then asks to re-boot. When it boots its still there in the Control Panel. I have done this under my account, in safe mode using the Administrator account. and using TuneUp Utilities 2008 to try and remove it.

If anyone knows what could be the problem I would be grateful to know your thoughts. Thanks. Elven Spellmaker (talk) 13:06, 19 April 2009 (UTC)[reply]

I've owned almost every Creative soundcard since the Soundblaster 1 and the most joy I ever had was with the SBPro. It was the most compatible card ever, and it worked until I had to retire it. Ever since, I've found all SB cards deteriorating over time... ranging from annoying little sound crackles to the computer not even picking it up. I think your card has had its life (since it did work at one point with XP). Use your onboard sound... this has caught up over the years to be as good to sometimes better than Creative's mid-range offering. Creative's top-end is for a minority of audiophiles or for people with extra cash. On one of my older computers, I've thrown out the Audigy 2 and enabled the onboard 6 channel sound - and it actually sounds better, not to mention some games actually picking up the 3D sound. Onboard is also more efficient as there is no overhead of having to use the PCI bus. Sandman30s (talk) 14:41, 19 April 2009 (UTC)[reply]
I would use my Onboard sound, if I didn't use MIDI so much. The general MIDI DLS that Windows uses is appalling. Also I think that the C-Media drivers might confuse the onboard chip. Elven Spellmaker (talk) 16:17, 19 April 2009 (UTC)[reply]
Re the drivers, the only way would be to delete the drivers themselves after removing all C-Media entries from the registry. You can always download Yamaha/Roland soundfonts (not free but worth it and cheaper than buying a soundcard) if the default ones are that bad. I thought that the default Windows General MIDI samples (in XP onwards) have always been better than the default AWE32/Audigy/Live! soundfonts anyway. Good luck, elven friend! Sandman30s (talk) 18:49, 19 April 2009 (UTC)[reply]

what's the cheapest fm radio attachment that plugs into the BOTTOM of an iPod ie completely portable (not lighter jack for the car thing)[edit]

Which one is the cheapest fm radio attachment for the iPod that just plugs into the bottom of it in a portable way, ie suitable for just carrying with you in your purse? 79.122.6.184 (talk) 14:38, 19 April 2009 (UTC)[reply]

Here. Five bucks. Add some duct tape if you want portability. F (talk) 10:19, 21 April 2009 (UTC)[reply]
Or if you just consider duct tape to be a fashionable addition. :-) StuRat (talk) 18:49, 23 April 2009 (UTC)[reply]

Script to replace an image[edit]

Resolved

I'd like to write a greasemonkey script that will replace a certain image on a webpage, say for example the Wikipedia Globe logo with another image of my choice. I'm still a n00b at userscripts, so any help would be awesome. Thanks —Preceding unsigned comment added by 82.44.54.169 (talk) 15:08, 19 April 2009 (UTC)[reply]

Never mind guys, I worked it out myself
You can also use My Image Here if you don't want to write scripts. F (talk) 10:21, 21 April 2009 (UTC)[reply]

Script to replace an image (part 2)[edit]

I need some help with writing a greasemonkey script. I thought I had it figured out, but I just can't seem to make it work. I'd like the script to replace any instance of a certain image on a webpage with another image of my choice. So for example, on this page I might like to replace this image and this image with this and this

From looking at other userscripts, I've come up with:

var findString = ['http://www.ucmp.berkeley.edu/geology/mag_anom.GIF']; // array of image src
var newString = ['http://upload.wikimedia.org/wikipedia/commons/3/37/2_russian_street_cats-crop.jpg']; // array of new image src

var findString = ['http://www.ucmp.berkeley.edu/geology/curr2.JPG']; // array of image src
var newString = ['http://upload.wikimedia.org/wikipedia/commons/9/9b/Domestic_cat_cropped.jpg']; // array of new image src

var allImages, thisImage;

allImages = document.evaluate(
    '//img[@src]',
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);

for (var i = 0; i < allImages.snapshotLength; i++) {
    thisImage = allImages.snapshotItem(i);
    for (var j = 0; j < findString.length; j++) {
        if (thisImage.src.match(findString)) {
            thisImage.src = thisImage.src.replace(findString[j], newString[j]);
        }
    }
}

but it's not working. What do I need to do? Many, many thanks for any help with this —Preceding unsigned comment added by 82.44.54.169 (talk) 18:52, 20 April 2009 (UTC)[reply]

Here's a working version without the XPath stuff:
// a hash table where the images we want to replace are the keys,
// and the replacement images are the values
var substitutions = {
    'http://www.ucmp.berkeley.edu/geology/mag_anom.GIF':
            'http://upload.wikimedia.org/wikipedia/commons/3/37/2_russian_street_cats-crop.jpg',

    'http://www.ucmp.berkeley.edu/geology/curr2.JPG':
            'http://upload.wikimedia.org/wikipedia/commons/9/9b/Domestic_cat_cropped.jpg'

};

var allImages = document.getElementsByTagName('img');
for (var i = 0; i < allImages.length; i++) {
    var thisImage = allImages[i];
    var subst = substitutions[thisImage.src];
    if (subst)
    {
        // we want to create a new image rather than modify the old
        // one's src in order to get the width and height of the new image
        var newImg = new Image();
        newImg.src = subst;
        thisImage.parentNode.replaceChild(newImg, thisImage);
    }
}
--Sean 20:43, 20 April 2009 (UTC)[reply]
Thank you! :D —Preceding unsigned comment added by 82.44.54.169 (talk) 22:31, 20 April 2009 (UTC)[reply]
It was my pleasure. Plus I was on the clock. Apparently the only kind of programming I enjoy is WP:RD/C requests. --Sean 02:25, 21 April 2009 (UTC)[reply]


Script to replace an image (part 3)[edit]

Last question, I promise! I'd like to achieve something similar to this script, but instead of just google it could be modified to work on any image on any page. Say for example I wanted to replace the cnn logo with a selection of randomly changing images. Many thanks, not only for this question but to all those who helped with my other questions too! WP:RD rules! —Preceding unsigned comment added by 82.44.54.169 (talk) 07:26, 21 April 2009 (UTC)[reply]

Can't you just change the @include line to "http://*/" or "http://*.*/" or something like that? --Sean 13:00, 21 April 2009 (UTC)[reply]
hmm, I've been mucking about with it, but on other sites it just displays the images (the google logos in default state) in the top left hand corner of the page, or seemingly chooses a random image to replace. I'd like the option to replace a specific image of choice. I hope I'm not asking too much, or have I expended my question quota! Don't worry I do answer questions too —Preceding unsigned comment added by 82.44.54.169 (talk) 13:18, 21 April 2009 (UTC)[reply]
You should put in some logic along these lines:
if (document.URL.indexOf("http://cnn.com") == 0)
{
   // replace CNN's logo here
} else if document.URL.indexOf("http://google.com") == 0) {
   // replace Google's logo here
}
And so on. For followup questions like these, you should just add on to the original query. --Sean 14:12, 21 April 2009 (UTC)[reply]
I've condensed the question to one heading. Sorry to be a complete annoyance, but I really have no javascript knowledge at all, and I'm not sure how to use those lines of code you provided. They don't work on their own and I don't know how I should integrate them into the google image script.

garage door opener, forgot code[edit]

I need some help reseting the code on my garage door i can't figure out how. thanks for your help, -Rob 64.198.92.180 (talk) 21:16, 19 April 2009 (UTC)[reply]

Garage door opener: Sears Craftsman 41a5021-2b Wireless outdoor keypad: Sears Craftsman 132b2171-2 —Preceding unsigned comment added by 64.198.92.180 (talk) 21:16, 19 April 2009 (UTC)[reply]

I don't know about that specific opener - but on mine there is a reset button on the motor housing - you have to bring all of the remotes to the garage with the door shut, press and hold the button for (IIRC) 30 seconds and all is well. But I don't know specifically about yours - the procedure might be way different. SteveBaker (talk) 00:25, 20 April 2009 (UTC)[reply]