How to count number of different 3-members-subsets (not ordered) of a multiset {1,1,1,2,2,2,3}? I need a general formula or a general method of solving that problems. Another example: how to count number of defferent 4-members-subsets (not ordered) of a multiset {3,3,4,4,5,5,7,7,7}?
We have a pool of N number of balls.  There are: A number of white balls (W), B number of green balls (G), C number of blue balls (B), and D number of pink balls (P)  In how many ways (combinations) we can pick X number of balls from this pool? Is there a formula for something like this?  This is similar to combinations with replacement, but there are limitations to how many times a certain object can be replaced.
Every time i publish a new post i want to display an icon like a badge (NEW) and after a specific time it will disappear.  Lets say i publish a new post and i want to display that it is a new post. So i want to insert an icon that for example a star, in each new post in the blog list view into the metadata of the posts. Also i want to be removed after a specific time will pass. Lets say in one day or 24 hours the icon should be removed automatically.  How can i do this? My WiFi adapter is not working at all, how to troubleshoot? Is it true that  $$\int_a^b f(x) dx = \int_{f(a)}^{f(b)} f^{-1}(x) dx$$  Just making sure.   If not, how about:  $$\int_a^b f(x) dx = (f(b)-f(a))b - \int_{f(a)}^{f(b)}f^{-1}(x)dx$$   I'm having a hard time concentrating right now, and I'm trying to figure out how to get the area under a curve when the function is inverted. Is the Hogwarts Express in the magical or non-magical realm? This question is related to  and explores an apparent inconsistency, given only the Harry Potter movies as source material.  The Hogwarts Express line seems to have an inconsistent existence between magical (invisible to ordinary humans aka muggles) and non-magical (muggle) realms; platform 9-3/4 is clearly hidden from muggles, but in Chamber of Secrets, when Harry and Ron take the car (in the muggle world) to catch up to the train, they make no explicit crossing into a magical realm, suggesting that the train is traveling the muggle world despite its departure from a magical platform.  In which realm (magical or muggle) does the Hogwarts Express exist? How is this apparent inconsistency resolved? How would I go about identifying a port, card or connector on my system which I am unfamiliar with?  Where would I find information on what these parts are? What would be the steps I would take in identifying a unknown port or cable?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits. Solve $x\equiv 1\pmod2$, $x\equiv 2\pmod3$, $x\equiv 3\pmod4$, $x\equiv 4\pmod5$, $x\equiv 5\pmod6$ and $x\equiv 0\pmod7$ $$\begin{align*} x&amp;\equiv 1\pmod2\\ x&amp;\equiv 2\pmod3\\ x&amp;\equiv 3\pmod4\\ x&amp; \equiv 4\pmod5\\ x&amp;\equiv 5\pmod6\\ x&amp;\equiv 0\pmod7\\ \end{align*}$$  So the solution says we can eliminate $x\equiv 5(\bmod6)$ because the first two cases cover it, but I don't really know how it does. How do we solve it in cases like this where the moduli are not mutually relatively prime. What is a wizard that makes them non-Muggle? Or, more directly, what ancestry does the witch/wizard gene follow? Is there a patriarchal wizard (or matriarchal witch) that Muggles have no part in? Elves perhaps? Stop reading here.  Purpose of the Question/History/Don't Read There seem to be solid consequences associated with being Muggle, or Muggle-related. A dominant theme in the novels is discrimination against the non-gifted race, but, when read into, the wizard bloodline doesn't appear all that well defined. JKR indicates that wizard-ness is genetic, or inherited:  &quot;Muggle-borns will have a witch or wizard somewhere on their family tree, in some cases many, many generations back. The gene resurfaces in some unexpected places.&quot;  By the above, it stands that a family that produces a squib (non-magical born of magical parents) must be a half-blooded family in some way, since half-blooded only requires one non-magical ancestor. Of course, we are dealing in magic genetics. Any other form of genetics would make this inherited, seemingly recessive trait (or squibs couldn't exist), never appear at all. Unless they were XMen. If it is so important, what does the wizard-bloodline follow? Other Mythos In other literature a wizard can be nearly anything, but magical powers are typically inherited as well as learned. Merlin of the Arthurian Legend (also mentioned in HP) is Cambian, meaning he is born of demonic intervention; this explains his source of enchantment. Gandalf of Middle Earth is a Maiar, as are all Wizards of Middle Earth. Wizards in Harry Potter seem to follow a bloodline, and it has been mentioned (in the question Gabe linked) that genetics have a heavy play in it, meaning that squibs and parents of Muggle-born wizards should have identical genetics. This bloodline must come from somewhere. Magical Creatures In Harry Potter it is common for magical creatures to &quot;mingle&quot; with humans, these beings are typically somewhat magical. Elves have been described to have very strong magic, but are for some unreasonable reason subservient to humans. I may be mistaken, but believe it was hinted that elves and the wizarding lineage had intersected at one time. Maybe I'm imagining this. Genocidal Allusions Voldemort hates muggles, and half-bloods, and whatever else is non-wizard. The presence of this theme, suggests that this wizardly bloodline must be at least defined if the main antagonist is so obsessed with keeping that mysterious bloodline pure. Since Slytherin himself was said to be a supremacist (circa a really long time ago) it suggests that this bloodline should have existed long before he was around, especially if he founded a school with people he was not related to, but were also magical. Summoning an item in 1.9 with motion When I put   /summon Item ~ ~2 ~ {Item:{id:"minecraft:diamond",Count:1b,Motion:[0.0,0.8,0.0]}}    in a command block, it summons the diamond with Count:1b but it doesn't follow the Motion Tag. Does anyone know how to get the Motion Tag working? Indefinite articles used with plural nouns: It was AN amazing TWO DAYS ListPlot and filling between curves Enumerate behaves differently with beamer 3.42 The following is produced by beamer version 3.41 with enumerate:  \documentclass{beamer} \mode&lt;presentation&gt;     {\usetheme{Rochester}} \begin{document} \begin{frame}   \begin{enumerate}[(a)]     \item Foo     \item Bar   \end{enumerate}   \begin{enumerate}[1]     \item Foo     \item Bar   \end{enumerate} \end{frame} \end{document}     And with beamer version 3.42 the following:    The latter output is so, well, ugly, that it's probably a bug. While waiting for a bug fix (?), how can I temporarily fix this so that I get the output produced by beamer 3.41? I failed to open a lock. Now what? Find a function $f: \mathbb{R} \to \mathbb{R}$ that is continuous at precisely one point? Is the function $f(x) = \lim_{k \to +\infty} \tan{kx}$ a right example?  But I do not know whether this is a function at first. Is this a function?  Could you give a correct real-valued function that is continuous at precisely one point?  Thanks. How can I fix/repair a corrupted PDF file? I have a 12-hour layover in Istanbul. Will I be able to leave the airport to do some sightseeing in the city? I'm flying to Barcelona from Israel via Istanbul. The layover in Istanbul is 12 hours, and I'm thinking about leaving the airport and entering the country for a couple of hours. Would that be possible? Are there any Border/Airline restrictions?  I'm Traveling with Turkish airlines, and hold a passport which does not require a visa to enter Turkey.  I've done this in the past, but only inside the Schengen area, so this question is Turkey-specific. I have too many sections in my presentation such that the left-hand-side navigation bar is full and only shows the first sections in Fig. 2, initial situation in Fig. 1.  Pseudocode    clean the left-hand-hand side navigation bar when exceed the threshold and start a new one there when on sufficient page  this feature occurs with Beamer Berkeley appendix so it is possible also with the main document   Code which problem shown in Fig. 2   \documentclass{beamer} \usetheme{Berkeley}  \logo{\includegraphics{logo.png}} \usepackage{hyperref} % https://tex.stackexchange.com/a/346486/13173 \newenvironment{slide}[1] {\begin{frame}[environment=slide,allowframebreaks] \frametitle{\insertsection-#1} } {\end{frame}} % fragile only if code % allowframebreaks not by default   \begin{document}  \title{Sensory system. Primary sensory modalities. Cortical modalities. Kinds of sensory disturbances. Spinal cord disorders. Spinal cord transverse and partial lesion. Cauda equina damage.} \author{Leo}  \section{Cortical modalities} \begin{slide}{basics}      More refined aspects of sensation ... \end{slide}  \section{Cortical modalities} \begin{slide}{basics}      More refined aspects of sensation ... \end{slide}  \section{Cortical modalities 2} \begin{slide}{basics}      More refined aspects of sensation ... \end{slide}  \section{Cortical modalities 3} \begin{slide}{basics}      More refined aspects of sensation ... \end{slide}  \section{Cortical modalities 4} \begin{slide}{basics}      More refined aspects of sensation ... \end{slide}  \end{document}   Fig. 1 Situation at the first page,  Fig. 2 Situation at Section 6 wheere the navbar has not changed,  Fig. 3 Samcarter's answer output + one slide addition but without \part{} - fails on sufficient page count       Output: the left-hand-side navigation bar is not refreshed when the amount of sections exceed its capacity on suffcient enough page     Testing Samcarter's proposal  I include one slide before Samcarter's body so I get the wrong output in Fig. 3.  Solution: Eventually correct output by just adding \part{} in the place where the new navbar is wanted.   TeXLive: 2016 OS: Debian 8.7 What is the expected value of the maximum of 500 IID random variables   with uniform distribution between 0 and 1?   I'm not quite sure of the technique to go about solving something like this. Could anyone point me the right direction?  Thanks Is it possible to assign the same value to multiple keys in a dict object at once? When should you push variables in quotes in boolean conditions? Are the following two boolean expressions the same?  if [ -n $1 ] ; then  if [ -n "$1" ] ; then   If not - When should you put a variable in quotes? I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders.