Sort the list values based on Created Date List&lt;Account&gt; Acc// this list contains Account records. Acc.Sort() is not working  How to sort the records based on Created Date? Basically i need the recently record from the Acc list
List sorting by custom field I dont know how to sort a list of SObject Case.  I have a List&lt;Case&gt; newCases which i iterate over in for cycle, where i save Cases to my new List&lt;Case&gt; casesList.  for (Case newCase : newCases) {             if(newCase.Case_Content__c == '111' &amp;&amp; newCase.Status == '24'){                 String cuid = newCase.CUID__c;                 cuidSet.add(cuid);                 casesList.add(newCase);                 casesList.sort(); //TODO sorting by CUID__c             }         }   What i need to do is, to sort this new list by field CUID__c. So the Cases with same CUID are together.  Thank you for any help :)
Why is the sum of two random variables a convolution? For long time I did not understand why the "sum" of two random variables is , whereas a mixture density function sum of $f(x)$ and $g(x)$ is $p\,f(x)+(1-p)g(x)$; the arithmetic sum and not their convolution. The exact phrase "the sum of two random variables" appears in google 146,000 times, and is elliptical as follows. If one considers an RV to yield a single value, then that single value can be added to another RV single value, which has nothing to do with convolution, at least not directly, all that is is a sum of two numbers. An RV outcome in statistics is however a collection of values and thus a more exact phrase would be something like "the set of coordinated sums of pairs of associated individual values from two RV's is their discrete convolution"...and can be approximated by the convolution of the density functions corresponding to those RV's. Even simpler language: 2 RV's of $n$-samples are in effect two n-dimensional vectors that add as their vector sum.           Please show the details of how the sum of two random variables are a convolution and a sum. Importing google-play-services lib into Intellij IDEA 12 (and 13) which analysis fit the best for the data? I am trying to work on the data of my master thesis. I have to create a model, but I don't know which analysis perform. My data look like this     number ID sp ab alt SWdiv     1 A1 4 6 630 0.25802965   2 A2 9 16 750 0.29235324   3 A3 8 14 850 0.411620203   4 A4 9 22 950 0.444079553   5 A5 2 12 1050 0.294855765   6 A6 13 40 1130 0.298451014   7 B1 2 2 750 0.275329152   8 B2 5 6 850 0.043352118   9 B3 14 16 950 0   10 B4 17 58 1050 0.230358688   11 B5 7 9 1150 0.298759725   12 B6 8 68 1250 0.012192474   13 C1 12 20 830 0.467542842   14 C2 13 19 930 0.454480722   15 C3 6 30 1030 0.464584038   16 C4 7 14 1130 0.448191833   17 C5 5 15 1250 0.052045275   18 C6 2 7 1315 0.051767368   19 D1 3 3 650 0.294855541   20 D2 11 17 750 0.291717599   21 D3 9 46 850 0.084284864   22 D4 8 57 950 0.088574421   23 D5 4 32 1050 0.160873283   24 D6 13 22 1150 0.297638962   25 D7 6 22 1250 0.290733158   26 E1 11 23 800 0.250878932   27 E2 8 8 900 0.418021272   28 E3 10 13 1000 0.132159303   29 E4 5 10 1100 0.058487554   30 E5 5 15 1200 0.250310822   31 E6 10 19 1350 0.01600807   32 F1 6 20 800 0.462497319   33 F2 15 54 900 0.376552904   34 F3 6 13 1000 0.298264791   35 F4 6 13 1100 0.394736812   36 G1 14 22 830 0.391455956   37 G2 11 16 930 0.282922551   38 G3 5 10 1030 0.282398234   39 G4 10 15 1130 0.153502726   40 G5 13 18 1230 0.051586706   41 H1 10 11 700 0.3009609   42 H2 7 14 800 0.579228102   43 H3 5 11 900 0.528108703   44 H4 20 48 1000 0.28689587   45 H5 13 18 1100 0.264542772   46 H6 10 20 1250 0.29928462   47 I1 12 13 535 0.35326876   48 I2 3 5 635 0.273947657   49 I3 18 30 720 0.467208221   50 I4 16 188 835 0.276669711   51 I5 7 69 935 0.000867067   52 L1 6 10 435 0.36910895   53 L2 7 20 606 0.236700524   54 L3 14 33 697 0.111132519   55 L4 17 42 797 0.296757045   56 L5 5 7 910 0.27539552   57 L6 10 15 1000 0.29748451   58 L7 6 11 1101 0.276755556     58 sample points each has two value: altitude and diversity index related to habitat heterogeneity. What I sample are different insects and I have two values: sp = species (total number of different species for each sample point) and ab = abundance (total number of insects for each sample point). My question are are the species richness or the abundance affected by the altitude or the habitat heterogeneity? which is the best analysis to perform? and why? thank you for your help. Question:   Prove that a norm is always non-negative.   Assume that the norm is negative.   Define: $f: \mathbb{R}^{n}\rightarrow \mathbb{R}^{-}_{0}$  $v \mapsto \left ( \vec{v} \right )f=\left \| \vec{v} \right \|$  $\left ( \vec{u}+\vec{v} \right )f=\left \| \vec{u}+\vec{v} \right \| \in \mathbb{R}^{-}_{0}$ and  $\left ( \vec{u} \right )f=\left \| \vec{u} \right \|,\left ( \vec{v} \right )f=\left \| \vec{v} \right \|=\left \| \vec{v} \right \| \in \mathbb{R}^{-}_{0}$  At this point I am unable to progress further.  Any help is appreciated. Email Deliverbility How can I enable permissions to edit Email Deliverability access level? Currently it is not editable and in system mode. I need to edit it and set it to "All Email so I can test Approval and workflow functionality. How do I run a GUI app via SSH? Callback after the record was created using e.force:createRecord Are there a way to add callback after the user created a record and clicked the Save button?  I am using a custom tab and custom components and open the Create a record modal window using e.force:createRecord, but I was not able to find out how to attach callback to the event.  I even found :     Currently force:createRecord event does not accept any callback method or any after save event to handle custom action. Current force:createRecord always redirects to the newly created record. But in case if you want to just close the force:createRecord popup after save and refresh some other related component using the refresh is not possible.    So, is it really impossible? If so, what are current workarounds here? I am running Ubuntu 12.04.1 LTS i686 on VirtulBox. Every time I check the updates, there's a new Linux kernel. If I install the new kernel, I have to install the Virtulbox Guest Additions again and reboot the server. I don't want to do this every week. I know I can manually uncheck the kernel packages from update manager, but is there a way to skip the kernel update automatically? I found an answer here, but it's for Ubuntu 10. Thanks. A worryingly high number of bad suggested edits get accepted. For example:             (These are just examples of a few common patterns. The  exists too.)  What can we do to educate reviewers to do a better job?  This is an open question, not a feature request, because I don't have a good answer. Some possibilities:   Provide a way to notify the reviewers (“hey, check that proposed tag wikis aren't plagiarised”). Make the workflow for approval as long as the workflow for rejection, so that people don't blindly approve just because it's less work. (I don't know if some reviewers tend to do that.) 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? How to evaluate $\lim\limits_{n\to+\infty} \prod\limits_{k=1}^n (1+k/n^2)$? How to find the sum of the sequence $\frac{1}{1+1^2+1^4} +\frac{2}{1+2^2+2^4} +\frac{3}{1+3^2+3^4}+.....$ Problem :   How to find the sum of the sequence $\frac{1}{1+1^2+1^4} +\frac{2}{1+2^2+2^4} +\frac{3}{1+3^2+3^4}+.....$  I am unable to find out how to proceed in this problem.. this is a problem of arithmetic progression... Please suggest how to proceed...Thanks.. Tsunami dampening mechanisms Free products of cyclic groups Given $G$, $H$, $G&#39;$, and $H&#39;$ are cyclic groups of orders $m$, $n$, $m&#39;$, and $n&#39;$ respectively.   If $G*H$ is isomorphic to $G&#39;* H&#39;$, I would like to show that either $m = m&#39;$ and $n = n&#39;$ or else $m = n&#39;$ and $n = m&#39;$ holds. Where * denotes the free product.  My approach:  $G*H$ has an element of order $n$, thus $G&#39; * H&#39;$ has one too.  But already the next step is not clear to me, should I show that there is an element of length $&gt; 1$ which has infinite order or what would be the right approach here?  Thank you. How do I use Conditional Formatting based on due dates in Excel 2013? I am trying to format cells in Excel 2013. I want the cells to get colored as green, yellow, and red based on how close they are with the target date (January 13, 2015 in this case).  I am unable to use conditional formatting as Excel says that relative formatting is not permitted within conditional formatting.   Target:   06-01-2015  01-01-2015 02-01-2015 03-01-2015 04-01-2015 05-01-2015 06-01-2015 07-01-2015 08-01-2015 09-01-2015 10-01-2015   If the date in the cell is more than 2 days of the target date, I want the cell to change color to Green. I used =DATEDIF($N12,$N$9,"d")&gt;=3 and the format changed to green.  If the date in the cell is exactly 2 days near the target date, I want the cell to change color to yellow. I used =DATEDIF($N12,$N$9,"d")=2 and the format changed to yellow.  If the date in the cell is within 2 days of the target date, I want the cell to change color to red. I used =DATEDIF($N12,$N$9,"d")&lt;2 and the format changed to red only for 5th and 6th January. Apparently, it does not recognize negative values.  How can I get this to match the required colors? Why is there a controversy on whether mass increases with speed? Some people say that mass increases with speed, some people say that the mass of an object is independent of its speed.  I understand how some (though not many) things in physics are a matter of interpretation based on one's definitions. But I can't get my head around how both can be 'true' is any sense of the word.  Either mass increases or it doesn't, right?  Can't we just measure it, and find out which 'interpretation' is right? e.g.: (in some sophisticated way) heat up some particles in a box and measure their weight?  ------------------------------  UPDATE  Right, so I've got two identical containers, each with identical amounts of water, each on identical weighing scales, and each in the same g field. If one container has hotter water, will the reading on its scale be larger than the other? If the answer is yes, and g is constant, does this mean that the m in w=mg has got bigger? How to calculate $\lim_{n\to\infty}(1+1/n^2)(1+2/n^2)\cdots(1+n/n^2)$? How can we compute the following limit:     $$\lim_{n\to\infty}(1+1/n^2)(1+2/n^2)\cdots(1+n/n^2)$$   Mathematica gives the answer $\sqrt{e}$. However, I do not know to do it. Distribution of linear combination of OLS regression coefficients I have a simple linear OLS regression $Y_i = \alpha+ \beta_1 X_{1i} + \beta_2 X_{2i} + e_i$ where $e_i \sim N(0,\sigma)$. I have estimated the regression from the data and obtained estimates for my coefficients as well as the corresponding covariance matrix. Assume my dataset is large (>500)  Now I would like to construct the 95% confidence interval for $Z = a_1 \beta_1 + a_2 \beta_2$. My first thought was that I could assume that Z follows a normal distribution because my regression coefficients are approximately normal and a linear combination of normal variables is also a normal variable. I do find some sources where they treat $Z$ as a normal random variable.  But now I am in doubt because I found that a linear combination of normal random variables is only normal if they are independent. So is it still save to assume $Z$ is random? What should I do when my neural network doesn't learn? References for multivariable calculus Due to my ignorance, I find that most of the references for mathematical analysis (real analysis or advanced calculus) I have read do not talk much about the "multivariate calculus". After dealing with the single variable calculus theoretically, it usually directly goes to the topic of measure theory.    After reading the wiki article "", I'd like to find the rigorous proof for this test. The first book comes to my mind is Courant's Introduction to Calculus and Analysis which includes the multivariate case in the second volume.   Motivated by this, I'd like to put the question here:     What are the usual references for the   theoretical treatment for   ?