abc  = None  def load() :    abc  = cPickle.load('a.pkl')  load()  def main(review):    print abc.predict('example')     The variable abc is still set to None.  main is accessing abc many times and I don't want to load the file every time. How can I load the contents of the file once?

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I am reading a proof of Serre's criterion for normality that takes for granted the following fact:  Let $I \leq J$ two ideals of a Noetherian ring $R$. If $I_p = J_p$ for every associated prime $p$ of $I$, then $I=J$.  Can someone help me out on how to argue this?

Let $I$ and $J$ be ideals of a Noetherian ring $A$. If $JA_P\subseteq IA_P$ for every $P\in \operatorname{Ass}_A(A/I)$, then $J\subseteq I$.   I'm reading Matsumura's Commutative Ring Theory book on my own. This is exercise $6.4$ in that book, and I fail to prove it. Could you help me with this? Thanks in advance.


I am processing a file with a time in its content that I want to capture as a UTC.  In my example file it expressed like this:     Sat Oct 13 16:45:23 EDT 2018    "EDT" expresses the local timezone where (and when) the file was created - "Eastern Daylight Time".  But my code may have to process files from different places and seasons so I cannot assume that will always be the code.  Is there are way in .Net of starting with a three letter timezone code and a date and getting back a UTC?

I'm trying to parse an international datetime string similar to:  24-okt-08 21:09:06 CEST   So far I've got something like:  CultureInfo culture = CultureInfo.CreateSpecificCulture("nl-BE"); DateTime dt = DateTime.ParseExact("24-okt-08 21:09:06 CEST",     "dd-MMM-yy HH:mm:ss ...", culture);   The problem is what should I use for the '...' in the format string? Looking at the  MSDN page doesn't seem to list a format string for parsing timezones in PST/CEST/GMT/UTC form.


Simple question I'm having an annoying time with:  My main is set up as such:  int main(int argc, char *argv[]){     int i = (int) argv[1];    cout << "Inputted value: " << i << endl;    return 0; }   If I compile and execute with g++ main.cc -o main and main 5 I get a garbage result back on cout. How do I fix this casting issue?

What's the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of ).


In the double-slit experiment, each bright fringe is the result of waves going through both slits and reaching the screen in phase. In other words the difference between the two paths lengths is an integer multiple of the wavelength. For all the fringes except the central one, one path is shorter than the other. In the single-particle experiment, can we time how long the particle takes to reach the screen? If so, what is the result?

In the double-slit experiment, quantum mechanics states that if you try to determine which slit the photon goes through, you won't have a resulting wave pattern.  But, knowing the time it took for the photon to go from the source to the observing screen, can you deduct the distance of the photon path and so which slit it passes through (except if the photon impacts the exact middle of the observing screen)?


I have just started a course on particle physics and I tried to see what the muon $g-2$ experiment basically says. There were some videos trying to put it in layman's terms but those were not very satisfactory. Can someone explain what happened in this experiment and what do the new results indicate that deviate from the existing theory in simple terms (if possible)? Why are the results an indication of a new fundamental force or particle? Are there any existing theories like string theory that could account for such deviations?

Today it was announced that the Fermilab measurements of the muon's gyromagnetic ratio are in disagreement with the Standard Model with a statistical certainty reported at 4.2 sigma [, ], raising the distinct possibility that the discrepancy measured originally at Brookhaven two decades ago is real. On the other hand, a  claims that through state of the art lattice calculations, they have obtained a new theoretical estimate of the muon's $g$-factor which, to my understanding, they claim reduce the discrepancy between theory and previous experiments. From what I have read and understood, it seems to me that (1) the new Fermilab sigma figure is presumably being compared to older theoretical calculations and (2) the new theoretical calculation is presumably being compared to older experimental measurements. This seems rather incredible that these two seemingly conflicting announcements come on the same day. So my question is, what gives? Do the new theoretical calculations (assuming they can be verified) lower the new Fermilab sigma figure?


The notifications we get on the inbox and achievements icon in the top-bar seems to be a bit misplaced. Here is a snapshot of it.    It seems to be misplaced by only a few pixels, but it seems to be misplaced nonetheless. I'm using Chrome 36.0.1964.2 dev-m on a Windows 7 machine.

Which browsers are officially supported by Stack Exchange?  Also, what else is needed in order to use every feature of the site?


I've noticed that in the common use of English, namely in songs, there is also an extra redundant(?) "a" before a gerund, such as in a gospel song I heard     Jesus is a coming   (this particular phrase looks like ).  What's the exact grammatical role of this extra inserted a? Is it the indefinite article? Why is it there? Is there any specific reason for it, or is it just bad language, slang or what? Has it developed from a pause in the speech when the speaker needed an extra time to find the word? Something like this:     Jesus is a... what the hell is he.. well, coming!   ADDED:  Based on a comment I am supposed to spell it as     Jesus is a-coming   so maybe you may comment on this, too.

For example,   If this van's a-rockin', don't come a-knockin'  (song title)   (song title)   I have a few related questions:   What is the "a-" or "-a" called? Is there a function beyond a rhythmic one? Why is "a-" attached to a word at all -- and why attach to a word at all?


Sometimes an answer () receives a number of comments of a similar nature and a sensible response is to edit the answer to account for the comments. If you just edit, the commenters get no notification and more than likely will never see the edit. Of course, it's possible to reply to each comment, "Hey @joe123 - see the edit" - which is OK for one comment, but not really more than that. It would be useful to have the option of notifying commenters about an edit. To be clear, the feature should be opt-in - it should default to notifying no-one. When you make an edit, there is list of commenters below who you can choose to notify. The commenters have already expressed an interest in the question, so it's not particularly spammy for them to receive a notification.

As a result, comments with the words "@user Code fixed. See updated post" or similar are very common, and sometimes they may add clutter to the post.  I therefore propose a feature: when a user edits his own post, an additional entry field is to appear under the post, similar to the "Tags" field when you ask a new question. The user can then choose commentator(s) to notify. After the edit is made the chosen commentator(s) will then receive a notification.  This will reduce the work needed to be done to notify a commentator of an edit, and will also reduce the number of obsolete comments, without the need of additional moderation work.


let $f$ be a entire function and $B$ is bounded open set.  Then is it true that   $\partial(f(B)) \subset f(\partial B)$.  Hint is given that use open mapping theorem . But i got stuck how to use it. please provide some hint

Let $f$ be an entire function and $B$ be a bounded open set in $\mathbb {C} $. Prove that boundary of image of $B$ under $f$ is contained in image of boundary of $B$. Does the same result is true for unbounded open set in $\mathbb C.$


"A rose by any other name would smell as sweet" is from Shakespeare's Romeo and Juliet. It means: what matters is what something is, not what it's called.  I feel like this phrase has a very positive connotation to it: what matter is not what this fantastic thing is called, it matters what it is. Is there another common phrase, metaphor, or idiom I can use that has a more negative connotation? I'm looking for a phrase that says that it doesn't matter what this bad thing is called, it's still the same bad thing.  An idiom like, "lipstick on a pig" or "sugarcoating" means making a bad thing seem less bad. This is not what I'm trying to convey.

I'm looking for a way to idiomatically express the sentiment that just because you give something a different name, or precede it with a disclaimer, it doesn't change what it is, e.g.:   "I mean this as constructive criticism, not an insult, but ..."  "I'm not racist, but ..." "With all due respect ..."


I'm having a spinal cord stimulator implant fitted soon and travel a couple of times a year to European destinations, although am planning a trip to the USA too:) My concern is although I will be given an i.d card stating I have the implant I will still be subjected to the scanner which I have been told will wipe the memory of the equipment. I have titanium rods/screws etc., in my leg/hips already and have been on the floor being subjected to a 'search' after I set the alarm off previously. Really nervous this will get worse once the implant is in place and I won't be going anywhere if they wipe the programmer. (The implant involves a battery (approx 6"x5") being inserted into the tummy wall with leads up the epidural space and then leads to the pain areas in your body so to an x-ray I will look extremely suspicious:/). Has anybody had problems going through airport security or do I get assisted travel?

I had an operation some time ago and now I have small screws in my shoulder which will not be removed anymore. When I decided to fly for vacation, I supposed that these will may bring me into trouble at the airport when going through the metal detector.  So I asked my doctor and at the hospital if there is any kind of "passport" or something similar which confirms the screws in my shoulder so that I do not get into many problems. Unfortunately, they told me such things do only exist if you get a new knee or something, not if you just have a few screws in your body.  When I flew from Vienna to Amsterdam and back, my fears were confirmed: The security staff inspected me very precise, and I had to explain them my story. Thank god I have some scars left so they believed me!  However this is not a permanent solution for the future. Is there any international "passport" which my doctor and hospital do not know about? If not, what else are my possibilities?  I am not that afraid when travelling within the EU, however I fear that this situation might get quite dangerous when I'm in other countries...


I'm trying to implement a LinkedList with an add method. As you can see, I've created a LinkedList class and initialized it with a nodes attribute that's an ArrayList containing Strings.  The add function should simply take a value and append it to the end of nodes. Instead, I'm getting a NullPointerException.  What am I missing here?  public class LinkedList {   public static ArrayList<String> nodes;    public LinkedList() {     ArrayList<String> nodes = new ArrayList<String>();     System.out.print(nodes);   }    public ArrayList<String> add(String value) {     nodes.add(value);     return nodes;   }     public static void main(String [] args) throws IOException   {     LinkedList list = new LinkedList();     list.add("B");   }  }

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


When I  of a code block as VB.NET like this:  <!-- language: vbnet -->      theNodeList.Cast(Of XmlNode)()   theNodeList.Cast(Of XmlNode)()   the code is not highlighted. But this variation works:  <!-- language: lang-vbnet -->      theNodeList.Cast(Of XmlNode)()   theNodeList.Cast(Of XmlNode)()   I get the same results for both versions when I replace vbnet with vb.net:  <!-- language: vb.net -->      theNodeList.Cast(Of XmlNode)()   theNodeList.Cast(Of XmlNode)()     <!-- language: lang-vb.net -->      theNodeList.Cast(Of XmlNode)()   theNodeList.Cast(Of XmlNode)()   In the first version, the language is specified through the tag. In the second version, it's specified through the syntax highlighting parser name. The problem is that the  tag isn't automatically setting the correct parser for (unlike most other language tags).  indicates that a diamond moderator has the power to fix this. Or perhaps the parser is correctly set for the tag, but there's a bug in Stack Overflow with tags with periods in their names.  The tags on a question shouldn't affect whether this problem appears, since the comment should override all tags. That makes this question different from , where there were multiple tags on a question, and a code block with no comment was being assigned the wrong default language.

I'm the maintainer for .  Markup authors can specify the language for source code, but not markdown authors. Are the SO admins interested in a way of doing this?  If so, might the following work   If the first line is "#!" followed by one or more word characters, then make the first line invisible (using CSS hidden:visible) and use those word characters as the file extension. Otherwise, use the current scheme.   So  #!css tag.class#id { color: red }   would be recognized as CSS.  In markdown, should any indicator of line numbers survive copy-paste in markdown?  Does any scheme like this need to do work to handle quoting of responses in markdown?  Is it common for inline responders to split code sections?  Do users also want to number lines (  ), so that others can respond with reference to particular lines?


I have an assignment that is supposed to use three stacks to ultimately find palindromes.  Two stacks will need to hold the reverse of the input sequence.  I need to pop the items from one of those stacks and push them into the third stack.  This will obviously create two stacks with reverse items that can be compared to see if the input string is a palindrome.  I have already written a class 'ArrayStack' and 'LinkedStack'.  I am now supposed to write a class that has three ArrayStack instance variables, a constructor that takes no parameters and will create three stacks of type ArrayStack and a method that takes a string parameter and returns a boolean.  The incoming string will be used to check for Palindromes.  The individual characters of the string will need to pushed into one of the stacks.  After that is figured out, I need to do the same thing, but with using the 'LinkedStacked' class.  This is the code I have so far and have tried multiple things and have gotten multiple errors (NPE, etc).  Any pointers / explanations / advice would be appreciated.  I think I have gotten myself really confused.  Thanks in advance for any help offered.  Please note I am a beginner.    public class ArrayPalindrome {      static ArrayStack one;     static ArrayStack two;     static ArrayStack three;      public ArrayPalindrome(){         this.one = one;         this.two = two;         this.three = three;     }      public static boolean isPalindrome (String input ){         String input2 = "";         for (int i = 0; i < input.length(); i++) {             char character = input.charAt(i);             one.push(character);         }         while (!one.isEmpty()) {             // add the character at the top to a string                input2 = input2 + one.pop();         }         return true;     }      public static void main(String[] args) {         if (one.equals(two)){             System.out.println("Palindrome");         }         else {             System.out.println("Not a Palindrome");         }     }


New to collections and trying out the below code, I am getting the below excpetion:     Exception in thread "main" java.lang.NullPointerException      at org.first.collectionsframework.CollectionsFirsttest.addCountytolist      at org.first.collectionsframework.CFTmain.main(CFTmain.java:16)    My classes are as shown below, can some onepoint me to what I am doing wrong:     1st: CollectionsFirsttest       2nd: CFTmain   public class CollectionsFirsttest {    String name;   int employeeID;   String city;   List<String> county;  /* constructor*/ public CollectionsFirsttest(){ }  public String getName() {     return name; }  public void setName(String name) {     this.name = name; }  public int getEmployeeID() {     return employeeID; } public void setEmployeeID(int employeeID) {     this.employeeID = employeeID; } public String getCity() {     return city; } public void setCity(String city) {     this.city = city; }  public void addCountytolist(String x) {     this.county.add(x);     System.out.println("County added is:" +x); }   }      2nd: CFTmain  public class CFTmain {  public static void main(String[] args) {     CollectionsFirsttest CFTobject1=new CollectionsFirsttest();     CollectionsFirsttest CFTobject2=new CollectionsFirsttest();     List<Object> objlist= new ArrayList<Object>();      CFTobject1.setName("Dummy");     CFTobject1.setEmployeeID(001);     CFTobject1.setCity("Wonderland");     CFTobject1.addCountytolist("cvs1");     CFTobject1.addCountytolist("cvs2");     CFTobject1.addCountytolist("cvs3");      CFTobject2.setName("Pumkin");     CFTobject2.setEmployeeID(002);     CFTobject2.setCity("Wonderland");     CFTobject2.addCountytolist("mtv1");     CFTobject2.addCountytolist("mtv2");     CFTobject2.addCountytolist("mtv3");      objlist.add(CFTobject1);     objlist.add(CFTobject2);      display(objlist);  }        public static  void display(List<Object> l) {             System.out.println(" The values in list:"+System.identityHashCode(l));             for (Object d: l)             { System.out.println("the values in the first object  is"+System.identityHashCode(d));                 System.out.println ("The name in"+ d.getClass());             } } }   To some people my error might be pretty simple, but since I am new, hope its eating me up. I am running into error as soon as I am trying to enter county into the List. CFTobject1.addCountytolist("cvs1");


So, we observe that galaxies are moving apart (on average) and the further away from us they are the faster they are moving away from us.  If space was expanding that would explain this.  However, I imagine that if a primordial explosion happened then at some point close to where the explosion happened things would not move much, and they would be moving faster the further away you were from "ground zero".  But if we were not near ground zero there should be some anisotropy in the speeds we observe, is that correct?  There should be a "ground zero" in the "explosion model", right??  However, regardless of the "ground zero" issue, do we (or could we) distinguish between a uniform "explosion" model and the idea that space is expanding?

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


I have a problem with natbibapa for package apacite. I Have the following text   \documentclass[a4paper,12pt]{article} \usepackage{amssymb,amsmath} \usepackage{amsxtra} \usepackage{amstext} \usepackage{latexsym} \usepackage{multiCol} \usepackage{graphicx} \usepackage[dvips]{color} \usepackage{epstopdf} \usepackage{mathrsfs} \usepackage{pictexwd,dcpic} \usepackage[english]{babel} \usepackage{subfigure} \usepackage{enumerate}  \usepackage[natbibapa]{apacite} \usepackage{setspace} \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} \usepackage{xtocinc}  \begin{document}  \bibliographystyle{apacite}  \bibliography{ref} \end{document}    When I run this code there is a message that,     Unkown option natbibapa for package apacite   This is the first time where I use natbib package. I did not download any package from the Internet regarding to natbib. I only add the following sentence to LaTeX:  \usepackage[natbibapa]{apacite}   I feel that in order natbib package working requires a document downloading from Internet.    Could you please help me in this problem?

A new version of the apacite package was introduced on 2012-Feb-14, with three added options to select different citation commands: apaciteclassic, natbibapa, and nocitation. I installed the package on MiKTeX 2.9 and tried to use it. The apaciteclassic option works without any issues. However, when I try natbibapa I get this error (I paste part of the log):  ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\natbib\natbib.sty" Package: natbib 2010/09/13 8.31b (PWD, AO) \bibhang=\skip48 \bibsep=\skip49 LaTeX Info: Redefining \cite on input line 694. \c@NAT@ctr=\count89 ) LaTeX Info: Redefining \BBA on input line 3. ! Undefined control sequence. \apacite.sty-h@@k ...elist {\orig@mb@citenamelist                                                    ,citeauthort,citeauthorp,c... l.3 ? ! Emergency stop. \apacite.sty-h@@k ...elist {\orig@mb@citenamelist   ,citeauthort,citeauthorp,c... l.3  End of file on the terminal!   Here is a minimal working example (that produces the error):  \documentclass[12pt]{report} \usepackage[natbibapa]{apacite}  \begin{document}  Lorem ipsum dolor sit amet. \citet{shermis1999comparison} consectetur adipiscing elit.  \bibliographystyle{apacite} \bibliography{myrefs} \end{document}   And here is the bib entry:  @ARTICLE{shermis1999comparison, author = {Shermis, M.D. and Lombard, D.}, title = {A comparison of survey data collected by regular mail and electronic   mail questionnaires},  journal = {Journal of Business and Psychology}, year = {1999}, volume = {14}, pages = {341--354}, number = {2}, publisher = {Springer} }     Can someone install the new package and see whether he/she gets the same error while utilizing the natbibapa option? Is there something I am doing wrong?  I appreciate any help.


I asked a Home network-type of question in the Network Experts community, and I was then informed that SuperUser was a better community to ask the question in, because Network Experts is for professionals (understood).  I deleted the question, and asked it in the right community, but given that I'm not a Network Professional, how do I leave that community?  I don't want their counts affected by a dead-weight user...

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I have to prove this by induction:      $n$ cars are travelling down a narrow one-way street. We know that:          The distance d between each two cars is the same.   The safe breaking distance b is the minimum distance between two cars that is needed for the second car to stop on time if the car in front suddenly breaks.   d < b         Prove by induction or refute: if the first car suddenly stops moving, all cars will stop moving. Before you do the induction state the property P you are using in the induction axiom.   So this is what I have until now and please tell me if it is right or wrong.  The property P: if $n=1$ stops, then $n=2$ will stop. (Is this property correct?)  We consider 2 cases:   Base case:  n=1 -> Since there is one only car on the road, that car will stop. (Should the base case start at 0, 1 or 2? )  Step case: (Supposed that the base case should start at 1)  As mentioned, for n=1 if the only car stops, then we can say all the cars have stopped.   Assume that all cars stop for n cars and then we prove that all cars stop for $n+1$. We create the set C of Cars in which are included all the cars in road. The moment the first car $(n=1)$ stops, the following cars have 2 ways to stop:    $n+1$ car stops without touching the n car $n+1$ car stops by touching and having/or not an accident with n car   Any suggestion?

$n$ cars are travelling down a narrow one-way street. We know that:  The distance $d$ between each two cars is the same. The safe breaking distance $b$ is the minimum distance between two cars that is needed for the second car to stop on time if the car in front suddenly breaks. $d < b$  Prove by induction or refute: if the first car suddenly stops moving, all cars will stop moving. Before you do the induction state the property $P$ you are using in the induction axiom.  What I came up so far: Proof: Base case: $n=1$ if there is only one car traveling down a narrow one way street, than obviously only 1 car will stop moving -> therefore the assertion is true Induction step: $n= k+1$ I am stuck here---- need a hint


I'm trying to prove the theorem below.     If $E(|X|^n)<\infty$ for some positive integer $n$, then $E(|X^k|)<\infty$ for every positive integer $k$ such that $k<n$   Here's what I've tried.  ref1)   ref2)     [Step 1] set inequality about $|X|^k$ and $|X|^n$  if $|X|\ge1$, then $|X|^k\le|X|^n$, while if $|X|<1$, then $|X|^k\le1$.  consequently, $|X|^k \le \max(1, |X|^n) \cdots (1)$.    [Step 2] prove the right-hand side of (1) has finite expectation  if $E(|X|^n)<\infty$, then $E(|X|^n) = \int^{1}_{-1}|X|^nf(x)dx \;+\; \int_{|X|\ge1}|X|^nf(x)dx$  and it follows that $\int_{|x|\ge1}|x|^nf(x)dx<\infty$ as a difference of two finite quantities.  Thus, $E(|X|^k))\le E\left\{\max\left(1, |X|^n\right)\right\} = \int^{1}_{-1}f(x)dx \;+\; \int_{|X|\ge1}|X|^nf(x)dx < \infty$    [Question 1] In [Step 1], Why contains "=" in $|X|^k\le1$?  As I think, "If $|X| < 1$, then $|X|^k<1$" is right.    [Question 2] In [Step 2], what are 'two finite quantities' referring to?  $E(|X|^n)$ and $\int^1_{-1}|X|^nf(x)dx$?

For a nonnegative random variable $X$, how to prove that $E(X^n)^{\frac1n}$ is nondecreasing  in $n$?


Someone from Taiwan is Taiwanese. Someone from Brazil is Brazilian. Someone from Israel is Israeli. What is someone from The United States called? Is someone from The United States called United Statesian?

Based on , I wonder: as an alternative to USAian (which is very nonstandard) is it OK to use  to more clearly indicate "inhabitant of the USA"?  According to , this phrase has grown in usage since the 1960's.  The problem I'm trying to solve is that American can relate to either an inhabitant of the American continent(s), or an inhabitant of the United States of America. (In fact, the one Brazilian person I know does refer to himself as American, or at least would like to be able to do so.)  I'm looking for a word that specifically means "inhabitant of the United States of America".  I can see that in German, 'US-Amerikaner' is certainly not uncommon (see e.g. Wikipedia). Also, see also the Wikipedia article .   Alternatively, if it turns out that "American" always means an inhabitant of the USA, what word can be used for inhabitants of the continent?


Err:1  focal/universe amd64 intel-media-va-driver amd64 20.1.1+dfsg1-1 Hash Sum mismatch Hashes of expected file:  SHA256:ef9f82cbfefb3fa3aef05a8da8bec15c508dd467facf22d41804e15a01e6a105 SHA1:7d04d04ecb836f691042fcff6de3dcbb0f0457d6 [weak] MD5Sum:6440280fa4564f7204fddc3ac5dfdd94 [weak] Filesize:1764416 [weak] Hashes of received file: SHA256:d01b4423e0b392a03a2eba570875483948f34c72584df4ce4cf464b6fa5161af SHA1:07a0cf00aaf972589c6ee7c477c72d52e8b7fa8b [weak] MD5Sum:923a904e7894a766ed1f776de4e634d9 [weak] Filesize:1764416 [weak] Last modification reported: Mon, 13 Apr 2020 11:28:18 +0000 Fetched 1,764 kB in 7s (252 kB/s) E: Failed to fetch   Hash Sum mismatch Hashes of expected file: - SHA256:ef9f82cbfefb3fa3aef05a8da8bec15c508dd467facf22d41804e15a01e6a105 - SHA1:7d04d04ecb836f691042fcff6de3dcbb0f0457d6 [weak] - MD5Sum:6440280fa4564f7204fddc3ac5dfdd94 [weak] - Filesize:1764416 [weak] Hashes of received file: - SHA256:d01b4423e0b392a03a2eba570875483948f34c72584df4ce4cf464b6fa5161af - SHA1:07a0cf00aaf972589c6ee7c477c72d52e8b7fa8b [weak] - MD5Sum:923a904e7894a766ed1f776de4e634d9 [weak] - Filesize:1764416 [weak] Last modification reported: Mon, 13 Apr 2020 11:28:18 +0000 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead.


I have 2 recyclerview. I want to add different types of book images to different lines in the horizontal plane. But when I add a book, it is added to both of recyclerview. Where's my mistake?  for loop:  for (DataSnapshot ds : dataSnapshot.getChildren()) {                         HashMap<String, String> hashMap = (HashMap<String, String>) ds.getValue();                          mBaslik.add(hashMap.get("baslik"));                         mFotoUrl.add(hashMap.get("downloadurl"));                          if(hashMap.get("baslik").equals("Roman")){                             initRecyclerView();                         }                         else if(hashMap.get("baslik").equals("Hikaye")){                             initRecyclerView2();                          }                      }

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


I have a fresh install of Ubuntu 17.10.1. Being used to the Ctrl-Shift-PrtScr, I really miss that. For some reason, it just doesn't copy the screenshot to clipboard.  When I manually execute gnome-screenshot --area --clipboard, the same thing happens. It gives me a crosshair to select an area, makes a shutter sound and the newly made screenshot is nowhere to be seen. Not even in the Pictures folder.  What's the issue here?

After upgrading to Ubuntu 17.10 I noticed some of my screencasting applications are not working, for example screencasting tools like SimpleScreenRecorder and vokoscreen. ()  Also I noticed features like screenshot from GIMP is not working properly, producing blank screenshots (). Shutter too is producing glitchy screenshots ().  Screen-sharing option on Skype is also not working ().  The issue occurs sometimes on later Ubuntu releases too.  Why is this happening and how do I fix this?


The CDF of a Poisson distribution with rate parameter $\lambda$ is $$ P(n;\lambda)=\sum_{k=0}^n \frac{\lambda^ke^{-\lambda}}{k!}. $$ As $n$ goes to infinity, the CDF would certainly approach 1. Now, consider the case when the rate parameter is $\xi n$ with $\xi\in(0,1)$ being a given constant. According to the last answer in , the following limit should be 1: $$ \lim_{n\to\infty}P(n;\xi n)=\lim_{n\to\infty} \sum_{k=0}^n\frac{(n\xi)^ke^{-n\xi}}{k!}=1. $$ Is it possible to check the convergence rate of the above limit? More specifically, I wonder whether the convergence rate is faster than $n$, i.e., whether $n[1-P(n;\xi n)]=O(1)$? I checked using software that the convergence rate is faster than $n$, but I don't know how to show it rigorously. Can anyone provide some hints and insights? Thanks!

I'm supposed to calculate: $$\lim_{n\to\infty} e^{-n} \sum_{k=0}^{n} \frac{n^k}{k!}$$ By using WolframAlpha, I might guess that the limit is $\frac{1}{2}$, which is a pretty interesting and nice result. I wonder in which ways we may approach it.


Suppose you have some vector $[a_1, \ldots, a_n]$ where the terms are non-negative.  How do you call the normalization method where you divide each element by the sum (to get a probability vector)? i.e. $$a_i \mapsto \frac{a_i}{\sum a_j}$$

Would you also be able to provide an example? I have very little mathematical/statistical knowledge and have never understood normalization.


I'm trying to write a linked list with a generic object based on this guide: . When I put the declarations and implimentations in the same file it works, but I'm having trouble separating the code into source and header files.  For reference I'm using code::blocks. I've tried readding the linked_list.cpp file, I've tried adding the directory it's in to the search directories under build options -> Search Directories -> Linker, and i've tried compiling it in gcc and g++ from command line manually and they've all given me the same error. I've obviously done something wrong when I tried to separate out the header file from the source file, I just can't figure out what. Relevant snippets from my code below.   main.cpp:  int main() {     LinkedList<int> *list = new LinkedList<int>();     list->append(1);     list->append(13);     list->append(32);     list->displayListValues();     return 0; }   linked_list.h  #ifndef LINKED_LIST_H #define LINKED_LIST_H  using namespace std;  template <class T> struct node {     T data;     node *next;     node *prev; };  template <class T> class LinkedList { private:     node<T> *head, *tail; public:     LinkedList<T>();     bool isEmpty();     void displayListValues();     void append(T value); }; #endif   linked_list.cpp  template <class T> void LinkedList<T>::append(T value) {     node<T> *new_node = new node<T>;     new_node->data = value;      if (head == NULL) {         head = new_node;         tail = new_node;         new_node = NULL;     } else {         new_node->prev = tail;         tail->next = new_node;         tail = new_node;         new_node = NULL;     } };

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


The references in my document have the following requirements:   My references need to appear before my appendices.  My appendices contain new references. These references should not appear in the main references list (before the appedices). Instead, they have to appear after each appendix (for example, when appendix A is ended, the references related to this appendix must be shown, then appendix B should be started).    I have only one big bib file for both main refrences and appendices' references (separating them is almost impossible !!)  I've looked for it several days to find a solution but I was unsuccessful. I tried multibib package but it doesnt show anything.  Would someone help me please to fix this issue.

I have a manuscript in which has the following structure:  Main Text Bibliography Appendix   However, there are citations which are only cited in the appendix, and they show up in the main bibliography. I would like to split my Bibliography into two different sections, so that the structure of the paper would look like this:  Main Text Bibliography for Main Text Appendix Bibliography for Appendix   I'm currently using bibtex and a single .bib file, and creating the bibliography with  \bibliographystyle {someBibStyleFile} \bibliography {bibFileName}   I'm interested in a method to split my single bibliography into main bibliography and appendix bibliography with minimal changes to the rest of the document.  I'm aware that biblatex is more powerful than bibtex, but I'm not prepared to make the switch before the deadline of this project. There are many related bibliography-with-multiple-sections type of questions, but I didn't see one that covers this case.


I am a high school student and I need help proving that $$\sum_{j=0}^k {n\choose j}  \cdot{m\choose k -j} = {n+m\choose k}.$$

How can we prove that     $$\sum_{k=0}^{n}\binom{R}{k}\binom{M}{n-k}=\binom{R+M}{n}?$$   (Presumptive) Source: Theoretical Exercise 8, Ch 1, A First Course in Probability, 8th ed by Sheldon Ross.


My /boot is out of space.  Issue is, I've been deleting my old kernels:  $ dpkg -l | grep linux-image ii  linux-image-4.15.0-36-generic                 4.15.0-36.39                                               amd64        Signed kernel image generic ii  linux-image-generic                           4.15.0.36.38                                               amd64        Generic Linux kernel image   Looks like 4.15.0-34 and 4.13.0-19 weren't properly deleted:  $ ls -al /boot total 92545 drwxr-xr-x  5 root root     3072 Oct  6 10:04 . drwxr-xr-x 26 root root     4096 Oct  3 14:54 .. -rw-r--r--  1 root root  1537610 Aug 27 10:45 abi-4.15.0-34-generic -rw-r--r--  1 root root  1537821 Sep 24 10:08 abi-4.15.0-36-generic -rw-r--r--  1 root root   216905 Aug 27 10:45 config-4.15.0-34-generic -rw-r--r--  1 root root   216954 Sep 24 10:08 config-4.15.0-36-generic drwx------  3 root root     4096 Dec 31  1969 efi drwxr-xr-x  5 root root     1024 Oct 12 08:36 grub -rw-r--r--  1 root root 15422137 Sep  2 14:30 initrd.img-4.13.0-19-generic -rw-r--r--  1 root root 58504792 Oct  6 10:04 initrd.img-4.15.0-36-generic drwx------  2 root root    12288 Jul 29  2015 lost+found -rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin -rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf -rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin -rw-r--r--  1 root root        0 Aug 27 10:45 retpoline-4.15.0-34-generic -rw-r--r--  1 root root        0 Sep 24 10:08 retpoline-4.15.0-36-generic -rw-------  1 root root  4044038 Aug 27 10:45 System.map-4.15.0-34-generic -rw-------  1 root root  4046393 Sep 24 10:08 System.map-4.15.0-36-generic -rw-------  1 root root  8277752 Sep 24 11:54 vmlinuz-4.15.0-36-generic   apt-get autoremove doesn't help:  $ sudo apt-get autoremove linux-image-4.15.0-34-generic [sudo] password for matt:  Reading package lists... Done Building dependency tree        Reading state information... Done Package 'linux-image-4.15.0-34-generic' is not installed, so not removed ...   No luck with grub either:  $ sudo update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.15.0-36-generic Found initrd image: /boot/initrd.img-4.15.0-36-generic Adding boot menu entry for EFI firmware configuration done   How can I safely (re)delete these?  Or do I just rm -f them?

Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time.    I know I can manually search through the installed packages and remove them.  Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list?


I am adding a Torus and after rotating it a little bit on the Z i have to rotate it on the X, but its being rotated wrongly as you see. I want my torus to be rotated straight like a tire. I have asked this question before but my previous question and the answer was very complicated, i did not understand anything so this time i want to make it simpler if its possible. Thank you

For some reason the pivot point on my object has become rotated (other objects show normally oriented pivot points). I have to set the "transformation orientation" (see the bottom of my screenshot) to be able to see it though. Does anyone know how to change it back? That is, change it to be aligned with the "world orientation".


Suppose a cilinder that rolls without slipping on a horizontal rough surface. The slipping is prevented by friction, which therefore  slows it down, so it loses kinetic energy. But no dissipative work is done. How is this possible?

Suppose a wheel is rolling smoothly on a horizontal plane i.e., it is rolling without slipping.  Now let's take the two cases of the horizontal plane:   It has friction It is frictionless   In the first case, as of my knowledge friction doesn't come into play when there is no slipping. So, will the wheel roll forever? If it comes to rest is the answer friction? If not what brings it to rest?  In the second case, there is no friction. So, here also will the wheel roll forever? And if it comes to rest what brings it to rest?


I captured waypoint data in the field including the compass azimuth when looking at some summits.   I want to use these waypoints, that I have now in Shapefile format, to draw line shapefiles that point in the compass azimuth that I defined for each waypoint.  Do you know an elegant solution for this problem?

The "Azimuth and Distance" plugin does not appear to be maintained any longer, and has not been transitioned to the new QGIS 2.0 plugin repository. What are the current options for entering COGO in QGIS? Does the roadmap include these tools, or is this something that will still depend on a plugin?


I use Kubuntu 14.10 Plasma 4 and it seems to use some sort of , i.e. it  eliminates corner steering by default. This affects all applications I have tried (kickoff start menu, Eclipse, Google Chrome) so it seems to be a system setting.    (Source: E. Tanvir, J. Cullen, P. Irani and A. Cockburn. "." CHI 2008.)  Is there anyway to disable Adaptive activation areas in the menu to allow corner steering?

I use Kubuntu 14.04 LTS x64 and it seems to use some sort of , i.e. it  eliminates corner steering by default. This affects all applications I have tried (kickoff start menu, Eclipse, Google Chrome) so it seems to be a system setting.    (Source: E. Tanvir, J. Cullen, P. Irani and A. Cockburn. "." CHI 2008.)  Is there any way to disable Adaptive activation areas in the menu to allow corner steering?


I am parsing text for NLP. And I faced unfamiliar grammer below url.  text[:]   I assume text is a natural sentence like text = 'what does Duane Boutte appear in?'. I know : with index number means array access like text[:3] -> 'wha'. But I do not know without index number. And I also know : is used for access to multi dimensional array like data[:][:3].  Could you image above link's text[:]? This function split sentence to tokens.   Update  I found it is a copy operation. See Martijn Pieters and Jean-François Fabre comments

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Let ${a_n}$ be a sequence in $\mathbb{R}$. I want to show that $$ \lim_n a_n = 0 \implies \lim_n \frac{\sum_{m=1}^n m a_m}{\sum_{m=1}^n m} = 0. $$ My attempt is like this:  Fix any $\varepsilon>0$. There exists $N$ such that $|a_n|<\varepsilon$ for all $n>N$. Then, $$ \begin{align*} \left|\frac{x^{1}+2x^{2}+\cdots+mx^{m}}{1+2+\cdots+m}\right| & =\left|\frac{x^{1}+\cdots+Mx^{M}+\cdots+mx^{m}}{1+\cdots+M\cdots+m}\right|\\  & <\left|\frac{x^{1}+\cdots+Mx^{M}+\varepsilon((M+1)+\cdots+m)}{1+\cdots+M\cdots+m}\right|\\  & \le\left|\frac{x^{1}+\cdots+Mx^{M}}{1+\cdots+M\cdots+m}\right|+\varepsilon\left|\frac{(M+1)+\cdots+m}{1+\cdots+M\cdots+m}\right|\\  & <\left|\frac{x^{1}+\cdots+Mx^{M}}{1+\cdots+M\cdots+m}\right|+\varepsilon \end{align*}. $$  However I get the feeling that this is going nowhere.

Prove that sequence $y_n = \frac{\sum\limits_{k=1}^n k x_k}{\sum\limits_{k=1}^n k} \to L$ if sequence $x_n \to L$.  I think I shoud use that $\frac{\sum\limits_{k=1}^n x_k}{n} \to L$, but how?  UPD: I solved it using Stolz–Cesaro theorem.


I have made an add-in using Visual Studio 2013 and ArcObjects 10.3 .Net SDK. It is running fine on 10.3. I want to run this on 10.2.1.  I have change the following settings:  <Targets> <Target name="Desktop" version="10.2" /> </Targets>   It is installed but when I click on it ArcMap crashes without any error. I have tried on two different systems also. I have also tried by creating a blank form on button click to check but it didn't work and crashes.

I made an update to one of my addins mainly because users requested new features. I made the changes and compiled the addin in 10.3.1. Although I specified that the addin is compatible with 10.3 and higher I am getting emails from users wondering if I could make it work for 10.2.    ESRI provides a way to save Map Documents for downward compatibility.  Is there a way to compile an addin developed in ArcGIS 10.3 for use with legacy versions (10.1, 10.2)  Note: my ArcObject references are set to non specific version (Specific Version = False)


I do yet not know everything about coding with tikz but I am learning. I need to draw this system and I would really appreciate it if someone helped me make this.  I want it to have the same kind of structure as this system, not too bold just simple and thin.

I do yet not know everything about coding with tikz but I am learning. I need to draw this system and I would really appreciate it if someone helped me make this.  Now I don't want the structure to be thick I need it to be simple and thin, the exact same structure of lines, arrows, dots and so on like this figure:


String str1="hello";         String str2="hell";         String str3=str2+"o";          System.out.println(str1==str3); // fasle         System.out.println(str1.hashCode()); // 99162322         System.out.println(str2.hashCode()); // 3198781         System.out.println(str3.hashCode()); // 99162322   my question is why str1==str3 return false if there hashcode is same? i want to know internaly working of == operator and hashcode

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Some cameras let you swap the function of the half pressed shutter button and the AE lock back button, in my T2i, the setting 1 at the CFn9 menu lets you do that. Why would I want to use the AElock button to lock the focus? and vice-versa

I've heard some advanced photographers talk about using back-button autofocus.  As I understand it, this involves changing one of the camera's custom setting to engage the AF when a button on the rear of the camera is pressed (as opposed to half-pressing the shutter button).  What is the advantage to back-button autofocus?  Any suggestions on why one would want to switch to this method?


I have a situation like this  +---------+-----------+------------+ | FieldNo | FieldName | Substring  | +---------+-----------+------------+ |       1 | A         | 8          | |       1 | A         | A          | |       1 | A         | DC         | |       2 | B         | 7          | |       3 | C         | 22         | |       3 | C         | 37         | +---------+-----------+------------+   Need output like this:  +----+------+------+ | A  |  B   |  C   | +----+------+------+ | 8  | 7    | 22   | | A  | Null | 37   | | DC | Null | Null | +----+------+------+   Any suggestions how I can do this in SQL Server?  DECLARE @cols AS NVARCHAR(MAX),     @query  AS NVARCHAR(MAX)  select @cols = STUFF((SELECT ',' + QUOTENAME(Field_name)                      from bear_crossjoin                     group by FIELD_NAME, FIELDNUMBER                     order by FIELDNUMBER             FOR XML PATH(''), TYPE             ).value('.', 'NVARCHAR(MAX)')          ,1,1,'')  set @query = N'SELECT ' + @cols + N' from               (                 select substring, Field_name                 from bear_crossjoin             ) x             pivot              (                 max(substring)                 for field_name in (' + @cols + N')             ) p '  exec sp_executesql @query

Trying to find some simple SQL Server PIVOT examples.  Most of the examples that I have found involve counting or summing up numbers.  I just want to pivot some string data.  For example, I have a query returning the following.  Action1 VIEW   Action1 EDIT   Action2 VIEW   Action3 VIEW   Action3 EDIT     I would like to use PIVOT (if even possible) to make the results like so:  Action1 VIEW EDIT   Action2 VIEW NULL   Action3 VIEW EDIT     Is this even possible with the PIVOT functionality?


Here is my proof.  Let U be an union of open sets and suppose x belongs to U.  Suppose there is largest open interval I that contains x.  Then Consider U-I, if this is empty, then we are done.  If U-I is not empty, pick any point y in U-I and let J be the largest open interval that contains y. In general, intersection of J and I must be empty, otherwise this would contradict our assumption.  If we keep doing this process, we would end up getting disjoint Union of open sets.  Is this rigorous proof?

Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome.


I wasn't getting any results where I expected them and long story short I found this odd behavior:  select 1 where 'a' in ('a', 'b', null)  -> 1  select 1 where 'a' NOT in ('b', 'c', null)  -> empty resultset   I'm relatively new to SQL Server (coming from MySQL) but this seems a bug to me, is this expected/desired behavior? I'm aware of the anything + null == null paradigm, but if that's the explanation, then I would expect the first query to return an empty resultset just the same.  I also tried:  select 1 where NOT ('a' in ('b', 'c', null))   again an empty resultset, I'm confused now...  I added where [mycolumn] is not null to my original query, problem solved, but I'm just curious.  Edit  I see from the duplicate marking that this depends on the setting of ansi_nulls. When this is on, null is treated as unknown. And yes I can see that you cannot say with certainty that any value is absent in a collection that has an unknown value.  Why would you want to regard null as unknown though? They are very different concepts to me.  null means there is no value, like asking what's in the [gum] drawer to someone whose cabinet doesn't have a [gum] drawer. unknown means there IS a value, but for some reason we don't have access to that value. Maybe the [gum] drawer is locked, it might have content, it might be empty, but it's not null, it's unknown.  Where is my thinking off with this?

This issue came up when I got different records counts for what I thought were identical queries one using a not in where constraint and the other a left join. The table in the not in constraint had one null value (bad data) which caused that query to return a count of 0 records. I sort of understand why but I could use some help fully grasping the concept.  To state it simply, why does query A return a result but B doesn't?  A: select 'true' where 3 in (1, 2, 3, null) B: select 'true' where 3 not in (1, 2, null)   This was on SQL Server 2005. I also found that calling set ansi_nulls off causes B to return a result.


I want to hide search from  search   using css. Before we were using material icons  mode_edit*   and there it was hidden (mode_edit)  I already tried looking around, but couldn't figure a way out using only css.

I have a tag in my html like this:
My Website Title Here
   Using css I want to replace the text with my actual logo. I've got the logo there no problem via resizing the tag and putting a background image in via css. However, I can't figure out how to get rid of the text. I've seen it done before basically by pushing the text off the screen. The problem is I can't remember where I saw it.


I would like  to know if there is a good estimate for the sum which concerns all primes not exceeding $x$:  $$\sum\limits_{p\leq x}\frac{1}{p^s}$$$$0<s<1$$. Only this. Thanks in advance!

Note the $ p < x $ in the sum stands for all primes less than $ x $. I know that for $ s=1 $, $$ \sum_{p<x} \frac{1}{p} \sim \ln \ln x , $$ and for $ \mathrm{Re}(s) > 1 $, the partial sums actually converge to a finite limit called the , which has an analytic continuation to the whole right-half plane but the actual series diverges in the critical strip. So anyway, I'm wondering what the asymptotic behavior of the partial sums are in the limit as $ x \to \infty $ for a given value of $ s $ with $ \mathrm{Re}(s) < 1 $. At first I intuitively conjectured it might be something vaguely like the following  $$ \sum_{p<x} \frac1{p^s} \sim f(s) \pi(x)^{1-s} , \quad f(s) = \lim_{n\to\infty} \int_0^1 g_n(u) u^{-s} du $$ but after some thought I'm not sure if this kind of formula will work after all. Any ideas?  Note again: I'm asking about asymptotics when $ \mathrm{Re}(s) < 1 $.


What's the difference between [[False] * 26] * 26] and [[False] * 26 for _ in range(0, 26)] in Python ?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I am trying to integrate google sign in provided by firebase auth in Android.I did everything same as given in firebase documentation.When user select account to sign in app stops and shows an error in log cat window given below.  Caused by: java.lang.NullPointerException: Attempt to invoke virtual  method 'com.google.android.gms.tasks.Task com.google.firebase.auth.FirebaseAuth.signInWithCredential(com.google.firebase.auth.AuthCredential)' on a null object reference     at com.app.bookbudi.Login.firebaseAuthWithGoogle(Login.java:99)     at com.app.bookbudi.Login.onActivityResult(Login.java:86)   Here is my code:  Login.java  public class Login extends AppCompatActivity {  SignInButton signIn; GoogleSignInClient mGoogleSignInClient; private static final int RC_SIGN_IN = 1;  @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login);  signIn = findViewById(R.id.signIn);  GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).             requestIdToken(getString(R.string.default_web_client_id)).requestEmail().build();  mGoogleSignInClient = GoogleSignIn.getClient(this,gso);  signIn.setOnClickListener(new View.OnClickListener() {          @Override         public void onClick(View v) {              Intent signInIntent = mGoogleSignInClient.getSignInIntent();             startActivityForResult(signInIntent, RC_SIGN_IN);         }     });   }   @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {     super.onActivityResult(requestCode, resultCode, data);      if(requestCode == RC_SIGN_IN){          Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);          try{         GoogleSignInAccount account = task.getResult(ApiException.class);         firebaseAuthWithGoogle(account);      }catch(ApiException e){              Toast.makeText(getApplicationContext(),"Login failed",TastyToast.LENGTH_SHORT).show();         }     }   }   private void firebaseAuthWithGoogle(GoogleSignInAccount acct){      AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(),null);      fAuth.signInWithCredential(credential).addOnCompleteListener(this,new OnCompleteListener<AuthResult>() {          @Override         public void onComplete(@NonNull Task<AuthResult> task) {              if(task.isSuccessful()){                  Intent i = new Intent(Login.this,MainActivity.class);                 startActivity(i);                 finish();             }             else{                  Toast.makeText(getApplicationContext(),"Unable to login with google.",TastyToast.LENGTH_SHORT).show();              }         }     });     }  }   Please let me know what I did wrong in above code.  THANKS

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


code snippet:  #include <stdio.h> int computeSum(int number1, int number2) {     int sum;     sum = number1 + number2;     return sum;  } int main() {       int sum = 0,k=0;        k,sum= computeSum(4,2);       printf("%d %d",sum,k);       return 0; }   What is the functionality of comma ( , ) between k  and sum,why it doesn't evoke any error?what is its significance?


I'm tempted to download and install ubuntu. Can anyone run me through the basic things I need to do or have to succesfully install and run this operating system on my PC?

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


So the question I am trying to solve is:  Show that the number of (non-equal) forests on the vertex set $V = \lbrace1,2,...,n\rbrace$ that contain exactly two connected components is given by the formula   So I am a bit lost on where to start with this. I was thinking of maybe looking at how many with only one connected components there would be and trying to generalize an equation to get how many would have two. Any help here would be appreciated.

The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by $\sum_{k=1}^{n-1} {n-1 \choose k-1} k^{k-2} (n-k)^{n-k-2}$.  I am unsure how to approach this question. Could someone guide me through the proof? If G is a spanning tree and it is disconnected then I know it is a spanning forest. Also, I know by Cayley's thm that there are $n^{n-2}$ nonequal tree on a vertex set V = {1, 2, ...,n} which is where i'm assuming the $k^{k-2}$ comes from but I do not understand where the rest of it is coming from.


I tried installing VLC using the following commands:  sudo apt-get install vlc sudo apt-get install vlc-plugin-libde265    and it is showing this error:  E: Unable to locate package vlc-plugin-libde265

I have seen that the new  shows off H.265/HEVC playback, the successor of H.264. I wonder how I may get this support in Linux. Is there a need to install a codec specific for this format? How?


I cooked a lot of pasta sauce a few days back, and have much of it in my fridge. I intent to use it all shortly, and would prefer to not freeze it.  If I heat it back up in a pot, and let is cook all the way through, does this "reset" the time before it spoils?  I fully understand the consistency will change, and I'm OK with that - I do like a thicker sauce.  Soliciting answers specific to this question.

I get that keeping food temperature low will slow down chemical reactions and preserve food, but sometimes my sister preserves food by heating it every 6 hours or so (up to 1-2 days). Does this help preserving the food? If yes, how does it work?  If it matters, the food currently in question is , but I would appreciate a general explanation. In case anyone is wondering, she doesn't store it in the fridge because it is full.


Omnikey is a very useful extension, allowing user-customizable URL-bar searching for Safari up through v.12.  Safari now nags for update to v.13. As , Omnikey doesn't work with Safari 13, or at least doesn't do so without some fussing.   I assume (but don't know) that Safari 13 is a mandatory inclusion when one upgrades to Catalina. Has anyone tried Omnikey on Catalina running Safari v.13? Do any of the workarounds discussed in my prior question allow Omnikey to function on macOS Catalina as before?

Omnikey is a very useful Safari extension that allows searching user-selected webpages by entering user-selectable keys preceding the search term. For example, entering "w Los Angeles" in the Safari address bar on my computer and pressing return opens a new Safari window in Wikipedia that's searching for "Los Angeles." This is both easier and faster than navigating to the page you wish to search, entering the search term, then hitting return.  Here's a screenshot of the searches I've added to Safari on my Macs:    Unfortunately, Omnikey doesn't work with Safari 13.  Omnikey is very useful. Are there any other Safari extensions that provide the same functionality?


I have googled this a bit and looked at powrprof.dll and PsShutdown but I haven't found a way to do exactly what I want to do.  You know that power save option that lets Windows turn off your monitor(s) if you haven't touched the system for x amount of time?  Well, I have a PC that needs to be on most of the day (and night), and I have to watch it much of the time, so I can't have a short timeout for automatically turning off the monitor. However, once I leave it for a few hours (happens at varying times of the day), I would like to be able to issue a command that puts the computer in this mode. Not sleep mode, not hibernate mode. Monitor off, that is all.  I realize of course I could just turn the physical monitor off. That is not what I want. This Dell monitor takes forever to display a picture from a cold state. If it is turned off by the computer not sending a signal - not so bad.  Is there any way for me to do this? As mentioned, the OS can do it, so I would find it really useful if I could do it too. :)

Is there a way to turn off the display in Windows (7), preferably without using additional software?   Powershell script works fine, but leaves command-line window after turning on the display.


I am going over a solution given to solving the follow limit, $$\lim_{x\to \infty}(\frac{x}{x-1})^x$$ The solution continues as follows,  Consider raising the function to $e^{ln\cdots}$  We can find the limit as follows, $$\lim_{x\to \infty} x \ln(\frac{x}{x-1}) = \lim_{x\to \infty} \frac{\ln(\frac{x}{x-1})}{\frac{1}{x}}$$  The solution argues this is just $\frac{0}{0}$ and as such we can apply L'Hospital's rule. It continues on to find the limit equals 1, so the limit of the function is $e$.   However, I don't understand how that expression evaluates to $\frac{0}{0}$, in fact it seems to express $$\frac{\ln(\frac{\infty}{\infty})}{0}$$ I assume the argument is that $\frac{\infty}{\infty}$ equals 1, and $\ln(1) = 0$, so we have $\frac{0}{0}$. But I thought we cannot evaluate $\frac{\infty}{\infty}$?

Trying to make sense out of the idea that $100\%$ continuous decay is $\frac{1}{e}$, I thought about this:  You can express $1+\frac{1}{x}$ as $\frac{x+1}{x}$, such that $\big(1+\frac{1}{x}\big)^x = \big(\frac{x+1}{x}\big)^x$  And you can express $1-\frac{1}{x}$ as $\frac{x-1}{x}$, such that $\big(1-\frac{1}{x}\big)^x = \big(\frac{x-1}{x}\big)^x =\frac{1}{\big(\frac{x}{x-1}\big)^x}$  Now $\big(\frac{x}{x-1}\big)^x$ and $\big(\frac{x+1}{x}\big)^x$ look very similar, and I can imagine (and see on Mathematica) that $\lim_{x \to \infty} \big(\frac{x}{x-1}\big)^x$ also approaches $e$.  However I'm clueless about limit proofs, how do you prove that?  EDIT: Just had a last second insight.  Can you say that $$\lim_{x \to \infty} \big(\frac{x}{x-1}\big)^x = \lim_{x \to \infty} \big(\frac{x}{x-1}\big)^{x-1} \cdot \lim_{x \to \infty} \big(\frac{x}{x-1}\big)$$ $$= \lim_{x \to \infty} \big(\frac{x}{x-1}\big)^{x-1} \cdot 1$$ $$=\lim_{x \to \infty} \big(\frac{x+1}{x}\big)^x = e ?$$   (not sure about that last limit transition...I mean I'm pretty sure it's true, just not sure how to write it; I would appreciate feedback on that, thank you)


I downloaded a Blender file and opened it, and the UI looks very weird as the screen capture below. If it were other applications, like Visual Studio or something, most applications support intuitive drag-moving or closing of UI elements (like panels), but Blender works in so confusing way.  I have discovered that it has "Load UI" option in the Open dialogue, but what if I opened the file by double-clicking it. Is there a way to move/close the UI elements once it is opened, or is unchecking "Load UI" the only way?  I mean, for example, in the screen below, how can I move the Outliner from the top-left to top-right? Or How can I move the Properties from bottom to bottom-right? You know like the default Blender 2.81 UI.

Is there a way to open files without changing the UI layout?  Sometimes in older files the layout will be in the old 2.4x style, which can be annoying.  One way would seem to be appending everything in, but that gets tedious with having to do it over again and again for objects, materials, textures, etc.


Let $E = \ell^p$ with $1 \le p \le \infty$. Let $(\lambda_n)$ be a bounded sequence in $\mathbb{R}$ and consider the operator $T \in \mathcal{L}(E)$ defined by$$T(x) = (\lambda_1x_1, \lambda_2x_2, \dots, \lambda_nx_n, \dots),$$where$$x = (x_1, x_2, \dots, x_n, \dots).$$How do I see that $T$ is a compact operator from $E$ into $E$ if and only if $\lambda_n \to 0$?

Let $E=l^p=\left\{x=\left(x_n\right): x_n\in\mathbb{R}, \sum_{1}^{\infty}\left|x_n\right|^p<\infty\right\}$ with $1\le p<\infty$, $\left\|x\right\|_E=\left(\sum_{1}^{\infty}\left|x_n\right|^p\right)^{1/p}.$ Let $\left(\lambda_n\right)$ is a bounded sequence in $\mathbb{R}$ and consider the operator $T$ defined by $$T(x)=\left(\lambda_1x_x,\ldots,\lambda_nx_n,\ldots\right)$$ where $x\in l^p$. Prove that $T$ is a compact operator from $E$ to $E$ iff $\lambda_n\rightarrow 0$.  Can anyone give me some hints to solve this problem? Thank you!


I have some list of databases with different owners.   Among them [NT SERVICE\SQLSERVERAGENT] is the owner of one database (let's say db_name ='Test_db_repli').  Can we change the owner of that particular database to [sa]?  If changed, will there be any problems in the future?

Today while troubleshooting a service broker problem, I discovered that the database owner was the Windows login of an employee who had left the company. His login had been removed and thus the query notifications were failing.   Supposedly the best practice for dealing with this is to make 'sa' the database owner. We changed it and that cleared out the queue.   My (very elementary) question: what is the database owner and what is its purpose?


There is a mathematical model. Model can give a forecast for some duration (hours, days, years). But the forecast will not be equally accurate for different periods of time. How should I ask for what period of time the forecast is most accurate?    What is duration, the model can give most accurate forecast.  For whatduration....  What is duration for....   Which of the above is correct? Where can I read about this rule?

Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other?


Let $\mathbf{X} = (X_1, \dots, X_p)^\top$ and $\mathbf{Y} = (Y_1, \dots, Y_p)^\top$ be independent. Does it then follow that $X_i$ is independent with $Y_j$ i.e. cov$(X_i, Y_j) = 0$?

Is the claim that functions of independent random variables are themselves independent, true?   I have seen that result often used implicitly in some proofs, for example in the proof of independence between the sample mean and the sample variance of a normal distribution, but I have not been able to find justification for it. It seems that some authors take it as given but I am not certain that this is always the case.


I am coming to Germany for holidays, and I would life to use my cell phone, however I guess a German provider may be able to offer a much better service of Internet connections. But since this is temporary trip, I don't wanna buy a full plan.  Are there SIM Cards for me to buy in Frankfurt Airport or Frankfurt area?

What SIM card would you recommend for a smartphone user for travel in Germany?  It would be probably the only or the most important connection to the Internet, so large amounts of data and relatively fast transfer is an issue.  I need to stay in touch with friends and family, so the calls to other EU countries should be as cheap as possible.   For to the first criteria, I found the T-Mobile offer interesting. The internet costs 10 Euros/month and after reaching the transfer limit it stays relatively fast. According to tests (Galileo from Pro7, AFAIR) it has also the best coverage. However, calls to other countries are very expensive.  For to second criteria, Lebara and Mobilka are interesting. The calls are very cheap, but there are problems with signal strength in many locations, where T-Mobile has no problem. The voice quality, at least in Lebara, is also limited. They both have mobile internet with unlimited transfer, but after reaching the high speed limit, the transfer is reduced to 64 kbps, which is too slow.  I've found out that O2 has foreign calls at moderate prices, but I haven't yet checked for details. There are so many other options, making it is hard to compare them all without spending the whole weekend on it. So, if someone has found a better option than having 2 SIM cards and constantly switching them, this answer would be greatly appreciated.


Note: the below is outdated, search was changed once again:    For a few reasons, we recently changed the guts of how search works on our sites.  If you keep up, you've probably read somewhere that we were using .  There are a few areas that utilize search that all got a replacement tonight:   Search itself (box in the upper right) Related Questions (to the right of a question) Titles (when asking a question, this finds similar questions that may have already been asked)     As of now, we've moved search over to , specifically the  flavor.  We invite you to try it on all sites in the network, for example here's the search pages for the trilogy:         As with all the features we add, it's better with feedback, please use the search and post feedback here (quality, issues, good/bad results?).  We'll be watching the next few days to make tweaks as we go.  Of course, if you're able to break it, post that too - we'll be watching and adding awesome as fast as we can.

After the performance problems we have run into with  we've decided to make a change, we're moving the network on to .  Here's where to get started:   What works:   All search operators should be in Many changes below from the old search behavior   What's different:   The new search is AND, adding a search term will narrow your results, not expand them. The look of search results is now more unified with the following differences between Q&A:   "Q:" or "A:" prefix Answer counts and tags will be present in questions. The answer count will be highlighted in green if it's accepted. (We may index other things later, that's why the results are more generic/google-y now.)  It's faster, about 5-10x faster for almost all searches on large sites like Stack Overflow Quoted phrases are exact matches except for case-sensitivity, for example,  or . If not in a quoted phrase, words will now be stemmed () Snippets for context will now be more relevant Excludes are now explicitly supported (like -term and -"my phrase") We don't roll up to the question anymore, if you searched for something that matched an answer, we'll show you the answer directly in search results The search per minute limit is effectively gone, it'll block a bot, but no one else should hit it... We'll be monitoring performance though infavorites:mine is back, with infavorites:12345 (any user id) added   What needs work:   What you tell us is broken... Do your worst.   Testing, not yet final:   New range support, here are some examples:   answers:1..1 (exactly one answer) answers:10..20 (10 to 20 answers) created:2008..2009 (created between Jan 1st, 2008 and Dec 31, 2009) created:2010-04..2010-05 (created between April 1st, 2010 and May 31st, 2010) created:2011-01-05..2011-01-06 (to be clear: it goes to end-of-day) This range syntax applies to a new advanced operator: lastactive: and the other numerical ranges, views:, and score:  Additionally, the above syntax is a bit more flexible if you forget it exactly (e.g. score:20-30) in an effort to be intuitive as possible, give it a try - tell us what you think.    I'll try and improve the search as much as possible before it becomes default... At the very least we want it equivalent in relevance and functionality before the switch, but ideally much better. We won't switch until then.  Please give it a try, tell us what you think here, and we'll continually improve it over the holidays as time allows. Bear in mind you may get a search offline page during this test if a change we're making for results necessitates a reindex, and even that should only last about two minutes here on Meta Stack Overflow.  Give it your worst, compare results to the old search, tell us what's better and what's not. We look forward to the feedback.  Update The new search is now the default across the network - we'll be monitoring things over the next few days and would appreciate reports of any crazy behavior you see here.


Alice has a secret A, Bob has a secret B. They have a secure channel and a MAC. They each want to know the other's secret, but don't particularly want to give up their own. However, neither will not lie about the secret, but if possible, will stop communications once [s]he learns the other's secret.  How can such a protocol work, that if Alice or Bob doesn't correctly follow all steps in the protocol, neither person can gain any information about the other's secret.  You may not use a third party.

I am trying to come up with what could maybe be a novel algorithm for an application I am writing. Client A has a file fA. Client B has file fB. Each party is untrustworthy and will try to rip off the other party. Client A wants the fB and client B wants fA.  How can I make an algorithm were it is not possible for them to screw the other player.  For example:     A encrypts fA and send the file to B.     B encrypts fB and sends it to A.  Now, both A and B have an encrypted version of the file they want.  How can they both share the decryption key at the same time... or what?   Is this even possible? This is breaking my mind.  Since each client will try to rip the other party, Client A cannot send the file fA to client B and expect client B to send back its file. If client A sends it first "with no guarantees", client B will simply run off with the file.  In real life a person holds the pot in one hand, the other holds the cash in the other. They both trade each hand at the same time. The guy with the cash now ends up with the pot and vice versa. How can I do something similar with computer bits. (client A and B are on a network at different locations).  EDIT: Please note that each party has a hash of the file they are supposed to get. Therefore, the parties cannot send a junk file to the other guy whit-out him knowing. A trusted third party will provide the hash.


The new LED strobes while the old incandescent light works fined. I replace one of the two bulbs on the motion detection light fixture with a 150w incandescent flood light bulb....and the LED flood light stopped flashing/strobe. Why will the out door fixture work fine with one LED bulb and one incandescent bulb....but only flash with two LED bulbs?

Recently I noticed that my led bulb turns on/off for a split second randomly over the past few days. Does this mean it is starting to die or could it be something wrong with the lamp?  I've unscrewed to see if anything was damaged but could not detect any damage.


What is a word that can be used to describe the slow yet unstoppable progress of time? Something like (but not exactly) inevitable. I remember reading this phrase in a book but the exact word evades my memory.

For example, in a novel, if someone is so powerful that no one can stop him, something like this would be said:     He [insert word] in the continent [or some other location].   "Moved unhinderedly" somewhat fits it, but it doesn't really seem like the right term.  The word I'm looking for describes a few things:   Should have an implication that the person himself is powerful That person can go wherever he wishes to, and cannot be stopped because of his strength That person can do whatever he wishes to, and like above, cannot be stopped because of his strength   The other word I have is "swept", i.e.:     He swept through the continent.   I used "swept" because when you sweep the floor, nothing stops you and everything is swept away, similar to the example. However, the dictionary definitions don't match up, so that isn't the word either.  Any suggestions?


How can I set a row as column in Unix. Example:  name : Keshav sub  : C++ branch: cse DOB  :22/09/1990 company:NONE  name : Vijay sub  : Java branch: cse DOB  :22/09/1985 company:NONE   I want output like this:  name     sub   branch  DOB           company Keshav   C++   cse     22/09/1990    NONE Vijay    Java  cse     22/09/1990    NONE

I have a file with the lines like below.  title1:A1 title2:A2 title3:A3 title4:A4 title5:A5  title1:B1 title2:B2 title3:B3 title4:B4 title5:B5  title1:C1 title2:C2 title3:C3 title4:C4 title5:C5  title1:D1 title2:D2 title3:D3 title4:D4 title5:D5  How can I achieve this?   title1    title2     title3    title4 A1         A2         A3         A4 B1         B2         B3         B4 C1         C2         C3         C4 D1         D2         D3         D4


I know that the square root of $9$ is $3$  But somebody told me that   If $x^2= 9$ we get the solution as $x=\pm3$  I am confused when do we have $\sqrt{9}=\pm3$ and only $3$?  Please help.

It is perhaps a bit embarrassing that while doing higher-level math, I have forgot some more fundamental concepts. I would like to ask whether the square root of a number includes both the positive and the negative square roots.  I know that for an equation $x^2 = 9$, the solution is $x = \pm 3$. But if simply given $\sqrt{9}$, does one assume that to mean only the positive root? And when simply talking about the square root of a number in general, would one be referring to both roots or just the positive one, when neither is specified?


What's the Linux command that outputs the OS version? Like Winver.exe on Windows.

Is there a way to determine what version (distribution & kernel version, I suppose) of Linux is running (from the command-line), that works on any Linux system?


I have the following question:     Given a Banach space $V$ over the field $\mathbb{K}$, is it true that there is always a normed space $W$ over the field $\mathbb{K}$, such that $V$ and $W'=\mathscr{L}(W,\mathbb{K})$ are isometrically isomorphic (with $\mathbb{K}\in \{\mathbb{R},\ \mathbb{C}\}$)?   Thanks for the help!

Let $X$ be a Banach space. Is there always a normed vector space $Y$ such that $X$ and $Y^*$ are isometric or isomorphic as topological vector spaces (that is, there exists a linear homeomorphism between $X$ and $Y^*$)?


May I know how to handle the source not found error while debugging the java code in Eclipse IDE I got the error - The source attachment does not contain the source for the file URLClassPath.class.

I'm a big fan of the way Visual Studio will give you the comment documentation / parameter names when completing code that you have written and ALSO code that you are referencing (various libraries/assemblies).  Is there an easy way to get inline javadoc/parameter names in Eclipse when doing code complete or hovering over methods? Via plugin? Via some setting? It's extremely annoying to use a lot of libraries (as happens often in Java) and then have to go to the website or local javadoc location to lookup information when you have it in the source jars right there!


I'm new to iOS development. I understand that Apple provides APIs to customize the navigation bar, but I'm using Xamarin to create a cross-platform app. On iOS and Android, the navigation and action bars do not look the same as both platforms have different UI conventions. However, I've been feeling increasingly tempted to create consistent UI as opposed to native experience. Google must have thought the same for their own apps and ported Material to iOS.  Having said that, it feels easier to just create a Grid or StakLayout and use it as the navigation bar for both apps. The question is, do developers already do this? Will Apple reject my app because I created a "fake" navigation bar so to speak instead of using what they already provide. The same question holds for Android as well.  P.S. Another reason I want to use a layout is so I can animate it easily.

I'm not completely new to developing apps, but I'm at a point where I'm trying to develop something and deploy it on several mobile platforms. To only concentrate on two major ones, suppose I'm developing an app for Android and iPhone and designing UI and the general user interaction architecture. Both platforms give guidelines as to how their UIs should work. For example, most iPhone apps have the Navigation Bar (the one that says Testing 1 and has a Back button)    and an Icon Bar    for navigating a program, while Android uses an Options Menu fetched via a Menu button    and the "back" navigation is handled with the physical Back button on the device.  I've seen many apps that try to force the same UI on every platform. For example, custom-building an iPhone style Icon Bar and putting it in their Android apps, but it just doesn't quite look right to me and it feels like it violates UI design guidelines somewhat.  Are there any good design patters for implementing something sufficiently similar on both platforms, yet still platform-specific enough so that the user would not feel out of their comfort zone? What do people usually do in these situations?


I have a bunch of .item(s) that are floating left. Each of these elements have 12.5% defined in height.  How do I vertically center these elements to a 100% parent height div?  I've tried with the "classic" top: 50%, transform: translateY(-50%) approach, but noone of the floating elements appear (they render with 0px height).

 ...etc

   CSS  .centered-container {   position: absolute;   top: 0;   left: 0;   width: 100%;   height: 100%; }  .centered {   position: absolute;   top: 50%;   transform: translateY(-50%);   width: 100%;   border: 1px solid red; }  .item {   float: left;   width: calc(100% / 4);   height: 12.5%;   background-color: green;   z-index: 99999;    &:nth-child(2n)   {     background-color: brown;   }   &:nth-child(3n)   {     background-color: yellow;   } }

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I am Burmese and will travel to Burma from Bermuda. I'll need to transit at a New York City airport just to change flights, without leaving the airport.  Do I need transit visa and if so can I apply online?

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


Need some help with the Command Link. I know there's no attribute as "Disable" for , like we do have for  . But as per the requirement, i want to have the link disabled for a particular page. Can this be achived?? my code-   how i will use commandLink ?

I have an apex:commandButton on a visualforce page that invokes a method on the controller. There is currently no rerender value set for the button. Instead the controller method returns a PageReference to redirect the user as required.  E.g.  Visualforce:  <apex:commandButton value="Save" action="{!save}"/>   Controller:  public PageReference save() {     // save body ...      // return the user the a parent opportunity     return new PageReference('/' + opp.Id); }   Users are currently able to click on the resulting save button multiple times before the controller completes and returns the PageReference to redirect the browser to an opportunity.  How can I disable the commandButton after the first click?    I tried wrapping the commandButton in an actionStatus and facet, but the need to define the rerender property prevented the resulting PageReference redirect.  E.g.  This will render nicely in the browser and prevent multiple clicks, but doesn't redirect to the Opportunity on completion.  <apex:actionStatus id="saveStatus">     <apex:facet name="stop">         <apex:commandButton value="Save" action="{!save}" status="saveStatus" rerender="saveParentBlock" />     </apex:facet>     <apex:facet name="start">         <apex:commandButton value="Saving..." disabled="true" status="saveStatus"/>     </apex:facet> </apex:actionStatus>     There is a similar question . I need to support an existing PageReference redirect, which slightly alters the requirements.  Force.com Discussion Boards:   Ideas:


a long time ago, I installed GRUB with ubuntu boot loader. Today, I am not using Ubuntu anymore, I came back on Windows 10 (which is my main OS). I saw many tutorials on internet to remove GRUB (and maybe Ubuntu), but I don’t know which one to trust. Can you tell me what to do to simply and safely delete (not just hide/disable/etc...) GRUB from my computer?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Heavily related to   (possibly a duplicate in a way)  states:     If a creature is holding or wearing the object and takes the damage from it, the creature must succeed on a Constitution saving throw or drop the object if it can. If it doesn't drop the object, it has disadvantage on attack rolls and ability checks until the start of your next turn...   If you are suffering disadvantage from holding a weapon affected by heat metal, does dropping the weapon remove the disadvantage or does the phrase "If it doesn't drop the object" only refer to the possibility of dropping it at the time of the casting?

The  spell description states:  If a creature is holding or wearing the object and takes the damage from it, the creature must succeed on a Constitution saving throw or drop the object if it can. If it doesn't drop the object, it has disadvantage on attack rolls and ability checks until the start of your next turn...  I am unsure how this disadvantage mechanic functions as a whole. When do you suffer from it and in what ways (if any) can you end it? For example: What happens if you fail the save but cannot drop the object? Does dropping the object later, on your turn, do anything? What happens if you succeed on the save?  Does dropping the object later, on your turn, do anything? I would like it to be assumed that ; however, heat metal can still force you to drop the weapon. I would also like it to be assumed that .


I set a bevel on a curve, but supposedly there is a way to scale vertices of a curve so that they also scale the radius of the corresponding bevel. How can this be accomplished?

Is there a way to scale up the bevel object on one end of a curve, a little bit over each point?  I notice the vertex "weight" slider will tweak how much influence each vertex has on the others, is there something like this that can scale the bevel object up a little bit?  Preferably with the option to constrain X,Y,Z independently


Are there physically realizable dynamical systems where the true trajectory is not a minumum action trajectory?  Formally, Lagrangian mechanics only requires that the trajectory be an extremum (or saddle point?), but all of the cases that I'm aware of, it is, in fact, a minimum.  Are the other possibilities relevant for modelling any physical systems?

In  it is discussed why by Hamilton's principle the action integral must be stationary. Most examples deal with the case that the action integral is minimal: this makes sense - we all follow the path with the least resistance.  However, a stationary point can be a maximal or minimal extremum or even a point of inflexion (rising or falling). Can anybody give examples from theory or practice where the action integral takes on a maximal extremum or a point of inflexion?


I have a byte[] that I got through the wire and want to verify that it's a JPEG. How can this be done?  Essentially, without having to write out a file, I'd like to do, more-or-less, what the file command does:  $ file aoeu.jpeg aoeu.jpeg: JPEG image data, JFIF standard 1.02

How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)?


If user adds another form to formset, but has already typed something in first form, then the input will be lost, as new form was created. User now has 2 empty forms. Is there a way to add new form to formset but not lose user input?  forms.py  class Form(forms.Form):     client = forms.CharField(label='Client', required=False)     end_client = forms.CharField(label='End client', required=False)     product = AutoCompleteSelectField(lookup_class=ProductLookup, label='Model', required=False)   views.py  def get(self, request):     request.session['form_count'] = 1      FormSet = formset_factory(Form)     formset = FormSet()      return render(request, self.template_name, {'formset': formset} )  def post(self, request):     if "add-form" in request.POST:         form_count = request.session['form_count']         print("There are " + str(form_count) + " forms")          form_count = form_count + 1         request.session['form_count'] = form_count         print("Form count increased by 1, form count is: " + str(form_count))          FormSet = formset_factory(Form, extra=int(form_count))         formset = FormSet()  **<-- if I put request.POST in here, new form will not be created**          return render(request, self.template_name, {'formset': formset})   html file
   <form method="post">     {% csrf_token %} {{ formset.management_form }}
       {% for form in formset.forms %}
         {{ form.as_table }}

 {% endfor %}
     <input class="btn btn-primary" type="submit" value="Submit order" />     <input name="add-form" class="btn btn-primary" type="submit" value="Add new product" />   </form>

I want to dynamically add new forms to a Django formset, so that when the user clicks an "add" button it runs JavaScript that adds a new form (which is part of the formset) to the page.


$('document').ready(function(){     var catid, action, data, selectid;     $('select.cat-selector').on('change', function() {          catid = $(this).val();         action = 'getsubcatbyidList';         data = { action: action, catid: catid };         $('#input-catid').val(catid);         // Sub Category         getsubcat(catid,action,"");     });     $('select.sub-category').on('change', function() {         $selectid = $(this).find('option:selected');         var id = $selectid.val();         $('#input-subcatid').val(selectid);     }); });   And the Ajax Function getsubcat(catid,action,"");  function getsubcat(catid,action,selectid){     var data = { action: action, catid: catid, selectid : selectid };     $.ajax({         type: "POST",         url: ajaxurl+'?action='+action,         data: data,         success: function(result){             if (result !== '') {                 $(".subcategory").html(result);             }         }     });     $('*[data-ajax-catid='+catid+']').addClass('link-active');     $('button').prop('disabled', false); }   And The HTML  <form method="post">                                 <div class="btn-section">                                     <input type="text" id="input-catid" name="catid" value="">                                     <input type="text" id="input-subcatid" name="subcatid" value="">                                     <button type="submit" name="choose-category" id="next-btn" class="btn btn-primary text-caps" disabled>Proceed</button>                                 </div>                             </form>   The Above code handle this task, Select the Category Using Cat ID, and also store in a hidden input tag, fetches the Sub Category and On selecting the Sub Category, It is supposed to get the Subcategory ID, but It doesn't work. How do I go about these Bug, Jquery Issue? Please I need your Help

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


this  says     I'm asking the same question as the linked one, I simply don't have enough reputation to comment yet, but hopefully, this one will more clearly explain what me and the other asker both mean   In this case, would "I" be better? or any other better expression?

I am unsure as to which of these seems more formal.     My parents will reside with me and my family.   or     My parents will reside with my family and I.   Or is there a better (formal) alternative to it?


$A$ and $B$ are given, How many $X$ can be found to make the following equation true?  $$         A \pmod{X} = B $$ Is there any formula?

Given $a, b$. How many solutions exists for $x$, such that: $$a \bmod{x}=b $$  By example:  $a = 21$ and $b = 5$  $21 \bmod{8} = 21 \bmod{16} = 5$  Then $x$ has 2 solutions


When I run the history command I only get 16 lines of output:  $ history | wc -l 16   Is there an environment variable that I can set within my .zshrc file or some other way to increase the number of history entries that are displayed by default?  My primary reason for wanting to do this is because I often search for previous commands using  history | grep something  but now that I've switched from bash to zsh I get only 16 lines of history output (it seems that the default number on bash is 1000) so now I need to also specify the number of entries that are returned:  history -2000 | grep something  Is there a way to set the default number of entries that history displays? (Or maybe I'm searching history wrong and should learn a better way to find a previous command?)  BTW I am using zsh on Ubuntu 18.04:  $ zsh --version zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

This is my ~/.zsh/.zshrc -  /home/shirish/.zsh> cat .zshrc # Lines configured by zsh-newuser-install HISTFILE=~/.zsh//.histfile HISTSIZE=10000 SAVEHIST=100000 setopt inc_append_history autocd nomatch notify share_history bindkey -e # End of lines configured by zsh-newuser-install  # display how long all tasks over 10 seconds take export REPORTTIME=10  # The following lines were added by compinstall zstyle :compinstall filename '/home/shirish/.zsh//.zshrc'  autoload -Uz compinit promptinit compinit promptinit # End of lines added by compinstall  #from https://unix.stackexchange.com/questions/332732/removing-strange-characters-from-a-zsh-prompt  export LC_ALL=en_IN.UTF-8 export LANG=en_IN.UTF-8 export LANGUAGE=en_IN.UTF-8  #from https://unix.stackexchange.com/questions/332888/how-to-have-a-longer-xterm-title-in-zsh  autoload -Uz add-zsh-hook  function xterm_title_precmd () {     print -Pn '\e]2;%n@%m %1~\a' }  function xterm_title_preexec () {     print -Pn '\e]2;%n@%m %~ %# '     print -n "${(q)1}\a" }  if [[ "$TERM" == (screen*|xterm*|rxvt*) ]]; then     add-zsh-hook -Uz precmd xterm_title_precmd     add-zsh-hook -Uz preexec xterm_title_preexec fi   prompt bigfade   Now if I try to get history output I get only 16 entries in history from .zsh. What if I want to see all the entries. For some reason it saves/shows only 16, the rest either seem not to be recorded  I do have multiple tabs of the same shell. I dunno if it's a bug or something more that I need to add.


Before I start scripting myself with JS and SVG, I was wondering if there is an existing way to generate a color halftone in vectors, so that every dot is a perfect circle. So what I am looking for is a script that generates the raster in vectors rather than in pixels.

I saw this photo on :       Portrait of Alfred Nobel by    And I was wondering how I can make a similar effect with the halftones extruding into 3D like it is shown. I don't have access to Photoshop Extended, so was trying to create the effect in Illustrator with the 3D effect with no avail.  Anyone know how this is done?


I was just editing/improving a question and the original author had written a brief line of code in the title of their question.  Was just wondering if there may perhaps be some way to format the code.  I tried using backticks but that doesn't work.

It would be nice if backticked code in question titles were rendered the same way they are in question bodies. Since there are so many questions with code in them I feel it would be a big plus. .  This would look a lot nicer in listings and on the page itself if the code strings were rendered as such.  Similar ideas discussed .


Evaluate the limit $$\lim_{n\to \infty}\frac{1}{n^n} \sum_{k=1}^nk^n$$ I tried expressing the summation as $1^n+2^n+3^n+\cdots+n^n$ and then dividing it by $n^n$, but couldn't proceed further. I also tried using LH rule, but couldn't proceed. Any help would be appreciated.

I can show that the following limit exists but I am having difficulties to find it. It is $$\lim_{n\to \infty} \sum_{k=1}^n \frac{k^n}{n^n}$$ Can someone please help me?