Learning Ruby, early stages. I have a very simple script that I run on terminal and I want it to open files in browser based on user input. What code can I use (I have found references to RoR so far, didn't help):  puts "What type of train would u like to see today? steam or diesel" print "&gt; " train = $stdin.gets.chomp if train == "steam"      what code can I put so script opens xyz image on browser?   elsif train == "diesel"      what code can I put so script opens xyz image on browser?   else "Sorry, I didn't understand that. Bye"  end
In Python, you can do this:  import webbrowser webbrowser.open_new("http://example.com/")   It will open the passed in url in the default browser  Is there a ruby equivalent?
I'm looking for a way of saying “having amorous affairs”. Ideally it should indicate a married man fooling around with younger women, and the expression should be informal, humorous, in low register but yet not rude. Add a way to see where links go in Android app I think it would be good to have a way for the user to view the target URL of a link before following it. I'm pretty sure that I'm not the only one who dislikes blind-clicking -tapping links.   When I use SE in the mobile browser, I routinely long-press links to find out where they go before following them. I wish I could do the same thing in the app, with the same or a similar method.  (It's important that this won't conflict with text selection, since you can't long-press on links to select them now anyway.) Do you need to take the Hide action when you are Invisible, make no noise and leave no traces? The Situation: Lets say you are under the effect of Invisibility.  An invisible creature is impossible to see without the aid of magic or a special sense. For the purpose of hiding, the creature is heavily obscured. The creature's location can be detected by any noise it makes or any tracks it leaves.  And you are wearing the Boots of Elvenkind  While you wear these boots, your steps make no sound, regardless of the surface you are moving across. You also have advantage on Dexterity (Stealth) checks that rely on moving silently.  Now your groups ranger or druid casts Pass Without Trace on you.  [...] can’t be tracked except by magical means. A creature that receives this bonus leaves behind no tracks or other traces of its passage.  My Question(s): I know that when you are Invisible and you did not hide, you are still detectable because of the noise and the track you leave behind. But the Boots of Elvenkind and Pass Without Trace take care of that. So:  Are you still required to take the hide action in this situation if you don't want enemies to know your location/presence? If so, why? What gives away your location? If not and you are under the effect of greater Invisibility do you get the benefits of &quot;Unseen Attackers and Targets&quot; for every attack you make when you move between attacks? (You would give away your location, but are not detectable, so completely hidden again when you move) Replaced wrong car in garage in GTA Online I was asked to replace a car in order to put another car in my garage. However I thought I would be able to swap the car I wanted in and take out the other car that was already in there so I could bring it to my other garage. Can I get my car back? Domains in cell membrane How is movement of proteins and lipids between different domains of cell membrane prevented?  Why is the noncytosolic layer not able to do lateral movements between domains but cytosolic layer is able to do so? PDF video Embedding Problem I have embed an mp4 video in the PDF file as given below:  \documentclass{beamer} \usetheme{Singapore} \usepackage{media9} \usepackage{hyperref} \begin{document}  \begin{frame}\frametitle{Title}  \includemedia[ width=\paperwidth,height=0.7\linewidth, activate=pageopen, flashvars={aaa.mp4 &amp;autoPlay=true} ]{}{C:/Users/name/Desktop/aaa.mp4}  \end{frame}  \end{document}    There is no compile time error in the code but after running it this massage comes along a  blank pd f file....  "To view the Flash @R Technology content in this pd f file, please install the required version of Flash Player"  I would like to add here that I already have installed the latest version of Flash Player(Adobe Flash Player 12 ActiveX). So,Can anyone tell what version is required to be installed to obtain Video in pd f file. I'm a US passport holder. What documents do I need when I fly from the U.S. to Germany?  Assume I'm going for a few weeks of vacation.  Obviously I need my passport.  What about a "visa"?  Anything else? Mac Mini (Mid-2011), 16GB SSD, 16GB RAM, El Capitan (v10.11.6)  The Mac ran fine until I upgraded to Sierra. The latest Mac OS conflicted with most of the specialized apps I use every day, So I immediately returned to El Capitan.  Activity monitor shows that two "Installer/Installer.app" items are always running and are they major users of all of my available memory. Consequently, all my others apps become unresponsive.  I run Disk Utility, and the Installer.app show up there as .dmg files; but I cannot erase, delete, or unmount them. None of my 3rd party app can remove the installers.  My Mac Mini, which should be running super-fast (as it used to), now runs dreadfully and disgustingly slow. I a truly upset with Apple for this kind of garbage. To get their help: $$$. Show that the equation, $x^3+10x^2-100x+1729=0$ has at least one complex root $z$ such that $|z|>12.$ Using a question mark mid-sentence Is it acceptable to publish a paper using an affiliation with a former employer? Recently I've changed jobs, and consequently the field of research has also changed. But I'm still getting proposals for publications in the previous field, and it is interesting for me to accept some of them. My concern is about which affiliation to use: on one hand I gain all the knowledge in that field while working on the previous employer, also I hope they can cover my expenses related to the publication. On the other hand, I do not work for them anymore, and my current company has very little interest in my old field of research, and probably will not support it financially, but I think it is wise to mention them as well. As a compromise I'm thinking to put the previous employer in the affiliation, and the name of my new employer in the footnote, something like "currently at XYZ". Surely I'll discuss this issue with both, although the opinion of the community is also very valuable. Print LIST of unicode chars without escape characters Controlling Volume Mixer I have tried as following:  1. Turn off: export DISPLAY=:0.0 &amp;&amp; xset dpms force off  2. Turn on: export DISPLAY=:0.0 &amp;&amp; xset -dpms   Which works but that is a temporary solution, which does not fix my problem yet. When i reboot system it start again and again the same auto turn off mode.   How can i now remotely using SSH turn it off forever?  IMPORTANT:  - KIOSK (ATM machine will use this option) - 24/7 advertising display/slides will use this   Optional Note: this guide i followed   , but permanent solution did not worked. When the phrase is used as an object, why so many native speakers are saying "you and I" instead of "you and me"? I'm not a native speaker but I thought "you and me" is correct. Not sure if this falls into the same category, but "Just between you and me" sounds more natural than "Just between you and I". My goal is to produce a graph showing the linkages (and lack there of) between several fields that share a common subproblem by showing who cites whom.  There are many databases that show citations between papers: , , and Google Scholar.  However none allows me to download even part of their database.  Is there some database I have overlooked?  Has someone written a scrapper for one of these websites?    For reference, the fields I'm considering are Mechanics, Magnetic Resonance Imaging, Signal Processing, Geophysics, and several others. Uncertainty and wave-trains My textbook and the following extract from feynman's lectures present the same idea regarding wavetrains and uncertainty in their wavelengths. Why is it that a wavetrain confined to some space has an uncertainty in its wavelength or the wave number? Is not a confined wave-train equivalent to a burst of successive pulses which can have a definite wavelength according to their origin or nature of origin.   Next, i understand that the De Broglie relation relates the uncertainty in wavelength to the uncertainty in momentum but what links the finiteness of the wave-train to the uncertainty in position? What is rank deficiency, and how to deal with it? Fitting a logistic regression using  ends with   Error in mer_finalize(ans) : Downdated X'X is not positive definite.    A likely cause of this error is apparently rank deficiency. What is rank deficiency, and how should I address it? Which test should I use for ordinal data? In my experiment, I asked 50 participants to rank on a 5 point scale which voice they preferred. I summed each particpants' rating for each voice: the total for voice 1 is 95, the total for voice 2 is 186.  Am I correct in doing this? Or should I analyse the raw data?  Which test should I use for this data? Would a t-test work here? Alternatively I thought I could use a chi-square test.   I am interested in seeing if the preference for voice 2 is significant. In what occasion could the word “precious” be taken disapprovingly, or sarcastically? I understand that the word “precious” in the following quote of Maureen Dowd’s article “Heart of Darkness” (NYT, March 20) literally means “2. valuable or important and not to be wasted” as defined in OALD:     Congressman Jones read an e-mail from a former boss of General   Allen’s, giving the congressman this unvarnished assessment:   “Attempting to find a true military and political answer to the   problems in Afghanistan would take decades. Would drain our nation of   precious resources, with the most precious being our sons and daughters. Simply put, the United States cannot solve the Afghan   problem, no matter how brave and determined our troops are.   But I didn’t know “precious” has another meaning as defined in OALD: 5. (disapproving, people and their behavior) very formal, exaggerated and not natural, and Readers English Dictionary: 2.(colloquial) terrible, almost worthless, until I was told by my respected forum mate a few days ago.   Being encouraged by his suggestion for me to “ask another question if I’m not sure of what he means by describing his input as “precious” is actually rather “precious” phrasing, I would like to ask:   What is an example of “precious” being used as “disapproving” or sarcastic way (as neither OALD nor CALD provides examples)? Is there an easy way to discern the instance “precious” being used as “disapproving” from the case being used in the sense of genuine “great value” as used in the above quote other than judging from the context?