How to organize bash files in such way that I can use folders for better structure to be used in "import... path" dependencies?
How best to include other scripts?
I'm wondering how it is correct to structure sentence and what punctuation should be used. In particular, is the next sentence correct:     I was wondering if there's any progress on the issue.    Or should I put a question mark in the end of it. Also, can it be restructured to:     I was wondering: is there any progress on the issue? Parenthesis works in bash shell itself, but not in bash script This was a question my friend found in a book.  A block attached to a spring pulled by a constant horizontal force is kept on a smooth horizontal surface. Initially the spring is in its natural state. Then the maximum work that the applied force F can do is:  (a) $F^2/k$ (b) $2F^2/k$ (c) $4F^2/k$ (d) $F^2/2k$  My friend thought that the answer is (a) since the maximum displacement is $x=F/k$ and $W=Fx=F^2/k$. But he saw that the book's answer is different and he asked this question to me. I at first thought that the answer will be (a), but then I realised that this situation is somewhat similar to a charging capacitor. The final energy of the spring is actually $\frac12kx^2=F^2/2k$. So probably the answer is (d)? But the work done is still (a)? But the book says neither. It's (b). This is the logic in the book:  Method 1: in the book:  $$Fx=\frac12kx^2$$  $$x=2F/k$$  $$W=\frac12kx^2=2F^2/k$$  (since the book is an objective questions book it did not have detailed explanations)  What is wrong in the following methods?  Method 2: by calculating the maximum displacement  $$x=F/k$$  $$W=Fx=F^2/k.$$ Method 3: by calculating the final energy  $$x=F/k$$  $$\frac12kx^2=F^2/2k$$  PS: We both know calculus so don't hesitate to use it in the answers. How to view monitor refresh rate in macOS? I just purchased a Dell P2175Q monitor for my 15" MBP w/Touchbar. I'm connecting with a USB-C to DisplayPort cable, but when I go to Apple > System Preference > Displays, there is nothing about the Refresh Rate. Pressing the Option key does not show any additional options.  I've seen countless screenshots where this information should appear. Is there another way to check the refresh rate?  I'm on macOS 10.13.4  Thanks. Using regex inside if clause in bash Look at this if block:  #!/bin/bash  str="m.m" if [[ "${str}" =~ "m\.m" ]]; then     echo "matched" else     echo "not matched"     exit 1 fi  exit 0   This should print "matched", but it doesn't. Where am I going wrong? How do I get the UI thread's Dispatcher? What are the alternatives to Notepad++ on Ubuntu? Can jQuery get all CSS styles associated with an element? I am trying to solve an exercise in Shankar's QM book (concretely 4.2.1), and I am asked the probability of each possible value for the operator $L_x$ when the particle is in a certain eigenstate of another operator $L_z$. I understand that I have to "expand" the state vector in the $L_z$ basis, which in this case is just the appropriate eigenvector, and then change the base to that of $L_x$, i.e to write the $L_z$ eigenstate in the $L_x$ base. The problem is that there is just no way of doing it, since the eigenvectors of $L_x$ don't span the whole Hilbert Space.   I thought all quantum operators had a set of eigenvectors that spanned the whole space, am I wrong on that or am I wrong on my algebra? What's the typical microclimate in the aircraft passenger cabin? How to answer questions in a conference talk that I should know the answer to, but don't? Center image element in parent div Bash One Liner: copy template_*.txt to foo_*.txt? Say I have three files (template_*.txt):   template_x.txt template_y.txt template_z.txt   I want to copy them to three new files (foo_*.txt).    foo_x.txt  foo_y.txt  foo_z.txt   Is there some simple way to do that with one command, e.g.   cp --enableAwesomeness template_*.txt foo_*.txt Comparing signatures of apks I have two .apk files that are supposed to be different versions of the same app. What is the best way to check if they where both signed with the same key?  I want to make sure no mistakes were done and the newer version would be treated as an update of the same app. A Strict Sense Stationary (SSS) process implies it is a Wide Sense Stationary (WSS) process - proof Looking for a mathematical proof which shows that a Strict Sense Stationary (SSS) process is necessarily a Wide Sense Stationary (WSS) process. Find all polynomials $P(x)$ such that $P(x^2)=P(x)^2$ Find all polynomials $P:\mathbb{C}\rightarrow\mathbb{C}$ such that $$P(x^2)=P(x)^2 .$$   Here is what I tried:  First, it is easy to see the constant solutions, namely $P\equiv 0,P\equiv 1$.  Let $r$ be a root of $P$ (i.e. $P(r)=0$). It follows that all terms in the infinite sequence $r,r^2,r^4,\dots,r^{2n},\dots$ are roots of $P$. To avoid a polynomial with infinite roots, we have to have the sequence be periodic. So it turns out that either $r=0$, or the roots of $P$ are roots of unity of degree $2n$ for some $n\in\mathbb{N}$.  In the first case, we get $P(x)=xQ(x)$. Plugging in, we get $$x^2Q(x^2)=x^2Q(x)^2\implies Q(x^2)=Q(x)^2 ,$$ i.e. that $Q$ satisfies the same condition as $P$.  In the second case, we have $P(x)=(x^{2n}-1)Q(x)$. Plugging in, we get $(x^{2n}-1)Q(x^2)=(x^{2n}-2x^n+1)Q(x)^2$. I was not sure how to proceed from here. Homeomorphism that maps given points to given points XMLHttpRequest Origin null is not allowed Access-Control-Allow-Origin for file:/// to file:/// (Serverless) Interaction with the site on the app should count towards Enthusiast/Fanatic If I do any of the below, which would normally constitute "activity" on any Stack Exchange site (including mobile):   View my profile Vote on any question or comment Visit one or more questions   ...then Stack Exchange considers me to have "visited" the site.  If I do any of the below on the mobile app:   Vote on any question or comment Visit one or more questions   ...then Stack Exchange does not consider me to have visited the site.  If one wants the app to have feature parity with the mobile site, then shouldn't my participation within the app also count towards the Enthusiast/Fanatic badge? Change pivot or local origin of an object