For some reason whenever I go to my command line this is what I see next to my cwd:    I few days back I got an error message that said I had a merge conflict. I didn't know what this meant so I stopped trying to commit. Now whenever I go onto the git terminal I see (master|MERGING). And whenever I try to commit (even when it's not on the same remote) I get a lengthy error:    It says to fix the error but I'm not sure how to go about that. What exactly do I need to do?

I used git pull and had a merge conflict:  unmerged:   _widget.html.erb  You are in the middle of a conflicted merge.   I know that the other version of the file is good and that mine is bad so all my changes should be abandoned. How can I do this?


Let $A = (-1/2, \sqrt{3}/2)$, $B = (1/2, \sqrt{3}/2)$, and $P = (a, 0)$. Then $P$ is a point on the $X$-axis and we are looking for all possible values of $d = PA - PB$. By the Triangle Inequality, $PA - PB < AB = 1$. And it is clear that all the values $-1 < d < 1$ are indeed obtainable. In fact, for such a $d$, a half hyperbola of all points $Q$ such that $QA - QB = d$ is well defined. (Points $A$ and $B$ are foci of the hyperbola.) Since line $AB$ is parallel to the $X$-axis, this half hyperbola intersects the $X$- axis, i.e., $P$ is well defined. I know that at point $A$ and $B$ the two above $\sqrt{\cdot}$ function will obtain minimum value respectively I am not able to understand why are we looking for all the possible value of $d$, what is the relationship of $d$ with the possible value of $x$? This is question number 14 from 101 problems in algebra (USAIMO)

Let $x=\sqrt{a^2+a+1}-\sqrt{a^2-a+1},x\in \mathbb R$. Find range of possible values of $x$.  I tried drawing the graph and obtained this: Through which the answer came out to be $(-1,1)$. What should be the procedure through algebra?


Let A an algorithm with polynomial time, which receives an graph G and returns the stable set SA(G) of G with the property:  α(G)−|SA(G)|≤k, for a constant k∈N  Prove that A can be used for determining , in polynomial time, a stable set of maximum cardinal in a given graph.  Can you help me ? I need all solution....

Let $A$ an algorithm with polynomial time, which receives an graph $G$ and returns the stable set $S_A(G)$ of $G$ with the property:  $$ \alpha(G) - |S_A(G)| \le  k, $$ for a constant $k\in N$    Prove that $A$ can be used for determining , in polynomial time, a stable set of maximum cardinal in a given graph.  I have tried by taking $T$ isomorphic copies of the graph and I have tried to extend the graph. But I get stuck at this point, can you give me some hints?


Why is there a need to include the header file of a class into the implementation file of the same class?? Does it serve a purpose??  Since i thought it is needed only where we need to use that class.

Why does C++ have header files and .cpp files?


Bioinformatician here. I'm wondering what the main differences between both of these approaches is. I just want to clarify that a formal mathematical treatment would likely be too much for me.   From what I can tell, a GLM does not assume a normal distribution of response variables. Am I to infer that an LM does? What other important differences are there? If the distribution is normal, would an LM and GLM give the same results? I don't know enough to ask any more questions but would welcome any other details you think are important.

Specifically, I want to know if there is a difference between lm(y ~ x1 + x2) and glm(y ~ x1 + x2, family=gaussian). I think that this particular case of glm is equal to lm. Am I wrong?


What is the best way to parse parameters in shell script command, and then validate it?  For example bash someScript.sh -p <some_path> -o <some_other_param> -i (User forget to provide value).  How to parse all of this parameters and when user forget to input some parameters or value of this parameter show some error message and terminate executing of script?

I wish to have long and short forms of command line options invoked using my shell script.  I know that getopts can be used, but like in Perl, I have not been able to do the same with shell.  Any ideas on how this can be done, so that I can use options like:  ./shell.sh --copyfile abc.pl /tmp/ ./shell.sh -c abc.pl /tmp/   In the above, both the commands mean the same thing to my shell, but using getopts, I have not been able to implement these?


I am having a tough time understanding the difference between both terms. Could someone please clear up what both terms mean and in the process of doing so, explain the difference between them?

Following up on this question, , which addresses the issue of explaining covariance to a lay person, brought up a similar question in my mind.  How would one explain to a statistics neophyte the difference between covariance and correlation? It seems that both refer to the change in one variable linked back to another variable.  Similar to the referred-to question, a lack of formulae would be preferable.


It's a common convention in web form design to mark required fields with an asterisk.  Is there any way to denote that one  of  a  pair of fields is required?  In other words, a form like this:         – Wireframes created with   Where either email or phone is required, but not necessarily both?  The best I can think of is simply text that says "you must enter one of these".  Is that the only way to go?

In a contact form, I need either their number or email. I've thought of these ways:   Have field label be "Email or Tel #", or "Email / Tel #" Have the above, but placeholder text in the input saying "Either one is fine" Have the label be "Contact me by" and then have a dynamic message appear (Twitter style) when the field is put in focus Have a select box saying with label "Contact me by" and options "Phone", "Email". When one is selected, an input element below it will be revealed -- respectively Phone and Email   Which, if any, would you consider user-friendly if you were visiting a site?


Let $\mathbf{X} = (X_1, \dots, X_p)^\mathsf{T}$ be a $p$-dimensional random variable following a multivariate normal distribution with mean vector $\boldsymbol{\mu}$ and covariance matrix $\boldsymbol{\Sigma}$, i.e. $\mathbf{X} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma})$. Let $X_{(1)}$ the minimum of the components of $\mathbf{X}$, that is to say, $X_{(1)} = \min\{X_1,\dots,X_p\}$. What are the cumulative distribution function (cdf) and the probability distribution function (pdf) of $X_{(1)}$? I've read about the distribution of the maximum  and also . I guess that both concepts must be tightly connected, since $\min\{x_1,\dots,x_p\} = - \max\{-x_1,\dots,-x_p\}$. However, I still have doubts. I read this expression somewhere, but I think it is not totally right, or at least I am not able to deduce it by my own:  The cdf of $X_{(1)}$ is $F(x) = G\left( x \mathbf{1}_p \;|\; -\boldsymbol{\mu}, \boldsymbol{\Sigma}  \right)$, where $\mathbf{1}_p = (1,\dots,1)^\mathsf{T} \in \mathbb{R}^p$ and $G$ is the cdf of a multivariate normal distribution $\mathbf{X}$, that is to say, $G(\mathbf{x}) = \mathrm{Pr}(\mathbf{X} \le \mathbf{x}) = \mathrm{Pr}(X_1 \le x_1 \;\;\text{and}\;\; \cdots \;\;\text{and}\;\; X_p \le x_p)$ .  I have tried to reproduce this result, but all I get is this: $F(x) = \mathrm{Pr}(X_{(1)} \le x) = \mathrm{Pr}(X_1 \le x \;\;\text{or}\;\; \cdots \;\;\text{or}\;\; X_p \le x) = $ $1 - \mathrm{Pr}(X_1 > x \;\;\text{and}\;\; \cdots \;\;\text{and}\;\; X_p > x) =$ $1-\mathrm{Pr}(- X_1 < -x \;\;\text{and}\;\; \cdots \;\;\text{and}\;\; -X_p < -x)$, and I do not know how to continue. I know that, if $\mathbf{X} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma})$, then $-\mathbf{X} \sim \mathcal{N}(-\boldsymbol{\mu}, \boldsymbol{\Sigma})$. And this is all I am able to figure out.  EDIT: I've been told that my question is already answered , but I admit that I am not able to deduce the answer to my question from this other post, and that is why I would like to reopen my question.

Given a $n$-dimensional multivariate normal distribution $X=(x_i) \sim \mathcal{N}(\mu, \Sigma)$ with mean $\mu$ and covariance matrix $\Sigma$, what is the probability that $\forall j\in {1,\ldots,n}:x_1 \geq x_j$?


Why is the k silent in: known /nəʊn/; knife /nʌɪf/, and knight /nʌɪt/?  What does this specify?And what is k doing there if there is no need to pronounce it?

Why have a letter in a word when it’s silent in pronunciation, like the b in debt?  Can anyone please clarify my uncertainty here?


I need to round significant digits of doubles. Example Round(1.2E-20, 0) should become 1.0E-20  I cannot use Math.Round(1.2E-20, 0), which returns 0, because Math.Round() doesn't round significant digits in a float, but to decimal digits, i.e. doubles where E is 0.  Of course, I could do something like this:  double d = 1.29E-20; d *= 1E+20; d = Math.Round(d, 1); d /= 1E+20;   Which actually works. But this doesn't:  d = 1.29E-10; d *= 1E+10; d = Math.Round(d, 1); d /= 1E+10;   In this case, d is 0.00000000013000000000000002. The problem is that double stores internally fractions of 2, which cannot match exactly fractions of 10. In the first case, it seems C# is dealing just with the exponent for the * and /, but in the second case it makes an actual * or / operation, which then leads to problems.  Of course I need a formula which always gives the proper result, not only sometimes.  Meaning I should not use any double operation after the rounding, because double arithmetic cannot deal exactly with decimal fractions.  Another problem with the calculation above is that there is no double function returning the exponent of a double. Of course one could use the Math library to calculate it, but it might be difficult to guarantee that this has always precisely the same result as the double internal code.  In my desperation, I considered to convert a double to a string, find the significant digits, do the rounding and convert the rounded number back into a string and then finally convert that one to a double. Ugly, right ? Might also not work properly in all case :-(  Is there any library or any suggestion how to round the significant digits of a double properly ?  PS: Before declaring that this is a duplicate question, please make sure that you understand the difference between SIGNIFICANT digits and decimal places

If I have a double (234.004223), etc., I would like to round this to x significant digits in C#.  So far I can only find ways to round to x decimal places, but this simply removes the precision if there are any 0s in the number.  For example, 0.086 to one decimal place becomes 0.1, but I would like it to stay at 0.08.


I am reading a book about Number Theory as a new learner.  The book has proved that all primes of the form $4k+1$ can be represented by the sum of two squares.  This question is given as exercise and I truly have no idea for the solution.  The only thing that I found may be helpful is that one of the squares is even and one is odd.  Thanks for any help ^_^    Edit: About duplication, I suppose that question is about the process in a specified proof.  Will Jagy has given a complete proof.  Thanks so much for the answer!

I'm reading a proof in my number theory textbook that all primes of the form $p = 4k+1$ are uniquely the sum of two squares. I'm stuck right at the beginning of the proof, where they say:  To establish the assertion, suppose that $$ p = a^2 + b^2 = c^2 + d^2 $$ where $a,b,c,d$ are all positive integers. Then $$ a^2 d^2 - b^2 c^2 = p(d^2 - b^2). $$  Perhaps I'm just missing something obvious, but I can't figure out how they managed to conclude that $a^2 d^2 - b^2 c^2 = p(d^2 - b^2).$ Please advise.


I'm trying to create a simple binary to decimal converter for my CS class to get a little extra credit. We only use Java in my class, so I'm making it on the Java platform. I've set up a homepage to call my class methods from to make it easier for me when I have multiple classes for the lessons I learn in the CS class. I'm calling my first method, stringSplit, which takes the binary value given as the argument, converts it to a String, then uses .substring to slice it up into each bit. It sets each bit to a variable to be later analyzed. Next, it runs through my bi2decFunctions method. This is what I have here:  public static void bi2decFunctions(String num128, String num64, String num32, String num16, String num8, String num4, String num2, String num1){     int num128Return;     int num64Return;     int num32Return;     int num16Return;     int num8Return;     int num4Return;     int num2Return;     int num1Return;      System.out.println(" " + num128 + "   " + num64 + "   " + num32 + "   " + num16 + "   " + num8 + "   " + num4 + "   " + num2 + "   " + num1);     //128     if(num128 == "1"){         num128Return = 128;     } else {         num128Return = 0;     }     //64     if(num64 == "1"){         num64Return = 64;     } else {         num64Return = 0;     }     //32     if(num32 == "1"){         num32Return = 32;     } else {         num32Return = 0;     }     //16     if(num16 == "1"){         num16Return = 16;     } else {         num16Return = 0;     }     //8     if(num8 == "1"){         num8Return = 8;     } else {         num8Return = 0;     }     //4     if(num4 == "1"){         num4Return = 4;     } else {         num4Return = 0;     }     //2     if(num2 == "1"){         num2Return = 2;     } else {         num2Return = 0;     }     //1     if(num1 == "1"){         num1Return = 1;     } else {         num1Return = 0;     }     System.out.println(" " + num128Return + "   " + num64Return + "   " + num32Return + "   " + num16Return + "   " + num8Return + "   " + num4Return + "   " + num2Return + "   " + num1Return);     bi2decDisplay(num128, num64, num32, num16, num8, num4, num2, num1, num128Return, num64Return, num32Return, num16Return,             num8Return, num4Return, num2Return, num1Return); }   Each time I run this, the correct values for my 8-bit input shows up, but the num(1-128) return variables all equal 0. The 'if' statements aren't even affecting the outcome of them. Anyone have any idea?  I'd also like to present this to my CS class, so I'd like a 1-10 scale on the neatness and quality of my code.

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?


I have base ip address 10.6.0.0/16. I need to divide this network into 12 subnets, and I need at least 80 computers in one network. Please explain how to calculate correctly subnets. I understand that subnets count should be power of two, so the nearest is 16. But I don't understand what should I do next. Please explain. Thanks.

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


I am trying to find the Frenet frame of the following curve:  $$\zeta(t)=\left(\frac13(1+t)^{3/2},\frac{1}3(1-t)^{3/2},\frac{t}{\sqrt2}\right)$$  How do I do this? Is there a straightforward way from the curvature and Torsion? I can't find the definition anywhere.

I am trying to find the curvature and normal vector for $$\alpha(t) = \left(\frac13 (1+t)^{3/2}, \frac13 (1-t)^{3/2}, \frac{t}{\sqrt2}\right)$$  $$\alpha'(t) = \left(\frac12 (1+t)^\frac12 , - \frac 12 (1-t)^\frac12, \frac{1}{\sqrt2}\right)$$ $$\|\alpha'(t)\|=\sqrt{\frac14 (1+t) + \frac 14(1-t) + \frac12}=1$$  This is an Arclength parameterization, so we don't need chain rule for the frenet equations:  Curvature is given by $\|\alpha''(t)\|$  $$\alpha''(t) = \left(\frac14 (1+t)^{-\frac12} , \frac 14 (1-t)^{-\frac12}, 0\right)$$ $$=\frac14 \left((1+t)^{-\frac12} , (1-t)^{-\frac12}, 0\right)$$ $$k(t)= \|\alpha''(t)\|=\frac14 \sqrt{(1+t)^{-1} + (1-t)^{-1}}$$ The normal vector $n(t)=\frac{\alpha''(t)}{k(t)}= \left(\frac{1}{\sqrt{-\frac{2}{t-1}}}, \frac{1}{\sqrt{\frac{2}{t+1}}},0\right)$ isn't orthogonal to $\alpha'(t)$ though? What have I done wrong?


Background: I was solving this inequality: $(1-4x)^{-1}\geq 7$. I did it as follows: $$ \begin{array}{l} \quad(1-4 x)^{-1} \geq 7 \\ \Rightarrow \frac{1}{1-4 x} \geq 7 \\ \Rightarrow \frac{1}{7} \geq 1-4 x \\  \quad\left[\begin{array}{l} 1-4 x \neq 0 \text { and is  positive as if }\\  \frac{a}{b}>0  \text { and } a>0 \Rightarrow b>0.\\ \text {Hence I can multiply} \text{the sides with 1-4x,}\\ \text{without reversing sign. } \end{array}\right] \\ \Rightarrow \frac{-6}{7} \geq-4 x \\ \Rightarrow x \geq\frac{6}{28} \\ \Rightarrow x \geq\frac{3}{14} \\ \therefore \text { Soln set }=\left[\frac{3}{14}, \infty\right) \end{array} $$ But this is not the answer; the answer is: $ \left\{x \mid \frac{3}{14} \leq x<\frac{1}{4}\right\} \text { or }\left[\frac{3}{14}, \frac{1}{4}\right) $ After thinking some time I realised that the other end point can be found if we solve the question as follows: $$ \begin{aligned} & \frac{1}{1-4 x} \geq 7 \\ \Rightarrow & 1-4x>0 \quad[\text { The reason is same }] \\ \Rightarrow & x<\frac{1}{4} \end{aligned} $$ Question: This post has two main questions: First question: I know that the maximum number of roots an equation, in one variable of any degree, can have, will be same as its degree. So for the inequalties, how could I be sure that I have found all the end point(s)? In some question the solution set is union of other two disjoint sets, So in this cases how could I be sure that I have found all the disjoint sets? For this specific question, how could I be sure that this is finally the solution set? Can't it be that the author(of the book the problem is from) missed considering other inequalities, like me, which could have given us another set(s), so finally the answer would be union of those sets? So I can sum up the above question in this question: How to know that we have found the correct solution set of an inequality? Second question: Adding, subtracting and multiply(by non-zero number/polynomial) both side by same number/polynomial always led us to equivalent equation and inequality. In this case I multiplied by $1-4x$, which I know for sure is not zero. So according to the logic I must get an equivalent inequality i.e. the solution set of the new inequality must be same as that of the original inequality, but apparently this is not the case with this question i.e. solution set of $(1-4x)^{-1}\geq 7$ is not same as that of $\frac{1}{1-4x}\geq 7$. Why? I can get the correct answer by solving as others have mentioned in the answer, but, the second question is, why is "my method" not working?

I understand that the expressions on both sides of an equal sign are the same entity, and I know that when you modify one side, the other must be changed because it is referring to the same thing. What I do not understand is why making a new equation (adding or taking away from an expression) allows one to know what an unknown represents. What about equations lets us do this?


I'm writing a script to print resolutions of my media files using MediaInfo. I hard coded the marvel directory in just for testing and getting the cuts right.   Code:  #!/bin/bash  for i in /mnt/D/tv/"Marvel (MCU)"/{*.mp4,*.mkv,*.avi,*.m4v}; do      mediainfo "$i" > temp     H=`cat temp | grep "Height" | cut -d ":" -f 2 | cut -c 2- | cut -d "p" -f 1`     W=`cat temp | grep "Width" | cut -d ":" -f 2 | cut -c 2- | cut -d "p" -f 1`     printf "%-50s %s x %s \n" "$(basename "$i")" "$W" "$H"     rm temp done   Output:  1. Iron Man.mp4                                    1 920  x 800   10. Guardians of the Galaxy.mp4                    1 280  x 536   ...  8. Thor The Dark World.mkv                         1 920  x 800   9. Captain America The Winter Soldier.mkv          1 280  x 534   *.avi                                               x   *.m4v                                               x     There are only .mp4 and .mkv files in this folder, so it printed "*.avi" and "*.m4v." How can I suppress the printing of the extensions that it didn't find?

I was trying to write a shell script that will take a directory path d as an argument and recursively print a depth indented list of all files and directories in d. However, the argument d is optional and if no argument is given, a depth indented list of all files and directories in the current  directory will be printed. Here is my code: # the method for tree  myspace="" spaceCount=0 tree(){        cd "$1"   for i in *; do     if [ -d "$i" ]; then       echo -n "|"          for (( j=0;j<spaceCount;j++ ))        do          echo -n "$myspace"         done       echo "--$i"       spaceCount=$((spaceCount+1))        myspace="  |"       tree "$i"     else       echo -n "|"       for (( j=0;j<spaceCount;j++ ))        do          echo -n "$myspace"         done       echo "--$i"     fi   done   cd ../   spaceCount=$((spaceCount-1)) }   if [ "$1" != "" ]; then   file="$1" fi echo ".$file" tree "$file"  But when a folder is empty, it's printing a star like this: How can I solve the problem?


In the scene in Voldemort's father's graveyard, it is implied that all the Death Eaters there ever were (with Dark Marks) have a place in the circle, and it is further implied that only 3 died while working for Voldemort.  Can reasonable guesses be made as to who those three were, and is it really possible that there were no other losses by the Death Eaters?

From GoF scene where Death Eaters are returning after Voldemort's return, there seems to be VERY few of them (don't recall exact # but my impression was between a dozen and two dozen).   Also, Order of Phoenix seems to have fairly few members as well.  These are probably the "officer/elite corps" of the bigger fight. Is there any estimate of how many actual participating fighters were there on both sides in the original conflict? I'm fine with either human-only totals, or overall (e.g. count giants on Voldemort's side).  On the Death Eater side, you can count/not count Imperioused people if any info like that is available.


Prove that if $\displaystyle \lim_{x \to \infty} f(x)$ and $\displaystyle \lim_{x \to \infty} f'(x)$ are both real numbers, then $\displaystyle \lim_{x \to \infty} f'(x) = 0$.   Attempt  Intuitively this makes sense to me. Take $y = x$. This slope is constant but it increases arbitrarily, and it seems that we can't make both the slope and value of $f(x)$ to be real numbers without "flattening" out the graph. I tried first saying $\displaystyle \lim_{x \to \infty} f(x) = a$ and $\displaystyle \lim_{x \to \infty} f'(x) = b$. Then we might be able to do something with the L'Hospital's rule.

I've been trying to solve the following problem:  Suppose that $f$ and $f'$ are continuous functions on $\mathbb{R}$, and that $\displaystyle\lim_{x\to\infty}f(x)$ and $\displaystyle\lim_{x\to\infty}f'(x)$ exist. Show that $\displaystyle\lim_{x\to\infty}f'(x) = 0$.  I'm not entirely sure what to do. Since there's not a lot of information given, I guess there isn't very much one can do. I tried using the definition of the derivative and showing that it went to $0$ as $x$ went to $\infty$ but that didn't really work out. Now I'm thinking I should assume $\displaystyle\lim_{x\to\infty}f'(x) = L \neq 0$ and try to get a contradiction, but I'm not sure where the contradiction would come from.   Could somebody point me in the right direction (e.g. a certain theorem or property I have to use?) Thanks


My computer is a lenovo and I have windows 8.1 installed and was wondering if there is a way to boot my PC with Ubuntu without a disc or flash drive.  I just want to try it out since I don't like the way my PC runs with 8.1. If I like the way Ubuntu runs and looks I would like to Install it without a disc or Flash drive. Let me know if this is possible.  Thanks,

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I own a Vittoria Rubino Pro Slick 700x23 and a Conti GP4000S 700x25.   What do you guys think about:   mounting different tires on a bike? which tire should go where? The Vittoria has around 200 miles on it and Conti has less than a 100.

My used bike came with different front and rear tires. It appears to have some kind of Kenda commuter tire in the front, and Continental Country Ride in the rear. They are both the same size (700x28).  Is this perfectly acceptable or should a bike always have matching models (and/or size)?  My main concerns from mismatching tires:   Grip thresholds may be inconsistent Ride comfort?  Wear rates (but rears seem to wear faster anyway)


I have an object with an armature and I want the limbs on both sides to be symmetrical.  I rigged the object using Mixamo's autorigger because it performs much better than blender could. However the Vertex weights are not symmetrical. In fact: on the left limbs I can see some vertex distortions and the limbs on the left side are bending a bit differently than the right limbs.  I know it's due to the Vertex weight because I can clearly see it in "Weight Paint" mode. The limbs on the right side are perfect! Is there a way how I can copy all vertex groups which define the weightings on the right side and apply them to the left side of the limbs (with their own vertex group name for the left limbs)?  Don't worry, the object is symmetrical and the bones that were created by Mixamo are also symmetrical so I just need to make the weights also symmetrical.

I solved my other problem and I finally got it to deform to an acceptable level. However now I'm having trouble, I forgot to activate x-mirror when weight painting and I got the weights right on one side but I can't or don't know how I can transfer it over to the other side. I want to transfer the weight of thigh.L to thigh.R so is there anyway I can do this?


if(txtValueUIT.getText()==null || txtValueDolar.getText()==null || txtValueUIT.equals("") || txtValueDolar.equals("")) JOptionPane.showMessageDialog(null, "You have not entered both values", "Error", JOptionPane.ERROR_MESSAGE);   What I try to do is to show the Error Message when the JTextFfields are empty or null.  I am using if and it shows no bugs but when testing it it simply won't show the message when it is supposed to do it.  *It seems it doesn't perform any action at all because the code that follows in that method, when there is a value missing in those JtextFields, won't be processed. *  The code that follows is a setText to another component using as parameters Strings that get the Text from the JTextFields  By the way:  if(e.getSource() == btnRefresh) //I added the button with an action listener refreshValues(); //this contains the code with the JOptionPane

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?


I need help installing VMWare player on my Ubuntu 12.10 system because I am having problems installing VirtualBox

I can't install VMwarePlayer 4.0.3 on Ubuntu 12.04 64Bit. For Version 4.0.2, I found a script that I have to run to patch VMware Player for it to work on my system to properly, and after that I could install 4.0.2.  Is there an similar solution for Version 4.0.3?


trigger ActiveCountContactOnAccount on Contact (after INSERT, after UPDATE, after DELETE , after UNDELETE) { Set <Id> accountIds = new Set <Id>(); List <Account> lstAccountsToUpdate = new List <Account>();  if(Trigger.isInsert || trigger.isUnDelete){     for(Contact con:trigger.new){         accountIds.add(con.accountID);     } }else{     for(Contact con:trigger.old){          accountIds.add(con.accountID);              } } list<Account> lst = [SELECT Id,Name,Active_Contact_Count__c,(Select Id from Contacts where Status__c = 'Active') from Account where Id IN: accountIds]; for(Account acc:lst){     Account accObj = new Account ();     accObj = acc;     accObj.Active_Contact_Count__c = acc.Contacts.size();     lstAccountsToUpdate.add(accObj); } if(!lstAccountsToUpdate.isEmpty()) UPDATE lstAccountsToUpdate; }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


Does anyone know where to get the newest version of cowpatty? I've typed the following:   wget http://wirelessdefence.org/Contents/Files/cowpatty-4.6.tgz   but it comes back with 'error 404 file not found'.

I'm trying to install Wifite from , but I can't install cowpatty.  See below:  root@vitor-hp:~# apt-get install cowpatty Reading package lists ... ready Building dependency tree Reading state information ... ready E: Could not find package cowpatty root@vitor-hp:~#    Translated from Portuguese  I use Ubuntu 13.10 64-bit.


If I start writing up a question, and the very process of organizing my thoughts into a form appropriate for StackOverflow causes me to figure out the answer on my own, what is the appropriate thing? (Assuming the answer is more complicated than a syntax error or "I wrote > when it should have been >= etc.)   Delete whatever I have of the question draft Convert the question into "answer your own question, Q&A style" It depends on whether me figuring it out was because I got better organized or because I saw a suggested question that answered my question (and thus I would be posting a duplicate)? It depends on my confidence level in the solution I figured out on my own Other

I don't know how many of you have experienced the  principle when posting questions on SO, but I know I have on a few occasions. And then I just discard my question. So here's the question:  Should we go ahead and post the question?  Of course if it's something stupid like forgetting a semicolon, etc., I would say no... but there are several occasions, like if a data structure doesn't make sense, that at least someone would eventually benefit from the question/answers.  And if you should ask the question, how would you recommend choosing an answer for it?


I edited the only answer to a question I asked, and the edit was rejected.       It seems like a very fair edit to me. The guy has the right answer in there, and should get credit for it, but to find the right answer, you have to dig to the bottom.   He also answers several questions I did not ask when I specifically stated in my question I did not ask. This leads to confusion for folks finding this question later.   I tried to clarify by moving the correct portion of his answer to the top and marking the rest as "Background Information". The diff tool makes it seem like a lot has changed, but it's mainly moving the answer to the top. I wonder if the rejection was from a quick glance instead of an actual read.  I want to accept his answer, but can't in its current form, as it muddies the waters around GPS to UTC leap seconds vs Unix epoch to GPS epoch.  Is there a rejection review process?

Introduction  I was tempted to make an historic novel of this question, but decided against it, since someone might not understand the subtle quality of the novel I was about to write.  History  I was checking the  for some civic duty, more specifically Question without Answers section. I looked for question that needed some kind of action (comment asking for clarification, edits, tagging, voting, flagging, etc.), and stumbled upon . It was a good question (but with lack of formatting) and was edited previously, but what struck me more was the fact that it has an answer.  Decision making  I analyzed the question deeply, read the comments and I decided that I could take 3 actions:   Comment again and hope OP takes action. Edit the question and add an answer as community wiki. Flag for moderation.   I rationalized that (1) will not achieve anything since comments already tried 3 times to make OP pay attention (in 2009, 2012 and 2013) and make a proper answer. (3) Was a bit too much, since the problem was actually simple and no something that could trigger alien invasion. So, I did (2), based in a previous question about "" in Meta U&L.  Taking action  So, created the answer as Community wiki (Simonatmso.net raised concerns about what I was trying to do but even so failed to review the edit), and  to delete the answer embedded to the question and did some light grammar check. But 3 out 4 seemed that didn't noticed what was going on (lack of coffee? too many reviews at the same time?) and rejected the edit with "This edit changes too much in the original post; the original meaning or intent of the post would be lost". I couldn't catch how the OP change the meaning if the changes were introduced by  and I was just giving closure to the question.  As you all can notice (or I hope so), it was too odd that 3 different persons, in the same situation, did the same action even when they were in wrong (I attribute this to the lack of coffee). So, please offer more coffee to reviewers, or they are given enough so need something even more powerful (energy drinks?).  If I was in wrong, I do apologize for making you all waste your time reading my rant, but any answer (guidance) is always welcomed.


I have a Villager, rigged and everything, and when I copied him, the two were, exactly alike. Like expected. But when I tried to change the texture on one, the texture on both changed. I tried adding another texture to the object, but whatever I do, they stay the same. Its like they are the same object, just separated. How can I change this? I tried to make a "share the blend" file but it says it was too big.

I am working on creating a hammer in Blender, but I am having a problem. I separated the hammer and the handle into two separate objects, but when I apply textures to one of the items, it applies the texture to both objects. I used P and then selection to separate the two pieces.


I'm getting  java.lang.NoClassDefFoundError:org/openqa/selenium/logging/LoggingHandler on initiating a new web driver instance on using the latest Selenium version 3.141.59 <dependency>         <groupId>org.seleniumhq.selenium</groupId>         <artifactId>selenium-java</artifactId>         <version>3.141.59</version>     </dependency>  This error wasn't encountered when I did used a very older version of Selenium ie 2.53.0. Following is my piece of code where the error was occuring. WebDriver driver; System.setProperty("webdriver.chrome.driver", "*driver path*"); ChromeOptions chromeOptions = new ChromeOptions(); DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability(ChromeOptions.CAPABILITY,chromeOptions); driver = new ChromeDriver(chromeOptions);

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


we currently have a interaction with table rows that allow for double click to open. If you single-click, then it highlights the table row; however, there is no additional option to multi-select rows or anything like that. Is it intuitive enough for someone to know to double click the row in order to open it? There is a link on the first table-cell that opens the object. Thoughts?

We have tables with data where double clicking a row switches the table with corresponding row details. Currently a user can select a row and click a button to view details as well.  Is there a way to get rid of the view details button and make it intuitive so that the user knows double clicking a row will display the details?


My software center won't even start. It is giving me an error message. I've attached with this post the screenshot of the error message.  I'm new to Ubuntu. It would be helpful if I can get step by step instructions to solve the issue.

My software center in Ubuntu 14:04 wont start anymore. Error that I received is below in screen shot. I'm new in Ubuntu. So, somebody can give me step by step instructions to solve the issues that you would be much more appreciated. Thank you in advance.. :)


Hi want to know is it possible to install and use .exe file on Ubuntu  16.04 LTS 64 bit. The software is compatible to Windows 7,8, or 10. (32 or 64bit)  Regards

Can .exe and .msi files (Windows software) be installed in Ubuntu?


KC Chiefs played against TB Buccaneers (NFC) months before the Super Bowl :  I was wondering how come an AFC team plays against a NFC one before they reached the play offs

During the 2012 NFL Season, the Pittsburgh Steelers and Baltimore Ravens play each other in weeks 11 and 13, two weeks (in both NFL schedule and time) apart. To me, that seems too close for comfort.   I do know that teams play other teams in their division twice. How does the NFL schedule procedure work?


I'm implementing a touch screen interface whereby the user dragging their finger on the screen will rotate the camera in a sphere around the central point.  My code works well for the horizontal swipe (rotation around the y axis), but only covers a smaller angle from the vertical swipe (rotation around the x axis) instead of the full 360. I used the article - Spherical coordinate system form Wikipedia (), specifically the Cartesian Coordinates section, to do this. I've posted my code below. Can anyone help get this working through the full 360 degrees on both axis? See how Google Earth works when you swipe the globe for what I want.  This must have been done a billion times, but Google searches confuse with the phone built in camera, gps and the like. Thanks!  //Get current position oldX = getPosition().x; oldY = getPosition().y; oldZ = getPosition().z;  //convert to inclination/azimuth camRadius = Math.sqrt((oldX * oldX) + (oldY * oldY) + (oldZ * oldZ)); inclinationTheta = Math.acos(oldZ / camRadius); azimuthPhi = Math.atan2(oldY,oldX);  . . .  //use touch screen changes (deltaTouchX and Y) inclinationTheta = (inclinationTheta + deltaTouchScreenX) % (2 * pi); azimuthPhi = (azimuthPhi + deltaTouchScreenY) % (2 * pi);  //get new co-ordinates newX = camRadius * Math.sin(inclinationTheta) * Math.cos(azimuthPhi); newY = camRadius * Math.sin(inclinationTheta) * Math.sin(azimuthPhi); newZ = camRadius * Math.cos(inclinationTheta);  //set new position setPosition(newX, newY, newZ);

I'm drawing a scene where the camera freely moves about the universe.  The camera class keeps track of the view (or look at) point, the position of the camera, and the up vector.  These vectors/points are then passed into gluLookAt.    Pan and zoom are nearly trivial to implement.  However, I'm finding rotation about the look at point to be much more of an issue.  I want to write a function Camera.rotate that takes 2 angles, one that rotates up/down and one that rotates left/right along an imaginary sphere that is centered about the look at point.  Is there an easy way to do this?  I've (briefly) read about quaternions, but I wanted to see if there was an easier solution given the relatively simple construction of my scene.


Is it technically correct to write  Hello, Bob,  It looks wrong to have a comma immediately after the first word, but given that "Hello" is very syntactically different from "Dear/My Dear", it seems that a vocative comma is required.  Is this seemingly wrong practice technically necessitated when beginning an e-mail with 'hello', 'hi', etc?

I have a follow up question to this question:   My question is: when should you add a comma when starting a letter/email with     Hello John,      It was fun to see ...   I am pretty sure that a comma goes after the name, but lately I have seen several people (academics) write      Hello, John,       It was fun to see ...   with a comma after the Hello.  I am wondering when a comma there is appropriate.    I see this question  but I am wondering about the situation where you have a comma after the name also.


I recall reading a book or series of novels published in the 70s or 80s about an embattled group of humans who were struggling with monstrous creatures who only appeared at night and the days are getting shorter.   I'm thinking this was in the fantasy genre as I recall a map at the beginning of the book.  In some ways similar to the "Riddick/Pitch Black" film series. Very atmospheric, but not sci-fi, and definitely without Vin Diesel.

I'm trying to find the title of an old fantasy book I read at least 20 years ago, but I have very little to help identify it.  Obviously I don't remember the author name, I think it was written in the 80s or late 70s.  It was a classic premise with a modern day man from our world, transported to a fantasy setting. The world I remember was on the brink of an Ice Age and the main character and  wizard mentor found a keep to save the human race.  In the keep they found ancient machinery to produce light, warmth and food.  The magic in this world was glyph based, using the true meaning of word to change reality. Obviously the main character becomes a magician even if not really that skilled.  I think there was also a triangle with the main character, a princess and a dead husband who was not so dead after all, but it's all really foggy.  There were at least two books in the series.


If you have two table Employee and Department.   tblEmp - EmpID, EmpName,DeptID are the fields tblDepartment - DeptID,DeptName are the fields   Employee and Department table have the foreign key relation.  SELECT * FROM tblEmp e INNER JOIN tblDepartment d on d.DeptID = e.DeptID WHERE d.DeptID IN ('1','2')    How to write stored procedure for above statement? The department id values in where clause IN statement are dynamic (1,2) or (1,2,3) what ever I will pass them dynamically.

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


I wrote some scripts and wish to add a remote host to my known_hosts file without any interaction. I can run a command like ssh -o "StrictHostKeyChecking no" root@10.x.x.x which will add the remote host key to my known hosts, but it will be followed by a ssh password prompt. Any way to do this without the password prompt?

Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh.  The virtual machines will have previously unused hostnames and IP addresses, so they won't be in the ~/.ssh/known_hosts file on the central client.  The problem I'm  having is that the first ssh command run against a new virtual instance always comes up with an interactive prompt:  The authenticity of host '[hostname] ([IP address])' can't be established. RSA key fingerprint is [key fingerprint]. Are you sure you want to continue connecting (yes/no)?   Is there a way that I can bypass this and get the new host to be already known to the client machine, maybe by using a public key that's already baked into the virtual machine image ?  I'd really like to avoid having to use Expect or whatever to answer the interactive prompt if I can.


I cant remember if it's mentioned in The show, But in The parallel universe where Ten leaves Rose, is there another Doctor? Since there is a Torchwood, and it was built because of The doctor..

Torchwood was founded because of The Doctor's interference with the Queen with the werewolf.   But in Pete's world, there is no Doctor.  How is there still a Torchwood in this world if there is no Doctor?


I’m using a 3d framework that allows me to draw 3d things into a canvas. I can successfully render 3d objects by drawing them on a 2d canvas using the camera perspective matrix, view matrix and the 3d objects model matrixes.  The world space has its own units obviously and get rendered in -1/-1 -> 1/1 space and I have to translate/multiply/perspective divide the (x,y) coordinates to create the perspective and fit things inside my canvas. I think I’m doing it right, I can see the camera focus in middle of the screen and the axis/origin in a comfortable position (z is going up, x to my right, y to the my back/left).  Let’s say I have a rectangular face (RF) in my 3d space that gets projected on the screen. I also have another screen element (PIC) that’s also rectangular and have the same aspect ratio as RF. Obviously the size of the PIC is in pixels being rendered on the screen. The coordinate system of the PIC is origin at top/lef, positive axis x/y going left/right and the -z forward. I can apply 3d transform matrixes to the PIC (the second framework that I’m using allows me to do that). I also can specify the origin when doing the transform. I thing that will translate the PIC before applying the transform.  I’d like to find out what’s the transform matrix that I can apply to the PIC to get it rendered exactly in the same position on the screen as the RF gets rendered by the other framework.  I could try to use common sense like rotate PIC as RF is rotates in relation to the camera, move it to the ‘middle of the screen’ and zoom it out to fit the RF projection somehow (not clear to me how exactly). Also, I would need to adjust the transform matrix to fit the perspective from the first framework.  I’m sure there’s a clear way yo do this using the coordinates and matrixes that I already have but I would need a deeper understanding of how math works here :).  I could use:  models matrixes: modelMatrix, modelViewMatrix, their inverses. the view matrix, camera matrix (camera model matrix), camera perspective matrix camera properties: fov, position, rotation in relation to the world.  There is a similar work done in the three.js framework in Css3dRenderer that’s basically doing the same thing (applying a transform to a html DIV element to render it ‘in the same perspective projection’ used to render things using webgl) but I couldn’t use it as it is and I’d like to understand how things work.  Again, the question is what’s the transform matrix that would get PIC rendered on screen as RF is rendered.  Even though it could do the trick, the question/solution from  is different because it doesn't handle normals on the cube face... This question is about a face in a 3d space that can be oriented in both ways: front/back to the camera. Basically here we have a 3d transform and the other question/solution is about 2d projections.

I'm working on a project using Chrome - JS and Webkit 3D CSS3 transform matrix. The final goal is to create a tool for artistic projects using projectors and animation - somewhat far away from using maths... I'm using a projector to project several squares over several shapes - as seen in the picture. What I would like to do is for the user to draw 4 points on the screen (2D x and y) and from there extract a matrix object that I could apply to a regular DIV element of a dimension of 100px by 100px. By finding scaleX, scaleY, rotation, rotationX, rotationZ and probably some perspective that I could apply to the div to relatively match the surface. I'm not really familiar with geometry beyond sin and cos, and 3D in general and don't even know if that is something doable. If anyone could help me get started or point me in the right direction, I would greatly appreciate. Here is an animated gif (click to enlarge), hoping it makes it more clear to understand.


I am trying to load Ubuntu 16.04.03 onto my old laptop (so old, it is running Vista). I downloaded the program and put it onto a usb memory stick. I assume it has everything I need, all I can see is the .iso part. I cannot get the program to run. When I click the .iso, it wants to burn a disk, which I don't want to do. I restarted, pressing f12 key, but computer just starts normally. I am not computer savvy at all and need a simple explanation of what I am doing wrong and what I need to do. Thanks, in advance, for any help.

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


Recently I have come across the curious neologism neopronouns. I have a lifelong interest in languages and linguistics, but this is a new concept for me.  Prior to a month or so ago I had never heard of ‘neopronouns’.  Quite a number of years ago I did come across the form hesh(e). I have never to date seen this word used in practice, so I’m unsure whether it does, or does not, qualify as a neopronoun.  My question is a straightforward one, and I would very much appreciate if all answers to it would please remain on topic.  My Question  What is ɴᴏᴛ a neopronoun, and if anything can be said ɴᴏᴛ to be a neopronoun, then what authorities or official bodies might decide this and via what specific criteria?    Background  A little more explanation of my motivation to ask this question, since this question has not led to many answers, but has provoked a great number of comments:   Language is organic. We are right to adopt a descriptive rather than a prescriptive approach to language because language as it is used by its speakers is the language. It follows that neopronouns in use are already de-facto elements of the living languages in which they are used. But mass adoption of new language elements by the public at large relies in no small degree on their adoption by both the print and the spoken media alike, and then using these elements frequently and consistently to familiarise the general public with them. Media adoption of new language elements depends on those elements being presented in clear, uncontroversial forms to enable their widespread adoption. Few today would find controversial the marriage-nonspecific female honorific Ms from the mid-twentieth century, nor would anyone alive today find controversial the inanimate third-person possessive personal pronoun its which was first written that way during the late sixteenth century – sex being an intrinsic property only of animate beings alone, not of  inanimate objects for which it and its are rightly used in the singular. A surprisingly high number of animate but still gender-nonspecific neopronouns have been proposed since the mid-nineteenth century.  All seek  traction, although none of them – presumably because of their novelty and rarity and because of competition from the many others which makes each individual pronoun all the rarer – ever manage to achieve that traction. They simply do not stick.  The idea of an animate gender-nonspecific third-person personal pronoun is uncontroversial: we never question that we today use gender-nonspecific first- and second-person pronouns, I, we, and you – or the archaic and dialectal forms thou and ye.  Consequently we might hypothesise now in the early 21st century that today’s media have failed to adopt any animate but gender-nonspecific third-person personal pronouns (which are less rare and novel than they once were) because of substantial confusion and lack of clarity over the overwhelming number of rival proposals. It occurs to me (and probably to many others) that some of the confusion might be cleared up – and the chances of media adoption and then mass public adoption greatly increased – if exactly what is ɴᴏᴛ and ᴄᴀɴɴᴏᴛ ᴇᴠᴇʀ be considered a neopronoun were made clearer. I recognise this takes us into the realm of linguistic prescription, which we are usually right to avoid.  Allowing doubt and confusion to proliferate explosively alongside competing proposals hinders mass adoption of what could be otherwise presented as a useful set of animate yet gender-nonspecific third-person subject, object, reflexive, possessive, and determinative pronouns with universal application by all speakers of English.    These would be analogous to how in most dialects of present-day English we now universally use second-person you for males and females alike rather than reserving second-person you only for those scenarios in which we do not care to specify their gender and some hypothetical form like ❉shyou for females with a corresponding hypothetical form ❉hyou for males when we actually ᴅᴏ care to specify their gender.

It’s the  question: Am I looking at someone’s legitimate pronouns or trolling?   (It’s unfortunate I have to ask, but this is just where we are right now.)  I’ve seen “my pronouns are [insert ridiculous fake stuff here]” trolling recently (in posts) when before I never did. Also stuff that looks to be trolling, but could also maybe not be. Trolls deserve red flags while everyone else specifying pronouns does not, right?  (To clarify, the problem is not just about not wanting to use a troll's words. The purpose of some of this trolling is to try and convince people that transgender people—or their neopronouns—are stupid or unreasonable. Ignoring the trolls allows us to avoid the first problem, but not the second since it allows them to still reach people with their message, which is not something that I want to see promoted.)  Some neopronouns are clearly legitimate. Some trolling is clearly trolling. But unfortunately there’s a big grey area where it’s not clear to me what is what.   Does anyone have a good method for dealing with this? There just doesn’t even seem to be a good way to ask about someone’s specified pronouns in such a way that doesn’t sound insulting if the user isn’t trolling.     Note: A while ago, I did some research on neo-/third person pronouns which can be found . There are several important things I found:   There are more neopronouns than I could ever hope to keep track of The most popular neopronouns are very uncommon. On the other end of the spectrum, it looks like some neopronouns are neologisms used by a single person  Some neopronouns come from unlikely places, such as SciFi


I am trying to print 1538409725339216503 this number in javascript console but it gives me output 1538409725339216400 [console image]

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?


Does anyone know of an Easy solution to dual boot Window and Ubuntu with UEFI after you have already installed Ubuntu or for that matter from the get-go? I have tried enabling CSM in my BIOS and using it for Windows but Windows runs really slow cause I guess it requires UEFI for 64 bit applications. All the posts and tutorials on this are real confusing so if you can't make this for a laymen to understand, I guess Windows has just won this battle.

I was not aware of booting mode and installed ubuntu on my new x64,4 gb ram, Acer ES15 laptop in legacy mode. I read about the feature of uefi mode and would like to switch to uefi. When I boot on legacy mode, ubuntu loads up and system works fine, but when I change my bios setting to uefi it says no bootable device found. Should I install ubuntu again using uefi mode after erasing data? Will that work?.... Is there any other way to get to uefi mode or I need to format and then install ubuntu again using uefi bios mode? Please, help.


What is the difference between the words vernacular and colloquial? Is vernacular closer to jargon?  A quick search reveals that colloquial refers to informal spoken language while vernacular refers to some sort of native language of a place. Is that the only difference?

Expression and idiom are used interchangeably, and so are colloquial and  vernacular; albeit incorrectly.  Please advise on differences in meaning and recommend a proper usage.


I want to install Kubuntu on my laptop instead of Ubuntu, but the problem is its support ends soon and I'm new to this environment, so I don't know what to do when the support ends.   Do we get an update or do we need to clean install the newer version?

This question is here just to avoid you choosing the wrong Ubuntu version number.  So, this is not about:     nor about   nor   nor   nor   nor .   So in the answer below a simple guide as to what Ubuntu version is good for you, independent of future releases!


We have been taught that anything occupying space/volume has mass. Light has both a particle nature-photon and wave nature. Since It has an momentum of h/λ, energy of hc/λ. Since a photon carries energy and experiments have put an upper limit to its mass of 1e-18 eV/c^2, does it possess dimensions, a shape ?

Does photon have size measurement because of its particle nature like electron's 3.86*10^-13m etc..


When I made a playlist from a book from audible it shows up on my iPhone as a playlist but it won't play and in fact says "won't play."  In the past I have done this successfully and I don't know what the problem is. I was so disappointed not to have the ability to repeat An audiobook. I like to have an audiobook repeat if I go to sleep listening to it. In the past I have had a book jump from Austen to Auschwitz and it was very unnerving. I wish they would address this issue and not anticipate how someone is going to use a certain application. I still listen to books on my old classic iPod and you could make playlists from books right on the device it was so easy!   Does anyone know how to address this?

A while ago Apple moved audiobooks from the music app to iBooks. Now I can't listen to audiobooks on repeat. Is there any way of getting back this functionality?


I've been to Germany twice now: Once to Berlin and once to Bielefeld.  Both places had these yellow boxes with the same pattern at pedestrian crossings.    At first I thought they were to press for crossing, but there doesn't seem to be any way to actually press them so I'm confused as to what their role is.  What exactly are they for?

I see these all around town and nobody seems to know how to use them - even my German colleagues. We're engineers, so we feel pretty stupid and inadequate around them...  The majority of people I've seen either ignore them or look at them confusedly and try to slap the three black dots - like a  - to no avail.  Obviously there are a lot of different kinds, ranging from old and busted to some having mini LCD screens - but only a few are actually press-able buttons.  What's the deal with them? How do you use them?


match() in following string,  string = "(branch=MAIN).  See the error log at /home/aswamy/run/test_upgrade/2.0-285979.customer_deployment.22499/test.log.2\n" m = re.match("See the error",string) print m  ==> (Here m always shows None)   But if I use the same string without any spaces between (branch=MAIN), then match happens as below,  string = "See the error log at /home/kperiyaswamy/runmass/mass_test_upgrade/7.2.0-285979.customer_deployment.22499/infoblox.log.2\n" m = re.match("See the error",string) print m ===> (works proper <_sre.SRE_Match object at 0x7fe813825030>)   So if there is a multiple white spaces pattern match doesn't work. Please let me know how to solve above issue

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I have tried %appdata%\.minecraft but it isn't there! Where can I find my save files?

I have searched in %appdata%, pulling up the list of files there, but there is no file labelled .minecraft. Searching %appdata%\.minecraft returns "no results found".   I also opened Minecraft to click on the resources button and could not locate that either.


I am very new to Android and a high school student. So I think it'd be nice if you could give me the code, too. I implemented login using firebase and LoginActivity.FragmentIndivative in java.I want to send my name, e-mail address, and phone number to java. So I used a Bundle object, and NullpointerException occurred. Please help me. I don't have time. I'll wait for you guys. I'll attach the code below. Please take good care of me. private void signUp(){     final String email = ((EditText)findViewById(R.id.idText)).getText().toString();     final String password = ((EditText)findViewById(R.id.pwText)).getText().toString();      if(email.length() > 0 && password.length() > 0){         mAuth.signInWithEmailAndPassword(email, password)                 .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {                     @Override                     public void onComplete(@NonNull Task<AuthResult> task) {                         Intent intent1;                         if (task.isSuccessful()) {                             FirebaseUser user = mAuth.getCurrentUser();                             startToast("로그인에 성공하였습니다");                              fragmentIndividual = new FragmentIndividual();                             FragmentManager fm = getSupportFragmentManager();                             FragmentTransaction fmt = fm.beginTransaction();                              intent1 = new Intent(getApplicationContext(), MainActivity.class);                             intent1.putExtra("name", "nnnaa");                             Bundle bundle = new Bundle();                             bundle.putString("name", mAuth.getCurrentUser().getDisplayName());                             bundle.putString("email", mAuth.getCurrentUser().getEmail());                             bundle.putString("phone", mAuth.getCurrentUser().getPhoneNumber());                              System.out.println(email);                             System.out.println(mAuth.getCurrentUser().getEmail());                              startActivity(intent1);                         } else {                             if(task.getException() != null){                                 startToast(task.getException().toString());                             }                         }                     }                 });     }else{         startToast("빈 칸을 채워주세요");     } }   public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     View view = inflater.inflate(R.layout.fragment_individual, container, false);      Bundle bundle = this.getArguments();     if(bundle != null){         bundle = getArguments();         String name = bundle.getString("name");         String email = bundle.getString("email");         String phone = bundle.getString("phone");          View v = inflater.inflate(R.layout.fragment_individual, container, false);         nameTv = (TextView)v.findViewById(R.id.nameTv);         emailTv = (TextView)v.findViewById(R.id.emailTv);         phoneTv = (TextView)v.findViewById(R.id.phoneTv);          nameTv.setText(name);         emailTv.setText(email);         phoneTv.setText(phone);     }      return view; }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Say i'm coding in emacs and want to start up a music program. Because it takes too long to start up i go back to coding and type away.   When the music application starts up, the focus is stolen (gasp! stolen!) away from emacs and goes to the music application, often mid-thought.  Is there any way to keep this from happening and have the newly started application not have focus until i see that it's up and ready to be used?   Besides getting rid of my ADD of course. Or getting an impossibly fast computer that can keep up with my mind.  i'm using a Windows XP system, but i will soon have a Windows 7 system, and i have Linux at home.

Are there any solutions to prevent applications stealing focus from the active window?   This is especially annoying when I'm starting an application, switch to do something else and the new application starts receiving half a sentence of text.


File reading failed: VLC could not read the file (Input/output error).

My machine can't play encrypted DVDs on a fresh install.  How do I add this capability?  Another useful bit of information would be what programs are best for playing DVDs, once I'm able to do so.  See the .  Will I be able to play DVD movies from ?


How do I convert my ISO DVD of Ubuntu 14.04 Desktop 64 version to a DVD that will install the 14.04 Ubuntu operating system?

I have downloaded an ISO file recently.  How do I burn it to a CD or DVD or mount it?


As soon as curve is attached.    I need it to not move away. I have already joined hip with the rest of the spine but it deforms too much. Can anyone suggest how could i accomplish the same without curve modifiers? Thank you so much for your patience.  Moving top handle dislodges.    As soon as curve starts top part dislodges  ].png

I'm using a curve modifier and an array modifier. My object is at one end of the curve but as soon as I choose the curve for the curve modifier it moves to the center. How can I fix the problem so that I can have the array going from one end of the curve to the other?


I will be graduating this year with a PhD in mathematics.  My research background is in analysis in a top 20 program in the US.  However, my family situation is such that I can't uproot my family any more than I already have, and I am thus geographically limited in our "in-person" options.  There are several universities and liberal arts schools in my native region, but these days it is increasingly rare to get a tenure track position straight out of the PhD, even for non R1-institutions. So here is my question.  How open are math departments/potential mentors  to the idea of a remote research postdoc, assuming I can make trips to the host institution, say, two or three times a year? I'm looking both at postdocs in the US and abroad. On one hand, COVID has made online work more a possibility. And if I stick to research postdocs, I don't have to be in-person for additional tasks (I might also teach online courses in other cases, but I don't want to bank on the continuation of this pandemic, which would just be, well, awful).  Additionally, as a mother I already do most of my research from home, and I have figured out to a large extent how to balance my personal life with my professional life under the flexible time schedules allowed by academia.  My CV and research activity, as far as I know, is decently strong (two published papers, one in a good journal, two submitted papers, one to a top journal, and several more research projects along the way, several talks, including some invited ones), and both I and my advisor had correspondences with some of the researchers in potential institutions, some of who also know I have a child, so they might be more understanding (or not). On the other hand, I fear a remote option request might be read at best as a lack of commitment to my research, and at worst an insult to the department.  I know personally this isn't the case for me in terms of my productivity (it's been my default for a few years now), but there might be prior assumptions in play.  I also know that generally, math research is increasingly social and collaborative.  There are some advantages to being able to stop by an office next door and ask a math-related/ research question. I also recognize that universities are going to want additional teaching experience if I am applying to tenure track positions afterwards. My limitation to research postdocs also makes it that the total number of postdocs I'm looking at is less than most PhD's numbers of applications. Should this not work out, I am also applying to non-academic positions as a back-up plan (gotta put food in the table), but I really do enjoy research in pure math and do not want stop doing it.

Assume that a given postdoctoral position does not require teaching/laboratory.     Are there postdoc positions for someone who wishes to stay in his/her country and just be in touch with the post-doc advisor by e-mail or/and Skype?   Perhaps communicating only by e-mail may be slightly annoying for some people, so I also suggested Skype.  In my opinion (but correct me if I am wrong), there should be no difference between live meetings and Skype meetings.   Remark: Truly, I am asking about a post-doc position in mathematics, but I guess that my question is also relevant for other fields.  Edit: I wish to thank all the people answering (or commenting on) my question.


It installs fine but there is no GUI anywhere for it nor is it in the recommended open with programs. I'm guessing its a repository issue because in the software updater I get this error.   E:The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic Release' does not have a Release file.  W:Updating from such a repository can't be done securely, and is therefore disabled by default.  W:See apt-secure(8) manpage for repository creation and user configuration details.  E:The repository 'http://ppa.launchpad.net/wine/wine-builds/ubuntu bionic Release' does not have a Release file.  W:Updating from such a repository can't be done securely, and is therefore disabled by default.  W:See apt-secure(8) manpage for repository creation and user configuration details.  W:GPG error: http://archive.canonical.com precise Release:   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5  E:The repository 'http://archive.canonical.com precise Release' is not signed.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


The old woman reduced the self-esteem of the speaker.   My question is why it is the self-esteem.

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


Is it possible to filter questions by reputation of the author? Just Something like [favtag] [rep<5] to show all the newcommer questions.

There seems to be a deluge of questions by folks with rep of 1-10. Many of these questions are "homework" or questions that are annoying to me "please read my 500 line script and tell me whats wrong with it" Is there any way to filter questions by reputation?


I currently have a PC with Kubuntu installed by itself and i wanted to dual boot Remix OS since i need Android apps with a Android-like environment.

I have brand new machine.  I want to install Ubuntu and one more Linux distributions on same machine. When the machine is up I want to have the option to choose which Linux to load.   Is it possible?  How to do it?


I need to access root in Kubuntu 17.10 through graphical interface, can someone point out how this is done please. This differ since Kubuntu 17.10 uses Wayland.  Thanks in advance..

In regular Ubuntu (Unity/Gnome), I use gksudo to run GUI programs with root privileges. I'm trying out Kubuntu (or KDE) now -- what do I use?


Hy, I am fairly new to python. I am stuck with problem which is below explained, We have two lists say A = [0,3,4,6,7]   #indices B = [1.2,5,1.3,0.5,7,0.6,0.43,5,3,6,4,1,5,7,4]   #values  where list A elements are actually indices of list B which I want to access and store in new list say C. so my list C should be C = [1.2,0.5,7,0.43 ,5]  And what if I have array instead of list? Thank you for your time.....

I'm sure there's a nice way to do this in Python, but I'm pretty new to the language, so forgive me if this is an easy one!  I have a list, and I'd like to pick out certain values from that list. The values I want to pick out are the ones whose indexes in the list are specified in another list.  For example:  indexes = [2, 4, 5] main_list = [0, 1, 9, 3, 2, 6, 1, 9, 8]   the output would be:  [9, 2, 6]   (i.e., the elements with indexes 2, 4 and 5 from main_list).  I have a feeling this should be doable using something like list comprehensions, but I can't figure it out (in particular, I can't figure out how to access the index of an item when using a list comprehension).


I want to convert the 5v 20mA power from a digital Arduino output to a strong enough power for a 12v 7a motor. I do not believe the converter (linked below) I have selected will do the full extent of what I need. Are there any converters out there to fulfill my needs? Or should I just use a 12v 7a power supply?

I have a project that needs a different voltage (or multiple voltages) than what I have available. Sometimes I need DC instead of AC, or I need a lower or higher voltage. How do I convert from one to another? Should I use resistors or a regulator or something else?  I've heard of converters, transformers, regulators, inverters, step-down, step-up, buck, boost, switching, linear, and other terms. Or acronyms (initialisms) like PMIC and LDO. Can someone shed some light on all this?


I want to track how close I am to getting the  badge but I just don't seem to find a way.     Leave 10 comments with score of 5 or more.    While I am able to see all the comments posted under my  (all actions -> comments), I am unable to see the upvotes (if any) received for my comments.  Was this feature skipped due to any reasons? Will you please consider showing the comment upvotes next to the comments (in the area marked shoddily with a Snipping Tool in the below screen shot)? If possible, an option to sort by comment upvotes too, please!    Note: Please do not redirect me to an SEDE script.   The duplicate question is 5 years old! And no indication if the request was even considered. Any useful updates @Shadow Wizard?

It would be helpful if we could see the number of upvotes cast for our comments, or other people's comments in response to us directly in the user profile in either the activity tab or the response tab respectively. It should be quite easy to implement (e.g. sharing a single partial view for displaying comments).  It could be useful, since we can evaluate the legitimacy of the comment and address horrible mistakes sooner.


I am looking to design and create a new large-scale application from the ground up and use type safety with structs where appropriate. The application does have a large number of calls between classes.  Currently I am looking to implement structs to represent Id's and different types of numbers (e.g. prices and quantities), but when would be taking it too far?  Thanks,  Update: Thanks for the link to when to use structs, but that does not answer when you should enforce type safety.

When should you use struct and not class in C#? My conceptual model is that structs are used in times when the item is merely a collection of value types.  A way to logically hold them all together into a cohesive whole.  I came across these rules :   A struct should represent a single value. A struct should have a memory footprint less than 16 bytes. A struct should not be changed after creation.   Do these rules work? What does a struct mean semantically?


Suppose we have a question like:     How to check if an object is a string in JavaScript?   Obviously, we should tag the question with the javascript tag.  But do we need that 'in JavaScript' part in the question title then?  It looks redundant, since tags seem to be the best mean to put a context of the question. I believe short, concise and key-wordish titles are more preferrable, so I'd rather make the title like this and let tags say the rest:     Check if object is string   Moreover, I noticed that often a question title in Google Search gets automatically prepended with the left-most SO tag text like this:     javascript: How to check if an object is a string in JavaScript?   Which makes the 'in JavaScript' part even more questionable.  Could someone clarify this or point me to a question asking guidelines on this, if any?

I've seen questions edited to remove the language name from the title. Won't search engines - and folks using search engines - have an easier time finding them if these "tags" are kept as part of the title?


I want to make a function to read a csv file in my html folder and return the content of the file as a String, if possible only using basic js

I need to do an  request in JavaScript. What's the best way to do that?  I need to do this in a Mac OS X dashcode widget.


I have been struggling to find and understand the solution for a problem that I have.  Here is a  I referenced for this problem. Here's a proposed solution that I was able to find:  Let CC(n) = the expected number of days to collect n coupouns. Number of days between coupon j and j+1 is CC(j+1) - CC(j). Then to collect all c types is CC(c).  The problem is that I don't understand how I could start formulating a solution using this. I have been trying to understand it when I'm not occupied with my other subjects, but I am just too bad at math to get it. I would really appreciate it if anyone could guide me through the solution and help me get better at this.

For simple linear regression, the regression coefficient is calculable directly from the variance-covariance matrix $C$, by  $$ C_{d, e}\over C_{e,e} $$ where $d$ is the dependent variable's index, and $e$ is the explanatory variable's index.  If one only has the covariance matrix, is it possible to calculate the coefficients for a model with multiple explanatory variables?   ETA: For two explanatory variables, it appears that $$\beta_1 = \frac{Cov(y,x_1)var(x_2) - Cov(y,x_2)Cov(x_1,x_2)}{var(x_1)var(x_2) - Cov(x_1,x_2)^2} $$ and analogously for $\beta_2$. I'm not immediately seeing how to extend this to three or more variables.


For many years, I use DESTDIR=/somewhere make install to set a temp path before a installation operation for testing purpose, so I naively think it works for any command line. But it does NOT work with FOO=bar echo $FOO, to my surprise! It looks like that FOO=bar bash -c 'echo $FOO' works well. Would anyone please tell me the reason behind this? If every time I must use the after form, it is bother a little.

I've just encountered several answers such as to  that use the construct:  while IFS=, read xx yy zz;do     echo $xx $yy $zz done < input_file   where the IFS variable is set before the read command.  I've been reading through the  but can't figure out why this is legal.  I tried  $ x="once upon" y="a time" echo $x $y   from the bash command prompt but got nothing echoed. Can someone point me to where that syntax is defined in the reference that allows the IFS variable to be set in that way? Is it a special case or can I do something similar w/ other variables?


What can I do to make it so that a border is only as wide as the p element it is applied to in CSS?  I also want to make it so that it auto-changes the size of the border if I were to change the text?   This is what it looks like without any fixing:   This is what it looks like when I manually change the size and then change the text:    I just want it to change depending on the length of the text. Thanks!

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


Suppose that $\lbrace a_n \rbrace_{n=1}^{\infty}$ is a sequence in $\mathbb{R}$ and that there exists a $D>0$ such that $$\vert a_{n+m} - a_n - a_m \vert \leq D$$ for all $n,m \in \mathbb{N}$. Must there exist $\tau \in \mathbb{R}$ such that the sequence $a_n - n\tau$ is bounded? I believe that the answer is yes, but I'm having difficulty proving it. I can prove the (apparently) weaker fact that $\displaystyle\lim_{n\to\infty}\frac{a_n}{n}$ exists.

Let $G$ be an abelian group, and $\Phi:G\to \mathbb{R}$ is a function with the following property: $$\forall a,b\in G,~~ |\Phi(a+b)-\Phi(a)-\Phi(b)|<c$$  The problem asks to prove the existence of homomorphism, $\Phi^*$, where $\Phi^*:G\to\mathbb{R}$ and  $$\forall a\in G, |\Phi(a)-\Phi^*(a)|<c$$


I send POST param with name "param.name" If I read the php://input everything ok, but if I try to get param from an array $_POST['param.name'] that it is absent because the dot was replaced to underscore and I need to get param this way $_POST['param_name']. Maybe some settings in PHP I should tune... I use PHP 7.4.15

If I pass PHP variables with . in their names via $_GET PHP auto-replaces them with _ characters. For example:  <?php echo "url is ".$_SERVER['REQUEST_URI']."<p>"; echo "x.y is ".$_GET['x.y'].".<p>"; echo "x_y is ".$_GET['x_y'].".<p>";   ... outputs the following:  url is /SpShipTool/php/testGetUrl.php?x.y=a.b x.y is . x_y is a.b.   ... my question is this: is there any way I can get this to stop? Cannot for the life of me figure out what I've done to deserve this  PHP version I'm running with is 5.2.4-2ubuntu5.3.


A webcam's light has been intermittently coming on, and I'm trying to track down what program is accessing it (without just blindly killing programs until the light goes off).  I've gone through the standard steps: finding the "Physical Device Object" IDs in Device Manager, using Process Explorer to search open handles and which programs are accessing what, but this leads to "audiodg.exe" accessing the webcam handles, which is apparently the "Windows Audio Device Graph Isolation".   This is what's directly accessing the webcam, but I can't see what program called for its access in the first place, to see which program is pulling the puppet-strings, so to speak.  So is there a way to trace which program is accessing a webcam's microphone or video via "Windows Audio Device Graph Isolation", audiodg.exe?

Yesterday I was working on my laptop. Suddenly I noticed that the indicator light of the webcam was on, despite the fact that I wasn't making a video call or using the webcam in any other way at the moment.  It freaked me out.  It freaked me out that some unknown application on my computer was using my webcam without my permission, and possibly sending that video stream to god knows where on the Internet.  In the end, it turned out to be Skype which was in the process of crashing. (Despite me making no calls at the time.) So that story ended well.  But next time I see the webcam indicator light, I want to be ready. I want to be able to know exactly which app is using the webcam so I could destroy it.  Does anyone know how I can find out which app is using the webcam?  (I'm on Windows XP.)


how to extend root / partition by sinking swap (previously 6gb after sinking 4Gb , unallocated 2 Gb) and home (previously 11 Gb after sinking 8Gb, allocated 3Gb). How to extend those allocated partition to root? how to combine those 5gb to / partition? Help me! (this is partition extended from 30 Gb primary partition) so if not then, how to combine another 30gb (currently unallocated) partition that sinked from another primary volume.

I've got Ubuntu 10.10 installed to use my whole hard-disk, but would like to use the 130GB of free space I've got to create a new partition and do some development on Unity and Natty.  Can I use gparted to do this?  If so how?


For modeling,design and optimization purposes relative to electrodynamic systems, what text book(s) would be ideal?   I'm a mechanical engineer, and during my undergrad I used David J. Griffiths introduction to electrodynamics, which was very insightful and seem inclusive and interesting(I read it all beyond the course's requirements), and use it for reference. However, should I consider other texts?   I've came across Jackson's book, and honestly...I wasn't able to learn much beyond the first chapter.

What books are recommended for an advanced undergraduate course in electrodynamics?


I have added the following lines  /dev/hda {    spindown_time = 60 }  /dev/hdb {    spindown_time = 60 }  /dev/hdc {    spindown_time = 60 }   to the end of my /etc/hdparm.conf file and rebooted.  Unfortunately, no any effect of these lines observed. For example, /dev/hdb which I rarely use shows  $ sudo smartctl -i -n standby /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-37-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org  === START OF INFORMATION SECTION === Device Model:     WDC WD40EFRX-68WT0N0 Serial Number:    WD-WCC4EFSNCNX5 LU WWN Device Id: 5 0014ee 26020b658 Firmware Version: 82.00A82 User Capacity:    4,000,787,030,016 bytes [4.00 TB] Sector Sizes:     512 bytes logical, 4096 bytes physical Rotation Rate:    5400 rpm Device is:        Not in smartctl database [for details use: -P showall] ATA Version is:   ACS-2 (minor revision not indicated) SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is:    Wed Oct 22 05:31:21 2014 MSK SMART support is: Available - device has SMART capability. SMART support is: Enabled Power mode is:    ACTIVE or IDLE   How to check/force power conserving works?  UDPATE  I have tried all things, including ones in so called "duplicate" question, but they didn't work.  I can put drive into standby mode manually with  hdparm -y /dev/sdb   and it will stay in this mode until used. But once it used, it will never go into standby itself.  Is it possible to look standby timer, i.e. timer, which is counting time after last activity? Without this timer, auto standby feature can't work. And if this timer exists, but unavailable, then atuo standby can't be debugged.

I have 2 HDDs in my PC. Ubuntu is turning off the secondary HDD very quickly after about 15 minutes, which is short for me. I need to control this time. How can I do it?  I tried GNOME power management but did not find it useful.


I am generating the html table dynamically using javascript.      Adding the button for each row and a css class for that, the onlick event for that css class is not getting called. Need a help where I am making a mistaking.  Here is my code for reference  for(var i=0;i<5;i++){ $("#desgtable").append("
"+i+"	<input type='button' class='case'
");   }    $(".case").click(function(){      alert(); }

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I found this answer when looking up how to make \cite work. I copied and pasted the code directly from the answer to my Texmaker and it still didn't work. I then tried the same code in Overleaf and it worked there. What is wrong with my Texmaker that would cause an error in the \cite command?  \begin{filecontents*}{\jobname.bib} @article{AAA,   author = {A. Uthor},   title = {TTTitle},   year = {2017}, } \end{filecontents*}  \documentclass[10pt, a4paper]{elsarticle} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} %\usepackage{natbib} \usepackage{graphicx}  \begin{document}  \citet{AAA}  \section*{References} \bibliographystyle{elsarticle-num-names} \bibliography{\jobname}  \end{document}   Code and error after code ran.  '?' citation in resultant PDF

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


Using the suggestion from , I used the \sqrt sign from Asana Math with TeX Gyre Pagella Math to decrease the height of some inline math. However, this apparently had some unintended side-effects. Take this minimal example:  \documentclass[a4paper, 12pt]{scrreprt}  \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} % comment or uncomment the next line and compare the output \setmathfont[range=\sqrt]{Asana Math}  \begin{document}  \[     \int ∫ \sum \]  \end{document}   If you compile with or without the line \setmathfont[range=\sqrt]{Asana Math}, the size of the integral sign (but not the sum sign!) changes!    What gives? The integral sign for TeX Gyre Pagella Math is very small to begin with, so this is really uncalled for! Is this a bug? Are there any more unexpected side-effects? How can I avoid this and keep both the \sqrt from Asana Math as well as the bigger integral sign?  For reference, I'm using the version of LuaLaTeX from the Ubuntu 15.04 repositories  (it says "This is LuaTeX, Version beta-0.79.1 (TeX Live 2015/dev/Debian) (rev 4971)").

You can use the range feature of unicode-math to set the math font for a specific unicode slots or the macro accessing the glyph. I tried this with the sum sign & Latin Modern, see my example:  \documentclass{scrartcl}  \usepackage{amsmath} \usepackage{unicode-math} % use unicode in math & setup math fonts \setmathfont{Asana Math} %\setmathfont[range=\sum]{Latin Modern Math} % substitute Sum sign  \begin{document}  Notice the different sum sign $\sum$, as intended.   Notice also, the difference in spacing, not intended: \begin{equation}     \begin{bmatrix}         0           & \frac{1}{2}   & \frac{2}{3} \\         \frac{3}{4} & 0             & \frac{4}{5} \\         \frac{5}{6} & \frac{6}{7}   & 0     \end{bmatrix}     \begin{pmatrix}         A \\         B \\         C     \end{pmatrix} \end{equation} \end{document}   However, not only the sum sign, but also the spacing in the matrices changes. With Latin Modern commented out (as in the example):  With Latin Modern active (remove % before relevant line):  Why is that? BTW, I'm using Lualatex from TeXLive 2012.


I want to change the color of the lines (i think they are called "rules" in latex) after the heading and before the footer in every page of my report. I used these commands to add them but i couldn't change the color to gray  \renewcommand{\headrulewidth}{0.4pt}  \renewcommand{\footrulewidth}{0.4pt}   I used the package \color to (successfully) change the color of the headers and footers but it doesn't work inside the previous commands.   \color[rgb]{.55,.55,.55}   I also tried these codes which are for changing the colors of the tables, but it didn't work for my need  \usepackage{colortbl} \arrayrulecolor{blue}\hline

How can I add horizontal line after header and before footer?   header ---------  --------- footer


I need to know what all is remains constant in uniform circular motion. The tangential SPEED, angular velocity and centripetal acceleration right? Why is there no tangential acceleration in uniform circular motion? Isn’t the tangential velocity always changing direction? The magnitude of the tangential velocity,I.e,tangential speed is the same at every point but the VELOCITY is not, right? But then why does the formula : acceleration(tangential) = radius*acceleration(angular) tell me that the tangential acceleration is zero?

I understand that circular motion is defined by 2 components of acceleration, one tangential and one radial and their resultant is what causes circular motion.  I am confused though as to why it is said that in uniform circular motion (constant angular velocity) there is no tangential acceleration. How can the radial vector be always pointing towards the centre? Is there is no tangential vector component to it?  So is there still a vectorial tangential acceleration (since the vector points to a different point at each time)?  And is centripetal acceleration the resultant of the tangential and radial accelerations?


Is the space C([0,1]) with the norm integral from 0 to 1 of |f(t)|dt a Banach space?

Consider $C([0, 1])$, the linear space of continuous complex-valued functions on the interval $[0, 1]$, with the norm  $$\displaystyle\lVert f\rVert_1 = \int_0^1 \lvert f(x)\rvert \,dx.$$  I have to show that $C([0, 1])$ is not complete with respect to this norm. I have found the following example from a book.  Let $f_n \in C[0,1]$ be given by  $$f_n(x) := \begin{cases}  0   & \text{if $0 \le x \le \frac1{2}$}\\  n(x-\frac{1}{2}) & \text{if $\frac {1}{2} < x \le \frac {1}{2} + \frac {1}{n}$}\\  1              & \text{if $ \frac {1}{2} + \frac {1}{n} <x \leq 1 $} \end{cases}$$  How to prove that $f_n$  is a Cauchy sequence with respect to $\lVert \cdot\rVert_1$?   If I use basic definition then I have to prove that $\lVert f_n - f_m\rVert_1 < \epsilon$ $\forall n, m > N$. But I am finding it difficult to prove this.  Please help me to understand how to prove that $f_n$ is Cauchy sequence in $C([0, 1])$.  Thanks


I am trying to implement a Utilities singleton class, which includes a helper function to format std::string's. The code is from this link here,  however I get a linker error somehow. (I modified const std::string& format to be a const char* format for performance, but both don't work). Here is the header file: utilities.h #pragma once  #ifndef UTILITIES_H #define UTILITIES_H   #include <string>   class Utilities { public:     Utilities(const Utilities&) = delete;     Utilities(Utilities&&) = delete;     Utilities& operator=(const Utilities&) = delete;     Utilities& operator=(Utilities&&) = delete;      template<typename ... Args>     static std::string FormatString(const char* format, Args ... args);  private:     Utilities();      static Utilities& Get_Instance(); };  #endif // !UTILITIES_H  and utilities.cpp #include "utilities.h"  #include <memory> #include <string> #include <stdexcept>  Utilities::Utilities() {  }  Utilities& Utilities::Get_Instance() {     static Utilities instance;     return instance; }   template<typename ... Args> std::string Utilities::FormatString(const char* format, Args ... args ) {     int size_s = std::snprintf(nullptr, 0, format, args ...) + 1; // Extra space for '\0'     if (size_s <= 0) { throw std::runtime_error("Error during formatting."); }     auto size = static_cast<size_t>(size_s);     auto buf = std::make_unique<char[]>(size);     std::snprintf(buf.get(), size, format, args ...);     return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside }  The linker error is: Severity    Code    Description Project File    Line    Suppression State Error   LNK2001 unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Utilities::FormatString<double>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,double)" (??$FormatString@N@Utilities@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV12@N@Z)  file.obj    1

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)