Jump to content

Wikipedia:Reference desk/Archives/Computing/2017 March 20

From Wikipedia, the free encyclopedia
Computing desk
< March 19 << Feb | March | Apr >> March 21 >
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.


March 20

[edit]

Problem with URL containing a curly apostrophe

[edit]

I have a problem with linking this URL http://www.oxfordtoday.ox.ac.uk/features/seeking-sirens’-song The curly apostrophe after sirens is part of the URL, and if you copy and paste the whole thing into the web browser it takes you to the page. But if you include it as it stands in plain text, for instance in a Facebook post, it breaks at sirens and fails to work, with the active URL becoming http://www.oxfordtoday.ox.ac.uk/features/seeking-sirens . I tried to find a hexadecimal code for the curly apostrophe, thinking that might fix the problem, but I can't find one. Can anyone suggest a fix for this? Moonraker (talk) 05:53, 20 March 2017 (UTC)[reply]

Try http://www.oxfordtoday.ox.ac.uk/features/seeking-sirens%E2%80%99-song, which I got by right-clicking the url you pasted above, then "Copy link location" (in Firefox, wording might differ in other web browsers) and pasting in this reply.-gadfium 07:22, 20 March 2017 (UTC)[reply]
...which is to use Percent-encoding, a standard method that helps work around software trouble on some platforms and applications softwares. This is a standard machine-readable way to represent any character, including special characters, in a URL.
For what it's worth - many users will have no problem with the original link, provided that they are using certain modern web browsing software. Other users may use web browsers that transform or interpret special characters or quotation marks, and they would not be able to use the original link. For unfamiliar users, this is a heisenbug - mysteriously appearing and disappearing without an obvious cause.
Nimur (talk) 16:11, 20 March 2017 (UTC)[reply]
Many thanks, gadfium and Nimur, the Percent-encoding is exactly what I was after, but I didn't know that name for it. It works a treat. Moonraker (talk) 22:53, 20 March 2017 (UTC)[reply]

ipad keyboard worries

[edit]

Hi, I'm looking at getting a new ipad, but every time I check them out in stores, the on-screen keyboard doesn't work very well. It will respond, but not very well, and certain keys (often the "s" key) need to be tapped very carefully. Does anyone know what the story is with this? Does Apple know about it? I have googled the problem, but no one seems to have a solution, and in fact I only seem to get a few hits (the search gets confused with other, unrelated, keyboard problems). IBE (talk) 18:22, 20 March 2017 (UTC)[reply]

Touchscreens can vary in response with how wet or how dry your skin happens to be. If you have problems with your skin capacitance, then perhaps using a stylus would help? You can make your own. Dbfirs 08:33, 21 March 2017 (UTC)[reply]

How to pipe things through Python?

[edit]

How can I squeeze Python in a pipeline in Bash? For example, I know "abcdef".capitalize() outputs "Abcdef". But if I want to run something like echo "abcdef" | python3 -c '<string>.capitalize()', how can I get the stream into Python? I have already tried things like: python3 -c "print(`echo 'abcd'`.capitalize())", and, echo "abcdef" | python3 -c '$0.capitalize() to no avail. --Hofhof (talk) 20:17, 20 March 2017 (UTC)[reply]

You can look at this. Ruslik_Zero 20:56, 20 March 2017 (UTC)[reply]
I mean, can I use Python at all in a one-liner, and not in a full-fledge script saved in a file?--Hofhof (talk) 23:17, 20 March 2017 (UTC)[reply]
One way would be something like this, although it doesn't use a pipe; it just passes the string as a command line parameter:
          python3 -c $'import sys\nprint(sys.argv[1].capitalize())' abcdef
If you really want to use a pipe (which would make sense if you're going to process several lines of input), you could do
          python3 -c $'import fileinput\nfor line in fileinput.input() :\n\tprint(line.capitalize())'
CodeTalker (talk) 01:13, 21 March 2017 (UTC)[reply]
That was kind of ugly.Hofhof (talk) 01:33, 21 March 2017 (UTC)[reply]
Yeah, python is an ugly language. Its insistence on using newlines and tabs in its syntax forces you to do this kind of stuff when you pass a program on the command line with -c. CodeTalker (talk) 02:01, 21 March 2017 (UTC)[reply]
By comparison, the same thing in Perl is rather cleaner looking:
               perl -e 'while(<>){ print ucfirst }'
CodeTalker (talk) 02:04, 21 March 2017 (UTC)[reply]
With Perl you can even avoid the explicit while-loop by using -n or -p, as applicable:
                  perl -ne 'print ucfirst'
--76.71.6.254 (talk) 03:14, 21 March 2017 (UTC)[reply]

A good French site to ask for a movie to be identified

[edit]

I'm trying to identify a probably French movie from the 80s. I've already posted my description of it on several English language sites without luck, now I'm thinking about trying to reach a French audience which might have a better chance of recognising an older, obscure French movie. Can you recommend me a good site or forum for that? (Other than Wikipedia.) I've registered on www.allocine.fr but I can't make a new thread there, so that's that. Languagesare (talk) 21:15, 20 March 2017 (UTC)\[reply]

Have you tried movies.stackexchange.com or some subforum in reddit?--Hofhof (talk) 01:32, 21 March 2017 (UTC)[reply]
The IMDB's advanced title search might be useful, as you have several pieces of information to filter on (approximate date, country, and presumably you can try some keywords or plot words or a cast member). Note that some of the filters only allow you to try one value, but of course you can try different searches. --76.71.6.254 (talk) 03:20, 21 March 2017 (UTC)[reply]
Thanks, it's already on movies.stackexchange.com and reddit and I'm trying with the IMDb advanced search. Languagesare (talk) 12:24, 21 March 2017 (UTC)[reply]
You could also try a Wikidata query. All the best: Rich Farmbrough, 16:08, 22 March 2017 (UTC).[reply]
Have you tried http://www.whatismymovie.com/? 89.255.92.169 (talk) 18:32, 25 March 2017 (UTC)[reply]