Wikipedia:Reference desk/Archives/Computing/2009 August 2
Computing desk | ||
---|---|---|
< August 1 | << Jul | August | Sep >> | August 3 > |
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. |
August 2
[edit]Porting programs between architectures and operating systems
[edit]I've been thinking about this for a long time.. ..how difficult is it porting programs from, say, Windows to GNU/Linux and from Intel to PPC? Of course they have to change all the directories since the filesystems are differ between Windows and Linux but what else is there (let's say you have the source code)? I'm pretty sure porting between OS's a big task but it doesn't seem like porting between architectures is as difficult (Ubuntu e.g. supports a lot of architectures that have a small user-base and I doubt they'd go through immense trouble for the few PPC users that want to try Ubuntu) --BiT (talk) 00:22, 2 August 2009 (UTC)
- It depends on the program. If you were just changing architecture (e.g. Linux Intel to Linux PPC) most programs will work just with a simple recompile; a small number that make assumptions about how structure and memory is laid out will need those assumptions readjusting. The same is true for moving Windows apps from IA32 to x8x-64 or IA64 (and formerly to Windows-Alpha). Moving between Window and Linux is orders of magnitude more work, because they don't share the same application programming interfaces; the extent to which a given program uses a platform's API defines how much effort it will take to move. Some APIs are fairly isomorphic between the two: network, process, thread, and filesystem stuff is a fairly obvious mapping. Some are conceptually similar but require a major overhall - e.g. changing from a Windows GUI interface to GTK, or from DirectX to OpenGL is a lot of work. And some technologies don't have easy analogs on the other platform - if you were translating a windows DCOM program to Linux, you'd probably rip out all the DCOM and write that part from scratch. But there are shortcuts: Linux programs written with GTK/GlibC can be moved to Windows, as those libraries are available there. And some Windows apps can run fine on Linux using Wine, or can be recompiled for Linux with Wine's "winelib" (that's how Google's Picasa works on Linux). So, in short, it depends very heavily on the program. -- Finlay McWalter • Talk 01:08, 2 August 2009 (UTC)
- Ok so porting programs between architectures is not that difficult. But why does it take so long e.g. for Google to release a version of Chrome for Linux and OS X, since Chrome only has some minor GUI changes to GTK (which they actually fixed ages ago with both Chromium and the dev build of Chrome) and although being little-of-programming I believe Chrome includes minimal, if not no amount of DirectX. Where does the complexity lie there? Has it got something to do with the javascript..? bah, I dunno --BiT (talk) 01:58, 2 August 2009 (UTC)
- I don't know the specifics, but Chrome has worked fine for me on Linux for several months. I think their ports have lagged Windows because they don't send that much effort on them. -- Finlay McWalter • Talk 02:19, 2 August 2009 (UTC)
- Yes I'm using the dev version of Chrome atm and it's working great except for lack of Flash and other minor issues. I was just wondering why it has taken this long to get Chrome working on other OS's than Windows when almost a year has passed since it's initial release. You're probably partially correct in assuming that they aren't spending that much effort on non-Windows versions but they do want their browser to become wide-spread and Unix-based OS's constitute for almost 10% of the entire world's computer usage. Why didn't they simultaneously release it on all OS's- or would that be too difficult? --BiT (talk) 02:28, 2 August 2009 (UTC)
- I don't know the specifics, but Chrome has worked fine for me on Linux for several months. I think their ports have lagged Windows because they don't send that much effort on them. -- Finlay McWalter • Talk 02:19, 2 August 2009 (UTC)
- There's a discussion about porting the UI to Linux/OS X featuring some of the Chromium developers here which you might find interesting. — Matt Eason (Talk • Contribs) 10:25, 2 August 2009 (UTC)
- Now that is interesting, thanks for posting that! It's helpful reading a conversation between professional programmers and trying to follow their train of thought. On a side note, is there any word on when the Mac/Linux version of Chrome is going to be completed? I've heard the Mac version is almost ready and the dev version for Linux seems very close to completion. --BiT (talk) 14:25, 2 August 2009 (UTC)
- There's a discussion about porting the UI to Linux/OS X featuring some of the Chromium developers here which you might find interesting. — Matt Eason (Talk • Contribs) 10:25, 2 August 2009 (UTC)
- One thing that wasn't been mentioned is whether the code contains any assembly. It's not uncommon for highly optimised code, e.g. codecs, to use assembly. Frequently these will be in addition to more normal code, e.g. Xvid [1] but if it not, porting between architectures is likely to be significantly more difficult. Of course if assembly is used, even if porting is not that hard, the actual code may perform significantly worse. This is particularly relevant when it comes to x86-64 vs x86-32 since there the user often has a choice. Nil Einne (talk) 19:22, 2 August 2009 (UTC)
- Porting can be rather easy if you intentionally design your software to use APIs and libraries that work on both systems. On the other hand, if you design your system to depend on DirectX you're going to have a headache if you try to move it off of Microsoft platforms.
- So why don't all software developers instantly release ported versions of their software? Well, for one thing, even if it's easy, they've still got to do it, and they may be busy with the deployment and support of the Windows version. But I think that the main hold-up is that they've got to restart their whole testing procedure to make sure that their newly ported version is robust. For a web browser, testing can be rather extensive. APL (talk) 07:23, 2 August 2009 (UTC)
- I get your point, of course the Windows version of almost every software is the first version that needs to be completed since Windows users are more than 90% of all users. --BiT (talk) 14:25, 2 August 2009 (UTC)
x86 instructions atomic?
[edit]I know that you can use the lock prefix to produce a multi-processor-safe instruction on x86, but are normal instructions somewhat atomic? That is, is there any chance of me using the add or mov instruction and another processor reading half of the new value? --wj32 t/c 08:16, 2 August 2009 (UTC)
- With read modify-write instructions like ADD mem,reg you have the following race: both processors read, then processor A writes, then processor B writes, with the result that only processor B's change takes effect. That's not equivalent to A-then-B or B-then-A order, so the instructions aren't atomic. This can't happen with MOV.
- Unaligned operands can generate more than one memory access for each read or write and I think that can lead to getting part of a value that another processor was in the process of updating. According to the docs, LOCK ADD mem,reg is atomic even when misaligned, but LOCK ADD reg,mem and LOCK MOV are illegal, even though they could potentially benefit from this aspect of locking. -- BenRG (talk) 08:48, 2 August 2009 (UTC)
- Thanks, I get it now :) --wj32 t/c 06:37, 3 August 2009 (UTC)
Can't get rid of Norton AntiVirus
[edit]For months now, I've been struggling to expunge this stupid program from my system. It no longer appears in Add/Remove Programs, but every now and then, MS Word crashes, and the error-report blames Norton. Sure enough, when I run the Norton Removal Tool, downloadble from the Symantec website, the problem stays fixed for a couple of weeks. Then the same thing happens again. Any tips? Thanks. ╟─TreasuryTag►stannator─╢ 15:04, 2 August 2009 (UTC)
- Run msconfig and look for any services/startup items referencing Norton. Rjwilmsi 15:58, 2 August 2009 (UTC)
- I can't immediately see any under "Services" or "Startup" – any idea of what they might look like specifically? ╟─TreasuryTag►constabulary─╢ 16:03, 2 August 2009 (UTC)
- Following that, I found one "Synaptics" entry in regedit (HK_LOCAL_MACHINE > Software > Windows > Run) and deleted that, I assume that will help somewhat? ╟─TreasuryTag►assemblyman─╢ 16:11, 2 August 2009 (UTC)
- I can't immediately see any under "Services" or "Startup" – any idea of what they might look like specifically? ╟─TreasuryTag►constabulary─╢ 16:03, 2 August 2009 (UTC)
- Isn't Synaptics the manufacturer of laptop touchpads, and most Windows machines with such a laptop run a synaptics driver (which implements some features over the basic mouse functionality, such as tap-to-click). I don't think "synaptics" and "symantec" have anything to do with one another. -- Finlay McWalter • Talk 16:24, 2 August 2009 (UTC)
- Yes, sorry, my mistake. I meant "Symantec", it was that that I deleted. :P I hope... ╟─TreasuryTag►Captain-Regent─╢ 16:27, 2 August 2009 (UTC)
- Isn't Synaptics the manufacturer of laptop touchpads, and most Windows machines with such a laptop run a synaptics driver (which implements some features over the basic mouse functionality, such as tap-to-click). I don't think "synaptics" and "symantec" have anything to do with one another. -- Finlay McWalter • Talk 16:24, 2 August 2009 (UTC)
- Doesn't Windows Defender help detect (and delete) unwanted start-up and network programs. (I seem to remember discovering a quicktime network program using it long after I'd uninstalled quicktime) If so it might be worth running (or downloading) to check for any more programs left behind/ possibly that it's just a prettified version of regedit in that respect/83.100.250.79 (talk) 16:59, 2 August 2009 (UTC)
- You could also search the file system and registry for anything starting "nav...". I've noticed that Symantec products also use a "common files" folder (either c:\program files\common files\symantec\ or c:\program files\symantec\common files\) ... or maybe it's "common tools". Of course, be careful deleting stuff and keep a backup incase you delete someting critical. Astronaut (talk) 14:23, 3 August 2009 (UTC)
- Times where working in a computer shop have been helpful. Symantec/Norton builds their own separate removal tool because some of the AV products lock down a Windows OS so hard, even after being 'uninstalled,' that no other product really runs
- G norton removal tool Make sure you get it from the Symantec website. The tools occasionally time-expire. Washii (talk) 22:21, 5 August 2009 (UTC)
- haven't you just described the exact original problem - namely that the removal tool acts like a Time bomb (software).83.100.250.79 (talk) 15:05, 6 August 2009 (UTC)
- No...the tool itself will just not run after it's built-in expiration has passed (this is mostly applicable to Norton 360, since they change so much with updates). It removes the NAV stuff perfectly fine. I have customers that were humming along just fine months later. It isn't any type of time bomb, and I don't see where you got the idea it was. Washii (talk) 07:17, 8 August 2009 (UTC)
- haven't you just described the exact original problem - namely that the removal tool acts like a Time bomb (software).83.100.250.79 (talk) 15:05, 6 August 2009 (UTC)
Create a windows 7/Vista restore disk.
[edit]I want to create a boot disk for windows 7 or Vista that will restore my computer to the state it is currently in from a disk but don't know exactly how to do this. I know it can be done with norton ghost but I'd like to use completely free software altogether if possible. If someone could help I'd appreciate it. Thanks! 65.184.21.210 (talk) 16:57, 2 August 2009 (UTC)
- Norton Ghost won't (or didn't i should say, its been a decade since i've used it) create a boot disk, but a disk image, a byte-for-byte copy of the drive, which you would then back up and write over the disk with when needed/written to other machines to clone system settings across an enterprise. Using free software to do this is pretty similiar to the usb image question up the page- just use dd with the drives dev path as input file and get a raw image. If you mean more the boot disk phrasing, i believe finding a web guide on slipstreaming windows install discs to add software, files and other such into the base system, and see if those methods apply to win7. --Mask? 12:43, 3 August 2009 (UTC)
- You might be surprised at how complicated disk imaging can be... but for a free, relatively easy one, I recommend Clonezilla. Indeterminate (talk) 20:24, 3 August 2009 (UTC)
Unmount USB drive on unplug
[edit]In Kubuntu, how do I set my external USB hard drive to automatically unmount when I unplug it? If it makes any difference, I'll usually be unplugging the power cable first or only. NeonMerlin 19:00, 2 August 2009 (UTC)
- Unfortunately, things don't work that way. The drive needs to have power for a few moments to actually do the unmount sequence. By removing the power there is no way to "inform" the drive and the computer that you want to unmount it, hence it's impossible. The only way this could be done is through a sensor/button that tells the OS to unmount the hd/ssd. The moment when you remove the power/data connection it's too late to unmount. Mile92 (talk) 03:26, 3 August 2009 (UTC)
- It's possible to do a lazy unmount (
umount -l
), but if the file system on the drive was mounted read-write, removing it without correctly unmounting it first can cause data loss or corruption. If your drive is only ever mounted read-only, or if you make absolutely sure to do a proper, manual unmount whenever it's mounted RW, then the lazy unmount is a viable option. In this case I'd say the easiest way to do it is to write a udev rule for it. You'll have to google for that or ask someone else, because I know very little about it. I do believe it to be the way to go for this, though. --Link (t•c•m) 09:52, 6 August 2009 (UTC)
MS Access Help
[edit]I have 3 Tables in Microsoft Access.
1st Table has a list of nursing homes. (Field 1 - names of Nursing Homes - Facilites)
2nd Table has a list of Patients names. (Field 1 - names of Patients - Names)
3rd Table has a list of treatments in Field 1 - Treatments, and the Associated Costs in Field 2 - Costs.
What would be the best way for me to go about making a database?
What I have done is this:
I made Field 2 in the 2nd Table and I used "Add Existing Field" function under the Datasheet tab and added the Facilities field from Table 1.
So now, after adding the patient name in the 2nd table, I can select which nursing home the patient resides in using the drop down function.
Now in field 3 and field 4 inside Table 2 I am trying to add Treatment and the associated costs. However, I cannot make it such that when Field 3 = Field 1 of table 3 then automatically Field 4 = Field 2 of table 2
--33rogers (talk) 23:35, 2 August 2009 (UTC)
- I have to admit, I read your post a few times but I'm not quite following you, so forgive me if this is wide of the mark. It sounds as if you're trying put data from one table into another, based on a relationship between them. The concept I think you're missing is that you don't do that with tables; rather, the tables stand alone, and you join them up by using queries. Try creating a new query in Access and putting your relationship joins in there. --Rixxin (talk) 15:51, 3 August 2009 (UTC)
- I get it (I think). Each patient has a treatment, and for each type of treatment the associated cost is the same.
- Technically I think you're trying to do it wrong - all you need is 'treatment' field in table 2, and a association between the 'treatment field' and 'associated costs' in a 3rd table. In openoffice these are called "relationships" but in MS access they are called something else.
- If you do this you only have to enter the treatment for each patient - and the "associated costs" are automatically connected from the table of treatment/costs ... did that make sense.
- I think they call them relations
- See http://support.microsoft.com/kb/304466 (you want a 1 to many relationship - 1 treatment type in the treatment/costs table can link to many instances of a treatment in the patient table.
- There will be lots of tutorials on this if you need it (search "microsoft access relations tutorial" or similar) - though the article I linked above is a good explanation.
- Basically you shouldn't need field4 - but a relational link to a new table. I'm fairly certain that this is the thing you want to do - please say if you need more.
- When creating queries you can include both tables.83.100.250.79 (talk) 17:01, 3 August 2009 (UTC)
- By the way if you do a query on table2 and 3 - outputing all the fields (with no exclusions) the result will be the table you desire - with "costs" as an additional field tacked onto the end of table2 automatically83.100.250.79 (talk) 17:27, 3 August 2009 (UTC)
- How do I use the query function MS Access 2007? --33rogers (talk) 22:54, 6 August 2009 (UTC)
- or search for "query microsoft access" for more, or use the help button on access which should give more details.
- Also please start a new question when the original question is beginning to enter the archives.83.100.250.79 (talk) 11:51, 7 August 2009 (UTC)
Nasty vicious virus: "System Security 4.52", help!
[edit]Hello. My computer has been infected with "System Security 4.52", a very annoying virus. It won't allow me to open up most applications, won't allow me to access add remove programs, and won't allow me to run system restore. I have looked up various ways to get rid of it using google searches (safari and firefox wouldn't access the Internet but I was able to get on with IE and am clicking off bullshit popups from the virus as we speak). The two programs that came up in searches frr removing it, one was free but the download site was down, and the other was Spyware Doctor. I tried to download it but the virus wouldn't let me, Anyway, I logged on in safe mode after looking up how to do so, and tried to do a system retore but for some reason it wouldn't let me (I tried multiple times—it gets to the screen to choose a retsote point, I click next and nothing happens). Okay, so then I couldn't access the internet to do the download so then I figured out how to log on in safe mode with networking allowed. Long story short (I've been trying to remove this thing for many hours) I was able to dowload Spyware Doctor )I paid $30 to do so!) and run it in safe mode (the virus stops it from running otherwise). Spyware Doctor found the virus by name and removed "261 infected files". I then restarted and the virus was still on my computer, full blown. I restarted again in safe mode, ran the program again, and it found 89 files infected and supposedly fixed them. I restarted again and, you guessed it, it's still on my computer full blown. I tried again with a full scan and this is driving me crazy: it found something like "system security downloder codec" on the full scan, but, unlike the prior scans, it didn't say "do you want to fix this"; instead it just gave me a summary "1 threat detected" 0 threats removed", I guess meaning it couldn't remove it. I rebooted again and here I am with the Virus still making me its bitch. Any advice would be much appreciated.--70.23.79.67 (talk) 23:44, 2 August 2009 (UTC)
- Upload the infected files to Virus Total. Virus Total will then use 40+ different products to scan your file. I personally would suggest for you to download a free trial of Avira AntiVir to remove the malware, you can download it here [2] --33rogers (talk) 00:31, 3 August 2009 (UTC)
- Souns like Malware, fake AV crap. Try Malware Bytes, it's very effective. [3]. If it won't install read the 3rd post here: [4] RxS (talk) 00:52, 3 August 2009 (UTC)
- I second using Malwarebytes Anti-Malware. I also like to use SuperAntiSpyware for the first or second scan (in my experience, Malwarebytes will go a bit faster). Washii (talk) 22:23, 5 August 2009 (UTC)