Wikipedia:Reference desk/Archives/Computing/2011 October 30

From Wikipedia, the free encyclopedia
Computing desk
< October 29 << Sep | October | Nov >> October 31 >
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.


October 30[edit]

template talk archive not fully displaying[edit]

I added to a template talk archive page but it's not all displaying, while the content is still in the edit field. There should be many more than 8 topics/sections displaying, with posts through last August. The table of contents (TOC) is not updating, either. I asked at the current talk page, but there's no answer, although it's still soon. What should I do? Nick Levinson (talk) 00:38, 30 October 2011 (UTC)[reply]

Apparently solved. Whether the cause raises a question about future cases is interesting: I'll probably raise it at Village Pump (Technical) shortly. Nick Levinson (talk) 22:01, 30 October 2011 (UTC)[reply]

Demonic possession of keyboard[edit]

Every so often, my keyboard starts acting up (like now) and some the characters I type are not always the ones that show up: e.g. when I press the front slash, the screen shows an é. How can I fix this without restarting FirefoxÉ |||| (supposed to be tildes).

...are you saying it's a problem only with Firefox? ¦ Reisio (talk) 02:05, 30 October 2011 (UTC)[reply]
It sounds like your keyboard has been switched to French. In WIndows 7, try clicking the keyboard icon in the bottom right, and making sure that it is set to US. Thanks, 99.240.226.174 (talk) 02:28, 30 October 2011 (UTC)[reply]
I don't know if it's restricted to Firefox since I use it 99.9% of the time. It fixes itself if I restart Firefox, so I doubt it's a language switch. As you can see, I've done just that, but just in case, I'll check the language setting the next time. Clarityfiend (talk) 02:45, 30 October 2011 (UTC)[reply]
I say it sounds like it has been switched to French only because, in the Canadian French layout, "/" does become "é", and ~ does become |. Thanks, 99.240.226.174 (talk) 13:33, 30 October 2011 (UTC)[reply]
That doesn't say much - if the issue is confined to Firefox, it will fix itself after you've restarted it. Just to be safe in situations like these I used to disable any key combinations that would switch the keyboard layout. --Ouro (blah blah) 07:02, 30 October 2011 (UTC)[reply]
Is there a keystroke combo that switches to French? Better yet, is there one that switches to English? Clarityfiend (talk) 02:01, 31 October 2011 (UTC)[reply]
In Windows, by default, Alt+Shift switches languages and Ctrl+Shift switches keyboards (yes, just the modifier keys). You can change or disable this in the "Region and Language" control panel. Deleting all but one language and keyboard would also solve the problem. -- BenRG (talk) 06:01, 1 November 2011 (UTC)[reply]
Aha! That's gotta be it. I must be hitting alt+shift. (What idiot thought up that key combo?) Thanks, BenRG. Clarityfiend (talk) 02:40, 2 November 2011 (UTC)[reply]

Ubuntu Dual-Boot Hangs Before Login Screen[edit]

I recently received an HP Pavillion tx1000 laptop running Windows Vista as a gift. I installed a Wubi installation of Ubuntu onto the laptop and set Ubuntu up fine. I did not know the password for the only adminstrator-level account on Windows Vista, so I used the Offline Windows Password & Registry Editor to clear the admin password. Since then, the Ubuntu installation appears to hang before it reaches the log-in screen. I only had a chance to try the computer twice since I cleared the admin password, but both times it has hung in the same place. DOes anyone know what the issue is and how to solve it?

Thanks, gENIUS101 02:53, 30 October 2011 (UTC)[reply]

Short of chkdsk magically fixing it, it'd probably be simplest to to backup any personal data/configs you have in the install (possibly with Ext2Read) and reinstall. For a longer term solution you'd want to defrag your Windows filesystems, then boot a liveOS with GParted or the like and resize to make room for a dedicated hard disk Ubuntu partition area, which would not have experienced this particular issue. For an even longer term solution, backup your Windows files and install Linux over the entire hard disk. Short of certain games, you shouldn't need Windows, and most things you might think you'd need it for will run via Wine or in a VM anyways. The computer you've mentioned should be able to manage any of the many VM solutions (including but not limited to / in order of goodness): KVM, VirtualBox, VMware. ¦ Reisio (talk) 16:41, 30 October 2011 (UTC)[reply]
I found having Windows on the same hard disc always made general maintenance more difficult since I didn't understand either operating very well. As soon as I had only Ubuntu, maintenance became a thing of the past (almost, and certainly less than that required for Windows). As Reisio suggests lean to how to install and use a Virtual machine running on a pure Ubuntu laptop. It will say load of hassle in the future and without the general hassle of Windows.--Aspro (talk) 16:59, 30 October 2011 (UTC)[reply]
It appears to have fixed itself overnight. Thanks for the help, but does anyone have any advice on converting a Wubi installation into a fully Ubuntu system? Thanks, gENIUS101 20:11, 30 October 2011 (UTC)[reply]
You'd have to copy everything off to another disk, repartition your main drive, copy everything back to a new partition, and set things up to boot in that configuration. Quite a bit of work involved. Meanwhile, you already have all the capabilities of a standard Ubuntu system. If you run into similar problems in the future, try hitting escape or alt-c to see the actual boot messages. Nevard (talk) 02:25, 31 October 2011 (UTC)[reply]

C Structures[edit]

If "struct" is a structure in C, and "var" is a structure variable under "struct", then, when we use the notation: "struct->var" and instead, when we use: "struct.var"? — Preceding unsigned comment added by Intr199 (talkcontribs) 03:56, 30 October 2011 (UTC)[reply]

The -> operator means "dereference a pointer to a struct and then reference a member of that struct. So you use it if the thing to its left is a pointer to a struct, not a struct itself. Here's a little program:
#include <stdio.h>
typedef struct {
  int i,j;
}s;

int main(){
  s  a;
  s* p = &a;

  a.i  = 3;
  p->j = 4;

  printf("a is (%d,%d)\n", a.i, a.j);
}
-- Finlay McWalterTalk 09:44, 30 October 2011 (UTC)[reply]
I should say that instead of p->j = 4; I could use the normal pointer-deref and struct-ref operators, making that line read like (*p).j =4;    -- Finlay McWalterTalk 10:08, 30 October 2011 (UTC)[reply]
Yes, the only reason that -> exists is because of convenience. A * and a . can replace it in every instance. --140.180.14.123 (talk) 06:36, 1 November 2011 (UTC)[reply]
More precisely, it exists because C's pointer dereference operator is prefix, while the other similar operators (array index, structure access, and function call) are all postfix. This means that in mixtures of the two (which are common) you have to use grouping parentheses and the expression gets hard to read. This is also the main reason that C's type declarations are so hard to read. The sensible solution is to make pointer dereference a postfix operator, as Pascal did (p^ instead of *p). For some reason, K&R didn't do that. They introduced -> as a special-case solution for (*p).j (p^.j in Pascal) while leaving the general problem unsolved. Unlike other bad syntactic decisions in C (like the left associativity of <) this generally hasn't been picked up by later languages since they don't have anything like C pointers. -- BenRG (talk) 15:52, 1 November 2011 (UTC)[reply]

Batch processing in Photoshop Elements 6[edit]

I need to do "enhance/auto smart fix" for a group of photos using Adobe Photoshop Elements 6, without having to do them individually. Is there was way to do that? Bubba73 You talkin' to me? 06:55, 30 October 2011 (UTC)[reply]

The term for this in Photoshop is "batch processing" — Google "Photoshop Elements 6 batch processing" turns up a lot (like [http://www.adobe.com/designcenter/photoshopelements/articles/correct_images.html this page from Adobe — click the image for the tutorial). --Mr.98 (talk) 14:24, 30 October 2011 (UTC)[reply]
Thanks, that is what I need, but it seems that I need a newer version of the software to do it. I need ot do this 4 or 5 times a year on a few dozen photos each time. Bubba73 You talkin' to me? 16:10, 30 October 2011 (UTC)[reply]
Photoshop "Actions" should also make short work of it. For what I'd consider a better solution, but one that will take some up front research (or at least querying of people who've already done some up front research), there's ImageMagick. ¦ Reisio (talk) 16:44, 30 October 2011 (UTC)[reply]
I can't find "actions" in Photoshop Elements 6. Is it there or do I need a newer version? Bubba73 You talkin' to me? 16:48, 30 October 2011 (UTC)[reply]
Apparently for Elements you have to import extant actions, or have a 3rd party plugin or something. ¦ Reisio (talk) 20:19, 30 October 2011 (UTC)[reply]
I don't think that's in Photoshop Elements. I think Reisio doesn't realize that Photoshop Elements is a somewhat dumbed-down (from a features point of view) version of Photoshop. They aren't the same thing at all.
The other approach is to use some kind of generic scripting software, e.g. AutoIt on Windows. I've not used it much but apparently it is not too hard to make it do things like tell Photoshop to open a file, run a specific command, save and close, etc. You could probably do this on a Mac using AppleScript, but again, not something I've messed with much. --Mr.98 (talk) 18:31, 30 October 2011 (UTC)[reply]

Navigating withoutonly with keyboard[edit]

If you want to navigate without only with keyboard in Firefox, how could you, for example, move from the column on the left (Main page/ Contents/ Featured content/ ... ), the middle (with the discussion) and the right side (Choose a topic). With TAB, I would be forced to move through the whole page to reach the right side. There must be a better alternative. 88.9.210.218 (talk) 20:19, 30 October 2011 (UTC)[reply]

There's Vimperator, TVFriendly, and probably others. There's caret navigation, by hitting F7. There was also talk of native spatial navigation support in Firefox, but I don't know if they ever started enabling it for public builds or what. IIRC it's something Opera has had for some time, but I wouldn't switch browsers for that alone. ¦ Reisio (talk) 20:24, 30 October 2011 (UTC)[reply]
All those things seem to be about using a keyboard to navigate Firefox without a mouse. OP asked about navigating Firefox without a keyboard. 82.43.90.142 (talk) 22:48, 30 October 2011 (UTC)[reply]
Sorry, I meant exactly the opposite of what I said. I want to use the mouse as little as possible, but when it comes to Firefox, it's not as fast as with the keyboard.
Without an add-on, it is not very easy to move the focus in any direction you like. You can tab through the links in order, but that can be rather annoying. I have a screen reader which gives me keyboard control of the mouse. I can move it any direction I like and it "chirps" the text under the cursor. Then, I can open it if it is a link with enter or shift-enter (if I want to open in a new tab). -- kainaw 01:41, 31 October 2011 (UTC)[reply]