I'm getting an error  Invalid conversion from runtime type List&lt;ANY&gt; to Map&lt;String,ANY&gt;  for the json {     &quot;customersId&quot;: &quot;22&quot;,     &quot;stockType&quot;: &quot;CurrentStock&quot;,     &quot;products&quot;: [         {             &quot;identifier&quot;: &quot;GN20&quot;,             &quot;stock&quot;: [                 {                     &quot;locationId&quot;: &quot;xxxx&quot;,                     &quot;locationType&quot;: &quot;Samsung&quot;,                     &quot;quantityInStock&quot;: 100,                     &quot;salesUnit&quot;: {                         &quot;code&quot;: &quot;INOX&quot;,                         &quot;name&quot;: &quot;INOX&quot;                     }                 }             ]         }     ] }  Following is the apex code Map&lt;String, Object&gt; m = (Map&lt;String, Object&gt;)JSON.deserializeUntyped(res.getBody());  System.debug('deserialize result'+m); Map&lt;String, Object&gt; myMaps = new Map&lt;String, Object&gt;(); myMaps = (Map&lt;String, Object&gt;)m.get('products'); // getting error System.debug('myMaps:- ' + myMaps); List&lt;Object&gt; myMapObjects = (List&lt;Object&gt;) myMaps.get('stock'); System.debug('Test--'+myMapObjects);  After this, I want to iterate the locationId and locationtype from json and display it in vf page
I'm trying to parse json response.. but keep getting this error      Invalid conversion from runtime type List ANY> to Map String,ANY>   Map&lt;String, Object&gt; MapLv3 = new Map&lt;String, Object&gt;();      Integer x2 = 0; for (Object oh : CallsList){     MapLv3.put(String.valueof(x2), oh);     x2++; } index = x2; System.debug('Map Lv 3 ==&gt;'+MapLv3);  Map&lt;String, Map &lt;String, Object&gt;&gt; Map3 = new Map&lt;String, Map &lt;String, Object&gt;&gt;(); for (Integer a2 = 0; a2 &lt; index; a2++){     Map3.put(String.valueof(a2),(Map&lt;String,Object&gt;) MapLv3.get(String.valueof(a2))); } System.debug('Segment ==&gt;'+Map3.get('0').get('segments'));
Should your PhD students call you by your first name? I want to run the command   python quast.py -o quast contigs.fasta   but I want to do this for multiple contigs.fasta files in multiple directories.  I'm running OSX. How can I make my typing "stick" to box side? Show that $\frac{X}{X+Y}\sim Beta(\alpha,\beta)$ Let IG denote Inverse-Gamma distribution   .   If $X\sim IG(\alpha,1)$ and $Y\sim IG(\beta,1)$. Show that   $\frac{X}{X+Y}\sim Beta(\alpha,\beta)$   I tried with jacobian transformation taking $Z=\frac{X}{X+Y}$ and $W=Y$ then $$X=\frac{WZ}{1-Z};Y=W$$  $$\frac{\partial(z,w)}{\partial(x,y)}=\frac{1}{(1-z)^2}$$  $$f_{z,w}(z,w)=f_x(\frac{wz}{1-z})f_y(w)(1-z)^2$$ $$f_{z,w}(z,w)=\frac{1}{\Gamma{(a)}}(\frac{wz}{1-z})^{-\alpha-1}e^{-\frac{(1-z)}{wz}}\frac{1}{\Gamma{(\beta)}}w^{-\beta-1}e^{-\frac{1}{w}}(1-z)^2$$  but I'm stuck, in some place I read that $\frac{X}{X+Y}$ is a type 3 Beta distribution, but I can't show that. Convolution operator has norm 1 with respect to $L^2$ norm Let $C_c(\mathbb{R})$ be the following:  $$C_c = \{ f \in C(\mathbb{R}) \mid \exists \text{ } T &gt; 0 \text{ s.t. } f(t) = 0  \text{ for } |t| \geq T\}$$  Let $T_n \in L(C_c(\mathbb{R}))$ be a linear operator such that:  $$T_n u = \delta_n *u, \forall u \in C_c(\mathbb{R}),$$  where  $$ \delta_n(t)= \begin{cases}        n^2(t+1/n) &amp; -1/n \leq t \leq 0 \\       -n^2(t-1/n) &amp; 0 &lt; t \leq 1/n \\       0 &amp; \text{elsewhere}     \end{cases} $$  I have to prove that with respect to the 2-norm, the operator $T_n$ has $\|T_n\| = 1$ and I have succeeded in proving that $\|T_nu\|_2 \leq \|u\|_2, \forall u \in C_c(\mathbb{R}).$  Now, I remained  to prove that $\exists \text{ } u \in C_c(\mathbb{R}) \text{ s.t. } \|T_nu\|_2 = \|u\|_2$, but I really don't get how $u$ should be shaped in order to satisfy it. Best approach to Windows Forms rolling log output in TextBox Say I had;   \begin{equation}   \begin{cases}      x = 0 \\      y = 0 \\      z = 0     \end{cases}     \qquad \text{and} \qquad     \begin{cases}      x = a \\      y = a \\      z = b     \end{cases}   \end{equation}   How could I insert a brace ( } ) in the second 'cases' to say x and y are equal to a. (i.e. } = a ).   I hope this is clear, if not I can sketch it out - just let me know!  Thanks in advance! Why cannot fermions have non-zero vacuum expectation value? Why is $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$? It seems as if no one has asked this here before, unless I don't know how to search.  The Gamma function is $$ \Gamma(\alpha)=\int_0^\infty x^{\alpha-1} e^{-x}\,dx. $$ Why is $$ \Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}\text{ ?} $$ (I'll post my own answer, but I know there are many ways to show this, so post your own!) In indirect speech we generally backshift the tense. For ex - Direct speech : "I am the most powerful person." Indirect speech : "He said that he was the most powerful person."  What if someone reports like -  He denied the charges claiming that he is/was the most powerful person. So here which is correct- is or was ?  Thanks in advance. options for appearance of links in hyperref Shortest distance between $2$ lines with direction vectors Let L1 be the line passing through the point $P_1=(−11, 10, −1)$ with direction vector $\vec d_1=\begin{bmatrix}−2\\ 3\\ −1\end{bmatrix}t$, and let $L_2$ be the line passing through the point $P_2=(−8, 9, 10)$ with direction vector $\vec d_2=\begin{bmatrix}−1\\ 3\\1\end{bmatrix}t$. Find the shortest distance, $d$, between these two lines, and find a point $Q_1$ on $L_1$ and a point $Q_2$ on $L_2$ so that $d(Q_1,Q_2) = d$.   I dont really understand how to properly approach this question, how do i start? When using zero as a quantifier, is it correct to use the singular form on the object of the quantifier, or the plural form?  It sounds confusing when I put it that way, but what I mean is: Which is correct?   Your password expires in 0 days. Your password expires in 0 day.   Essentially I suppose I'm asking, does "singular" mean "one" or "the opposite of more than one", as zero is not "plural" in the traditional "more than one" sense?  I'm pretty sure "days" sounds correct, but I can't be sure. I read a comment under :     There are plenty of events that can occur that have zero probability.   This reminds me that I have seen similar saying before elsewhere, and have never been able to make sense out of it. So I was wondering    if zero probability and impossibility mean the same? if an event with zero probability doesn't mean that the event is impossible to occur, how probability theory represents/describes impossibility?   Thanks and regards! Is there a grammatical term for moving a word to the front or back of a sentence? There is a function in Arabic grammar where you may bring forward in sentence order a word - as well as deferring it.  For example: if the sentence order is Subject - Verb - Object, you can bring the object forward to be before the subject,  yielding Object - Verb - Subject or Object - Subject - Verb.  Similarly, if you have Noun Phrase - Verb Phrase, you can move the verb phrase forward so you get Verb Phrase - Noun Phrase.  This is used to add emphasis to the item brought forward. The same applies to moving the item to the end of the sentence.  Is there a grammatical term in English that represents this function or functions? What was L's real name? I watched through Death Note once, and I never remember hearing L's name, even after he died.  What was L's real name, or did he never have one (it was never said)? Suppose that there is a trigonometric equation of the form $a\sin x + b\cos x = c$, where $a,b,c$ are real and $0 &lt; x &lt; 2\pi$. An example equation would go the following: $\sqrt{3}\sin x + \cos x = 2$ where $0&lt;x&lt;2\pi$.  How do you solve this equation without using the method that moves $b\cos x$ to the right side and squaring left and right sides of the equation?  And how does solving $\sqrt{3}\sin x + \cos x = 2$ equal to solving $\sin (x+ \frac{\pi}{6}) = 1$ I don't understand an answer. Should I add a comment, or post a new question? I recently (today) asked a question that received what seems to be a clear, concise answer, but one that's beyond my ability to understand (I'm at the cut-and-paste stage with JavaScript, and the answer seems to assume more knowledge than I actually have).  Is it considered better to ask follow-up questions as comments to the answer given, or should I post "fresh" questions to Stack to help me understand the answer that's been given? Proof of $(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z}) \cong \mathbb{Z}/ \gcd(m,n)\mathbb{Z}$ I've bunch of folders in folder A. I want to move files from all those folders to A.  Or  I want to cut all files from child folders and paste them in parent folder.  How to do that?