I am trying to create an environment that wraps another one, lstlisting here.  \documentclass[12pt, dvipsnames]{report} \usepackage[english,french]{babel} \usepackage{listings}  \newenvironment{code}[1]{\begin{lstlisting}#1}{\end{lstlisting}}  \begin{document}  \begin{code} some code \end{code}  \end{document}   When I compile this code with texmaker, there is an "Emergency Stop", because "no legal \end" was found. I guess that the parser gets stuck in an infinite loop.  How to fix this code?  EDIT: replacing newenvironment by lstnewenvironment leads to the error "Extra }, or forgotten \endgroup" at the line \end{code}:  \documentclass[12pt, dvipsnames]{report} \usepackage[english,french]{babel} \usepackage{listings}  \lstnewenvironment{code}[1]{\begin{lstlisting}#1}{\end{lstlisting}}  \begin{document}  \begin{code} some code \end{code}  \end{document}

I am trying to define an enviroment for a specific programming language, F#. Here's my code:  \definecolor{bluekeywords}{rgb}{0.13,0.13,1} \definecolor{greencomments}{rgb}{0,0.5,0} \definecolor{turqusnumbers}{rgb}{0.17,0.57,0.69} \definecolor{redstrings}{rgb}{0.5,0,0}  \lstdefinelanguage{FSharp}     {morekeywords={let, new, match, with, rec, open, module, namespace, type, of, member, and, for, in, do, begin, end, fun, function, try, mutable, if, then, else},     keywordstyle=\color{bluekeywords},     sensitive=false,     morecomment=[l][\color{greencomments}]{///},     morecomment=[l][\color{greencomments}]{//},     morecomment=[s][\color{greencomments}]{{(*}{*)}},     morestring=[b]",     stringstyle=\color{redstrings}     }  \newenvironment{fslisting}   {     \lstset{         language=FSharp,         basicstyle=\ttfamily,         breaklines=true,         columns=fullflexible}     \begin{lstlisting}   }   {     \end{lstlisting}   }   Then I'm trying to use it as such:  \begin{fslisting} type 'a Process = 'a Signal IObservable \end{fslisting}   But it doesn't work. The output log says that the listing is not terminated - or is terminated by the document. So the rest of the document is also formatted as a listing, which is of course not the intention.  What am I doing wrong here?


Does the domain of the function $y=\sqrt[3]{x^3+1}$ include $x<-1$? If yes, why is Mathematica and Wolfram Alpha not plotting that part of the function?

Excuse my lack of knowledge and expertise in math,but to me it would came naturally that the cubic root of $-8$ would be $-2$ since $(-2)^3 = -8$.  But when I checked Wolfram Alpha for , real it tells me it doesn't exist.  I came to trust Wolfram Alpha so I thought I'd ask you guys, to explain the sense of that to me.


I created an IBM Quantum account but I am unable to login and I get this message - Your IBM Quantum account has been disabled. What should I do to get this resolved?

As shown in the picture above, my IBMQ account is unavailable, and I found that my friend's account is also unavailable, but I have not received any email or message notification. what happened?


I have already encrypted my hard drive and while installing Ubuntu 17.10 on my Lenovo Ideapad. Now I wish to create a new partition on it but Gparted is not allowing me to do so. Is there any way to create a new partition without reinstalling the OS.

I've installed Ubuntu 13.10 and formatted my whole HDD ,and i chose to encrypt the disk and it automatically chose the LVM option (and put it as a logical partition) now after Ubuntu installed i tried to repartition the disk thru Live CD put GPartition gave me it's an encrypted partition and it can't be resized , i want to put the system's files and the home folder on partition and my private files on another one  Any help please ?


$(-1)^{1/3} = ((-1)^2)^{2/6} = 1^{2/6} = 1$  but the actual answer is (-1)  what is wrong with the first approach?

I know there is something wrong with this but I don't know where. It's some kind of a math fallacy and it is driving me crazy. Here it is: $$-1= (-1)^3 = (-1)^{6/2} = \sqrt{(-1)^6}= 1?$$


I am trying to describe conditions falling below a lower limit. In this case there is a minimum temperature limit, and the actual temperature has fallen below this limit. I am drawn to use the work exceed, but I feel this implies the value is greater than the limit.  For Example, what is an alternative to exceeds in this sentence:  "The temperature exceeds the minimum temperature."

Exceed is commonly used, but when I found myself wanting to use the opposite I couldn't really find a single word that would do it.   fall short of and inadequate are a little off. How about deceed?


For the circuit given below the voltage across the resistor is definitely 5V. If we add more than two sources the voltage will remain same as before.   If we try to analyze the circuit with superposition then first we have to make one of the source inactive. If we make one voltage source inactive then we can find the voltage 0V.  After that we have to make inactive the another source. At that time the voltage remains 0V.   So if we add the two voltages according to superposition theorem the voltage across the load is 0V. How???

I have a simple circuit consisting of 2 ideal voltages sources (each 5V) parallel to a resistor of 5 ohms. The current along the resistor is 1A, right? But by applying the superposition principle (i.e. considering individual sources), I am not getting this result. Am I doing some blunder?


There are 26 people lettered A to Z each has randomly been allocated a random unique integer from 1 to 26. There are 26 seats numbered 1 to 26.   The people enter in alphabetical order and sit on their corresponding seat if possible.  The first 4 people forgot their numbers and just sat in a random seat. All the people after the initial 4 remember their number but if their seat is taken they randomly sit in a seat available.  What is the probability that Z sits in his allocated seat?    Obviously Z sits in correct seat if A to D randomly sat in the 4 seats allocated to them which is; $$\frac{2}{13}\times\frac{3}{25}\times\frac{1}{12}\times\frac{1}{23}=\frac{1}{14950}$$  My issue from here is how do I calculate the probability that Z sits in correct seat if one of the initial 4 people doesn't sit in their allocated seats?

This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


I have SSMS 2018 installed on Win10 and it keeps on refusing to start. I click the icon, I hear a windows audible error but no error message shows. I had the same issue before so I uninstalled and reinstalled SSMS. The problem is resolved for maybe a day (or possibly a few restarts) but then reappears. I had enterprise and developer edition of SQL server installed so uninstalled enterprise as do not need it.  I stumbled across one nugget of information. If I do a net start mssqlserver from the cmd prompt I see "system error 5 has occurred Access is denied."  All the MSSQL services seem to log on as Local System - I had read that the wrong user here could cause the issue

I just installed SSMS 18 GA on a computer with only VS2019 installed, and when I try to open SSMS the splash screen will come up, but then the process exits.    Running ssms with the -log parameter reveals an error message:     CreateInstance failed for package [Task Scheduler Package]Source:   'mscorlib' Description: Could not load file or assembly   'Microsoft.VisualStudio.Shell.Interop.8.0, Version=15.0.0.0,   Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its   dependencies. The located assembly's manifest definition does not   match the assembly reference. (Exception from HRESULT: 0x80131040)   System.IO.FileLoadException: Could not load file or assembly   'Microsoft.VisualStudio.Shell.Interop.8.0, Version=15.0.0.0,   Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its   dependencies. The located assembly's manifest definition does not   match the assembly reference. (Exception from HRESULT: 0x80131040)   File name: 'Microsoft.VisualStudio.Shell.Interop.8.0,   Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'   ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0,   Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its   dependencies. The located assembly's manifest definition does not   match the assembly reference. (Exception from HRESULT: 0x80131040)   File name: 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0,   Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'      WRN: Assembly binding logging is turned OFF. To enable assembly bind   failure logging, set the registry value   [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There   is some performance penalty associated with assembly bind failure   logging. To turn this feature off, remove the registry value   [HKLM\Software\Microsoft\Fusion!EnableLog].      at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly   assembly, String name, Boolean throwOnError, Boolean ignoreCase,   ObjectHandleOnStack type)    at   System.Reflection.RuntimeAssembly.GetType(String name, Boolean   throwOnError, Boolean ignoreCase)    at   System.Activator.CreateInstance(String assemblyString, String   typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder,   Object[] args, CultureInfo culture, Object[] activationAttributes,   Evidence securityInfo, StackCrawlMark& stackMark)    at   System.Activator.CreateInstance(String assemblyName, String typeName)    at System.AppDomain.CreateInstance(String assemblyName, String   typeName)      System.IO.FileLoadException: Could not load file or assembly   'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0,   Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its   dependencies. The located assembly's manifest definition does not   match the assembly reference. (Exception from HRESULT: 0x80131040)   File name: 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0,   Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'      WRN: Assembly binding logging is turned OFF. To enable assembly bind   failure logging, set the registry value   [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There   is some performance penalty associated with assembly bind failure   logging. To turn this feature off, remove the registry value   [HKLM\Software\Microsoft\Fusion!EnableLog].   I tried running "Repair" on SSMS, and tried a repair of C:\ProgramData\Package Cache\{AAA9F15B-AF45-4562-9991-93A848D3A902}v15.0.28307.421\redist\vs2017_isoshell_for_ssms.msi, but the problem persists.


This is PDE Evans, 2nd edition: Chapter 8, Exercise 2:     Find $L=L(p,z,x)$ so that the PDE $$-\Delta u + D\phi \cdot Du = f \quad \text{in }U$$ is the Euler-Lagrange equation corresponding to the functional $I[w] := \int_U L(Dw,w,x) \, dx$.      (Hint: Look for a Lagrangian with an exponential term.)   First, one must note that $U \subset \mathbb{R}^n$ and $L(p,z,x)=L(Du,u,x)$, where $Du=\nabla u =\sum_{i=1}^n u_{x_i}$.   One should also note that the Euler-Lagrange equation associated with the energy functional $I[w]:=\int_U L(Dw(x),w(x),x) \, dx$ is $$-\sum_{i=1}^n (L_{p_i}(Du,u,x))_{x_i}+L_z(Du,u,x) = 0 \quad \text{in }U.$$  Here is my work so far:  I set $(L_{p_i})_{x_i}:= (p_i)_{x_i}-\phi_{x_i} p_i$ and $L_z:=-f(x)$ so that the LHS of the Euler Lagrange PDE is  \begin{align} 0 &=-\sum_{i=1}^n (L_{p_i}(Du,u,x))_{x_i}+L_z(Du,u,x) \\ &=-\sum_{i=1}^n\left[(p_i)_{x_i} - \phi_{x_i} p_i \right] - f(x) \\ &= -\sum_{i=1}^n \left[u_{x_ ix_i} - \phi_{x_i} u_{x_i} \right] - f(x) \\ &= -\sum_{i=1}^n u_{x_ ix_i} + \sum_{i=1}^n  \phi_{x_i} u_{x_i} - f(x) \\ &= -\Delta u + D\phi \cdot Du - f(x). \end{align} This gives us the PDE $-\Delta u + D\phi \cdot Du = f$ as written in Exercise 2.  Now, how can I write $L(p,z,x)$? I was thinking $$L(p,z,x)=\frac 12|p|^2 - \qquad \qquad - zf(x),$$ so that, upon taking the derivative with respect to $p_i$ or with respect to $z$, we would obtain both the $L_{p_i}$ and $L_z$ that I have, respectively. However, I have trouble writing the middle term, which is why I left a blank space. The textbook author did say "look for a Lagrangian with an exponential term".

Find $L=L(p,z,x)$ so that the PDE:      $-\Delta u +D\varphi \cdot Du =f $   is the Euler-Lagrange equation corresponding to the functional $I[w]:=\int_UL(Dw,w,x)dx$.  (Hint,:Look for a Lagrangian with an exponential term),  We can easily to calculate an equation's Euler-Lagrange  equation, while the inverse calculation I feel hard for me ,and I still don't know how to use the Hint! Thanks a lot!


What is a word that could define someone who's good at showing superficial kindness and friendliness towards others but speaks ill of them or gossips about them behind their back ?

What do you call someone who pretends to be your friend but is actually your enemy?  A friend suggested spy for me, but that does not nearly describe the word I need for an English project. The character is very good at manipulating how people see him. He's a good liar. And pretends to be your friend but actually is your enemy.


i just don't understand why I have a nullpointerexception with this:  public class MainActivity extends AppCompatActivity {  private EditText field;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      EditText field = (EditText) findViewById(R.id.field);     Button plus = (Button) findViewById(R.id.plus);     Button moins = (Button) findViewById(R.id.moins);     Button ctof = (Button) findViewById(R.id.ctof);      plus.setOnClickListener(buttonclick);     moins.setOnClickListener(buttonclick);     ctof.setOnClickListener(buttonclick);  }   private View.OnClickListener buttonclick = new View.OnClickListener() {     @Override     public void onClick(View view) {         switch(view.getId()){             case R.id.plus:                 //TODO                 Toast.makeText(MainActivity.this, field.getText().toString(), Toast.LENGTH_LONG).show();                 break;         }     } };   }   I don't understand my mistake, it's simple and I don't know where is the issue. I can't get my field and print the result.

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?


$T(n) =$ if $n=1$, then time execution is $1$, if $n \geq 2$ then $2T(n-1)+n$  The options are:   $T(n) = 2^{n+1} - n - 2$ $T(n) = O(n2^n)$ $T(n) = \Omega(n)$ $T(n) = \theta(2^n)$   Thanks.

Solve the recurrence  $T(n) = 2T(n-1) + n$ where $T(1) = 1$ and $n\ge 2$.  The final answer is $2^{n+1}-n-2$  Can anyone arrive at the solution?


For the first time, I'm creating a document which really needs a long bibliography, i.e. requires the biblatex package or similar. I've read some questions and answers here, and I think I pretty much replicated a common structure of the .tex file. Here's what I have:  \documentclass{article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{csquotes} \usepackage[backend=biber,citestyle=authoryear,style=authoryear]{biblatex} \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @book{bueno,   title={Vísceras da memória: uma leitura da obra de Pedro Nava},   author={Bueno, Antônio Sérgio},   volume={15},   year={1997},   publisher={Editora Ufmg}, } @article{castro,   title={Além de Braverman, depois de Burawoy: vertentes analíticas na sociologia do trabalho},   author={Castro, Nadya Araújo e Guimarães, Antônio Sérgio Alfredo},   journal={Revista Brasileira de Ciências Sociais},   volume={6},   number={17},   year={1991}, } @book{souza,   title={Multiculturalismo e racismo: uma comparação Brasil-Estados Unidos},   author={Souza, Jessé e Sant'Anna, Alayde}, year={1997},   publisher={Paralelo 15}, } \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document} \tableofcontents  \section{Introdução} Aqui vamos falar de algumas obras, nomeadamente \cite{bueno} e \cite{souza}. Talvez falemos também de \cite{castro}.  \printbibliography \end{document}   (I use TeXstudio 2.6.6 with pdfLaTeX.)  The pdf output shows the citation texts just like their labels, only on bold (e.g., my second citation prints as "souza"), and it lacks the bibliography. The log file gives me this:  LaTeX Warning: Citation 'bueno' on page 1 undefined on input line 39. LaTeX Warning: Citation 'souza' on page 1 undefined on input line 39. LaTeX Warning: Citation 'castro' on page 1 undefined on input line 39. LaTeX Warning: Empty bibliography on input line 41.   I also get a very strange ! Paragraph ended before \DeclareBibliographyStrings was complete.  I suspect there might be a problem with the configurations of TeXstudio, although I have read the accepted answer on  and followed the steps therein.  So my (pretty dumb) question is: What am I doing wrong?

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


Let $A$ be an integral domain, $a$ and $b \in A-\{0\}$, and let $B = A[X]/(aX+b)$. Show that, if $Aa \cap Ab=Aab$, then $B$ is an integral domain.   My attempt at proof (following a hint). Denote by $K$ the field of fractions of $A$. Let $\phi: A[X] \to K$, with $\phi(X)=-b/a$ and $\phi(y)=y, y \in A$.  Then $\phi(aX+b)=-b+b=0$. If $p(X) \in A[X]$ and $p(X) \not \in (aX+b)$, then $p(X)=q(X)(aX+b)+r$, $r \in A$. Therefore, $\phi(p(X))=\phi(r)=r$, so $p(X) \in \ker(\phi) \iff r=0 \iff p(X) \in (aX+b)$.   Hence $\ker(\phi)=(aX+b)$; by the first isomorphism theorem, $A[X]/(aX+b)$ must be isomorphic to Im$(\phi)$. In conclusion $B$ is isomorphic to a subfield of $K$, so it's an integral domain.  The problem is, I don't know where I used the condition $Aa \cap Ab=Aab$. Am I doing something wrong?

This is the exercise mentioned above:     Let $a,b$ be regular sequence over a domain $R$. Prove that $ax-b$ is a prime of $R[x]$.   Thank you for your answer!


I have custom fields in my customer profiles (so I don't use the dynamic addressfield) like name, streetname, number, postalcode and country. Now I would like to create 3 different shipping services with conditions based on different countries.  For example:  Shipping 1 = Netherlands, Shipping 2 = Germany, Shipping 3 = Belgium.  In my customer profiles I have a custom field called 'country' which have the values Netherlands, Germany and Belgium in a select list.  When setting a condition for the selected shipping service I am unable to select the correct data selector (order address component comparison doesn't work, cause that only works with the dynamic addressfield). I tried using 'entity has field' but that doesn't seem to work either (or I used the wrong settings?).  Any suggestions?

I have a term reference field in product called "Weight" with values "Light", "Medium" & "heavy". I am using flat rate shipping service and trying to check the value of "Weight" field in Calculation rules.I know that I need to expose it by using "entity has field" but I end up having  commerce-line-item:order:commerce-line-items:0 commerce-line-item:order:commerce-line-items:1 commerce-line-item:order:commerce-line-items:2 commerce-line-item:order:commerce-line-items:3 commerce-line-item:order:commerce-line-items:0... commerce-line-item:order:commerce-line-items:1... commerce-line-item:order:commerce-line-items:2... commerce-line-item:order:commerce-line-items:3...    I was able to get to the weight field by using any of them and then did a Data Comparison  commerce-line-item:order:commerce-line-items:0:commerce-product:field-product-weight   this condition worked ok first time but not after that. can anyone please help me on this or if you think of another solution please let me know. Thanks


Let $r < R$, where $r$ is the distance to a point from the center of the sphere where we want to find electric field and $R$ is the radius of the sphere.  Why can we use $\oint_S \mathbf{E}\cdot\text d\mathbf{s}=q_{in}/\epsilon_0$ ($S$ is the surface of a Gaussian surface) when there are charges outside of the Gaussian surface? Aren't charges outside of the Gaussian surface affecting the electric field?

In MIT's 8.02 course, it is shown in lecture 3 that we can derive Gauss's Law from Coulomb's to get  $ \phi = \oint \vec{E} \cdot \vec{dA} = \frac{Q_{enc}}{\epsilon_{0}} $  However, in the lecture, it was assumed that there were no charges outside the surface. Later, Gauss's Law was used and the charges outside the sphere were ignored.  I've been thinking about it and came across .  The first answer by user levitopher helped a bit. I think that the lecture's argument still holds when there are charges outside because $ \vec{E} $ is added vectorially.  Suppose we have $ Q_{enc} $ in a sphere and $ Q_{out} $ outside the sphere. Then,  By definition, $ \phi = \oint (\vec{E_{Q_{enc}}} + \vec{E_{Q_{out}}}) \cdot \vec{dA} $ $ = \oint \vec{E_{Q_{enc}}} \cdot \vec{dA} + \oint \vec{E_{Q_{out}}} \cdot \vec{dA}$ $ = \oint \vec{E_{Q_{enc}}} \cdot \vec{dA} + 0 $ $ = \frac{Q_{enc}}{\epsilon_{0}} $  This assumes that $ \oint \vec{E_{Q_{out}}} \cdot \vec{dA} = 0 $ because any field lines that go in must come out (hand wavy but I'm just going to accept it for now).  I'd just like to know if this argument is sound.


Here is how my calculator should work:  There is a JSON value where I can write the first multiplier - something like this:  {     "value1": 1.4 }   On the calculator I can write the second multiplier - only 10^n numbers (10, 100, ..., 10000000). And my calc should return me an integer, as I know that always people who use my calc with write less numbers after the decimal point for the first multiplier than we have 0s on the calc for the second multiplier. Yes, my calc is a very-very strange one.  Here are valid inputs:  v1=1.4; v2=100; v1=1.414; v2=100000; v1=1.1; v2=100;   What happens when I do this, for example for value1=1.4 and value2=10000 I get 13900. As far as float cannot hold any number sometimes it stores different numbers. For 1.4 internally it stores 1.399999 on my machine. I know why, but you know the QA engineer who tests my app tells me that I need to get 14000. Your calc does not work. How to make my calc so that I will print correct number?   P.S. Of course I have cut out my real problem from the context but the thing is that I have a float in a file and a 10^n number in my program as a user input. How to get correct result?  EDIT1: I don't ask why float works that way. I know why. I ask how to solve the problem even when float works that way.  EDIT2: I use RapidJson to read the JSON file which already returns me  wrong number as a double precision number. I can't use libraries that provide with higher precision floating points.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


The method response.sendRedirect() is not working in my program. it is redirecting to next Page. I also tried  response.sendRedirect("home.jsp"); return ;   But still it doesnot work  Directory image has been attached    protected void doGet(HttpServletRequest request, HttpServletResponse response)         throws ServletException, IOException {      String userAction = request.getParameter("action");       response.sendRedirect("Test1.jsp");  }   While in debuging the controller move on response.sendRedirect but it is not redirecting to other page.

How can I redirect the user from one page to another using jQuery or pure JavaScript?


Say I want to know the serial number of Joe Biden as the president of the USA. How can I ask this to another person? What would be the interrogative form of the following sentence:  Joe Biden is the [46th president] of the USA.  ?

How to ask the position(?) of a president (like 10th) of a country, correctly?


I have to apply two different materials on the two different sides of a face. I know how to use double sided materials (with two different pricipled bsdf shaders and a geometry node connected to a mix node), but in this case I will have a single material behaving differently on the 2 sides. I need 2 different materials on the two sides of the face to import the model in substance painter. Is there any chance to apply the two different materials on the two sides or the only chance is to produce a double sided single material?

How could a one-sided material be achieved with the Cycles renderer?  I would like to create a plane that is completely transparent from one side, and a mirror from the other side.  It would be cool if Cycles/Blender simple supported backface culling like the game engine. But I guess it doesn't?  How could something like that done with nodes?


I'm working on logo design in adobe illustrator. It's typography with border and I have problem. When I export it do png or jpg in small size it looks blurry and overall bad. I'm working on pixel preview in illustrator with all options like Align to pixel grid etc. The simple parts are fixed but i have no idea how to fix all the curves in letters like S, A, E, O ect. Example bellow. Fixed areas after export looks sharply and clean.  Is there any way to create logo from regular font that will look good in small png files?

This has been puzzling me for a few days now, and I asked a graphic designer I knew before trying here and haven't been able to solve it yet. It's quite weird so please bear with me for a bit.  I am using Adobe Illustrator to create a logo, and I have something that can potentially work. I have used only the pen tool with strokes (no fill), but the issue is, when I view the logo at 100%, it looks pixellated! I know vectors should not even be able to appear pixellated, but they are. Here is the screenshot from AI, without exporting to anything:     That was just done using the snipping tool within Windows, and it's at 100% zoom.  I have anti-aliasing turned on from Edit > Preferences > General, and the document resolution is at 300 ppi (I get the same result with 72 ppi).   Could anyone help me with this?   If relevant: Using CS6, and have a 24 inch Dell U2412M at 1920x1200 resolution. I do have a 21.6" Samsung at 1680x1050 and I get the same result there as well. Let me know if you need any other settings, or if you would like the file, I'd be happy to provide it to be able to solve this problem.


Can anyone explain about the proportion of variance explained in PCA and why it is important in the analysis of PCA?

In general, what is meant by saying that the fraction $x$ of the variance in an analysis like PCA is explained by the first principal component? Can someone explain this intuitively but also give a precise mathematical definition of what "variance explained" means in terms of principal component analysis (PCA)?  For simple linear regression, the r-squared of best fit line is always described as the proportion of the variance explained, but I am not sure what to make of that either. Is proportion of variance here just the extend of deviation of points from the best fit line?


The principle of general covariance from the Equivalence Principle (EEP) tells us that there is no way in principle  to locally distinguish between an inertial acceleration and the effects of a gravitational field.  When general covariance is expressed in tensorial form we find that if the equation holds true in an inertial frame that it must hold true in a non-inertial frame of reference.  My question is, if the above is true, is a gravitation field just an illusion?  Why do we have to consider a gravitational field at all.  Why not think of gravity as the effect of the bending of space and time, with gravitation revealed as an illusion, a by-product of geometry.  I feel it is the presence of matter that warps space around it, giving us the illusion that there is a gravitation force pulling on neighboring objects.

I have studied some of Einstein's Theory of General Relativity, and I understand that it states that gravity isn't a force but rather the effects of objects curving space-time. If this is true, then why are we instructed in middle school that it is a force?


My wife is pregnant with her 8th child. She has 3 from her first marriage, 2 more with another relation, and I married her and we have 2 more. She got pregnant while she has both an IUD and is on birth control.  We barely have enough money, we work a lot. She wants to keep this kid and I don't. All the kids range from 19, 18, 15, 10, 9, 5, 4.  I think it is irresponsible for us to have another kid when we have so many and it is difficult to raise these 7 kids, let alone have one more.  What can I do to change her mind?

My wife wants a 4th baby, but I don't.  We have been talking about it for the last few days (talking strongly).   I have raised points such as:   We will get less time to spend with our current kids. The age gap between the first and the last will be too wide. It will cost more money. She will be out of work longer. We will need a bigger house. And we don't even have our own house yet (we are still renting). We will have to start again. Sleepless nights, nappies, feeding, new cot, car seat, etc etc.   She says:   She feels like she is missing something. She has always wanted a large family. Things will be the same regardless of having 3, or 4 kids. She agrees that money will be tighter, but wants to push through it.   Our current kids are 9 months, 2 years, and 4 years. We are young married couple (25), and I have a fairly decent job.  What would be the pros and cons of having another child?   How can we rationally talk to the other about having/or not having another child?  And what should we do if we cannot agree?


I am looking for a geometric interpretation of CCA. Especially one that relies on the fact we are doing singular value decomposition, which has the geometric interpretation of a rotation, scaling and another rotation. Why taking these two rotations from the SVD of the cross-correlation matrix gives the most correlated linear projections?

Canonical correlation analysis (CCA) is a technique related to principal component analysis (PCA). While it is easy to teach PCA or linear regression using a scatter plot (see a few thousand examples on google image search), I have not seen a similar intuitive two-dimensional example for CCA. How to explain visually what linear CCA does?


I am using Bash's Tab autocompletion quite often, but when I'm inside a Bash command substitution structure like in the example below, it breaks and only returns an error.  Let's assume I want to find out the file type of the apt-get executable, the command for that could be file $(which apt-get). Now if I enter that up to the letter "g" and then press Tab, I see this:  file $(which apt-gbash: unexpected EOF while looking for matching `)' bash: syntax error: unexpected end of file   Is there any way how I can fix this and use tab autocompletion inside Bash structures like command substitution as well?

I'm trying to go into an irb session with specific environment variables from a file with this command:  $ env $(cat env.sh) irb   But when I try press Tab after I type env. to complete it, I get this following error:  $ env $(cat env.-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file   Another interesting thing is that if I'm logged in as root, this error does not occur.   Here's the output of find ~ -uid 0:  $ find ~ -uid 0 /home/(redacted)/.rpmdb /home/(redacted)/.rpmdb/Group /home/(redacted)/.rpmdb/Conflictname /home/(redacted)/.rpmdb/Installtid /home/(redacted)/.rpmdb/Sha1header /home/(redacted)/.rpmdb/Providename /home/(redacted)/.rpmdb/__db.002 /home/(redacted)/.rpmdb/Requirename /home/(redacted)/.rpmdb/Sigmd5 /home/(redacted)/.rpmdb/__db.001 /home/(redacted)/.rpmdb/Obsoletename /home/(redacted)/.rpmdb/.dbenv.lock /home/(redacted)/.rpmdb/Name /home/(redacted)/.rpmdb/Basenames /home/(redacted)/.rpmdb/Triggername /home/(redacted)/.rpmdb/Packages /home/(redacted)/.rpmdb/Dirnames /home/(redacted)/.rpmdb/__db.003   Can anyone explain to me why this is happening and if so, how do I fix it in when I'm not a root user?


Using GParted:    This flash drive is a 1GB Kingston flash drive, in GParted it shows 8MB of space remaining, and when I try to create a partition table for it, it loads but nothing changes at all, so I can't create a partition for this disk.  I just want to use this flash drive normally for saving files, or maybe using Porteus, I just want to make this flash drive a normal one.

I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.


I am very curious about the factors which determine the order in which a specific reviewer is presented with questions in the "close" queue. I ask about the close queue, because on mathematics.se, there are always questions in the close queue.  On a typical "new" day, my close-queue reviews begin at a time when, say, 165 questions are in the close queue.  When I click on "close" to review questions with at least one pending close vote, what factors determine the order in which the 165 questions are presented to me?    I suppose there may be some randomness in the order of presentation of those questions; it was also suggested that perhaps questions whose tags overlap with tags that I frequent may be a factor.    I've sort of ruled out "those with the most close votes in the review queue are presented first, whoever the reviewer is" (because my experience reviewing reveals too many counterexamples).  I haven't been able to determine whether or not they are presented from newest to oldest in the queue, or vice versa.  (Note, I have reviewed well over 20,000 posts from the close queue on MSE).  Any clarification about why and how I'm presented with the questions to review for closure, in the order I receive them, until I've either voted to close or keep open 20 posts, would be appreciated.  My question is relevant for any specific reviewer.  I merely used myself to help simplify the question.  I realize that which questions user x may see first, may not be those that user y sees first, but I'm wondering what factors play into the presentation of questions to review for any particular user.    Note: If the order of questions presented in the close queue varies from site to site, please let me know, and if so, I will withdraw my question readily.    Additional note: I have read , and there was a comment suggesting that in fact, questions are presented from most recent to oldest. That comment also referenced an explanation from @Shog9 on this matter, but did not provide a link to it.

The Close-Vote queue is large and growing. I searched for definitive information on how that queue is sorted for reviewers, and the nearest I could find is that it is randomized - but that post was some years old.  Would it be possible to sort on order of votes already received? That is, all questions with 4 votes to close are surfaced first (in random order) to reviewers? Questions with 3 votes would come up before ones with 2, etc. In that manner a given question gets out of 'will it close?' limbo faster.   This feature request would, in my opinion, be supportable if the majority of reviewer votes were going to single-vote questions. I cannot (I think) actually find these numbers. If this is the case, the majority of the work is going to an ever-increasing queue, and proportionally fewer votes are being resolved.  Note there are other distributions that could help get in this direction without being a strict ordering, like weighting the chance a given question is surfaced to a reviewer by the number of votes. However, for discussion purposes I thought I'd keep it simple.  Usual apology if this has actually been addressed. Search is sad-making.


So, basically I have a Queue (List of List of strings). Now, suppose I want to append 'okay' to the list at index 1, why is it getting appended for all the lists inside Queue? How do I append a value to a specific list only inside Queue? Queue = [] temp = [] Queue.append(temp) # 12 - 8 Queue.append(temp) Queue.append(temp) Queue[1].append('okay') print(Queue)  [['okay'], ['okay'], ['okay']]

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


I have lived in Germany since 2011 and I have had refugee status since 2017. My mother died in 2013. I want to visit her grave. How can I do that? I need only 10 days to go back to my country Pakistan.

I was recently granted German refugee status with a travel document and, in my interview, I told them I would never go back to my home country, Iraq. Now, someone I loved died in my country.  Is it possible for me to leave and return to the Schengen area, using my Iraqi passport? Would German Immigration notice and would it revoke my refugee status?  Would I be able to use both my Iraqi passport and my German travel documents? Would the German authorities know if I did this?


I'm trying to make a simple 3D house with doors, roof, and stairs, I made all of it from the same cube so it would all line up perfectly-ish.   My trouble is I have no idea how to remove sections of it from the block so I can set the material and textures how I'd like.   So for instance, I want to make the doors out of wood, and not have the entire house look like a door.  Thank you.

How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.


I have a masters degree in Physics and I have worked in Italian high school for 15 years. Now I'm 47 and I wish to have a bachelor or masters degree in Math, because I'd like to change job. How difficult might be for me to have a Phd after the degrees, considered my advanced age (even if I don't feel it)?

I really love research. I started a research project in graduate school for my M.A. in English. My research topic is a very viable and interesting topic for a dissertation. I'll be 60 on my next birthday and I know that many Ph.D programs are traditionally geared toward younger students.I was wondering are there any programs that I can continue this research in without facing the issues of ageism in academia?


What is the name of the font on the second page of  used for the word "preface"?  (reproduced below in case the link dies eventually) I've already tried automatic font finders, to no avail.

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


I'm new to LaTeX and currently trying to write myself a report template that I can use for future work.  Anyway, here is a MWE showing the error:  \documentclass[12pt,twoside,a4paper]{article} \usepackage{graphicx}  \begin{document} \begin{figure}[ht]   \centering   \includegraphics[width=\linewidth]{epsFig}   \caption{This is where a caption would go. Include the image in the folder of the project, the image must have a .eps file format.}   \label{fig:example} \end{figure} \end{document}   And the output ends up looking like this:    That is, there's not enough space on the previous page to place the image so it is moved on to the next page, but it ends up at the bottom left of the page covered by the caption.  The image was created using MatLAB, I use TexnicCentre with Miktex2.9. Can anyone help?  edit: The file extension for the image is .eps The image is at this

I am trying to include a figure into LaTeX from a paper originally created using MS Word. I have already converted all the text/equations into LaTeX but I can't figure out how to get the figures over without re-drawing them using LaTeX code (which I do not want to do). The image is a plain box (like a tabular) one row by 7 columns with numbers inside each cell. Then I inserted arrows of varying length above and below the box (several short ones and one much longer).    I am trying to use the  package with the \includegraphics command.   I copied the figure (box and arrows) from my original article into a blank Word doc. The figure only takes up the first 4 or 5 lines of the blank document. I then selected/highlighted the image and printed the selection using 'PDFCreator'. This allowed me to save the image as a .eps file. I then copied and pasted the eps file into the folder where all my .tex files are saved.  When I compile the document using pdftexify there is a blank space where the image should be. In the console I get the following message when I compile the document:  [27] <Fig3-eps-converted-to.pdf, id =105, 391.4625pt x 74.2774pt> <use Fig3-eps-converted-to.pdf> Overfull \hbox 1.46153pt too wide) in paragraph at lines 511--516 []   My code looks like this:  \documentclass[12pt]{article}  \usepackage{graphicx} \usepackage{epstopdf} \begin{document}  %Text  \includegraphics{fig3.eps}  %text  \end{document}   I have read the sections on graphics in 'LaTeX: A Document Preparation System' and 'The Not So Short Introduction to LaTeX2e' but I still can't figure this out. Should I maybe use a PNG image since it is a pretty basic figure? Any advice on how to properly transfer images from a word doc to .eps format and/or how to get those .eps files into LaTeX properly would be a huge help.


Alright, I've created a custom calendar using the following package:  and code by Cody Sechelski, the setup that I currently have works great. I basically have the exact setup as shown here:   I want to limit my query to only those records that fall within the current date view. The way in which the calendar is moved between days, weeks and months is handled with a JS function, here's an example:  $('#my-next-button').click(function() {     $('#calendar').fullCalendar('next'); });   The date of the current view is handled with another function      $('#my-button').click(function() {     var moment = $('#calendar').fullCalendar('getDate');     });   I want to be able to obtain the current date of the view, pass that to my controller and update the query to show only those that fit the date range of the view. This would need to re-render when the user clicks the "Next" or "Previous" buttons to change the date range.   I've modified the code to pass the date parameter to a webservices method and have tried to pass that to my PageReference but cannot get the query to reload.   VF Script                 function(){                     $('#calendar').fullCalendar('prev');                     var moment = $('#calendar').fullCalendar('getDate');                     //alert("The current date of the calendar is " + moment.format('YYYY-MM-DD'));                     try{                         sforce.connection.sessionId = '{!$Api.Session_ID}';                          sforce.apex.execute("BroadcastCalendar_Controller", "getCalDate", {calDT : moment.format()});                     }                     catch(e){                         alert(e);                     }                     $('#calendar').fullCalendar('refetchEvents');                 }   Controller Webservices Method  webService static dateTime getCalDate(dateTime calDT) {     CalendarExample_Controller con = new CalendarExample_Controller();     con.calDateSet = calDt;     system.debug('-----calDAte------'+calDT);     con.pageLoad(); // trying to get the PR to execute     return calDT; }   At this point, I'm open to any suggestions as to how best to approach this problem. Basically, I need to figure out how to get the date using the 'getDate' JS function, pass that datevalue to my Controller, update my query using that date as a variable an rerender the calendar events.  Any help is appreciated!

I want to pass the java-script value to controller.I am using repeat on VF page.  VF page      <apex:repeat value="{!listAdj}" var="Adj" id="hrs">

     <apex:inputField id="decimal" value="{!Adj.Hours_Decimal__c}" onchange="setHidden5(this);" >       </apex:inputField>
	             <apex:inputField id="hours" value="{!Adj.Hours__c}" /> <apex:inputField id="decimal" value="{!Adj.Hours_Decimal__c}" onchange="setHidden5(this);"/>              </apex:repeat>   Javascript code  function setHidden5(element){     //split the id of the inputField by ':' and then use the 5th index in the array to exact position of the inputField in the apex:repeat.   var idArray = element.id.split(':');     var hiddenRep1 =document.getElementById("thePage:form:hrs:hrs:"+idArray[4]+":decimal");          var hiddenRep2 = document.getElementById("thePage:form:hrs:hrs:"+idArray[4]+":hours");       if(element.value.length >=1){        document.getElementById("thePage:form:hrs:hrs:"+idArray[4]+":hours").disabled = true; **hiddenRep2.value=hidden1.value;**                }                             }     }   I want to pass the hiddenRep2.value to controller.How to pass that. Hidden2.value is same as hidden1.value + some addition subtraction.i dont know how to pass that value. Can someone me sort out this.  Thanks


Each time apt-get tries to process triggers for shared-mime-info, it reports warnings like:  ... Processing triggers for shared-mime-info... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Unknown media type in type 'uri/mms' Unknown media type in type 'uri/mmst' Unknown media type in type 'uri/mmsu' Unknown media type in type 'uri/pnm' Unknown media type in type 'uri/rtspt' Unknown media type in type 'uri/rtspu' Unknown media type in type 'interface/x-winamp-skin'   I've checked /usr/share/mime-info but doesn't see any of them:  /usr/share/mime-info$ grep 'url/rtspu' * (Got nothing)   So, how to clean up my system so it won't report these unknown media types?

When running update-mime-database - usually automatically launched by apt-get - why do I reliably get complaints like:  Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Unknown media type in type 'uri/mms' Unknown media type in type 'uri/mmst' Unknown media type in type 'uri/mmsu' Unknown media type in type 'uri/pnm' Unknown media type in type 'uri/rtspt' Unknown media type in type 'uri/rtspu' Unknown media type in type 'fonts/package' Unknown media type in type 'interface/x-winamp-skin'   It doesn't seem to be hurting anything, but chronic errors during updates risk obscuring an error that I do care about.


I have installed Ubuntu 12.04 with compiz on a 17" laptop with 1920x1080 display. After the installation the fonts are too small. Even if I change the fonts' size the Close/Minimize/Mazimize icons remain tiny, Is tehre any appropriate theme for high-resolution displays? How can I install it?

How can I adapt Ubuntu to a high resolution display?  I have a display with 3200x1600px on only 11'' and everything looks really tiny.


I have a function to remove the duplicates in a collection.  /** Remove the duplicates **/ private List<Topic> removeDuplicateEntries(List<Topic> mlist) {      List<Topic> allEvents = mlist;     List<Topic> noRepeat = new ArrayList<Topic>();      for (Topic event : allEvents) {           boolean isFound = false;           // check if the event name exists in noRepeat           for (Topic e : noRepeat) {                 if (e.getUserId().equals(event.getUserId())){                     isFound = true;                     break;                 }            }            if (!isFound) noRepeat.add(event);     }      return noRepeat; }   Whats happening is sometimes I get the error   java.util.ConcurrentModificationException    at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)    at com.sttarter.communicator.CommunicatorDBHelper$1.run(CommunicatorDBHelper.java:54)    at java.lang.Thread.run(Thread.java:818)

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


Here's a quick question: suppose your opponent attacks with an 8/8 with Trample, and you block with a 5/5 with Defender, Indestructible, and Hexproof. You also have Hexproof.  Trample is an ability, and Hexproof won't allow you to be targeted by abilities or spells. How would one assign damage then?  Or is Hexproof just not important at all by this point?

Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent?


Can anyone explain how I can make a partition to install Windows 10, with gParted? The main partitions are locked, as shown in the screenshot.    I am a beginner and I am struggling with several issues, so I need Windows 10 along with Linux.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


No app requiring microphone works on my iPhone 7, including calls. Strange thing is that calls fail with call fail message, not just have bad connections or other end complaining about not being able to hear. Other apps also refuse to work. For example ‘Voice notes’ state ‘no audio devices found’.

I'm at a loss on this one. My girlfriends microphone is not working in FaceTime on her iPhone 5s. The microphone itself works because we tested it with the Voice Memos app. When we have a FaceTime conversation I can occasionally hear some sort of clicking/crackling noise, but no voice. I don't know exactly what it's picking up. However with strictly FaceTime audio calls it does pick up sound. The sound also does not work with voice recording text messages.   The first thing I thought of was thinking that maybe the app doesn't have permission to access the microphone. I looked though settings and on FaceTime but couldn't find where the permission could be toggled. And I had no idea how to force it to ask the permission question again.  Prior to getting her iPhone 5s screen fixed, she was using an old iPhone 4 for a long time. On the iPhone 4 FaceTime worked just fine. When she got the 5s back I restored it from iCloud with a backup image of the iPhone 4 so she would have all of her apps and what not. Since then the microphone on FaceTime has not been working.  Any tips or ideas on what to try?


I am playing the Neverwinter online RPG and there's plenty of stuff that one needs to keep in their bags: besides the usual loot, enchantments, runestones, seals, emblems and kits seem to take up 90% of my bags.  After the starting Adventurer's satchel and Adventurer knapsack, how do I obtain more bags?

I have received the 24 slot bag from an early quest around lvl 10. Are there other quests that reward bags?  Is it possible to purchase bags? To loot from a monster or chest?


I am a beginner in android and having some problem in handling NullPointerException.I need to pass the magnetometer reading values in an array from one class to a fragment. Here is the magnetometer class:  public class Magnetometer implements SensorEventListener { private Sensor mag; private SensorManager magman; private boolean magAvailable; private float[] magValue;  public  Magnetometer(MagFragment context){     magman=(SensorManager)context.getActivity().getSystemService(Context.SENSOR_SERVICE);     magAvailable=magman.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)!=null;     if(isMagAvailable()){         magValue=new float[3];         mag=magman.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);         magman.registerListener(this,mag,SensorManager.SENSOR_DELAY_NORMAL);     } }  @Override public void onSensorChanged(SensorEvent event) {     for(int i=0;i<3;i++)         magValue[i]=event.values[i]; } public float[] getLastReading(){     return this.magValue; } @Override public void onAccuracyChanged(Sensor sensor, int i) {  } public boolean isMagAvailable(){     return this.magAvailable; } public void unregister(){     if(isMagAvailable())         magman.unregisterListener(this,mag); } }   Here is the fragment:  ublic class MagFragment extends Fragment { private Magnetometer mag; private TextView x,y,z; private float[] magValues; public MagFragment() {     // Required empty public constructor } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     //returning our layout file     //change R.layout.yourlayoutfilename for each of your fragments     View rootView = inflater.inflate(R.layout.fragment_mag, container, false);     x=(TextView) rootView.findViewById(R.id.mx);     y=(TextView) rootView.findViewById(R.id.my);     z=(TextView) rootView.findViewById(R.id.mz);     magValues=new float[3];     getData(this);     return rootView; }   @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {     super.onViewCreated(view, savedInstanceState);     //you can set the title for your toolbar here for different fragments different titles     getActivity().setTitle("Magnetometer"); } public void getData(MagFragment context) {     magValues=mag.getLastReading();     displayData(magValues); } public void displayData(float [] magV) {     x.setText(String.valueOf(magV[0]));     y.setText(String.valueOf(magV[1]));     z.setText(String.valueOf(magV[2])); } }   I understand,that the function returns some NULL values. The error I get is "Attempt to invoke virtual method 'float[] com.example.ark.ark.Sensors.Magnetometer.getLastReading()' on a null object reference"

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?


Given two types of coins, with values $a,b$ prime to each other, which coin values can we pay if we have $x$ coins of type $a$ and $y$ of type $b$. By the Lemma of Bézout, we should be able to pay all sufficiently large values $t$ in coins if $x$ and $y$ are large enough. But I'm interested especially in the small values of $t$- which values of $t$ can be represented in this fashion?

This seemingly simple question has really stumped me: How do I prove that the largest integer that can't be represented with a non-negative linear combination of the integers $m, n$ is $mn - m - n$, assuming $m,n$ are coprime? I got as far as this, but now I can't figure out where to go:  $mx + ny = k$, where $k = mn - m - n + c$, for some $c > 0$ $\Rightarrow m(x + 1) + n(y + 1) = mn + c$  If I could only prove this must have a non-negative solution for $x$ and $y$, I'd be done... but I'm kind of stuck. Any ideas?


I love using zsh but there is one feature that bash has that I miss. It is this one:  ➜  ~  bash  dbugger@mercury:~$ man2html The program 'man2html' is currently not installed. You can install it by typing: sudo apt-get install man2html-base  dbugger@mercury:~$ exit exit  ➜  ~  man2html zsh: command not found: man2html   When I type a command that is not install, but it can be easily installed, bashtells you so, but zshno.  Is there any way to fix this?

Can the zsh shell be configured to show what bash shows when a command does not exist, similarly to this:  kahless:~$ sysv-rc-conf   The program 'sysv-rc-conf' is currently not installed.  You can install it by typing:   sudo apt-get install sysv-rc-conf   rather than the ZSH prompt:  [kahless /home/teward]% sysv-rc-conf   zsh: command not found: sysv-rc-conf   Note I do not want to change the prompt itself, but I want to change the result from zsh: command not found to a bash-like output of The program 'progname' is currently not installed. You can install it by typing: or similar.  Is this possible with ZSH?


How can I use apostrophe for plural nouns (especially when using US English)   Shareholder's Equity Shareholders' Equity   Which one is correct ? 1 or 2 ?  Note: I found  is very helpful.

What is the possessive of a noun ending in ‑s?  Are these both right, or is the second one wrong?   the boys' books the boss' car


Yes, I see that you want to mark this as a duplicate, and I appreciate that, but please read to the end.  I've found this question several places, and the answers are either too vague for a noob to rsyslog to understand...like   Waaay too difficult to possibly be an easy to understand way to do what I want to do....like   Or very close to what I'm looking for, but not quite....like   Anyway, to the specific question.  Server X = Centralized syslog server, running rsyslog.  Server Y = A server that runs   I have already configured Y to send the default log files to X.  I used  instructions, combined with some others.    X /etc/rsyslog.conf :  #  /etc/rsyslog.conf    Configuration file for rsyslog. # #                       For more information see #                       /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html # #  Default logging rules can be found in /etc/rsyslog.d/50-default.conf   ################# #### MODULES #### #################  $ModLoad imuxsock # provides support for local system logging $ModLoad imklog   # provides kernel logging support #$ModLoad immark  # provides --MARK-- message capability  # provides UDP syslog reception $ModLoad imudp $UDPServerRun 514  # provides TCP syslog reception $ModLoad imtcp $InputTCPServerRun 514  # This one is the template to generate the log filename dynamically, depending on the client's IP address. $template FILENAME,"/var/log/logs/%fromhost-ip%/syslog.log"  # Log all messages to the dynamically formed file. Now each clients log (192.168.1.2, 192.168.1.3,etc...), wil    l be under a separate directory which is formed by the template FILENAME. *.* ?FILENAME   # Enable non-kernel facility klog messages $KLogPermitNonKernelFacility on  ########################### #### GLOBAL DIRECTIVES #### ###########################  # # Use traditional timestamp format. # To enable high precision timestamps, comment out the following line. # $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat  # Filter duplicated messages $RepeatedMsgReduction on  # # Set the default permissions for all log files. # $FileOwner syslog $FileGroup adm $FileCreateMode 0640 $DirCreateMode 0755 $Umask 0022 $PrivDropToUser syslog $PrivDropToGroup syslog  # # Where to place spool and state files # $WorkDirectory /var/spool/rsyslog  # # Include all config files in /etc/rsyslog.d/ # $IncludeConfig /etc/rsyslog.d/*.conf   As you can see, the logs that are being sent to X are put into a directory named after the IP address they come from.  Y /etc/rsyslog.d/10-rsyslog.conf  *.* @192.168.1.X:514   This all works, and I get everything just fine.  What I'd like to do is have the redmine.access.log file located at /var/log/apache2/redmine.access.log also sent to the syslog server X  Like I said, I've read lots about this.  I'm just not following it, and I need a more simple example.   I'd like to keep the log files on X and Y, so piping them straight anywhere, isn't what I want.  The instructions that I've found that looked the simplest, that I could almost follow were .  The problem with those, is that nothing is really explained, and I'm really wanting to understand how this works.  I don't care if the redmine.access.log gets thrown in with the syslog stuff (although I'd prefer it didn't), or if it gets written somewhere else all together (obviously on X though).  If someone could write up what they think I should do, I'll update my question to have my final config that works, so hopefully other noobs can benefit from my silly questions.  EDIT  This edit is to explain why this isn't a duplicate.  This is a duplicate....There I admitted it.  But I'd really like to see something so simple, to have an actual complete example.  So, if this gets marked as duplicate, and removed, that's fine, but I'm going to edit it with a working example at the end anyway.

How can I forward message from a specific log file like /www/myapp/log/test.log with rsyslog client to remote rsyslog server? This log file is outside of the directory /var/log.


Tag scores on user profile are not updated again. That also happened a few days ago (and lasted 3 or 4 days).  General question though: is it worth bringing it up on meta when it happens? This problem happens from time to time but then resolves itself. It's a minor annoyance really, nothing more, in my opinion.

From my , I learned that all tag related info on profile will be updated daily at UTC 03:00.  However, something is wrong here. It's now UTC 05:00+, but my tag number, say 93 (c++) is not updated against yesterday. I am pretty sure about this and I did earn some more points throughout the day. Sorry for not be able to capture the screenshot yesterday, but I did check this number 10 hours ago (which belongs to yesterday, also 93).  Is there a bug happening here? Or updating time different?    UPDATE: As of 24 Jan, the tags are still not updated with the proper values.  UPDATE2: Fixed around 25 Jan, UTC 03:00, at least for me.


If caster A (for example a wizard) casts a spell on their turn, and it is Counterspelled by another caster B, can the original caster Counterspell the first Counterspell?    I am assuming that it is legal to Counterspell a Counterspell if it is done by different individuals, though please correct me if I'm wrong.  I also assume the answer to this question also applies to a caster using their reaction to cast any other non-cantrip spell on their turn, such as casting the Shield spell when taking an opportunity attack when leaving melee, after they have cast another spell with their action.

My party went up against two wizards. Wizard NPC 1 cast a spell, and Wizard PC used their reaction to Counterspell to try to block it. Wizard NPC 2 counterspelled Wizard PC. I have two questions about this:   Is there any defence against this? If it was just one NPC Wizard, could they use their reaction, during their turn, to counterspell the PC Wizard's counterspell?


I need to turn every three values of a list into a new smaller list.  Here's an example of a list  ["bob",1,2,3,mike,4,5,6,"jerry",7,8,9,"richard",10,11,12]   I want it to look like:  [["bob",1,2,3],["mike",4,5,6],["jerry",7,8,9],["richard",10,11,12]]   How would I go about doing that?  I've tried using a for loop but I haven't had success.  list=#The first list above n=3 count=0 for item in list:       [list[count::n]]       count+=1   I've seen other versions of this question with a list of numbers but I think the strings in mine might mess up those solutions.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


In Australia at least, a "six figure sum" is synonymous with an amount over $1,000,000.  The last time I checked, 1000000 had seven digits in it.  To quote :     Has Channel 9, a publicly listed company, paid at least a six-figure sum, or several million dollars to get is (sic) employees out of Lebanon?

Suppose you are told that "Jane makes over six figures". Assuming this to be true, what is the minimum amount of money that Jane can be making?  I have always understood this to mean "Jane makes at least seven figures", i.e. "Jane makes at least $1,000,000", but I have recently learned that some people understand this to mean "Jane makes more than the smallest six-figure number", i.e. "Jane makes at least $100,001".    Which of these interpretations is more widely understood? Which of these interpretations is prescriptively correct (if either)?    (I am aware that there are unambiguous ways to express the same idea, but that is beside the point here.)


I have 350 references in my thesis which was written in Word 2016. However, I rewrite it in to LaTeX because of hard fitting tables in word. My only problem is how to convert 350 references to BibTeX? (if there is any way) It will take time and effort to do it manually.

How do I convert a Word file's references to .bib format? Is any tool available  to convert it to .bib format?


Determine the value of $\displaystyle \sum_{k=n}^{2n} \binom{k} {n} 2^{-k}$ for $n \geq 1$  My attempt: I have asked this question before in another math forum but it leads no solution. My friend suggested me to search for something like series-k. I also looked at my textbook in combinatoric section (which apparently leads to Binomial Theorem), but really I don't have any idea for this one.  Could you help me?

How does one show that $$\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}=2^{n}$$ for each nonnegative integer $n$?  I tried using the  but I guess I am applying it incorrectly. With the snake oil technique we have $$F(x)= \sum_{n=0}^{\infty}\left\{\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}\right\}x^{n}.$$ I think I have to interchage the summation and do something. But I am not quite comfortable in interchanging the summation. Like after interchaging the summation will $$F(x)=\sum_{k=0}^{n}\sum_{n=0}^{\infty}\binom{n+k}{k}\frac{1}{2^k}x^{n}?$$ Even if I continue with this I am unable to get the correct answer.  How does one prove this using the Snake oil technique?  A combinatorial proof is also welcome, as are other kinds of proofs.


I know you cannot delete your question if it already has answer(s) with votes. But can you delete your question or answer if someone else has already added comments on it?

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


I've been working with two frameworks for asp.net the last 7 months and the information on combining the two are rather sparse (Despite their growing popularity). I realize I could write a blog post, but I want to share my information with this community. How would i do that if I don't have an actual question?

Sometimes you spend a day or more solving a technical problem, and when you finally solve it, you may want to post it on your blog (if you have one) to share with the community.  However, most developers don't have a lot of time to update their blogs, and that is why personal blogs are not ranked very highly on Google/Bing.  So even if you describe a brilliant idea, chances are that, except a few of your friends, nobody will ever find it. This is a common reason why some developers start their blogs and soon give up; it is not interesting to write for the community if you have no feedback on your posts.  Unlike personal blogs, Stack Exchange sites are highly ranked in Google (I was amazed when I saw that a question asked on SO just an hour ago appeared 3rd in my Google search!), so if your question and answer are valuable for others, they will be rated highly and will be visible for other developers.  With this in mind, is it good practice to post a question and answer it yourself immediately when you want to share an idea with the community?


The $2 \times 2$ matrix ${A}$ satisfies $A^2 - 4 {A} - 7{I} = {0},$ where ${I}$ is the $2 \times 2$ identity matrix. Prove that ${A}$ is invertible.  What is the best way to do this?

$\mathbf{A}$ is a $2\times 2$ matrix which satisfies   $\mathbf{A}^2 - 4\mathbf{A} - 7\mathbf{I} = \mathbf{0}$,   where $\mathbf{I}$ is the $2\times 2$ identity matrix. Prove that $\mathbf{A}$ is invertible.      Hint: Find a matrix $\mathbf{B}$ such that $\mathbf{A}\mathbf{B}=\mathbf{I}$.   I tried substituting a variable matrix for $\mathbf{A}$ and substituting $\mathbf{I}$'s value into both the original equation and the hint, but the result was full of equations and didn't seem to help much at all. I would appreciate advice for this problem.  Thanks. --Grace


I want to travel to Vandenmedu, India from Bochum, Germany. Starting date would be around 20DEC15, return should be about 2 weeks later, i.e. 04JAN16    What bothers me: I am flexible in both start- and return-dates, as well as the airports in both Germany and India, as long as I save money but I'm having a hard time finding a search-engine that takes that flexibility into account.    I am looking for a search-engine that allows me to use a range of dates for both trips, with bonus points if I can just use regions instead of airports.

Several airline and trip planning sites will allow you to check "I am flexible with my dates" or a similar option.  Is there any way to also search more broadly for location?  For example, if you wanted to leave from YYZ or YKF and arrive at any airport in California, can a search for such flights be done somehow?  I ask because when I plan plane trips, I want the lowest price.  I'm OK with leaving a day or two later if I save $200 (same with the return trip).  There are 3 airports within 80 km of me, I'll leave from the one with the cheapest flight. And I'm also OK with changing the trip to spend time exploring San Francisco instead of lying on the beach near San Diego, and that sort of thing.  Normally this would take dozens of searches, but I'd like to see it all at once.


When I'm editing , the list followed by code is not supported by Stack Overflow. I clicked code Multiple times, but it didn't work.  The same is Meta.    While the bold followed by code is OK:  class Node  public class Node<T>: NSObject, NSCoding { // ... code

I wasn't following Meta Stack Overflow too closely so maybe something was changed that I'm not aware of. But each time I paste a snippet from a Python console I'm getting wrong formatting. What I'm doing wrong? It seems that >>> is confusing for Stack Overflow. I've tried to escape it with backslashes, and it was working fine in preview but doesn't work after the question is rendered.  I was able to observe that problem on: recent Chrome (Windows, Mac), Safari 4 (Mac).  Here is  I wasn't able to make right.  Funny, I think the snippets are rendered just fine on Meta Stack Overflow. Here is one:  >>> def throw(): raise Exception()  ...  >>> a=1 >>> a=throw() Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "<stdin>", line 1, in throw Exception >>> a 1


I am new here and need help.  I have a Toshiba Satellite L505 Laptop with 320GBHDD 3GB DDR2 memory. I have a dual boot system and rarely use Windows 7 system on it and have Ubuntu 12.04 on the partition.  Everything was working wonderful and I saw that an Ubuntu upgrade was there last week and thought that I would get to doing that this week.  So, I go to boot up and everything is just fine and yet when I go to sign in some text very quick like flashes and then disappears and it goes back to the sign in.  So, over and again I do this so that I can get what it is saying in the second it displays.  This is what I was able to write down.  amed disabled: edit/etc/default/saned  So, I was able to do a Ctl+Alt+F1 and bring up terminal and then it said the following:  touch: cannot touch '/var/lib/update-notifier/hue-eol.started':no space left on device  run-parts: /etc/update-motd.d/95-hue-eol exited with return code 1  That is all of it.  I am not sure what to do or what it all means.  Thank you in advance for any help.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


In the first Hunger Games book/movie, why was President Snow so insistent on letting both Katniss and Peta live in order for there to be a victor? This seems like a major plot hole to me, as the entire entry to the series depicts how little the Capitol values a district person's life, e.g.: the poor living conditions, the scarce resources available to them, the annual tribute of a teenager for showcase in a public death match. I don't really see it plausible that allowing them both to die would have caused a revolution against the Capitol, and I would think killing both remaining participants would be a bigger display of power than allowing one to live. District citizens are used to death, they would probably see it as just another injustice but carry on with their lives.

It is possible that the remaining last two tributes might get killed at the same time, for example, by a land mine explosion, and in that case the games will end with no victor standing.  Is there a reference in the original books as to what happens if nobody emerges victor in the Hunger Games?


I have a list of email addresses:  emails = ['email@google.com', 'email@happytown.aau.edu', 'fox.trot@nickle.com.uk']   I was using:  re.findall(r'\w+@\w+\.\w+', emails)   But I'm not sure how to account for the extended TLD's. How would I make this a conditional match so that we match all email addresses regardless of the ending?

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.


Let $\Bbb F$ be a field with $k$ elements, where $k$ is a finite number. Prove that there exists a prime $p$ and a positive integer $n$ such that $$k=p^n$$

Let $F$ be a finite field. How do I prove that the order of $F$ is always of order $p^n$ where $p$ is prime?


How am I supposed to explore all of the commands available in my terminal? I'd like to be able to browse all commands/documentation that is currently documented within the man command, how do I do that?

A man page for fork, for example, is in the System Calls section that has number 2:  man 2 fork  How do you see what else is section 2 without resorting to Google?


I've seen conflicting answers on other websites about whether or not it is grammatically correct to add a comma after the word "Sometimes" in examples such as:     Sometimes, we are unable to provide assistance.   Is the comma in the above sentence correct?  I looked at . Answers range between commas being for readability to being used to distinguish emphasis. I looked at questions on this site discussing when it is appropriate to use commas, but they did not answer this question. To clarify my question, would the quoted sentence have the same meaning and be grammatically correct regardless of the comma?

I am no native speaker and always confused about the comma in introductory phrases, in particular in prepositional phrases. Is there any hard rule when a comma must be set? If I make a google search for certain phrases, I often find both variants. Typical examples where I am not sure whether a comma must be set are:        First[ly][,] I must phone mother   In this case[,] we must...   For simple problems[,] the algorithm...   From Lemma 1.2[,] we obtain...   For a typical user[,] the algorithm...   In our theory[,] we...   A dark line on the horizon[,] the mountain range we were headed for seemed somehow not as threatening as when we had started out on the trip.   Avidly reading her novel[,] Jane did not notice that her stop was approaching.   To be sure[,] it is not easy to see a solution.   When you get to Rome[,] give me a ring.


So I'm trying to find the largest product of 2 3-digit numbers that is a palindrome.  Here's my code:  class project_euler4 {     public static int largest_palindrome = 0;      public static boolean isPalindrome(int number) {         String original = Integer.toString(number);         String reversed = new StringBuffer(original).reverse().toString();         return (original == reversed) ? true : false;     }      public static void main(String[] args) {         for (int i = 100; i < 1000; i++) {             for (int j = 100; j < 1000; j++) {                 int candidate = i * j;                 if (isPalindrome(candidate) && candidate > largest_palindrome) {                     largest_palindrome = candidate;                 }             }         }         System.out.println("The largest palindrome made from the product of 2 3-digit numbers is " + largest_palindrome);     } }   When I compile and run, I get:  The largest palindrome made from the product of 2 3-digit numbers is 0   So for some reason, my largest_palindrome variable isn't getting updated when a product is a palindrome.  I suspect it has something to do with my isPalindrome() function, but am not sure.  Any ideas?  Thanks for the help, Mariogs

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 have a table on which the user can select a row. I've made some CSS to highlight the selected row. The user can add rows to the original table. The probelm is that the added rows are not highlighted when selected.  HTML PART :

                      title 1 	                      title 2

                    old row 1	                    old row 1

                    old row 2	                    old row 1

   CSS :  .table_to_fill tr:hover, .table_to_fill tr.selected { background-color: #1E90FF; color : #fff; font-weight : bold;}   Javascript :  $(".table_to_fill tr").click(function(){ $(this).addClass("selected").siblings().removeClass("selected"); });  //to add rows $("#add_row_button").click(function(){ $('#table_id tr:last').after('
new row	new row
'); });   So what I'm doing wrong ? Thanks for any help.

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


I found an overflow issue pertaining to the 'How to' section, which typically appears to the right side of the 'Ask Question' site. When scrolling to the bottom of the site it overflows over the footer section. I believe this behavior should be fixed as it is visually displeasing (as a Front End developer myself, I can state this without prejudice).  Please see the attached image:

I have noticed that while asking questions and scrolling to the bottom of the page, the right sidebar containing recent questions covers the footer partially. Also, a part of it goes beyond the browser's boundary. It may not be a big problem but it still doesn't look good.    This also happens on the  page


Sounds simple (and maybe it is), but bear with me.  While on a support call, I asked a client what version of windows they had. XP, Vista, 7, 8, 8.1, 10...etc? They didn't know. They could have any version and each one is slightly different.  System properties is a standard method. Right click "My Computer" and go to properties. Well where is "My Computer"? Maybe it just says "Computer" or "This PC". It's in the Start Menu which looks different for each version. Maybe there is no start menu.   In windows 7, clicking the start icon loads the pop up menu. In windows 8.1 it throws up the whole start screen. You can right click to start icon and select "System" (I think).  There's a keyboard shortcut, Windows Key + Pause Break. What if they have no Windows Key? What if it's a laptop that requires the Fn key to hit "Pause Break"?  The only semi-reliable method I could think of was a process of elimination. Is there a start button? Click it, what do you see? etc.  The best I could find was websites that tell you the OS that's running. That requires an email or spelling out a URL.   TL;DR  Is there any non-technical and version independent way of determining what version of Windows a client is using?

I do not know which Windows version I have running on my laptop. How do I find this out? I need to know before telephoning my service provider.


I'm getting a string from an external native library function which uses "\n" for line separation. I simply want to write this to disk using the appropiate line ending format on the system I'm running my .Net application, which will be usually windows. So "Environment.NewLine" results correctly in "\r\n".   I'm simply write the string to a textfile via   MyString = NativeLib.GetStringEitherLForCRLF(); File.WriteAllText(MyFile, MyString); // will not change LF format   This doesn't changes lineendings, which seems to be intented that way. However, I'm wondering while the same string in C using fwrite in asciimode would probably change the lineendings as I remember.   Since conversion would be an easy task I'm just curios, how the "correct" or best-practice way in .Net should be. Is there a standard function, which would automatically convert the lineendings according to the current environment settings ?   EDIT: So 5 mins and already downvoted...  Folks, I KNOW how to replace characters in strings, that is not the basic question. The exact question is:   Does there exist a .Net standard library function that will to line ending conversions already depending on OS and Environment settings or which maybe has to be used with a certain parameter to ensure this?   Like e.g.:  File.WriteAllText(MyFile, MyString, Lineencoding.CRLF); // which does not exist   or  File.WriteAllText(MyFile, MyString.ConvertLineendings(Line.CRLF)); // which also does not   But there maybe an option I've missed but it doesn't look like that. I do not want to write unnecessary boilerplate code to such a trivial task.   The problem is also described in  just to show that I can be more complex than most people think. I'm not completely sure whether the proposed regex solution will work in 100% of all cases.   Edit 2: I changed the title to make my intention more clear because it seems that the previous title motivated more to downvote for what reason ever...

How can I replace Line Breaks within a string in C#?


I have a set of data which is has a very large positive skew, and has been transformed using a logarithm. I wish to predict one variable from another using the lm function in R. Since both variables have been transformed, I am well aware that my regression will output the equation:  ln(y) = b*ln(x) + a, where a and b are the coefficients.  The model fit is good, with an R squared of almost 0.6, producing a range of predicted y values.  Now, i have 'back-transformed' the variables using the following equation:  y_predicted = exp(a)*x^b   However, the predicted values for the larger x and y are significantly lower than they should be. Since I am going to be using the mean and sum of all of the y_predicted values in comparison with the y_actual values, this makes my model under predict by around 75%.  Due to the logarithmic scale, a small deviation from the line of best fit in the log domain, has resulted in a very large deviation when back-transformed.  My question, is how to adequately deal with this? I can come up with my own regression coefficients, which ensures that the line of best fit over-predicts some of these larger values, and makes the sum more aligned. However, this would  go against the point of using a linear model in the first place, which optimises the model.  Also, i am not sure how 'statistically' valid this would be, as the method could not be replicated, as the coefficients were determined by eye.  Thoughts welcome!

I'm fitting a regression on the $\log(y)$.  Is it valid to back transform point estimates (and confidence/prediction intervals) by exponentiation?  I don't believe so, since $E[f(X)] \ne f(E[X])$ but wanted other's opinions.  My example below shows conflicts with back transforming (.239 vs .219).  set.seed(123)  a=-5 b=2  x=runif(100,0,1) y=exp(a*x+b+rnorm(100,0,.2)) # plot(x,y)  ### NLS Fit f <- function(x,a,b) {exp(a*x+b)}  fit <- nls(y ~ exp(a*x+b),  start = c(a=-10, b=15))  co=coef(fit) # curve(f(x=x, a=co[1], b=co[2]), add = TRUE,col=2,lwd=1.2)  predict(fit,newdata=data.frame(x=.7)) [1] 0.2393773  ### LM Fit # plot(x,log(y)) # abline(lm(log(y)~x),col=2) fit=lm(log(y)~x) temp=predict(fit,newdata=data.frame(x=.7),interval='prediction') exp(temp)         fit       lwr       upr 1 0.2199471 0.1492762 0.3240752


Just got Ubuntu mini 18.04 and I'm planning on making it specially designed for hacking & pentesting. I've got the basics such as nmap and some custom scripts but I'm wondering how to get the god of hacking tools - metasploit. Please don't just say "just use kali or blackarch" because I want this to be custom. All help will be appreciated.

I want to install metasploit and armitage on my ubuntu 16.04 LTS laptop running kernel 4.6  I've read blogs and posts on how to install it but the problem is is that they are outdated. The packages are not there anymore and or the commands dont work.  If anyone can give me an updated tutorial on how to install it that would be great. I also think other users that see this post and want to install it will also be thankful. Thanks.


The title says it all, I do not see any partition but the whole disk. My version is 12.04 LTS. I literally have no idea.

I'm having a problem installing Ubuntu, and Kali as well. I downloaded the iso from the official site & tried installing using USB. I also tried desktop installation, but the problem is same.  It shows a single drive i.e. my total Hard Disk and if I select it, it asks me to create a new partition & shows total space as FREE.  It's with all Ubuntu I downloaded, 11.10 Server, 12.10 and 13.04. I also tried to install BackTrack's new version Kali Linux but again I got the same problem.  I hope I meet thier system requirements. Here's my system details for your ease:   OS: Windows 7 Ultimate Processor: Intel P4 2.80 GHz RAM: 3GB Hard Disk: 320GB No of Local Drives: 4 (1 Primary, 3 Logical) Free Space: 195GB (about) Motherboard: G31 Cache: 1MB Help me, please.


As with all Git questions, I'm sure this has been answered a dozen times before, but I haven't been able to find my special snowflake twin, so thanks for the patience.  Here's the rub: 5 commits ago, I accidentally added a large file, around 500 megs, and didn't realize it. Now when I go to push to GitHub, I get an error about the 100meg limit and the push fails.   Most fixes to this concern the most recent commit- How do I tell git to just forget about that 500 meg file from 5 commits ago?

I accidentally committed an unwanted file (filename.orig while resolving a merge) to my repository several commits ago, without me noticing it until now. I want to completely delete the file from the repository history.   Is it possible to rewrite the change history such that filename.orig was never added to the repository in the first place?


My dad has forgotten his Password. He knows his username. We have tried every thing  and he needs that account.   Is there anything he/we can do to reset/retrieve the password?  We have read way to do the Recovery but don't quite understand them.

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?


As a learning exercise, I'm building my own ECS. I've got a situation where two separate systems want to query and possibly update a Transform component - input handling and collision detection.  Given that each system operates in isolation, as if it were running in its own private thread, I'm effectively doing a concurrent update, but don't really want to block. I'm also concerned that one system might update the transform and then the next system is operating on different data.  Are these valid concern, or are the periods between updates so small that this is negligible and not worth worrying about? If valid, what are some other possible options for solving?

I'm building a fairly involved game using OpenGL and C++. I've been thinking about how to implement multithreading, and the two options are:  1) Each system (Graphics, Audio, Physics, et cetera) gets their own dedicated thread that they run off of.  2) Implement a thread pool, that picks up a jobs from a queue (priority queue), executes it and gets re-inserted into the pool to wait for new available job.  I was wondering which one is generally considered better: in terms of performance, maintenance, scalability, code smell, et cetera.


I have a Windows 8 os on my computer with a VirtualBox Ubuntu server 14.   Windows has access to the Internet and is visible on the router as an attached device 10.0.0.x. The Ubuntu server has access to the Internet but is not visible on the router, and when calling ifconfig I see: 10.0.2.15   Every time I restart the vm, it gets a different IP, and I would like it to be const.  Where do I start?  ===========================================================  So they have mark this as duplicate and I cannot answer with a solution, but here goes...  The main issue was the VirtualBox adding a default Network adapter of type NAT  I'm not sure what it the purpose of it, but once I've set the type to BridgeAdapter my VM got a proper DHCP from the router, and now I can config my router to set a static IP of the VM network card MAC address!  Only weird thing I had to figure out, is that my router does not show the VM MAC address on the attached devices list, instead it shows the REAL network card MAC address.   So don't get confused and use the MAC defined in the Network adapter in your VM settings!  Let me know if this helps you too.

I have Ubuntu 14.04 desktop machine that VirtualBox installed on it. I make two virtual machines, one Ubuntu server, the other is Lubuntu client. The default setting allow me to get Internet from guests to Internet through 3G modem connected to the host machine cause the guests use NAT by default, but I can't reach from client to server.  I want to put the two guests in separated network and let the guest server to connect to Internet through NAT with another network interface, and make the guest client connect to Internet through the guest Server.  I did the following:   On guest server I added two network interfaces, one for local network and the other for NAT. On guest client I added local network interface only.   What should I do to make the guest server reach the Internet and then make the guest client reach also to Internet but through the guest server?


I wish to put a paper in the format of "IETE Technical review" (Taylor and Francis) latex format. From where can I download  "interact" class file. Also, since the journal gives no specific instructions about which template to use, can I use IEEE class template to write my paper ? I have gone through the link  but instead of this, can I use IEEE template and send the paper ?

Does anyone have IETE journal of Research latex template. I didnt find any latex template. How do i use latex template to follow their guidelines.  Please help.