Wikipedia:Reference desk/Archives/Computing/2013 January 13

Computing desk
< January 12 << Dec | January | Feb >> January 14 >
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.


January 13

edit

Weird deletion glitches when editting

edit

I usually use a Gateway NV78 with a shot original keyboard running Windows 7 when editting wikipedia. The internal keyboard had a habit all last year of hitting enter by itself or repeating a keystroke on the right side of the keyboard while I was typing. I love the computer more than I ever have even one of my Apples, but thinking I am going to get a new one, I keep putting off just fixing the keyboard. So I am using an external keyboard now that seems fine.

That being said, I have this weird glitching problem that when I edit something here at wikipedia, preview it and see that I have added some text, and then hit save, I have deleted the entire section I was working on--as if I had hit control a, blanked the page, and then saved it. But I never hit control a in such circumstances, nor do I ever find that the computer has selected the entire text for me at any point, either with the faulty internal or the external keyboard.

If you look at my talk page you'll see half a dozen mentions from various editors over the last several months asking why I had blanked something and telling me they had restored it. You can also see three such inadvertent recent edits on my 'user contributions', here, here and here. In each case it looks to me like I have updated the page, and I only catch it if I refresh the screen to edit again and find the section has disappeared.

Can anyone suggest what's going on? Could it be the keyboard, although I never see the entire text selected unless I have done so on purpose myself--as opposed to the other glitches which I did see with my internal keyboard and don't with my external? Could it be my Safari browser or the Verizon DSL I usually use in both NYC and NJ? Am I just cursed or haunted or possessed?

Thanks. μηδείς (talk) 03:28, 13 January 2013 (UTC)[reply]

NV78 replacement keyboards seem to be available for like, $30-40. ¦ Reisio (talk) 04:08, 13 January 2013 (UTC)[reply]
I've had the same problem occasionally in Wikipedia, so I don't think it's a keyboard issue. Don't know what it is, though. StuRat (talk) 04:31, 13 January 2013 (UTC)[reply]
Yes, I know, keyboards are cheap--the problem is good money after bad--I keep thinking only in a few days will I be purchasing a new computer. Having set up my father's Windows 8 abomination I am thinking maybe I should go with a new keyboard and external drive for memory. I have also seen other editors commit the same glitch, once cursing out an admin for doing it to me. That's more why I am looking for an explanation than advice on whether to go with a new keyboard. μηδείς (talk) 04:36, 13 January 2013 (UTC)[reply]
Try editing with JavaScript disabled for a while. That’d be my first suspect. Figuring out the specific web browser those affected are using could also be useful. …and if it is suspected to be a bug in Wikipedia frontend code, WP:VP/T is probably going to be the more appropriate forum. ¦ Reisio (talk) 04:47, 13 January 2013 (UTC)[reply]
I only use Safari for wikipedia on both my Mac and PC. (Perhaps .1% of my edits have been on other browsers, without problems.) Regardless of the recent (1 year) keyboard problems, I could swear this has happened before with my Mac Powerbook, which I haven't really used since 2009 for editting. But it was with Safari. μηδείς (talk) 05:05, 13 January 2013 (UTC)[reply]

Java vulnerabiity -- Online banking

edit

Another java vulnerability has recently reached Norwegian mainstream media. The vulnerability is relevant in Norway because everyone and his dog uses a java-based login for internet banking. The advice given by the media are widely discrepant, ranging from "don't use net-banking now" to "Nobody has lost their money. We have several layers of security. Relax". I have, for a long time, been using a VirtualBox based windows XP Virtual machine running headlessly on a linux host, for online banking (and online banking only). The WM is accessible on the local wifi network only, which is tightly secured, and is accessed by android devices with VNC. Everyting is behind a Thompson box that connects to the internet, whose signal passes through a dlink router before entering the local network.

Since I don't really understand what the new vulnerability is about, I'm wondering if my present setup is good enough to handle the situation (or, for that matter, whether it is good at all, or merely complex without added benefit). I'm thinking of switching to a WM which boots a Knoppix virtual CD or something similar, but fear that it will be rather a hassle to get this working properly and with sufficient user friendliness for the target users (who,except for myself, are not tech savvy). I'll be grateful for advice on a good compromise between paranoia and usability on this issue. Thanks! --NorwegianBlue talk

Presumably we’re talking about CVE-2013-0422. ¦ Reisio (talk) 07:43, 13 January 2013 (UTC)[reply]
I’ve only read a little about it, but as far as I can tell, despite the immense media this most recent exploit is getting, it is a garden variety Java™ exploit, in that the risk is having Java™ enabled in your browser all the time when visiting random websites, and not so much if you only visit sites you know and trust. Banking websites are not bulletproof, but they do pay some more attention to security, and would be in considerable trouble if their site were compromised and they didn’t immediately take it offline. I doubt you have anything to worry about; you would probably also have little to worry about if you simply used Java™ from a banking-only profile for your browser on the Linux host (and, probably without even a separate profile on the Linux host, you'd still be well more secure than a Windows or Mac OS box*). ¦ Reisio (talk) 07:15, 13 January 2013 (UTC)[reply]
*I haven’t found the particulars yet, but the reason I’m less concerned about Linux is that distros have been using a different package than the official Oracle upstream one for some time now, and while I’m no expert on the matter, without the particulars I have trouble imagining the two are similar enough to face the exact same flaw. ¦ Reisio (talk) 07:25, 13 January 2013 (UTC)[reply]
Thanks! --NorwegianBlue talk 23:21, 13 January 2013 (UTC)[reply]

.cache/tracker/meta-db

edit

Today I ran du -m on my home directory to see how much space is in use in which directory. I found a directory called .cache/tracker, which has a file called .cache/tracker/meta-db. The size of this file is 664 megabytes. What is this file used for? Can I safely delete it? JIP | Talk 10:11, 13 January 2013 (UTC)[reply]

You're running GNOME right? Those files are related to [1] Tracker, which is gnomes indexing engine. I'm sure you can tweak the settings to deal with it as you need. Shadowjams (talk) 12:27, 13 January 2013 (UTC)[reply]

Looking for some straightforward 3D primitive functions

edit

I'm working on a small project that involves generating some 3D primitives from scratch. Basically I could use a few functions to help get me started.

The whole thing will eventually output COLLADA files, which are just XML files that store vertices in lists of sequential numbers. No big issue there, I just need to generate the vertices.

I'm looking to generate columns, toruses, and spheroids. (That's all I require for this project.) Ideally a function to generate them would have me put in various input properties — e.g. for the column, I'd want to be able to put in an origin point, a top radius, a bottom radius, a height, and something that would control how many steps were used in generating the circles at each end. These could be in arbitrary units. I then get back a huge list of vertices, suitable for plugging into a COLLADA file. I don't need code for actual rendering or raytracing or anything like that — I just need to generate vertices. Some of these I could write from scratch (columns aren't too hard) but I'd really rather not, if possible.

I'm having trouble finding this sort of code. I see many mathematical definitions of spheroids and columns and things like that (the Wikipedia pages are full of those), which I'm having trouble translating into something like the above — I'm not great at actual math. I'm looking for code that I don't have to think too much about. The final product of this will be in PHP, but any code that I can read pretty straightforwardly would be appreciated.

Any pointers would be appreciated. I suspect this sort of thing has to be out there somewhere, but I've had a heck of a time finding what I need... --Mr.98 (talk) 15:46, 13 January 2013 (UTC)[reply]

I'm time-poor today, but if you don't find anything, I'll knock something up for you tomorrow. The maths for this is pretty simple. First generating a circle is easy - just chop up a rotation into n chunks and for each you use high school trig to generate (x,y) points for each: x = r cos(2π/n), y = r sin(2π/n). With that you can build your three primitives: a cylinder is that circle translated orthogonal to its plane, a sphere is the circle rotated about its centre, and a torus is the same rotation but around a point on the plane of the circle away from its centre. Rotation (mathematics) is back to the same high school trig (for a rotation about a point other than the origin it's usually easiest to translate back to the origin, rotate, and undo the translation). -- Finlay McWalterTalk 17:24, 13 January 2013 (UTC)[reply]
The tricky part is how you define the connections between vertices. You will typically need 3-4 vertices connected to each other. So, make sure that your XML file format supports that.
Also, you might want to rethink just asking for the number of steps, as that means you will need to manually figure out how many steps you need to get to a given tolerance, depending on the scale of the object. An alternative is to ask for the discretization tolerance, and then have the program calculate the number of steps needed to get there. For example, you might say that you want each point on your approximation of a circle (or sphere or torus) to be within 1 mm of the true circle (or sphere or torus), and figure out the number of steps needed for that. StuRat (talk) 17:32, 13 January 2013 (UTC)[reply]

Co.uk co.jp

edit

What is the reason/origin of domains ending in .co.uk, .co.jp (any others?)? bamse (talk) 16:39, 13 January 2013 (UTC)[reply]

Does the article Domain name help you at all? --Phil Holmes (talk) 16:48, 13 January 2013 (UTC)[reply]
They are country analogs of general .com domain. The latter was initially thought as .co.us. Ruslik_Zero 17:15, 13 January 2013 (UTC)[reply]
Thanks for the replies, but my question is, basically why are there things like that in the UK and in Japan (and perhaps a couple of other places), but not in say Germany (.co.de)? Just a matter of choice of the respective countries or any other reason? bamse (talk) 21:12, 13 January 2013 (UTC)[reply]
See the article Country code second-level domain. This is simply a choice of the institution handling domain name registry. For example, DENIC doesn't seem to require it for .de domains, while Nominet UK requires it for .uk domains. -- Toshio Yamaguchi 21:24, 13 January 2013 (UTC)[reply]
The reasons for .co.jp and .co.uk are actually quite different. As others have said, .co.uk is basically the UK equivalent of .com, and it's not possible to register a .uk domain. But in Japan you CAN register somedomain.jp; the .co.jp address is tightly restricted to Japanese companies (well, technically 'companies registered in Japan'), and each company can only have one. Another example of a widely-used second level domain is .com.cn, which is different again. The system in China was originally similar to the UK, where .com.cn was the standard domain name and .cn itself was unavailable. But a few years ago they switched to a started to allow people to register somedomain.cn addresses as well, which to be honest is a bit of a mess - it's hard to remember whether an address is .com.cn or just .cn, so websites have to register both of them to avoid confusion. 59.108.42.46 (talk) 03:47, 14 January 2013 (UTC)[reply]