Catch a specific object inside an Array of mutiple Objects
How to determine an object's class?
I am trying to solve the following question which is Ex3 from Arthur Engel, Problem Solving strategies. Here is the question: $\sum_{k=1}^n k^3 {n \choose k}$ and asks to find the sum. I am sincerely having a hard time trying to figure out how to solve it and get $n^2 (n+3)(2)^{n-3}$. I would really appreciate if someone could show the step-by-step process. Thank you! I'm trying to solve an exercise about first order stochastic dominance, and there is this one question that I'm not able to answer.  Here are the hypothesis of the exercise:  Let Y ∼ F and Y' ∼ G, that means Y (resp. Y') has a probability law given by the distribution function F (resp. G).  Assume that Y ≥ 0 and Y' ≥ 0 and E(Y) + E(Y')&lt; ∞.  Here comes the question:  -Show that if the survival function of Y first order dominates over the survival function of Y', then if Y and Y' are independent, we have P(Y ≥ Y') ≥ 1/2.  I don't see how to use that Y and Y' are in this case independant.  Maybe I should set X=Y-Y' and then use the convolution?  Any help, would be appreciated, thanks !  Alex The standard files/tools that report memory seem to have different formats on different Linux distributions. For example, on Arch and Ubuntu.   Arch  $ free               total        used        free      shared  buff/cache   available Mem:        8169312     3870392     2648348       97884     1650572     4110336 Swap:      16777212      389588    16387624   $ head /proc/meminfo  MemTotal:        8169312 kB MemFree:         2625668 kB MemAvailable:    4088520 kB Buffers:          239688 kB Cached:          1224520 kB SwapCached:        17452 kB Active:          4074548 kB Inactive:        1035716 kB Active(anon):    3247948 kB Inactive(anon):   497684 kB  Ubuntu  $ free              total       used       free     shared    buffers     cached Mem:      80642828   69076080   11566748    3063796     150688   58358264 -/+ buffers/cache:   10567128   70075700 Swap:     20971516    5828472   15143044   $ head /proc/meminfo  MemTotal:       80642828 kB MemFree:        11565936 kB Buffers:          150688 kB Cached:         58358264 kB SwapCached:      2173912 kB Active:         27305364 kB Inactive:       40004480 kB Active(anon):    7584320 kB Inactive(anon):  4280400 kB Active(file):   19721044 kB    So, how can I portably (across Linux distros only) and reliably get the amount of memory—excluding swap—that is available for my software to use at a particular time? Presumably that's what's shown as "available" and "MemAvailable" in the output of free and cat /proc/meminfo in Arch but how do I get the same in Ubuntu or another distribution? I've been wondering, what is the difference between seek and search? When should one be preferred over the other? Is there a well-known term for the synonym or near-synonym "telescoping" words? This has been rattling around in the back of my mind for many years (way before Stack Exchange came into existence), so it's a relief to finally ask the question.  There are words that can be "contracted" by removing one or more letter(s) (without changing the order of the letters) to form a shorter word with the same meaning, or one very close to it.  The two strongest examples I can think of right now are:  rapscallion -> rascal  and  satiate -> sate  This is a slightly weaker example:  rapine -> rape  Even though "rape" has come, in modern usage, to refer almost exclusively to a sexual crime, it can still be used in a more literary (and purposefully anachronistic) sense to mean "the plunder and pillage of a country or region". In that sense, "rape" can be used in a similar fashion to "rapine"; in any case, the two words are etymologically related to the Latin rapere which is tied to the archaic usage.  Another weaker example:  transliterate -> translate  These words are near-synonyms, but there is a definite difference in their meaning. Still, I guess this pair would qualify, albeit in a looser sense.  I wanted to exclude some relatively trivial examples, such as:  (inflammable -> flammable)  (perambulate -> ambulate)  and so forth. So I've imposed the additional rule (arbitrary though it may seem) that the "stripped" letters must not come from the start or the end of the word, but only from its middle.  Acronyms and portmanteaus are also excluded, as are "slangier" contractions e.g.:  (modulator-demodulator -> modem)  (motor-hotel -> motel)  (certitude or certainty or certificate -> cert)  I guess the long-short forms of the same word would form a linguistic doublet. I've coined the term "telescoping word" to describe the long form that "collapses" into the short form with letter deletion sans anagramming.  My question is: has this phenomenon already been studied? If so, what name have authorities given it? Is there already an existing reference or resource on it? Thanks in advance.  (This is not a duplicate of , as that is asking about the more general phenomenon of words (not necessarily synonyms) occurring within larger words. In fact, the question specifically mentions "kangaroo word" and states that a broader scope is being sought.) Reduce Spacing In $$ In math, one often needs to put a letter inside the symbols &lt;&gt;, e.g. to denote a cyclic group &lt;x&gt; generated by some element x. However, plain text displays the symbols &lt; and &gt; as an upside down exclamation point and an upside down question mark, respectively, while math type displays a large space like so:  &lt; x &gt;    Is there some way to reduce this spacing? Does the std::stack in the C++ STL expose any iterators of the underlying container or should I use that container directly? Mounting Disk Image in Raw format While Trying to mount a disk image in Raw(dd) format using the following command  mount  nps-2010-emails.dd /media/manu/   I get the following error message   mount: you must specify the filesystem type   I know that using -t we can specify the file system but what is the terminology for  a RAW (dd) file, which can pe passed as an argument to the mount command. If my method to mount this file system is wrong please help me out in doing the same.  On typing the command file -s nps-2010-emails.dd  The output is as follows:  nps-2010-emails.dd: x86 boot sector; partition 1: ID=0xb, starthead 254, startsector 1, 20479 sectors, extended partition table (last)\011, code offset 0x0 Difference between information and knowledge? As far as I think projection of data unto subject mind is information for the subject whereas indentation or impressions accumulated owing to projection of data unto subject mind is knowledge for the subject. I want to know am I right? Or can someone provide a more rigorous answer! Where do I use delegates? What are some real world places that call for delegates?  I'm curious what situations or patterns are present where this method is the best solution.  No code required. I tried to find a topic here on this (possible problem) but I didn't.   I reported it at  but Tim Hoffmann pointed me that it is not a problem of editor. After tested with nano and pdflatex I'm posting here.  The minimal code produces errors. OK, we can solve it using \\{}.   But is this a problem with TeXlive 2014 or there are some good reasons to have that behavior.  \documentclass{report} \begin{document} test\\ [foo]  test\linebreak [foo]  test\newline [foo] \end{document}      ! Missing number, treated as zero.                        f l.3 test\ [foo] Execute bash script from URL I want to decrease the vertical space between the top of the page and the chapter heading. I have tried to follow the instructions for titlesec but I am not successful. I have tried the following two setups without any changes occuring.  First:  \documentclass[12pt]{report}   \usepackage[compact]{titlesec}   \begin{document}   \chapter{Characters}  The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them.   \end{document}   Second:  \documentclass[12pt]{report}   \usepackage{titlesec}   \titleformat{\chapter}[display]   {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}   \titlespacing{\chapter}{0pt}{0pt}{0pt}   \begin{document}   \chapter{Characters}    The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them.   \end{document} Send authors an inbox message if their question is closed I think it would really help if you get notified that a question of yours was closed.  Especially for the multi-site power user, usually (at least for me) a question is asked and then left alone for while. I rely on the network-wide inbox to tell me when someone has commented or answered, but if I don't receive any messages then I tend to assume that the question wasn't answered or even noticed. It's only when I check the question a day or two later to see what I can add do I find out it was closed.  This would be especially helpful for duplicates, where the answers you need are already there. A message to the effect of, "Closed as duplicate of question" is just like notifying me that a new answer has been added!  Unfortunately, question closures can remain unnoticed by their askers until months have passed. By then, the questions may either be too old to migrate to the correct site, or may , depending on the specific closing reason. We should notify users of these question closures so that they can improve them and learn from their mistakes.  Could closed questions get added to the inbox? Compare nullable types in Linq to Sql I have a Category entity which has a Nullable ParentId field. When the method below is executing and the categoryId is null, the result seems null however there are categories which has null ParentId value.  What is the problem in here, what am I missing?  public IEnumerable&lt;ICategory&gt; GetSubCategories(long? categoryId) {     var subCategories = this.Repository.Categories.Where(c =&gt; c.ParentId == categoryId)         .ToList().Cast&lt;ICategory&gt;();      return subCategories; }   By the way, when I change the condition to (c.ParentId == null),  result seems normal. If nonnegative $f: [0,1] \rightarrow \mathbb{R}$ has a continuous $f''$, then $\int_0^1 \Big| \frac{f''(x)}{f(x)} \Big| \,dx >4$ Why too many capacitors in parallel for Vdd supply net? Can't we just add all to replace with one big capacitor? How can I download an APK file from the Play Store? I can't download apps from the Play Store on my Android device (maybe due to a network issue), so I'm wondering how could I download the APK file of an app on my PC from ? How to prove those "curious identities"? How to prove $$ \prod_{k=1}^{n-1} \sin\left(\frac{k\pi}{n}\right) = \frac{n}{2^{n-1}}$$ and $$ \prod_{k=1}^{n-1} \cos\left(\frac{k\pi}{n}\right) = \frac{\sin(\pi n/2)}{2^{n-1}}$$ Centre of $GL_n(\mathbb R)$ How to prove that center of $GL_n(\mathbb R)$ is scalar matrices?  Again what can you say about the center of set of all upper triangular matrices and center of set of all diagonal matrices.