I use Lyx in Hebrew, which means regular text is written in Hebrew, but equations are of course written in English. I used to have an installation, which (I believe by accident during installation process) every time I entered any equation environment, my language was auto-set to English. Then, returning to regular text it was again auto-set to Hebrew.  This was very convenient, as it saved me the trouble of changing languages all the time, and of course there is zero use of Hebrew in math except Aleph for cardinality.  I now wonder whether there is a more conventional way to achieve this without trying to make random mutations to Lyx installation processes. Thanks!
Question  I want to write a book in Arabic (I have an Arabic keyboard, so I don't need a converter). By Arabic book I mean literally Arabic:    title, table of contents  etc    all in Arabic.   The equations, however, I want to write them in English/Latin.  Related    This link helped a lot but it was for Arabic texts in an English main document.    I already checked these two (and plenty other sites).
Array index out of bound behavior Why does C/C++ differentiates in case of array index out of bound #include &lt;stdio.h&gt; int main() {     int a[10];     a[3]=4;     a[11]=3;//does not give segmentation fault     a[25]=4;//does not give segmentation fault     a[20000]=3; //gives segmentation fault     return 0; }  I understand that it's trying to access memory allocated to process or thread in case of a[11] or a[25] and it's going out of stack bounds in case of a[20000]. Why doesn't compiler or linker give an error, aren't they aware of the array size? If not then how does sizeof(a) work correctly? Why are we still using CPUs instead of GPUs? It seems to me that these days lots of calculations are done on the GPU. Obviously graphics are done there, but using CUDA and the like, AI, hashing algorithms (think bitcoins) and others are also done on the GPU. Why can't we just get rid of the CPU and use the GPU on its own? What makes the GPU so much faster than the CPU? How do they compute the Gold and Elixir that can be looted? How do they compute the Gold and Elixir that can be looted from a base? Is it 100% of the remaining? or the total (including the uncollected from mine)? What information does the trace of a matrix give? A word for 'independent episodes' When we have a series of episodes where every single episode depends on and develops from the previous, we may call that a sequel, or maybe a continuum.  Now let us say that we have a collection of fables, episodes or anecdotes that have the same characters, the same milieu, and the same themes; yet, this time, the episodes are NOT interdependent. They don't depend on each other in that you can watch/read 'any' one of them be it (in terms of order) from a beginning, medial, or final season, without having to watch/read the previous to understand, appreciate, and enjoy it (the one you're watching/reading). What do we call the 'episode' in this case?   Examples: a sitcom comedy show, or a show like Dr Who. Or, in literature, the novels of Sherlock Holmes.       Is there a specific term to describe the 'independent episodes' of these works? I have a shell script with this code:  var=`hg st -R "$path"` if [ -n "$var" ]; then     echo $var fi   But the conditional code always executes, because hg st always prints at least one newline character.   Is there a simple way to strip whitespace from $var (like trim() in )?   or   Is there a standard way of dealing with this issue?   I could use  or , but I'd like to think there is a more elegant solution to this problem. If I have a legendary creature out, and I make a copy of it (such as by enchanting it with  or making a ), do I get enters-the-battlefield effects from the creature before I have to sacrifice it to the legend rule? I was trying to solve a question of an entrance exam. I am completely stuck in the problem. I am not able to find idea how to proceed. Please help me.     Let $A$ be the set of twice continuously differentiable functions on the interval $[0, 1]$ and let $B = \{f \in A : f(0) = f(1) = 0, f'(0) = 2\}$. Find the value of $$\text{min}_{f\in B} \displaystyle \int_0^1 (f''(x))^2dx.$$    I am really sorry for not showing some effort from my side but I can not find ant way to proceed.  Please help me. Thnx in advance. Cruise ship in the Schengen area: Do the days spent at sea count toward the limit for short visits? I am planning on spending 90 days in Schengen zone countries.  I will be taking a cruise between Lisbon and Barcelona.  Do the days at sea count against the 90 days allowed for staying in the Schengen zone? Do "owed" and "due" mean the opposite? Why aren't bounties refunded if they are not awarded? I have  with a bounty that will expire in a few days. It looks like nobody will get the bounty; only one answer was posted during the bounty period, and it has no upvotes.  In cases like this, the bounty is thrown away.  Why isn't it refunded instead, if no answerer has earned it? How to find an end point of an arc given another end point, radius, and arc direction? Given an arbitrary arc, where you know the following values: end point (x1,y1), radius (r) and arc direction (e.g. clockwise or counterclockwise from start to end), how can I calculate the other endpoint of the arc (and I say endpoint because I think of an arc as line segment that is curved, which happens to lie on the circumference of the circle and it has two end points).   Though that's just how I interpret the problem and maybe I'm not thinking about it correctly.  EDIT: Yes, I know the Origin point and the length of the arc. Sorry I forgot to mention. Also, the that circle would be on a 2D Cartesian plain (x and y axis.) Sorry, my math terminology is lacking.   Also, I'm not trying to cheat on homework or anything. This is a legitimate problem for an SVG graph I'm trying to create using JavaScript and I've tried my best but I need help.  Thanks in advance. Why does a Ubuntu guest in VirtualBox run very, very slowly? I'm using currently Ubuntu 12.04 LTS as a host machine, and I've virtualized three machines:   a Xubuntu 12.04 guest a Windows 7 guest a Ubuntu 12.10 guest   All the guests have the same VirtualBox default settings, but Ubuntu 12.10 is slower!  The installation took 1h 40 min! (Normally, it takes 40 minutes.) Now it is impossible to use it, and all operations are very, very slow.  I'm using VirtualBox version 4.2.4.  Any ideas?  Why is it slow? And how can I make it faster? Proving $\int_{0}^{\infty} \mathrm{e}^{-x^2} dx = \frac{\sqrt \pi}{2}$ How to prove  $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$ Why only light nuclei are able to undergo nuclear fusion not heavy nuclei? Is it because of the binding energy or the binding energy per nuclei .  I am having trouble with this whole binding energy and nuclear fusion concept. My path is \\server\folderName1\another name\something\another folder\  How do I extract each folder name into a string if I don't know how many folders there are in the path and I don't know the folder names?  Many thanks I have a question.  I have been given this proof: "For any $n$ in the integers where $n&gt;2$, show there are at least $2$ elements in $U(n)$ that satisfy $x^2=1$."  I have gone through and actually proved this, (that the numbers are $1$ and $n-1$) but i didn't' know how to prove that $n-1$ is in fact in the set $U(n)$. Is it because two consecutive numbers are always relatively prime? So,  Each of my polygons is a separate object. Their default normals point like this:   But their orientation or local axes are like so:   How can I make their local axes to be like so, but automatically?   I guess particles might be one solution for this exact case (if you emit new objects on top of the existing ones) but let's say the original objects are triangles and I wouldn't want to change their shape and pointing direction at all, only their local orientation axes, would that be possible?  Cheers! How do I install .run files? My PC has both Ubuntu and Windows 7 installed. I have installed all my drivers in Windows like Nvidia graphics, motherboard etc. Shall I install them in Ubuntu too?  I looked on the web for my Nvidia drivers and I have found a .run file. How could I install it on my Ubuntu? How can I make a PATCH HTTP Callout from Apex? I need to make a PATCH http request.  I made the rather incredible discovery today that I can't set an HttpRequest to use the PATCH method, as when sending the request I get a callout exception:     System.CalloutException "Invalid HTTP method: PATCH"   The work around I've found on Stack Exchange and elsewhere is only applicable to a Salesforce Rest API request:    This is therefore not helpful to me as I'm calling out to a third party.  By what manner of magic can I send a PATCH request from Salesforce?  The only work around I can think of is to not do it from Apex - this is not an option.