I have web app which contains iframe. In main part client communicates with server by ajax, additionally i added beforeunload = function(){ return "something";} , so when user clicks browser back button alert will appear, when user clicks leave the page, he will lose session and login page will show. In iframe part  i use servlet, so when user clicks browser back button alert won't appear because only iframe page will unload. Now what i want to achieve. While user is manipulating in iframe, when he clicks browser back button then alert should appear and when user click leave page i want to log off whole app. When he clicks don't leave page inside iframe shouldn't reload.  I tried to solve this using two events beforeunload and unload. This is inside iframe:  var confirm = false; var clicked = true; $(window).on('beforeunload', function(evt){     if(confirm){         return "Text";     } else {         clicked = false;     } }); $(window).on('unload',function(evt){     if(clicked){         $(this).off('beforeunload');         window.parent.location = window.parent.location + "/error";     } });   Now when user manipulating in iframe clicks back button browser, alert appears. When clicks leave page is working good, log out. But when clicks don't leave, the page in iframe will back to earlier and i don't why:(. I want to prevent it.
I am writing an application that if the user hits back, it may resend the same information and mess up the flow and integrity of data. How do I disable it for users who are with and without javascript on?
When should I upgrade my camera body? As the question says, when should I upgrade my camera body? In particular, if I have a low- to mid-range body (A DSLR such as a Nikon D3200 or Nikon D5100, or Canon SL1 or T5, or a mirrorless camera such as a Panasonic GH3 or an Olympus E-PL6). How do I know when I need to upgrade?  I have a complement of "kit" lenses, such as an 18-55mm f3.5-5.6 and a 55-200mm f4-5.6. Maybe I've even added a 50mm 1.8 to the kit. Flash is only for indoors (right?) and I usually shoot outside, so that means I don't need an external flash.  I shoot photos of my family and friends whether out at the park or having a picnic, my kids sports practices and games, vacation photos, as well as some landscapes, flowers, and whatever else catches my eye. Pretty familiar territory. I'm not a professional and don't intend to become one. Find out trace of a given matrix $A$ with entries from $\mathbb{Z}_{227}$ Let $A$ be a $227\times 227$ matrix with entries in $\mathbb{Z}_{227}$ such that all of its eigen values are distinct. What would be its trace? I think it is zero by adding all 227 elements but i am not sure.  Edited: Here I have assumed that eigenvalues are in a base field. Suppose Pat is male. Which one is correct?     I found out Pat is male.      I found out Pat was male.   Does the following change make any difference?     She said Pat is male.      She said Pat was male.   Suppose you created a mathematical model. When you are describing a result, which one (or neither) is correct?     The model analysis shows that the equilibrium is stable.      The model analysis showed that the equilibrium is stable. Prove that if $a+b+c$ divides $abc$, then $a+b+c$ must be composite. I have seen another post for this same question but it never got an answer. Since I am fairly new, I can't comment on other's posts, therefore I am creating a new one. The question states:  If a, b, and c are positive integers, prove that if $(a + b + c) | (a*b*c)$, then $a+b+c$ is composite.  I do not really know how to approach this.  The link to the post with the same question is: Can't move files to trash without any permission issues This is not like one of the cases addressed before - I've checked them all.  I've suddenly begun getting that message "... can't be put in the trash. Do you want to delete it immediately?" this morning in my Home directory only.  I have a Home partition (ext4, mounted properly) with symlinks for user folders like Downloads, Documents, etc. to folders with the same names in a Data partition (ntfs, mounted properly).  For example, I cannot move a file in Downloads folder to Trash when I try via Home, but no problem if I try via Data partition, although the file in question has the same ownership and permissions at both locations.  Also no problem at all with files in my Home folder, including sub-folders like Public that are not symlinked to my Data partition.  Interesting puzzle for me...  PS: Just upgraded to 15.04 but I don't think it matters... On second thought, it might perhaps be something to do with upgrading from Nautilus 3.10 to 3.14?  PPS: This bug has been finally resolved some time later in version 16.10, and no longer exists under Ubuntu 17.04. Prove that if for every $x \in \mathbb{R}^N$ $Ax=Bx$ then $A=B$ Cannot remove block comment in Eclipse after formatting I predicted the formula by finding total number of non-isomorphic labelled trees of order 1 is 1 , order 2 is 1,order 3 is 3,order 4 is 16,order 5 is 125.But how do i prove it ? I am beginner in graph theory so i will be very thankful if i get some simple approach to solve the problem(Not by using some difficult theorems). The Software Center in Ubuntu 16.04 (Gnome Software) shows only part of the packages available. While e.g. apt list qtcreator correctly lists the corresponding package a search in Software Center finds nothing.  Is there something misconfigured? I upgraded from 15.10. Until now I have used the old Ubuntu Software Center which worked fine. How to typeset row operations on augmented matrix I would like to typeset row operations on a augmented matrix, but the "gauss"-package does not seem to support the vertical line just before the last column, any way to do this?  Thanks! Deleting Objects in JavaScript Short story about robots on a farm after losing communications, go out to rule the world I would like to have multiple bibliographies (reference lists) as described in   ().   However, I'd like to use with a single .tex file, which would contain the bibliography database embedded, as in  ...   Now, I want to use letter documentclass, for which the bibliography needs to be defined ()   So what I end up is with this example (code below, compiled with just pdflatex, no bibtex(which I'd like to avoid in this case)):     ... obviously, something works (multibib recognized primary and secondary cites, assigning them number "1" as start) -- however I don't get two, separate primary and secondary list of references; would that be possible in this context? (doesn't have to be with multibib, but I'd like to avoid a separate .bib file and a bibtex call)  EDIT: I'd also like separate cite keys (i.e. rendered as [a1] and [b1]; not yet sure if multibib can do that; edit: no it cant,  says "You can also edit the .bbl files created by BibTEX and add 'a', 'b',. . . to the labels, but your changes will be overwritten by subsequent BibTEX runs." and recommends \cite[a]{key}) - how possible would that be?  &nbsp;  The code is this:   \documentclass{letter}  % Environment thebibliography undefined when using letter: http://www.latex-community.org/forum/viewtopic.php?f=4&amp;t=3359 \makeatletter \setlength \labelsep {.5em} \newcommand\newblock{\hskip   .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newcommand\refname{References} \newcommand\section{\@startsection   {section}{1}{\z@}%   {-3.5ex \@plus -1ex \@minus -.2ex}%   {2.3ex \@plus.2ex}%   {\normalfont\Large\bfseries}} \newenvironment{thebibliography}[1] {\section*{\refname}%   \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%   \list{\@biblabel{\@arabic\c@enumiv}}%   {\settowidth\labelwidth{\@biblabel{#1}}%     \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code     \usecounter{enumiv}%     \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}%   \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty   \widowpenalty4000%   \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty       `thebibliography' environment}}%       \endlist} \makeatother  \usepackage{multibib} \newcites{pri}{Primary sources} \newcites{sec}{Secondary sources}  \begin{document}   \begin{letter}{Addressee} Blah, blah - content...  Primary cite: \citepri{lamport94} ...  Secondary cite: \citesec{lamport94} ...   \begin{thebibliography}{9}  \bibitem{lamport94}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1994.  \bibitem{lamport95}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1995.  \end{thebibliography}  \end{letter}   \end{document} Google Chrome doesn't seem to respect my DPI setting in Windows. I run at 150 DPI, but Chrome ignores that, meaning that images and text are teeeeeeny tiny.  I hit:   Ctrl + + Ctrl + +   to zoom in. Unfortunately every new tab, or new window, defaults to the 100% teeny tiny zoom level.  Update: It's also important to note that you cannot click buttons in flash (e.g. YouTube videos), because Chrome mis-handles mouse coordinates. (Fixed 6.0.472.55)  Is it possible for either:   Chrome to respect my Windows dpi setting? Chrome to remember my zoom preference?   Checked version: 4.1.249.1045    Half fixed    While Chome still doesn't honor the Windows DPI setting, it does now remember your zoom level.  Version: 5.0.375.55    Five-Eighths Fixed    While Chrome still doesn't honor the Windows DPI setting, it does now offer a default "page zoom" option:    Unfortunately there is no zoom level that matches my current DPI setting: 136% (131dpi).  Version: 10.0.648.133  Zoom flag  I tried scoducks' suggestion of the new hidden dpi flag. It's truly awful. It seems to cause Chrome to simply re-scale the final rendered Window; causing text to become blurry (rather than sharper): Digging in deeper to Javascript Remoting and I'm a bit confused.  The  starts off by showing how to set up everything and uses code like the following:  function getRemoteAccount() {     var accountName = document.getElementById('acctSearch').value;      // This remoting call will use the page's timeout value     Visualforce.remoting.Manager.invokeAction(         '{!$RemoteAction.AccountRemoter.getAccount}',         accountName,          handleResult     ); }   However, I've also seen examples where Visualforce.remoting.Manager.invokeAction is never called.  They end up looking something like the following:  function getText() {   var text = "";   JSRemotingBasicsController.doGetText(     function(result, event) {       // do something here     }   ); }   I'm wondering what is the point to using Visualforce.remoting.Manager.invokeAction when you can just reference the RemoteAction directly like the second example?  Is there something I'm missing?  Is there a time where the second example doesn't work? Distribution of the maximum of two correlated normal variables let a,b be real  numbers and $\varepsilon&gt;0$. prove the above inequality. I dont know how to even start. please, I need your help. Best location for theme translation files I usually store language files in /languages folder that is located in theme folder and it's also recommended location by WordPress as well. However, it still doesn't look like the best solution because files will be overwritten after theme updates.  load_theme_textdomain function allows to specify a different location and I've been thinking to put languages folder inside of /uploads folder in order to prevent overwriting after theme updates. That folder will be created right after theme activation and language files will be copied there.  My question is, do you think this is a good solution or there is a better way that I'm missing?  I appreciate your insight about this matter. Which manga chapters correspond to the 2nd season (or "Season 3" on Netflix) of the anime, "Revival of the Commandments"? The 2nd season (labeled as "Season 3" on Netflix) of the anime, Nanatsu no Taizai: Imashime no Fukkatsu (or The Seven Deadly Sins: Revival of The Commandments), has ended.  Which manga chapters correspond to each of the anime episodes? I have Windows 8 Pro activated with kms. when I open windows store, it doesn't show "win8.1 available". clicking on ms-windows-store:WindowsUpgrade just brings me to windows store main screen  slmgr /dli shows volume_kmsclient channel  I can upgrade it to WMC. Laptop is W8Pro WMC and update is available, it's retail channel  Is W8 for KMS clients delayed or what?