Let a and b be relatively prime integers. Show that $\gcd(a^2+b^2,a+b)=$1 or 2  Proof: $s|a^2+b^2$ and $s|a+b$ implies $s|a^2+b^2$ and $s|(a+b)^2=a^2+b^2+2ab$ implies $s|a^2+b^2-(a+b)^2=2ab$ implies $s|2a$ and $s|2b$ implies $s|\gcd(2a,2b)=2gcd(a,b)=2*1$  Hence $\gcd(a^2+b^2,a+b)=1 or 2$

If $a,b \in\mathbb N$ and $\gcd(a,b)=1$, prove that $\gcd(a+b,a^2+b^2)$ is always equal to either 1 or 2, where $\gcd$ is the greatest common divisor. I haven't really ever solved a problem like this before, so I'd like to get some help. Thanks.


Why, when I am logged out, does the button say “improve this question” or “improve this answer”, but when I am logged in it says “edit”?   I have ~450 reputation.

If I browse a site as an anonymous user, instead of "edit" I see: "improve this question / answer".        I don't get it, are anonymous users considered to be kinda dumb and don't understand "edit"?  Why to reword this action?


When faced with the problem of reducing a fraction to lowest terms, it appears that currently conventional textbooks say one should do something like this: $$ \frac{408}{684} = \frac{2\times2\times2\times3\times17}{2\times2\times3\times3\times 19} = \frac{17}{19}, $$ i.e. factor both the numerator and the denominator and then cancel.  (But maybe I'm mistaken as to what the most up-to-date textbooks say.)  This becomes somewhat more onerous with things like $\dfrac{49494}{21583}.$ And considerably more onerous in some other cases whose details I leave for now to the reader's imagination.  $$ \frac{49494}{21583} = \frac{2\times3\times73\times113}{113\times191} = \frac{438}{191}. $$ Finding the prime factors in a case like $113\times191$  But Euclid's algorithm, introduced around 300 BC and thus the oldest algorithm still in standard use today, tells us that \begin{align} & \gcd(49494,21583) = \gcd(6328,21583) = \gcd(6328,2599) \\[10pt] = {} & \gcd(1130,2599) = \gcd(1130,339) = \gcd(113,339) = \gcd(113,0) = 113, \end{align} so that $$ \frac{49494}{21583} = \frac{113\times438}{113\times191}. $$ No need to search for prime factors. Divisiblity of the numerator by $73$ is irrelevant to the problem and isn't hinted at by Euclid's algorithm.  So my question involves another problem for which complete factorization seems to be the standard recommended method: $$ \sqrt{4536} = \sqrt{2\times2\times2\times3\times3\times3\times3\times7} = 2\times3\times3\times\sqrt{2\times7} = 18\sqrt{14}. $$  What about things like $\displaystyle\sqrt{159501017} = \sqrt{13\times13\times83\times83\times137}\text{ ?}$  An efficient algorithm for finding the greatest square factor would tell us that it is $1164241 = (1079)^2$ without bringing in the irrelevant divisibility of that number by $13$ and $83.$ Is there such an algorithm?

Given a number $n$. I need to find the largest $q$ such that $q^2$ divides $n$. I need the fastest method to find $q$. $q$ can be any number prime or composite.  At present I am factorizing the number $n$ to find the highest number $q$. I need a better approach which does not involve to factorize the number $n$ completely or by some other approach which is less than $O(\sqrt n)$. Constraint: $n\leq 10^{18}$  some test cases:   if $n=180$ then $q=6$  if $n=17$ then $q=1$ if $n=10000$ then $q=100$


I got some trouble when write some code like this  def wrapper(v):     v()  def abc():     b=1      c=2  def bc():     b=b+c     wrapper(bc)     return b print(abc())   The result is UnboundLocalError: local variable 'b' referenced before assignment  for some reason I must write code like that way. So I change my code like that way to get rid of that dame problem  def wrapper(v):     v()  def abc():     b=[1,2] def bc():     b[0]=b[1]+b[0]     wrapper(bc)     return b[0] print(abc())   It's Unbelievable to got 3 when I run this script.  I want to know a rational explanation about that phenomenon. Why I can't get 3 at the first?

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


I have installed ubuntu over my windows 10 by mistake.I already had a ubuntu partition so i tried to reinstalled ubuntu but actually i installed it on windows partition and all my partitions are lost.I had my important data on windows partitions.So please help me out to recover that data.I tried testdisk from live usb but it only displays files on ubuntu. I have not used my installed ubuntu so the files are not overwritten.So please provide me ways to recover data.  Now , i have tried recovering using testdisk.In quick search  i am unable to find the lost partitions and in deeper search the search space system uses is 1700 gb while my actual hdd size is 500 gb which is displayed correctly at the start and after the deep search it asks me to check bios setting and jumper settings.Please help me out ...

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


I have been studying in the UK for over a year but my student visa expired (I'm American) at the end of January 2019.  But, I entered the Schengen Zone on 5 July 2018, I was in and out until 11 November and had accumulated 22 days total. I have not gone back into the Schengen Zone/Area since 11 November (I went to Romania for 4 nights around New Years but they're still not part of the Schengen Area). I plan to go to Denmark in mid March 2019 from the UK, but I'm not sure if I can enter the Schengen Zone still?  I have been getting various answers and I am very confused if I can get in still or not?  This is not for a Schengen Visa, I am mearly trying to re-enter the Schengen as a tourist.  The question would be: After the 180 days, do I have to wait another 90 days to re-start the 90/180 rule or does it start automatically after the 180 days have been up (which would of been 5 January). This is as an American tourist, not a Schengen Visa holder. None of the other questions have really addressed this even though it has been marked as a duplicate.   Thank you.

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


I was granted a Schengan visa from the Italian Embassy. Now I want to visit the Netherlands.  What is the procedure to change my visa?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


This section of my code does not appear to be working. I feel like the problem might like with the stk.peek() sections of the code but I am not sure if this is true. Any ideas?  stk is my stack and the first thing read into the code is "("  if(stk.empty()==true || stk.peek()== "("){     stk.push(post.get(i))           System.out.println("Test1:" +stk.peek()); }

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?


Is an extension of  or  possible such that  without defining a new command or macro for each possible argument?

The > and < preamble options of the array package (and possibly other table packages) allow automatically inserting text and commands before and after each cell of a column, respectively.  Can they be used to insert things like \hyperlink{foo}{ before and } after each cell, or something like that? Attempts so far:   >{  \hyperlink{foo}{  }  c  <{  }  } causes an error because the braces are unbalanced. Escaping the braces by \{ just inserts braces into the PDF. >{  \begin{hyperlink}{foo}  }  c  <{  \end{hyperlink}  } interestingly causes sharelatex to complain about the closed brace between begin and end, but does not cause a latex error.   The problem though is that this results in \begin{hyperlink}{foo}text in cell\end{hyperlink}, adding a hyperlink only to the first letter "t", whereas I need the result to be \begin{hyperlink}{foo}{text in cell}\end{hyperlink}, and for some reason not even surrounding every cell entry by braces manually helps.   Is there a way to achieve this?


I have a passport which was issued on Oct 26, 2011 and expires on Jul 26, 2022. Therefore it is valid for 10 years and 9 months.  I am applying for an ESTA, but the website won't let me progress as it states:   "Passport Issuance Date more than 11 years from the Passport Expire Date."  Is this a known problem?

I am trying to apply for my ESTA using a passport with an expired ESTA.  The passport was issued by the UKPO in September 2016, and is valid through January 2027 (because the UK added validity for an early replacement).  However, the ESTA website no longer accepts these dates for my renewal.  Help!


Let M and N be normal subgroups of a group G such that $G = MN.$ Prove that $G/(M \cap N) \simeq G/M \times G/N$.  Claim 1: $M\cap N$ is a normal subgroup of G:   Proof:   $1_G \in M$ and $N$ since M and N are both subgroups. For all $x, y \in M \cap N,$ $x, y \in M$. Since M and N are subgroups, $x, y \in N$ and $xy^{-1} \in M$ and $xy^{-1} \in N$. Therefore, $xy^{-1} \in M \cap N$.   Hence, $M\cap N$ is a normal subgroup of G.  Define $f: G \to G/M \times G/N$ by $f(g) = (gM, gN)$.  Claim 2: $f$ is an homomorphism.  Proof: For all $g, h \in G$, $f(gh) = (ghM, ghN) = (gMhM,gNhN) = (gM, hM)(gN,hN) =f(g)f(h)$. Hence, $f$ is a homomorphism. Note that $ghM = gMgM$ and $ghn = gNhN$ because $M$ and $N$ are normal.  Claim 3: $f$ is surjective.  Proof: Since $G = MN,$ for all $g \in G$, $g = mn$. For all $(xM,yM) \in G/M \times G/N$. We have $xM = (mnM) = n(n^{-1}mn)M = nM$. Similarly, $yN = m'n'N = m'N$. Hence, $f(m'n) = (m'nM,m'nN) = (n(n^{-1}m'n)M,m'N) = (xM,yM)$. Therefore, $f$ is surjective.  Using First Isomorphism Theorem, we get the result.

Let $M$ and $N$ be two normal subgroups of $G$. Show that $M \cap N$ is also normal in $G$. Furthermore,if $G=MN$ then show that $$G/(M \cap N) \cong (G/M) \times (G/N)$$ I manage to prove the first part. But for the two quotient groups to be isomorphic, I have no idea. Anyone can help ?


I know a player can hold an action as per the hold action rules, but can they decide to take entire turn further down the initiative order? If they do is this there initiative position for all subsequent turns or do they go back in order the next round?

In D&D 4e there was an option to Delay your initiative:     Perform your actions as desired and adjust your initiative to your new   position in the order.   Does this rule to change initiative order still exist in 5th edition? I cannot find it in the PHB.


We knew in the first season of Game of Thrones that Ser Jorah Mormont was spying on Daenerys and sent the news about her pregnancy to King's Landing, prompting Robert Baratheon to order the baby and Dany executed.   Two seasons later in Episode 8 of Season 4 (few years after Robert's death of course) a letter, a Royal Pardon meant for Jorah Mormont is sent in Meereen which however is given to Ser Barristan by that child and learns that Ser Jorah spied on Daenerys for which she tells him to leave Meereen before she orders to have him executed.   The question is, who sent the letter? Ser Jorah says the letter is not forged, it's signed by Robert Baratheon and in the same year he meets Daenerys. So Robert signed it, but who sent the letter after years and how did he know they were in Meereen. The seal on the letter seems to be Hand of the King's seal, but who actually?

In the  episode  (S04E08), Barristan Selmy is presented with a Royal Pardon supposedly signed by the late Robert Baratheon for Ser Jorah Morment by a lowly boy of Meereen.  However, it is a bit confusing to me as where this actually came from.  Is this the same pardon that Jorah had towards the beginning of the series while Robert was actually alive, or is this pardon one that Tywin actually forged and wrote in a previous episode (remember he asks Mace Tyrell for a quill after learning about Dany's recent actions and allies).  It being from Tywin makes sense but this point is brought up by Jorah and then defeated a sentence later as he himself states it is not a forged Pardon.    So which is it and why would Jorah say it is not a forged copy if it indeed is?


I'm just a newbie in Linux and recently got a VPS (Ubuntu 14.04 LTS Server). How can I secure its ssh server from brute-force attacks?

What measures can/should I take to make sure that security around my SSH server is absolutely impermeable?  This will be community wiki from the start, so lets see what people do to secure their servers.


I'm using the following code to split up a large text file into chunks of 100.  import itertools import pprint  with open('usernames.txt') as f:     while True:         lines = list(itertools.islice(f, 100))  # similar to `f[0:100]`         if not lines:             break          print lines   However when I print, every line has a /n of course, now I was wondering on how to rid of them.  As lines.rstrip('/n') does not work, neither does .remove().

What is the Python equivalent of Perl's chomp function, which removes the last character of a string if it is a newline?


The question goes like this:     Let $B=\{z\in C: |z|<R\}$ and $\partial B$ is the circle of radiu $R$. If $f$ is a non-constant analytic function on $B$ such that $|f|$ is a constant on $\partial B$, then $f$ must have a zero in $B$   My attempt:  From the assumption that $f$ is a non-constant analytic function on $B$, we have the maximum of $|f|$ is achieved on $\partial B$. Then I got stucked... I believe that since $\partial B$ is constant, and $f$ is a non-constant, the value of $|f|$ must variate in the interior of $B$ so there is a zero. But how to prove it mathematically?

Let $f$ be a non-constant and analytic on a neighborhood of closure of the unit disk such that $|f(z)|=\text{constant}$ for $|z|=1$. Prove $f$ has at least one zero inside unit disk.  I thought of using Rouche's somehow. Using $f(z)-z$, and taking constant is less than $1$, I can actually conclude from Rouche's theorem that the equation $f(z)-z=0$ have a fixed point inside the unit disk. I am stuck for other constants greater than equals to one and exactly zero. I hope there should be a little trick I am missing here. It will be awesome to see if maximum principle can be applied to conclude the result.


The camera functions fine from f/1.8 all the way to f/22 when I lock the aperture ring at f/22. Whenever I try to use the aperture ring, however, it gives an fEE error and that is even on manual mode and aperture priority. I have checked the lens and can make sure that the aperture ring in fact does correctly change the aperture when it is disconnected from the camera.  Do I have a faulty lens or do I need to change a setting to allow control of the aperture from the lens instead of the camera? As far as I have read, it seems like the D3300 should allow manual control of the aperture from an aperture ring. Am I mistaken?

I have a AF Nikkor 50mm f/1.8. When I have the aperture setting on the lens to 22 I can take photos. But when I change the dial to anything other than 22(lowest f/stop) then I get a flashing fEE message and r09 where the number of exposure left is.  I don't have the manual for this lens but am just wondering if anyone knows what the issue is here.  My camera is a Nikon D70S.


I am trying to construct a formula of the form $\int_0^1 xf(x)dx=A_0f(x_0)+A_1f(x_1)$ with degree of precision 3.   A Gaussian Quadrature is the only interpolatory quadrature with degree of precision 2n+1 with $x_0,x_1,...,x_n$ being the nodes chosen that are also the $n+1$ zeros of the $(n+1)$th orthogonal polynomial.   Looking through similar questions, most recommend using the method of undetermined coefficients to find $x_0,x_1,A_0,$ and $A_1$ by using $f(x) = 1,x,x^2,$ and $x^3$. Does using the method of undetermined coefficients inherently give you nodes that are the $n+1$ zeros of the $(n+1)$th orthogonal polynomial?   For $w(x)=1$, we can use the Legendre orthogonal polynomials to get the nodes, but from what I could find online there doesn't exist such a thing for $w(x)=x$.

How do I find an orthogonal polynomial for the Gaussian quadrature when the weight function is $x$?  In particular, I need to find $w_0,w_1,x_0, x_1$ such that  $$\int_0^1xf(x)dx \approx w_0f(x_0)+w_1f(x_1) $$ is exact when $f \in \mathcal{P}_3$.  Which polynomials can I use to find the abscissae $x_0$ and $x_1$?


The  states that the probability of a set of outcomes happening infinitely many times in an infinite sequence is $0$ under some conditions. I neither understand the math (behind the proof) nor the intuition behind what is being said.  Can someone motivate the use of this theorem?

The Borel-Cantelli Lemma in  seems to be a sort of "corollary" of the .  It says:  "Let $(E_k)_{k=1}^{\infty}$ be a countable collection of measurable sets for which $\sum_{k=1}^{\infty} m(E_k) < \infty$. Then almost all x $\epsilon \ \mathbb{R}$ belong to at most finitely many of the $E_k$'s"  I don't get three things:   "Then almost all x $\in \ \mathbb{R}$ belong to at most finitely many of the $E_k$'s"   What does that mean? Since the Borel-Cantelli Lemma comes after the "almost everywhere" definition, I guess: $\exists \ Z \ \subset \mathbb{R}$ s.t. $m(Z) = 0$ and $\forall x \ \in \ \mathbb{R} \setminus Z$, x belongs to $(E_{j}, E_{j+1}, E_{l}, ..., E_{m})$.   In the proof, one can see the $m(\limsup \ E_k) = 0$ part, stated as $m(\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]) = 0$. For some reason, $m(\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]) = 0$ implies that "Therefore almost all x $\in \ \mathbb{R}$ fail to belong to $\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]$ and therefore belong to at most finitely many $E_k$'s"   Okay, why? What is the contradiction if almost all $x \epsilon \ \mathbb{R}$ belong to all the $E_k$'s? Or a countably infinite subcollection?   What is the significance of this? Why not just state the Borel-Cantelli Lemma as "Let $(E_k)_{k=1}^{\infty}$ be a countable collection of measurable sets for which $\sum_{k=1}^{\infty} m(E_k) < \infty$. $m(\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]) = 0$"?


I installed openvpn Ubuntu GNOME and I cannot find the VPN tab for further configuration.

When I choose the Connection Type in VPN Connections, I have only PPTP and I can't find OpenVPN, but I already installed it via terminal with the command sudo apt-get install openvpn easy-rsa  Why I can't find it?


Consider the equation $$XA=BX,$$ where $X,A,B$ could be matrices or (pseudo) differential operators.  How to represent $X$ using $A,B$, that is  $$X=f(A,B),$$ where $f$ is a known function.

Consider three $n \times n$ real valued matrices, $P$, $X$, and $Y$ and the following equation:  $PX=YP$,   where $P$ is the unknown term.  Under what conditions is this equation solvable? Is it there a closed-form solution?  Your help is greatly appreciated.


On a frictionless road and tires, I know the rider wouldn't be able to change the combined center of gravity of the system by moving his weight around. If he pushes the bike to lean to the right, he would go to the left by the amount that would keep the combined cog the same. But a bike with real tires and a real road under it is not a closed system, the tires wouldn't let the lower part of the bike left or right when trying to initiate lean.   Does this mean it is possible to push with your bodies inertia to the bike, and the combined cog will be changed?   I think if you do so below the center of mass of the bike, you could, but I am not sure, since the tires will want to move more, but won't be able to, making the combined center of gravity shift more than if you applied the force higher up. And I think you should use horizontal forces on the pegs not up/down forces on the pegs  I know counter steering is the best way, but I would like to think it is possible to change direction without it, without the influence of handlebars  Please ignore gyroscopical forces and assume the bike doesn't have any trail geometry (so you would have to "catch" the bike manually through the handlebars)

In a closed system, I know the rider wouldn't be able to change the combined center of gravity of the system by moving his weight around. If he pushes the bike to lean to the right, he would go to the left by the amount that would keep the combined cog the same.  But a bike with tires and a road under it is not a closed system, the tires wouldn't let the lower part of the bike left or right when tryingo to initiate lean. Does this mean it is possible to push with your bodies inertia to the bike, and the combined cog will be changed? I thing if you do so above the cog of the bike, you could, but I am not sure.  Edit: My question is not about if you can move the center of gravity of the bike at all. My question is about if can you change the combine cog of the system by moving around on the bike?  English is not my mother tongue, sorry for the confusion


I have a method that accepts a String array as an argument. When I pass it e.g. {"4","4","4"}, it works perfectly fine. However it gives a different result when I pass it "444".split(""). FSA A = generateFSA2();  String s = "444"; String[] sArr = {"4","4","4"}; String[] sArr2 = s.split("");  System.out.println(s.split("").length + ", " + sArr.length + ", " + sArr2.length);  for(int i = 0; i < sArr.length; i++) {     System.out.println("Strings equal = " + sArr[i].equals(sArr2[i])); }  System.out.println("Accepted = " + isAccepted(A, s.split(""))); System.out.println("Accepted = " + isAccepted(A, sArr)); System.out.println("Accepted = " + isAccepted(A, sArr2));  Output: 3, 3, 3 Strings equal = true Strings equal = true Strings equal = true Accepted = false Accepted = true Accepted = false  What's going on here? EDIT: The isAccepted code: public static Boolean isAccepted(FSA A, String[] w) {     return isAcceptedRec(A, w, 0, 0); } private static Boolean isAcceptedRec(FSA A, String[] w, int q, int i) {     if (i == w.length) {         for (int qF : A.finalStates)             if (q == qF)                 return true;         return false;     }     for (Transition t : A.delta)         if (t.from == q && t.label == w[i])             if (isAcceptedRec(A, w, t.to, i + 1))                 return true;     return false; }  It's for testing FSAs. The code isn't mine, it is from an assessment, though obviously this isn't part of the assessment. I'm sticking to String arrays instead of splitting strings since apparently, that doesn't work.

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?


Why are some of my and other users' questions that are posted on Stack Overflow copied to ?  I just noticed this while searching on Google.

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


Is there a way to load standard tab content like "leads" or "contacts" through custom lightning component? Something similar to the way i can load one custom component in another: <aura:component implements="force:appHostable" controller="CustomComponentOneController">     <c:CustomComponentTwo/> </aura:component>

I have a form that needs to let the user select 3 out of 5 products, something similar to Order > Add Product (Modal). I was wondering if there was a way to bring that piece into my component (markup) and add some sort of filter that only shows the products I want to show.  What I found so far:  <lightning:listView objectApiName="Products2" listName="productsView" showActionBar="true" enableInlineEdit="true" showRowLevelActions="true"/>   But Product2 is not supported for that component.  also these from browser inspector:  forceMultiAddUsingLVM forceListViewManager   These are data-aura-class attributes when rendered.  I'm looking for directions here. Thanks in advance.


For what value of $p$ would the series $\sum_{n=2}^\infty \frac{1}{n^p\ln(n)}$ converge?  I have tried using the series convergence test, and limit comparison test, which does't help. So i am considering using the divergence test, and finding all values for p for which the limit is not $0$

For which values of $p$ does the serie $\sum\limits_{n=2}^\infty\frac{1}{n^p\ln(p)}$ converge? I'm trying to use the ratio test but I can't get a simple term in which use limit easily enough.


Say a ball is given an initial velocity $v_i$ on a rough horizontal surface in the positive $x$-direction. The surface provides frictional force $f$ which applies a torque $fr$ (where $r$ is the radius of the ball). Due to the frictional force, there is an acceleration $a$ in the negative $x$-direction and an angular acceleration $\alpha$ in the clockwise direction. After some time $t$, at the instantaneous axis of rotation $O$, the translational velocity becomes equal to $r\omega_f$, i.e., $v_f = r\omega_f$ and the ball starts pure rolling. We get $v_f$ and $\omega_f$ from the equations: $v_f = v_i - at$ and $\omega_f = \alpha t$ We can calculate $\alpha$ from the torque equation: $fr = I_\textrm{com} \alpha$ I have been taught that during this entire process from $t=0$ to $t=t$, the angular momentum of the ball is conserved. Therefore, conserving angular momentum about the instantaneous axis of rotation $O$, we can write, $$mv_ir=I_\textrm{com}\omega_f + mv_fr$$ My question: How are we able to conserve the angular momentum, even though there is an external torque $fr$ acting on the ball (i.e., $\tau_{\textrm{ext}} \neq 0$)?

In a situation where a disk is rolling WITH slipping on the ground i.e velocity of centre of mass is greater than $r\omega$, is angular momentum conserved about a point on the ground.  What confuses me is that friction decelerates the disk to make $v_{com} = r\omega$ and in this process some velocity is lost so according to formula of angular momentum $L=mvr$,about a point on the ground $L$ decreases as $v$ decreases.  But since friction is also acting about a point on the ground, torque about a point on the ground is zero, so then how would angular momentum change.  edit:this question is about applying conservation of angular momentum in rolling with slipping.


I am wondering, is there a way to play old Minecraft versions such as Indev/survival test? For example, there was a mod called MCnostalgia, but I don't know if it's still available. I know, half of you are probably going to say, use the edit profile option in the new launcher, but I want to play some versions that the edit profile option does not contain. Is the mod out there? If so, where? Also, is there is any way to legally get old jar files for minecraft and put them In the versions folder? If so where from?

How do I downgrade Minecraft to play on a server running an older version?


Is there an option to abandon the current command and later go back with the up arrow?  Sometimes when I want to open multiple files at once I want to check "dir" to see if I got the right paths. How can I write a new command while still saving the command I was about to write so I can go back to it fast after?   I could use two separate terminal windows, but I'd like to know how to this in one.  Example:  First I want to open three files, like this: vim -p js/ajax_nav.js first_page.php...  But wait! I forgot what the name of the third file! How do I save the already written line in the memory so I can look up the filename with "dir" and possibly "cd", to return back to the line above? So I'll only have to add the third name.

I use terminal for almost all tasks. Let's say I have entered a huge command like this:  sudo a-huge-command   What is the easiest way to delete the whole command with a single shortcut, rather than keep on hitting backspace key?  I'm a Ubuntu newbie looking to use Ubuntu in a professional way.


I managed to prove a similar fact: the following sequence is increasing: $\left( \dfrac{n+1}{n}\right)^n$, which means $\left( \dfrac{n+1}{n}\right)^n < \left( \dfrac{(n+1)+1}{(n+1)}\right)^{n+1}$.  All this took was some simple algebra and bernoulli's inequality. For the one in the title, I am not sure how. My attempt was: $$\left(\frac{n+1}{n}\right)^n \left(\frac{n+1}{n}\right)\stackrel{?}{>}\left(\frac{(n+1)+1}{(n+1)}\right)^{n+1} \left(\frac{(n+1)+1}{(n+1)}\right)$$ But this doesn't help me. Do you have other ideas?

Given  $$ y_n=\left(1+\frac{1}{n}\right)^{n+1}\hspace{-6mm},\qquad n \in \mathbb{N}, \quad n \geq 1. $$ Show that $\lbrace y_n \rbrace$ is a decreasing sequence. Anyone can help ?  I consider the ratio $\frac{y_{n+1}}{y_n}$ but I got stuck.


Please note that this question is different from a similiar one as although the basis is the same, the integral that is being calculated is different.  let $\alpha′(x)=β(x),β′(x)=α(x) $ and assume that $\alpha^2 - \beta^2 = 1 $. how would I go about calculating the following anti derivative : $\int\alpha^2(x)/\beta^4(x) dx $.  I have tried several methods which did not work. These included putting the integral in terms of one of the variables using the first given condition and then trying to apply an U-substitution. However, since both $\alpha(x)$ and $\beta(x)$ are raised to even numbered powers, I end up with either an $\alpha'(x)$ or $\beta'(x)$ which makes it such that I cannot U-substitute since I cannot rewrite the entire integral in terms of U.  I would appreciate any help.  Thank you.

let $\alpha'(x)=\beta(x), \beta'(x)=\alpha(x)$ and assume that $\alpha^2 - \beta^2 = 1$. how would I go about calculating the following anti derivative : $\int (\alpha (x))^5 (\beta(x))^4$d$x$.  I have tried many different methods with no success. Firstly, I tried to write the integral in terms of one of the variables (using the first condition) and then using integration by parts. This resulted in a very complex answer which I abandoned midway. Additionally, I have tried to use an appropriate U-substitution which unfortunately does not seem to work. This is because when I take the first derivative of my u - due to chain rule - I get a product with one variable being either $\alpha'(x)$ or $\beta'(x)$ and as a result I cannot continue further with the integration due to not being able to get the entire integral in terms of only u. Any help would be appreciated. Thank you.


In my warehouse, we use multiple computers with multiple sets of speakers. It gets noisy between multiple sets of speakers playing different music. Now, i have the computers linked with Bluetooth and can send/receive files with out a problem. I have searched and searched and searched for a program to be able to stream music between computers and essentially have one massive set of speakers.  Is this even possible? Thank you

Is there a way to stream the same playlist on multiple computers at the same time? I want to be able to sync what's playing on multiple computers (for parties etc).


I'm not sure why you need to multiply by $\frac1{2m}$ in the beginning. I understand that you would have to divide the whole sum by $\frac1{m}$, but why do we have to multiply $m$ by two?  Is it because we have two $\theta$ here in the example?

In the famous , in chapter 1, equation 6, the Quadratic Cost (or Mean Squared Error) in a neural network is defined as  $ C(w, b) = \frac{1}{2n}\sum_{x}||y(x)-a||^2 $  where $w$ is the set of all weights and $b$ the set of all biases, $n$ is the number of training inputs, x is the set of all training inputs, y(x) is the expected output of the network for input x, and $a$ is the actual output of the network for input $x$, with respect to $w$ and $b$.  Most of this formula seems very clear to be, except the $2$ in the denominator. If I understand it correctly, we are summing up the squared vector length of (the actual output minus its expected output), for each training input (giving us the total squared error for the training set) and then divide this by the number of training samples, to get the mean squared error of all training samples. Why do we divide this by $2$ as well then?  In other places I've seen that Andrew Ng's lecture defines the Mean Square cost in a similar way, also with the $2$ in the denominator, so this seems to be a common definition.


If we have a polynomial in a single indeterminate $x$ $$ a_n x^n + a_{n-1}x^{n-1} + \dotsb + a_2 x^2 + a_1 x + a_0, $$ can we always find a matrix for which this polynomial is a characteristic polynomial? Or are there polynomials which cannot be characteristic polynomials to any matrix?

Is every monic real polynomial the characteristic polynomial of some real square matrix? I strongly suspect so, but I couldn't find a proof.


I want an regex for email that starts with numbers and letters.  My regex is   /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/   What is wrong in this? It allows ._- from start and in between. But I don't want this  Valid emails = s@gmail.com, s.p@y.com, s_p123@g.com   Invalid emails = ....s@g.com, s---g@g.com, s...@g.com, 44s..p@g.com, ----s@g.com  Does anyone know how this can be done?

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


Suppose $A$ is a 2 x 2 matrix, prove that if $A^{3} = 0$, then $A^{2} = 0$  I was given this equation as a hint:  $$A^{2} - tr(A)A + det(A)I = 0$$  where $tr(A)$ is the sum of the diagonal entries of $A$.  My attempt:  $$A^{2} - tr(A)A = -det(A)I$$ $$A(A - tr(A)) = -det(A)I$$ $$A[-\frac{1}{det(A)}A(A - tr(A))] = I$$ $A$ is invertible, thus $det(A)$ is not equal to $0$. Multiplying $A^{2}$ to both sides of equation 2:  $$A^{3}(A - tr(A)) = A^{2}(-det(A)I)$$  Since $A^{3} = 0$ and since $-det(A)I$ is not equal to $0$, then $A^{2}$ must be equal. QED.  Is this proof correct?  EDIT: There seems to be a similar question, but my question is more specific in that I have to use the equation given in the hint.

I'm sure I've done this before in abstract algebra. Regardless it's escaped me now.   I have proved that for $T:U\rightarrow V$, with $dim(U)=m$ and $dim(V)=n$ that $rank(T)\le m$ which is obvious, but I have proved it none the less.  I want to.... this is where I get stuck. I'm not quite sure how to say it.  Suppose we have a $T$ for example that takes $U\subset\mathbb{R}^3\rightarrow V\subset\mathbb{R}^3$, we could still have a $T$ that maps a plane to something (a plane, line or point) in this case rather than $rank(T)\le 3$ I can state $rank(T)\le 2$.  (Correct my notation here, I don't like writing subset, I mean number of dimensions of the space!)  To show this I can say $F:P\subset\mathbb{R}^2\rightarrow U\subset\mathbb{R}^3$.  Then let $G:P\rightarrow V$ and that $G=TF$, now $rank(G)\le dim(P) = 2$  Now, if $U,P,Q,R$ are spaces of dimension $\le 2$ and P,Q,R are subspaces of U  $A:U\rightarrow P$  $B=A:P\rightarrow Q$  $C=A:Q\rightarrow R$  We can now say $A^2=BA$ then $A^3=CBA$  We know that for $A$ rank(A)$\le 2$, this thus provides an upper-bound for rank($A^3$)  I want to show now that if I keep applying a linear transformation that the rank is a monotonically decreasing ($\le$) sequence. I am unsure on a proof that the rank of a transformation cannot be greater than the domain's dimensions. Although this is trivial.  (NOTE:  I have proven that if a set of n vectors, R, span a vector space V, and you take a set W of m linearly independent vectors in V that m$\le$n)  If rank(A)=2 then rank($A^2$)=2 and so rank($A^3$)=2  if rank(A)=1 then rank($A^2$)=0 and rank($A^3$)=0  if rank(A)=0 then rank($A^2$)=0 and rank($A^3$)=0  But again, I can't prove this, or at least I am unsure of how to write it.  something to clarify:  For a map $T:U\rightarrow V$ how do we distinguish (using notation) whether or not we actually use all dim(U)?  For example we might have a T that maps a plane in R^3 to a line in R^3, this can be expressed as a composition of maps, one that takes a 2 dimensional vector space (coordinates of the plane in 3 space) to a 3 dimensional point in T's domain, which T then maps to a line.  We have rank - the dimensions of the image - to make this distinction on the map's target (the rank of T is 1 if it maps something to a line, but the dimensions of the target is 3)  How do we write this? What do I say to describe this?   How do I distinguish between the number of vectors in a basis and the number of dimensions the space that basis is in has?  Sorry for the length of this! I tried to talk though my problem in the hope of seeing it myself, no such luck, thanks.


I have created my account using Gmail and now it's blocked at my workplace. I tried to add another login in "My Logins" but the options shown there are also blocked.  I want to add my work email to login but there is no option to enter custom email.  So   How to add my email to login?   or   Do I need to create new account with my new email and request a merge with older account?

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


I'm making a payroll program and one of the options is to check data on current users.  I want to allow the user to enter either the employee's ID or name to retrieve this information.    Scanner userChoice = new Scanner(System.in); System.out.println("Enter employee ID or full name"); String checkHEmp = userChoice.next(); int checkHempID = userChoice.nextInt();      if (checkHempID ==3|| checkHEmp == "Jill Jones") {         HourlyEmployee jones = new HourlyEmployee();         jones.jJones();     }   In this example HourlyEmployee is a class of hourly employees and jJones() is a method in that class that contains the information for one of the employees.  When I enter either "3" (the ID) or "Jill Jones" nothing happens afterwards.  Edit: Added method for jJones()  public void jJones() {     double hourlyWagesJones = 16.45;     double hoursWorkedJones = 48;      System.out.println("Employee ID: 3");     System.out.println("Last name: Jones");     System.out.println("First name: Jill");     System.out.println("Date Hired: 1/22/2011");     System.out.println("Hours Worked: " + hoursWorkedJones);     System.out.println("Hourly Wages: $" + hourlyWagesJones);     double totalEarnedJones = new Double(hourlyWagesJones * hoursWorkedJones);     System.out.println("Total earned: $" + totalEarnedJones);    }

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?


In a document, I tried to use \phantom{} to indent the next line. However, it seems the phantom part is removed and/or a line break inserted.  \documentclass[xcolor=pdftex,dvipsnames,table]{beamer} %  \begin{document}  \noindent X abc abc\\ X abc abc\\ \phantom{X} abc abc\\  \end{document}   This is what I get:    What I expected is the X to be invisible and the abcs to be aligned under to line above. Why is this not happening?

Could anybody tell me why does phantom command create paragraph spacing issues as described in :     This sort of code  Vin.\ i zvat.\ mn.\ imaju akcente kao i im.\ mn.: \emph{zȗbe : zȗbi},  \emph{knȅzove : knȅzovi}, \emph{púževe} i t.\ d.  \phantom{a}\symbol{"0311} na ˊ u svima padežima osim onih koji će se  na po se spomenuti, n.\ p.\ \emph{strȋc} ima u rod.\ jed.\ \emph{stríca}, dat.:  \emph{strícu}, vin.: \emph{stríca}, tvor.: \emph{strícem}, skaz.: \emph{strícu};  tako \emph{dvȏr} ima u im.\ mn.\ \emph{dvóri} i \emph{dvórovi}, i t.\ d.       produces            Why the such a big space between the paragraphs?   Does anybody know?


Is the series $$\sum_\limits{n=1}^\infty\frac{n}{n^3+1}$$ convergent or divergent? My answer is the following. Could anyone tell me if it is correct? Since $$0<\frac{n}{n^3+1}<\frac{1}{n^2}\;\;,\;\;\;\;\forall n\in\mathbb{N}$$ and the series $$\sum_\limits{n=1}^\infty\frac{1}{n^2}$$ is convergent, by applying comparison test, we get that the series $$\sum_\limits{n=1}^\infty\frac{n}{n^3+1}$$ is convergent too.

I'm trying to show that the series $\sum_{n=1}^\infty\frac{n}{n^2+1}$ is divergent.   I'm trying to use a comparison test to do so. To do so, I first can see that $\sum_{n=1}^\infty\frac{n}{n^2+1} \geq \sum_{n=1}^\infty\frac{n}{n^2+n} = \sum_{n=1}^\infty\frac{1}{n+1}$ And I can use a change of variable $k = n+1$, so show $\sum_{n=1}^\infty\frac{1}{n+1} = \sum_{k=2}^\infty\frac{1}{k} = \infty$. Then since $\sum_{n=1}^\infty\frac{n}{n^2+1} \geq \sum_{k=2}^\infty\frac{1}{k}$ it must be that $\sum_{k=2}^\infty\frac{1}{k}$ also diverges to infinity. Is this a valid way to show it?


Who is the person who says "Rey" in the background of the scene from The Force Awakens where Rey finds Luke's and Anakin's lightsaber?

In The Force Awakens, she has a vision, and a voice says:     These are your first steps   Now a number of former Jedi have become 'luminous beings' (not this crude matter). I'm trying to work out which one it is. It seems to be one of Yoda, Obi-Wan, Qui-Gon or even Anakin.   My question is: In Rey's vision, whose voice says "These are your first steps"?


Let $R$ be a ring and let $P$ be a proper ideal of $R$.  If the quotient ring, $R/P$ is an integral domain then $P\vartriangleleft R$ is prime.  For $x,y\in R$ we have $(x+P)(y+P)=xy+P\in P\vartriangleleft R$, and since $P\vartriangleleft R$ is an integral domain $x,y\neq 0$.  Also, we have that $R$ and $P\vartriangleleft R$ are rings, so there exists a zero element such that $$(x+P)(y+P)=xy+P=0_R+P=(0_R+P)(0_R+P).$$  Since $x,y$ are nonzero this is possible only if $x\in P$ or $y\in P$.  Therefore $P\vartriangleleft R$ is prime by definition.  Is my proof correct? I would appreciate any help/hint.

I had to write the proof to show that an Ideal $P$ of a commutative ring $R$ is prime Ideal if $R/P$ is an integral domain.       let $a,b\in R$ s.t. $ab\in P$ ,        $$ab+P=P\implies(a+P)(b+P)=P\implies\overline a \overline b=0$$  and as $R/P$ is an integral domain either $a=0$ or $b=0$ $\implies a+P=P$ or  $b+P=P$.        $\therefore$ either $a\in P$ or $b\in P$.   Hence, $P$ is a prime Ideal.    Am I correct in writing this or am I making some error...


Looking at the site with older versions of Ubuntu it seems like 64bit on amd chips is the only option. I can upgrade the ram but I am pretty sure I am stuck with a 32bit processor. This PC had Windows XP installed but cannot reach the update site. Just want to try installing ubuntu or some other linux to see if there is some hardware malfunction.

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


I have installed Ubuntu 18.04. All things are working properly, but I cannot connect to my mobile Hotspot with it.  I have noticed that there is no additional  driver for it, though I can connect to internet via USB cable with my phone. Please help me out with this problem.

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


I'm being asked to prove that $$1 + \omega + \omega^2 + ... + \omega^{n-1} = 0$$ where $\omega \ne 1$ is an n-th root of unity, and I don't know where to start  I feel like there's something terribly obvious that I'm missing here.

Question: If $c\neq 1$ is an $n^{th}$ root of unity then, $1+c+...+c^{n-1} = 0$  Attempt: So I have established that I need to show that $$\sum^{n-1}_{k=0} e^{\frac{i2k\pi}{n}}=\frac{1-e^{\frac{ik2\pi}{n}}}{1-e^{\frac{i2\pi}{n}}} =0$$ by use of the sum of geometric series'. My issue is proceeding further to show that this is indeed true.


Im jordanian and have bulgaria visa type c number entries 2  i want book flight from amman to bucharest Then back to amman with out enter bulgaria Can i do that

I am an Indian citizen with a double-entry Bulgarian visa. Our flight is from New Delhi to Bucharest, Romania. We will stay in Romania for 4 days and then go to  Bulgaria.  Does my double-entry Bulgarian visa allow me to first enter Romania, rather than  Bulgaria?


Using 16.04  and only seems to happen in chrome.the other question seems to have fixed the flickering problem but i still have like small screen delay when i switch tabs and i still seem to have the sound jitter randomly

I've upgraded from 4.4.0 to 4.4.8 and then 4.5.2 on Ubuntu 16.04 LTS 64-bit, and it's still happening.   At 4.5.2 it's even more frequent, and mainly in Chrome (haven't tried firefox or opera just yet). Every time I open a new web page. Any way to fix that, or is it a bug?  00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 04:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev 81)   Cheers.


I have an hp 11-h110nr x2 and it originally ran on windows but I switched to Ubuntu and would like to switch back. How do I do this?

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.


Prove that $n < 2^n$ for all $n ∈ N$. By induction. I know how simple is this, but could anyone help and give detailed explanation?   Edit: Its $2^n$ NOT 2n

So I need to prove the inequality :  $$n < 2^n$$  by Induction.  What I have done so far is :     Step $1$: Prove that the statement is true for $n=1$   $$1<2^1$$ (true)      Step $2$:    Prove that, if $p(n)$ is true, then $p(n+1)$ is also true.      Assume that $p(n): n < 2^n$ is true. then :      (Add $1$ on both side to get $n+1$) : $$n+1 < 2^n +1$$      (Multiply the original inequality by $2$ to get $2^{n+1}$ ) :   $$2^{n+1} < 2^n . 2$$   I don't know where to go from here. In fact, I am not sure whether what I did is true or not. I appreciate any insight and help.


I am trying to insert some data to textview(In fragment) from database. Here is the fragment:  SQLiteOpenHelper deck_helper = new DeckDatabaseHelper(getActivity());     SQLiteDatabase db = deck_helper.getReadableDatabase();     TextView name = (TextView) getActivity().findViewById(R.id.textView2);     Cursor cursor = db.query("DECK", new String[]{"NAME"}, "_id=?",             new String[]{Integer.toString(1)}, null, null, null);         try {              if (cursor.moveToFirst()) {                 String nameText = cursor.getString(0);                 name.setText(nameText);              }             cursor.close();             db.close();         } catch (SQLException e) {             Toast toast = Toast.makeText(getActivity(),                     "Database unavailable", Toast.LENGTH_SHORT);             toast.show();         }   And DeckDatabaseHelper   public void onCreate(SQLiteDatabase db) {      db.execSQL("CREATE TABLE DECK (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT, "             + "NAME TEXT, "             + "CLASS TEXT, "             +  "IMAGE_CLASS INTEGER"             + ");");     ContentValues values = new ContentValues();     values.put("NAME", "Mage");     values.put("CLASS", "Mage");     values.put("IMAGE_CLASS", "123");     db.insert("DECK",null,values);  }   I think that Textview should show "Mage", but get this error     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference                                                                                at com.example.nikolaypavlin.deck.Fragments.DeckManagerFragment.onCreateView(DeckManagerFragment.java:54)   I am sure that textView2 exists  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.nikolaypavlin.deck.Fragments.DeckManagerFragment">  <!-- TODO: Update blank fragment layout -->  <ListView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/listView"     android:headerDividersEnabled="false"     android:visibility="visible" />  <Button     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="New Button"     android:id="@+id/button"     android:layout_gravity="right|center_vertical" />  <TextView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:textAppearance="?android:attr/textAppearanceLarge"     android:text="Large Text"     android:id="@+id/textView2"     android:layout_gravity="right|top" />

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 searched now for a few hours to find a solution to my beginner Java problem but I cannot seem to do it.  I am trying to check a directory for filenames that I would like to test against a list. If the Filename exists I would like to do something. The problem is that the filename is never found, even when the file clearly exists. I am using java.io.File to get the directory filenames.  My problem is that the file is called "test1_1.txt" and the method returns "test1_1.txt" in a println statement but Java tells me they are not the same. Hence I never can actually make Java tell me which files do already exist.  System.out.println(listOfFiles[i].getName()); is showing me "test1_1.txt"  but:  public static void main(String[] args){          File folder = new File(C:\\Users\\M\\Desktop\\coding\\);         File[] listOfFiles = folder.listFiles();      for (int i = 0; i < listOfFiles.length; i++){          if (listOfFiles[i].getName() == "test1_1.txt"){             System.out.println("found");         }     }}   never says "found"  Im grateful for any help.

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?


I need to concatenate a string and a variable to fill another string:  #include <stdio.h>  int main(){      char *te1;     char *te2;     char *tabela[2];      te1 = "text 1";     te2 = "text 2";     tabela[0] = "text 0, " + te1 + ", " + te2;     printf("%s\n", tabela[0]);     return 0; }   expected result:     text 0, text 1, text 2

I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that?


I have a function:      public static void printOnLable(String str){     try {         labelAkcja.textProperty().setValue(str);     } catch(Throwable e) {         System.err.println(e);         System.err.println("Cause = " + e.getCause());     } }   but when i want to call it   Controller.printOnLable("server started");   I get always an error


I'm developing a custom plugin for Eclipse and I have a powerpoint file named "extract.ppt" that I want to open through my source code.   When I place the file on my projects root diercotry and use:   File file = new File("/extract.ppt");   the file opens just fine.  But since im gonna be using a few more files on my application, I thought it would be a good idea to keep them all organised under a folder. So I created a folder named "files" under my main project folder and tried to use:  File file = new File("/files/extract.ppt");   but I get an error saying the file does not exist. I checked my Eclipse project's folder and the folder "files" as long as the "extract.ppt" are there.  Any ideas?

I know the file needs to be where the getClass().getResource(filename) can find it, but I don't know where that is.  I'm interested both in where to put the files on the filesystem itself, and how to go about using Eclipse's functionality to set up the resources.


I'm following along on the blog post "Use Views to Create an Alphabetical List of Taxonomy Terms" by Kristin Brinner  and my sample does not produce the results as she shows.  Part 1 & 2: I successfully created a new view selecting taxonomy terms (create as Grid), then grouped terms alphabetically (add Taxonomy term: Name, label it "Grouping", exclude from display, rewrite to max length = 1), then under Grid-Settings use "Grouping"  Part 3, Create a Views page for each letter of the alphabet: I can't see these results, but I presume I did this correctly, using contextual filters,  (Glossary, Character limit 1)  Part 4, Create A-Z list (create a block that will display the list of first letters in a cute list above the grouping grids) isn't working. Here is what the tutorial says should be the result:    I followed along exactly with the tutorial except When the filter value IS available, the tutorial says Specify validation criteria, Basic Validation, Hide View and I do not have Hide View available.  I don't have an option to Apply, only Save. My content continues to look the same as it did previously in the exercise, i.e. like this (graphic omitted because I don't have enough clearance on this site)  However when I put "S" into the Preview with contextual filters, I get (graphic omitted because I don't have enough clearance on this site)  So, it looks like it's almost working. Ideas? TIA

Note: as a neophyte user, I'm not allowed multiple links or images. It has been suggested that I edit my original content in order to add updates. Also it's been suggested to edit the hyperlinks so they're not quite right. Hopefully you can sort out what's going on.  I've been following this post by Kristin Brinner "Drupal Tutorial: Use Views to Create an Alphabetical List of Taxonomy Terms" (at h ttp://getlevelten.com/blog/kristin-brinner/drupal-tutorial-use-views-create-alphabetical-list-taxonomy-terms) but my sample does not produce the results illustrated and by now I'm very confused.  Part 1: said to create new view showing taxonomy terms, display in grid format and create menu link. Done.  Part 2: grouped terms alphabetically (add Taxonomy term: Name, label it "Grouping", exclude from display, rewrite to max length = 1 and uncheck 'trim on word boundary' and 'add ellipsis'). Under Grid-Settings use "Grouping" apply to all displays. My view looks like the sample. Done.  Part 3, Create a Views page for each letter of the alphabet: said to add a Contextual Filter: Taxonomy term: Name. When the filter value is NOT in the url, display all results for specified field. Under More, click Glossary mode, character limit = 1. Note that I now have a Taxonomy term: Name in the Contextual Filter section. I don't know how to test these results.  Part 4, Create A-Z list (create a block that will display the list of first letters in a cute list above the grouping grids) says to add a new Contextual Filter for this block (override). When the filter value is not available, 'display a summary', sort by alphabetical, unformatted, display record count and display items inline. This isn't working as predicted, here is what the tutorial says should be the result: Image 1 in the diagram (h ttp://imgur.com/l9TbLyv). My content continues to look the same as it did previously in the exercise, i.e. like this: Image 2 in the diagram. However when I put "S" into the Preview with contextual filters, I get: Image 3 in the diagram. I was asked for screenshots, so without contextual filters is h ttp://imgur.com/zXCnsvA and with "s" in contextual filters is h ttp://imgur.com/7DF6UUD .  When I created the new contextual filter in Part 4, I got a copy of what was in the Page, so I have two contextual filters, both with Taxonomy term: Name. If I delete the first contextual filter from the block, then my preview shows the same information as Image 1 in the diagram. I think I'm missing something &/or the blog post is unclear. Should I have started "this block override" with 0 contextual filters? I.e. Should I have started by deleting elements from the page which were copied into the block?  Part 5 instructs to "Add the alphabetical list on our page with the grouped terms and Go back to our Page display".  I've got the view working correctly now. The thing which stumped me was that adding a block created an entire copy of the original page which (philosophically) I don't understand. When there's a page and a block override which give instructions about the view, how does drupal know which instructions to pay attention to?  Thanks to all the folks who have helped.


I am attempting to install the latest development version of Wine (wine-devel) under Ubuntu 18.04 Bionic Beaver from the WineHQ PPA but the following error message stops me:  andrew@corinth:~$ sudo apt install --install-recommends winehq-devel Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  winehq-devel : Depends: wine-devel (= 5.0.0~bionic) E: Unable to correct problems, you have held broken packages. andrew@corinth:~$    How do I successfully complete the installation of Wine Development version under Ubuntu 18.04? I would prefer to use only the Wine PPA and not add another PPAs such as the OpenSuse Build Service as suggested in

I have followed all the instructions on .  In particular, I have run the following commands: sudo dpkg --add-architecture i386  wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo apt-key add winehq.key sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'   The first three of the above seemed to work fine.  However, the last command gives me the following error: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  winehq-stable : Depends: wine-stable (= 5.0.0~bionic) E: Unable to correct problems, you have held broken packages.  I'm running Lubuntu 18.04.3 on a USB live stick.  (However, if I remember correctly, a couple days ago I got the exact same error on a normal hard disk Lubuntu 18.04.3 installation.) I've read that a lot of people get similar errors.  Unfortunately I haven't found any solutions online that worked. Any help would be much appreciated.  Thanks! EDIT:  Thanks for the comments and suggestions everyone.  I'll try them out later today. In the mean time, here's something I don't understand.  Ubuntu 18.04 has been around for almost two years now.  In all that time, surely somebody has successfully installed wine, right?  What did they do to get it working?


The IP Spoofing is becoming a major concern these days.I was wondering whether we could use pattern matching,like comparing the hop count of the packets coming or the TTL(Time To Live) field of the IP datagram to reduce IP spoofing.Is there any way for this?

I am an undergraduate Computer Science student and was hoping to gain some knowledge of ways to help prevent IP spoofing but all the resources I have tried out elaborate this concept in a theoretical way. I want to try out my hands at one of the techniques like:      How do I simulate this whole situation in my own system were I myself am the attacker and I myself have to defend it? And once I have gained an understanding of it, then how do I start translating that into programming terms?


All numbers divisible by 3 but not 2 can be found using  $6*n+3$  All numbers Divisible by 5 but not 3 or 2 can be found using  $10*n+5$  Is there a formula for divisible by 7 but not 5,3,or 2?

The question is to determine the number of positive integers up to $2000$ that are not divisible by $2,3$ or $5$ but are divisible by $7$. The answer is supposed to be $76$ but not sure how it was derived  I know that if the question was how many integers are not divisible by $2,3,5$ or $7$ then the answer would be $458$ and I know how to derive this.


Long story short: I got a PhD a few years ago (let's say, in numerical methods for nonlinear PDEs).  I've since gotten experience with a couple post-docs and a variety of collaborators, but I'm not really satisfied with what I'm doing.  I feel out of place.  Earlier in life, I made a tough decision between science and humanities-- my other passion has always been, let's say, east Asian languages.  If my bachelors program had had better language courses or options for "hybrid" fields like computational linguistics, I probably would have gone that route, instead of fully focusing on math.  I've sought out collaborations that might help me bridge the gap between math and languages; I've also looked at postdocs to help make the transition.  I've reached out to leaders at research groups who do stuff I'm really interested in.  The common denominator is: I'd need a PhD in some kind of linguistics to research seriously what I want. So...  What key things should I take into consideration when pursuing a doctorate, given that I have a doctorate in an unrelated field?  Please consider the question within the following context: I'm not asking whether having two PhDs is good or bad (I frankly don't care), how to needlessly pad my name with titles, or how to get two PhDs simultaneously. (That is all to say:  doesn't answer my question.)  I'm asking about what to expect when changing careers, specifically, if the source career is in one academic field and the target career is in another, unrelated field.  Assume I've 100% decided to leave my current field and pursue this second doctorate, for the purpose of changing careers. Assume also that I already have substantial content knowledge in the target field, as I have a bachelors degree in it already, and it's been an avid hobby for most of my life.  Some sub-questions that don't need to be specifically answered, but I think help narrow the question: in what way could my current PhD be a hindrance in getting into a new program?  Will my supervisors and colleagues see my past PhD as an asset, or as weird-looking mole they will try to politely ignore?  What are other questions should I ask myself to prepare for such a non-traditional career path?  Note: I've edited this question multiple times in a vain attempt to get the duplicate label removed. If you agree, please vote.

I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them?


I have a laptop and it has a graphic card called Radeon r535. .Is there a way to install driver for this graphic card.

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


I've seen following definition: an $R$-module $M$ is semisimple if every submodule of $M$ has a complement.  Does anyone have example of a module which is not semisimple in $\mathbb{Z}$, $\mathbb{C}[t]$ and $\mathbb{C}[\mathbb{Z}]$?  I think $\mathbb{Z}$ is the module which is not semisimple in $\mathbb{Z}$. But I couldn't find module which is not semisimple in  $\mathbb{C}[t]$ or $\mathbb{C}[\mathbb{Z}]$. Does anyone have an example?

I have a homework question as follows:  Let $M$ be an $R$-module with submodule $K$. A complement to $K$ in $M$ is a submodule $L$ of $M$ such that $M = K \bigoplus L$. An $R$-module $M$ is semisimple if every submodule of $M$ has a complement.      For each of the following rings $\mathbb{Z}, \mathbb{C}[t]$, and $\mathbb{C}[\mathbb{Z}]$ find a module which is not semisimple.    For the integers, I think I found one: $K = 2\mathbb{Z}$, which is a $\mathbb{Z}$-module, but the odd integers are not a module, so $K$ does not have a complement. Is this a correct example?  For the second one, I thought perhaps $\mathbb{R}[x]$ would work, but I'm not sure that this is an $R$-module for the ring $\mathbb{C}[t]$, and for the third one, I am unsure of where to start.   Any hints/examples would be appreciated.


When the Outlook Calendar has an alert, perhaps to tell me about a meeting or some other deadline, it sometimes does not appear as an alert box on the screen and instead appears as a blinking tab on the taskbar.  With the number of tabs I have open on the taskbar, it gets lost, and I probably am clicking too much to notice the alert box.  I've missed or become late for a few appointments due to this somewhat passive nature of the alert box.  Is there anything I can do to make the alert a modal window, or otherwise be more "obnoxious" so that I am assured I must deal with it and not potentially miss a meeting?  I would prefer to not have to use a different solution.

I'm just starting to use Windows 7 and I want to know how to make my Outlook reminders pop up and show themselves prominently.  They keep opening discreetly, as just another window in the Outlook stack on the taskbar.  As a result, I keep overlooking them because they pop up behind everything else.  How do I make them less easy to overlook?  (Clearly, one usually doesn't want obnoxious apps that push themselves to the forefront.  But there are a few places where such behavior is desirable, and Outlook calendar reminders are one of them.)


Please explain me. I can't find UEFI Firmware setting on my lenovo laptop (windows 10).I will tell from start to end.At first, my laptop has windows 7.And then I installed Ubuntu 16.04(No dual bot).Then I deleted Ubuntu system & installed windows 10.And then I installed remix os (dual bot).Then I remove Remix Os from dual bot.Now I want to install back Ubuntu (dual bot or using Virtual box).It is not easy.I can't find UEFI Firmware setting or Boot menu.    It show that  BIOS mode is legacy. What should I do?

Recently, I have messed around trying to dual-boot Windows 10 and Ubuntu. It was a great failure with various problems. Long story short, I wiped my drive and installed Windows 10 fresh. The first thing I wanted to do was to boot into UEFI firmware settings (using Windows Advanced Restart) and disable secure boot and fast boot. However, the UEFI firmware settings boot option does not exist! As far as I can tell, it is impossible for me to boot to UEFI/BIOS (spamming F12, F2, del, etc. does not work either). So how can I boot to firmware settings, or restore them if they are broken? Surely they cannot be non-existent. Image of System Information:


Yesterday I updated my Dell Latitude D650 laptop with the new LTS edition of Kubuntu, v.16.04.  I was previously running the 14.04 LTS release. After completing the update and restarting the computer, I was given a black terminal screen with the prompt Login:_ instead of the normal user-account login screen with picture icons for accounts.    I've tried logging in as my username, Administrator, Root, and anything else I can think of, and tried as many different plausible password combinations as i can and it always comes back with a invalid login message.    Please, somebody tell me there is a way to unlock my computer so I don't have to wipe it and start over? I was never prompted to change any login settings in the update process...

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


am passing in a string of numbers and would like to convert this string into a list of numbers e.g.     SELECT personID from person WHERE personID IN ('927,6944')   How do I convert ('927,6944') to (927,6944)     This is the error message I get when I try and run the query:     Msg 245, Level 16, State 1, Line 1   Conversion failed when converting the varchar value '927,6944' to data type int.

Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


As a lot of you may know, on April 10th we'll get to see the so said "first picture of a black hole" from the EHT. I'm no expert in observational astrophysics, so my questions are: how are they taking this radio image? Is it the same as the "old" radio telescopes with better quality, or is there a new technology behind this picture? Also, during an astrophysics course I was showed a video of some stars orbiting around something that the professor said to be Sgr A*. Isn't that already a photo of a black hole? Do we hope to see anything different? Lastly, will this have consequences on the theoretical study of black holes, or will it just be a better picture of what we already know?

I recently read an article that said that the event horizon telescope took a picture of a black hole (Sagitarius A*) and it will be presented on the 10th of April. I was wondering how this picture is taken and what a picture of a black hole even means?   The only explanation I could think of was that the telescope took pictures of the stars surrounding the black hole and then a sudden absence of stars pointed that a black hole is present.  Can anyone explain how black hole photos are taken or how does event horizon telescope work?


I'm trying to install  (32-bit) on a 64-bit machine (using Ubuntu 16.04 both as a standalone OS and through WSL) and I keep getting this error, no matter what I do. I solved it a while ago on an Arch installation, but I completely forget how.  > file musesdk-3.4.1-linux-installer.run musesdk-3.4.1-linux-installer.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped    > ./musesdk-3.4.1-linux-installer.run  bash: ./musesdk-3.4.1-linux-installer.run: cannot execute binary file: Exec format error  > sudo ./musesdk-3.4.1-linux-installer.run ./musesdk-3.4.1-linux-installer.run: 1: ./musesdk-3.4.1-linux-installer.run: Syntax error: "(" unexpected   Am I missing a 32-bit compatibility library? I've installed quite a few already in several blind attempts to fix this.  EDIT: Here's the output from ldd and uname  > ldd ./musesdk-3.4.1-linux-installer.run not a dynamic executable  > uname -a Linux DESKTOP-H99QRQN 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

I installed Ubuntu 14.04 and the current Android development SDK, which contains 32-bit executables. I found that I cannot run those 32-bit binaries. Trying to start them from bash gives me an error: $ ./adb bash: ./adb: No such file or directory  It is there though: $ ls -al ./adb -rwxrwxrwx 1 thomas thomas 1231255 Jan 17 13:31 ./adb $ file ./adb ./adb: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped.   Same symptom for all the other 32-bit tools in the Android SDK. In olden days one could just install 32-bit libraries on 64-bit Ubuntu to get 32-bit support, but that does not seem to work anymore. How do I run 32-bit apps on a 64-bit Ubuntu distribution?


Can someone explain the superposition theorem step by step when applied with phasors (AC circuits)?  I think books and websites mostly include examples of how to solve something with superposition but not enough detailed theory.

Yes, this is a pedagogical question. While answering another recent question, I wanted to refer the OP to concise instructions for using superposition to solve circuits. I found that all the easily found resources online were somewhat deficient. Typically they were unclear about what kinds of circuits superposition applies to, or about the actual method to apply the superposition theorem to a circuit problem. So,   What kinds of circuits can be solved by superposition?  How are different kinds of sources treated when solving by superposition?  What are the steps to solve a circuit using the superposition theorem?


I've written a bit of code below. I wanted to know two things.   1. Does my code have any vulnerabilities?   2. Do I need to use mysqli_real_escape_string with prepared statements? Would it act as an extra layer of security or is it redundant?   Code Used:     if ($_SERVER['REQUEST_METHOD'] == 'POST')  { $admin_type = mysqli_real_escape_string($conn, $_POST['admin_type']); $position = mysqli_real_escape_string($conn, $_POST['position']); $first_name = mysqli_real_escape_string($conn, $_POST['first_name']); $last_name = mysqli_real_escape_string($conn, $_POST['last_name']); $user_name = mysqli_real_escape_string($conn, $_POST['user_name']); $email = mysqli_real_escape_string($conn, $_POST['email']); $phone_number = mysqli_real_escape_string($conn, $_POST['phone_number']); $passwd = mysqli_real_escape_string($conn, $_POST['passwd']); $created_at = mysqli_real_escape_string($conn, $_POST['created_at']); $about = mysqli_real_escape_string($conn, $_POST['about']);  $sql = "INSERT INTO admin_accounts (admin_type, position, first_name, last_name, user_name, email, phone_number, passwd, about) VALUES (?,?,?,?,?,?,?,?,?);";  $stmt = mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt, $sql)) {     echo "SQL Error"; } else {     mysqli_stmt_bind_param($stmt, "sssssssss", $admin_type, $position, $first_name, $last_name, $user_name, $email, $phone_number, $passwd, $about);     mysqli_stmt_execute($stmt);   {      $_SESSION['success'] = "Admin user added successfully!";      header('location: admin_users');      exit();     }      }      }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am having a problem trying to install the guest additions for my ubuntu 18.04 and virtualbox 5.2.12  I thought I did something wrong so I tried to install the additions from the CLI, unistalled and installed dkms... I even deleted the virtual machine and installed ubuntu again and it has the same error.  Can anyone help please as I did not find an updated solution to my problem.  Here is the message i get when trying to install the addons:  Verifying archive integrity... All good. Uncompressing VirtualBox 5.2.12 Guest Additions for Linux........ VirtualBox Guest Additions installer Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This system is currently not set up to build kernel modules. Please install the gcc make perl packages from your distribution. VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted VirtualBox Guest Additions: Starting. Press Return to close this window...

I've recently installed Ubuntu on Oracle's Virtualbox.  Now I want to install the guest additions.  I started up my Ubuntu guest OS, clicked "Devices" and chose "Install Guest Additions". Nothing happened, and I don't see the CD icon on my desktop.  How can I make this work?


I am trying to grasp the concept of closure function in javascript. Below is a simple code.Need to pass an argument of "inside" to the innerFunction. how do i do it.      function outerFunction(outerVariable){          function innerFunction(innerVariable){                   console.log("Outer Variable" +" = "+ outerVariable);                   console.log("Inner Variable" +" = "+ innerVariable);         }         return innerFunction;       };       const newOutFunction = outerFunction("outside");       newOutFunction();

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I have 2 buttons    $(".button1").on("click", function(event){  $(".button2").on("click", function(event){   What I would like to do is start with button1 as clicked and have no event listener, when button2 is clicked the event listener is removed and the event listener for button 1 is activated.   This is a fairly common technique is in actionscript 3 with the method removeEventListener() and would like to use a similar method or technique in jquery.

I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data.  My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail.  $('#myimage').click(function { return false; });


I can't understand why this is true, Intuitively, I thought that it should be the rows of A span all $\mathbb{R}^m$ , so they don't become zeros while row deducting. Can someone help me understand this? Thanks

I am having trouble understanding the following theorem given in my textbook:  Let $A$ be an $ m \times n $ coefficient matrix. Then the following statements are logically equivalent (That is, for a particular $A$, either they are all true or all false statements.) a) For each b in $\mathbb{R}^{m}$, the equation $A$ x = b has a solution. b) Each b in $\mathbb{R}^{m}$ is a linear combination of the columns of $A$.  c) The columns of $A$ span $\mathbb{R}^{m}$.  d) $A$ has a pivot position in every row.  I understand that a, b, c are restatements of each other. I would like some intuition on why statement d and the others (particularly c) are logically equivalent.


I’m writing a dissertation on network security. I’m unsure which of the following to use:   ...89.9%, which is 57 million users.  ...89.9%, which are 57 million users.   Technically it should be are because it refers to a plural amount of people, but it doesn’t sound right to me considering that 57 million is in a sense one group.

Usage of "%"  I'm almost positive it's a prepositional phrase since it's really means "per cent" or "per 100".  So in a sentence like:     90% of my street are doing lawn work.   It would be "are" and not "is" because both "%" and "of my street" are prepositional phrases and therefore cannot contain the subject.  Am I right?


I have a shell script ren.sh  #!/bin/bash /usr/bin/mv /home/imp/imp/msgs/$1.PK1 /home/imp/imp/msgs/$1.BRD /usr/bin/mv /home/imp/imp/msgs/$1.PK2 /home/imp/imp/msgs/$1.MIX   It works fine, but it only moves 2 files at a time (*.PK2 and *.PK1). I'd like for it to move all existing *.PK1 and *.PK2 files to *.MIXand *.BRD files  Is this possible?

I would like to change a file extension from *.txt to *.text. I tried using the basename command, but I'm having trouble on changing more than one file.  Here's my code:  files=`ls -1 *.txt`  for x in $files do     mv $x "`basename $files .txt`.text" done   I'm getting this error:  basename: too many arguments Try basename --help' for more information


I tried the following commands: sudo apt-add-repository ppa:fingerprint/fingerprint-gui && sudo apt-get update  sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui  but I got the following error: E: Unable to locate package policykit-1-fingerprint-gui E: Unable to locate package fingerprint-gui  Please help quickly to get rid of it and work with my fingerprint sensor — Synaptics VFS7552.

I tried the following but no use: sudo add-apt-repository ppa:fingerprint/fingerprint-gui sudo apt update sudo apt install libbsapi policykit-1-fingerprint-gui fingerprint-gui  I got this error: E: Unable to locate package policykit-1-fingerprint-gui E: Unable to locate package fingerprint-gui


I got a Ubuntu 12.04 key. It corrupted after a sudden power cut and I was not able to open my desktop session. I then tried using an Ubuntu live CD but it was not able to mount my drive.     I tried some commands which were suggested by my friends like fsck etc. There was a bad super block on my drive but it was all in vain. I suddenly deleted my partition by mistake. I did not understand partitioning.   I gave it to a professional for repair and thanks to that Windows 8 Pro is installed on my device by making new partitions. Can I still retrieve my data?

I have a 230 Gigs HDD on my laptop, i have 50 gigs extended for my linux, i have 80 gigs empty ntfs partition, and 100 gigs ntfs partition where i store all my important data, (i have about 50 gigs of important things) today i mounted the 100 gigs partition took something from it, unmounted it back, and then when i mounted it again it was EMPTY !!! all the data is gone !!!! i used to mount it via the terminal : sudo mount ntfs /dev/sda5 /media/E where E is a dir that i make (when i make it i change the permissions of media to 777 then after creating the dir, i change it back to normal)  Guys you cant imagine how much this data is important to me, Plz HelP,  thnx in advance


In Your Lie in April, what does Kousei mean by not being able to hear the piano? I play the piano and the more I play, I tend to just look at my hands while it's moving and I can't hear anything except for the noise in the background. It's like the sound is fading away as I play longer. Sometimes I have to focus real hard just to make out the sound of the piano. Is this what Kousei means?

In the beginning, there were several times when Kousei was playing the piano, and he suddenly felt that he was at the bottom of the ocean and couldn't hear what he was playing. Why did that happen, and was he able to hear himself play at the end?


I"m using Oreo on a Nexus 6p, and read online a lot. Is there any way without rooting that a web browser can scroll or page with the volume buttons?

So there is probably one feature I miss sincerely and that is being able to hit the title bar on the iPhone to essentially trigger the "Home key."  Is there a way to assign this to one of the volume switchers or maybe add a fourth button to the bar at the bottom or even double tap the home button maybe.  I use it a lot and want it to be easily accessible.    .


I want to prove that $\mathbb{R}[X]/(ax^2 + bx +c) \cong \mathbb{C}$ if $b^2 - 4ac < 0$. I belief I have all of the components needed for this exercise:   Knowing the first isomorphic theorem $(2ax + b)^2 = b^2 - 4ac$ $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$   But I just don't see what the bigger picture is

Let $f = aX^2 + bX + c \in \mathbb{R}[X]$. I want to show that:   $\mathbb{R}[X]/(f) \cong \mathbb{C}$ if $b^2 - 4ac < 0$,  $\mathbb{R}[X]/(f) \cong \mathbb{R}[\epsilon]$ if $b^2 - 4ac = 0$,  $\mathbb{R}[X]/(f) \cong \mathbb{R} \times \mathbb{R}$ if $b^2 - 4ac > 0$.  My idea so far is to prove that in the first case, $(f) = (X^2 + 1)$, in the second case $(f) = (X^2)$ , in the third case $(f) = (X^2 - 1)$, which would lead to the desired result. However, I don't know how to prove this or if I'm on the correct road at all. Does anyone have any ideas?


I need to render an image in Visualforce as pdf. When I load the page without the renderAs="pdf" the image loads  But the same image doesn't render in pdf except for a small box.  Visualforce page to render the image:  <apex:page standardController="Case" extensions="CasePDFContentGenerator" standardStylesheets="false" applyHtmlTag="false" showHeader="false" applyBodyTag="false" action="{!updatePrintFlag}" renderAs="pdf">  <body>     <c:PDFContentGenerator conObj="{!printInstance}"></c:PDFContentGenerator> </body>     VF component  <apex:component> <apex:attribute type="CasePDFContentGenerator" name="conObj" description="con object instance"/> <apex:repeat id="caseDetails" value="{!conObj.caseList}" var="case">     <div style="page-break-after: always;" id="map">         <!--THIS IS WHERE I PASS THE ID to the component safedropimagecomponent-->    <c:imagecomponent dropid="6cb39aba-65d1-4aad-817d-b51c2118e6b4"></c:imagecomponent>     </div> </apex:repeat>     Please find my jquery script in the imagecomponent , which I am using to handle the id passed from VF component.  <script type="text/javascript">     jQuery(function($) {         var dropId = '574cae51-184b-4257-af2b-7cd6a55fc7e4';//Hard-coded for testing purpose             var text = "";              if(dropId != '') {                  ImageComponentController.getArticleImage(                     dropId,                     function(result, event) {                         if(event.type === 'exception') {                             setSafeDropResponse('ERROR: ' + event.statusCode + ': ' + JSON.stringify(event));                          } else if (event.status) {                             if(result.isError == true) {                                 setSafeDropResponse(result.errorMessage);                              } else {                                 setSafeDropResponse($('<img/>').prop('src', 'data:image/jpeg;base64,' + result.imageBody));                              }                         } else {                             console.log('ERROR:', event);                         }                      }                 );             } else {                 setSafeDropResponse('No guidId Set');             }         //});     }); </script> <script type="text/javascript">     function setSafeDropResponse($response) {         var $wrapper;         if(typeof $response === 'string') {             $wrapper = jQuery('<div />').text($response);         } else {             $wrapper = $response;         }         console.log('test' + JSON.stringify($wrapper));         jQuery('#wrapper-image').empty().append($wrapper);     } </script>   I am assuming, I need to handle this portion differently, but cannot think of what? Please advise.  else {setSafeDropResponse($('<img/>').**prop('src', 'data:image/jpeg;base64,' + result.imageBody));**}

I am working on a visualforce page and have used javascript to add a row dynamically. All are coming in the pdf except that javascript column.  Below is the javascript sippet that is not loading:  <apex:page controller="Controller" renderAs="pdf">    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">          <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>         <!--SLDS STYLESHEET STATIC RESOURCE-->             <apex:slds />                 <body>


How can I set my mouse cursor to be black on Ubuntu 14.04?

How can I change X11 cursor and theme in the newest Ubuntu? I can't find it. Please help.


It shows up perfectly in the preview but doesn't show up on my wall. Here's my node setup:

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


As noted in  (similar, but not duplicate), Obi-Wan did know that Anakin was not dead, and that he was, in fact, Darth Vader. In , it is clear that the fact that Anakin was Darth Vader was not common knowledge at all.  So when how did Obi-Wan know Anakin had become Darth Vader? I don't recall reading any EU novels with any interaction between them.  Did he know at the time of their duel on Mustafar that Anakin was called 'Darth Vader'? If so, then he simply would have heard about Vader in other events and this is a dumb question

Obi-Wan left Anakin for dead, and one movie later (in A New Hope) he was saying Anakin had been killed by Darth Vader.  What exactly did Obi-Wan know about Anakin and Darth Vader before A New Hope started?


We normally think of the "default" or "root" state of things as being on the positive side of the spectrum.  For example, we don't normally use a + symbol to indicate the sign of positive numbers, whereas negative numbers are invariably preceded with - to indicate their negative sign.  Similarly, positive temperatures (in °C or in F) are those that we tend to encounter more typically.  Why, then, do we define the basic unit of electricity as something with a negative charge?

I recently came to know about the Conventional Current vs. Electron Flow issue. Doing some search I found that the reason for this is that Benjamin Franklin made a mistake when naming positive and negative charges. There is even this little comic about that   My question is, how can a naming convention be wrong? Perhaps I don't understand what is the actual mistake here, I don't know. But I don't see how a naming convention could be wrong or right. There is no right and wrong about that. It could've been any other name, like charge A and charge B.  I'll appreciate anyone can help me understand what is wrong in all this.


Say I have some virtual machines in a private network inside VMware Workstation, and they're all running Windows 7. I want to enable promiscuous mode on one of these machine's virtual adapter but there's no instructions out there!  There's clear and easy instructions on how to do it on VMware ESXi:   But no instructions on how to do it on VMware Workstation are anywhere to be found.

I'm having difficulties configuring  in VMware Workstation 12 hosted on Windows 10 serving two Linux guests.  For instance, this is what I'm trying to configure in VMware Workstation:     VM 1 – transmitting recorded traffic on a designated private network VM 2 – receiving the incoming traffic from VM 1, connected to the same private network   Assuming both Linux guests are configured properly for Promiscuous Mode, how should I configure the network in VMware Workstation to support that?    While it's pretty straight-forward to configure Promiscuous Mode on ESXi, I couldn't find the matching setting in VMware Workstation.   - ESXi screenshot for instance


I recently installed Ubuntu 18.04.1 LTS from Windows 10. After installation system is not detecting any Wifi it says no adapters available. But when connected through LAN cable the internet works.  I tried couple of things but nothing helped.   rfkill list all 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no    lshw -c network WARNING: you should run this program as super-user.   *-network                         description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:01:00.0        logical name: enp1s0        version: 05        serial: b8:ca:3a:c3:5e:d2        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.0.9 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:16 ioport:2000(size=256) memory:c0404000-c0404fff memory:c0400000-c0403fff   *-network        description: Network controller        product: BCM43142 802.11b/g/n        vendor: Broadcom Limited        physical id: 0        bus info: pci@0000:02:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: bus_master cap_list        configuration: driver=bcma-pci-bridge latency=0        resources: irq:17 memory:c0500000-c0507fff WARNING: output may be incomplete or inaccurate, you should run this program as super-user.   Please help!

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.