Wikipedia:Reference desk/Archives/Computing/2014 July 23
Computing desk | ||
---|---|---|
< July 22 | << Jun | July | Aug >> | July 24 > |
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. |
July 23
[edit]Editing from a Laptop
[edit]Recently I have been sometimes editing Wikipedia Dell laptop (Windows 8) with a mouse. It is frustrating. Sometimes, when I have an editor box open, I have tried to use the mouse and select text or to focus, and discover that a substantial amount of previous text (either my own or that of another editor) has blanked out. The only remedy that I have found if I have blanked another editor's text is that I have to leave the page. Restoring the deleted text would be harder than cancelling and trying again. My main question is: What can I do to prevent this blanking of text? This is one of two problems that I have that seem both to be due to the mouse focus moving. The other is having the focus change so that inserted text does not go where I had been entering it. What causes the mouse cursor to move, and what should I do about it? Robert McClenon (talk) 02:50, 23 July 2014 (UTC)
- If the laptop has a touch-pad at the bottom of the keyboard - then probably you're inadvertently dragging your hand across it as you type. Both the mouse AND the touchpad are in control of the cursor - so this is an easy mistake to make. I don't know much about Windows 8 - but it ought to be possible to disable the touchpad somehow. SteveBaker (talk) 03:21, 23 July 2014 (UTC)
- Thank you. Can someone else tell me how to disable the touchpad? Robert McClenon (talk) 03:55, 23 July 2014 (UTC)
- My mom bought a Windows 8 Dell like that. The problem was it came with an unhelpful feature that made touching the trackpad click things, too. This might be what's happening when you think you're just selecting, but moving text out of the window instead. I think that was simply solved in the Control Panel, by unchecking a box ("Tap to click" or something). That's probably around where you'll find the option to disable it completely. InedibleHulk (talk) 05:10, 23 July 2014 (UTC)
- I think that I have managed to disable the touchpad. At least I don't have the cursor moving randomly and eating things. Robert McClenon (talk) 05:38, 23 July 2014 (UTC)
- Every laptop with a touchpad has a simple way of disabling it. On mine it is Fn-F8 (i.e., hold down the Fn key and press F8). Look over your function keys and see if you see a symbol that looks like a touchpad with a slash through it -- if so, that will be it. If it isn't there, look over the rest of your keyboard. Looie496 (talk) 15:00, 23 July 2014 (UTC)
- Maybe I don't recognize any of the symbols as a touchpad with a slash. I disabled it from the Control Panel Mouse dialog. Robert McClenon (talk) 15:06, 23 July 2014 (UTC)
- It might be a touchpad with an X in it Dell Instructions. ---- CS Miller (talk) 18:35, 23 July 2014 (UTC)
- Maybe I don't recognize any of the symbols as a touchpad with a slash. I disabled it from the Control Panel Mouse dialog. Robert McClenon (talk) 15:06, 23 July 2014 (UTC)
- Every laptop with a touchpad has a simple way of disabling it. On mine it is Fn-F8 (i.e., hold down the Fn key and press F8). Look over your function keys and see if you see a symbol that looks like a touchpad with a slash through it -- if so, that will be it. If it isn't there, look over the rest of your keyboard. Looie496 (talk) 15:00, 23 July 2014 (UTC)
- I think that I have managed to disable the touchpad. At least I don't have the cursor moving randomly and eating things. Robert McClenon (talk) 05:38, 23 July 2014 (UTC)
- My mom bought a Windows 8 Dell like that. The problem was it came with an unhelpful feature that made touching the trackpad click things, too. This might be what's happening when you think you're just selecting, but moving text out of the window instead. I think that was simply solved in the Control Panel, by unchecking a box ("Tap to click" or something). That's probably around where you'll find the option to disable it completely. InedibleHulk (talk) 05:10, 23 July 2014 (UTC)
Thunderbird versions
[edit]Thunderbird just went from version 24.6 or 24.7 to 31.0. Why skip over major version numbers? Bubba73 You talkin' to me? 04:05, 23 July 2014 (UTC)
- Firefox is currently at version 31.0. I suspect it was at version 24.x when Thunderbird was last updated. -- BenRG (talk) 04:14, 23 July 2014 (UTC)
- Why do Firefox and Thunderbird need to have the same version numbers? I can see it with, say, an office suite, where you would want the individual programs to have the same version number. Bubba73 You talkin' to me? 04:16, 23 July 2014 (UTC)
- Because version numbers give a certain expectation to users, so much that even completely unrelated softwares from different companies have jumped version numbers to "catch up" to their competitors, when they've upgraded to the same level of functionality. I can't remember the specific instance, i'm sure someone can chime in, but i think it happened in linux land where, for example, red hat who upgrade their software on a frequent basis made it to version 12 by the time some other linux flavor version only made it to version 6, but, that they were based on the same linux kernel and had essentially the same functionality, it's just that red had had performed their updates twice as frequently, so company B decided to release their "version 6" as version 12, since it was directly competing with red hat 12. Same thing probably happened here, thunderbird probably receives fewer updates as firefox, but it's based on the same technologies and is the same "generation" of software and has comparable security features etc... calling it thunderbird 24 when their flagship software is up to version 31 makes it "sound" like thunderbird is miles behind. Vespine (talk) 04:44, 23 July 2014 (UTC)
- Why do Firefox and Thunderbird need to have the same version numbers? I can see it with, say, an office suite, where you would want the individual programs to have the same version number. Bubba73 You talkin' to me? 04:16, 23 July 2014 (UTC)
- Thunderbird and Firefox are both based on Gecko. So, whatever version Gecko is, that is the version that both Thunderbird and Firefox will be. 209.149.115.166 (talk) 14:04, 23 July 2014 (UTC)
- Thanks, Gecko must be this: Gecko (software). I didn't know they had so much in common, since their functions are so different. Bubba73 You talkin' to me? 21:48, 23 July 2014 (UTC)
- Thunderbird 30 (...and earlier) were developer betas and were not marketed or advertised to the general community of users. From the developer mailing list archives, here is the May/June development plan for Thunderbird 31. If you subscribe to the developer feeds, or build your own Thunderbird from source - or if for some reason, you as an individual or organization have a special working relationship with the Mozilla development team - then you'll commonly have visibility into a lot more versions and forks than the well-advertised, widely-available, mass-announced general releases. But, the Thunderbird and Gecko code is still mostly open-source free software, so you can grab any version at any time. Nimur (talk) 15:09, 23 July 2014 (UTC)
Javascript function
[edit]Hi there, in Javascript I have a bunch of numeric variables, say a, b, c, d etc., and a procedure that takes any two variables, and changes both of them in a way that is dependent on both input values (for example, in a very simple case, a could become a + b, and b could become a − b). How do I create a Javascript routine to do this? I have a method at the moment that uses objects and "eval" statements, but it totally sucks, and it pains me to look at it. What is the elegant way to achieve this, given that I apparently cannot pass references to the numeric variables? 86.128.5.71 (talk) 11:25, 23 July 2014 (UTC)
- Objects are passed by reference; so you can wrap those ints in objects, pass them, and mutations to their value are evident outside the function:
#!/usr/bin/nodejs
var add_and_diff = function (x,y) {
var sum = x.val + y.val;
var dif = x.val - y.val;
x.val = sum;
y.val = dif;
};
var a = {val:10};
var b = {val:20};
var c = {val:66};
var d = {val:99};
console.log('before:', a.val, b.val, c.val, d.val);
add_and_diff(a,b);
add_and_diff(c,d);
console.log('after: ', a.val, b.val, c.val, d.val);
- Still kinda clunky, IMO. -- Finlay McWalterᚠTalk 12:31, 23 July 2014 (UTC)
- Thanks. I think this is slightly better than what I currently have, but it still means in the main code I have to refer to "a.val", "b.val" etc., rather than just "a", "b", etc., right? I find this a real nuisance. 86.128.5.71 (talk) 16:56, 23 July 2014 (UTC)
- You could copy the values out of the struct like this, after which .val cannot be used.
- Thanks. I think this is slightly better than what I currently have, but it still means in the main code I have to refer to "a.val", "b.val" etc., rather than just "a", "b", etc., right? I find this a real nuisance. 86.128.5.71 (talk) 16:56, 23 July 2014 (UTC)
var a = 10;
var b = 20;
a = {val:a};
b = {val:b};
add_and_diff(a, b);
a = a.val;
b = b.val;
console.log('after:', a, b);
- Another way to do it, which might be cleaner, is to return an anonymous struct, and then copy the values out of it. CS Miller (talk) 20:14, 23 July 2014 (UTC)
- Thanks, yeah, I know I can copy "a = a.val", "a.val = a" etc. back and forth, but it really sucks. Could you give an example of what you mean by the "anonymous struct" method? 86.171.43.119 (talk) 12:59, 24 July 2014 (UTC)
- I was thinking of C. In Javascript all structs are anonymous, as Javascript isn't strongly typed. I was meaning code like
- Thanks, yeah, I know I can copy "a = a.val", "a.val = a" etc. back and forth, but it really sucks. Could you give an example of what you mean by the "anonymous struct" method? 86.171.43.119 (talk) 12:59, 24 July 2014 (UTC)
- Another way to do it, which might be cleaner, is to return an anonymous struct, and then copy the values out of it. CS Miller (talk) 20:14, 23 July 2014 (UTC)
var add_and_diff = function (x,y) {
var _sum = x + y;
var _dif = x - y;
return {sum:_sum, dif:_dif};
};
- This allows the function to return two values at the same time. CS Miller (talk) 18:10, 24 July 2014 (UTC)