Wikipedia:Reference desk/Archives/Computing/2010 November 5

= November 5 =

Problem after installing new video driver
Hi Reference Desk, I recently installed the ATI Catalyst 10.10 drivers for my ATI Mobility Radeon HD 5450 on Win7 64 bit. Now, it seems to be limiting the number of display colours, and when things with colour gradients are visible, for example the background of Microsoft Word, it looks like a compressed JPEG screenshot and there are very visible steps between the colours. I've recalibrated the display, reinstalled the driver, reset to factory settings, fiddled with Windows colour settings, all to no avail. I was wondering if this was a known issue, and/or if anyone had a clue how to fix it?

Thanks 110.175.208.144 (talk) 06:30, 5 November 2010 (UTC)
 * At a rough guess, you might have been reset to basic colour. Press F1 for help, type Aero and open the Aero troubleshooter and follow the prompts to get Aero back... this might also fix your colour problems and get the 24/32 bit colour gradients back. The troubleshooters in Win7 are surprisingly good and can make some low-level changes when they have to. Worst case scenario - you can go into device driver and rollback the drivers. Sandman30s (talk) 09:12, 5 November 2010 (UTC)


 * That didn't help, but, knowing that the Aero troubleshooter did nothing, eliminating the possibility of a DWM problem, I thought about what other things manage the visuals of the computer, and I thought the Themes service. I restarted that... and voila! Colours :) But now, I don't know why I had to manually restart the themes service, and the problem did not get fixed an a reboot previously :/ Thanks for your help! 110.175.208.144 (talk) 23:52, 5 November 2010 (UTC)

Automatic form filling application required
Job applications and other bureaucratic documents take too long to fill in neatly. Is there any application (preferably free, with source code in VB6 of VC++6) that I could either use directly or modify to (1) recognise the various rows, columns and common questions that need filling in, by both text and graphics recognition, with a manual mail merge type option if this fails, and (2) using a database, fill in the form in all the right places. Unlike mail merge in MS Word, it would have to fill in lots of separate sections instead of just one (the address) and of course the size would be standard A4-I can't get this size using MS Word, or at least my version, which is a few years old. —Preceding unsigned comment added by 80.1.80.5 (talk) 13:19, 5 November 2010 (UTC)


 * No. The field labels in forms are often ambiguous.  So, a computer will need to understand the purpose of the form to attempt to understand the meaning of the field label.  Since computers cannot think, they cannot fill out forms.  At best, a computer can assume "Name" means your full name and "DOB" means your date of birth.  But, it wouldn't understand what to do if "Name" was the name of your dog or "DOB" is the date on the back of your passport.  In the end, you (the human) must read every label and decide what to put in every field. --  k a i n a w &trade; 14:22, 5 November 2010 (UTC)


 * Yes, with caveats. See http://www.laserapp.com.
 * DaHorsesMouth (talk) 22:25, 5 November 2010 (UTC)

"number of cores" on 15" Macbook Pros?
Hi,

It is not clear to me, there are three configurations of Macbook Pro: 1) 2.4 Ghz i5 2) 2.53 Ghz i5 3) 2.66 Ghz i7 (with 2.28 Ghz) What is the real performance difference?  Are the first two both dual-core?  Only the third one says "which features two processor cores on a single chip"??

Plus, as an added point of confusion, i7 has hyperthreading enabled, doesn't it? So, is it the case that option 1 and 2 are two cores shown to the OS as such whereas option 3 is two cores shown as four cores to the OS?

Or, is it exactly half of what I just said? Thanks! 84.153.205.142 (talk) 15:01, 5 November 2010 (UTC)


 * based on the Intel page the i5 processors are either 2 or 4 core processors (depending on model - the Apple specs are not precise, though the 'features' page at Apple says dual core).


 * cores are cores, they are not 'shown to the OS'. software needs to be written to take advantage of multiple cores, but for those apps that are you will see moderate increases in performance with the higher-end chips.  This will be noticeable in casual use (apps opening slightly faster, long processes finishing slightly sooner), very noticeable in processor intensive tasks, and may increase the practical longevity of the machine itself (in the sense that future improvements in hardware, and the consequent revisions to software, won't leave the machine in the dust quite as soon).  -- Ludwigs 2  15:35, 5 November 2010 (UTC)


 * Wandering around the apple website confirms that all three chips are dual core. However this http://www.macworld.com/article/150589/2010/04/corei5i7_mbp.html gives the chip part no.s : i5 520M, i5 540M , and i7 620M , assuming that wasn't speculative and is true then all three have two cores, with hyperthreading, meaning a total of 4 cores threads (or "4 virtual cores"). Finding out more info on these chips is trivial - just use search and the first result probably takes you to the intel page eg http://ark.intel.com/Product.aspx?id=47341 . The article MacBook Pro has the same info.
 * The second i5 is (as far as I can tell) just a faster clock. The differences between the i7 and i5 include a larger cache in the i7, but I wouldn't be suprised if there are other architectural differences. actually looking at generic benchmarks between these, seems to suggest that the i7 part is no different from an i5 with bigger cache, and higher clock, but that's speculation. 94.72.205.11 (talk) 16:36, 5 November 2010 (UTC)
 * probably not my place to say but looking at UK prices it really looks like the additional costs of the better processored 15"s is way way way beyond either the base processor price different, and on the borderline or above of what is worth paying for. - the base model is easily good enough for 90+% of people. You can easily find 'real world' comparisons searching for "apple macbook pro benchmarks i5 i7" .94.72.205.11 (talk) 16:50, 5 November 2010 (UTC)


 * Thank you: when you say that "software needs to be [specially] written to take advantage of multiple cores", are you just talking about hyperthreading, meaning that if I were just running a SINGLE processor-intensive application, it needs to be written in that way? Or, are you talking about something more general?  Because don't two concurrently running different applications AUTOMATICALLY get put on their own core by the OS?  In that sense, my reasoning is informed by the "dual-processor" behavior I had learned of a few years ago.  In fact, isn't a dual-core, logically, just 2 processors?  Or, is there a substantial difference as seen by applications and the OS between a dual-core processor, and two processors each of which is exactly the same as a single core?  (I don't mean difference in whether they access as much separate level-1 and level-2 cache, I mean as seen by the OS and applications).  If there is a substantial difference, what is that difference?
 * I guess my knowledge is not really up to date and what I would really like to know is the difference between multiple CPU's (dual and quad CPU machines) of yesteryear power desktops, and multiple cores of today? Thank you! 84.153.205.142 (talk) 16:48, 5 November 2010 (UTC)
 * (replying to question for Ludwigs) There hasn't been any change of definition (one possibly source of confusion is that sometimes a processor can have two separate physical chips within it, or one chip with two processors on it - both are as far as end results are concerned - the same...)
 * As per multiple processes on multiple cores or threads - yes you are right - the only time there isn't any advantage is when you run a single (non threaded) program on a multicore machine. (but there are still a lot of examples of this)
 * OS's can handle multiple threaded processors in just the same way they can handle multiple core processors - ie an OS will act like it's got 4 processors on a 2 core hyperthreaded machine, no further interaction required.94.72.205.11 (talk) 16:54, 5 November 2010 (UTC)


 * If I understand it correctly, the dual-core advantage is that a multi-threaded app that's designed to take advantage of it can toss different threads onto different cores, making the handling of some processor-intensive tasks more efficient. Apps need to be designed for it because there are some technical issues involved in choosing which core to send a thread to and how to handle data that's being processed on different cores.  Basically it's the difference between a office with one photocopier and and an office with two photocopiers - you can get a lot of advantages from sending different jobs to each photocopier if you plan it out, but the 'old guy' in the office is just going to chug away on one photocopier mindlessly.  most apps made in the last few years support it - you're only going to lose the performance advantage if you have (say) an old version of some high-powered app that you're continuing to use to save buying an upgrade.  I don't know enough about hyper-threading to know whether that also requires specially-coded apps or whether it's transparent on the app level.  -- Ludwigs 2  17:12, 5 November 2010 (UTC)
 * Key term here is Processor affinity which mentions the type of problem you describe. (or the analogy where we have 4 photocopiers, two in two rooms .. and I prefer to use the two in the same room to prevent walking up and down the stairs. that's an analogy of a dual core hyperthreading processor - total 4 threads ) Programming tools such as OpenMP can set it.., whether OS's can detect and set thread affinity without being told is something I don't know. 94.72.205.11 (talk) 17:22, 5 November 2010 (UTC)


 * (reply to OP) As an example of the difference between yesteryear and today - a old quad core mac eg used 2 dual core chips, whereas a modern quad core mac has a single chip with 4 cores on it. Ignoring that they've changed from IBM's POWER chip family to intel's x86/64 family, they only difference I can think of is that todays multicore chips (4 or more) have L3 cache, whereas the old ones tended not to. Obviously things have got faster, and the chips improved, but there isn't anything I can think of that represents a major break of progression from one to the other. (probably missing something obvious).94.72.205.11 (talk) 17:45, 5 November 2010 (UTC)


 * There's some confusion about what it means for an operating system to "expose" a core. In a modern multicore system, a multicore hardware may or may not be exposed by the operating system.  In other words, different operating systems (and hardware) have different "contracts" between multi-threaded programs and the hardware that will execute the multiple threads.  If you create a new kernel thread (on a POSIX system), or a new Process (on Windows), the operating system must implement the necessary code to task a particular process to a particular core (otherwise, there is no performance gain by threading - all threads execute sequentially on one core).  When an operating system "exposes" a core, it means that a programmer is able to guarantee a particular mapping between software processes and hardware processors (or at the very least, receive an assurance by the OS that the scheduling and delegation to a CPU will be managed by the system thread API).
 * An operating system might be using multiple CPUs, even if it doesn't show that implementation to the programmer/user . Or, it might be showing cores as software abstractions, even though they do not exist.  The number of "exposed cores" and the number of "actual cores" are not explicitly required to be equal.  This detail depends entirely on the OS' kernel.  See models of threading for more details.
 * Modern programming languages, such as Java or C#, use hybrid thread models - meaning that the system library will decide at runtime how the kernel should schedule multiple threads. This guarantees that an optimal execution time can be delivered - especially if the other CPU cores are occupied.  It invalidates the sort of simplistic multi-core assumptions that many programmers make (i.e., "my system has 4 cores, so I will write exactly 4 threads to achieve 100% utilization") - and replaces this with a dynamic scheduler that knows about current system usage, cache coherency between cores, and so on.  Nimur (talk) 18:28, 5 November 2010 (UTC)

display size
Sorry folks. I know I asked this question a while back and got a great answer. problem is: I can't find the answer. I tried searching the archives but no luck. So, I will ask the question again (and save the answer!).

I am using Vista on an LCD monitor. When I go to the net, the size is 100% but this is too small. I set it at 125% but can't get the settings to stay there and have to adjust them each time. Can someone help me (again)? 99.250.117.26 (talk) 15:54, 5 November 2010 (UTC)
 * It's Reference_desk/Archives/Computing/2010 May 5.—Emil J. 16:00, 5 November 2010 (UTC)

Hmmm. That answer came in just under two minutes. . . Wikipedia is getting slow! lol. Thanks a lot. 99.250.117.26 (talk)

List associated values in MS Access
I have an access database. There are two tables in this database. The primary key in the first may be associated with multiple primary keys in the second. I would like to find a way to list in the first table the primary keys from table 2 associated with a primary key from table 1. Is this even possible? 138.192.58.227 (talk) 17:39, 5 November 2010 (UTC)


 * The usual way to do what you are asking for (if I understand it correctly) is to have a third table that sits between those two tables and maintains the associations (e.g a Junction table, among its many names). It's a lot easier than trying to put that information into the first table, and the associations can be viewed with clever SQL queries. --Mr.98 (talk) 17:57, 5 November 2010 (UTC)

Help
I made the mistake of leaving my crippled tower connected to the internet, and the damn thing auto-updated last night. The trouble is that after auto-updating, the tower automatically rebooted; however the hard drive in my home tower is on its last legs and now the machine will not reboot, every time I clear the windows XP screen I get taken to a blue screen announcing a boot up error and telling me the system has been shut down. There is precious material on the hard drive that I desperately want to put on an external hardrive before the tower goes down permanently, so I am asking if there is any way at all to get the machine back up and running one last time so I can salvage what I need from it. TomStar81 (Talk) 19:30, 5 November 2010 (UTC)
 * Consider placing the bad hard-drive in another system (that boots off a good hard-drive); or booting from a live CD. Nimur (talk) 19:48, 5 November 2010 (UTC)


 * (after e/c)
 * Two ways come to mind.
 * One is a boot disk. You can make a disk that will boot the computer off the CDrom drive. You'll only get a "dos" prompt, but that should be enough to copy files.   (You could also make a linux boot disk easy enough, if you're comfortable with Linux.)
 * Another way is to take the drive out, and put it into a USB drive enclosure. This will turn it into an external drive. Plug both drives into some other computer and copy them that way.
 * However, if the files you're hoping to retrieve are corrupted, you're going to have difficulties in either case. There are professionals that can retrieve almost anything but they're quite pricey. APL (talk) 19:49, 5 November 2010 (UTC)
 * Actually, far from the old fashioned boot disks I was imagining, it looks like some Linux LiveCDs can give you a fully usable, graphical user interface. Might be the easist way to go.
 * Try (on some other, working, computer) to make yourself a live CD of a nice and user-friendly version of Linux (ubuntu for example) and copy the files that way. "Learning Linux" can be intimidating, but you don't have to learn anything to drag and drop some files from one drive to another. APL (talk) 19:55, 5 November 2010 (UTC)
 * Indeed. The Live CD is the "boot disk" of the new millennium - it provides as many features as a full-blown graphical operating system.  It should be fairly easy to operate - simply create the disc, boot from it, and copy your hard-disk to a safe location (like a USB drive or a network drive).  Here is the official Ubuntu distribution - it is free to download and use.  Nimur (talk) 20:01, 5 November 2010 (UTC)

Monitor as TV
I'm about to move in to a small house in the UK. I will purchase either a laptop or desktop PC. I also want to watch television.

I noticed that quite large-screen monitors have dropped in price, and read a review of an example product in 'PC-Pro' magazine - a 27 inch monitor for 200 pounds Not wishing to advertize it here, but it was their 'best buy', and it is this one

I'll be using UK Freeview TV, and will probably buy a Freeview+ box to act as a receiver and recorder.

So - one question is, how to connect it up so that I could watch TV on it. I don't want to use an in-computer TV card, because I'd want to keep the PC/laptop free for other things, and also because I've found TV-cards to be somewhat unstable.

Basically, I want to watch TV on a reasonable-sized screen, and sometimes use the big screen as a computer screen.

It seems that these monitors mostly make reasonable TVs - is that correct? Whereas TVs are often poor monitors.

-Would this type of monitor make a reasonable TV? -How would it compare to a similar-price actual TV? -How can I use it as a TV without needing the computer switched on (ie how to connect it to a freeview receiver box)? -Is this a reasonably sensible approach? —Preceding unsigned comment added by 92.41.19.146 (talk) 21:40, 5 November 2010 (UTC)
 * You can get TV/monitors with integrated freeview, however for £200 the size would be about 23", so not as big. You definitely get more screen for £200 if you just buy a monitor.
 * However the monitor only has DVI and VGA inputs, which means it will not work with a standard freeview box SCART, however it would work with a Freview HD box with HDMI output (connect via an adaptor to DVI, it has HDCP so will work with an HDMI adaptor)
 * The monitor is likely to have an absolutely fine display. (I use mine to watch stuff of freview in standard definition - it's fine) Old TV's made terrible monitors (too low resolution), modern Hi-Def TVs actually make fine monitors.
 * The only other issue is that monitors typical have no speakers, or very poor sound - so you can expect to need a sound system - that could be an additional expense. (I'd expect to be able to get something suitable to make sound to TV standard for £50, but more if you want 'cinema sound'). Make sure the freeview box has the right sort of audio out you can use.
 * The big issue here is that you'll need a Freeview HD box, which adds a lot to the price (~£80+ currently, probably soon cheaper as it's relatively new).
 * It appears to be a better deal than the comparative standard price, however if you check large shops you can get TV's which will work as monitors eg random pick http://direct.asda.com/LG-32%22-LD450-LCD-TV---Full-1080P-HD---Digital/000500571,default,pd.html 32" at under £300 - it's a little bigger, and will work with any input. If you compare the additional costs of the monitor route it might seem attractive.. (note it doesn't have freeview HD, just freeview though). Generally there is usually a sub £300 30"+ hidef TV on special offer at one of the large supermarkets..(ie these offers are common) 94.72.205.11 (talk) 22:46, 5 November 2010 (UTC)
 * Thanks; interesting comments and info - especially re. HD Freeview. As I plan to buy a freeview recorder anyway, the HD version is not much extra cost, and that sounds a reasonable solution.
 * If anyone has actual experience with a monitor of this kind of size, I wonder if 1920 x 1080 starts to look like far too low a resolution for using as a 'regular' PC desktop when it gets up to the 27-30 inch sizes?
 * The sound isn't a problem, by the way - I have a decent PC-speaker system that I'd use (altec lansing with a sub-woofer) which is gonna be way better than any built-in stuff.
 * The 200-pound monitor, plus an HD freeview box w/ HDMI out, is sounding like quite a good option so far. —Preceding unsigned comment added by 92.41.19.146 (talk) 23:20, 5 November 2010 (UTC)
 * Bit of maths - because it's a wide screen monitor the 27" converts into ~13" screen height for 1080 pixels. A bog standard 1024 high screen is ~11" high - so the pixels are only 13/11 times bigger (or 18%) noticeable but probably no big deal.
 * Also equals about 80 dots per inch if my maths is correct.. better article is Pixel density 94.72.205.11 (talk) 23:59, 5 November 2010 (UTC)

C or C++
Hello there, I want to learn programming language. One of my friends told me to start with C. But somehow I started with C++. What's the difference between C and C++? I don't have any programming experience before. What I want to do is, make different kind of softwares. So which one I should choose?--180.234.26.169 (talk) 22:31, 5 November 2010 (UTC)


 * The primary difference between C and C++ is that C++ allows for object-oriented programming. You can write C++ programs without objects.  You can fake objects in C with structs and function pointers.  But, the main reason to choose C++ over C is the ease of object-oriented programming. --  k a i n a w &trade; 22:48, 5 November 2010 (UTC)


 * "Software" is very broad. What kind of software do you want to write?


 * C++ was one of my first programming languages, and I wish it weren't; it is too big and complicated. In particular, C++ requires you to think about things that aren't important unless you are really concerned about speed. C has some of the same problems, but at least it's simple, so it's not a bad choice. I think Python and Scheme (in particular, Racket; the Scheme-derived language my school uses) are excellent choices for learning to program. Some people are put off by the fact that these languages are not as popular as, say, Java. But (1) if you work on your own, you should choose the best tool, not the one that everyone else chooses, and (2) learning with a language designed for elegance rather than industry make you a better programmer in any language. Paul (Stansifer) 02:46, 6 November 2010 (UTC)


 * I agree with everything except your last statement. Learning how the computer works at a very low level makes you a better programmer.  Understanding exactly how using a floating-point operation instead of an integer operation will affect your program is important.  Understanding what may happen when you try to compare two floating-point numbers is important.  Understanding how the stack is affected when you use recursion - especially unnecessary tail-end recursion - is important.  Understanding how the memory cache is being used with loops is important.  You can use an "elegant" language that makes guesses at what is optimal, but you are left hoping that the programming language is making good decisions.  More often than not, the high-level languages make poor decisions and lead to slower execution and a waste of resources.  Personally, I teach PHP first, then Java (since I don't like the implementation of objects in PHP), then C++.  I don't teach C because anyone who knows C++ should be capable of learning C quickly. --  k a i n a w &trade; 03:05, 6 November 2010 (UTC)


 * All of those things can be important, but performance only matters some of the time. Some, even most, projects will succeed just fine if they run 100 times more slowly than they could, so programmers shouldn't worry about wasting cycles.  (Knowing enough about algorithms to get optimal big-O is usually more worthwhile.)  But writing well-designed programs always requires thought; novices should start solving that problem, and worry about performance when they have to.  Paul (Stansifer) 02:41, 7 November 2010 (UTC)
 * Per Program optimization, don't bother optimising unless and until it's really time to do so.
 * With regards to the original question, I'm partial to a "C first" approach. Learn C, because it teaches you important things that many or most other modern languages neglect, such as dealing with pointers and memory management. Only when you have a decent grasp of C do I recommend learning C++. C++ has some niceties that, when learnt first, can leave you confused or frustrated when starting to learn a language without those features. It can generally be said that almost* any language has some advantages over other ones, and C and C++ both have their advantages over one another. I find C to be a good choice for single-purpose, fast programs, where objects are not required. C++ has some weight over C when it comes to large, multi-purpose programs, since the object-oriented aspect, and the added "sugar" of not having to deal with a lot of the lower-level bookkeeping such as pointer and memory management, allow you to focus more on the goal than on the design. On the other hand, it can be argued that it's much easier to become sloppy with C++, which is another good reason to get into a C programmers' habit of cleaning up resources et al.
 * * I say "almost" here, because there are some languages out there that are more disgusting than the idea of blobfish mating. -- Link (t&bull;c&bull;m) 09:24, 7 November 2010 (UTC)
 * "C is to C++ as lung is to lung cancer" ;-). Seriously, C is a very good language for its niche. It's rather small, and rather consistent. It only has a small number of warts, and most of them turn out to be rather well-considered features on closer inspection. As a result, C is fairly easy to learn. It also exposes much of the underlying machine, so its pedagogically useful if you want people to be aware about how computers work. Everybody who knows assembler and C also has a fairly good idea of how nearly all C features are mapped into assembler. C++, on the other hand, is a very large, very rich, very overladen language. I'd be surprised to find anybody who actually "knows C++" in a full sense. C++ is rather ugly - it has come to fame because it allowed people to reuse C knowledge and C infrastructure (Compilers, linkers, and most of the tool chain) while supporting objects and classes (in fact, early on an intermediate form was called C with classes). Because of that, it took off and is now widely used, albeit still but-ugly. The only reason to learn C++ is to expect to be required to use it for some project. Java (programming language) is a better language, as is C Sharp (programming language), and if you go into exotics, Smalltalk and Common Lisp Object System are both cleaner and prettier (although one might argue that Scheme is to Common Lisp as C is to C++ ;-). --Stephan Schulz (talk) 10:03, 7 November 2010 (UTC)
 * Java, as a language, is indeed quite nice, although various Java Virtual Machines (notably HotSpot, IcedTea and Blackdown) have been known to make me want to remodel my own face using an angle grinder. I don't really think C++ is that bad, but it's true that it's quite convoluted (as is Java, for that matter, but it's less obvious because it hides the low-level parts). Personally, I prefer Python: I find it much easier to get a working prototype in Python than in C or C++. Generally, my preferences by application are such: C for embedded programming and small-ish things that need to be self-contained/run very fast/etcetera, C++ for things that need C's low-level capabilities but benefit greatly from object-oriented design (e.g. 3D games), and Python for essentially everything that isn't critically dependent on self-containedness or speed. I used to be a Java fanboy, but I haven't done anything with it for a long time, since I've become increasingly frustrated with Sun, and Python can give you almost everything Java can. -- Link (t&bull;c&bull;m) 18:10, 7 November 2010 (UTC)