I just stumbled over a script with works in bash but not in zsh:  if [ Darwin = `uname` ]; then    library_path=DYLD_LIBRARY_PATH else    library_path=LD_LIBRARY_PATH fi if [ -z "${!library_path}" ]; then    eval ${library_path}=${thisdir}/lib64:${thisdir}/lib; export ${library_path} else    eval ${library_path}=${thisdir}/lib64:${thisdir}/lib:${!library_path}; export ${library_path} fi   the second if should apparently test, depending on the kernel, if $LD_LIBRARY_PATH is non zero, or if $DYLD_LIBRARY_PATH is non zero. And then either set or expand the respective variable.  How would I do the same in zsh? And is there a version that works in zsh and bash?
${!FOO} performs a double substitution in bash, meaning it takes the (string) value of FOO and uses it as a variable name. zsh doesn’t support this feature.  Is there a way to make this work the same in bash and zsh?  Background:  I’ve got a list of environment variables, like  PATH MAIL EDITOR   and want to first print the variable names and afterwards their values.  This works in bash but not zsh:    for VAR in LIST do         echo $VAR         echo ${!VAR} done   It should be somehow possible “the old way” with eval, but I can’t get it to work:  for VAR in LIST do         echo $VAR         echo `eval \$$VAR` done   I’m never going to understand why I can’t simply do arbitrary deep substitutions like ${${VAR}} or even ${${${VAR}}} if need be, so an explanation for that would be nice, too.
I have this graphic. I need to change the color of the graphic to hex color: 1485cc...is there a way to make this graphic match that particular hex color hue...without me having to have to re create the graphic. It would seem that one way of proving this would be to show the existence of non-algebraic numbers. Is there a simpler way to show this? Submitting a form by pressing enter without a submit button Well I am trying to submit a form by pressing enter but not displaying a submit button. I don't want to get into JavaScript if possible since I want everything to work on all browsers (the only JS way I know is with events).  Right now the form looks like this:  &lt;form name="loginBox" target="#here" method="post"&gt;     &lt;input name="username" type="text" /&gt;&lt;br /&gt;     &lt;input name="password" type="password" /&gt;     &lt;input type="submit" style="height: 0px; width: 0px; border: none; padding: 0px;" hidefocus="true" /&gt; &lt;/form&gt;   Which works pretty well. The submit button works when the user presses enter, and the button doesn't show in Firefox, IE, Safari, Opera and Chrome. However, I still don't like the solution since it is hard to know whether it will work on all platforms with all browsers.  Can anyone suggest a better method? Or is this about as good as it gets? Uncountable well ordered set in $Z^-$ theory. I want to build an uncountable well-ordered set within the theory $Z^\textbf-$. So, I take $A=\omega$ (exists by infinity axiom) and define $$W:=\{(X,R)\in\mathcal{P}(A)\times\mathcal{P}(A\times A):\langle X,R\rangle\ \text{is a well-ordered set}\}$$  With this I consider the set $T:=W/\cong$ (where $\cong$ is isomorphism relation). Note that $W$ and $T$ are sets by power set axiom. So I define for each equivalence class $[x],[y]\in T$ the order  $$ [x]\leq_T[y]\Leftrightarrow \text{type}(x, R_x)\leq \text{type}(y,R_y) $$  Here, $R_x$ means the order of $x$ that make it belongs to $[x]$.   So, $T$ is well ordered by $\leq_T$ and it is uncountable.  Question: I don't pretty sure if I can build $\leq_ T$ without replacement axiom. Another doubt is, Can I take the $R_x$ without AC? Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work. I have an equation contained inside \[...\], which automatically makes a \sum with sub- and superscripts turn big--so that the summation sign looks awkward inside parenthesis.  Any idea how to make the parenthesis completely enclose the whole summation?  \documentclass{article} \begin{document} We have: \[ \sum_{i=1}^n i = (\sum_{i=1}^{n-1} i) + n = \frac{(n-1)(n)}{2} + n = \frac{n(n+1)}{2} \] \end{document} Group posts by year, then by month What is the exact difference between an autoregressive (AR) and vector autoregressive model (VAR)?  I always thought that VAR would just be for more than two variables, until I learned that AR can also have more than two variables. I.e. I had a misunderstanding(?) that AR models are not always bivariate.  Before I write too much potentially false assumptions about the difference between AR and VAR, it would rather be interested to see if anyone can make provide a quick and good summary. There are $25$ horses. You can take $5$ horses at a time and race them. Each horse always finishes the race in the same amount of time, and there are no ties. The only information you get from each race is the order that the $5$ horses finished in. What is the smallest number of races you need to find the $3$ fastest horses, in order?   I found this problem on  and cannot figure out the best answer. Please help. I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it:  The memset_16aligned function requires a 16-byte aligned pointer passed to it, or it will crash. a) How would you allocate 1024 bytes of memory, and align it to a 16 byte boundary? b) Free the memory after the memset_16aligned has executed.  {        void *mem;    void *ptr;     // answer a) here     memset_16aligned(ptr, 0, 1024);     // answer b) here     } 3rd iterate of a continuous function equals identity function Below is an attempt at a proof of the following problem. Any feedback would be greatly appreciated. Thx!  Let $E$ be a set and $O_n = \{x: d(x, E) &lt; \frac{1}{n}\}$. Show  If $E$ is compact then $m(E) = lim_{n \rightarrow \infty} m(O_n)$.  This is false for $E$ closed and unbounded or $E$ open and bounded.   Note that all sets are real and measurable refers to Lebesgue measurable.  Suppose $E$ is compact. Then $m(E) &lt; \infty$. Also, since each $O_n$ is an open set of $\mathbb{R}^d$, $m(O_n) &lt; \infty$. If either of the following is true, we have that $lim_{n \rightarrow \infty}m(O_n)=m(E)$: $O_n \nearrow E$ $O_n \searrow E$ Now  $\bigcap_{n=1}^{\infty} O_n = \{ x:d(x,E) = 0\}$. That is, $x \in \bigcap_{n=1}^{\infty}O_n \iff \exists n&gt; \frac{1}{\epsilon},\ n \in \mathbb{N} \iff x\in \{x \mid d(x,E) =0\}$. Then we have that $\bigcap_{n=1}^{\infty}O_n = E$ and $O_n \searrow E$. Thus $ \ m(E) = lim_{n \rightarrow \infty} m(O_n)$. Suppose $E$ is closed and unbounded. Let $E = \{(x,y): y = 2 \}$ and $O_n = \{(x,y): d(x,E) &lt; \frac{1}{n}\}$. Since $E$ is a line in $\mathbb{R}^2$, $m(E) = 0$. Also, since the measure of a rectangle in $\mathbb{R}^d$ is its volume, $m(O_n) = \left| O_n \right| = \infty$, since the rectangle $O_n$ is unbounded. It is therefore apparent that $m(E) \not = lim_{n \rightarrow \infty} m(O_n)$. Suppose $E$ is open and bounded. Let $E=(0,1)$ and $O_n = \{x \mid d(x,E) &lt; \frac{1}{n}\}$. $\mathbb{R}-E$ is closed and $O_n \in \mathbb{R}-E$. Since $\mathbb{R}-E$ contains all its limit points $lim_{n \rightarrow \infty}O_n = O \in \mathbb{R}-E$. Thus $lim_{n \rightarrow \infty} m(O_n) \neq m(E)$. What is a meta for? A guest at my house over the weekend stood puzzled next to my driveway. &quot;What is that for?&quot; she asked, pointing to a framework of 2x4s and hardware cloth perched on an old tire amid piles of sand. &quot;Sifter.&quot; I said. &quot;For what?&quot; &quot;For sifting gravel.&quot; &quot;Why?&quot; &quot;To line walking paths, such as the one you're standing on...&quot; Spend enough time working with something, and it's easy to forget how strange and unnatural your makeshift tooling can appear to those unfamiliar with it.  Such is the nature of these meta sites. For 5 years, we've been directing folks to them for discussion and feedback, to commune with their community, hash out misunderstandings, propose changes and document the current state of things. And... We haven't always been good about helping them get past the initial shock and confusion of dealing with this system. This has manifested in several unfortunate behaviors:  Downvoting of legitimate support questions - those that are not duplicates and reflect an actual bug or honest misunderstanding of how the system operates. Folks who are acting in good faith should be treated as such - , not shutting them down.  Closing questions that seek input and discussion from the community - in hindsight, adding &quot;primarily opinion based&quot; as a close reason on meta sites was... a terrible idea. The old &quot;not constructive&quot; close reason made some sense for rants and so on, but for a discussion site closing down questions that solicit opinions is just silly. Here on MSE, we prefer the following off-topic reason instead:  This question does not appear to seek input and discussion from the community. If you have encountered a problem on one of our sites, please describe it in detail. See also:    The perception that Stack Exchange is disrupting the normal operation of the site by talking about future plans - even when those plans involve the community. I talked about this a bit more on , but seeing this kind of backlash toward folks at the company who were trying to be open and receptive to discussion about what they were doing was kinda disheartening - we need to be doing more of that, not less.  A reluctance to ask questions about asking questions - which is about as meta as you can get, and yet we probably get more of these via email than we see on meta, while being the least-qualified to answer them well.   After an increasing number of complaints from both core users and moderators on a number of sites, we're taking a hard look at how we can improve this situation... Starting with a change to :  Meta is for...  ...$SiteName users to communicate with each other about $SiteName (asking questions about how the websites work, or about policies and community decisions) ...$SiteName  users to communicate with Stack Exchange the company (posting bugs, suggesting improvements, or proposing new features), and ...Stack Exchange to communicate with the community (soliciting feedback on new ideas or features, or discussing policies that affect the whole network)  Lots of topics are fair game, as long as they are about the Stack Exchange family of Q&amp;A sites in some way. Any issue that concerns the core Stack Exchange engine that runs all Stack Exchange websites is welcome here.  This replaces the previous bullet list of specific topics, and aims to outline broad purposes with examples for clarification rather than constraining the scope to those examples. So... that's a start. But a documentation change isn't going to change misconceptions that've already built up among newer users. So I'm asking y'all for help: What do you think meta should be used for, and how can we better communicate this intent to new users? Why did my windshield freeze instantaneously? I have to travel to Germany and Switzerland for business purpose. I have already been here 2 years ago. I have applied for business visa to the German consulate twice and both times the application got rejected. They have put a green stamp on the last page twice. The reason is the purpose and information submitted regarding intended stay is not reliable. I have submitted the documents to Swiss consulate and they have accepted and granted me a visa. Now I have to first travel to Germany and then to Switzerland.  So my question is, with a Schengen business visa granted by Switzerland, may I enter in Germany? Does the rejection stamp has any impact for entering at German airport ? Does it mean I cannot travel to Germany but to other Schengen countries ? Does opacity:0 have exactly the same effect as visibility:hidden If $[G' : G'']\leq p^2$, then $G'$ is abelian. Problem : Let $G$ be a p-group and $G'$ denote the commutator subgroup of $G$. If $[G' : G'']\leq p^2$, then $G'$ is abelian.  It is easy to prove it for the case of $[G' : G'']=1$ since G is solvable. But it is too hard to prove the other cases. Please give me any advice or solutions. Thanks in advance. What is the logarithm of a kilometer? Is it a dimensionless number? In log-plots a quantity is plotted on a logarithmic scale. This got me thinking about what the logarithm of a unit actually is.  Suppose I have something with length $L = 1 \:\mathrm{km}$.  $\log L = \log \mathrm{km}$  It seems that the unit of $\log L$ is $\log \mathrm{km}$, but I can also say $L = 1000 \mathrm{\:m}$ and now:  $\log L = 3 + \log \mathrm{m}$  This doesn't appear to have any units at all.  This suggests that $\log \mathrm{km}$ and $\log \mathrm{m}$ are actually dimensionless numbers. But wait, I can do this with any unit! Does it actually make sense to talk about the logarithm of a unit, or some other function for that matter? How to ‘guess’ if a noun is countable or uncountable? Prove that $\mathbb{Z}[\omega]$ is an integral domain