“cd” does'nt work in a scripting in Ubuntu
Why can't I change directories using "cd" in a script?
Do Indian passport holders with UK Tier 2 need to get a tourist visa for Mexico? I'm an Indian passport holder currently resident in the UK under a Tier 2 (General) visa and planning on going to Mexico on a holiday. So I was looking into the rules on the Mexican embassy in the UK and :     According to the new regulations who entered into effect on 18th, May   2016 (article 26 of the Guidelines and Requirements for Migratory   Services) regarding foreign nationals visiting Mexico, holders of a   valid UK visa, regardless their nationality, are not required to apply   for a Mexican visa as a tourist, business (Non-Lucrative Activities)   or transit visitors for a stay of up to 6 months. This regulation does   not apply to British Travel Document holders.   However, :     PERMANENT RESIDENT IN THE UK (ILR / ILE / PERMANENT RESIDENTS)        According to Mexican regulations which came into force in June 2009,   Permanent residents in the United Kingdom wishing to travel to Mexico   do not require a visa to enter the country as tourists or business   visitors for up to 180 days and as visitors in transit for up to 30   days, regardless their nationality.   So which one is correct? Are Tier 2 holders with an Indian passport allowed visa-free / visa on-arrival entry to Mexico? Where is it preferred to place the answer to duplicate questions? I'm trying to compute the difference between the output of two awk commands but my simple attempts at it seem to be failing. Here is what I'm trying:  diff $(awk '{print $3}' f1.txt | sort -u) $(awk '{print $2}' f2.txt | sort -u)   This doesn't work for reasons unknown to me. I was under the assumption that $() construct was used to capture the output of another command but my "diff" invocation fails to recognize the two inputs given to it. Is there any way I can make this work.  By the way, I can't use the obvious solution of writing the output of those two commands to separate files given that I'm logged on to a production box with no 'write' privileges. What are all the font styles I can use in math mode? I'm trying to simulate a media key press using a custom shortcut.  So far, I've been able to achieve the simulation I need using the command:  xdotool key XF86AudioPlay   It works perfectly, it pauses or starts the music player every time it is run.  The problem comes when trying to run it as a shortcut.  First I tried to run an alias with a custom shortcut, but it did not work.  As explained on :     The commands run by keyboard bindings are not parsed via a shell. Your best bet is to create a directory bin in your homedir.   Next I created the suggested script and named it simplay:  #!/bin/sh xdotool key XF86AudioPlay   It is located inside a bin folder which is part of the PATH, this works fine and can be run from any location.  When trying to create the Custom Shortcut, I was unable to get it to execute, the configuration is the following:  Name: test Command: simplay  Shortcut: Ctrl+Alt+R   After searching a bit more I found another way to execute the shortcut:  gnome-terminal -e simplay   I tried it on a terminal and noticed that when executing it it would rapidly open a new terminal window, execute the child process, pausing the music and immediately close the window.  I changed the command on the shortcut and when hitting it I noticed the same behavior opening a terminal and immediately being closed but this time the child process did not pause the music, which makes me think that the script has been called on all my previous attempts but it is somehow not being able to execute.  How can I solve this problem according to your knowledge? How did Jaqen H'ghar get caught? Following a recent 9gag post:    Did Jaqen H'ghar end up in that cage because he knew that he would meet and "recruit" Arya, or was it some strange coincidence? Is it described somewhere in the books, or left unexplained? Make it possible to retract comment flags I misread the content of a comment, and flagged it. Then I realized that the comment wasn't what I had initially thought. Would it be possible to have the ability to retract comment flags, just like we have the ability to retract flags on questions and answers?  I'm aware of this &#32;. But the answer there is just that it's not possible. At the time it was not possible to retract any flags.   This is a separate  which requests that it may become possible to retract comment flags.  If I've realized a flag was a mistake, I think it's unnecessary to keep it in the queue of content the moderators have to look at. Also, it would add an unnecessary "rejected" to the flaggers statistics. Sure, people should think before they flag. But everyone makes mistakes sometimes. it seems my bash-completion got corrupted. Every time I try to use command substitution, for example when I type  ls $(ls Deskto&lt;Tab&gt;   ..result is..  ls $(ls Desktobash unexpected eof while looking for matching ")".   I tried removing my .bashrc file and cp /etc/skel/bashrc ~/ to get a new one. That works until I add something into my new bashrc. Even when I do echo '#" &gt;&gt; ./.bashrc it breaks again. Removing my bash_aliases did not help either.  Also sudo apt-get install --reinstall bash-completion did not do the trick.  However there are some threads about similar problem, nothing works.  ANY hint will be greatly appreciated! :) Why does "start winword" work but just "winword" doesn't? Assume Microsoft Office is installed. Consider the following batch file:  REM the following line successfully launches Microsoft Word start winword  REM none of the following commands work to launch Microsoft Word winword winword.exe winword.com winword.bat winword.cmd winword.vbs winword.vbe winword.js winword.jse winword.wsf winword.wsh winword.msc   What is it about the "start" instruction that allows the launching of Microsoft Word using the name "winword"?  My curiosity stems from my interest in the mechanics of the "start" verb - I don't need suggestions on other ways to start Microsoft Office.  Please don't suggest that I add the Microsoft Office directory to my PATH environment variable - I know what that would do.    How is start finding "winword" when cmd cannot find it directly? How to set the command prompt's color in Bash? Given fields $M/E/F$, why does $[M:F] = [M:E][E:F]$? Let $M$ be a finite extension of $E$ and let $E$ be a finite extension of $F$. Then $M$ is a finite extension of $F$ and $[M:F] = [M:E][E:F]$.   Is there an easy explanation and/or proof for this theorem? My instructor gave an incomplete proof in class but got stuck and I'm kind of confused of what's going on. The selection toggle arrows in the Outliner disappeared. Is there some preference in the settings that has to be turned on? Definition of autocorrelation time (for effective sample size) I've found two definitions in the literature for the autocorrelation time of a weakly stationary time series:  $$ \tau_a = 1+2\sum_{k=1}^\infty \rho_k \quad \text{versus} \quad \tau_b = 1+2\sum_{k=1}^\infty \left|\rho_k\right| $$  where $\rho_k = \frac{\text{Cov}[X_t,X_{t+h}]}{\text{Var}[X_t]}$ is the autocorrelation at lag $k$.    One application of the autocorrelation time is to find the "effective sample size": if you have $n$ observations of a time series, and you know its autocorrelation time $\tau$, then you can pretend that you have  $$ n_\text{eff} = \frac{n}{\tau} $$  independent samples instead of $n$ correlated ones for the purposes of finding the mean.  Estimating $\tau$ from data is non-trivial, but there are a few ways of doing it (see ).  The definition without absolute values, $\tau_a$, seems more common in the literature; but it admits the possibility of $\tau_a&lt;1$.  Using R and the "coda" package:  require(coda) ts.uncorr &lt;- arima.sim(model=list(),n=10000)         # white noise  ts.corr &lt;- arima.sim(model=list(ar=-0.5),n=10000)    # AR(1) effectiveSize(ts.uncorr)                             # Sanity check     # result should be close to 10000 effectiveSize(ts.corr)     # result is in the neighborhood of 30000... ???   The "effectiveSize" function in "coda" uses a definition of the autocorrelation time equivalent to $\tau_a$, above.  There are some other R packages out there that compute effective sample size or autocorrelation time, and all the ones I've tried give results consistent with this:  that an AR(1) process with a negative AR coefficient has more effective samples than the correlated time series.  This seems strange.    Obviously, this can never happen in the $\tau_b$ definition of autocorrelation time.  What is the correct definition of autocorrelation time?  Is there something wrong with my understanding of effective sample sizes?  The $n_\text{eff} &gt; n$ result shown above seems like it must be wrong... what's going on? How to show $(a^b)^c=a^{bc}$ for arbitrary cardinal numbers? One of the basic (and frequently used) properties of cardinal exponentiation is that $(a^b)^c=a^{bc}$.  What is the proof of this fact?  As Arturo pointed out in his comment, in computer science this is called . I'm trying to install a Matlab R2011a launcher for Unity in Ubuntu 12.04. I've tried  (although I know it's for 11.10 and mentions that even 11.10 is an unsupported OS for Matlab R2011a) but without any satisfactory solution.  This is my launcher file, /usr/share/applications/matlab.desktop:  #!/usr/bin/env xdg-open [Desktop Entry] Type=Application Icon=/usr/share/icons/matlab.png Name=MATLAB R2011a Comment=Start MATLAB - The Language of Technical Computing Exec=matlab -desktop Categories=Development;   I open the dash panel and search for "matlab". This launcher is found among applications. I click it, and Matlab's splash screen shows up, but when it disappears the program doesn't start. (I've verified with htop that no matlab-processes are running in the background either.)  If I add  Terminal=true   to the launcher file, the program starts OK, and opens a terminal as well as Matlab. However, both the terminal and Matlab itself show up in the Launcher area, with the Matlab icon, so it looks like I have two Matlab instances running when really it's only one. (Actually, they show up as two different programs, and not just two instances of the same - the icons are independent, not grouped together.)  This is definitely not optimal. I had hoped to create a launcher I can lock to the launcher area, and then that same icon will be the icon for the active Matlab instance when the program is running.  How do I create a launcher for Matlab that works as expected?  Update: I was apparently a bit unclear on my symptoms, I'll try to clarify a little. I've also tried some suggestions from the answers, and further investigated what happens. My current setup (a launcher file with Terminal=true and Exec=matlab -desktop -nosplash &amp;) renders the following behavior:   I open Dash by pressing the Windows key on my laptop, and search for "matlab". It finds the launcher named "MATLAB R2011a". I click it. A terminal window opens, using the icon I referred to in the launcher file. Almost immediately, MATLAB's splash screen also opens, using the same icon (and thus being grouped with the terminal window in the launcher). The splash screen disappears and, so does one of the icons in the launcher. The MATLAB desktop environment opens, using a different version of the icon which is displayed next to the icon for the terminal window (not grouped with it).   I can lock the terminal window's icon to the launcher and successfully start MATLAB by clicking it, but it doesn't feel optimal that I start the program with one icon, and switch to it with another. I've also tried the following:   Exec without the ampersand &amp; in the launcher command, but it didn't make a difference. Executing matlab -nosplash manually from a terminal still shows the splash screen. (What, then, does the nosplash option really do?) Extracting usernames from the /etc/passwd file There is a command l available on my machine which appears to do nothing.  which l also produces no output. Is this a real command, and does it actually do anything? Convergence $I=\int_0^\infty \frac{\sin x}{x^s}dx$ Hi I am trying to find out for what values of the real parameter does the integral $$ I=\int_0^\infty \frac{\sin x}{x^s}dx $$ (a) convergent and (b) absolutely convergent.     I know that the integral is convergent if $s=1$ since $$ \int_0^\infty \frac{\sin x}{x}dx=\frac{\pi}{2}. $$ For $s=0$ it is easy to see divergent integral since $\int_0^\infty \sin x\, dx$ is divergent.  However I am stuck on figuring out when it is convergent AND or absolutely convergent.  I know to check for absolute convergence I can determine for an arbitrary series $\sum_{n=0}^\infty a_n$ by considering $$ \sum_{n=0}^\infty |a_n|. $$ If it helps also $$\sin x=\sum_{n=0}^\infty \frac{(-1)^{2n+1}}{(2n+1)!} {x^{2n+1}}$$. Thank you all is there any diffrence to use nonlinear or liner activation function in single hidden layer network Undefined control sequence \documentclass First of all I would like to thank you because you helped me out a lot with all your answers to the already online questions.  Now, here is my problem. I am trying to do a bibliography file with TeXworks but I get this error when I try to compile (pdfLaTeX+MakeIndex+bibTeX):      This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     ****PATH here******     ! Undefined control sequence.     l.1 \documentclass         [a4paper,11pt]{report}   I've been reading some similar questions but I don't find the way to fix it (maybe I am missing something). I found one that says that I am trying to compile a LaTeX file using TeX compiler but I don't know how to change the configuration.  This is the .bib fiel content:      \documentclass[a4paper,11pt]{report}     \usepackage[english]{babel}     % faire de l'anglais     \usepackage[latin1]{inputenc}   % accents dans le source     \usepackage[T1]{fontenc}        % accents dans le DVI     \usepackage{url}     \begin{document}      @Article{ref11, author={Danihelka, Jiri and Kencl, Lukas}, journal={Cloud Futures Workshop 2012 }, title={Colaborative 3D Environments over Windows Azure}, year={2012}, month={May}, pages={}, note={}     }      @book{ref12, author = {Lee, Henry and Chuvyrov, Eugene},     title = {Beginning Windows Phone 7 Development},     publisher = {Apress},     volume = {},     number = {},     series = {},     address = {},     edition = {Second edition},     year = {2011},     month = {July},     note = {}     }      @Article{ref13, author={}, journal={}, title={Cloud computing}, year={}, month={}, pages={}, url={\url{http://en.wikipedia.org/wiki/Cloud_computing}}     }      \end{document}