I have this problem where the jQuery get function inside my updateMyApps isn't being called correctly. I call the function right after declaring it and that works perfectly. It loops through the data and appends the elements to the DOM.  But when I submit the form #addapplicationform it runs the jQuery post function which works correctly but the updateMyApps function doesn't seem to be working correctly when that happens.  The console.log("Test"); always seems to get called. Even when submitting the form. But for some reason the callback function for that get request only gets called that one time on page load.  &lt;script&gt; function updateMyApps() {     console.log("Test"); //Always works     $.get("/api/clients", function(data) {         console.log(data); //Works first time         $("#myapps").html("&lt;h4&gt;My Applications&lt;/h4&gt;");         data.forEach(function (item) {             var element = '&lt;div&gt;' + item.name + '&lt;/div&gt;' + '&lt;div&gt;' + item.id + '&lt;/div&gt;' + '&lt;div&gt;' + item.secret + '&lt;/div&gt;' + '&lt;a href="/edit"&gt;&lt;input type="submit" class="submit btn btn-primary form-control" value="Edit" style="width: 100px;"&gt;&lt;/a&gt;';             $("#myapps").append(element);         });     }); } updateMyApps(); // Works perfectly  $("#addapplicationform").submit(function( event ) {   event.preventDefault();   $.post("/api/clients", $( "#addapplicationform" ).serialize(), function () {     updateMyApps(); //Doesn't work   }); }); &lt;/script&gt;   Any ideas on why the get request callback is only firing once?  EDIT  Forgot to mention this. It looks like the GET /api/clients only is getting called on page load. When submitting the form it isn't even hitting my back end at all.  EDIT 2  Realized this was a caching issue. Adding $.ajaxSetup({ cache: false }); seems to have fixed the issue. Also marked the question as duplicate of where I found that code snippet.
It looks like if I load dynamic content using $.get(), the result is cached in browser.  Adding some random string in QueryString seems to solve this issue (I use new Date().toString()), but this feels like a hack.   Is there any other way to achieve this? Or, if unique string is the only way to achieve this, any suggestions other than new Date()?
In (non-relativistic) classical physics, if the temperature of an object is proportional to the average kinetic energy ${1 \over 2} m\overline {v^{2}}$of its particles (or molecules), then shouldn't that temperature depend on the frame of reference - since $\overline {v^{2}}$ will be different in different frames?  (I.e. In the lab frame  $K_l = {1 \over 2} m\overline {v^{2}} $, but in a frame moving with velocity $u$ relative to the lab frame, $K_u =  {1 \over 2} m \overline {(v+u)^{2}}$). An excerpt from Introduction to Analytic Number Theory by Tom M. Apostol.      I have three main concerns regarding this proof:    What is the abscissa of convergence for $\frac{1}{F(s)}$ - why can we take the product of the two series. I only know this is true if the two series are absolutely convergent.  Why can we do term by term integration? I believe its suffices to show that the series converges locally uniformly - BUT is this true?  How does the proof show that $G(s)$ converges uniformly? This is my first time posting on Math exchange. I have been self-teaching myself Mathematics and recently started learning some Algebra. I was posed the following questions, in which I would like to answer before I proceed, but having some trouble finding proper solutions. So the format will be question, and my answer.      What name do we give an element $a \in \mathbb{Z}_n$ that has a multiplicative inverse?   A modular multiplicative inverse of an integer $a$ is an integer $x$ such that $ax \cong 1 (\mod m)$. This means that the remainder after dividing $ax$ by integer $m$ is equal to $1$.      Give an example, for some $n \in \mathbb{N}$, of an element of $\mathbb{Z}_n$, that does not have a multiplicative inverse?   This question is throwing me off because - does the $n$ we speak of matter for both $n \in \mathbb{N}$ and $\mathbb{Z}_n$ ot solely $n$? My guess here would be $0$ because we cannot have an inverse of $0$.      Prove that multiplicative inverse are unique; an element $a \in \mathbb{Z}_n$ cannot have two multiplicative inverses.    Suppose that an element $a\in\mathbb{Z}_n$ has an inverse $a'$. Next, suppose that $a^*$ is also an inverse of $a$. Then, $a'$ is a solution to $a \cdot_n x=1$, and similarly $a^*$ has a solution to $a \cdot_n x=1$.   Lemma: Suppose $a'$ is multiplicative inverse of $a$ in $\mathbb{Z}_n$, then for any $b \in \mathbb{Z}_n$ the equation $a \cdot_n x=b$ has a unique solution, such that $x = a' \cdot_n b$.   By Lemma, equation $a \cdot_n x = 1$ has a unique solution, namely $x=a'=a^*$. Therefore, an element $a\in \mathbb{Z}_n$ cannot have two multiplicative inverses.    Thank you for the help. I would love any constructive feedback for these. If you can help me elaborate on some ideas, that would be really helpful also.  Thank you very much! netplan configuration on Ubuntu 17.04 virtual machine I'm running VirtualBox with 2 network adapters: standard NAT (enp0s3) and a Host-only Adapter (enp0s8). I use the NAT to access the internet and the Host-only Adapter to SSH in from my local machine.  The box boots up with both adapters enabled, both have IP addresses, everything looking good.    I can SSH into this box over the host-only adapter, no issues there. But I can't get on the internet with it. However, if I disable the host-only adapter, then I can access the internet (but obviously I can no longer SSH into it over the local tunnel).    And finally, here is my netplan yaml config:  # This file describes the network interfaces available on your system # For more information, see netplan(5). network:   version: 2   renderer: networkd ethernets:   enp0s3:     dhcp4: yes     dhcp6: yes   enp0s8:       dhcp4: no     dhcp6: no     addresses: [192.168.52.101/24]     gateway4: 192.168.52.101   Any ideas? It seems like maybe all my outbound traffic is routing through the host-only adapter somehow.  Edit: attaching the output of ip route list in case it helps.  default via 192.168.52.101 dev enp0s8 proto static default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 100 10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 10.0.2.2 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 100 192.168.52.0/24 dev enp0s8 proto kernel scope link src 192.168.52.101 Inline suggested edit reviews are truncated in medium-width windows I'm going to guess that the answer is "no" based on the below error message (and ), but is there anyway to perform a cross-database query using PostgreSQL?  databaseA=# select * from databaseB.public.someTableName; ERROR:  cross-database references are not implemented:  "databaseB.public.someTableName"   I'm working with some data that is partitioned across two databases although data is really shared between the two (userid columns in one database come from the users table in the other database). I have no idea why these are two separate databases instead of schema, but c'est la vie... I believe this to be fraud — hired, then asked to cash check and send cash as Bitcoin I have been "hired" by Nissan Motor as a key account specialist.  My first assignment is to cash two checks that I have received. Both were written by a customer who has already received the engines. The total is $2500. I am to cash the checks, get the money, take out my bonus and any other related expenses and deposit into a Bitcoin ATM. Then make copy of receipt and electronically send to my "manager".  I contacted a lawyer, was told to talk to the Department of Labor, who said they will not get involved, as this is between me and my employer. Any advice? Frattini subgroup $Φ ( G )$ is not trivial Frattini subgroup $Φ ( G )$ of a group G is the intersection of all maximal subgroups of $G$. The question is  Let $G$ be an abelian group.What is the sufficient and necessary condition of $Φ ( G ) ≠｛e｝$？  I think if $G$ has no torsion part, we cannot say $Φ ( G ) ≠｛e｝$,because $\Bbb Z ×\Bbb Z×・・・ ×\Bbb Z$ has a maximal subgroup $p\Bbb Z ×\Bbb Z×・・・×\Bbb Z$, with intersectioning distinct primes, we gain just a trivial group. So, we need torsion part. But I cannot proceed from here.I only know the answer, $G$ has an element of order $p^2$, that  is, $G$ has theree subgroups. I want to deduce this consequence from steady discussion. P.S  According to this answer, in a ring that is a finite direct product of quotient rings of $\mathbf{Z}$, we can say rattini subgroup is the same as the Jacobson radical of the corresponding ring. I would like to have an app include a custom font for rendering text, load it, and then use it with standard UIKit elements like UILabel. Is this possible? How to find correctly the .bib file? I have a .bib document called References.bib saved in the following directory: C:\Users\dvale\Documents\3_References\References.bib  This file contains this entry: @Article{Ballot2014,   author    = {Ballot, Andreas},   title     = {Diversity of cyanobacteria and cyanotoxins in {Hartbeespoort Dam, South Africa}},   journal   = {Marine and Freshwater Research},   year      = {2014},   volume    = {65},   number    = {2},   pages     = {175--189},   issn      = {1323-1650},   doi       = {10.1071/mf13153}, }  I created a document and cited this reference, however the citation is not appearing, apparently because the .bib file was not found. I'm using biber as bibliographic tool (if is important this information). \documentclass[12pt,a4paper]{article} \usepackage{biblatex} \addbibresource[location=remote]{C:/Users/dvale/Documentos/3_References/References.bib} \begin{document} Example \cite{Ballot2014} \printbibliography \end{document}  When I compile the bibliography (F8 in TeXstudio) the following error appears ERROR - Cannot find 'C:/Users/dvale/Documentos/3_References/References.bib'!  EDIT 1: I use JabRef to create my .bib files with UTF-8 encoding The .blg file has the following information in the notepad [0] Config.pm:312&gt; INFO - This is Biber 2.15 (beta) [0] Config.pm:315&gt; INFO - Logfile is 'MWE.blg' [105] biber-MSWIN64:330&gt; INFO - ===  [127] Biber.pm:415&gt; INFO - Reading 'MWE.bcf' [234] Biber.pm:952&gt; INFO - Found 1 citekeys in bib section 0 [251] Biber.pm:4334&gt; INFO - Processing section 0 [267] Biber.pm:4523&gt; INFO - Looking for bibtex format file 'C:/Users/dvale/Documentos/3_References/References.bib' for section 0 [502] Utils.pm:411&gt; ERROR - Cannot find 'C:/Users/dvale/Documentos/3_References/References.bib'! [502] Biber.pm:132&gt; INFO - ERRORS: 1 Table column not align if give color for Table entries My code follows:  \documentclass{book} \usepackage{color,colortbl} \begin{document}  \begin{tabular}{ll&gt;{\color{red}}p{20pc}} a &amp;1 &amp;Test \end{tabular}  \end{document}   The output was:    Some unnecessary vertical space came before the last column. If I remove the tag \color{red} then everything works fine, how can I fix this?  Above said issue was fixed based on the suggestion given by David Carlisle and CarLaTeX, but the same problem was there if I use the supertabular environment, I used supertabular package for auto breaking table and the code follows:  \documentclass{book} \usepackage{color,colortbl,supertabular} \begin{document}  \begin{supertabular}{ll&gt;{\leavevmode\color{red}}p{4pc}&gt;{\leavevmode\color{black}}l&gt;{\leavevmode\color{black}}l&gt;{\leavevmode\color{red}}p{4pc}} a &amp;1 &amp;Test &amp;a &amp;1 &amp;Test\\ a &amp;1 &amp;Test &amp;a &amp;1 &amp;Test\\ \end{supertabular}  \end{document} How to resize partitions? How has the age of the Universe been derived from the observations made by the Planck mission? biblatex: displaying all authors of multi-author works in the bibliography I'm using the  package to add citations and a bibliography to my LaTeX document. I've noticed that only the first author plus "et al." is displayed for works with more than three authors. That's fine with me for in-text-citations, but I'd rather have the complete author information in the bibliography. How can I do that? I have an unused copy of Mass Effect 2 Collector's Edition bought via Amazon.com in the US, including a special code for Inferno Armour (also unused).  Will it work fine if I install and start playing the game in the UK? Does geographical location matter?  Thanks! Why doesn't the Related question list show that questions are closed? I saw a question on Meta that was obviously going to be a duplicate:        And indeed, looking at the "Related" questions list for that question showed a number of duplicates:    Being the good citizen I am, I tried to vote to close (technically Flag as duplicate as I've not got the rep here to vote to close) it as an Exact Duplicate only to find myself falling into a rabbit hole of Closed, Duplicate questions. Is there any way to flag a closed question as such in the Related list?  Mostly because the first one I picked was closed as a duplicate of the second one, which was closed as a duplicate of the one that is now listed as the duplicate/linked answer.   Edit to respond to comment:  I take the point about "not voting to close on title alone", and normally wouldn't, however as the questions had identical titles, and it's pretty clear what they should be asking, I clicked the first one:    which lead to:  which leads to:  - but I'd got bored following links and didn't check that one as the first two were identical, so assumed this was too and didn't want to see how deep the rabbit hole led.   In the related list, there's only one other question in there that is an exact duplicate, but hasn't (currently) been closed as such which is:      Reasoning for highlighting closed questions:  The "Questions with similar titles" does display the closed titles when asking the question, so it should be fairly possible to include.  If there are clearly duplicate titles, then as a reader/reviewer would be helpful to know which ones are already closed as duplicates so you can either:   Use the remaining open questions to focus on which of those is the canonical answer to close this with. Use the closed questions to find the canonical answer (which failed for me with my route of clicks). Profile avatar lost on several sites after profile edit (Gravatar replaced with Identicon) I have had the same network-wide profile avatar for many years; it's a custom image which I installed nework-wide soon after I registered for Stack Overflow back in 2011. I still see that image e.g. on  and  but not, for instance, on this site, or e.g. on   (The example originally linked to my Unix &amp; Linux profile instead of Super User but I experimentally changed my profile back to the gravatar one there.)  I routinely update my profile presentation text every few months, and did so again a few days ago. Comments below seem to indicate that others who recently edited their profile are experiencing the same problem.  My preferred avatar is a Gravatar which is connected to my email address, which has always been the same (MD5 091f411d57db5be8298e057a32e5ad72). The replacement seems to be a generic identicon with a different MD5. I don't recall seeing this identicon as an option in my profile before:    You'll notice that the gravatar is still visible as an option, but I can find no way to replace it on all sites in one go. I switched back to the gravatar one on Unix &amp; Linux and noticed that the help next to the "Save" button says     Your profile will be updated on all public communities.   but alas, that did not in fact happen. Do I really have to go over 170+ member sites and manually select my gravatar on each? The  (ESC), states that for every natural number $n \geq 2$, there exists a set of natural numbers $a, b, c$ , such that the following equation is satisfied:  $$\frac{4}{n}=\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\tag{1}$$  The basic approach to solving this problem outlined by Mordell [Ref1] is described below  By defining $t$ and $m$ as positive integers greater than zero and $q$ a positive integer greater than one we can observe that  a) There is always a solution for even $n$, since if $n=2^qt$ we have the trivial solution $$\frac{4}{4t}=\frac{1}{t}$$  In the remaining case $n=2(2t+1)$, a solution in the form of two Egyptian fractions can always be found  e.g. $$\frac{4}{2(2t+1)}=\frac{2}{2t+1}=\frac{1}{t+1}+\frac{1}{(t+1)(2t+1)}$$  b) If $(1)$ is a solution for some particular prime $n$ then all composite numbers $mn$ divisible by $n$ are also solutions, thus  $$\frac{4}{mn}=\frac{1}{ma}+\frac{1}{mb}+\frac{1}{mc}$$  will also be a solution. This means that we can simplify the analysis to the cases where $n$ is a prime greater than 2.  Using Mordell's approach we have just shown that we only need to consider the cases where $n$ is prime and where $n \equiv 1 \pmod{2} \;\;[meaning \;\;n=2t+1]$  The argument continues...  Mordell goes on to show in turn that the search can be reduced further to the cases when $$n \equiv 1 \pmod{4} \;\;[meaning \;numbers \;\;n=4t+1]$$ $$n \equiv 1 \pmod{8} \;\;[meaning \;numbers \;\;n=8t+1]$$ $$n \equiv 1 \pmod{3} \;\;[meaning \;numbers \;\;n=3t+1]$$ $$n \equiv 1,2,4 \pmod{7} \;\;[meaning \;numbers \;\;n=7t+1,n=7t+2 \;or\;n=7t+4 ]$$ $$n \equiv 1,4 \pmod{5}  \;\;[meaning \;numbers \;\; n=5t+1 \;or\;n=5t+4]$$  Assembling these results together, Mordell showed that the conjecture can be proved in this context except for the cases when $$n \equiv 1,11^2,13^2,17^2,19^2,23^2 \pmod{840}$$  Mordell stated that since the first prime meeting this condition is 1009, this is proof that the conjecture holds for $n&lt;1009$.  This basic approach can be pursued further. Other workers have shown that the conjecture holds for much higher values of $n$ using similar methods as can be seen on the above Wikipedia page.   Note that other intermediate results can be constructed from the above congruence's, e.g. $n \equiv 1 \pmod{24}$.  The question is:  Are there any other elementary approaches to solving this problem than the one outlined by Mordell (and described above)?  [Ref1] Louis J. Mordell (1969) Diophantine Equations, Academic Press, London, pp. 287-290. Erasing elements from a vector I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector&lt;int&gt;&amp; myNumbers_in, int number_in) {     std::vector&lt;int&gt;::iterator iter = myNumbers_in.begin();     std::vector&lt;int&gt;::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector&lt;int&gt; myNmbers;     for(int i = 0; i &lt; 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector? If $p$ is congruent to $2 \pmod 3$, how can I prove that all $a$, $1 \le a \le p-1$ are cubic residues $\mod p$?  Here's what I've done:  $1^3$ congruent to $1 \pmod p$ thus, 1 is a cubic residue, Also $(p-1)^3=(p-1) \pmod p$ implies  $$(p-1)^3 - (p-1) = (p-1)[(p-1)^2 -1] = (p-1)(p^2 -2p) = p(p-1)(p-2) $$ implies $$p|(p-1)^3 -(p-1)$$ Thus  $p-1$ is a cubic residue $\mod p$. Now I don't know how to show for $1\lt a \lt p-1$ are all cubic residues when $p$ is congruent to $2\pmod 3$.