Get all possible combinations (power set) from ArrayList (or set) of elements
Algorithm to return all combinations of k elements from n
How FluentWait is different from WebDriverWait? How is the FluentWait is different from WebDriverWait? I am using WebDriverWait having the polling interval set to : 500 miliseconds. Still, WebDriverWait returns after some delay (i.e. 2 - 3 seconds after the element load is completed)? Any opinion here? It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach? Is it possible to find all php files within a certain directory that have been modified on a certain date  I'm using   find /var/www/html/dir/ -mtime -28 | grep '\.php'    to get files modified within the last 28 days, but I only need files that have been modified on the following date: 2011-02-08 Number Theory: Complete set of residues modulo $n$ I have this problem assigned for homework and I'm struggling with the proof of it:  If $a_1,a_2,\dotsc,a_n$ is a complete set of residues modulo $n$ and $\gcd(a,n)=1$, prove that $aa_1,aa_2,\dotsc,aa_n$ is also a complete set of residues modulo $n$.  (Hint: It suffices to show that the numbers in question are incongruent modulo $n$.)  I'm in elementary number theory so I'm not allowed to use an high-level theorems to prove this, I pretty much have to use the basics of modulo.  Thanks! Evaluate $ \int_{0}^{\frac{\pi}2}\frac1{(1+x^2)(1+\tan x)}\:\mathrm dx$ Get the size (size in Kb or MB) of an featured image? Okay the scenario I'm thinking of is as follows:   I control a ,  and 3 untapped lands (2 swamps, 1 Island to be perdantic). In my opponents turn he casts a burn spell to kill my duskmantle.   I activate his first ability in response.   The way I am hoping the following interactions will go is:   Duskmantles ability will hit the stack at the top and resolve The burn spell resolves dealing its damage to Duskmantle The burn spell card hits the graveyard and triggers the infinite loop for duskmantle and mindcrank killing my opponent Duskmantle perishes   Is this the way that the stack would pan out? Do I win in this situation regardless of the stack being correct or not above? (I am not fully familiar with how the stack really works in magic) You can see the cards from my deck . Few application icons not appearing in Ubuntu Dock after upgrading to Ubuntu 17.10 Discuss convergence of the series $\sum \frac{(1+n)^n}{n!}x^n$. Let    $$a_n = \dfrac{(1+n)^n}{n!}$$   Discuss convergence of the series $\displaystyle \sum a_nx^n$.   I've shown that the series converges absolutely when |x| &lt; 1/e and diverged when |x| > 1/e. I can't seem to determine what happens at |x| = 1/e Is there any way you could revive Guest Sessions in a future LTS distro?  Guest sessions are good security - they give me just enough power to do what I need to do on a daily basis without risking my system. In short, Guest sessions save me from myself.  I had upgraded from 16.04 to 18.04, gotten a problem I couldn't fix and was all to happy to wipe and rebuild my hard drive and return to 16.04.  I can't be the only one who feels this way. Execute managebean method from javascript onload event Chrome always quit when I click on the X button on a tab, without asking me anything!  Even when I close Chrome he do not alert me if I am willing to relay close it?   Many times it happened that accidentally I clicked on X button. Acne underneath skin Introduction  Okay, I've almost won my war. The battle, its almost won... However, I must still claim victory in my final battle. The battle against the little enemies, the ones that have fought with my blade of benzoyl peroxide every single day.  Problem  Through spot treatments I have been able to fell every single one of these spots, but only the ones on my face. I've been using a spot treatment with benzoyl peroxide in, which has worked really well for me. However, my issue comes here:     There are spots underneath my skin, I think. The areas where they come through are a bit red.   So, because there is still slightly red skin on my face, and I think this is causing my acne to constantly return. I need to stop this, and end my war once and for all.  What I've tried   Washing my face with a rag and sponge every day, three times a day Changing my pillow case every day Using a benzoyl peroxide spot treatment Minimizing how much I touch my face Not interfering with the spots with my fingers, not picking at them, not playing with them. Just letting spot creams eradicate them.   Conclusion  Seriously, this driving me up the wall. I spot cream in the evening, by the time tomorrow has ended and its time for a shower, they've all come back. Its like they're coming in waves, damn waves! I must put an end to this.  So, how can I prevent acne from coming back within the space of a single school day? How can I get rid of these once and for all? What types of measures could I try? I have no reason to visit my doctor, its only acne, but I have no idea what I can try now.  Is there even a point in me trying? I acknowledge that I am a teenager, but no others that I know seem to have acne/spots like I do. The axiom of choice asserts that for any set $X$ there exists a function $f : (2^X − \{\emptyset\}) \rightarrow X$ such that for any nonempty $A \subseteq X$, $f(A) \in A$. Show that this is equivalent to the assertion that every relation includes a function with the same domain. I am given this problem in my assignment. My approach is following. I have a set $X$. Then it has a choice function $g : \mathcal{P}(X) \setminus \left\{\emptyset\right\} \rightarrow X$. Suppose $X$ has a relation $R \subseteq X \times X$. $dom(R) \subseteq X$. Then the required function $f : dom(R) \rightarrow X$ is $$f(x) = g(\{y\ |\ (x, y) \in R\})$$ Conversely, suppose $X \supseteq Y$ is a non-empty subset. Let $$R_Y = \{(x, y)\ |\ y \in Y, x \in Y, (p, q) \in R_Y \Rightarrow p = x\}$$ Then there is a function $f_Y : dom(R_Y) \rightarrow X$. But $dom(R_Y)$ is singleton from the definition of $R_Y$. Then $im(f_Y)$ is also singleton. We define our choice function as $f = \{(Y, y)\ |\ y \in im(f_Y)\}$ Are my arguments correct?  Edit.1: what I tried to do for converse is, for any subset $Y$, I construct a relation $Y_1 \times Y$ where $Y \supseteq Y_1 = \{y\}$. Then there is a function $f_Y : Y_1 \rightarrow Y$. Then if $f$ is my choice function I define $f(Y) = f_Y(y)$. May be I should define $R_Y$ as $$R_Y = \{(x, y)\ |\ y \in Y; x \in Y; (p, q), (p', q) \in R_Y \Rightarrow p = p'\}$$ I understand there may be multiple $R_y$'s. But can't I define a singleton set as $\{s\in S\ |\ a, b \in S \Rightarrow a = b\}$? This can be $\{s\}$ $\forall s \in S$. But isn't it a valid specification?  Edit.2: This is the final solution with the help from @Asaf.  If we assume axiom of choice then for any $X$ there is a choice function $f : \mathcal{P}(X) \setminus \left\{\emptyset\right\} \rightarrow X$ such that $f(A) \in A$. Suppose $R$ is a relation between $P$ and $Q$. Then we have a choice function $f_Q$ for $Q$. Let $f_R(p) = f_Q(\{q\ |\ pRq\})$. The function $f_R : P \rightarrow Q$ and $dom(f_R) = dom(R)$. So this is our required function.  Conversely, if every relation includes a function with same domain. Let $R$ be a relation between $\mathcal{P}(X) \setminus \left\{\emptyset\right\}$ and $X$ such that $aRb \Rightarrow b \in a$. Now $R$ includes a function $f : \mathcal{P}(X) \setminus \left\{\emptyset\right\} \rightarrow X$. Then $xRf(x) \Rightarrow f(x) \in x$. So $f$ is the choice function for $X$. Take the following C# class:  c1 {  event EventHandler someEvent; }   If there are a lot of subscriptions to c1's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous delegates.  Currently my solution is to add a ResetSubscriptions() method to c1 that sets someEvent to null. I don't know if this has any unseen consequences. The essential gist of my question relates to what the real, unvarnished realities are of graduate, post-graduate, research, fellowship, and professorship attainment - when you aren't a single person with no pressing demands other than feeding yourself.   [EDIT: I am humbled by the incredibly helpful and thoughtful responses so far, all of which are +1 from me. I'll leave the question open a few more days before clicking 'accept' on any one, but you all have my gratitude and I hope others will benefit anywhere near as much as I have. ]  What I don't know is what succeeding in this path truly requires in time committment and family support.   Right now I can handle a 12-14 credit course schedule with 3.7-4.0 GPA (in the top 5-10% for college and program, dean's list, etc), work part-time, and still have time to be home and not have a burn-out/breakdown - and the academics are the easy part by far! I could do more, but I need to work more too.   What I really need to know is how sharply different is the time/dedication curve of graduate work and above. I realize each step is a filter that removes most of the entrants (most people don't get a degree, most who do don't attend/finish graduate school, most who do don't seek a PhD,  most who do don't seek/gain professorship...and on and on). But I don't know how severe the stepping is - I'm not talking "tenured professor at MIT or bust" - I realize that bar is many orders of magnitude higher.  Background Details: As an "adult, returning" undergraduate student with a (disabled) wife and kids, I'm halfway through a bachelor degree now. I've located a field of study (in a focus of Industrial Engineering) that has made me very interested in altering my life path to include seeking a Masters and maybe even a PhD/professorship (my father was a professor, so its not a purely novel concept to me). I've met and spoken with my advisor and 2 other professors with experience in related fields, and all is encouraging; I have a graduate school in mind, I've received lots of great advice on preparing for school (on this forum and in person), I test well (no GRE fears remain), good grades/class rank, good prospects for future strong referal letters, etc - a comparitively charmed existence for which I am very grateful! I just have to investigate whether I can make it through with an intact, cared for family!  Any guidance you could provide me, and other aspiring "non-traditional" students alike, would be appreciated immensely - thank you! Cycles in SHA-256 Let's say I start with a particular 256 bit value. Call this $v$. I then hash that value, and get another 256 bit value. Call this $\text{SHA256}(v)$. I take this value and get another 256 bit value. Call this $\text{SHA256}^2(v)$. More generally, let's call the result of hashing $v$ repeatedly $n$ times $\text{SHA256}^n(v)$.  Now my question is, how big will $n$ be, such that $\text{SHA256}^n(v) = v$?  It would seem to me, that if it's a giant sort of permutation, $n$ would have to be $2^{256}$, is that correct? Is that provable, or is there any information on this? (Just curiosity, really.)  Another question I had was, do all 256 bit strings have unique SHA256 values, and is there a way to show that? (Or, stated differently, can it be shown that there are no SHA-256 collisions in the language of all "256 bit strings"?) Can you be tripped by an AoO while standing up? Python program to calculate harmonic series Does anyone know how to write a program in Python that will calculate the addition of the harmonic series. i.e. 1 + 1/2 +1/3 +1/4... Alpha over layers but maintain environment background