Wikipedia:Reference desk/Archives/Computing/2009 June 18

= June 18 =

HTML page shown as webpage
I'm trying to alter a webpage (actually just a Google Search page) to add some humorous links/words/and other stuff to send to a mate as a joke. Just experimenting with HTML and stuff. However, I can't get the page I've made to load as a webpage. I have copied and pasted the source code and done my little edits, but when I try to open them in Chrome they just display as source code. I have actually done this before but can't see why my method is not working anymore. Anyway, does anyone have any idea of how to do this? --KageTora - (영호 (影虎)) (talk) 08:21, 18 June 2009 (UTC)
 * Are you sure the document is saved as .htm or .html? If you are sure it is, try opening it in Firefox or Internet Explorer. 144.138.21.83 (talk) 09:04, 18 June 2009 (UTC)


 * I think the 'save as HTML' bit might be the problem, even though the file shows up with a Chrome icon. Firefox and IE both display the source code when I try to open it. --KageTora - (영호 (影虎)) (talk) 09:22, 18 June 2009 (UTC)


 * Have you verified that the basic structure is there - opening and closing html tags, surrounding a head section and a body section? Those are the fundamental pieces that have to be there.  -- LarryMac  | Talk  11:37, 18 June 2009 (UTC)
 * What are you editing it with? Right click on it, choose 'Open with...', selected 'Notepad', check it has stuff in, go to 'Save As', type in 'filename.htm', change 'Save as type' to 'All files' and click 'Save'. Then try again. What happens? A le_Jrb talk  11:52, 18 June 2009 (UTC)


 * Sounds like it is being saved as a txt file. Windows likes to hide extensions, so you save it as "myfile.html" and it actually saves it as "myfile.html.txt" and then hides the txt from you when you view the files. 67.43.242.174 (talk) 02:04, 20 June 2009 (UTC)

Force to use proxy
I'm looking for program that allows me to set a proxy for a program that does not support proxies. Basically the program does not have proxy settings page, but I need the program to connect to the proxy —Preceding unsigned comment added by Flamefireforcefield (talk • contribs) 10:39, 18 June 2009 (UTC)


 * If the OS is Windows and the proxy is SOCKS, you can use SocksCap. -- BenRG (talk) 11:43, 18 June 2009 (UTC)
 * What's the program you're trying to use and what's the type of proxy (or the port number it runs on) that you're trying to use? ZX81  talk  14:51, 18 June 2009 (UTC)
 * Another option is Proxyfirewall. It is currently in Beta, but i found it to be a great help when i needed to route different programs over different connections. Excirial ( Contact me, Contribs ) 08:02, 19 June 2009 (UTC)

.svg file
how to open .svg file(images)??Shraktu (talk) 11:06, 18 June 2009 (UTC)


 * Firefox, Inkscape, CorelDraw, GIMP. 87.113.134.218 (talk) 11:31, 18 June 2009 (UTC)
 * Opera (web browser) and Google Chrome will do dynamic svg. Even MS IE can be got to display it but you've got to download a plugin and it tries to make life difficult. Dmcq (talk) 13:45, 18 June 2009 (UTC)
 * I have been editing them with wordpad. Windows Notepad cannot handle the long lines. Graeme Bartlett (talk) 10:41, 21 June 2009 (UTC)

Power cycling to drain the capacitors
In a recent thread someone mentioned unplugging a router to discharge the capacitors. I've also heard that advice—if you're having problems with your home connection, unplug the router, wait 30 seconds, then plug it back in. Major ISPs advise people to do it. But I can't for the life of me imagine how it would help. Are the power supplies on home routers so cheap that they go into some kind of failure mode that can only be fixed by draining the capacitors? And how exactly does that lead to connection problems? Or is it just a rain dance? -- BenRG (talk) 13:41, 18 June 2009 (UTC)


 * There is actually a difference - at least in some routers. If you reset a router without removing the power - or if you remove the power just several second, the router will perform a Warm reboot, also known as a soft reboot. Most routers will behave as if the power accidentally fell away, or as if someone fell over a cable. It will not do a full reboot cycle, and instead act as if it never has been shut down


 * If you wait longer, the router will perform what is known as a cold reboot, also known as hard reboot. The modem will then act as if it has only just been started after having been offline for an extended period of time. Most times this means a full system check and a full boot cycle.


 * The difference? It varies per router. Most times it will involve the router using its stored RAM which is much faster then reloading the settings from flash memory. In easy terms: The router will come back up in the same state as it went down, so if there is a software error it will still be there. On a cold reboot the modem will reload the settings from flash memory. This is slower, but it means it will start completely anew, as opposed to keeping its old status. Excirial ( Contact me, Contribs ) 14:26, 18 June 2009 (UTC)


 * To illustrate this: Shut down your router and quickly start it again (press the power button fast, or un- and replug as fast as possible). If you time the time between pressing the power button and it being online again - Most routers have indication lights -, you will see that it is marginally shorter as compared to cases where you leave the router down for extended periods of time. Excirial ( Contact me, Contribs ) 14:30, 18 June 2009 (UTC)
 * I guess I can believe that a shorter power outage would lead to a "warmer" reboot, but I still don't see how a cold reboot would help resolve problems. I promise you it has nothing to do with reloading data from flash or battery RAM. That will happen on any kind of reboot. -- BenRG (talk) 10:45, 19 June 2009 (UTC)


 * I think the reason ISPs tell their users to reboot their router is literally to make sure that the router hasn't crashed and to restart it if it has. I've personally seen that the cheaper the router is then the more frequently it will hang/lockup. It's just the old IT solution "Have you tried turning it off and on again?" ZX81  talk  14:58, 18 June 2009 (UTC)


 * Yeah, many cheap routers have a tendency to crash and often lack mechanisms to reboot themselves. Some have a little reset button on the back, but asking the customer to just unplug it is usually easier. This applies to Cable / DSL modems too, though the reasons for their being reset may be more than just a simple crash (ie. my response to an above question; if you connect a new computer to a cable modem and you've only got one IP address, you generally have to reset it in order to get an address for that second machine). -- Consumed Crustacean (talk) 18:34, 18 June 2009 (UTC)
 * I heard from someone who used to work at the helldesk that it also bypasses the need to ask "Is your router plugged in?" to a customer. Asking that is equivalent of telling the customer that he's an idiot and puts him in hostile mode, so asking someone to power cycle forces a check of the mains power connections with no anger. Another way of asking the same question is "Is your router connected directly to the wall, or through some sort of power strip?" Tito xd (?!? - cool stuff) 18:42, 18 June 2009 (UTC)
 * As someone with experience there, that was definitely a benefit. Routers are definitely capable of crashing though, and I've had personal experience with two crappy routers which needed to be reset far too frequently, so it's not strictly a trick. And because you can't really see the status of a customer's router, this one would kill two birds with one stone. -- Consumed Crustacean (talk) 18:50, 18 June 2009 (UTC)


 * I wasn't really wondering about the power-cycling part, I can imagine various reasons for that. It's the "wait 30 seconds" part that I don't understand. -- BenRG (talk) 10:45, 19 June 2009 (UTC)
 * Another reason (speculating here) might be that 30 seconds makes sure the modem at the other end notices the connection has been dropped so it'll reset itself. 62.78.198.48 (talk) 11:05, 19 June 2009 (UTC)


 * Because users can't count— 30 seconds ensures they turn it off for at least ten seconds. You want the power off long enough for the RAM to clear so that you get a clean boot on power-up. ---— Gadget850 (Ed)  talk 11:45, 19 June 2009 (UTC)
 * Do you have a source for the assumption that RAM is in a specific state when power is turned on, instead of containing random bits? This theory also assumes the modem's programmers were pretty poor coders; a programmer wouldn't assume freshly acquired memory (either on the stack or on the heap) to have any particular value. 62.78.198.48 (talk) 06:03, 20 June 2009 (UTC)

Simple MIDI Software?
I just bought a very nice MIDI keyboard (like a USB keyboard, but with piano-like keys), and want to create music. The software that came with the keyboard is rather complicated, so I am searching for a simpler application. I want a easy-to-use Windows Vista compatible application that I could make one myself, but I would prefer not to (to save time, for surely there must be such a simple application available already). --Andreas Rejbrand (talk) 15:04, 18 June 2009 (UTC)
 * plays tones using the computer's speakers when I press the piano keys, and
 * is able to save these sequences of notes as MIDI (SMF) files.
 * Is that all? Surely you'd like to do multi-track recording, no? Anyway, the program you're looking for is called a sequencer, we have a List of MIDI editors and sequencers, and I have used Cakewalk a lot some years ago (which now has changed name to Sonar). And if you're able to write a sequencer, I wouldn't be surprised if you managed to figure out how to use the software that shipped with your keyboard ;-). --NorwegianBluetalk 17:31, 18 June 2009 (UTC)
 * No, one single track is enough for me (a beautiful melody needs only one single track). The point is that I am quite used to (for instance, multimedia) programming, which I know almost nothing at all about music... So all these features in the usual software, that I will probably never use, prevent me from simply recording my sequence of notes... --Andreas Rejbrand (talk) 21:49, 18 June 2009 (UTC)


 * I have found Anvil Studio to be sufficient. --Andreas Rejbrand (talk) 14:09, 19 June 2009 (UTC)

Greasemonkey

 * When is Greasemonkey first appearing in internet? I know version0.2.5 is released on 20050328, but that is not the first version. --Shyangs (talk) 18:00, 18 June 2009 (UTC)
 * I'm not entirely sure, but I can't seem to find any info on earlier versions. It's possible they were never publicly released 8I.24.07.715 (talk) 19:06, 18 June 2009 (UTC)
 * There is an external link(CNET News) in the Greasemonkey article. The publish time of the news is earlier than 20050328, so I think the earlier versions have been publicly released. --Shyangs (talk) 19:42, 18 June 2009 (UTC)

Java Programming: Dividing up and Image
Hi. I need to divide up a BufferedImage (or just a regular Image) in java into multiple images based on my discretion. I can provide the coordinates to divide them at, but how do you suggest I divide up the Image? (The images will be of different sizes, but all will fit together (no part of the image will be left out).

For example (the image could be divided up like this) (view it in edit mode): __________________ | |        | |   | |__|________|_|___| |__|________|_|___| |  |        | |   | |__|________|_|___| |  |        | |   | |  |        | |   | |  |        | |   | |__|________|_|___| |  |        | |   | |__|________|_|___|

Thank you. --156.40.92.164 (talk) 18:11, 18 June 2009 (UTC)


 * I just fixed the layout so it is visible in regular, not just edit mode. -- k a i n a w &trade; 18:55, 18 June 2009 (UTC)


 * (it's been a few years since I did this kind of thing in java, but) I think you'll need to create a bunch of new BufferedImages, one for each slice. Then obtain the WritableRaster for the new image you've made (and keep another WritableRaster around for the parent image).  Then call the destination WritableRaster's setRect method, to blit image data from the parent to the child. 87.113.134.218 (talk) 19:08, 18 June 2009 (UTC)


 * My explanation was overcomplicated - you can just call .getSubimage on the loaded image, which makes a fresh BufferedImage, than you can write out (so there's no need to rake around with WritableRaster). 87.113.134.218 (talk) 10:36, 19 June 2009 (UTC)


 * This Perl script does what you want, which should give you an idea of how to do it in Java. --Sean 20:41, 18 June 2009 (UTC)

Thanks guys, but can you help me translate it to java? I'm not too familiar with perl. --156.40.92.164 (talk) 19:22, 19 June 2009 (UTC)

Confused about my graphics card resolution
Can my Matrox G450 video card do a 14400x900 resolution or not? The list of resolutions that my computer gives does not include that resolution, but this quote from a forum suggests it can: "The native resolution of this monitor is 1440x900, but that resolution is [currently] not available to me. The video card is a Matrox G450, and I know that it can do that resolution because I was running it under Windows XP once I found the right driver for it (from ViewSonic, I think)." From http://www.techsupportforum.com/alternative-computing/linux-support/201818-solved-cannot-get-right-resolution-lcd-monitor.html

How is that explained? Is it that the list of alternative resolutions my computer shows are those which are suitable for the default CRT monitor that is currently plugged in, and that when I replace that with 14400x900 native resolution LCD, then another set of resolutions will be available? I have XP sp3. 78.147.130.36 (talk) 20:56, 18 June 2009 (UTC)
 * Usually the list of resolutions displayed (in XP SP3) depends on
 * a. the graphics card (even the simplest ones nowadays will do practically any resolution)
 * b. the monitor you have plugged in - eg if you have a 1024x768 monitor plugged in XP will display resolutions upto but not exceeding 1024x768..
 * This link http://www.matrox.com/graphics/en/products/graphics_cards/g_series/g450pci/ suggest a matrox g450 pci can exceed that resolution,(maybe not in digital)
 * So yes - plug in a 1440x900 monitor and that resolution will turn up. —Preceding unsigned comment added by 83.100.250.79 (talk) 22:30, 18 June 2009 (UTC)

(By the way the graphics card can usually detect the specs of the monitor using Extended display identification data which is carried by pins 12 and 15 on a VGA connector - if you were suprised that the computer knew about the monitor - I was)..83.100.250.79 (talk) 22:42, 18 June 2009 (UTC)

Two Vista issues
(Note: I have not used Windows for much more than a few minutes of looking over someone else's shoulders since Windows 3.1)

My wife has Vista on her laptop. I connected it to the television for her to see a big display. I have two problems and Vista doesn't make it easy to figure out how to fix either one. First, the TV hates it when Vista does the black-out every time it wants to print a warning message. Can Vista display a warning box without blacking out the screen first? Second, the monitor is wide-screen. Vista is certain that it is 4:3 and leaves a wide black bar down the left side of the screen. Where do you tell Vista that the monitor is wide-screen? -- k a i n a w &trade; 21:30, 18 June 2009 (UTC)
 * Vista will go to the 'secure desktop' when prompting for UAC to prevent other applications/malware from hiding or affecting the popup. However, you can turn secure desktop off. This site tells you how. The possible screen resolutions are managed by your graphics card, not by Windows. Try downloading your manufacturers control software (Catalyst for ATI can't remember for nVidia) and changing it from there. A le_Jrb talk  21:38, 18 June 2009 (UTC)


 * Thanks. That stopped that dump screen blinking thing.  It appears that the laptop only has a 1024x768 output.  The television wants 1920x1080.  When I tell the computer to do 1920x1080, it does it, scaled down and letterboxed, in a 1024x728 display. --  k a i n a w &trade; 22:42, 18 June 2009 (UTC)


 * Most laptops have a control that sets where the video output goes (screen/vga/both); if you're trying to run it in "both" then it will generally choose the resolution that favours the onboard screen not the TV on the VGA port. So set it to output only to vga, then try to readjust the resolution. Carmangled (talk) 23:10, 18 June 2009 (UTC)
 * On the off chance - have you tried right clicking on a blank area of the screen to get the right click dialog box - this might contain a graphics set up link, if it doesn't - then back to Control Panel (Windows) - don't forget to plug in the TV before when checking that otherwise certain options might not appear. Often the manufacturer of the display chip will supply a set up program for dual monitors.
 * I'm assuming that your machine supports dual monitors - I can't imagine this not being true.
 * Isn't there something very odd about this - when you ask for 1920x1080 where does the ouput go TV or laptop?
 * Are you seeing in the display options two monitors, and an 'identify' button? eg like this http://www.techidiots.net/notes/vista-how-to-get-back-a-tabed-display-options ? —Preceding unsigned comment added by 83.100.250.79 (talk) 01:00, 19 June 2009 (UTC)
 * If it doesn;t resolve itself you might want to emntion the type of graphics chip. To be honest what you have described doesn't sound like the right behaviour under any conditions I can think of. 83.100.250.79 (talk) 01:07, 19 June 2009 (UTC)
 * UPDATE. I've managed to minic what you've been getting - I think you're using what my computer describes as 'dual display clone' - which has the same image on both screens - it looks like the down scaling or boxing is inevitable in this mode since the laptop can't display 1920x1080 so it defaults to the lesser. The thing to do is as described by Carmangled above - either turn off the laptop screen, or use 'extended desktop' where the two displays act as separate 'sheets of paper'.83.100.250.79 (talk) 01:32, 19 June 2009 (UTC)


 * I'm using a single (monitor) display. The laptop display is disabled.  The VGA output is what goes to the television.  Regardless of what the resolution is set to, the television reports that it is receiving a 1024x768 display.  800x600 is just scaled up in the display.  Widescreen is just letterboxed.  The computer is a Vaio VGN-NR180E.  It has an Intel chipset.  The standard display on the television (Westinghouse TX-42F430S) is 1920x1080. --  k a i n a w &trade; 13:29, 19 June 2009 (UTC)


 * Where I think the fix should be is in the monitor settings in Vista. Somewhere, there should be a place to tell Vista that the monitor prefers a 1920x1080 display.  Apparently, it is currently set to 1024x768.  I have faint memories of doing this in XP.  In the advanced display settings, you could select the monitor and set the display size of the monitor.  Of course, it would be so much easier if all I had to do was edit the xorg.conf file and set the preferred display to 1920x1080. --  k a i n a w &trade; 14:56, 19 June 2009 (UTC)
 * You see the link above or this  first image - from control panel like XP I think - In the first drop down box it should have already selected the VGA monitor since you have the laptop screen disabled - check anyway - the next step will be to move the resolution slider to the right  also here  Because the computer can detect the type of monitor the resolutions available should match what your display can do. It's much the same as in XP.
 * Note I've got an intel graphics chip, there's some intel software that helps a bit, and has some extra options, and lets you save settings, I'm fairly certain it comes with the drivers.
 * Also here's a link to check the drivers http://support.intel.com/support/graphics/detect.htm
 * I can't see whats going wrong - though it sounds like the computer doesn't think the laptop display is off and is cloning the display to both. Double check that there are two display options in the control panel graphics wizard.
 * There are certain things that aren't supported as far as I can tell in the standard windows screen setup - in control panel look for the file named "Intel(R) GMA Driver", or search for it. I think it should be in your computer somewhere.
 * (By the way desktop screen backgrounds may need to be reconfigured if you have increased the resolution - since they tend to stick at the old resolution, and don't automatically update when the display resolution changes).83.100.250.79 (talk) 15:42, 19 June 2009 (UTC)
 * AND DON'T FORGET TO PRESS APPLY As I recall windows isn't particularily good at remembering the settings of secondary monitors - it tends to forget if you unplug them - however the intel software fixies this.83.100.250.79 (talk) 15:46, 19 June 2009 (UTC)
 * If that still doesn't work, as an experiment try enabling both displays, setting the tv display resolution to 1920 in the control panel, selecting 'extend my desktop' as well, and making sure that that works with both resolutions working correctly - if it does there is hope, if it doesn't then time to call sony customer support or start looking for the receipts...83.100.250.79 (talk) 16:05, 19 June 2009 (UTC)
 * By the way the intel driver software I mentioned looks like this (first image) - I'd recommend using this for the reason given above about windows not remembering settings - the easiest way to do it would be to save a display scheme.(which is the equivalent of editing the xorg.conf file)83.100.250.79 (talk) 16:20, 19 June 2009 (UTC)
 * One last go - in the intel driver make sure you have not selected 'dual display clone' in the mltiple display options.. You probably want to select monitor ie see this page image, for some reason the display does not default to the max resolution, so you need to select 'display settings' select resolution, and bit colour depth, then apply, then press 'scheme options' and give it a name and save. You should be able to select different schemes from the destop via right click. For additional displays only saved schemes seem to be remembered, other options default to non perfect settings. If you shut down the computer when in a certain scheme, restarting will cause that scheme to be used again. That should fix everything.83.100.250.79 (talk) 16:44, 19 June 2009 (UTC)


 * Thanks all. Turns out that that specific model of Vaio is hard-set to an external display of 1024x768.  Setting a different display will either scale to 1024x768 (if it is a 4:3 ratio) or letterbox into 1024x768 (if it is 16:9 ratio). --  k a i n a w &trade; 03:11, 20 June 2009 (UTC)