Why my code outputs false, what happens at if(c>b>a)?
Math-like chaining of the comparison operator - as in, "if ( (5<j<=1) )"
What is the equation for the tension on the ends of a cable suspended at different heights? I'm looking for an equation to find the tension on the ends of a cable suspended between two poles (one higher than the other) with no load but the cable itself.    I determined that the tension would be different on each end, that the shape of the suspended cable would be a  truncated at one end, and that the following would be the variables necessary in the equation:   cable weight cable length vertical distance between ends horizontal distance between ends   Some links that could be helpful: I'm trying to build a datapack that lets you craft xp bottles from glass bottles at the expense of 7 xp per bottle (because they drop 3 to 11 xp so the average is 7). I have almost everything working except for a check for if they have too little xp. If they have 7 or less xp, I would like to remove one bottle of enchanting from their inventory and give them one glass bottle, because the function for removing xp is called after they've crafted one and a scoreboard has counted it. My remove function currently looks like this:  #create dummy scoreboard to multiply bottles crafted by seven to get xp to be removed scoreboard objectives add 7xp dummy scoreboard players set @s 7xp -7 scoreboard players operation @s xpCrafted *= @s 7xp  #how do I get the value in xpCrafted into the command to remove xp? xp add @s -7 points  #cleanup scoreboard players reset xpCrafted scoreboard players reset 7xp scoreboard players set @e xpCrafted 0 scoreboard objectives remove 7xp   And my tick function like this:  execute as @e[scores={xpCrafted=1..}] at @s run function craft_xp:removexp   As the inline comment says, how do I get that value in xpCrafted into my xp removing command, and also how should I check to make sure the player has enough xp for the operation in the tick command (or elsewhere)? Presumably I would run a different command to remove the extra bottle if they didn't have enough xp, but I don't know how because there doesn't seem to be any type of if/else structure in commands. Finally, should a question like this be in two different questions or is one ok on this forum? Make 15 lines / ticks with Photoshop, each of them rotated of 20° What is the name of the vertical bar in $(x^2+1)\vert_{x = 4}$ or $\left.\left(\frac{x^3}{3}+x+c\right) \right\vert_0^4$? I've always wanted to know what the name of the vertical bar in these examples was:  $f(x)=(x^2+1)\vert_{x = 4}$ (I know this means evaluate $x$ at $4$) $\int_0^4 (x^2+1) \,dx = \left.\left(\frac{x^3}{3}+x+c\right) \right\vert_0^4$ (and I know this means that you would then evaluate at $x=0$ and $x=4$, then subtract $F(4)-F(0)$ if finding the net signed area)  I know it seems trivial, but it's something I can't really seem to find when I go googling and the question came up in my calc class last night and no one seemed to know. Also, for bonus internets; What is the name of the horizontal bar in $\frac{x^3}{3}$? Is that called an obelus? Better way of saying "those who are curious"? I am writing a note in which I want to ask (curious) readers to refer another paper. The phrase curious minded comes to mind, but it seems somewhat awkward.  Is there a better way to convey similar import? Looking for a SF story regarding women growing things in their wombs I'm looking for the title and author of a short story or novelette that I read quite some time ago.   The main characters are two young women. One is taking correspondence courses, and is constantly being berated by the other one for hoping to rise above her station. They go out to pick up young men, to sleep with them, to get pregnant.  It's not a normal sort of pregnancy, though. The men have some sort of 'coded semen' which grow something other than a child in the woman's womb. It ends up being a product of some kind, which earns the woman money when it is 'born'. The one woman is very careful about who she chooses, as she can only do this so many times. The other... isn't so careful.   At the end, the careful, studious woman achieves what she has been working for - a letter from a government organisation that permits her to become the mother to a human being.  Thank you for reading my question. I've been looking for this story for years, now. Dual boot Ubuntu (14.04) with Windows 10 Proving by strong induction that $\forall n \ge 2, \;\forall d \ge 2 : d \mid n(n+1)(n+2)...(n+d-1) $ If $|f(z)|\leq |f(z^2)|$ on the unit disk, show that $f$ is a constant function. Suppose $f$ is holomorphic in the unit disk $D=\{z: |z|&lt;1\}$ and $|f(z)|\leq |f(z^2)|$ on $D$. Show that $f$ is a constant function.   My Try:  I wanted to use Strong Maximum Principle, but failed to prove that $f$ is bounded on $D$. I want to try this problem in my own. Can anybody please give me just a hint? Java Serialization with non serializable parts I have:  class MyClass extends MyClass2 implements Serializable {   //... }   In MyClass2 is a property that is not serializable. How can I serialize (and de-serialize) this object?  Correction: MyClass2 is, of course, not an interface but a class. Are there any valid reasons to not rollover a former 401(k) when changing jobs?  I have several little ones that I never quite got around to rolling together - with an upcoming job change, should they all be combined into my new employer's retirement plan?  If not, what else might be considered? How to delay or slowly loop commands? How should I phrase an important question that I need to ask a professor? Catenatives followed by infinitives and gerunds I've done a clean install of 18.04 and I can't open desktop folders, not even the desktop trash can. Anybody else had this issue? I click on the desktop folders (double click) and nothing happens.  Strange enough, I can open  them when using Nautilus and going to home\stackinator\desktop\ or whatever the path is (can't remember at this point). When should you use WP_Query vs query_posts() vs get_posts()? It seems like half the tutorials in the  and around the blogosphere use  and half use . They all do similar things, so when should I use one over the others? Why the following example prints "0" and what must change for it to print "1" as I expected ?  #include &lt;iostream&gt; struct base {    virtual const int value() const {       return 0;    }    base() {       std::cout &lt;&lt; value() &lt;&lt; std::endl;    }    virtual ~base() {} };  struct derived : public base {    virtual const int value() const {       return 1;    } };  int main(void) {    derived example; } How to change css property using javascript Expectation of a function of a random variable from CDF Is it possible to calculate the expectation of a function of a random variable with only the the r.v.'s CDF? Say I have a function $g(x)$ that has the property $\int_{-\infty}^{\infty}g(x)dx \leq \infty $ and the only information I have about the random variable is the CDF.  For example, I have a scenario where there are three timers that can be modeled as exponential random variables $X_1,X_2,X_3$ with rate parameters $\lambda_1,\lambda_2,\lambda_3$ respectively. For each moment in time I earn a reward according to some reward function $g(x)$. That is, my reward for waiting until time $t$ can be written as $\int_0^tg(x)dx$. However, $g(x)$ experiences diminishing returns so the the marginal reward received from waiting one second at $t=0$ is greater than one second at say $t=27$. This 'game' ends when one of two things happens. Either both timers $X_1$ or $X_2$ must ring or timers $X_1$ or $X_3$ must ring. I'm trying to find the expected reward of playing this game.  Currently I can calculate the the CDF of the random variable modeling the time until the game ends, but I dont know how to use this information to when what I really need is reward associated with this time.  So far I have the additional random variables: $$ W_{12}=\max(X_1,X_2) \quad W_{13}=\max(X_1,X_3) \quad Z=\min(W_{12},W_{13})$$ Also let $F_i(x), i\in \{1,2,3\}$ denote the CDF of $X_i$ The CDF of $Z$, can be written as: $$F_Z(t) = F_1(t)F_2(t) + F_1(t)F_3(t) - F_1(t)F_2(t)F_3(t)$$  I know when a random variable takes on non-negative values, you can use a shortcut to calculate the expectation using the CDF. That is, $E[X] = \int_0^\infty F(X\geq x)dx$. Is there something similar I could use for a function of a random variable, or is it necessary to compute the pdf of $Z$ first to compute $\int_0^\infty g(t)f_z(t)dx$ Should smilies be turned into images in questions and answers? A lot of mention has been made of the seriousness of Stack Overflow (and presumably Server Fault). Would it be a good idea to turn  :-) into actual images as per  in questions and answers?