Why am I receiving Segmentation fault for extremely large inputs?

My question is to coding for a text editor where the operations * 1-append 2-delete k characters from last 3-print nth character 4-undo * Input format is * The first line contains an integer,Q, denoting the number of operations. Each line i of the Q subsequent lines (where 0<=i<=Q) defines an operation to be performed. Each operation starts with a single integer, t (where t is either 1 or 2 or 3 or 4), denoting a type of operation as defined in the Problem Statement above. If the operation requires an argument, t is followed by its space-separated argument. For example, if t=1 and W="abcd" , line i will be 1 abcd. * This is my code #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #define max 10000  char stack[max],super[max][max]; int top=-1,btop=-1,supert=-1; int bottom=1,qqq=0;  void push(char elem[]) {     //top++;     btop=top;     int i=0;     strcat(stack,elem);     strcpy(super[++supert],stack); }  void pop(int k) {     top=strlen(stack);     for(int i=0;i<k;i++)     {         top--;     }     stack[top]='\0';     /*int i=0;     if(top==-1)     {         strcpy(stack,"");     }     else     {         i=top;         while(i<btop)         {             i++;             stack[i]='\0';         }     }*/     strcpy(super[++supert],stack); }  int main()  {     int tot,op;     scanf("%d",&tot);     int q=0;     for(int i=0;i<tot;i++)     {         scanf("%d",&op);         switch(op)         {             case 1:;                 char elem[max];                 scanf("%s",elem);                 push(elem);                 //printf("%s\n",stack);             break;                          case 2:;                 int num;                 scanf("%d",&num);                 pop(num);                 //printf("%s\n",stack);             break;                          case 3:;                 int k;                 qqq++;                 scanf("%d",&k);                 /*if(qqq%2==0)                 {                     printf("%c\n",stack[k-3]);                 }                 else                 {                     printf("%c\n",stack[k-1]);                 }*/                 printf("%c\n",stack[k-1]);                              break;                          case 4:;                 supert=supert-1;                 strcpy(stack,super[supert]);                 q--;                 //printf("%s\n",stack);             break;         }         q++;     }        return 0; }  For extremely large inputs(operations in the order of 10^5 or 10^6) I am getting segmentation fault Also I could not increase the size of max because if I increase I am getting an error Why is it so?


Are there an uncountable subset of $\mathcal{P}(\mathbb{N})$ such that it has total order under the subset relation?

I think the answer is no. I tried to find finite subsets which has a total order under subset relation such as the following:   $\{\{a\},\{a,b\},\{a,b,c\},\{a,b,c,d\}\}$  Then I noticed that two sets with the same size cannot be present on this subset because they cannot be subsets of each other. Since there can be at most $1$ set with size $1$ and size $2$ and size $n$, I think such a subset would be at most countable. But I am not sure if my reasoning is correct. Please help me correct it if it is wrong. And if it is true, can you help me give a more formal proof?


Why don't we define "imaginary" numbers for every "impossibility"?

Before, the concept of imaginary numbers, the number $i = \sqrt{-1}$ was shown to have no solution among the numbers that we had. So we declared $i$ to be a new type of number. How come we don't do the same for other "impossible" equations, such as $x = x + 1$, or $x = 1/0$?  Edit: OK, a lot of people have said that a number $x$ such that $x = x + 1$ would break the rule that $0 \neq 1$. However, let's look at the extension from whole numbers to include negative numbers (yes, I said that I wasn't going to include this) by defining $-1$ to be the number such that $-1 + 1 = 0$. Note that this breaks the "rule" that "if $x \leq y$, then $ax \leq ay$", which was true for all $a, x, y$ before the introduction of negative numbers. So I'm not convinced that "That would break some obvious truth about all numbers" is necessarily an argument against this sort of thing.


confidence interval for $\hat{\theta}_{MLE}=\frac{1}{2}\underset{i}{\max} \ x_i$

Let $X_1, X_2, \dots , X_n$ be a random sample of size $n$ from the uniform distribution $U(2\theta)$ whose pdf is $f(x;\theta)=(2\theta)^{-1}$ , if $0<x<2\theta$ , zero otherwise. i) We can see that the MLE estimator is $\hat{\theta}_{MLE}=\frac{1}{2}\underset{i}{\max} \ x_i$ ii) Also we can find that $Z_n = n (\theta-\hat{\theta}) \overset{d}{\to} \exp(\theta^{-1})$ I would like to construct a confidence interval with approximate $(1 − \alpha)$-confidence level based on  $\hat{\theta}_{MLE}$. $\textbf{I wondered if both of these approaches are correct or if one is not, what is the problem?}$ $\textbf{A}$: We would like to have $\mathbb{P}[a<\hat{\theta}<b] = 1-\alpha$, where $a$ and $b$ are constants. $$1-\alpha = \mathbb{P}[a<\hat{\theta}<b] = F_{\hat{\theta}}(b)-F_{\hat{\theta}}(a)   \ \ \ \ \ \ \ , \text{where} \ F_{\hat{\theta}}(x)=(\frac{x}{\theta})^n $$ We can find $a$ and $b$ by solving: $$1-\frac{\alpha}{2}= F_{\hat{\theta}}(b) =(\frac{b}{\theta})^n \implies b = (1-\frac{\alpha}{2})^{\frac{1}{n}}\theta $$ $$\frac{\alpha}{2}=F_{\hat{\theta}}(a) = (\frac{a}{\theta})^n \implies a = (\frac{\alpha}{2})^{\frac{1}{n}}\theta$$ A confidence interval with $1-\alpha$ confidence level is $$\text{CI}_\theta(1-\alpha) \equiv \Bigg[  \hat{\theta}(1-\frac{\alpha}{2})^{\frac{1}{n}} \ , \  \hat{\theta}(\frac{\alpha}{2})^{\frac{1}{n}} \Bigg]$$ $\textbf{B}$ We would like to have $\mathbb{P}[a<\theta-\hat{\theta}<b] = 1-\alpha$, where $a$ and $b$ are constants. $$1-\alpha=\mathbb{P}[a<\theta-\hat{\theta}<b] = \mathbb{P}[na<n(\theta-\hat{\theta})<nb]$$ So give (ii): $$na = \theta \log(1-\alpha/2)$$ $$nb = \theta \log(\alpha/2)$$ So ; $$\text{CI}_\theta(1-\alpha) \equiv \Bigg[  \hat{\theta}-\frac{\hat{\theta}}{n}\log(1-\frac{\alpha}{2}) \ , \  \hat{\theta}-\frac{\hat{\theta}}{n}\log(\frac{\alpha}{2}) \Bigg]$$  Update: I got my answer from this  So both give a confidence interval with the same confidence level.


Let $X$ be a metric space and $D$ a set. Let $f: X \to D$. Show that $f$ is constant.

Let $X$ be a connected metric space and $D$ a set. Let $f: X \to D$ such that for every $x \in X$ there is a neighborhood in which $f$ is constant. Show that $f$ is constant.  I'm trying to get the hang of the problem, but this seems somewhat self explanatory? Perhaps I'm not understanding it correctly. If we have that $\forall x \in X:$ $\exists V_\varepsilon(x)$ such that $f$ is constant then wouldn't it imply that it must be constant all in all? The open sets acts as covers for $X$ and since $X$ is connected they cover whole $X$ right?


Auth null i don't know problem. Why I can't not use Auth Firebase in my project.  public class LoginOrg extends AppCompatActivity {      private TextView mAddroom , mManageroom , tvName;     private Button LogoutBtn;     private String name,PositionUid;      private FirebaseAuth mAuth;     private FirebaseAuth.AuthStateListener mAuthStateListener;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_login_org);          Bundle bundle = getIntent().getExtras();         if (bundle != null) {             name = bundle.getString("putName");         }          PositionUid = mAuth.getCurrentUser().getUid();          bindWidget();         IntentOrg();         onStart();      }      private void bindWidget() {         mManageroom = (TextView) findViewById(R.id.manageRoomorg);         mAddroom = (TextView) findViewById(R.id.addRoomorg);          tvName = (TextView) findViewById(R.id.tvName);         tvName.setText(name);         LogoutBtn = (Button)findViewById(R.id.btnLogout);          mAuth = FirebaseAuth.getInstance();         mAuthStateListener = new FirebaseAuth.AuthStateListener() {             @Override             public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {                 if (firebaseAuth.getCurrentUser() == null) {                     startActivity(new Intent(LoginOrg.this, PageLogin.class));                     finish();                 }else {                  }             }         };          LogoutBtn.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Logout();             }         });     }      @Override     protected void onStart() {         super.onStart();         mAuth.addAuthStateListener(mAuthStateListener);     }       private void IntentOrg() {         mManageroom.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent i = new Intent(LoginOrg.this, OrgManageRoom.class);                 i.putExtra("putName", tvName.getText().toString());                 i.putExtra("putUid", PositionUid.toString());                 startActivity(i);             }         });          mAddroom.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent i = new Intent(LoginOrg.this,OrgRoom.class);                 i.putExtra("putName",tvName.getText().toString());                 startActivity(i);             }         });      } }   Report Error:      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.auth.FirebaseUser com.google.firebase.auth.FirebaseAuth.getCurrentUser()' on a null object reference


"See:" index entries being ignored when using hyperref with xindy

Here is an MWE (compile this with lualatex --shell-escape MWE.tex, you only need to compile once to get the problematic output):  \documentclass{article}  \usepackage{lipsum} \usepackage[xindy]{imakeidx} \makeindex \usepackage{hyperref}  \begin{document} \lipsum[1] \index{Lorem ipsum} \index{Ipsum!Lorem|see{Lorem ipsum}} \printindex \end{document}   Here is the rendered index I get on this document1:        As you can see, the entry \index{Ipsum!Lorem|see{Lorem ipsum}} is missing. Taking a look at the output of lualatex (this does not appear in the transcript file)2:  Reading raw-index "C:\\Users\\ruben\\Dropbox\\Dokumente\\LaTeX\\hyperref-xindy-mwe\\BjciH3A8V8"... WARNING: unknown cross-reference-class `hyperindexformat'! (ignored) Finished reading raw-index.   Taking a look at the MWE.idx file, we can see this instance of hyperindexformat:  \indexentry{Lorem ipsum|hyperpage}{1} \indexentry{Ipsum!Lorem|hyperindexformat{\see{Lorem ipsum}}}{1}   How can I resolve this issue?    1 The full rendered PDF file can be found and downloaded on . 2 Full command output and transcript files can be found in .


How to get rid of sharp edges when using subsurf modifier?

I am currently playing around with the Catmull-Clark part of the subdivision modifier and I'm starting to get the hang of it. However, I have one edge that does just weird things:    I want to have a smooth rounding here, but somehow the edges and vertices of this region don't seem to cooperate (other parts of the same mesh are fine).  I tried rebuilding this section from scratch and checked for hidden/inside faces or edges (didn't find anything). I joined adjacent vertices and am pretty sure there are no double vertices, edges, anything. There is a mirror modifier in front of it, but it doesn't interact with this particular region. I'm currently out of ideas and welcome input.  File (Has been cut down to the tricky part.):


I noticed that Ubuntu SDK recently had some updates and it installed a program named "Click". I would like to know what they are and how to use them.  Also, would they make Debian packaging easier?


Minecraft Pocket Edition to Minecraft Java - Worlds

I was building this pretty large build on Minecraft Pocket Edition (iPhone), and now that I started playing Minecraft on my Macbook Pro, It's getting hard for me to build on MCPE. I have tried multiple methods to convert MCPE worlds to MC Java, but all have failed (MCToolChest doesn't work for me since I am running on a Mac, which doesn't support Windows). I really don't want to start over, but I could borrow someone else's Windows laptop to perform MCToolChest, though I'll save that as a last resort. Any ideas?


Where is the Sculpt Brush radius lock in 2.8?

I've been trying to find the radius lock in 2.8 and i just can't find it anywhere  [![enter image description here][1]][1]  [1]:


Why does my Lightroom/Photoshop preview change after loading?

Everybody who is using Lightroom probably has seen this. After importing RAW files, Lightroom shows a preview, but contrast and color of the preview change after a few short seconds to a slightly different view.  For some users the change is small, for others the change is huge. Colors are different (read: wrong), contrast is off.  Rumor says this is happening only (more?) for Nikon users.  What is Lightroom doing here?  I'd guess that for the first preview, LR is showing the JPG preview file, which is embedded in the RAW file. Then after a moment, LR renders the RAW file itself to show it's own interpretation.  But why is this interpretation so different from the embedded JPG?


Q: Prove $f$ is a unit in $A[X]\implies a_0$ is a unit in A and $a_1, . . . , a_n$ are nilpotent. In a solution it says (): "Assume first that $f$ is a unit in $A[X]$, i.e. there exists g ∈ A[X] such that fg = 1. Equaling the zero-order coefficients of this two polynomials, we get that $a_0b_0$ = 1 in A where $g = b_0 + b_1X + ... + b_mX^m$, which means that $a_0$ is invertible in A. We claim that $a_n^{r+1}b_{m−r} = 0$ for all $0 \leq r \leq m$, and we prove this by induction on $r$. We already know that $a_nb_m = 0$, since $a_nb_m$ is the higherorder coefficient of the polynomial $fg$. Now assume that $a^{r'+1}_nb_{m−r '} = 0$ for all $r'<r$. Then $0 = a^r_n(\sum_{i+j=n+m-r}a_ib_j) = a^{r+1}_nb_{m-r}+(\sum_{i+j=n+m-r}a_ia^{n-i}_na^{m-j}_nb_j)$ where the last sum runs over all pairs $(i, j)$ such that $i+j=n+m-r$ and $j>m-r$." My question is how does this equation describe $fg$? The hightest order polynomial is $a_nb_mx^{m+n}$ and it has to equal 0 for $fg$ to be unit. The 2 largest polynomials is $(a_{n-1}b_{m} + a_n b_{m-1})x^{n+m-1} + a_nb_mx^{m+n}$ and it has to equal 0, and so on until $a_0b_0=1$ So I try to compare that with the first summation formula: When $r=0$ we get $ 0 = a^{0}_n(a_nb_m) = (1)(a_nb_m)$. That is ok. When $r=1$ there is 2 ways to sum $i+j=m+n-1$ so we get $ 0 = a^{1}_n(a_{n-1}b_m + a_nb_{m-1}) = a_n a_{n-1}b_m + a^{2}_nb_{m-1}$. But this doesnt look anything like the 2 largest polynomials of $fg$ so Im stuck. My question how is $fg$ eqaul the first sum formula?


For each $t ≥ 2$, show that a $t$-regular Ramsey graph has   $$r(3,t+1) ≥ 3t$$     I'm stuck on where to go with this question. I've tried using what few theorems I know, but I've gotten caught up with inequalities that are not helping with anything, such as $r(3,t+1)≤r(3,t)+r(2,t+1)=r(3,t)+t+1$.


Destructive interference and energy conservation

In case of interference, we know, energy is neither destroyed, nor created; but only redistributed. But in the case of an extremely thin film, due to a reflection and hence a phase difference of $\pi$, the film always appears dark due to destructive interference. So, where does the energy go?


macOS: Kernel Panic at USB insertion, system restarts or freezes

When I insert a USB, macOS system (running High Sierra, Mavericks, Mojave)  restarts or freezes with a panic report:  Panic Report:  panic(cpu 0 caller 0xffffff801e4ba207): "a freed zone element has been modified in zone kalloc.16:  expected 0x3f0011b64302a888 but found 0x3f0011b64302a800, bits changed 0x88, at offset 0 of 16 in element 0xffffff8030ed5ac0,  cookies 0x3f0011b64302a888 0x5352105058b7571" @/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4570.71.2/osfmk/kern/zalloc.c:1122   What exactly does "a freed zone element has been modified in zone kalloc.16" mean and how we get it resolved?  the kernel is getting panic when I am using a third party kernel extension to which I have modified and that deals with USB control. could you please suggest me any of debugging method of kext too.


Why does the Community User reject / approve edits?

I am sure this must have been asked quite a lot of times, but I am unable to find something about the guidelines the Community uses when approving / rejecting edits.  I just fixed a first question to be a bit more appealing, yet  was immediately rejected by the Community. I can live with that, but I was wondering what rules the Community user applies when looking at edits.  Any documents explaining that?


Why is this user is missing a particular badge although they have 450 points?

I'm wondering if I've stumbled on a bug here.  I noticed recently that I'd achieved the silver badge on "concurrency" on SO.  Yay to me.        There are 3 other guys that have done so -- of course Jon is one.  So then I wondered who else is close to their silver for this category and so I go to the top-users page:        I was surprise to see Don Stewart above me at 450 points and yet has not gotten the silver badge for concurrency as far as I can tell.  It's not on his user page or in the concurrency badge page.  Is this a bug or am I not understanding how the badge is calculated?  As always, thanks for SO.  Always a great resource.


How to close a Java Swing application from the code

What is the proper way to terminate a Swing application from the code, and what are the pitfalls?  I'd tried to close my application automatically after a timer fires. But just calling dispose() on the JFrame didn't do the trick - the window vanished but the application did not terminate. However when closing the window with the close button, the application does terminate. What should I do?


For my school project i have chosen to do analyze Ackermann function as well as other functions that are recursive but not primitively recursive. I cannot seem to find good material on this, what i find is usually a ton of theory describing what those functions should look like. Where can i find more info on this topic? I would also like to see multiple proofs that Acermann function is not primitively recursive.


Let $A$ and $B$ be two $n\times n $ real matrices, satisfying $A^2=A,\,\, B^2=B$. Suppose $A+B-I$ is invertible. Show that $\operatorname{rank}(A)=\operatorname{rank}(B)$.  Since $ A^2=A,\,\, B^2=B$ we see that $A$, $B$ are either singular matrices or matrices with determinant $1$.  Any ideas on how to proceed from here?


Is there a command to display mount points of contents of directories?

Is there a command, or maybe ls has a flag that also display the filesystem the contents of a directory is mounted on?


Does Ubuntu 16.04.4 LTS include an SSH server by default?

According to  answer, SSH is disabled by default. However, looking around at tutorials, there were  of examples of installing an SSH server (e.g. sudo apt install openssh-server), which I completed. After running the install (appropriate prompts for new data usage etc.), I checked the aforementioned post and found the file /etc/init/ssh.conf did indeed exist.  Did I just install OpenSSH for no reason, and did 16.04.4 LTS have an SSH server built in that I simply had to enable and configure?


Rules in using the article "the" in addressing countries

Why is the article "the" used to address certain specific countries (this is especially true when one is introducing where they come from)  such examples are;  I am from the United States of America  I am from the Netherelands  while in some, it sounds weird  examples are;  I am from the Finland or I am from the Malaysia?   Are there some rules I'm missing here?


My question is different from  since my question asks to clarify the proof, while the other question asks to check if the proof is correct.   Let $z_1, z_2, z_3\in\mathbb{C}_\infty$ be distinct points. Then $\alpha(z):=[z; w_1, w_2, w_3]=[\mu(z); \mu(w_1), \mu(w_2), \mu(w_3)]=\frac{(z-z_1)(z_2-z_3)}{(z-z_3)(z_2-z_1)}$ for all $z\in\mathbb{C}_\infty$ (where $\mu$ is a Möbius map). This means that Möbius maps preserve cross-ratios.  Here's the proof I have in the notes:     $\mu^{-1}$ is a Möbius map, and:      $$\alpha\circ \mu^{-1}(\mu(w_1))=\alpha(w_1)=0 $$   $$\alpha\circ \mu^{-1}(\mu(w_2))=\alpha(w_2)=1 $$   $$\alpha\circ \mu^{-1}(\mu(w_3))=\alpha(w_1)=\infty $$      Thus $\alpha \circ \mu^{-1}(z)=[z;\mu(w_1), \mu(w_2), \mu(w_3)], \forall z\in \mathbb{C}_\infty$.   What I don't understand is how this proves that Möbius maps preserve cross-ratios. I would assume that we would have to take $\alpha(\mu(w))$ to show the preservation.  Moreover, if we show that some map is equal to $\alpha$ at just three points, how does this prove that two cross-ratios are equal? Perhaps I don't understand something about the meaning of cross-ratios.


Why is Windows 7 gone if I change my hard drive?

I just replaced a "broken" hard drive in a Dell Inspiron N5110 laptop and it looks like Windows 7 is gone.  Is the operating system saved/stored on the hard drive?  If so, does that mean I need to buy a new OS or is there another way?  I have a warranty on this computer: could a failed HD be covered?


Customise SharePoint text site SharePoint 2016

Does anyone know where I go to customise the below text on my sharepoint 2016 site?


Use the Inverse Fourier transform to show the Dirac-Delta function as a limit of the sinc function

This question is not the same as  because I am asking about the inverse Fourier transform and more specifically the relation of equation $(1)$ below to the expression in $\color{purple}{\mathrm{purple}}$ below.  From  asked by myself with some help I became convinced that the Dirac-Delta function can be written as $$\delta(t-u)=\frac{1}{2\pi}\int_{-\infty}^\infty e^{i\omega(t-{u})} \, \mathrm{d}\omega \tag{1}$$  Consider the rectangular distribution of frequencies in $\displaystyle\mathrm{(a)}$, taking the inverse Fourier transform   $$f_{\Omega}=\frac{1}{\sqrt{2\pi}}\int_{-\Omega}^{\Omega}1\times  e^{i\omega t} \,\mathrm{d}\omega$$  $$=\sqrt{\frac{2}{\pi}}\frac{\sin(\Omega t)}{t}$$ My text tells me that as $\Omega \to \infty \implies f_{\Omega} \to \sqrt{2\pi}\delta(t)$ by virtue of $(1)$.  Could someone please explain this to me as I don't see why $$\color{purple}{\sqrt{\frac{2}{\pi}}\frac{\sin(\Omega t)}{t} \to \sqrt{2\pi}\delta(t)}$$ as $\Omega \to \infty$?  Thank you.


Linking computers to increase performance

I have 2 laptops (one of which is my primary PC) and a desktop PC. The desktop run on Vista Home Edition, the secondary laptop also runs on vista and the primary laptop runs on windows 8.  It is possible to link these machines in order to increase the processing power and speed of my primary laptop?


How should I think about salaries in New Zealand relative to the United States?

Let's imagine I live in the United States and make about 100,000 USD.  If I move to New Zealand for a few years, I expect to make about the same, but denominated in New Zealand dollars. That is, make 100,000 NZD.  However, when we take exchange ratio into consideration between the two currencies (currently at 1 NZD = 0.66 USD), my salary ends up being 66,000 USD, effectively leaving me with a 33% pay cut.  Assuming living expenses and taxes are the same in their respective currencies, am I correct to assume that moving to New Zealand from the United States is a bad deal? The only way I end up even is if the New Zealand dollar ever catches up to the United States dollar, which given its history, is very unlikely to happen.  Am I missing something? Or this is pretty much it?


How to test accuracy of an unsupervised clustering model output?

I am trying to test how well my unsupervised K-Means clustering properly clusters my data.  I have an unsupervised K-Means clustering model output (as shown in the first photo below) and then I clustered my data using the actual classifications.    The photo below are the actual classifications.  I am trying to test, in Python, how well my K-Means classification (above) did against the actual classification.    For my K-Means code, I am using a simple model, as follows:  kmeans = KMeans(n_clusters=4, random_state=0).fit(myData) labels = kmeans.labels_   What would be the best way for me to compare how well my unsupervised KMeans clustering model did against the actual classifications?


Is it okay to copy-paste answers from other questions?

This one leaves me with a bad taste in my mouth, but I defer to others as to whether it is appropriate or not. In , I wrote an answer to a question based on my experiences; it was upvoted and accepted, woo.  Now, today, in response to a different — but related — , someone has pasted my answer nearly verbatim (awkward English intact, I may add) as an answer.  Is that really okay? Is it a behavior that should be encouraged? Discouraged?


Finite abelian group as an internal direct product

Let $G$ be a finite abelian group and $x$ be an element of maximal order. Can $G$ be written as an internal direct product $G = \langle x\rangle\times K$ for some normal subgroup $K$? To me it seems like a trivial intersection of the subgroups may not always hold.


I'm using TeXnicCenter and it generates pdfs fine but doesn't open them. Adobe pdf reader opens up but not the pdf. TeXnicCenter fails a command and this appears:    What's happening and how do I fix it?    UPDATE:    UPDATE 2:


I have a table structured as so (Simplified)  Name, EMail, LastLoggedInAt   I have a user in SQL Server (RemoteUser) that should only be able to see data (Via a select query) where the LastLoggdInAt field is not null.   It looks like I can do this? Is it possible?


Is there a probability that an electron in an atom change its energy level due to emitting gravitational wave?

Is there a probability that an electron in an atom change its orbital by emitting a quantum of gravitational radiation instead of photon?


Is it possible to think of something that doesn't contain anything exists?

Is it possible to think of something that does not contain anything that already exists? If not, why? Examples.   Flying alligators are animals. Flying straws are straws.   Is it possible for our thoughts to entirely base on objects that do not exist?


I was reviewing the close votes and while reviewing a particular question I opened the question in other tab to read in detail.  From the review queue I decided to leave the question Open but then in the tab where the same question was opened I was able to cast a close vote too.  Is it a valid behavior? If I decide to close from review queue and then use tab to close again it says you have already close voted the question, but does not work with Leave Open vote


JDBC update with variable length IN clause

So I have a query I need to run like UPDATE entity WHERE id IN (:ids). I know when doing a SELECT I can do something like   val sql = "SELECT * FROM entity WHERE id IN (:ids)"; jdbcTemplate.queryForList(sql, Collections.singletonMap("ids", ids));  Is there any way to accomplish this for an `UPDATE` query where I don't have to just turn my list of ids into a comma seperated string and call it like  val params = ids.joinToString(",") jdbcTemplate.update(sql, mapOf(Pair("ids", params)))   EDIT: Turns out the second way I listed doesn't even work because it is expecting a Double and gets a string


Doctor Who: Big Bang 2.0 is driving me crazy

In Doctor Who 2005: Big bang 2.0, the Doctor appears with a hat or something and a mop in his hand to rescue himself and Amy Pond after he is sealed shut inside the Pandorica. How can the Doctor come out of the Pandorica to do this? What event triggered this? Is it the act of universe on itself to re-establish the balance to the natural order of events, or is he an entirely new doctor from another time rescuing himself? I did understand everything that happened before and after the Doctor came back in time and gave Rory his sonic screw driver but I am not able to figure out the appearance of the Doctor himself...


Using international accents in the whole document

So I am attempting to write a document in Estonian language. Currently what I do to get characters like Ä appear at all, is use this syntax:  \"{chracter_I_want_with_dots•}   But I am going to write a lot of text that is going to use many characters with dots and other kinds of symbols on top of the characters.  How can I use these characters on the whole document without writing this kind of syntax on every Estonian character?


Prevent windows from going into sleep when my program is running?

I have to stop windows from going into sleep when my program is running.  And I don't only want to prevent the sleep-timer, I also want to cancel the sleep-event if I press the sleep-button or in any other way actively tell the computer to sleep. Therefore SetThreadExecutionState is not enough.  Or...I don't actually have to prevent the sleep completely, only delay it 5-10sec to allow my program to finish a task.  (I know that this is bad program behavior but it's only for personal use.)


Novel where a group of people (including a "vampire") go to investigate an object in space

A group of people sent out to investigate an anomaly and one of them was a "vampire" (but actually more of an enhanced human). When they get there we learn that it's either a ship or an hunk of space rock. As they are searching it the come to find out the whole thing is really "alive".   If it helps I think that the title started with the letter C


Using template parameter as argument in a template

I am trying to implement a simple plugin manager using concepts found in . I am implementing it as a template so that I can instantiate different managers for plugins implementing different interfaces.  However, I can't get it to compile.  Here is an extract which demonstrates the problem:  #include <map> #include <string>  template<typename InterfaceType> class PluginManager {  public:     // Map between plugin name and factory function     typedef std::map<std::string, InterfaceType*(*)()> map_type;      static InterfaceType *createInstance(std::string const& plugInName) {         map_type::iterator iter = map().find(plugInName);         if (iter == map().end())             return 0;         return iter->second();     }  protected:     static map_type & map() {         static map_type map;         return map;     }  };  class MyInterface {};  PluginManager<MyInterface> myInterfacePluginManager;  int main(int argc, char *argv[]) { }   When trying to compile it, this is what happens:  $ g++ pimgr_bug.cpp pimgr_bug.cpp: In static member function ‘static InterfaceType* PluginManager<InterfaceType>::createInstance(const std::string&)’: pimgr_bug.cpp:12: error: expected ‘;’ before ‘iter’ pimgr_bug.cpp:13: error: ‘iter’ was not declared in this scope pimgr_bug.cpp:15: error: ‘iter’ was not declared in this scope   It seems to be related to the definition of map_type: if I change it so that the map value type is some concrete class it compiles fine, but with the value type defined as InterfaceType*(*)() or indeed anything related to InterfaceType at all, then it does not work. The map is supposed to hold a mapping between plugin name and pointer to a corresponding factory function.  I am almost certainly missing some basic understanding of template syntax!  Surely is it possible to create a map within a template which holds a type defined by one of the template arguments?  I am using gcc 4.4.7 and unfortunately cannot use C++11 (if that's relevant).  Thanks!


How to randomly place entities that don't overlap?

I am creating a randomly-generated environment for a game I'm developing. I am using OpenGL and coding in Java.  I am trying to randomly place trees in my world (to create a forest), but I don't want the models to overlap (which happens when two trees are placed too close to each other). Here's a picture of what I'm talking about:    I can provide more code if necessary, but here's the essential snippets. I am storing my objects in an ArrayList with List<Entity> entities = new ArrayList<Entity>();. I am then adding to that list using:  Random random = new Random(); for (int i = 0; i < 500; i++) {     entities.add(new Entity(tree, new Vector3f(random.nextFloat() * 800 - 400,      0, random.nextFloat() * -600), 0, random.nextFloat() * 360, 0, 3, 3, 3); }   where each Entity follows the following syntax:  new Entity(modelName, positionVector(x, y, z), rotX, rotY, rotZ, scaleX, scaleY, scaleZ);   rotX is the rotation along the x-axis, and scaleX is the scale in the x-direction, etc.  You can see that I am placing these trees randomly with random.nextFloat() for the x and z positions, and bounding the range so the trees will appear in the desired location. However, I would like to somehow control these positions, so that if it tries to place a tree too close to a previously placed tree, it will recalculate a new random position. I was thinking that each tree Entity could have another field, such as treeTrunkGirth, and if a tree is placed in the distance between another tree's location and it's treeTrunkGirth, then it will recalculate a new position. Is there a way to accomplish this?  I am happy to add more code snippets and details as necessary.


How to use variables inside single quotes

I have an application which takes as an input attributes in double quotes embedded in single quotes. Take for example this right command:  command -p 'cluster="cl1"'   In order to automate it, I created a bash file using $CLUSTER as a variable. How should be my command? In other words, what should I put instead of cl1?  Please note that, If I modified the above command, it won't be accepted. For instance: command -p "cluster=cl1" is not accepted


I have both pages, but the $_SESSION["1"] is not received in the 2nd one.  UPDATE: Turns out, that if I type a number in the session, it won't work. I typed a normal string and worked.. I never saw this happening  1st  <?php session_start(); $_SESSION["1"] = "LOGGED"; ?>   2nd  <?php session_start();  echo $_SESSION["1"]; ?>   Why isn't this working?


There's a new popup helping you with searching, but one of the hints is wrong:    Searching for  will return answers as well as questions, and it's not the number of (up/down)votes which counts, it's the score. Better would be "posts with a score of 3 or higher" or "questions and answers with a score of 3 or higher".


What happens with excess items if my bag is full, and what should I do to avoid losing items?

There's a default limit of 350 items in the bag (even though you can expand it through the shop). I am currently level 6 and have already ~250 items in my bag. I haven't done any battles yet, as all the gyms in my area are too strong for my pokémon at the moment. So I have a lot of Pokéballs, Heals and Revives that I don't need right now.  What happens once my bag is full? Will additional items go into a temporary overflow bag? Will I just lose them? Will they replace older items?  I'm afraid I will lose the valuable items gained through a level-up. Should I throw away items to avoid that? If so, what should I throw out first? Heals and Revives, as I don't need them right now? Or will they become too valuable later on and I should rather throw out some Pokéballs as those are the most common items to receive from a Pokéstop?  TL;DR: What happens with items that exceed my bag size limit and what is the best strategy to avoid losing valuable items?


I am trying to include an image in an article in Overleaf, my source code is shown below,  \begin{figure}[h]     \centering     \includegraphics[width=80mm]{Appendix/Currents/C1.08current.png}     \caption{Caption}     \label{fig:my_label} \end{figure}   When compiling the document all the PDF shows is 'Figure 6.5' so it seems to be recognising something but isn't displaying the image, I'm not getting a white box as some users have mentioned


This probably comes up a lot with exponential probability distributons: How to prove that: $$\int \limits_{0}^{\infty}x^n e^{-ax} dx = \frac{n!}{a^{n+1}}$$  I look in a math table of integrals, I get: $$\int x^n e^{ax}~dx = \frac{x^n~e^{ax}}{a} - \frac{n}{a} \int x^{n-1}~e^{ax}~dx$$ $$\int x^n e^{ax}~dx = \frac{e^{ax}}{a}\bigg[ x^n - \frac{n~x^{n-1}}{a} + \frac{n~(n-1)~x^{n-2}}{a^2} - \cdots \frac{(-1)^n~ n!}{a^n}\bigg]~~~(\text{n is positive})$$ not exactly the nice easy formula I was looking for...


I am trying to zoom in to individual points, but when I do they disappear and I am not sure why.  These points were shot in arbitrarily, I have not projected them onto anything as of now.


What influences the visibility of the layer selection in the view port header?

For some reason the layer selection and the Lock to Scene button disappeared in 3D View / Object Mode. I can't find an option to toggle the visibility.  As it is supposed to look like   How it currently looks like    File / New restores the visibility therefore it must be a setting within the .blend file. How can the layer selection be restored?


Most leptons can do this so I'm curious to see if photons or any bosons at all can.


How do you load a separate .html page with Javascript

I am trying to figure out how to send a user to another page I design after they have input the correct password. I don't know how to load the page with a JavaScript Command. How could i use the code below to open a new page titled insideVault.html?   I have tried many google searches, but cant find any resources to help me out with this.  // login code //

             <form id="login" onsubmit="return passCheck()" method="get">
 Enter Password
             <input type="password" name="password" id = "password">             <input type="submit">             </form>


Proving $L_{p}$ Norm When $p\to \infty (or \|x\|_{\infty})$

I am trying to prove that for $p\to \infty$ the p-norm:  $$\|x\|_{p}=\Bigl(\sum_{i=1}^{n}|x_i|^{p}\Bigr)^{\frac{1}{p}}$$ we get:  $$\|x\|_{\infty}=\max\{|x_1|\}$$  $$|x_i|\leftarrow_{\infty}(|x_i|^{p})^{\frac{1}{p}}\leq\Bigl(\sum_{i=1}^{n}|x_i|^{p}\Bigr)^{\frac{1}{p}}\leq (p|x_i|^{p})^{\frac{1}{p}}\rightarrow_{\infty}|x_{i}|$$  It is for an arbitrary $i$ so we take the $\max\{|x_1|,|x_2|,...,|x_n|\}?$


I am looking for an introductory book in the field of time series and in particular with respect to classification (inference) and forecasting. I know they are high topics but I would love to read a book that can introduce me to various topics in time series field. I have a solid background in stats and machine learning and some basic knowledge about signal processing (let's say FFT and FIR filters). I am a bit lost in literature: should I read "classic" book about time series analysis? Is there something focused on machine learning? Or, even better, is machine learning the best tool to do classification and forecasting? Just as a note, I like theory but a book focused on some practical approach would be truly of help.


How to do a delay after every iteration in a foreach loop?

I want to add a delay after every iteration in a foreach loop, so the Treat method gets called only every 2 seconds. I do not want to use Thread.Sleepbecause I want to still be able to use my program while the loop is running. I'm trying to tell the foreach loop to wait 2 seconds before doing the next iteration. Here's what I have so far:      public async void HandlingAsync(ListViewItem woodItem)     {         IList<ListViewItem> woodList = new List<ListViewItem>();         woodList.Add(woodItem);         foreach(ListViewItem Item in woodList)         {             await Task.Delay(2000);             Treat(Item);         }       }      public void Treat(ListViewItem woodItem)     {         woodItem.SubItems[3].Text = "dried";         woodItem.SubItems[4].Text = "Ok";     }   This doesn't work because the await command doesn't affect the foreach loop, only the commands inside of it. I can confirm that, because the ListView changes its items all at the same time, while it should change one item and wait 2 seconds before changing the next item.  EDIT: Marc Gravell ist right. The foreach loop absolutely respects the await command. So his answer works 100%. My problem was neither in the foreach loop nor in the await command. It didn't work because my HandlingAsync Method got called multiple times. This results in calling the Treat Method almost instantly muliple times. That means, that every woodItem got changed at the same time with a delay of 2 seconds. To solve this, the HandlingAsync should only be called once. Thanks for your help.


I get a string which size is 16 (location of chess pieces on the mini-chess-board). This string may contain only symbols:    K (king) P (pawn) N(knight) R(rook) B(bishop) Q (queen) and whitespaces (free field).   How can i validate this string with regex to check if string size is really 16, symbols are only of these and also it should necessarily contain one K symbol (because one King should be)  I tried [KQBNRP ]{16} but now cant check for a K symbol  Thank you


Is there a geometric intuition for integration by parts? $$\int f(x)g'(x)\,dx = f(x)g(x) - \int g(x)f'(x)\,dx$$ This can, of course, be shown algebraically by product rule, but still where is geometric intuition? I have seen geometry of IBP using parametric equations but I don't get it. Newest edit: few similar questions has been asked before, but they use parametric equations to show geometry behind IBP. I am interested if there is geometric intuition which uses functions in Cartesian plane or some other, maybe more natural, explanation.


How to interpolate n number of objects between two different shape keys of that object (like tweening but with meshes)

I'm trying to create an array of meshes (with the same mesh data) between two different shape keys, interpolating between the two, like when tweening curves in Rhino. So far, all I have been able to do is manually duplicate and adjust the shape key for each object, but this also doesn't quite work as the base and final shape keys seem to change as I make duplicates (?) Any help would be great!


Help with proof using induction: $1 + \frac{1}{4} + \frac{1}{9}+\cdots+\frac{1}{n^2}\leq 2-\frac{1}{n}$

I am having trouble with the following proof:     For every positive integer $n$: $$1 + \frac{1}{4} + \frac{1}{9}+\cdots+\frac{1}{n^2}\leq 2-\frac{1}{n}$$   My work: I have tried to add $\frac{1}{(k+1)^2}$ to $2-\frac{1}{k}$ in the inductive step and reduce it down to $2-\frac{1}{k+1}$ but cannot do so. I am beginning to think that my entire approach is wrong.


Present Perfect Usage of "Think" for Recent Past

In a phone conversation like the one below is the present perfect form "I've thought it was Frank on the line" acceptable instead of "thought"?      Matt: Hi John.   John: Hi Frank.   Matt: Oh, this is Matt speaking not Frank.   John: Sorry Matt. I thought it was Frank on the line. You sound very similar.   John's mixing up the voices happens in very recent past (seconds ago) and it has relevance with the present. Why do we generally prefer simple past tense when using the verb "think" in such contexts? In British English present perfect is used commonly for recent past actions and events such as "have told", "has said", "has happened", "have shown" etc. Does it sound natural to use present perfect in such phone conversation context? Can you explain please any linguistic differences?


How do you configure such that window focus follows the mouse in 18.04?

How do you configure so that window focus goes to the window under the mouse position? I see only answers relating to arcane versions of Ubuntu. ? is it officially supported?


How to disable Mojave's floating thumbnail screenshot preview?

How do I disable this:    after taking screenshot?


Another linear algebra textbook recommendation

Im looking for a linear algebra textbook that meets two criterion:   The book should be proof-based.  The book should try and motivate most, if not most of the ideas, of the geometry of linear maps and matrix decompositions. For example, the permutation maps can be thought of as rotation maps because permutation matrices simply rotate the basis vectors. I’m looking for a book that explains all ideas and methods geometrically as well. A plus would also be that the book also foreshadows which properties can be generalized to a functional analytic setting.


I download xshell.exe file and i try to excute it using terminal by typing ./xshell.exe But I can't excute it. How can I do it? Please help.


Make Windows 10 "remember" language in applications

System language is English. In app1 I need English, in app2 I type in Spanish. I often switch from app1 to app2. It's too depressive to switch languages when switching apps. Is it possible in some way make Windows 10 "remember" language which I use in different applications?


What is the physiological mechanism for getting unconscious after a punch to the head?

It is the everyday life in boxing: One boxer gets a smack in the head, cannot do anything for many seconds and then: Victory of his opponent due to a Knockout!   What is the reason for losing consciousness for a short time by e.g. a strong smack in the head?  Are there any neuronal reactions that cause this?


How can I change the icon for a binary file on my desktop?

I want to change icon of a binary file which is placed on my desktop. The binary file is related to unetbootin. I want to execute unetbootin from the desktop so I want to change the icon. How can I achieve this?


Looks like I have a unnecessary initrd.img in my /boot directory:   $ ls -1s /boot total 82835  1439 abi-4.11.0-10-generic   204 config-4.11.0-10-generic     1 extlinux     1 grub 48186 initrd.img-4.11.0-10-generic 10626 initrd.img-4.8.0-34-generic 10626 initrd.img-4.8.0-39-generic    12 lost+found   180 memtest86+.bin   182 memtest86+.elf   182 memtest86+_multiboot.bin  3695 System.map-4.11.0-10-generic  7501 vmlinuz-4.11.0-10-generic   These are initrd.img-4.8.0-34-generic and initrd.img-4.8.0-39-generic because I cannot find any traces of them  $ sudo update-grub2 Generating grub configuration file ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Found linux image: /boot/vmlinuz-4.11.0-10-generic Found initrd image: /boot/initrd.img-4.11.0-10-generic Found memtest86+ image: /memtest86+.elf Found memtest86+ image: /memtest86+.bin done  $ dpkg -l *4.8.0* dpkg-query: no packages found matching *4.8.0*  $ dpkg -l linux-* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name                        Version            Architecture       Description +++-===========================-==================-==================-=========================================================== ii  linux-base                  4.5ubuntu1         all                Linux image base package un  linux-doc-4.11.0            <none>             <none>             (no description available) ii  linux-firmware              1.167              all                Firmware for Linux kernel drivers ii  linux-generic               4.11.0.10.10       amd64              Complete Generic Linux kernel and headers un  linux-headers               <none>             <none>             (no description available) un  linux-headers-3.0           <none>             <none>             (no description available) ii  linux-headers-4.11.0-10     4.11.0-10.15       all                Header files related to Linux kernel version 4.11.0 ii  linux-headers-4.11.0-10-gen 4.11.0-10.15       amd64              Linux kernel headers for version 4.11.0 on 64 bit x86 SMP ii  linux-headers-generic       4.11.0.10.10       amd64              Generic Linux kernel headers un  linux-image                 <none>             <none>             (no description available) ii  linux-image-4.11.0-10-gener 4.11.0-10.15       amd64              Linux kernel image for version 4.11.0 on 64 bit x86 SMP ii  linux-image-extra-4.11.0-10 4.11.0-10.15       amd64              Linux kernel extra modules for version 4.11.0 on 64 bit x86 ii  linux-image-generic         4.11.0.10.10       amd64              Generic Linux kernel image un  linux-initramfs-tool        <none>             <none>             (no description available) un  linux-kernel-headers        <none>             <none>             (no description available) un  linux-kernel-log-daemon     <none>             <none>             (no description available) ii  linux-libc-dev:amd64        4.11.0-10.15       amd64              Linux Kernel Headers for development ii  linux-libc-dev:i386         4.11.0-10.15       i386               Linux Kernel Headers for development un  linux-restricted-common     <none>             <none>             (no description available) ii  linux-sound-base            1.0.25+dfsg-0ubunt all                base package for ALSA and OSS sound systems un  linux-source-4.11.0         <none>             <none>             (no description available) un  linux-tools                 <none>             <none>             (no description available)   Are these both really useless? If they are useless, what is the correct way to remove them (I read, that rm strictly unrecommended for /boot folder)?  EDIT1: sudo apt autoremove cannot help either.


Creating a UIBarButton Centered Programmatically

I have an array of bar buttons that I normally set with something like:    NSArray *leftButtonArray = [[NSArray alloc]initWithObjects: backBarButton, separator1,postBarButton, separator1, memeBarButton, separator1, pollBarButton, nil]; self.navigationItem.leftBarButtonItems = leftButtonArray;   However, I want to change these buttons on the left to instead be center aligned. Anyone know how I can do that? Providing an example or using my buttons to do so would be a plus.   Thanks!


How to activate the dropdown menu of the select element via keyboard?

I have a select element in my HTML:  <select id="dropdown">     <option value="1">First</option>     <option value="2">Second</option> </select>   It renders as a drop-down menu, which, when the user clicks it, (surprise!) drops down. In order for the page to be used via keyboard only, I wish to make it so that the menu drops down when the user presses a key.  $('body').keypress(function(event) {     var key = String.fromCharCode(event.which);     if (key == 'a') {         $('#dropdown').doSomething(); // ?     } });   The best I've found is to invoke focus().  It allows to select the value via keyboard, but it doesn't drop down the menu.  Is there a way to make the menu drop down?


What is the reason behind water not falling from a bucket at the top of loop?

A bucket is rotating in a uniform circular motion. When the bucket is at the topmost point in the loop, the water does not fall. At this point both the tension and gravitational force is acting on the water, then it should be pulled with an even greater force. Then why does the water not fall?  The same question can be asked about a motorcyclist performing a loop de loop. Why does he not fall on the topmost point when both gravity and normal reaction are acting downwards?


Cannot set an environment variable using a Bash script

I want to set an environment variable from a bash script that I wrote.  So I created a bash script and called it set.sh. Its content is as follows:  #!/bin/bash  export DEV_SRC="/home/m/mydata/sourecCode" echo $DEV_SRC   When I run this script, the output is   /home/m/mydata/sourecCode   But if I run this code on the same terminal that I ran the above script from,   echo $DEV_SRC   I cannot see any value, so I think the value is not exported.   Why is the value not exported?


Is the linear combination of stationary states exhaustive?

After solving the Schrodinger Equation and getting the stationary states (separable solutions), we say the the general solution of the Schrodinger Equation is just the linear combination of these separable solutions. My question is: How do we know that it is exhaustive, i.e., covers all possible solutions for the wave function? (If possible please also give a proof, although just an explanation is also fine.)


Generate neighbor (adjacent polygon) grid cell label in 4 sides in QGis Atlas!

I have created a coverage layer in QGis, and i compose the map in print composer and set up the Atlas, everything is ok.   But the only thing i am missing is to do in print composer is to add labels in 4 sides of the current grid cell that shows 4 grid cell neighbor(adjacent polygon) as a text like a dynamic text for example.


Have had Ubuntu 16.04 on my new machine for about 4-5 months now (ever since I bought it).  Today when shutting down, it generated a message which said:  NMI Watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:0]   Can someone please help me get to the bottom of this?  My laptop is still in warranty, and if there is any hardware issue, maybe I can get it replaced right now. Not too worried about software bugs, but of course would like to have this rectified in any case.  Please let me know about any additional information which might be needed.


Word for describing a quote that makes you realize that it's true

When you read some quotes, it gives a feeling. You realise that it is profoundly true and it brings a smile on your face as you admire the brilliance in it. Is there a word to describe this feeling? For example I got that feeling when I read this quote:  the depth of your attention determines the depth of your experience. If your attention is profoundly, your experience of life is profoundly.


What Sci-Fi novel is about aliens who consider it simply convenient to exterminate the human race?

I don't remember the title/author of a Sci-Fi novel, where the author demonstrated that in case of an encounter with a more advanced alien life form, they would consider most convenient for them to exterminate the human race instead of every other alternative...


$K_1 K_2 \dotsb K_{11}$ is a regular $11$-gon inscribed in a circle, which has a radius of $2$. Let $L$ be a point, where the distance from $L$ to the circle's center is $3$. Find $LK_1^2 + LK_2^2 + \dots + LK_{11}^2$.  Any suggestions as to how to solve this problem? I'm unsure what method to use.


Am I using wrong version of SalesForceAPI?

One of our data Provider who happens to be on SuccessFactor/SalesForce world, gave us  SOAP URl to call to work with salesForce.  Now, I added the WSDL as a Web Reference and now I have a client to play with. They asked me to keep the session alive by adding the SessionId in the Request in all the sub-sequent requests.  I came across the following documentation:  But it sounds like I am not looking at the same object for some part because  instead of Login(username, password) my object support Login(SFCredentials[])  also, I do not have access to SessionHeaderValue Not sure why is it different.   Is it a different version than the one mentioned in this documentation? If so, How can I access SessionHeaderValue in the new one?


How do you extract IP addresses from files using a regex in a linux shell?

How to extract a text part by regexp in linux shell? Lets say, I have a file where in every line is an IP address, but on a different position. What is the simplest way to extract those IP addresses using common unix command-line tools?


How to install Epson printer drivers on Ubuntu 16.04?

I am having trouble to set up my Epson printer on Ubuntu 16.04. How can I install the drivers?


How many times can I travel between the US and Europe in a year?

I was just in Germany visiting a friend of mine in early January and I have the chance to go back again in early March. Is there an amount of time I have to wait between visits even though I only stayed for a week?


Computing symmetry/combinatorial factor for a diagram in $\phi^4$ theory

I am working with $\lambda\phi^4/4!$ theory and am struggling to compute the symmetry factor for the diagram  by using the method specified . I know that the answer is ${1}/{12}$, but I can't work out how to get this. Here is my reasoning:    the vertices are indistinguishable, so there is a factor of $3!$ 4 ways of choosing which leg of $u$ to connect to $x$ 4 ways of choosing which leg of $z$ to connect to $y$ 3 ways of choosing a leg of $u$ to connect to $z$, and 3 ways of choosing which leg of $z$ it should be connected to 4 choices for connecting the first leg of $u$ to a leg of $w$ 3 choices for connecting the second leg of $u$ to the remaining legs of $w$ 2 ways to connect one of the last two legs of $w$ to $z$ 1 way to connect the final leg of $w$ to the final leg of $z$  The overall factor is then (with a factor of ${1}/{4!^3 3!}$ from the Dyson expansion) $$  \frac{1}{S} = \frac{1}{3!\cdot (4!)^3} \cdot 3! \cdot 4\cdot 4 \cdot 3 \cdot 3 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = \frac{4^2 \cdot 3^2}{4!^2} = \frac{1}{4}. $$  I would be very grateful if anyone could point out where I have gone wrong. Alternatively, if anyone could explain another systematic way to compute symmetry factors for general Feynman diagrams then that would also be very helpful!


I use Ubuntu 16.04.1 LTS. I have also installed Xfce4 so in Lightdm login screen I can choose Unity or Xfce. I assume that when Lightdm runs Xfce4 desktop environment it uses /usr/bin/startxfce4 Then Xfce runs a dedicated window manager Xfwm4. A configuration file is stored here:  /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml   Xfce can be used with other window manager, here is a configuration option from that file:  <property name="Client0_Command" type="array">      <value type="string" value="xfwm4"/> </property>   I wonder how Lightdm starts Unity/Compiz ? Unity is a Compiz plugin and can't be used with other window manager, right ? So how exactly Lightdm runs Compiz?  Compiz can be run with parameters, for example:  compiz --replace ccp (a configuration plugin which can load other plugins)   or  compiz --replace composite opengl etc. (a plugin list is defined explicitly)   Update  lightdm-session runs gnome-session --session=ubuntu, gnome-session refers to /usr/share/gnome-session/sessions/ubuntu.session. Here is my ubuntu.session content:  [GNOME Session] Name=Ubuntu RequiredComponents=unity-settings-daemon; DesktopName=Unity   There is nothing about Compiz. So probably /usr/bin/unity is run and it load some other config?


What is the proof of the fact "a positive definite matrix has a unique positive definite square root"?

Could someone write the proof of this thing with a reference?


Calculate value of $\pi$ to millionth digit?

** I wanted to calculate the value of $\pi$ till millionth digit precision ,but I really cannot think of any proper procedure to calculate it **  Can individual nth digit after decimal be calculated ?


(Option to) hide the number of votes on an answer

I am not 100% sure (how could I be?), but there are times when I feel myself being biased towards voting for answers because they have already received a lot of votes. If this were true, this would cement early answers with some early votes at the top, because people keep voting for the top-voted answers.  Hypothesizing that I might not be the only one to fall prey to this kind of bias, I propose an option to hide the number of votes on answer. Answers may still be ordered by the number of votes, but they don't have to be visible really (basically hiding whether two subsequent answer are almost tied, 51-50, or very different 100-1).


Problem:  Even with dev null and disown.. web browser is still reporting errors to the terminal it launched from of.    web_browser < /dev/null > /dev/null 1>&2 & disown


I can't upgrade from Ubuntu11.10 to 12.04

when I try to upgrade the system ,it always failed.   W:无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages  404  Not Found , W:无法下载 gzip:/var/lib/apt/lists/partial/cn.archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Translation-en  Encountered a section with no Package: header , E:Some index files failed to download. They have been ignored, or old ones used instead.   what should i do ?


Helmholtz Free Energy vs Gibbs Free Energy in Landau Theory

When I was studying thermodynamics potentials for the first time, I learned that keeping the pressure and the temperature constant, the Gibbs Free Energy is a minimum, also, if we maintain the temperature and the volume of a given system constant, the Helmholtz energy will be a minimum. However, when I was studying Landau theory, I was confused if one should minimize the gibbs free energy or the helmholtz free energy. For example, in the Ising Model, one expands the Free Energy and the applies landau theory. However, we need to expand the Gibbs Free Energy in the liquid-gas transition.


How do I convert a material output from the node editor into a png image file? Blender 2.82

I combined an image texture with a noise texture in the node editor and I just wanted to know if you could export both the image texture and the noise texture as a single png file.  Can you?


Today a student asked me $\int \ln (\sin x) \, dx.$

Calculate the integral $$\int \ln (\sin x) \, dx.$$


Proof that the set of irrational numbers is dense in reals

I'm being asked to prove that the set of irrational number is dense in the real numbers.  While I do understand the general idea of the proof:   Given an interval $(x,y)$, choose a positive rational number (say) $z=\sqrt{2}$.  By density of rationals, there exists a rational number $p$ in the interval $(x/z, y/z)$, which essentially means that $$\frac{x}{\sqrt{2}} < p < \frac{y}{\sqrt{2}}.$$  I find that $pz$ is irrational, since it is the product of a rational and irrational number. However, my instructions besides writing that proof down is to specifically verify that $y=xz$ is irrational.  What does this have to do with anything and how does it prove denseness of irrationals?  Regardless, assume that $x$ is a nonzero rational number and that $z$ is irrational. For the sake of contradiction, assume that $y=xz$ is rational. This should mean that $y/x$ rational as well, and therefore that $z$ is rational, a contradiction.


Deriving $\neg R$ from $\{R↔(R∨(P∧¬P)), R↔¬P, ¬P→(P↔(Q→Q)), P→Q\}$

Give a derivation of $\neg R$ from the following premises: $$\{R\leftrightarrow(R\lor(P\land \neg P)), R\leftrightarrow\neg P, \neg P\to(P\leftrightarrow(Q\to Q)), P\to Q\}$$ using the rules found .  I don't know where to start... Edit:  1 1) R↔(R/lor(P∧¬P)) P 2 2) R↔¬P P 3 3) ¬P→(P↔(Q→Q))  P 4 4)P→Q P 5 5)R P 2 6)R→¬P  2,BE 2,5 7)¬P 5,6,MP 2,3 8)P↔(Q→Q) 3,7,MP 2,3 9)(Q→Q)→P 8,BE 2,3,5 10)¬(Q→Q) 7,9,MT 2,3,5 11)Q∧¬Q 10,NC 2,3,5 12)Q 11,simp 2,3,5 12)¬Q 11,simp 2,3 14)¬R 12,13,RAA 2,15)¬R 5,14,RAA


Do I keep myself "up-to-date" or "up to date" on something?

The question is quite straightforward: Which of the following is preferable?  "I keep myself up-to-date on the latest technology." "I keep myself up to date on the latest technology."


I've been using Ubuntu 20.04 LTS for some time now. However, I've recently noticed that there seem to never be any updates (using the software center, terminal or the updater). I wonder if I mis-clicked something or not. I have no idea why there are never any updates for security. My computer now has said for about two weeks that my computer is up to date. Thank you


How to allow all traffic from 1 IP address Windows Firewall

I am trying to give another PC completely unrestricted access to my machine. They are both on the same subnet. What I am looking for is effectively disabling the firewall entirely for one IP address.  Example  Host: 192.168.1.2  Client: 192.168.1.3 Firewall "off"  World: xxx.xxx.xxx.xxx Firewall "on"  To be specific I am running "Easy"PHP as a testing server for websites and want to access them from other machines on my network. After tinkering I figure the method suggested in my question would be best to make things actually easy.  PS. I have already tried opening all ports both inbound and outbound to that IP with no results. My only current success has been actually turning the whole firewall off.


What is Difference between EM Radiation and EM Field. Are They all are different quantities or interrelated with each other. Do they both follow inverse square law.Is light EM radiation or Field


Passing parameter from lightning JS controller to apex class

I am unable to pass parameter from the lightning controller to the apex class. Whenever I use debug the passed value seems null.  JavaScript Controller  add : function(cmp,event,helper) {      event.target.parentNode.style.display = 'none';     document.getElementById("cartdiv").style.display = 'block';     var selectedAccount =event.target.id;      var act = cmp.get("c.Cartveg");     act.setParams({"s":selectedAccount});     act.setParams({"cartlist" : cmp.get("v.cart")});     act.setCallback(this,function(a){         cmp.set("v.cartitem",a.getReturnValue());     });            $A.enqueueAction(act);     cmp.set("v.whichButton", selectedAccount); }   Apex Class  @AuraEnabled public static List<Vegetable__c> Cartveg(string s,List<Vegetable__c> cartlist) {       system.debug(s);   List<Vegetable__c>  clist= [SELECT Id, Name , Price__c , img__c                                  FROM Vegetable__c where Name =:s];      clist.addAll(cartlist);      system.debug(clist);     return clist; }   Value of s is null. Please help


What are watertight storage solutions to protect objects from flood water?

Our home is prone to occasional flooding during the rainy season. There was only one time in 26 years where our home was devastated by the flood reaching up to half of the 2nd floor. This destroyed so much of our things such as our car, electronics, furniture, documents, and etc. Other than that, there are a few instances of flooding that reaches only a few inches into the home but it was also rare. I am considering buying quite an expensive monitor, CPU, and printer but I am thinking that rainy season just arrived and I am afraid they will just get destroyed. The only way I can be reassured I can buy these if I can find some kind of storage solution that if I place my appliances/electronics in them, there is an almost 100% certainty that water will not be able to enter and damage the objects in case it gets submerged (assume the entire thing is submerged for hours to days). I have looked for flood bags, but all I can see everywhere are either sandbags or sandbag-like fibres that absorb water and create a barrier to prevent water from entering, but these are surely only for mild flooding. If it is on the scale where it will reach the items of value,  it will be a massive flood thus a watertight storage solution is the answer. I have been looking but I cannot seem to find any good solution. I am thinking of something like a garbage bag, but I know garbage bags are not the best choice as they are not watertight despite having several layers of them


Is AES-256 over AES-128 weakening the original encryption?

When transfering data using TLS the browser and server agree the cipher suite to be used - so for example this could be chosen as AES-128 and is (probably) outside of my control. If I separately encrypt a file using AES-256 and then Alice downloads this via her browser (using AES 128) have I still effectively got AES-256 security?  My reasoning goes like this: even if the AES-128 encryption on the TLS link was broken by Eve then all she would get is the AES-256 encrypted file and she would then have to break that encryption to see the plaintext.  Of course the AES-256 key is sent to Alice over a separate channel.


I have a powerbank with a 20,000 mAh capacity, from which I can power different devices.   The devices include an LED strip and a Raspberry Pi Zero W (RPI Zero W).   The LED strip consists of 60*5 LEDS = 300 LEDS, and will roughly draw 4.5 A with 50% PWM.   The Raspberry Pi requires about 170 mA.   The powerbank has 3 output ports, one capable of drawing 2 A, and the other two capable of drawing 1 A.   Would it be possible to somehow extend the current draw from these USB ports?  I could put them in series, such that I would have one port with 4 A, but how would that affect voltage? I need to power both my Raspberry Pi, and the LED strip.   Would the USB port be able to handle such a high current draw?


BibTeX issue with math symbol bibliography

I use TeXstudio to compile my documents and in the following case I keep receiving "error - Extra }, or forgotten $" followed by "error - Missing } inserted".  \begin{filecontents*}{source.bib}     @article{Geiger1908,        title = {An Electrical Method of Counting the Number of $\alpha$-Particles from Radio-Active Substances},        author = {Rutherford, E. and Geiger, H.},        journal = {Proceedings of The Royal Society A},        volume = 81,        issue = 546,        pages = {143 -- 161},        year = 1908,        url = {http://rspa.royalsocietypublishing.org/content/81/546/141}      } \end{filecontents*}  \documentclass{article}  \usepackage{amsmath,amssymb} \usepackage[style=phys,sorting=none,backend=bibtex]{biblatex} \addbibresource{source.bib}  \begin{document}  \cite{Geiger1908}  \printbibliography  \end{document}   From deleting contents section by section, I am certain the error come from the title field of the Geiger1908 entry. But what is giving the error?


How to add EXIF Lens data in Lightroom for unknown lens?

One of my prime lenses is non-electronic and so the photos EXIF data does not include any lens information. These show up in Lightroom 4.3 as "Unknown".   I see no way through Lightroom to add this lens name, focal length, etc. The photos are spread across folders, so doing it manually with an EXIF like this one will not work   Does anyone know if this is possible?  Thanks.


How to find number of ways one can move from $(0,0)$ to $(a,b)$ along the directed path?

In 2D space the point $(a,b)$ are said to be a lattice point if $a$, $b$ are integers. Two lattice points $(a,b)$ and $(c,d)$ are neighbours if they agree in one of the coordinates and differ in the other coordinate by $1$ . Every pair of neighbours is connected by a directed line with direction coinciding with the positive direction of the coordinate axis to which it is parallel. In how many ways one can move from $(0,0)$ to $(a,b)$ along the directed paths ?


Find the nth derivative of $\exp(ax)\sin(bx+c)$

The quality of the picture isn't really good. I found out the first 3 derivatives and sort of did some guesswork. I don't know if the nth derivative is correct and l don't know how to get it into a closed-form.  Is there another approach to finding the nth derivative that is easier?  Is this method correct ?


Checking if an input number is an integer

I'm trying to check if an input is an integer and I've gone over it a hundred times but don't see the error in this. Alas it does not work, it triggers the if statement for all inputs (numbers/letters)  read scale if ! [[ "$scale" =~ "^[0-9]+$" ]]         then             echo "Sorry integers only" fi   I've played around with the quotes but either missed it or it did nothing. What do I do wrong? Is there an easier way to test if an input is just an INTEGER?


Mean field theory formulation of Ising model

I am having a bit of trouble with basic combinatorics pertaining to the Ising model and mean field theory. Specifically, I get that the Hamiltonian can be written  $H=-\frac{J}{2}\Sigma_{i,j} s_is_{i+j} - \mu \Sigma_i s_i B$  Where the notation in the first sum denotes sum over all spins, i, and it nearest neigbours, indexed by j. The factor of 1/2 comes from double counting.  However then in my lectures notes, and other texts, when the mean spin is replaced by s, and the 2D nearest neighbours are explicitly put in, this somehow becomes  $H=-\Sigma_i s_i (\mu B + 2DJs)$  But this seems to be off by a factors of 2!  If s is the mean spin, then the sum over the nearest neighbours is  $\Sigma_{j} s_{i+j} = 2Ds$  i.e. number of nearest neighbours multiplied by the mean spin. The factor of 2 then cancels with the factor of $\frac{1}{2}$ in the first form of the Hamiltonian, so I get that the new Hamiltonian should be   $H=-\Sigma_i s_i (\mu B + DJs)$ ?  Where has the factor of 2 gone?


What does "apostrophe s" stand for in "What's it all mean"?

I heard someone on a TV show say:     What's it all mean?   As far as I know, 's could be the short form of has and is. But in this case, it seems more like to be the short form of does. Am I correct?


i do IT work, and the "it" thing these days is to throw the occasional probability question out there. The last time i stumbled on this, i'd just sat the GMAT and had probability somewhat down... still, it is the one region in maths that has always left me the most confounded.  I have not stumbled across any killer probability books either - but i am sure they exist! Or lecture notes/something online?  Any suggestions/ideas?  UPDATE: i did hons maths pricing black-scholes etc back in uni (10 years ago), so i'm not shabby (but also def not brilliant) at maths. So that's me. As for the questions in particular, you know, a good book that started at the beginning (simple coin toss stuff) and then rocketed off to at least P implies A, with a thorough set of questions and answers would be good. Does that help?


complex variable integral using residue theorem

I am asked to calculate a complex integral. how to compute $\displaystyle \int \limits_{-\infty}^{\infty}\frac{x^4}{1+x^8}dx$ with residue theorem?


How many cameras needed to capture a 3D object?

Consider a 3D object, like a sphere or a cube. What's the minimum number of cameras required to fully capture all sides of that object? And at what angles should those cameras be placed?  My initial thoughts were that you might 4 placed at the vertex of a tetrahedron.


gnome-tweak-tool is missing the window option

One ubuntu setup looks the following way in gnome-tweak-tool:      I'm customizing a new machine,  but the "Window" option is no longer available:      The first image is from Ubuntu 14.04, and second is from 16.04.1.    How can I bring the window option back?  Am I missing some kind of package?


I have a UK passport and a Malaysian passport and am traveling to the US, I want to use my UK passport because it has a visa waiver, but to return home (Australia) I want to use my Malaysian passport because it has my citizenship in it. Can I do this?


Keep two inserted tables on the same page

I have produced two tables that when ran from the same LaTeX file are positioned on the same page, one under the other. However, when the two tables are called upon by using \input they appear on two seperate pages.  Here is a MWE (with the pacakges used in my paper) that produces the problem:  \documentclass[11pt,a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[stable]{footmisc} \usepackage{mathpazo} \usepackage{amsmath} \usepackage{graphicx} \usepackage{xcolor} \usepackage{microtype} \usepackage[authoryear, round]{natbib} \usepackage[colorinlistoftodos]{todonotes} \usepackage{setspace} \usepackage[colorlinks=true, citecolor=red]{hyperref} \usepackage{mdframed} \usepackage{rotating} \usepackage{lscape, longtable} \newcommand\iid{i.i.d.} \newcommand\pN{\mathcal{N}}  \begin{document} \include{Results_Tables/tablea} \include{Results_Tables/tableb} \end{document}   Whereas using this amended MWE would produce the desired output, where both tables are within one tex file:  \documentclass[11pt,a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[stable]{footmisc} \usepackage{mathpazo} \usepackage{amsmath} \usepackage{graphicx} \usepackage{xcolor} \usepackage{microtype} \usepackage[authoryear, round]{natbib} \usepackage[colorinlistoftodos]{todonotes} \usepackage{setspace} \usepackage[colorlinks=true, citecolor=red]{hyperref} \usepackage{mdframed} \usepackage{rotating} \usepackage{lscape, longtable} \newcommand\iid{i.i.d.} \newcommand\pN{\mathcal{N}}  \begin{document} \include{Results_Tables/tablea_and_b} \end{document}


Recently I just deleted one of my answer in stackoverflow where there was one comment. After deleting the answer it also show for sometime that we all know but in the comment it still allow us to up to make it useful but as I clicked it it just showed me the message:  If we are not allowed to do then what was the meaning? Why don't it just be removed or make it disable if the answer is deleted. Just don't show UI for actions that can't be actioned


How to add indicator on a light switch to indicate the outdoor 3-way light is on?

Have some carriage lights outside my garage that can be turned on from inside the house. It's common that the switch will get flipped and the lights will stay on when they're not wanted.  Is there some way I can add an indicator to the light switch so I can know if the light is on?  Note: the carriage lights are on a 3 way switch.


What are the fonts used in this document?

I am really not sure if the following document was created with LaTeX:   Nevertheless I would be very grateful if someone could guess the name of the fonts used for the headings, the body of the text and the code samples.  Finally how should I proceed to use these same fonts with LaTeX? Thanks!


Tapping on a 'badge' achievement opens logged out browser

Just noticed I received a badge achievement in the iPhone app. Tapped on it, and a browser view opens, and it's unauthenticated.


RadioGroup checkedId (or getCheckedRadioButtonId()) works incorrect

I'm working with RadioGroups and nested RadioButtons by programmatically. Creating and removing radio buttons for some behavior. But the problem was revealed, when I fire  onCheckedChanged event. System doesn't reset radio buttons counter, even after, when I'll remove all radio buttons in radioGroup and even after removing RG. This collision takes place when I'm trying to catch event up such as checks particular radioButton, but I get null point exception because the index of radio button (checkId) doesn't equal the real state.  Should I count radioButtons by myself and correct checkId in onCheckedChanged event?  Looks like crutch.   Some code example here:  private static final String TAG = MainActivity.class.getSimpleName(); private RadioGroup rg; @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      LinearLayout ll = findViewById(R.id.someLL);     rg = new RadioGroup(this);     rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {         @Override         public void onCheckedChanged(RadioGroup group, int checkedId) {             Log.d(TAG, "checked id: " + checkedId);             Log.d(TAG, "print text: " + ((RadioButton) group.getChildAt(checkedId)).getText() );         }     });     ll.addView(rg);      rebuildRG(Arrays.asList("one", "two", "three", "four", "five"));      rg.removeAllViews();      rebuildRG(Arrays.asList("111", "222", "333", "444")); }  private void rebuildRG(List<String> data){     for(String i: data){         RadioButton rb = new RadioButton(this);         rb.setText(i);         rg.addView(rb);     } }   Logcat here:  D/MainActivity: checked id: 9 D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.flexdecision.ak_lex.radiogroup, PID: 11604     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.widget.RadioButton.getText()' on a null object reference


Let $K$ be a field and $f(x)\in K[X]$ be a polynomial of degree $n$. And let $F$ be its splitting field. Show that $[F:K]$ divides $n!$.   Here $[F:K]$ denotes the dimension of $F$ over $K$ as a vector space.  I already know it is true for $K=F$, so the problem here is when $f$ is irreducible in $K[X]$.


Vertical centering image without fixed height of parent

Anyone who can tell me how to vertically align an image in a DIV without a fixed height for the container DIV? With a fixed height I can do this:  HTML

   CSS  .sensorimage {     height: 100px; /* max-height does not work*/     min-width:190px;     position: relative;     margin-bottom:10px; }  .sensorimage img {     max-height: 100%;       width:auto;      position: absolute;       top: 0;       bottom: 0;       margin-bottom: auto;     margin-top: auto;    }   This gives me almost what I want. The images are vertically centered in the DIV. But since the DIV with the class .sensorimage must have a fixed height, certain images appears too small. I want the images to have their natural height and width. I have tried with "max-height" but that hides all images for some reason. I have also tried to fiddle with display:table for the outer div and display:table-cell and vertical-align:middle for the image (or the inner div), with no luck. Anyone?  Edited: for ex. if 2 images are 30 px high and one image in the same row is 100 px high, the smaller images should still be vertically centered.


I have searched, but not found anything on this. I am looking for a functionality in bash, using a terminal.  Way back when, I had a user on a debian system, and a friend set me up with a convenient history search feature (I believe I used tcsh then), where I would type the beginning of a previous command, hit up-arrow, and it would do a search, based on the partial string.  E.g. if my history is:  ./script.pl ./script.pl arg1 cat output cat output | grep yada   And I type ., and press up-arrow, it would show me: ./script.pl arg1. Press it again and it would show ./script.pl, etc.  Very much like it would perform a grep on .bash_history. Is there a way to get this functionality?


Unable to think about an argument in proving that decimal expansion of a rational number m/n is eventually repeating

I could not think about how to prove that decimal expansion of a rational number of a rational number is eventually repeating.      Note that this question has to be proved using Pigeonhole principle only. So, don't close it.    While searching on internet I found this solution whose image I am posting.      But I am unable to think about how does author writes this  in third line of proof ->To compute the 10 place digit $a_1$ one computes $r_0$ ×10 = $a_1$ × n +$r_1$ .    Can someone please give explanation of this statement that why this must be true.


USB wifi authenticates, mini PCI wifi does not

I have an HP Envy 300 (desktop) running Ubuntu 14.04.  I have both a mini PCI wifi/bluetooth card (Broadcom BCM43228) and USB wifi.  I can see both wireless options in the Networks component of System.  The USB wifi connects both to the unsecured network across the street as well as my secured (WPA/WPA2) network.  The PCI wifi will not authenticate.  It sees all the wireless networks available, I can ask it to connect to the unsecured connection across the street and it just doesn't connect.  If I ask it to connect to my secured connection, I type in the password and get an authentication error.  I updated the BCM driver yesterday (after which, the PCI wifi does now show up in Networks).  Any other suggestions?  FWIW, I had the same behavior when I was attempting to use the PCI wifi when running Windows when the system came out of the box (the PCI card was "factory installed").


Can I safely pigtail #10 wire and #12 wire on a 20 amp circuit?

When they built my house, than ran  10/2 wire from the 20 amp breakers. I’d like to pigtail into one of those and make a new outlet. But I’d prefer to use 12/2 as it’s easier to work with and it’s easier to find outlets that accept 12 gauge wire.  Can I safely pigtail (under a wire  nut) #10 wire and #12 wire on a 20 amp circuit?


Is there any reason why an interface reference would be included before a method name on an implementing class? For example, let's say you have a ReportService : IReportService and a GetReport(int reportId) method. I was reviewing some code and another developer implemented the method like this in ReportService:  Report IReportService.GetReport(int reportId) {   //implementation }   I've never seen a service implementation like this before. Does it serve any purpose?


How should the venndiagram package be used? Or how can I avoid weird results?

I was trying out the  package in order to answer another . Having drawn the diagram for , I thought I'd try a slightly more complex example:  \documentclass[tikz,border=20pt,multi]{standalone} \usepackage{venndiagram} \begin{document} \begin{venndiagram3sets}   \fillOnlyA \end{venndiagram3sets} \end{document}   But this did not yield the expected results:    The diagram should shade just that part of set A which intersects with neither B nor C, as I understand it.  As far as I can tell, this example is just example 3 on pages 6/7 of the documentation. The issue is not caused by the use of standalone - I get the same results with article, except on a bigger page, obviously.  Have I missed something crucial or might this be a bug? I'm wondering if there's a compatibility issue with current versions of TikZ.


Is there a way to opt out of Alexa rankings or prevent them from gathering data about my site?

My competitor is using Alexa to see what I am doing. I need to get stop Alexa from including my sites in their rankings. How can I do so?   Is it possible to deny access to any visitor with the Alexa toolbar and deny access to Alexa bot requests?


Should yes/no columns in a table be aligned left or right?

I understand the guidance on positioning text and numeric columns. I also have a column, though, that presents a boolean (Y/N) value. Is it appropriate to align it to the left as text, or right as numeric?


Snap application doesn't see files from another partition

I have installed KeePassXC snap package on Ubuntu 17.10. I have multiple linux systems installed on the same drive, so I have made most of my home folders like ~/Documents created as links to a separate ext4 partition (users have same uid so permissions are correct). I tried to open my passwords' database which I have inside Documents, but keepassxc cannot see any files inside Documents. If I put the file in my home folder then it sees it.  Are snap packages able to find files outside from my home folder? Any way to make KeePassXC (and the rest snap packages) access the files at my separate ext4 partition (maybe some configuration somewhere)?


Does string theory remove the singularity of black holes?

One of the reasons we want a theory of Quantum gravity is to understand black holes and string theory is the most popular approach, but so far I haven't seen any attempt of the theory to remove the black hole singularity the same way loop quantum gravity does. I don't know much about string theory so I would like to Know if string theory actually does remove the singularity from the Schwarzschild metric  and if yes how does it attempt this? If no, then how are black holes viewed in string theory, are they singularities in the mathematical sense?


When I run git remote show origin on terminal, it shows the following -  Local out of date. How can one update it? I think that this is the probable reason why I am not able to push changes to the repository.         * remote origin   Fetch URL: https://github.com/tono/emotion-detection.git   Push  URL: https://github.com/tono/emotion-detection.git   HEAD branch: master   Remote branches:     master tracked     tono tracked     boro tracked   Local branch configured for 'git pull':     master merges with remote master   Local refs configured for 'git push':     master  pushes to master  (local out of date)     boro pushes to boro (local out of date)


convert multiple jpg into one with linux

I have multiple jpg that come from a scanner. I want to combine all into one ? how ? I have seen something like  $ convert -adjoin *.jpg one.jpg   but it create multiple one.jpg images.


Export Results from Developer Console - Query Editor?

I'm a huge fan of the  in the SFDC Developer Console:    Is there a way to export the table of results as JSON/csv/excel or in some format that can be consumed by Excel?  (I know that I can replicate the functionality in DemandTools or other tools, but sometimes when I've thrown up a query for debugging, it would be really handy to be able to export and manipulate the results.)


Can't view deleted questions via Android app

When using the Android app, I am unable to view deleted questions on any site. I simply get, "Loading the question failed." However, I can view these sites normally in the browser using the same account, so I don't see why I would be restricted access to them via the dedicated app.  Questions attempted:    (20k+ on this site)  (9k+ on this site, but it's a beta site)   Both questions fully load in the browser on my computer or my Android device, but when opening them via the app, as mentioned, I receive the error that, "Loading the question failed." If I'm already looking at a question pre-deletion, and it is deleted, refreshing it gives an, "Unable to refresh" error.  I don't know if we're just not intended to look at deleted questions on the Android app (yet?), but I figured this would just be a provided feature, so that makes me think this is probably a bug.


How do I generate a random number within a range consisting of negative and positive values in C++?

I have created a cube in Visual Studio using C++ and I am trying to give it a random direction to move along. From what I have seen online, the equations I'm using for random numbers should be generating a random number between -1 and 1 or more formally (-1, 1). But for some reason, the random numbers being generated are the exact same.   I feel like there is something wrong with the division but I just cannot figure it out. Any help would be appreciated!  // Give the cube a random direction float x = 2*((float)rand()/(float)(RAND_MAX + 1.0)) - 1;  float y = 2*((float)rand()/(float)(RAND_MAX + 1.0)) - 1; float z = 2*((float)rand()/(float)(RAND_MAX + 1.0)) - 1;  m_directionVector = XMFLOAT3(x, y, z);


$\sum_{n=1}^\infty \left(\frac{n}{n+1}\right)^{n^2} $ convergence test?

$$\sum_{n=1}^\infty \left(\frac{n}{n+1}\right)^{n^2} $$ ratio vs comparison. What would you need to evaluate $$\lim_{n\to\infty} \frac{\left(\frac{n+1}{n+2}\right)^{(n+1)^2}}{\left(\frac{n}{n+1}\right)^{n^2}}$$ for the ratio test?


Sudden WRONG perception of [name-the-site] about JavaScript being enabled

I don't know what's going on... I haven't (intentionally) upgraded anything, but just now I've been getting this banner over my connections here (Stack Overflow and Stack Exchange - probably more I'd guess) saying, "[whatever platform here] works best with JavaScript enabled" yet I double checked and it has been - and has been for years. (I'm a few months short of 10 years a user of Stack Overflow.)  Hell, I had no problem earlier_today! Yet suddenly it has this error.  I do have  enabled. But that hasn't been an issue before. Whitelisted are this, and all the pertinent sites, including sstatic.net. The most strange is that I was using the site earlier today, and did zero updates to anything - I was working on coding a project, could maybe use to look for some help, and whamo, problem.  IMPORTANTLY: NoScript doesn't show any sites blocked when I'm on any site here!  This has be seriously doubting my own eyes!  If, hidden to our vision the site wants to use google or some such, hell no, I say, to all the Google-crap, and so many other tracking-crap I don't want. I say, if the Stack Exchange sites want to have extra features, they should develop them themselves and NOT ask the rest of us to turn-on anything from Google or any other things we don't want for the rest of our browsing activities. Why should we be subject to unknown code "just because?!" ... I would presume that the site founders are keen to make this kind of thing optional and not mandatory. This will help kill the site if that's what's  going on.  Otherwise, I'm just clueless why this is happening now. Thanks for your help.


I would like to show that:  $$ \sum_{n=0}^{\infty} \frac{1}{(3n+1)(3n+2)}=\frac{\pi}{3\sqrt{3}} $$  We have:  $$ \sum_{n=0}^{\infty} \frac{1}{(3n+1)(3n+2)}=\sum_{n=0}^{\infty} \frac{1}{3n+1}-\frac{1}{3n+2} $$  I wanted to use the fact that $$\arctan(\sqrt{3})=\frac{\pi}{3} $$ but $\arctan(x)$ can only be written as a power series when $ -1\leq x \leq1$...


Which one is better in case of a phonon calculation and does DFPT also have small negative frequencies near Gamma due to the numerical noise? What are their advantages and disadvantages?


How can I manually remove a WINE program when the uninstaller doesn't work?

Installed a windows program to directory Z:\, can't delete it using wine uninstaller, can't delete it from nautilus.   Is there a way to override?


When I am running yum install getting following error.  root@datanode# yum list  CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf   root@datanode# rpm -ev yum           error: Failed dependencies:         yum >= 3.0 is needed by (installed) yum-fastestmirror-1.1.16-21.el5.centos.noarch         yum >= 3.2.18 is needed by (installed) yum-security-1.1.16-21.el5.centos.noarch         yum >= 3.2.22 is needed by (installed) yum-updatesd-0.9-6.el5_10.noarch   root@datanode# cd /etc/yum.repos.d   root@datanode:/etc/yum.repos.d# ll  total 36 -rw-r--r-- 1 root root 1926 Oct  7  2013 CentOS-Base.repo  -rw-r--r-- 1 root root  636 Oct  7  2013 CentOS-Debuginfo.repo  -rw-r--r-- 1 root root  626 Oct  7  2013 CentOS-Media.repo  -rw-r--r-- 1 root root 7574 Oct  7  2013 CentOS-Vault.repo   root@datanode12.h2.dev.bigdata.sv2.247-inc.net:/etc/yum.repos.d# cat /etc/yum.conf.FCS   [main] proxy=http://cache.backside.sv2.tellme.com:3128/  cachedir=/var/cache/yum keepcache=0 debuglevel=2  logfile=/var/log/yum.log distroverpkg=redhat-release tolerant=1  exactarch=1 obsoletes=1 gpgcheck=1 plugins=1  bugtracker_url=http://bugs.centos.org/yum5bug  # Note: yum-RHN-plugin doesn't honor this. metadata_expire=1h  installonly_limit = 5  # PUT YOUR REPOS HERE OR IN separate files named file.repo  # in /etc/yum.repos.d


What is the definition of the life biologically ?

I want to know what is the definition of the life biologically , on the other hand ,  what is the definition of the death biologically  ?? However, I think it is a very difficult question to answer .


Maximize program across multiple monitors

Running Windows 10 with multiple monitors. I can maximize a program in a single monitor by clicking the little box in the top right, or by opening the menu in the program icon on the top left, or by using the window key + up arrow keyboard shortcut, or who knows how many other little shortcuts.  Is there a quick way to maximize a program or window across the whole desktop, including all connected/extended monitors? I'd prefer not to add any third-party software to do this.  I intend to use this mainly for two things: the occasional large spreadsheet, and for remote desktop connections when supporting users who also have multiple displays (mostly via the sccm client rather than the regular remote desktop program), so answers specific to those applications are helpful to me, as well.


How to set nemo as default instead of nautilus?

I have recently installed nemo with:  sudo apt-get install nemo   But I am finding that other applications still are using nautilus to open folders like for instance the Unity search still opens its search results and folders in nautilus. So is there any way that I can get it to use nemo as default (at least the search)?    OS Information:  Description:    Ubuntu 14.10 Release:    14.10   Package Information:  Nautilus:  nautilus:   Installed: 1:3.10.1-0ubuntu15.1   Candidate: 1:3.10.1-0ubuntu15.1   Version table:  *** 1:3.10.1-0ubuntu15.1 0         500 http://gb.archive.ubuntu.com/ubuntu/ utopic-updates/main amd64 Packages         100 /var/lib/dpkg/status      1:3.10.1-0ubuntu15 0         500 http://gb.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages   Nemo:  nemo:   Installed: 2.2.4-1   Candidate: 2.2.4-1   Version table:  *** 2.2.4-1 0         500 http://gb.archive.ubuntu.com/ubuntu/ utopic/universe amd64 Packages         100 /var/lib/dpkg/status


Why the following redirection doesn’t work?

i typed the following command  which cp | ls -l   It didn’t work as i expected. I wanted that the output of the which command will be a path name. So the ls command will show the information about the path or that file. Although  which cp | less works what is supposed to. But why don’t  which cp | ls -l works as expected.


How aware are Middle-earth races about their deities?

From the point of view of the reader, we’re made aware (via The Silmarillion mostly) about the different powers in Middle-earth and the creation of Arda. For the reader there’s Eru, the Valar and the Maiar.  The Quenya names seem to imply that Elves are aware of their existence and their role to some extend but my question is:  To what extend is each of the races aware of the existence and meaning of the different deities and specially Ilúvatar. Do the Elves recognise and know him as all powerful, omniscient creator of the world? Are Men or Hobbits even aware of his existence? What about Valar? Is there any worshipping going on?


Why does a find field value in one application show up in a the find field of another application?

On my MacBook Pro I have found that several applications seem to share the value for a find.  For example, I searched 'applestackexchange' in Safari's unified address bar, then I switch to Xcode and click into a Find field.  The first word of my search in Safari then appears there.  iTerm2 and Sublime Text 2 also seem to participate in this sharing.  Running latest Mountain Lion on  a 2012 MBP.


I want to represent the following sum in LaTeX.    I have tried it in the following way:  $$\sum_{{1 \le k \le n}_{ k odd}} k^2$$   But I have not got the desired result. Please help me.