No matter what I choose, it shows me only the 1st frame as if it was a single image although I choose the Movie option and the number of frames is more than 1.  How can I fix it?  I tried different projects and different videos, it is always the same. Also I'm not sure if it's the same problem, but I've seen lots of tutorials using Images as Planes feature and they could see a picture on a plane in Material View. I can't.

I am trying to animate in 2d. I do it with planes that have textures on them. I recently came up with the idea of having a plane with an image sequence of mouths because animating actual lip syncing by hand takes too long and isn't really necessary for what I'm trying to acomplish. However, when playing back the animation in textured viewport shading the animated texture stays at the last frame until the animation stops. I can use the arrow keys and it works fine as well as scrubbing through the timeline, just not when playing back the animation with alt+a. Can anyone help me with this problem?


I run 18.04 on my main server and I have a hard time to exactly understand what "LTS" means:   does "Long Time Support" mean that whatever software is installed on day one, at that "version", will be supported together with all the upgrades of this software? or that whatever is installed on day one will stay at that "version" ?   When running an apt list --upgradable I see, among others  python3-distupgrade/bionic-updates,bionic-updates 1:18.04.24 all [upgradable from: 1:18.04.21]   This means that the version moves from 18.04.21 to 18.04.24, therefore it changes - at least for the most minor part.  What exactly (from software version perspective) changes in time with the LTS?  Note about "marked as duplicate": my question is not about  (which is the essence of the other answer) but about the versions of the software which make an LTS.   As an example, python on my 18.04 servers is 3.6.5. The current stable version is 3.7. Will I get it? Or only updates of 3.6? Is there a rule which states how the evolving versions of a program will or will not be ported to an LTS?

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


I have an task to generate an Random numbers in assembly language just like rand function in c Language but in assembly language i had to extract the B0,B5,B6 bit from the 8 bit data number and perform the following tasks on that bit   EOR B5 and B6 EOR B0 and result of (B5 ^ B6) And result of task 2 will be replace to MSB bit of the 8 bit data.   I've done the first 2, but can I replace the MSB bit with the result of task 2?

How do you set, clear, and toggle a bit?


I am wondering if there is a nice way to convert a list of digits to an integer in python. That is, if I have mylist = [1, 5, 9] I would like to do something like int(mylist) to get an output of 159. I am assuming that the input list simply has digits, and I want to use this to create a number. Currently the best I have is:  mylist = [1, 5, 9] num = 0 for i in range(len(mylist)):     num += mylist[i] * 10 ** (len(mylist) - i - 1)   Which should work alright, but feels too explicit. Is there a neater/nicer way to do this?

I have a list of integers that I would like to convert to one number like:  numList = [1, 2, 3] num = magic(numList)  print num, type(num) >>> 123, <type 'int'>   What is the best way to implement the magic function?  EDIT  I did find , but it seems like there has to be a better way.


I am running a multinomial logistic regression model (with 3 possible outcomes) in R. I am trying to find the best way to assess the predictive power/accuracy of the model, and the best thing I've come up with is using a ROC curve.  For multi-class ROC analysis, I know that there is the one vs. one comparison or the one vs. all comparison. For the one vs. one comparison, would I need three separate ROC curves for each possible combination of outcome comparisons? If so, do I need to make a third model for comparing the two outcomes that were initially being compared to the baseline outcome?  For one vs. all comparison is the threshold for a r "random model" now 33% instead of 50%?  And finally, is there a better way to go about doing this/visualizing it?  EDIT: I know the pROC package has a multi class.roc function, but I don't totally get what it does.

In other words, instead of having a two class problem I am dealing with 4 classes and still would like to assess performance using AUC.


Let $a$, $b$, $c$ and $d$ be positive numbers. Prove that: $$\frac{a}{a+b}+\frac{b}{b+c}+\frac{c}{c+d}+\frac{d}{d+a}\geq1+4\sqrt{\frac{abcd}{(a+b)(b+c)(c+d)(d+a)}}$$ We can prove this inequality by using $b=a+u$, $c=a+v$ and $d=a+w$ after squaring of the both sides. I am looking for a nice proof. Thank you!

Let $a$, $b$, $c$, $d$ and $e$ be positive numbers. Prove that:  $$\frac{a}{a+b}+\frac{b}{b+c}+\frac{c}{c+d}+\frac{d}{d+e}+\frac{e}{e+a}\geq\frac{a+b+c+d+e}{a+b+c+d+e-3\sqrt[5]{abcde}}$$  Easy to show that $$\frac{a}{a+b}+\frac{b}{b+c}+\frac{c}{c+a}\geq\frac{a+b+c}{a+b+c-\sqrt[3]{abc}}$$ is true  and for even $n$ and positives $a_i$ the following inequality is true.  $$\frac{a_1}{a_1+a_2}+\frac{a_2}{a_2+a_3}+...+\frac{a_n}{a_n+a_1}\geq\frac{a_1+a_2+...+a_n}{a_1+a_2+...+a_n-(n-2)\sqrt[n]{a_1a_2...a_n}}$$


Definition: Let $R$ be a ring with $1$. $r\in R$ is a unit if and only if $r \neq 1$ and there exists $s\in R, s \neq 1$ such that $rs=1=sr$.  Let $R$ be a ring with $1$ and let $I$ be a proper ideal of $R$.      $R/I$ has no units $\Rightarrow$ $R$ has no units?   What about the converse,      $R$ has no units $\Rightarrow$ $R/I$ has no units?

Assume that $\pi$ is an automorphism of a finite group $G$. Let $S$ denote the set $\lbrace g \in G: \pi (g)=g^{-1} \rbrace$. Show that if $|S|>\frac{3|G|}{4}$, then $G$ is an abelian group.    Anyone has any idea on how to solve this ? I have no idea how to start.


I know the limit is $\sqrt 3$. And I tried proving that the sequence is decreasing from $a(2)$, yet when I got to this point, I have been stuck: $a(n+1) - a(n) = (3 - a(n)^2) / 2a(n)$ ? Thank you very much!

Suppose that $S_0$ and A are positive numbers, let $$S_{n+1} = \frac{1}{2}\left(S_n +\frac{A}{S_n}\right)$$ with $n \geq 0 $.      (a)Show that $S_{n+1} \geq \sqrt{A} $ if $n \geq 0$       (b)Show that $S_{n+1} \leq S_n $ , if $n \geq 1$      (c) Show that $s= \lim\limits_{n \rightarrow \infty} S_n$ exists      (d) find s   (a) Show that $S_{n+1} \geq \sqrt{A} $ if $n \geq 0$  Given $$P_n:  S_{n+1} = \frac{1}{2}\left(S_n +\frac{A}{S_n}\right) \geq \sqrt{A}$$  $$P_0: S_{1} = \frac{1}{2}\left(S_0 +\frac{A}{S_0}\right) \geq \sqrt{A}  $$  We assume that $P_n$ is true  $$P_{n+1}: S_{n+2}= \frac{1}{2}\left(S_{n+1} +\frac{A}{S_{n+1}}\right)$$ by assumption $$S_{n+2}= \frac{1}{2}\left(S_{n+1}\left(1 +\frac{A}{(S_{n+1})^2}\right)\right) \geq \frac{1}{2}\left(\sqrt{A}\left(1 +\frac{A}{(\sqrt{A})^2}\right)\right)$$ $$ S_{n+2}= \frac{1}{2}\left(S_{n+1} +\frac{A}{S_{n+1}}\right) \geq \sqrt{A}  $$  It follows that $S_{n+1} \geq \sqrt{A} $    (b) Show that $S_{n+1} \leq S_n $ , if $n \geq 1$  $$S_{n+1} \leq S_n$$ $$\frac{1}{2}\left(S_n +\frac{A}{S_n}\right) \leq S_n $$ Dividing by $S_n$ $$\frac{1}{2}\left(1 +\frac{A}{S_n^2}\right) \leq 1 $$ $$\frac{A}{2S_n^2} \leq \frac{1}{2}$$ $$A \leq S_n^2$$ $$S_n \geq \sqrt{A}$$ As  $S_{n+1} \leq S_n$ yields a true statement, it follows $S_{n+1} \leq S_n$ is true.    (c) Show that $s= \lim\limits_{n \rightarrow \infty} S_n$ exists  Since $S_{n+1} \leq S_n$, the sequence is non-increasing,   using the non-increasing theorem stating that      if $\{S_n\}$ is non-increasing then $$\lim\limits_{n \rightarrow > \infty} S_n = \inf\{S_n\} $$     (d) find s    Is the argumentation in (a) and (b) appropriate? Also, I have to admit I m getting less confident in my argumentation (c) and (d). How to proceed in (c) and (d)?  Much appreciated for your input or help.


I have been on Stack Overflow for some time.  It is an AMAZING resource and don't know if I would've got through the past 18 months without it.  I love it!  Problem is that I have "1" reputation.  All of my questions have already been asked and answered.  My "new user restrictions" mean: - I can't vote up answers that were helpful. - I can't comment on answers.  I sometimes have a question to ask one of the users that answered someone else's question but I can't.  This is hard!  How do I get a break?  Do I have to troll for a couple of days/weeks/months to answer enough questions in the hope someone votes some of them up just so I can do some basic functions?  Perhaps the number of site visits and length of membership could count for something?

As a new user, I find it impossible to contribute to the community or to even begin contributing. I know why the reputation system is in place and I respect it, but at the same time it is too hard on new users.  It started with me wanting to upvote a question...     "Vote Up requires 15 reputation"   Just to appreciate a good question that helped me I need 15 rep? OK..., so I find out how I can get reputation points. More or less, I need to ask a question for +5 and add an answer for +10. I don't have any questions at the moment and I don't want to spam a random question, but I did happen to have a slightly different answer to the earlier question that I wanted to upvote. So I try to answer...     This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.   Now... I know this doesn't apply to every question, but at the same time, this means I'm forced to answer yet another question, and I don't want to go around looking for random questions and spam irrelevant answers...  Now I'm stuck. So I try to talk to some other users in the chat rooms about how to go about getting reputation points and how they first started. I entered into a "casual chat room".     You must have 20 reputation on Meta Stack Overflow to talk here.   Yes... I can understand why this is enforced, because we don't want new users to spam chat rooms, but all I wanted to do was ask for help. So I can't even talk to anyone about my newbie problems. So okay, I'll just settle for upvoting comments in the question that helped me. I don't see an upvote hover-over button so I can't even do that.    So now I'm stuck at 1 reputation point, unable to cross that 15 rep barrier, and even after posting this question I'll only have 6 rep points and still unable to do anything, and I'll be forced to look for questions to answer. Yes, I should be contributing to the community, but I shouldn't need to begin answering or making questions to upvote questions and answers. This only spurs more spam/irrelevant answers if anything.   Very, very, very new-user unfriendly.


I have a file in which the fields are separated by comma.  Some example input:  col1,"1,2",col3 col1,"1,2,3",col3 col1,"1  2,3",col3 col1,"1 "2,3"",col3   Now, I have to fetch the second column, so that I get:  "1,2" "1,2,3" "1  2,3" "1 "2,3""   cut -d, -f2 file doesn't do what I want.  So, how can I retrieve column 2 from the above input?

I work with CSV files and sometimes need to quickly check the contents of a row or column from the command line.  In many cases cut, head, tail, and friends will do the job; however, cut cannot easily deal with situations such as  "this, is the first entry", this is the second, 34.5   Here, the first comma is part of the first field, but cut -d, -f1 disagrees. Before I write a solution myself, I was wondering if anyone knew of a good tool that already exists for this job.  It would have to, at the very least, be able to handle the example above and return a column from a CSV formatted file.  Other desirable features include the ability to select columns based on the column names given in the first row, support for other quoting styles and support for tab-separated files.  If you don't know of such a tool but have suggestions regarding implementing such a program in Bash, Perl, or Python, or other common scripting languages, I wouldn't mind such suggestions.


How can I make n-level loop similar to my manual 5 level for loop in java  public class TestPermutation {    public static void main(String[] args)   {     int[] input = {1,2,3,4,5};     ma(input);   }    public static void ma(int[] input)   {     int n = input.length;     for(int i=0;i<n;i++)     {       System.out.println(input[i]);       for(int j=i+1;j<n;j++)       {         System.out.println(input[i]+" "+input[j]);         for(int k=j+1;k<n;k++)         {           System.out.println(input[i]+" "+input[j]+" "+input[k]);           for(int l=k+1;l<n;l++)           {             System.out.println(input[i]+" "+input[j]+" "+input[k]+" "+input[l]);             for(int m=l+1;m<n;m++)             {               System.out.println(input[i]+" "+input[j]+" "+input[k]+" "+input[l]+" "+input[m]);             }           }         }       }     }   } }   How can we do? Anyway this is an output from my code.   1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 5 1 2 4 1 2 4 5 1 2 5 1 3 1 3 4 1 3 4 5 1 3 5 1 4 1 4 5 1 5 2 2 3 2 3 4 2 3 4 5 2 3 5 2 4 2 4 5 2 5 3 3 4 3 4 5 3 5 4 4 5 5

In other words, can I do something like  for() {     for {        for {        }     } }   Except N times? In other words, when the method creating the loops is called, it is given some parameter N, and the method would then create N of these loops nested one in another?  Of course, the idea is that there should be an "easy" or "the usual" way of doing it. I already have an idea for a very complicated one.


I want to install the 64bit version of ubuntu 14.04 on my new laptop which you can find  if you want to check its stats.  My question is:  Are there programs in software center which do not work on the 64bit version?  (I know this question is a duplicate but the similar questions I found are about 2 or 3 years old)

Are there still general problems using the Ubuntu 64bit version ? I heard that most of the programs do not work out of the box?  Will I notice a significant speed-boost? Until now I have always used Ubuntu 32 bit.


Let $A$ and $B$ be sets. There seem to be two ways of writing $A \subseteq B$: \begin{equation} \forall x(x \in A \implies x \in B) \end{equation} or \begin{equation} (\forall x \in A) x \in B \end{equation}  I usually see the first one written. I am curious to know if the second version is in proper form, logically. Is it a well-formed formula (wff)? Is there any way to prove these two formulas are logically equivalent?    By the way, I am quite interested in this area of question. For example, I commonly want to know when it is better to write \begin{equation} (\forall x \in A) x \in B \end{equation} or \begin{equation} \forall x \in A (x \in B) \end{equation} is there anything I could read that would teach me the difference, and which is more preferable?

When we write "for all n where n is an element of A, P(n) is true." do we mean for all n, if n is in A then Pn or for all n, n is in A and Pn?


$f(x)$ is a continuous function, for some fixed $a\in(0,1)$ and some real number A satisfy $$\lim\limits_{x\to0}\frac{f(x)-f(ax)}{x}=A$$ Prove that $f(x)$ is differentiable at $x=0$ and compute the value of $f'(0)$.

Problem:   If $f(x)$ is continous at $x=0$, and $\lim\limits_{x\to 0} \dfrac{f(ax)-f(x)}{x}=b$, $a, b$ are constants and $|a|>1$, prove that $f'(0)$ exists and $f'(0)=\dfrac{b}{a-1}$.   This approach is definitely wrong:    \begin{align} b&=\lim_{x\to 0} \frac{f(ax)-f(x)}{x}\\ &=\lim_{x\to 0} \frac{f(ax)-f(0)-(f(x)-f(0))}{x}\\ &=af'(0)-f'(0)\\ &=(a-1)f'(0) \end{align}  I will show you a case why this approach is wrong:     \[f(x)= \begin{cases} 1,&x\neq0\\ 0,&x=0 \end{cases}\]   $\lim_{x\to0}\dfrac{f(3x)-f(x)}{x}=\lim_{x\to0} \dfrac{1-1}{x}=0$   but $\lim_{x\to0}\dfrac{f(3x)}{x}=\infty$,$\lim_{x\to0}\dfrac{f(x)}{x}=\infty$   Does anyone know how to prove it? Thanks in advance!


I want to find the number of elements of $GL(n,\mathbb{Z_p})$, $p$ prime. For $p=2$ I got 6 elements since one of diagonals has to be $0$ and the other $1$. But how should I deal with an arbitrary $n$ ? The expression for the determinant gets complicated.

$F$ is a finite field of order $q$. What is the size of $\operatorname{GL}_n(F)$ ?  I am reading Dummit and Foote "Abstract Algebra".  The following formula is given:  $(q^n - 1)(q^n - q)\cdots(q^n - q^{n-1})$.  The case for $n = 1$ is trivial.  I understand that for $n = 2$  the first row of the matrix can be any ordered pair of field elements except for $0,0$. and the second row can be any ordered pair of field elements that is not a multiple of the first row.  So for $n = 2$  there are $(q^n - 1)(q^n - q)$ invertible matrices.  For $n\geq 3$, I cannot seem to understand why  the formula works.  I have looked at Sloane's OEIS A002884.  I have also constructed and stared at a list of all $168$ $3\times 3$ invertible matrices over $GF(2)$.  I would most appreciate a concrete and detailed explanation of how say $(2^3 - 1)(2^3 - 2)(2^3 - 2^2)$ counts these $168$ matrices.


In the movie "Miss Peregrine's Home for Peculiar Children", Mr. Barron kidnaps Miss Peregrine in order to use her in his immortality experiment.  With Miss Peregrine gone, the time loop she created in September 1943 collapses, stranding Jake and the other kids in 1943.  So to rescue Miss Peregrine, they take a ship to Blackpool, where Miss Avicet's loop in January 2016 is located.  While aboard the ship, Emma says this to Jake:     Jake, you know what this means don't you? ... We have to get to our own time but you don't.  You can continue to live in 2016... If we kill Barron, he'll be gone but time will carry on.  He won't go to Florida, Abe won't die, and you can go home."   My question is, how would killing Barron save the life of Jake's grandfather Abe?  Abe died in July 2016, so theoretically killing a version of Barron from before then would prevent Abe's death.  But that's not what happens; in Blackpool Barron speaks about Abe's death:     I tracked Abe Portman for months.  All I needed was a few minutes to get the location of Miss Peregrine's loop from him.  But no, Mathus couldn't wait.  And instead, I had to masquerade as a psychiatrist for three weeks in Florida.   So if Barron has already participated in the Florida events, how will killing Bareon mean that "he won't go to Florida [and] Abe won't die"?  Is it supposed to be that if you die within a time loop you get erased from the timeline or something?  This is mighty peculiar, no pun intended.

In the end of Miss Peregrine's Home for Peculiar Children we see Jake going to his grandfather's house. And he is alive even when he was killed in the very beginning of the movie.   Why was Abraham "Abe" Portman, the grandparent of Jake Portman alive when they destroyed Mr. Barron?   Does it mean that everyone killed by Mr. Barron returned to life or just the ones who lived in Miss Peregrine's loop?


Discussions in the literature (e.g. ) say in no uncertain terms that it is meaningless to consider time variations of fundamental dimensionful parameters such as c, G, ... If one must consider this type of thing, one must use dimensionless parameters. Fine, the arguments seem reasonable.  But what if one wishes to investigate a theory where a (nearly)classical theory morphs through time continuously into a fully relativistic theory. The naive way to approach it would be to make c vary with time, starting with some very large value and decreasing. But that is not permitted.   Is this because such a theory is physically unrealizable?   Similar question: is it meaningful to say that two universes in the multiverse differ in their value of a dimensionful parameter, say, hbar, and that this difference has anthropic consequences?  Last similar question: Can a theorist predict roughly the properties of a model of the universe where hbar is replaced by hbar/2? I assume the answer to this is YES.  I do not feel that this is a duplicate. The referenced discussion (which an excellent link) is relevant (and mentions the same paper that I identify) but my problem is really - how does one interpret the paper. Can I predict different physics for separate universes, for example? Can I have a weakly relativistic universe that morphs into a strongly relativistic one? Or a completely nonrelativistic that changes into relativistic?

Every so often, one sees on this site* or in the news† or in journal articles‡ a statement of the form "we have measured a change in such-and-such fundamental constant" (or, perhaps more commonly, "we have constrained the rate of change of..."). These are often shrouded in controversy, with people often stating quite loudly that statements of the sort are meaningless and even unverifiable, but the end result is often quite confusing. Thus:   Is it possible to speak about changes  to a physical constant that contains dimensional information? If not, why not?     *          .$\ \ $† .$\ \ $‡ .


The jury were/was called and their individual opinion were noted .what will come were or was

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


I have a 4 output monitor set up. Monitor 1,2 and 3 are physical monitors and Monitor 4 is a duplicate of Monitor 1 that goes to an HDMI capture card.   Now this was easy enough on windows but on linux the only answer I see everywhere is using Win + P shortcut which mirrors a the desktop across ALL 4  displays. How would I go about only combining display 1 and 4?   Thanks fellas.

Is it possible to have 2 extended monitors and get the third being a mirror of one of the two extended?   I'm pretty sure it's not possible through the interface but it may be possible through commands or configuration file.  If it's seems weird for you, here is my setup :    2 monitors, pretty classic working with dual monitor 1 big TV that I use as a projector to show things off to people (on meetings for example)


links to an Australian article (sourced from Reuters) about a football team. The article has the following title:     Ukraine speed to test new-look Germany defence   I understand that the word "speed" is a verb here. However, why not "speeds"? Since "Ukraine" is a singular noun, I expect it to be "Ukraine speeds".  UPD. Thanks to the detailed comments and answers below, it turns out the question is not about collective nouns, but rather about "speed" being a noun and not a verb.  UPD2. As noted in comments replying to my UPD above: Not necessarily! If the rest of the article were in American English, yes, it would clearly be a noun. But the rest of the article is clearly written in British English or similar and "Ukraine" as an identifier for the team is a plural noun in BrEng. (We know it's BrEng because it says "Ukraine... are certain to test...") So it really could be either, the only way to be sure would be to ask the author their intent.  Now I'd really like to find out from the author!


Does someone has an example of r.v. $X,Y$ that are normal, $(X,Y)$ has a density, but $(X,Y)$ is not Gaussian ? I can't find such an example.    I saw as an example, $X$ is $N(0,1)$ distributed, $\mathbb P(S=1)=\mathbb P(S=-1)=\frac{1}{2}$ and $Y=SX$. Then $X$ and $Y$ are normally distributed, but $(X,Y)$ is not Gaussian. But since $\mathbb P(X^2-Y^2=0)=1$, $(X,Y)$ has no density. So, this "counter-example" doesn't work. Any idea of a counter-example ?

We know if two RVs are marginally Gaussian and uncorrelated, they can be not jointly Gaussian. How about two correlated RVs which are marginally Gaussian? Are they Jointly Gaussian or no, there are occasions when they are not Jointly Gaussian?


I'm studying algorithm's complexity and I'm still not able to determine the complexity of some algorithms ... Ok I'm able to figure out basic O(N) and O(N^2) loops but I'm having some difficult in routines like this one:       // What is time complexity of fun()?     int fun(int n)     {       int count = 0;       for (int i = n; i > 0; i /= 2)          for (int j = 0; j < i; j++)             count += 1;       return count;     }   Ok I know that some guys can calculate this with the eyes closed but I would love to to see a "step" by "step" how to if possible.  My first attempt to solve this would be to "simulate" an input and put the values in some sort of table, like below:   for n = 100 Step   i 1      100 2      50 3      25 4      12 5      6 6      3 7      1   Ok at this point I'm assuming that this loop is O(logn), but unfortunately as I said no one solve this problem "step" by "step" so in the end I have no clue at all of what was done ....  In case of the inner loop I can build some sort of table like below:   for n = 100 Step   i      j 1      100    0..99 2      50     0..49 3      25     0..24 4      12     0..11 5      6      0..5 6      3      0..2 7      1      0..0   I can see that both loops are decreasing and I suppose a formula can be derived based on data above ...  Could someone clarify this problem? (The Answer is O(n))

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


I just have a simple c main program and have a class, VoronoiDiagramGenerator.cpp and VoronoiDiagramGenerator.h is the class definition, in main function call the class method.  Why I use the gcc and g++ giving different output. Using gcc have some error, but it's OK using g++.  jack@ubuntu:~/dev/practice$ gcc main.cpp VoronoiDiagramGenerator.cpp -o main /tmp/ccbaXM5L.o:(.eh_frame+0x6b): undefined reference to `__gxx_personality_v0' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::VoronoiDiagramGenerator()': VoronoiDiagramGenerator.cpp:(.text+0x22): undefined reference to `operator new(unsigned int)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::reset()': VoronoiDiagramGenerator.cpp:(.text+0x168): undefined reference to `operator delete(void*)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::geominit()': VoronoiDiagramGenerator.cpp:(.text+0xc3d): undefined reference to `sqrt' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::dist(Site*, Site*)': VoronoiDiagramGenerator.cpp:(.text+0x1318): undefined reference to `sqrt' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::getfree(Freelist*)': VoronoiDiagramGenerator.cpp:(.text+0x17aa): undefined reference to `operator new(unsigned int)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::cleanup()': VoronoiDiagramGenerator.cpp:(.text+0x18cd): undefined reference to `operator delete(void*)' VoronoiDiagramGenerator.cpp:(.text+0x1917): undefined reference to `operator delete(void*)' VoronoiDiagramGenerator.cpp:(.text+0x1923): undefined reference to `operator new(unsigned int)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::cleanupEdges()': VoronoiDiagramGenerator.cpp:(.text+0x19e4): undefined reference to `operator delete(void*)' VoronoiDiagramGenerator.cpp:(.text+0x1a3f): undefined reference to `operator delete(void*)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::pushGraphEdge(float, float, float, float)': VoronoiDiagramGenerator.cpp:(.text+0x1a8b): undefined reference to `operator new(unsigned int)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::pushDelaunayGraphEdge(float, float, float, float)': VoronoiDiagramGenerator.cpp:(.text+0x1afa): undefined reference to `sqrt' VoronoiDiagramGenerator.cpp:(.text+0x1b1a): undefined reference to `operator new(unsigned int)' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::clip_line(Edge*)': VoronoiDiagramGenerator.cpp:(.text+0x1e50): undefined reference to `sqrt' /tmp/ccCeOqcL.o: In function `VoronoiDiagramGenerator::generateVertexLinks()': VoronoiDiagramGenerator.cpp:(.text+0x33f4): undefined reference to `operator delete[](void*)' VoronoiDiagramGenerator.cpp:(.text+0x3413): undefined reference to `operator delete[](void*)' collect2: ld 返回 1   but using g++, all is OK  jack@ubuntu:~/dev/practice$ g++ main.cpp VoronoiDiagramGenerator.cpp -o main jack@ubuntu:~/dev/practice$

What is the difference between g++ and gcc?  Which one of them should be used for general c++ development?


What is the difference between in the meaning of  these two sentences:         I will remember to post the letter.   I will remember posting the letter.      How can we know where to use gerund or infinitive? Are there any specific verbs that can be used particularly for gerund and infinitive separately?

Remember is one of the verbs which we always put to + infinitive after it:     I always remember to do my homework.   But actually not always. This sentence is an exact example of what I mean:     Do you remember visiting Church of the Holy Sepulchre?   or     Do you remember to visit Church of the Holy Sepulchre?   I think the first sentence explains the meaning of your visiting to the church I really ask if you can remember that visit you made.  But think about the second sentence, it really asks if you remember to do what I've advised you (visiting the church)  I think it depends on meaning. I have to say that the first sentence is more accurate, which gives the meaning clearly.


What I mean by that is when a program is running (let's say, telnet), any inputted text gets lost when something is written on the screen. For example, on a chat server,  I type  > Hey, I'd like to ask y  Suddenly I receive a string, and now my screen looks like this  > Hey, I'd like to ask yHey, what's up?  I can still continue to write and hit return to successfully send the string, but I'd like to have my input move down like so  Hey, what's up?  > Hey' I'd like to ask y  How can I do that? I use bash and lxterminal  UPDATE So here's a quick and dirty solution: anytime your input gets lost, press ^R to recover it.

Suppose I run a command like this in the terminal:  ~$ echo 'sleep 2; echo "hello!"' | sh   then start typing the next line. After two seconds the words "hello!\n" will be inserted into whatever I'm writing. I know there is a workaround to this (pressing up then down which refreshes the prompt), however on other systems that don't have history---eg, using a MUD through telnet---this is not possible.  Does anybody know of an ncurses app or terminal emulator that separates stdin from stdout? This seems pretty easy to make in ncurses, you just have to use some clever dup2s, but before I make it I want to know if someone has done it before.  Any other solutions to the main problem are welcome, as well.


I want to use Cypress and a regular expression to select an element which contains a certain text. This get() command works: cy.get('[data-cy=tile]').contains(new RegExp(myVar))  But this command fails: cy.get('[data-cy=tile]:contains(' + new RegExp(myVar) + ')')  Is there a way to use a regular expression within jQuery :contains()?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I have some questions with the definition of a class inheriting STL vector. This class is suppost to publicly inherit from std::vector, but I keep getting the following error from the compiter. I am almost certainly that it is due to faulty including of <vector>, yet I don't know how to fix it.  In file included from useMVector.cpp [Error] invalid use of incomplete type 'class MVector<T, size>' In file included from MVector.cpp      from useMVector.cpp [Error] declaration of 'class MVector<T, size>' recipe for target 'useMVector.o' failed   The relevant code is listed here:    useMVector.cpp:    #include <stdlib.h> #include "MVector.cpp"  using namespace std;  int main() {     return 0; }   MVector.h:  #ifndef _MVECTOR_ #define _MVECTOR_  #include <iostream> #include <stdlib.h> #include <vector>  using namespace std;  template<class T, int size> class MVector : public std::vector<T> {     public:         // constructer:         MVector();         // operator=, copy constructor and destructor from std::vector         // iterator from std::vector          // methodes:          // addition with vector         template<class T2>         MVector<T, size> operator+(const MVector<T2,size>& y);         ... };  #endif // _MVECTOR_   MVector.cpp  #include "MVector.h"  template<class T, int size> MVector<T, size>::MVector() : std::vector<T>::vector(size, 0) {};  template<class T2, class T, int size> MVector<T,size> MVector<T,size>::operator+(const MVector<T2,size>& y) {  }

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.)


Let's complete the proof of the above question. For any two ideals $A$ and $B$ in any arbitrary ring R it is clear that $AB \subset A \cap B$. This result is also true for $M_n(A)$ and $M_n(B)$. Now how proceed to show the  equality?

It well known that if $R$ is a commutative ring then every ideal of $M_n(R)$ is $M_n (I)$ where $I$ is an ideal of $R$. My question is: Suppose that $I$ and $J$ are ideals of $M_n(R)$, i.e., $I=$M_n(A)$ and $J=$M_n(B)$. When is the statement $M_n(AB)=M_n(A)M_n(B)$ correct?


I'm trying to extract value after Colon in a string  which will be integer value later to compare, but I see $ and \r after extracting, so I'm not able to compare integers  Ex:  count=$(echo "Bengaluru:10" | awk -F":" '{print $2}')   Result will be 10 only, but actually it's having additional hidden characters like $'10\r'  So I'm not able to compare this value with some other integer.  Please help me, how can i remove those values $ and \r

I'm trying to accomplish a simple task using the excellent post : I would like to remove all files from a folder except those listed in a .txt file contained in the folder. The syntax works fine, but for some reason all files are removed - basically the script is saying that there are no correspondences between the filenames in the folder and those in the .txt file - but I can see that there are!   I thought maybe there might be some invisible white space after my file names that I cannot see (in the folder or the .txt file). But I don't think so...Is there another solution that I am not thinking of?


How can I backup MySQL database incrementally and differentially ?  Does anyone have a script or recommended application for this purpose?  Thanks.

I use  for backuping up  my projects. but my Database's are not included. I'd like to backup all database's scheduling by day or hours.  Is there any tool to backup MySQL automatically?


Is there a way to set featured images in bulk? I have created a bunch of posts (200+) and would like to set featured images to all of them in bulk - without using the admin panel and setting the featured image for each post one by one?

I have over 1500 posts I imported from Tumblr. While the images were imported into the gallery, I need to make sure there's a featured image for each. How do I make the images (12 per post minus 30 that don't have images) a featured image automatically?


Some of the incoming objects I handle in my projects have unknown structures; properties I cannot depend on.  I decided to try to  to help.  function getObjKeys(obj) {   var keys = [];   var regex = /"([^:,{}]+)":/g;   var str = JSON.stringify(obj);   var m;   while (m = regex.exec(str)) {     keys.push(m[1]);   }   return keys; }   My question is, is there a better way of getting all the properties of an object with unknown structure? A mini-question also is; could the regex be improved? This is assuming the object is one level deep.  I figure, after getting the keys, one could iterate through them to find other objects and therefore other keys.

How do I enumerate the properties of a JavaScript object?  I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object.


I have a metal (probably stainless steel based on its weight) cooking pot that seems to be getting old. I am not worried about the outside, but on the inside, I can see:   Shallow scratches Small oxide dots Overall a darker (yellowish/brownish) color that looks as if it is always uncleaned     The usual tools I use (soap and a sponge) do not seem to work well against that... No matters how hard I try.  I saw  and I wondered which products he was using.   At first () he uses a white cream cleanser and he says "calcium carbonate". It looks to me like ceramic glass cleaner, but it may be completely different, and he only uses that for the outside, so maybe it is not safe for the inside? Then () he uses stainless steel polisher to make it shiny   I have a couple of questions:   Is that the recommended way to go? Can I use any stainless steel polisher or any cleanser considering this is a cooking pot? (I plan to cook food on it... :-D) What are the generic names of those products? Or would you recommend only specific products/brands? I live in Spain and I may be unable to find certain brands if they are local to your country.

Just started using a stainless steel pan. First thing I cooked in it was bacon followed by some fried rice. Stuff stuck to it, but a quick soak and it all came off. However, once I cleaned and dried it there is a kind of gray discoloration on the bottom of the pan. It essentially disappears if it gets wet, but when I dry it, it comes back. First -- is this normal? If not, is there a way to fix it?  First, this is what it looks like dry:    Second, this is what it looks like wet:     It's an .


Why does lightning have branches? A straight line from the clouds to the ground should be the path of least resistance, then why does it branch out?  If it is because of different gases present in air then would lightning be a straight line if the air had uniform composition?

Everyone have seen and knows how lightning occurs. But then I realized that lightning never occurs in straight lines but it follows branching. But Why is that so? Why can't lightning goes in straight line rather than generating multiple branches just likes in this picture ?


The Event Horizon Telescope programme would naturally like to be able to capture Saggitaius A-star. I read an article over a year ago, which seemed to suggest there was an obstacle obscuring the view (possibly a cloud of interstellar matter, but I cannot recall). Is it indeed the case that something is obscuring the view of the EHT?

The first image of a black hole has been released today, April 10th, 2019. The team targeted .  Why didn't the team target  at the center of our own galaxy? Intuitively, it would seem to be a better target as it is closer to us.


There are quite a few posts on this site that deal with the problem of abbreviating names in the bibliography to two letters, for instance Charles to Ch. The suggested solutions include using the , either manual or  using source maps, or by defining a new commands such as .  However, when I try to implement the first solution myself I do not get the desired results. Also the option with the new command does not work and keeps giving me nesting errors for some reason.   MWE  \documentclass{article} \usepackage{filecontents}  \begin{filecontents}{\jobname.bib}   @book{Book1,   author = {Doe, {\relax Ph}ilippe},   title  = {An Important Book},   publisher = {Publisher},   date = {2012}, } \end{filecontents} \usepackage[style=verbose,giveninits=true, backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document}  \nocite{*}  \printbibliography \end{document}

In French and some other European langages, given names should be abreviated keeping digraphs and trigraphs.    John should be abreviated as J. Clare should be abreviated as Cl. Charles should be abreviated as Ch. Christine should be abreviated as Chr. Philippe should be abreviated as Ph. etc.   The classical solution was to modify the given name in the bibliographical data from      Charles   to     {\relax Ch}arles       A nice  written by Yves de Saint-Pern uses the search and replace option with regexp in Biber/Biblatex to iterate over your bib file and insert on the fly      \relax    in the author field.   However, the latest Biber breaks this possibility. A bib entry with a \relax in the author field will result in a faulty *.bbl file with unmatched braces. See  and .  The only workaround is to use Biber extended name format which is cumbersome :   It makes it impossible to edit your bibliography file in a GUI application It is a lot of manual work   Is there a possibility to modify Biber's initials creation routine to create correct giveni field if the given name starts with a list of digraphs and trigraphs ?  I include a MWE below :  \documentclass{article} \usepackage{filecontents}  \begin{filecontents}{\jobname.bib}   % Extended name format   @book{Book1,   author = {family=Doe, given=Charles, given-i={Ch}},   title  = {An Important Book},   publisher = {Publisher},   date = {2012}, } @book{Book2,   author = {Dolittle, Charlotte},   title  = {Another Important Book},   publisher = {Publisher},   date = {2014}, } @book{Book3,   author = {Theodore Smith},   title  = {A very Important Book},   publisher = {Publisher},   date = {2016}, }  @book{Book4,     address = "Turnhout",     author = "Arnoux, Mathieu and Gazeau, Véronique and Demetz, Christine",     publisher = "Brepols",     shorttitle = "Les chanoines réguliers de la province de Rouen",     title = "{Des clercs au service de la réforme. Études et documents sur les chanoines réguliers de la province de Rouen}",     year = "2000" } \end{filecontents} \usepackage[style=verbose,giveninits=true, backend=biber]{biblatex} % Does not work anymore with the latest Biber % \DeclareSourcemap{ %  \maps[datatype=bibtex]{ %     \map{ %     \step[fieldsource=author,  %             match={Charles}, %             replace=\regexp{\{\\relax \x20Ch\}arles}] %   } %  } % } \addbibresource{\jobname.bib} \begin{document}  \cite{Book1}  \cite{Book2}  \cite{Book3}  \cite{Book4} \end{document}


seatList1 = {'seat1': 1, 'seat2': 2, 'seat3': 3, 'seat4': 4, 'seat5': 5, 'seat6': 6, 'seat7': 7, 'seat8': 8, 'seat9': 9, 'seat10': 10 }      We were asking to make a ticket selling system, there are ten seats in total. I am planning to check they are ordered or not by data types. Once user typed their details in and choose an empty seat, the value of seat they choose will become to their first name. So that, to check a seat is ordered or not, the only thing I need to do is check those value of keys are integer or string  For example: user typed his details first, and then choose seat1, after that the value of 'seat1' key will be his name, instead of   'seat1': 1   But  'seat1': 'Tom'   If the value is a String instead of a number, there's no doubt that this seat has been ordered. But I don't know how to do that. I can use "if" to solve this problem, but that is too inefficient. Is there a better way to solve it? Thank you very much!

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


I am currently building a human body. I already finish it using Mirror modifier, now I need to place hands in another position but they are the same object. I need to separate to have two objects.

Why I can't apply mirror modifier? Here's screen


I came across some scenarios like these:     Case 1: Obviously not true       Q: Why does the sun rise and fall every day?   A: Because the Earth .   A2: Because .     Case 2: Letting the OP do what is declared not to       Q: How can I charge my phone without a charger?   A: Try the USB ports on your computer.   A2: Go buy a charger.    Case 3: Attempt to joke (despite looking like a real answer)       Q: What's this round bird in bright red? [An image]   A: It may be a rare or mutated species of sparrow.   A2: It's a .   A3: It's an .    Should I flag A2/A3 as NAA in those cases?

I think we can all agree, this sucks:  If you've been around a little while, you've probably encountered hundreds of answers like this in various forums, some of them even marked as "The Answer" by well-meaning1 forum admins looking to close a thread. We could try to enumerate the commonly-observed problems with it...  Link is probably broken If link isn't broken, it's spam If link isn't spam, it's to some broadly-related resource that the answerer found by pressing "I'm feeling lucky" when googling the question's title.  ...but the real issue here is that we don't know! Even if the link was originally pointing directly to the most awesomeest answer ever for exactly the question being asked, there's nothing in the answer itself to even hint at what direction we're being pointed in. Strip the markup, and this is what you're left with:  i think you should take The tutorial HERE! This will help you a lot  Is there even one tiny speck of information there? No. Even the title of the page being linked to would have provided something to go on, but that was entirely too much work. So let me be clear: this sort of response is not an answer. If you see this, flag it. Moderators, if you see it flagged, delete it. There's really only one valid exception to this rule, and that's when the question is:  Suggest me some tutorials where i can learn quick.  Don't get me wrong, it's still a bad answer - but when the question is kinda asking for bad answers this is to be expected. Close or flag the question and move on - this is much more efficient than hanging around to babysit it by deleting every crap answer that inevitably shows up. If you're still reading, you're probably getting really bored by now. "Gee, Shog - answers that contain ZERO information are terrible, horrible, very-bad things? What shocking revelations will you share next?" Yeah. It's really simple... Except, . See, the problem is that once you step away from black-and-white "answers / doesn't answer" decision-making, things get... Interesting. And all those other answers with links in them See, this is an answer:  And so is this:  Yes, they're both very short, and yes, they contain links. But strip the markup, and you still get at least a little bit of useful information. Does that mean these answers should forever hang around the site? No, not necessarily - if it turns out they're just not that useful, they should probably still be removed - or at very least, down-voted so that they rank below other answers. Just remember: if the text of the post contains an honest attempt at answering the question, then it is an answer - so don't flag it otherwise, and if you do, don't complain if your flag gets declined. Answers & Apples If you're still confused, forget about answers. Think about apples instead:  Answers are just like that, but less tasty in pies.  1 By which I mean to say, "criminally lazy"


While inserting a DVD (which plays well in a DVD player) into my laptop, a message appears, requesting me to install gstreamer1.0-plugins-bad.  What is this? How can I solve this problem and watch my DVD?

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 ?


It says that I'm receiving the error at line 506 which is the one saying   firstTxt.setText(newPerson.getFirstname());   Here is the first two lines of error code: Exception in thread   AWT-EventQueue-0" java.lang.NullPointerException at      dataawaredatajava.JFrame.addButtonActionPerformed(JFrame.java:506)    This only happens whenever I click on the "Add?" button or addButton. I use a similar method of casting my object with my update button, but that seems to work perfectly fine!  private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {                                               switch (addButton.getText()) {         case "Add New Person":             lstPerson.clearSelection();             blockForAddOrUpdate(true);             addButton.setEnabled(true);             addButton.setText("Add?");             break;         case "Add?":             Person newPerson = (Person)lstPerson.getSelectedValue();             firstTxt.setText(newPerson.getFirstname());             lastTxt.setText(newPerson.getLastname());             dobTxt.setText(newPerson.getDob());             occupationTxt.setText(newPerson.getOccupation());             marriedChB.setSelected(newPerson.getMarried());             noOfKidsJSp.setValue(newPerson.getNumberofkids());             dataAwareDataJavaPUEntityManager.getTransaction().begin();             dataAwareDataJavaPUEntityManager.persist(newPerson);             dataAwareDataJavaPUEntityManager.getTransaction().commit();             addButton.setText("Add New Person");             blockForAddOrUpdate(false);             personList.add(newPerson);             lstPerson.setSelectedValue(newPerson, true);             break;

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?


When going to , you see a list of suggested edits, like this (if you have 10k rep/a diamond, otherwise you only see what you reviewed):    It says 'suggested edit on XXXXX'. But it would be more useful if you could see the fate of the suggested edit there, instead, like it shows when you look at what someone suggested:    So then the /history tab would show something like this:    This would make it easier to see what the fate of the edit was, instead of counting reviews.   "Okay, this got... hmm.. one approve, one reject - where's the other review? - ah, here it is. Okay, that was rejected."

Today, I started exploring the reviews section on Stack Overflow and specially the Triage queue.  In the  section I can see all my reviews, and also the triage category I chose (for example, 'Looks OK', 'Should Be Improved', 'Skip', etc.), but I can't see the final consensus of each review unless I click on one of them, and I have to select each review manually to see its consensus.  Why doesn't the review's history include the consensus of our each review next to it, so every one will know that he is doing reviews correctly? And how can I suggest that to the community?  Update:  Maybe something like this:    Second Update:  Following Saposhiente's remarks within comments, I want to clarify that the checkmarks in the picture above means that the reviewer's choice matched the consensus.  However, the picture is only a simplified example regarding the emplacement where we can add the consensus column. Thus, I join the opinion of Saposhiente, suggesting to add a:     Consensus column that lists what exactly the consensus was, and   bolds the differing items


So I have this as part of a mail sending script:  try:     content = ("""From: Fromname <fromemail>     To: Toname <toemail>     MIME-Version: 1.0     Content-type: text/html     Subject: test      This is an e-mail message to be sent in HTML format      This is HTML message.
This is headline.
     """)   ...      mail.sendmail('from', 'to', content)   And I'd like to use different subjects each time (let's say it's the function argument).  I know there are several ways to do this.  However, I am also using ProbLog for some of my other scripts (a probabilistic programming language based in Prolog syntax). As far as I know, the only way to use ProbLog in Python is through strings, and if the string is broke in several parts; example = ("""string""", variable, """string2"""), as well as in the email example above, there's no way I can make it work.  I actually have a few more scripts where using variables in multiline strings could be useful, but you get the idea.  Is there any way to make this work? Thanks in advance!

I want to do something like String.Format("[{0}, {1}, {2}]", 1, 2, 3) which returns:  [1, 2, 3]   How do I do this in Python?


I have three stack overflow items that I never received updates for in the last few days. I have my preferences set to receive daily inbox updates to my gmail address but I didn't get any updates. I was viewing a SO question today and I saw that there was stuff in my inbox so that's how I noticed. Admins if you need more information you can e-mail me because I don't know if I'll receive an update when you reply to this bug. Thank you

Until about a week ago I was getting daily email from stackexchange.com (for every day on which I had any activity) notifying me of comments, answers to my questions, and chat pings across the network.  I haven't received any of these notices for since June 9, though I continue to see the corresponding activity on profile pages and in the global notifications area in the top left corner of every page.  These messages haven't started going to my spam trap; it appears that they aren't arriving.  Why might that be?


import java.util.Scanner;  public class test {     public static void main(String[] args)     {         String gender;         Scanner scan = new Scanner(System.in);          System.out.println("What is your gender, male of female?");         gender = scan.nextLine();           if( gender == "f"||gender =="F"||gender =="female"||gender              =="Female"||gender =="FEMALE")         {             System.out.println("A female" );         }         if( gender == "m"||gender =="M"||gender =="male"||gender              =="Male"||gender =="MALE")         {             System.out.println("A male.");         }     } }   No matter what the user enters, the result always goes to else statement. Any way to fix this?

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?


How to  find the distribution of distribution function of bionomial distribution Bin(n,p) and Poisson distribution P(a) ?

I am looking for the maximum likelihood estimator (MLE) for the .  I understand the derivation of the MLE for a  and a , but I am unable to derive the MLE equation for the Poisson-binomial distribution.


On the front end of my PHP, I want the user to decided what field to insert into among multiple fields.  I can do that with multiple 'if' statements like I have below, but that makes for a long code.  Can I use a variable for the field, i.e Song_id, Album_id?  I've tried doing something like "Insert into Song(?) values (?)" but that doesn't seem to work.      case "insert":     if ($table=="Song"){         if($field=="Song_id"){             $stmt = $db->prepare("INSERT into Song(Song_id) values (?)");             $stmt->bindValue(1, $_POST['value'], PDO::PARAM_INT);             $stmt->execute();             echo "done";}         break;}     if ($table=="Song"){         if($field=="Alubm_id"){             $stmt = $db->prepare("INSERT into Song(Album_id) values (?)");             $stmt->bindValue(1, $_POST['value'], PDO::PARAM_INT);             $stmt->execute();             echo "done";}         break;}   etc, etc, etc.  Thanks!

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I have a strange and recurring problem on my recently upgraded Mac running macOS Catalina  First of all, Catalina has a new feature where you can Show/hide the hidden files on your machine using Cmd-Shift-Period. Press it once to show the hidden files press it again to hide them. AFAIK, this specific keystroke feature is new in Catalina (prior to Catalina, I always used the hack to set the finder defaults via the terminal to see my hidden files).  I normally keep my Finder windows showing the hidden files, because I want to see them.  Recently I noticed that all of  my files on the desktop were greyed out-- like hidden. They were just random files I happened to have left on my desktop.  And what's strange is that they don't begin with a period (.), the way normal hidden files do. They seem to behave as hidden files even though they don't begin with a period.  If I press Cmd-Shift-Period, they disappear from view like all of the other hidden files. But unlike the other hidden files, they aren't supposed to be hidden.    If I press Cmd-Shift-Period again, they appear along with the other hidden files in my finder windows    Just to be clear: these files were NOT hidden yesterday, and I didn't do anything that I know of to cause this. And as noted below, it doesn't happen right away when I put new files on the desktop. I noticed it last week too but now it seems to have done it to even more files that I put on the desktop more recently than when I first noticed it (The same behavior-- Finder seems like it took some visible files and turned them into these invisible files without changing the file names or adding pre-pending periods like you'd expect for invisible files.)  1) I'm not sure what is causing this. What could be causing these files to appear in this hidden state and to have been normal files and then somehow get morphed into this hidden state?  2) How can i fix them? I've never seen hidden files like these-- I've only ever seen hidden files that begin with periods (so with this, you can add or remove the period to change its visibility)— if I do "Get Info" on these hidden files I can see the normal Get Info window, which has options for many things like "Hide extension" but no option to set the file to visibile/hidden.  Was this a new feature introduced in Catalina?  When I create new files on the desktop, the new files are not hidden and behave normally:

Problem: because of an unkown reason all my desktop files and folders were hidden. i managed do unhide all folders, but i can't unhide the files i tried to unhide the files via terminal chflags nohidden filename but it doesn't work. i also checked if the hidden flag is placed, but there is no hidden flag on the files (but they aren't visible). here is the output via terminalcommand ls -lo: -rw-r--r--@ 1 username     13669 19 Aug 11:54 filename.txt i also tried an app called InvisibliX (which isn't under development anymore), with no success and of course i used the searching function, which lead me to this:  with no further success I'm thankful for every hint you may have for me! Some additional information regarding the OS: Mac OS X Catalina 10.15.6


I'm trying to do the following..     if "ps | grep -e file" then       true;    else       false;   What would I need to do to make the string n the if statement execute the linux command listed?

How do I call shell commands from inside of a Ruby program? How do I then get output from these commands back into Ruby?


In my lecture, the Prof proved the following statement:  Assume $R$ has maximal ideals $\mathfrak{m}_1,\dots,\mathfrak{m}_r$, such that $\mathfrak{m}_1\cdots\mathfrak{m}_r = (0)$. Then $R$ is noetherian iff $R$ is artinian iff $\text{length}(R)$ is finite.  His proof starts as follows: Define $\mathfrak{a}_0 := R, \mathfrak{a}_1 := \mathfrak{m}_1,\dots, \mathfrak{a}_i := \mathfrak{m}_1\cdots\mathfrak{m}_i$., etc. Then $\mathfrak{a}_r = 0$. This gives us a descending chain of ideals $R = \mathfrak{a}_0 \supset \mathfrak{a}_1\supset\cdots\supset \mathfrak{a}_r = 0$.  Here is the statement that I don't understand: He says that each $\mathfrak{a}_i/\mathfrak{a}_{i+1}$ is an $R/\mathfrak{m}_{i+1}$ vector space. Of course $R/\mathfrak{m}_{i+1}$ is a field, as $\mathfrak{m}_{i+1}$ is maximal. However, I still don't see how or why we can see $\mathfrak{a}_i/\mathfrak{a}_{i+1}$ as a vector space over that field.

Let $M$ be an $R$-module and let $I$ be an ideal of $R$ such that $I$ is a subset of $\mathrm{Ann}(M)$. Define a product of an element of $R/I$ by an element of $M$ as follows: $$(r+I)\cdot m=rm.$$ (a) Show that this product is well defined. (b) Show that this product, together with the sum of elements of $M$, turns $M$ into an $R/I$-module.  My answer for (a): Let $r+I,s+I \in R/I$ such that $r+I=s+I$. Then $(r+I)m=(s+I)m$, for all $m \in M$. Then $rm=sm \implies r=s$  (since the inverse of $m$ is in $M$), so the product is well defined.  Is my answer to (a) correct?  How can I use Ann(M) to answer (b)?


I am trying to uninstall MySQL completely from Ubuntu 16.04 LTS,but I am facing an issue saying:      The following packages have unmet dependencies:   mariadb-client-10.0 : Depends: libdbd-mysql-perl (>= 1.2202) but it is not going to be installed   mariadb-client-core-10.0 : Depends: mariadb-common (>= 10.0.24-7) but it is not going to be installed   E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.     I tried also to uninstall Mariadb but I have always the same problem.  Any idea !!

I installed MySQL using sudo apt-get. Now I need to remove it from my system.  How can I do that?


I am running Fedora 22 on a Dell Laptop. I plan on migrating to a desktop soon which will also run Fedora 22. What is the best way to go about backing up and restoring my laptop configuration to the new system? I do not have any 3rd party backup/restore software on this system. Would dd be able to work for me? Would a system level backup work or would I need to limit dd to partitions that are not "hardware or device" specific. I am also open to any other suggestions or ideas.

I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle?  Obviously xorg configs would change and proprietary ATI drivers and such would have to be recompiled (maybe?). Is there more to it than I'm thinking of?  Assume the 2 computers are from the same era, ie both i7s but slightly different hardware.  Update: Thanks for the answers. This is mostly for my own curiosity. I have my linux system up and running at work, but eventually I'd like to move to a computer that I can get dual video cards into so I can run more than 2 monitors. But not any time soon


I've got an issue with jQuery.  Since WordPress "refuses" to update the jQuery 1, and I need a higher one to run a simple script containing the function $.trim, is there anyway to just load jQuery 3 for just that script, and then revert to jQuery 1?  I tried the plug-in that "updates" the jQuery, but then did bootstrap complain that it can't run on jQuery 3 and above..  As you so might realise with this question, I'm a newbie regarding jQuery and JavaScript..  so is there any "temp load new jQuery and unload it after script finished" way?  Edit: the following error is displayed in the console:  (index):1599 Uncaught TypeError: Cannot read property 'trim' of undefined     at HTMLOptionElement.<anonymous> ((index):1599)     at jquery.js?ver=1.12.4-wp:2     at Function.grep (jquery.js?ver=1.12.4-wp:2)     at z (jquery.js?ver=1.12.4-wp:2)     at a.fn.init.filter (jquery.js?ver=1.12.4-wp:2)     at (index):1599   This is the short jQuery I'm trying g to run:  jQuery('select option').filter(function() { return !this.value || $.trim(this.value).length == 0 || $.trim(this.text).length == 0; }).remove();

I have used this jquery script on many of my sites with the same theme, settings, etc.  It's in a wordpress Genesis Child theme.  On my current local build, however, when I click on an a href that has the class "scroll", I am getting a console error that reads:    Line 19 of my app.js is this code that I have never had an issue with before:  $(".scroll").click(function () {         if (location.pathname.replace(/^\//, "") === this.pathname             .replace(/^\//, '') && location.hostname === this.hostname         ) {             var target = $(this.hash);             target = target.length ? target : $("[name=" + this                 .hash.slice(1) + "]");             if (target.length) {                 $("html, body").animate({                     scrollTop: target.offset().top                 }, 1000);                 return false;             }         }     });   I am running jQuery 3.3.1. I have commented out all code in the app.js to identify where the issue may be coming from. This code is right at the top and I have added console.logs all over the document, which show in Console.  What am I doing wrong here?  Thank you!


I have a list of the locations of each text file that need this done inside add.txt  For example inside add.txt I have the following  /root/QuestDiary/MapQuest_Def/Mon_Umyounkijang.txt /root/Market_Def/06Inn_SamakwAr-5.txt   I need a script to open every text file in that list and add ;; to the top and bottom of each of them. It also must also open files/folders that have capitals, it's listed as /root/Market_Def/06Inn_SamakwAr-5.txt in the file but the actual file name is /root/Market_DEF/06Inn_SamakWar-5.txt  06Inn_SamakWar-5.txt currently looks like  %100 +40 +1  [@main] #IF checkpkpoint 2  #SAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_0   #ELSESAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_1  [@buy]  #SAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_2  [@sell]  #SAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_3  [Goods]  Jerk 1000 1  [@TalkToQuest] #CALL [NPCQuest_Def\02Weapon_BichonSung-10.txt] @NPCQuest_Check  [@everythingreward] #CALL [System\TotalRewardSystem.txt] @TotalRewardSystem   It should change to  ;; %100 +40 +1  [@main] #IF checkpkpoint 2  #SAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_0   #ELSESAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_1  [@buy]  #SAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_2  [@sell]  #SAY #INCLUDE [..\Convert_Def\Market_Def\01Meet_BichonSung-10.txt] @Convert_01Meet_BichonSung-10_3  [Goods]  Jerk 1000 1  [@TalkToQuest] #CALL [NPCQuest_Def\02Weapon_BichonSung-10.txt] @NPCQuest_Check  [@everythingreward] #CALL [System\TotalRewardSystem.txt] @TotalRewardSystem  ;;

I have a directory full of text files. My goal is to append text to the beginning and end of all of them. The text that goes at the beginning and end is the same for each file.  Based on code I got from the web, this is the code for appending to the beginning of the file:  echo -e 'var language = {\n$(cat $BASEDIR/Translations/Javascript/*.txt)' > $BASEDIR/Translations/Javascript/*.txt   This is the code for appending to the end of the file. The goal is to add the text }; at the end of each file:  echo "};" >> $BASEDIR/Translations/Javascript/*.txt   The examples I drew from were for acting on individual files. I thought I'd try acting on multiple files using the wildcard, *.txt.  I might be making other mistakes as well. In any case, how do I append text to the beginning and end of multiple files?


A group $G$ is called perfect if $G$ coincides with its commutator subgroup, which is generated by the elements of the form $xyx^{-1}y^{-1}$, with $x,y\in G$. Let $SL_2(\mathbb{Z})$ denote the group of $2\times 2$ matrices with integer entries and determinant $1$. I think it is not perfect, but I do not know how to prove it, maybe by giving a counter example.

So far, I know the matrices $$S=\left( \begin{matrix} 0&-1\\ 1&0 \end{matrix} \right), \quad T=\left( \begin{matrix} 1&1\\ 0&1 \end{matrix} \right) $$ generate SL$(2,\mathbb{Z})$. $S^2=(ST)^3=-I$. I also know the matrices $$X=\left( \begin{matrix} 1&1\\ 1&2 \end{matrix} \right), \quad Y=\left( \begin{matrix} 2&1\\ 1&1 \end{matrix} \right) $$ with their inverses $X^{-1},Y^{-1}$ generate SL$(2,\mathbb{Z})'$, the commutator subgroup. I'm interested in what the quotient $SL(2,\mathbb{Z})/SL(2,\mathbb{Z})'$ is. In general, how would I go about computing the quotient of two matrix groups? I'm trying to use GAP but I'm having a lot of trouble!


I used ALTER INDEX REBUILD to remove index fragmentation. In some cases, REBUILD does not seem to remove this fragmentation. What are the reasons why REBUILD does not remove fragmentation?

I have used ALTER INDEX REBUILD to remove index fragmentation. In some cases REBUILD does not seem to remove this fragmentation. What are the reasons why REBUILD does not remove fragmentation? It seems that this happens especially with small indices.


My computer Configuration Pentium D102GGC2 2.80 GHz 2GB Ram 1TB Hard disk Ati radeon xpress 200 Plz suggest which ubuntu version will good for me

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


Can classical mechanics be derived from quantum mechanics as the same way thermodynamics derived from statistical mechanics?

Let me explain in details. Let $\Psi=\Psi(x,t)$ be the wave function of a particle moving in a unidimensional space. Is there a way of writing $\Psi(x,t)$ so that $|\Psi(x,t)|^2$ represents the probability density of finding a particle in classical mechanics (using a Dirac delta function, perhaps)?


I understand to stop iterating a while loop you can either fulfill a condition or you can use a break command. For example  apples = 10  while apples > 0:     apples -= 1     or  while True:    if apples == 0:       break    else:       apples -= 1   However this is obviously a very basic example, and I'm not sure what is more useful, easy or professional in much larger examples of code. I get the feeling this might end up being more of a situation to situation thing, but still, I can't seem to find an answer on google. Thanks.  edit:  example of using the first example in a past project:  finished_adding_object = False                       while finished_adding_object == False:              print "System >>> Please enter new " + cls.__name__ + " name. If the user doesn't want to create a new " + cls.__name__ + ", please enter \"exit\"."                pending_new_object = raw_input("User >>> ")              while pending_new_object == "exit":                                                         print "System >>> Please confirm, the user wishes to abandon creating a new " + cls.__name__ + "? (y/n)"                 abandon_confirmation = raw_input("User >>> ")                  if abandon_confirmation == "y":                                                   pending_new_object = None                     finished_adding_object = True                  elif abandon_confirmation == "n":                                                                            pending_new_object = None                  elif abandon_confirmation != "n" or "y":  # User told if input is invalid.                                      print "System >>> " + abandon_confirmation + " is an invalid command."

I often use this code pattern:  while(true) {      //do something      if(<some condition>) {         break;     }  }      Another programmer told me that this was bad practice and that I should replace it with the more standard:  while(!<some condition>) {      //do something  }      His reasoning was that you could "forget the break" too easily and have an endless loop. I told him that in the second example you could just as easily put in a condition which never returned true and so just as easily have an endless loop, so both are equally valid practices.  Further, I often prefer the former as it makes the code easier to read when you have multiple break points, i.e. multiple conditions which get out of the loop.  Can anyone enrichen this argument by adding evidence for one side or the other?


I could just prove that the sequence is bounded but couldn't find the exact limit.

As I have heard people did not trust Euler when he first discovered the formula (solution of the ) $$\zeta(2)=\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}.$$ However, Euler was Euler and he gave other proofs.   I believe many of you know some nice proofs of this, can you please share it with us?


Every time I try to reinstall LAMP I get this error. Please tell me how to fix it:  Errors were encountered while processing:  javascript-common  phpmyadmin E: Sub-process /usr/bin/dpkg returned an error code (1)   The result for sudo dpkg --configure -a:  Setting up phpmyadmin (4:4.5.4.1-2ubuntu1) ... Determining localhost credentials from /etc/mysql/debian.cnf: succeeded. dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf granting access to database phpmyadmin for phpmyadmin@localhost: already exists. creating database phpmyadmin: already exists. populating database via sql...  done. dbconfig-common: flushing administrative password dpkg: error processing package phpmyadmin (--configure):  subprocess installed post-installation script returned error exit status 1 Setting up javascript-common (11) ... dpkg: error processing package javascript-common (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  phpmyadmin  javascript-common   The result for sudo apt-get install -f :  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up javascript-common (11) ... dpkg: error processing package javascript-common (--configure):  subprocess installed post-installation script returned error exit status 1 Setting up phpmyadmin (4:4.5.4.1-2ubuntu1) ... Determining localhost credentials from /etc/mysql/debian.cnf: succeeded. dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf granting access to database phpmyadmin for phpmyadmin@localhost: already exists. creating database phpmyadmin: already exists. populating database via sql...  done. dbconfig-common: flushing administrative password dpkg: error processing package phpmyadmin (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  javascript-common  phpmyadmin E: Sub-process /usr/bin/dpkg returned an error code (1)   And sudo apt-get update gives me:  Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Hit:2 http://ppa.launchpad.net/cinelerra-ppa/ppa/ubuntu xenial InRelease Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease Hit:4 http://ppa.launchpad.net/ondrej/php5/ubuntu xenial InRelease Ign:5 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial InRelease Hit:6 http://ppa.launchpad.net/wine/wine-builds/ubuntu xenial InRelease Ign:7 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial Release Ign:8 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial/main Sources Ign:8 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial/main Sources Ign:8 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial/main Sources Ign:8 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial/main Sources Ign:8 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial/main Sources Err:8 http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial/main Sources   404  Not Found Reading package lists... Done W: The repository 'http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/source/Sources  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Just purchased Windows 8. In a shared household (including people that do not have hotmail Microsoft Accounts) how can I set-up a generic password for the computer which everyone can use without giving out my Microsoft Account password?  I find that setting up a local password stops me from using features such as the Windows Store, yet using my Microsoft Account password means all users have access to my Microsoft Account.

Windows 8 asks for my Live login details when I login - I'd prefer to use a local password separate from my Live password. Is it possible to use a local password?  What do I lose out on if I don't use a Live account password?


I'm having a hard time trying to grasp the concept of mathematical induction. After doing some cursory research, I believe I somewhat understand the base of it but I just stumbled upon another issue "why can we actually say if it is true for n=1, n=k and n=k+1 then it is true for all numbers?" Let's say what if it doesn't work at one specific value. For example, 3/(x-1000) is defined at x=1,2,3... but undefined at x=1000.   Sorry if this question might sound absurd to you as my mathematical knowledge is currently only at a high school level.   Also thank you so much for all of your help!

Context: I'm studying for my discrete mathematics exam and I keep running into this question that I've failed to solve. The question is as follows.    Problem: The main form for normal induction over natural numbers $n$ takes the following form:   $P(1)$ is true, and for every $n, P(n-1)\to P(n).\qquad\qquad\qquad\text{[Sometimes written as $P(n)\to P(n+1)$]}$   If both 1 and 2 are true, then $P(n)$ is true for every $n$.  The question is to prove the correctness of the form above.    My work: My idea was to make a boolean statement and if it's a tautology in a true false table. That means the statement is always correct.  I've tried many times but I've failed.  Here is the original question in Hebrew:  n טענה כלשהי לגבי מםפר טבעי  $P(n)$ תהי   אם מתקימיים שני התנאים הבאים:  1- הטענה $P(0)$ נכונה  2- לכל n>0, $P(n)$ נכונות הטענה $P(n-1)$ גוררת את נכונות הטענה   אז $P(n)$ נכונה לכל מספר טבעי n  הוכיחו את נכונות משפט זה


For example, right now, to be able to continue when pressing a button the following things should happen:  An input text box should not be empty.  Internet connection should be active.  Date should be the current one.   Would it be better if I display a message telling all errors that have been found or tell one of them every time the user presses the button? I'm better explaining it: My idea is to either show 1 or more snackbars that either tell about one of these problems one per one, or these snackbars that show all together. The code structure for the first case would be something like. if (noemptytext) {     if (internetActive)     {         if (correctDate)         {          }         else         {             showSnackBar(wrongdatemessage);         }     }     else     {          showSnackbar(nointernetmessage);     } } else {    showSnackbar(emptytextmessage); }  And for the second case: String messageAllErrorsFound="";  if (emptytext) {     messageAllErrorsFound+=emptytextmessage }  if (nointernet) {     messageAllErrorsFound+=nointernetmessage }  if (wrongDate) {     messageAllErrorsFound+=wrongdatemessage }  if (!messageAllErrorsFound.equals("")) {     showSnackbar(messageAllErrorsFound); }

For context: This is a desktop application interacting with a service running on W7.  I'll try and leave all the technical details out of this, but here goes:  Part of my application has to send a large amount of data to the server which is then validated server side. Any errors found are sent back to the client to handle.  My 'problem' is that this large amount of data (in this case, a person) can have a lot of things 'wrong with it' which can be summarised into two main errors:   Required fields not being filled in. (Name not provided) Data being entered but still invalid due to a business rule (person is under the age of 18, phone number entered as ABC123, assessment was completed, but no completion date was entered, etc.)   Now even with all the client side validation I can put in, there still might be cases when a number of errors that aren't detected. (business rules, mostly) How should these errors be displayed to the client? I only see three real options here:   Displaying the server side errors into the UI somehow. I'd like to avoid this possible since I'm not 100% sure on how to code this without writing a mass of spaghetti code to determine which error is for which field. List one error at a time. When a user submits the data, show the first error that is returned and ignore all the others. When the user resubmits, shows the next one, and so on. I have a feeling this could annoy some people who will probably send me angry emails along the lines of 'Why don't you show me all the errors at once?!?!?' Show them all at once. I could have all the errors showing at once, but this is going to cause a few problems:   The dialog box should potentially be huge if they've somehow got 15 or so errors. No one is going to remember all 15 problems unless they screenshot the message or write them down. The API on Windows might not allow me to fit all message in one dialog leaving users to click through an unknown amount of dialogs.    How should I approach this?


Can i install Ubuntu on a samsung GT-M3710, it doesn't have android, it has SHP.  Thank you very much.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


Posit a way to harness gravity for energy and widespread use of this new technology world-wide.  Could it be damaging to Earth, over a few hundred years, slowing or speeding up rotation or the orbit of our planet?

Are tidal power plants slowing down Earth's rotation to the speed of the orbiting moon? (1 rotation per 28 cca days)   Are they vice versa increasing the speed of moon orbiting by generating some waves in gravitation field?  If yes, can you calculate how much energy must be produced by how many tidal power plants (compare it to average nuclear plant please) to slow down the Earth's rotation to 25 hours / day?


For $K$ is an infinite field and $f(x_1,x_2,\ldots,x_n)$ $\in K[x_1,x_2,\ldots,x_n]$ . Prove that If $f(a)=0 $ for any $a \in K^n$ then $f=0$.  Can any one help me?

Let $K/F$ be a finite field extension and suppose that $F$ is infinite. Is it possible to have a nonzero polynomial $p \in K[x_1,...,x_n]$ that vanishes in $F^n$?


I have the equation $ax \mod n = 0$ $a,x,n$ are integers and only $x$ is unknown. Are there any properties of $x$ that follow from this equation? I tried the following myself, but I am stuck: Because of the $\mod n $ it follows that $ax = pkn$  with $k,p$ being other unknown integers, thus: $x=p\frac{kn}{a}$ And this means that I know that $x$ has the property that it can be divided by $\frac{kn}{a}$. But is that all that I can derive? And how can I calculate $\frac{kn}{a}$?

I tried to start by showing that $ \frac{a}{\gcd(a,b)} $ is always an integer, let's call it $d$, because $a$ is always a multiple of $(a,b)$ based on the definition of a g.c.d. I then tried to show that if $a | b$ then $a|bc$ from the theorem that states that $a|b$ implies that $a|bc$ for any integer $c$, but I cant seem to prove that $a | b$ or that $a|bc$ only if $d \mid c$ (where $d = \frac{a}{\gcd(a,b)}$ ). Any help would be much appreciated.


I am in under graduate first year. I want to learn some advanced real analysis. Can you give me some suggestions? One suggestion I got is Rudin's mathematical analysis. Can I buy that?

Does anyone have a recommendation for a book to use for the self study of real analysis? Several years ago when I completed about half a semester of Real Analysis I, the instructor used "Introduction to Analysis" by Gaughan.   While it's a good book, I'm not sure it's suited for self study by itself.  I know it's a rigorous subject, but I'd like to try and find something that "dumbs down" the material a bit, then between the two books I might be able to make some headway.


We have that $\lambda, \overline{\lambda} \in \rho(T)$ and $\lambda \in \mathbb{C}$. Now, I want to show that a symmetric operator and closed operator $T: \operatorname{dom(T)} \rightarrow H$ must be self-adjoint. Notice, that $T$ is not necessarily densily defined. Does anybody here have any ideas? Actually, I concluded the closedness of this operator from the fact that the resolvent is not empty by myself, so this may be somehow a tautology in this exercise.

For symmetric operators one has: $$A\text{ symmetric}:\quad\mathcal{R}(A\pm\imath)=\mathcal{H}\implies A^*=A$$ How to prove this in an unveiling way?


I know there are a lot of other posts about parsing comma-separated values, but I couldn't find one that splits key-value pairs and handles quoted commas.  I have strings like this:  age=12,name=bob,hobbies="games,reading",phrase="I'm cool!"   And I want to get this:  {   'age': '12',   'name': 'bob',   'hobbies': 'games,reading',   'phrase': "I'm cool!", }   I tried using shlex like this:  lexer = shlex.shlex('''age=12,name=bob,hobbies="games,reading",phrase="I'm cool!"''') lexer.whitespace_split = True lexer.whitespace = ',' props = dict(pair.split('=', 1) for pair in lexer)   The trouble is that shlex will split the hobbies entry into two tokens, i.e. hobbies="games and reading".  Is there a way to make it take the double quotes into account?  Or is there another module I can use?  EDIT: Fixed typo for whitespace_split  EDIT 2: I'm not tied to using shlex. Regex is fine too, but I didn't know how to handle the matching quotes.

I have a string that looks like this:  "Name1=Value1;Name2=Value2;Name3=Value3"   Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this:  dict = {     "Name1": "Value1",     "Name2": "Value2",     "Name3": "Value3" }   I have looked through the modules available but can't seem to find anything that matches.    Thanks, I do know how to make the relevant code myself, but since such smallish solutions are usually mine-fields waiting to happen (ie. someone writes: Name1='Value1=2';) etc. then I usually prefer some pre-tested function.  I'll do it myself then.


Is it possible to get this star symbol in Linux, as shown in this screen shot?

I just ran across a screenshot of someone's terminal:    Is there a list of all of the characters which can be used in a Bash prompt, or can someone get me the character for the star and the right arrow?


I've been trying to figure out how to change a player's gamemode from adventure to survival when walking out a certain radius. The map size I'm using is 2956x2956 & I wanna be sure to cover all of it. I tried using /gamemode creative @a [r=10] with a repeat block just to test out what'll happen. But no matter how far I am from the block it keeps setting my gamemode to creative. Can someone show me how to properly write what I'm trying to do for minecraft 1.12.2? Screenshots would be much appreciated.  (also how can I stop the commands from blowing up my chat lol?)

Is there a way to set an "Adventure Mode Boundary" in Minecraft?  I am trying to create this village where players can spawn in, and then set out to explore the world and build and do normal minecraft stuff. I don't want them to destroy this village, so I want them to be in adventure mode when they are in the village and then switch them to survival when they leave, and vice-versa. When they return to the village, they get switched back to adventure mode.  In other words, I want to set an "Adventure Mode Boundary" to protect buildings. I am working without mods. I am hoping there is an simple way using command blocks.


Does Android support controlling volume of every running app individually in the context mentioned below?  I have podcast app and I would like to run a game while listening to podcast. The game sounds are too high.  The question  deals with an objective of having per-app specific volume but this question at the minimum deals with two or more apps at a time, providing different sound levels simultaneously.

I'm looking for a way to set the media volume depending on the app being used.  I generally keep my media volume down fairly low so as not to annoy my fellow humans overmuch; while playing Angry Birds, for instance.  When I go into Doggcatcher, though, I generally want to crank the media volume way up, because I'm listening through earbuds or my car speakers and need that volume way up.  Not such a big deal, but if later I go back to Angry Birds and I forgot to turn the volume back down it wakes up the whole house.  This is exacerbated by the fact that the media volume does not follow the "Sound off" setting (accessed by a long-press of the power button).  So, is there a way to do what I want?  (Android 4.0)


Current Case: Offer a bounty on a question. Question is a decent question (positively upvoted). 1 week later, question has had no answers, bounty expires and disappears.  Suggestion: In the case where it's a reasonable question which, regardless, garners no response. The bounty is refunded upon expiration.  Thoughts?

I've read that bounties on questions move the question to the featured questions. I think this is a complete waste, bounties and featured questions should be made separate. If a bounty is not awarded the system should ask the person who made the bounty if they would like to keep the bounty available indefinitely (or until they run out of the reputation to keep the bounty in place) or not. Paying reputation for the featured questions tab which is not refunded is fine, that truly is taking up a spotlight. I don't care if an important question I have is featured, otherwise I would create a much higher bounty.  The problem is bounty periods do not account for more obscure subjects/topics/languages/etc and even if the s/t/l is not obscure people have a tendency to post generic answers to questions, not testing code if code is involved, etc. In example if I place a bounty on an Apache related question I wouldn't mind having it awarded six months later, it truly takes someone with striking design and development skills to understand very complex questions sometimes. By having the bounty die-off the important question is no longer appears important and the more difficult question has a greatly reduced chance of being answered. A useful answer half a year from now is better than a slim chance of an answer that is even half on-topic.  Bounties should be fully refunded if they should expire.  Featured questions should expire without being refunded to prevent questions from perpetually reappearing in the featured questions list.  Bounties and featured questions should be allowed to coexist though after the featured question period expires the bounty should remain though the question removed from the featured questions list.  Featured questions essentially work better for more popular topics which more people are likely to answer.  Long lasting bounties essentially work better for more obscure topics which will much longer before the right person with the capability to correctly answer the question.


I think it will in the lines we construct the dihedral groups. The group generated by $a,b$ such that $a^q=e$ , $b^p=e$ and one more condition.

I am reading the following material:  . At page 5, there is a proof classifying all groups with order $pq$(they are all primes and $p$ is not equal to $q$). I am lost in the last two sentence, which claims the semidirect product are all isomorphic. Could someone help me to understand it? Thanks!


I have found some regex to match textblocks between brackets. However, what if I have some String with nested brackets and I only want the most external part of it.   eg. "foo bar [first [second] [third]] asdf ]]]]"  I would like to be able to match the text between the first opening bracket and it's closing bracket, leaving everything inside intact.   Result would be: "[first [second] [third]]"

I need a regular expression to select all the text between two outer brackets.  Example: some text(text here(possible text)text(possible text(more text)))end text  Result: (text here(possible text)text(possible text(more text)))


I would like to not validate fields if I submit button with ajax callback. Currently, on every button click it displays validation errors of another fields. The button doesn't submit the form, it does some another action (add more fields).

I have an AJAX button that should update form fields according to data already provided by user:   'ajax_button' => array(     '#type' => 'button',     '#value' => t("Scan for tags"),     '#ajax' => array(       'callback' => 'ajax_tag',       'wrapper' => 'dynamic-tags-fieldset',       'method' => 'replace',       'event' => 'click',       'prevent' => 'submit click mousedown',     ),   ),   It works, but only if form is valid. Of course I do not want to validate it just yet. I don't care if all fields are filled, I only need my form to be updated at this very moment. How can I make form api not to invoke hook_form_validate() and not test #required fields?


I am on Ubuntu GNOME 15.10 with GNOME 3.18, but I don't like the normal applications launcher so I have installed Docky, however often Docky suddenly closes and I am forced to manually restart it, so I was wondering how I could make a daemon which runs all the time in the background that would check at regular intervals if Docky is running, and if it is not, run it?

docky crashes from time to time for me. How can I make it restart automatically after it crashed?


I came across the equation $$x^{1/x}=2^{1/2}$$ where $x\in\mathbb R$. One can immediately see that $x=2$ is a solution, but it is easy to miss that $x=4$ satisfies the equation as well. Verfiying that $2,4$ are solutions is not hard, but how would one go about formally solving this equation, i.e. how could one solve for $x$? I am asking because if the equation was  say $x^{1/x}=2^{1/3}$ then the two solutions would not be obvious.  Basically, how to fill in the dots: $$x^{1/x}=2^{1/2} \iff \ldots\iff x=2 \text{ or } x=4$$

How to solve this equation $$x^{2}=2^{x}$$   where $x \in \mathbb{R}$.  Por tentativa erro consegui descobri que $2$ é uma solução, mas não encontrei um método pra isso. Alguma sugestão?(*)  (Translation: By trying different values I've found that $2$ is a solution, but I couldn't find any method to this though. Any suggestions? )


I really, really need to recover the photos. Please tell me how to recover them

A person at a phone store reset all the contents of my Motorola Moto G Android phone, and I did not give them permission to do so. I had many important pictures and videos, but the even more important thing were the audio recordings I had created.  Is there ANY WAY to recover this data? I know it was reset, but I'm very stressed and would appreciate a pointer of a way to effectively recover some or all of the data without comprising it in the process. I am not using the phone, and had shut it off entirely. I'm aware that the more you use it, the more it overwrites the data. I NEVER had a backup, dumb, I know.  Thank you folks!  **Edit: I recovered most of my photos and videos just now through Google+, most of it was synced! But how can I recover my voice recordings ? That's what's most important to me. I used this app.   Unfortunately, my phone model never supported SD cards, so there's nothing there.


I am typing the following code with:  $M = \begin{pmatrix} x & y \\ z & w \\ \end{pmatrix}$   However, I found the output is    and the error message from LaTeX is    "missing value, treated as zero.   <to be read again>                       c "    I use amsmath package. I really do not know where is the "c" come from.  Any one would like to give me a hint to check how to fix the error?  Thanks!  \documentclass[twocolumn]{aastex6}  \usepackage{amsmath}  \usepackage{graphicx,psfrag,epsf}  \usepackage{enumerate}  \slugcomment{Comments}  \shorttitle{Title}  \shortauthors{Authors}  \begin{document}  $M = \begin{pmatrix} x & y \\ z & w \\ \end{pmatrix}$  \end{document}

My journal recently updated its official class file, , from version 5.2 to version 6.0. Apparently this was a major rewrite, as the journal abandoned its own class and based 6.0 off the ancient third-party emulateapj made before the journal published class files.  Now I'm getting an italix "c" at the beginning of my pmatrix with the new version. Here's an example:  \documentclass{aastex} \usepackage{amsmath} \begin{document} \begin{equation*}   \begin{pmatrix}     -1 & 0 \\     0  & 1   \end{pmatrix} \end{equation*} \end{document}   With 5.2 I get this:    while with 6.0 I get this:    Where is this coming from, and how do I get rid of it?