I need to  an object to . I'm using . Is there a "standard" way to do this?  My specific situation: I have an array defined as shown below:  var countries = new Array(); countries[0] = 'ga'; countries[1] = 'cd'; ...   and I need to turn this into a string to pass to  like this:  $.ajax({     type: "POST",     url: "Concessions.aspx/GetConcessions",     data: "{'countries':['ga','cd']}", ...
How can I serialize an object to JSON in JavaScript?
I was trying to create an AnyDice function to model the Great Weapon Fighting fighting style (which lets you reroll 1s and 2s), but I couldn't get it to work on any arbitrary dice.  I've found this one:  function: reroll R:n under N:n {    if R &lt; N { result: d12 } else {result: R} } output [reroll 1d12 under 3] named "greataxe weapon fighting"   And it works fine. But I don't know how to make the function generic so i don't need to change the d12 every time i want a different dice to reroll.  I've tried  function: reroll R:n under N:n {    if R &lt; N { result: d{1..R} } else {result: R} } output [reroll 1d12 under 3] named "greataxe weapon fighting"   but it is not giving the right probabilities. Maybe if I could fetch the die size inside the function... Working with large numbers in PHP To use  as you would require when using the  with large numbers (100,000+), it calls for some very large calculations.  When I multiply two large numbers (eg: 62574 and 62574) PHP seems to cast the result to a float. Getting the modulus value of that returns strange values.  $x = 62574 * 62574; var_dump($x);          // float(3915505476) ... correct var_dump($x % 104659); // int(-72945)  ... wtf.   Is there any way to make PHP perform these calculations properly? Alternatively, is there another method for finding modulus values that would work for large numbers? See below in acute triangle $ABC$, $D$ is on $AC$ such that $AD=BC$. $CF$ is the angle bisector of $\angle ACB$. $DE \parallel CF$. $E$ is on $AB$. $AE = CD$.  Prove that $\angle ABC = 2 \angle BAC$. In addition, find the condition in which $\angle ADB = 3 \angle BAC$  I struggle to find ways to use two conditions $AD = BC$ and $AE = CD$ A few years ago, I applied for a UK visa. The visa was initially refused and I had no rights of appeal. However, the refusal letter had some glaring mistakes and I sent an email to the Embassy. The refusal was "overturned" by an ECM.  I am now making an application for a visa which has the question "Have you ever been refused a visa?". How should I answer it? How can I show that $\frac{1}{1+|z|^2}$ isn't analytic at $z=1$? Homeomorphism between the unit disc and the unit square I know that the function that describes the homeomorphism is: $f(x,y) =       \begin{cases}     \frac{x^{2}+y^{2}}{\max(|x|,|y|)}(x,y) &amp;\quad\text{if } (x,y)\ne  (0,0) \\       \text{} (0,0) &amp;\quad\text{if } (x,y) =  (0,0) \\       \end{cases}$  But it's impossible to me to show that $f(x,y)$ is an homeomorphism. Mostly i can't see the injectivity. commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated How do you explain the value of native files to an uneducated client? If you design a piece for print. It gets reproduced several times over the course of a few years. Then the client doesn't return for any work for a few more years. And suddenly you are contacted asking for native files (Indesign, Illustrator, Photoshop). As the client puts it, "We just want to be able to make minor changes, we aren't designers."  Now, there is absolutely value in the native files. They are my "secret recipe" as a designer and anyone asking for that recipe should provide compensation for the ease of reusing, repurposing, and altering the recipe.  How do you explain to this client that there is value in the native files?  How do you counter the "But we already paid for the design." argument?  Note: I know I own the files. I know my contract states I own the files. Heck even without a contract, US Copyright law states I own the files.  What I'm seeking is an elegant, less argumentative, method of explaining the file ownership to the uneducated client. Reciting legal statutes and contract clauses doesn't often make for friendly client relations. My goal is to find a method of explaining so it is fully understood by the client without the appearance of a contract clause which forces them to do something against their will. I want the client to respect and not resent these types of contract clauses. Show that $\lim_{n\to\infty}b_n=\frac{\sqrt{b^2-a^2}}{\arccos\frac{a}{b}}$ If $a$ and $b$ are positive real numbers such that $a&lt;b$ and if $$a_1=\frac{a+b}{2}, b_1=\sqrt{(a_1b)},..., a_n=\frac{a_{n-1}+b_{n-1}}{2},b_n=\sqrt{a_nb_{n-1}},$$ then show that   $$\lim_{n\to\infty}b_n=\frac{\sqrt{b^2-a^2}}{\arccos\frac{a}{b}}.$$ I tried to calculate explicitly the first few terms $a_2,b_2$ etc but the terms got too complicated really quickly and I couldn't spot any pattern. "detached entity passed to persist error" with JPA/EJB code Is every discrete absolute value non-archimedean? I've been reading Milne's notes on absolute values and local fields (Chapter 7 of the book on algebraic number theory), and a possibly minor point is confusing me.   On page 126, Milne writes, "$K$ is a field complete with respect to a discrete absolute value $|\cdot|$..." and then he talks about things that only make sense for non-archimedean absolute values, like the ring of integers and its maximal ideal.   Is every discrete absolute value on a field $K$ also non-archimedean? This would explain a lot, but I also suspect that it is not true, because I can't find any statement of this fact anywhere.  EDIT: An absolute value is discrete if the value group $|K^\times|$ is a discrete subgroup of the multiplicative group $\mathbb{R}_{&gt;0}$. An absolute value is non-archimedean if it satisfies the stronger triangle inequality $$ |x+y| \le \max (|x|,|y|) $$ or equivalently if the set $\{|1|,|1+1|,|1+1+1|,\ldots\}$ is a bounded subset of $\mathbb{R}$. Here's the information :     There are four different pairs of   opening and closing tags which can be   used in PHP. Two of those, &lt;?php ?&gt;   and &lt;script language="php"&gt; &lt;/script&gt;,   are always available. The other two   are short tags and ASP style tags, and   can be turned on and off from the   php.ini configuration file. As such,   while some people find short tags and   ASP style tags convenient, they are   less portable, and generally not   recommended.   In my experience most servers do have short tags enabled. Typing  &lt;?=   is far more convenient than typing  &lt;?php echo    The programmers convenience is an important factor, so why are they not recommended? I have brand new machine.  I want to install Ubuntu and one more Linux distributions on same machine. When the machine is up I want to have the option to choose which Linux to load.   Is it possible?  How to do it? Q&A blank in Stack Exchange Android app v1.0.95 - S10e/Android 10 Recently upgraded to a Samsung S10e and Android 10, but all Q&amp;A in the Stack Exchange app v1.0.95 are blank.  The title and comments are visible, but question/answer posts are just white space. Accessing the About page in the app is also blank.  I tried clearing data, cache and re-installing the app, but I still get the same behaviour. Totally real Galois extension of given degree Let $n≥1$ be an integer. I would like to prove (or disprove) the existence of a subfield $K \subset \Bbb R$ such that $K/\Bbb Q$ is Galois and has degree $n$.   It is easy to construct such a subfield for $n=2^k$: one  take $K=\Bbb Q(\sqrt 2, \sqrt 3, \sqrt 5, ..., \sqrt{p_k})\;$ where $p_k$ is the $k$-th prime number.  I found that the irreducible polynomial $x^3-6x+2 \in \Bbb Q[X]$ (Eisenstein's criterion with $p=2$) has three real roots, so its splitting field $K$ satisfies my conditions for $n=3$. Then I'm done with $n=3\cdot 2^k$ thanks to compositum of fields.  , a Galois extension of odd degree must be . In all cases, I don't know how to construct, in general or in particular cases ($n$ prime for instance), such a totally real Galois extension $K/\Bbb Q$ of degree $n$.  Thank you for your help! Salesforce Account as Entry source in Journey Builder Does NOT work $ df -kh Filesystem      Size  Used Avail Use% Mounted on udev            7,8G     0  7,8G   0% /dev tmpfs           1,6G   19M  1,6G   2% /run /dev/sda2       622G  227G  364G  39% / tmpfs           7,8G  1,1G  6,7G  14% /dev/shm tmpfs           5,0M  4,0K  5,0M   1% /run/lock tmpfs           7,8G     0  7,8G   0% /sys/fs/cgroup /dev/loop1      143M  143M     0 100% /snap/inkscape/2527 /dev/loop3       79M   79M     0 100% /snap/core/1441 /dev/loop0       79M   79M     0 100% /snap/core/1577 /dev/loop4       79M   79M     0 100% /snap/core/1512 /dev/loop2       62M   62M     0 100% /snap/pencilsheep/5 tmpfs           1,6G   92K  1,6G   1% /run/user/1000   What are these /dev/loop device files? My RAM is always full. Is this related? Repeated Iteration of a 2x2 matrix Suppose I am given a $2$x$2$ matrix $A=$ \begin{pmatrix} a &amp; b \\ c &amp; d \end{pmatrix}  And an initial vector $x_n$ = \begin{pmatrix} x_0 \\ y_0\end{pmatrix}.  Under repeated iteration $x_{n+1} = Ax_n$, we find that $x_{n+1}$ converges to a line in the direction of the $eigenvector$  of $A$ of the form $X$= $[u,mu]$ where $m$ is the slope of the line.  I know that this process somehow also involves the largest $eigenvalue, \lambda,$ of $A$, though I am unsure how it connects.  My question is: How does the largest eigenvalue connect to this repeated iteration, how do I find the slope of the line of convergence $m$, and what is meant by the "direction of the eigenvector"? Is it possible to install an old version of Mac OS on a new Mac? I know that Apple doesn't want me to run a version of Mac OS older than the one my Mac came with, but is there a way around this?  For example: if I buy a new Retina MacBook Pro, is there a way to run OS 10.6 on it without a VM? I'm using Apache JMeter 2.3, which now supports "attempt HTTPS spoofing" under the Proxy Server element.   I've tried this on several different servers, and have had no success.  Has anyone been able to successfully record from an HTTPS source with this setting?  Or barring successfully recording, can anyone share a work-around? When available, I simply have HTTPS turned off at the server level, but this is not always feasible. Thoughts?