Wikipedia:Reference desk/Archives/Computing/2014 December 7

From Wikipedia, the free encyclopedia
Computing desk
< December 6 << Nov | December | Jan >> December 8 >
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.


December 7[edit]

Building sequence from (possbibly non-connected) subsequences...[edit]

I'm trying to write a program (in perl) where the input is (possibly disconnected) subsequences of a given sequence and I want the program to output when either A, it knows the entire original sequence or B, that the inputs are contradictory.

For example, I know that the letters in the original sequence are A-F and the sequences come in as B,D,E, then A,E,F then C, A,B,F then the program should figure out the order is C,A,B,D,E,F and output it at that point, OTOH, if the last entry is C, A,F,B it should output "contradictory" given that B, E & F aren't in a good order. Any ideas? (not homework)Naraht (talk) 16:15, 7 December 2014 (UTC)[reply]

You can use Topological sorting. See the section Relation to partial orders. --88.152.132.111 (talk) 20:09, 7 December 2014 (UTC)[reply]
Looks doable, but I need to check with my manager to see if this is a requirement on this particular project or just a nice to have.Naraht (talk) 22:11, 7 December 2014 (UTC)[reply]

Back Button Should Operate at the Topic Page Level, Not the Window-within-the-Page Level[edit]

I am on a Wikipedia topic page, A. I go to a different Wikipedia topic page, B. I click on a picture within page B which opens up a window. I close the picture window and go back to reading topic page B. If I then use the back button of my browser, I should go back to topic page A, NOT back to the picture window I had opened and closed of page B! Other website do this, I suggest it be done on Wikipedia. Rose Eneri (talk) 16:18, 7 December 2014 (UTC)[reply]

The Media Viewer doesn't open a new window but changes the content of the existing tab/window. If you use the browser back button to move back from the Media Viewer then you get the order you want. PrimeHunter (talk) 17:05, 7 December 2014 (UTC)[reply]

Merging iPhones[edit]

Okay, here's the situation. I've long used an iPhone 4, with an Apple ID we'll call X. I recently got a company phone, an iPhone 5S, and it has been set up with an Apple ID we'll call Y. Just to make thing interesting, my daughter has an iPod with an Apple ID we'll call Z. I would like to migrate the paid apps and music and so forth that are associated with X onto the 5S phone. Not the phone number, though. I don't care if it's some kind of dual-ID or something else. I would then like my daughter to be able to use the old 4 phone, preferably with her ID Z. Is there a way to do it? My company is fine with me tinkering around with the phone (they gave me the password and told me to "have at 'er"), but they are not interested in helping me out, which is understandable. Is this something I'd need to contact Apple directly about? If so, what exactly would you call these operations? Migrations? Switches? Any help appreciated! Matt Deres (talk) 20:23, 7 December 2014 (UTC)[reply]

@Matt Deres if it is a company-managed phone, nobody but the IT guys at the company can help here. - gacelperfinian(talk in - error? Start a new topic) 00:12, 8 December 2014 (UTC)[reply]
Is there anything attached to the Apple ID on the 5s that is preventing you from just signing out of that account and using the one used on your 4 (Settings -> iTunes & App Stores -> Apple ID -> Sign out of new, sign in with old)? Or even preventing you from resetting the phone (http://support.apple.com/en-us/HT201441 )? Nanonic (talk) 00:27, 8 December 2014 (UTC)[reply]

Flipping web pages[edit]

Hi there, I want to discuss a problem I run into while looking for some data on the web. I do a lot of browsing mostly of Fortan code nature as well as some math. It never happens with Wikipedia pages but is getting more and more common with others, perhaps commercial websites. Let say, I do a Google search with the key words: "Fast Fourier Transform." Next I get a page of links with some headings. I choose one links and click on it. After I realized that it is not what I need I click on the return button on my browser which is IE. In more than half the instances the button does not work and I get the same page again. It started about 5-6 years ago and now it is more and more widespread.

My question is: is there a parameter anywhere I can change to prevent this from happening? Thanks, --AboutFace 22 (talk) 23:49, 7 December 2014 (UTC)[reply]

You say Google, right? Here's what happens when you click a Google result:
Google Search Page   ->   Redirect URL   ->   Intended Page
When you click the back button (or return, but it is called "Back" on IE), most browsers say "Hey, it's a redirect. I should step a little bit further!", but IE doesn't remember that, and the result is you have been thrown again on the same page. I am wondering if Bing will throw the same results. - gacelperfinian(talk in - error? Start a new topic) 00:49, 8 December 2014 (UTC)[reply]
PS. It's IE's problem. And there is no work-around. - gacelperfinian(talk in - error? Start a new topic) 01:06, 8 December 2014 (UTC)[reply]
What's your source for this? I was not able to reproduce it just now in IE 11. I searched for "Fast Fourier Transform" on Google, and clicked on several links, and though they all went through the click-tracking redirect (google.com/url?...), pressing Alt+Left took me back to the search results page. -- BenRG (talk) 06:03, 8 December 2014 (UTC)[reply]

Interesting! Thanks. So you are saying that if I switch to Mozilla this will not happen, correct? I do have a Mozilla browser in my computer. I will try to use it. The way IE behaves is really annoying. At the same time how come it does not happen with every website, only some. It never happens when I browse Wikipedia for instance. ??? --AboutFace 22 (talk) 03:25, 8 December 2014 (UTC)[reply]

I don't know the reason for your problem, but I think gacelperfinian's explanation is wrong. I suppose you could try a different browser, though, if you have no reason not to switch. -- BenRG (talk) 06:03, 8 December 2014 (UTC)[reply]
This is a bit ORish, but if you look at the back/ fwd history (left mouse 'click & hold' over the button), you may find the same page listed several times rather than just once, especially if you have been on the page for some time. I don't know with certainty why this is, but the page may be reloading as it is updated, or it is 'pushing' advertising at you. (Not certain that is even possible) Therefore, a work-around to your problem may be to simply click on the 'return button' more than once.
I have had the experience of somewhat dubious websites that seem to be able to 'hijack' your 'return' button to make it difficult to go back, especially if they are re-directing you to the type of website you normally wouldn't look at. Or one that will try to load Malware onto your PC.
Do you have the latest update of IE installed? 220 of Borg 06:40, 8 December 2014 (UTC)[reply]

The reason for my problem is exactly what I said. If you have IE, then try to click this link. It is an absolutely innocuous Fortran Reference Manual. Once I got there it does not allow me to switch back to the IE and I started with Google interface. When I inserted the same link into my Mozilla Firefox nothing bad happened. I could switch back to the page I came from without a problem. I tried to flip IE 15 time and it threw me back to the same Fortran Reference Manual. Is it a bug? Maybe it is by design? I don't know. Thanks, - — Preceding unsigned comment added by AboutFace 22 (talkcontribs) 03:19, 9 December 2014 (UTC)[reply]

That's a PDF file. PDFs aren't natively supported by the browser—they use a third-party plugin, probably Adobe Reader's if you installed it. I haven't used the plugins for years because they don't work very well. I vaguely remember having problems with the back button among other things. If you disable the PDF plugin, PDFs will open in an external application. Unless you need Adobe Reader for some reason, I recommend SumatraPDF for viewing, and Foxit Reader if you need to fill out PDF forms. -- BenRG (talk) 09:29, 9 December 2014 (UTC)[reply]

BenRG, your pdf theory is wrong. This is another example of a corporate website which apparently blocks the return button but cannot do it in FireFox. --AboutFace 22 (talk) 14:57, 10 December 2014 (UTC)[reply]

Hm, IE seems to treat that one as two pages in the history; pressing Alt+Left twice takes me to the previous page. This happens regardless of what the previous page was (it's not Google's redirect doing it, in other words). -- BenRG (talk) 21:57, 10 December 2014 (UTC)[reply]