I would like to automate a script that regularly runs rsync, and rsync prompts for my ssh key password each time I run it.  I don't mind typing the password once at the beginning of the script. I can't be prompted each time it runs an rsync command in a loop.  Is there a clean, safe way to prompt for the password once and continue using it?  My assumed solution would be to prompt for the password somehow (not sure how to do that off the top of my head) and store it in an environment variable, then use expect to make use of it. But I feel like there might be an easier approach that I'm not aware of.
I got a bash script to synchronize data between two computers. It works fine but I have to type my password every time the rsync command is called.   #!/bin/bash  sourceIP="192.168.178.128" sourceUser="user1" destinationUser="user2"  function sync() {      rsync --archive --progress -v -e "ssh -l $sourceUser " $sourceIP:/home/$sourceUser/$1/ /home/$destinationUser/$1 }  sync Pictures sync Music sync Videos sync Documents   How to store the password (via prompt) in a variable and pass it to rsync/ssh?
Currently, a user does not get any notification when a trivial edit (less than 6 characters, by a user who has the ) is made on one of his/her posts. As in .  Even though the user is trust-worthy (owing to the rep of the user), wouldn't it be nice for the OP to get a notification whenever an edit is made, even trivial? I have scripts calling other script files but I need to get the filepath of the file that is currently running within the process.   For example, let's say I have three files. Using :   script_1.py calls script_2.py.  In turn, script_2.py calls script_3.py.    How can I get the file name and path of script_3.py, from code within script_3.py, without having to pass that information as arguments from script_2.py?  (Executing os.getcwd() returns the original starting script's filepath not the current file's.) How can I get a debug log for the sites guest user/public profile? [updated for Spring 18] PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string What I want to do is to remove all accents and umlauts from a string, turning "lärm" into "larm" or "andré" into "andre". What I tried to do was to utf8_decode the string and then use strtr on it, but since my source file is saved as UTF-8 file, I can't enter the ISO-8859-15 characters for all umlauts - the editor inserts the UTF-8 characters.  Obviously a solution for this would be to have an include that's an ISO-8859-15 file, but there must be a better way than to have another required include?  echo strtr(utf8_decode($input),             'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ',            'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy');   UPDATE: Maybe I was a bit inaccurate with what I try to do: I do not actually want to remove the umlauts, but to replace them with their closest "one character ASCII" equivalent. What is the origin of BrEng ‘bird’ meaning “young woman”? Bird:         (Brit.) a girl or young woman, esp one's girlfriend ()      According to  bird:         "maiden, young girl," c.1300, confused with   (q.v.), but felt by later writers as a figurative use of  (n.1). Modern slang meaning "young woman" is from 1915, and probably arose independently of the older word.      also :         , bird was used for ‘girl’, but this was probably owing to confusion with another similar middle English word, burde, which also meant ‘young woman’. The usage crops up from time to time in later centuries, clearly as an independent metaphorical application, but there does not really seem to be an unbroken chain of occurrences leading up to the sudden explosion in the use of bird for ‘young woman’ in the 20th century.   (www.dictionarycentral.com)      Modern usage of bird meaning girl appears to be unrelated to the old Middle Ages meaning. Etymonline dates it back precisely to 1915.    What is the modern origin of bird meaning young woman?  In what context did they start to use it at the beginning of the 20th century? Can a virtualized machine have the CPU and RAM resources of multiple underlying physical machines? We are studying implementing some virtualized servers here, but we don't know what will be better suitable for us. Some folks are saying better have two huge servers, and others are saying have like a ten middle-end servers.  We have a legacy Visual Foxpro application, which nowadays run on Dual Xeon E5405 @ 2GHz and 16Gb of RAM. The currently server its getting too slow due the number of active users and process running on it. Virtualizing this server will give us the benefit of an faster disaster recovery.  So the question is, having like ten physical servers running at 1.7GHz and 4Gb of RAM, we could virtualize one server into 4 machines, and have one virtualized server running at 6.8GHz and 16Gb of memory? If yes, there is some how if one machine stops, automatically manage this virtual machine to another one, and execute the appropriate maintenance on it, and later back to it again? Why is one migration showing up as to a blank site? I was just looking at the statistics for migrated questions in the  mod tools, and noticed this oddity:    The actual statistics, as visible to any 10k+ SFF user , are: 6 migrated to Worldbuilding, 2 to Literature, 2 to SFF meta, 1 to Movies &amp; TV, 1 to Writers, and 1 to Aviation.  Why is one of the meta migrations showing up with a blank icon rather than with the other?  Both migrated questions were closed as duplicates on meta. Both were migrated by 5 community members without mod involvement. One of the stubs on main has since been deleted, but so have the stubs for some of the other migrated questions. I can't think of anything to explain this discrepancy. If background applications can't launch automatically how does Cardcase launch on a location change? I am really confused.  Which preposition is correct?     She is in/at the park.   They are in/at the park.   I am in/at the park.   Should I use in or at in these sentences? Novel about a teleportation device and a con artist alien I read two (maybe three) books about a protagonist who communicates with an alien who provides the instructions on how to create a device to teleport. The device is flawed in that it purposefully uses more energy (much more) by taking it from the rotation of the Earth.  The main character and two others continue to fight, commit intrigue, etc. The alien then uses them to recruit other races to do the same thing. multiplication equivalent of the summation symbol I was curious (even though this is a very amateur question)... what would the multiplication equivalent of sigma (the summation symbol) be? $$\sum$$ I want to do a series of multiplication of terms.... instead of addition... Are the Night's Watch still required? Suppose $n$ divides $3^n + 4^n$. Show that $7$ divides $n$. Suppose $n \geq 2$ and $n$ is a divisor of $3^n + 4^n$. Prove that $7$ is a divisor of $n$.  My work so far:  I had a hypothesis that if $n| 3^n + 4^n$, then $n = 7^k$ for some $k\in\mathbb{N}$. But this is not necessarily so. Take $n = 7⋅379$, where $3^7 + 4^7 = 7^2⋅379$. Then, $3^7+4^7$ divides $3^n + 4^n$, and since $n$ divides $3^7+4^7$, we must have $n|3^n+4^n$. Layers with same coordinates not lining up I have a project where I have a few layers (State of Texas, cities, roads, etc.). They are all resaved and projected to NAD83 / UTM zone 14N EPSG: 26914. The project CRS is also NAD83 / UTM zone 14N EPSG: 26914 and on the fly projection is enabled. I added a text delimited file and cannot get them to line up. I checked the attribute table of the delimited file and the coordinates are correct. I cross-checked this with a point close to where a few of the points from the delimited file are and they are very close so in theory they should be lining up. I tried to save the delimited file and save it with the same projection and add the shp file back in and that did not work. Anyone have any ideas? I can't think of anything else to try. In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so:  function foo(&amp;$bar) {     // ... }   Now, I am aware that this is not designed to improve performance, but to allow functions to change variables that are normally out of their scope.  Instead, PHP seems to use Copy On Write to avoid copying objects (and maybe also arrays) until they are changed. So, for functions that do not change their parameters, the effect should be the same as if you had passed them by reference.  However, I was wondering if the Copy On Write logic maybe is shortcircuited on pass-by-reference and whether that has any performance impact.  ETA: To be sure, I assume that it's not faster, and I am well aware that this is not what references are for. So I think my own guesses are quite good, I'm just looking for an answer from someone who really knows what's definitely happening under the hood. In five years of PHP development, I've always found it hard to get quality information on PHP internals short from reading the source. How to call a confirmation dialog box? I have a button in my menu named "New File" as shown:    and I want when I click on the "New File" button to imitate what the Blender File->New does, where a check message box appear first confirming that you want to reload the Start-up File and if pressed then the startup file is loaded as shown below.    This is my script, when I press on new it opens the startup file without checking:  class NewFile(bpy.types.Operator):     """New File"""     bl_idname = "wm.newfile"       bl_label = "New File"     bl_options = {'REGISTER', 'UNDO'}      def execute(self, context):         bpy.ops.wm.read_homefile()         return {"FINISHED"} I'm trying to compute this integral, $$\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx \hbox{ where } 0&lt;a&lt;1$$ I drew a typical Pacman contour with branch cut at positive real axis. Then, we have $$\int_{\Gamma}\frac{\ln z}{z^{a}(z+1)}dz=\left(\int_{L_{1}}+\int_{L_{2}}+\int_{C_{R}}+\int_{C_{\epsilon}}\right)\frac{\ln z}{z^{a}(z+1)}dz$$ The function has a pole at $z=-1$. Then, by residue theorem, the whole integral becomes  \begin{align*} \int_{\Gamma}\frac{\ln z}{z^{a}(z+1)}dz&amp;=2\pi i\text{res}(\frac{\ln z}{z^{a}(z+1)};-1)\\&amp;=2\pi i\lim_{z\rightarrow-1}(z+1)\frac{\ln z}{z^{a}(z+1)}\\&amp;=2\pi i\lim_{z\rightarrow-1}\frac{\ln z}{z^{a}}\\&amp;=2\pi i\frac{\ln e^{i\pi}}{e^{i\pi a}}\\&amp;=2\pi i\frac{\ln1+i\pi}{e^{i\pi a}}\\&amp;=-\frac{2\pi^{2}}{(e^{i\pi})^{a}} \end{align*} On $L_1$, $z=xe^{i\epsilon}$ where $\epsilon\leq x\leq R$  On $L_{2}$, $z=xe^{i(2\pi-\epsilon)}$ where $\epsilon\leq x\leq R$  On $C_{R}$, $z=Re^{i\theta}$ where $\epsilon\leq\theta\leq2\pi-\epsilon$  Lastly on On $C_{\epsilon}$, $z=\epsilon e^{i\theta}$ where $\epsilon\leq\theta\leq2\pi-\epsilon$  So I tried to compute them separately and I anticipate the curves will both go to $0$ by ML inequality, and two linear integrals will consist of the term $\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx$ and hence simply solve for it. But I'm having trouble physically solving it out. I think the log is throwing me off. Can anybody please help me? Evaluate the following integral:  $$\int \frac{\sqrt{\sin ^4x+\cos ^4x}}{\sin ^3x \cos x }dx$$ where $x \in \big(0,\frac{\pi}{2} \big)$  Could some give me hint as how to approach this question?  I tried to use the fact that $\sin ^4x+\cos ^4x=1-\frac{sin^22x}{2}$ but it didn't help. How should I proceed? Why are there two tensions on my free body diagram? Time Dilation When In Orbit Imagine a space ship orbiting the sun at near relativistic speeds, when compared to Earth (say from the reference frame of the sun) there would be x amount of time dilation.  This would mean people on the ship could live for 100's of Earth years.  My question is what would happen if a second ship flew directly away from the Sun and back (ignoring acceleration) at the same speed the orbiting ship is travelling, would the time dilation for the ship that travels in a straight line be the same as that moving in a circle?  The reason I ask is that I was imagining a scenario where intergalactic travel is possible as time dilation means even a journey of light years only ages the crew a fraction of that time, with space stations orbiting certain star systems at similar speeds so that people that don't work on ships can live a similar length of time. I understand that time dilation is all linked to a certain reference frame but working with a reference frame of the sun what would the time dilation be for the different objects taking different paths but at the same speed relative to the sun? If the ship docked back with the space station would they both say the same amount of time had passed?