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

Computing desk
< November 4 << Oct | November | Dec >> November 6 >
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.


November 5 edit

A Step Back edit

I had an IED hard-disk with Windows XP doing fine. Then due to some unavoidable fault both the motherboard and processor (AMD Sempron) had to be changed to their a bit more modern avatars. RAM was also upgraded. Fortunately this new motherboard (which was not exactly brand-new), was able to get along with old IED hard-disk. But the shopkeeper who was hired to take all this task suggested that let's change system from XP to Windows 7 (perhaps he was right because inspite of all his fitting and unfitting and refitting and booting and rebooting and again, the PC wasn't working). And I agreed. He installed Windows 7 on the old 260 gb disk, ensuring me that only partition C: where XP is, will be overwritten by 7 and all other partitions will remain as they are. But after 7 was installed well and proper, I lost all my most useful things that are too old to be bought but fitted like glove-in-hand with my current projects. Can someone please suggest some way with which I can get rid of this new OS and get back my old disk.124.253.147.93 (talk) 21:36, 5 November 2016 (UTC)[reply]

Did you ever take a backup? The disk sounds as if it was reformatted. If you really want XP and old software you may have to install it again from the installation media (CDs). With so much new hardware Microsoft may consider this to be a totally new install and not issue a key. Graeme Bartlett (talk) 00:11, 6 November 2016 (UTC)[reply]
It may very well be that the other partitions were preserved. But what's on them? By default Windows pretty much stores everything on the system partition and has since well before XP. Unless someone made a backup anything that was on the system partition (the one you called C) including any personal document etc will be long gone. In future, you should backup befoe making major changes. You should also have backuped anyway. Nil Einne (talk) 13:06, 6 November 2016 (UTC)[reply]
What this user meant is that they lost installed programs, not data (which were probably on a different partition). Whether it is possible to return WinXP depends on how Win7 was installed. For instance, was partition C formatted or not. Ruslik_Zero 20:05, 6 November 2016 (UTC)[reply]
Re-reading the original message you're right, sorry for my mistake and any confusion it caused. Although I would note that if you had a proper backup, the ability to go back would again be guaranteed. If you don't have a backup, you have to rely on the original Windows being preserved (i.e. an upgrade rather than format) and for nothing to go wrong (e.g. something was deleted which shouldn't have) during the downgrade process. Also note that compatibility between Windows XP and 7 (or even later editions) is actually relatively high, especially outside the gaming world and if you're willing to take the risk of running programs in admin mode where needed (and ultimately it would be better to do so than to continue to run a long unsupported OS). If there are some programs which are "too old" you may want to investigate whether they are genuinely too old. If this was a simple upgrade, most programs including their installations should actually have been preserved, except for those Windows believes are incompatible or which weren't installed very well so Windows may have lost the shortcut. Nil Einne (talk) 03:05, 8 November 2016 (UTC)[reply]

What is the name of this sorting algorithm? edit

What is the name of the sorting algorithm that works like this?
If the list has just one number, the list is already sorted and nothing is done.
If the list has two number those 2 numbers are sorted by selection sort
If the list has more than 2 numbers it works like this:
1-First you sort of the first two numbers of the list by selecting sort.
2-Then you pick the third number and compare with the first one of the list, if the number is smaller or equal to the first one, you put it BEFORE the first, if not you compare with the second, if its smaller or equal to the second you put it before the second, if he is higher than the second number, nothing need to be done (since he is already in the correct place, after the second number)
3-Now you do the same with fourth number, comparing it up to the third number, when checking where fifth number should go you compare the fifith number with all numbers up to the fourth one, and this goes on until the last number of the list is compared and you discover where you should put him.
4-Remember that when you discover where a number should be, you don't need to continue.
I can give an example if needed.201.79.57.169 (talk) 22:21, 5 November 2016 (UTC)[reply]

It sounds like you're describing insertion sort. CodeTalker (talk) 23:03, 5 November 2016 (UTC)[reply]
Yes; but ...not completely. The typical insertion sort implementation hopes the data items are partially sorted, and to make use of that partial sort it compares every new item with those already sorted in reversed order: the n-th item is compared to the n-minus-one item first, then to n-minus-two, and so on, until the first one.
See the section Insertion sort#Algorithm for insertion sort for an algorithm. The outer for i = 1 to length(A)-1 loop counts upwards consecutive items to be sorted, the inner while j >= 0 and A[j] > x loop scans down those already sorted to find a new place for theA[i] item.
The algortihm described by 201.79.57.169 performs both scans from 1 upwards. --CiaPan (talk) 20:37, 10 November 2016 (UTC)[reply]