I'm getting a 0xC0000005 exception (0xC0000005: Access violation reading location 0x00000004.) when a COM function doesn't return. This is a very edge case, however it still needs to be caught in the C++ code that is calling it. For some reason, this exception is not being caught using a 'catch all' and I can't figure out why.  Here's the problematic code:  try {     p_rsFuncResult = (LPCTSTR)myPtr->myFunction(p_szFuncInput); } catch (std::exception& e) {     LOG_FATAL << "Uncaught exception thrown in myFunction: " << e.what();     p_rsFuncResult = ""; }   I've also tried catching using just '...', but this code still isn't being hit. It's worth noting as well that everything works as expected when the COM function returns as expected.  Can anyone provide any insight into this?

Example  int *ptr; *ptr = 1000;   can I catch memory access violation exception using standard C++ without using any microsoft specific.


Hello i got the problem that the Ubuntu live Stick black screen after starting.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I am looking for information about runtime of function, like "Include actual execution plan" in SqlServer, to know how much time took every function execution, there is any way? I am work in ASP.NET c# application vs 2003. Thanks.

We are using ' . What other profiling tools can be recommended that are better for profiling C#  applications?


Let $A$ be a $n\times n$ matrix over $\mathbb{C}$ satisfying $X^m-1$ for some positive integer $m$.    $a)$ Show that $A$ is diagonalizable over $\mathbb{C}$.  $b)$ Show that $tr(A)$ is a sum of roots of $X^m-1$.

Let $A$ be an $n\times n$ complex matrix. If $A^m=I_n$ for some positive integer $n$. How to show that $A$ is diagonalizable?


as we can see from the following grep recursive search  grep -r "<timeout>300</timeout>" /var/lib/ambari-server/resources/common-services/   /var/lib/ambari-server/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/AMBARI_INFRA/0.1.0/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/DRUID/0.10.1/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/FLUME/1.4.0.2.0/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/HAWQ/2.0.0/metainfo.xml:        <timeout>300</timeout> /var/lib/ambari-server/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml:        <timeout>300</timeout>  the files metainfo.xml under /var/lib/ambari-server/resources/common-services/ have the following content <timeout>300</timeout>  we want to change by find command the value 300 to 400 so expected results will be as the following on all metainfo.xml files  <timeout>400</timeout>  can this be achieve by find command? example from metainfo.xml file   <commandScript>     <script>scripts/service_check.py</script>     <scriptType>PYTHON</scriptType>     <timeout>300</timeout>   </commandScript>

under /etc/sysconfig/network-scripts ,  we have network configuration files as   ifcfg-conf1 ifcfg-conf2  . . .   is it possible to change all parameters - PEERDNS to no , if value is yes  expected results on all ifcfg-xxxx files  PEERDNS=no    wrong  ifcfg-xxxx files configuration   PEERDNS=yes   the reason for this change is because /etc/resolve.conf changed after reboot so we need to change all PEERDNS variables to no


Let $a_n$ be a sequence of real number such that the series $\sum_{n=1}^{\infty}|a_n|^2$ is convergent. Which of the following statements are correct  a. The series $\sum_{n=1}^{\infty}\frac{a_n}{n}$ is convergent   b. The series $\sum_{n=1}^{\infty}|a_n|^p$ is convergent for all $2<p<\infty$  c. The series $\sum_{n=1}^{\infty}|a_n|^p$ is convergent for all $1<p<2$  By Cauchy Schwarz inequality, first one is clearly convergent. Help me about b and c.

Given that $\sum^{\infty}_{n=1} a_n^2$ converges,then, will $$\sum^{\infty}_{n=1}|a_n|^p$$ converge for $p>2$?  I couldn't find a counterexample neither a proof but it looks to me that this is true. For $p=3/2$, I found the counter example $\sum a_n=\displaystyle \sum^{\infty}_{n=1} \frac{1}{n^{2/3}}$


I know that I can negate group of chars as in [^bar] but I need a regular expression where negation applies to the specific word - so in my example how do I negate an actual bar, and not "any chars in bar"?

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


I'm sorry some of you may mark this question as duplicate, but  even though I searched over about this I couldn't get satisfacory answer. Also I think this question is more related to biology, but I dont think I would get a satisfactory answer on biology forum.  I have had much intesest in color perception. I learned that color is just illusion of human brain to interpret electromagnetic spectrum. But though I'm physics grad student, I never questioned myself why there is no white color in visible ray spectrum. I realized that today. Sure thing, I learned when I was young that white color is    what we see when we see an object that reflect all the light.  But what do we mean by 'all the light' here? every illuminant has different spectral power distribution so even if an object reflects them all what we see would depends on illuminant. And what does it means that it reflects every light? surely not all the electromagnetic spectrum. Only visible rays? reflects 400nm but not 390nm? I'm not sure about that. Equal composition of RGB, three primary colors.  If you see the CIE color space picture with sRGB gamut on it, you would question whether we can call these colors 'primary'.      Yes we humans have three types of cones, but they don't correspond exactly to each color of RGB.   I thought white should be a extreme on certain measure (like lightness in 'conventional' term) but Im not sure which is corresponding scientific term. Or isnt white such a special color? just some 'appropriate' mixture of colors like RGB?  I read some articles about this on Wikipedia but I'm not sure I understood them because they use many technical terms in color science.

Different kinds of white light have a different spectrum.  Light from a white LED will have blue at the peak intensity while white light from a CFL or something else will have a different looking spectrum.  I don't understand how this works. Shouldn't pure white light have a unique spectrum no matter what?  For example, a certain white LED's spectrum looks like this:$\hspace{100px}$.


I'm new student with Java and I'm trying to make an app to see if the username and password do exist so I wrote this code and there in the main class I call this method and see if a = true or false.  i tried putting System.out.print statement in the while loop and it didn't show up which means the while loop doesn't works.   public void checkUserName(String username,String password) throws SQLException, ClassNotFoundException {   openconnection(); String query ="SELECT * FROM hema.employee"; Statement stm=(Statement) con.createStatement(); ResultSet rs; rs = stm.executeQuery(query);    while(rs.next()){           String un,pass;           un=rs.getString("UserName");          pass=rs.getString("PassWord");           System.out.println("hi your answer is "+ a);           if(un==username&&pass==password){                System.out.println("if Works");            a=true;            break;                                             }      }    }

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've answered this question for a new user that wasn't originally worded like a "do my work for me" type of question, but has since turned that way through discussion in the comments.   They have posted a link to their code and asked how they should tweak it, to which I responded with help.  Then they responded with something to the effect of "We're almost there. Just a few more tweaks. Try doing it with something like..."  They're very clearly trying to drag the complete solution out of me. How should I go about dealing with this OP?

I'm not sure if there's already an existing term for this, so I'm inventing my own. (tl;dr: I call them "chameleon questions" because they change every time you submit or edit an answer.  If you're already intimately familiar with the phenomenon, please skip past the first set of bullet points to where I ask for recommendations.)  I think many of us have experienced this on occasion:  You open up a narrow-looking question, usually dealing with some specific error message.  The question probably contains a snippet of sloppy but not quite awful code; code indicating that the author, typically a new/low-rep user, possibly a , doesn't really know what they're doing.  I'm not trying to be condescending here, they're probably very intelligent and hardworking, but in this specific case, they're clearly in way over their head.  However, as a question, it's not really too bad.  The goal and problem are both clearly stated.  The code is formatted (sort of).  Mort was polite and checked their spelling.  The question looks answerable, although from a rep perspective* it's an obvious dead-end, it's had maybe 3 views in the past 30 minutes.  So you decide, you know what, this person took the time to write up the question properly, they deserve an answer, put on your good citizen hat and throw them a bone.  You slog through the ugly code, find the offending line, direct their attention to it and explain why it's wrong and how it needs to be fixed.  Later, they leave a comment saying that yes, that was indeed the problem and your answer helped them fix it (great!).  Oh, but, now there's another problem (uh-oh...). Something else is broken.  After letting out a long sigh, you read the comment and/or edited question, roll up your sleeves, and write up Take 2, hoping that's the end of it.  And of course it's not the end.  Now maybe the error is gone, but it's not doing what it's supposed to.  If you're anything like me, your patience is now starting to wear thin. It's lousy code and you didn't volunteer to help them rewrite their whole app.  And of course, the question still only has 12 views, and nobody has upvoted either the question or your answer, including the person you're helping, so this is turning out to be a genuinely thankless task in all respects.  Welcome to "Family Tech Support", Web 2.0 Edition.   * Which is of course just an arbitrary number that none of us care about. Not really, anyway. Not very much, at least.  So, here's where I get to my question.  At this point, do you:  Leave a comment, stating as politely as possible that you've done your best to help them answer the original question they asked, and if they have a new problem then they should start a new question?  (I did this once, and actually ended up with an accept, but I felt kind of guilty afterwards, I don't think anybody answered their 2nd question).  Bite the bullet and edit your answer a 3rd, 4th, 5th time, however many times it takes to resolve their issue, knowing full well that they may not even remember to accept the answer once you're done? (I may work for free on SO, but that doesn't mean my time is worthless.)  Just abandon the question, hoping that it will force Mort to start thinking for himself?  Something else?   I've tried all three of the above and none of them ever quite feel right. I do want to help, but at the same time there are a lot more "lucrative" questions I could be answering. And I don't mind spending a lot of time on an answer either, if the question is interesting or important to me, but debugging is dull work. I'd prefer not to reference specific questions here; I'm pretty sure that this is a shared experience, and my objective isn't to point fingers at "misbehaving" members.  I'm more looking for some practical advice on how to dig myself out of these pits of despair. Anybody have any other ideas?


I need to extract the substring between "Design Brands > " and the first following pipe(|) character from of the following string:  "T-shirts|Brands > Port & Company|Design Brands > Montana Griz|Designs > TeamLB Griz > MTG31|T-shirts > TeamLB|T-shirts > Montana Griz"   This is within a google sheets function so I have to use Go's RE2 syntax  I would expect that the following expression would work  Design Brands > (.*)\|   However, the expression matches everything up to the last pipe in the string  "Montana Griz|Designs > TeamLB Griz > MTG31|T-shirts > TeamLB"  instead of everything up to the first occurance of a pipe in the string. I cant seem to figure out how to isolate just "Montana Griz" within a capture group.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I have a category table like this id    name      parent_id 1   category1     0 2     sub1        1 3     sub11       2 4     sub12       2  ... I have added a new column haschild If I try this query work ok SELECT CASE  WHEN  (select COUNT(*) from category A where A.parent_id = B.id) > 0 THEN 1 ELSE 0 END AS haschild from category B  That show me all categories having childrens with 1 and if have not childrens with 0 Now I neeed to update my new column haschild whit this values espected: id    name      parent_id   haschild 1   category1     0             1 2     sub1        1             1 3     sub11       2             0 4     sub12       2             0  I have tried UPDATE category SET haschild =  (SELECT CASE  WHEN  (select COUNT(*) from category A where A.parent_id = B.id) > 0 THEN 1 ELSE 0 END AS haschild from category B)  But got this error:  1093 - You can't specify target table 'category' for update in FROM clause  I have also reading some answers about this error in google and stackoverflow and I have understand that In MySQL, can not update one table by subquery the same table but I have not found something to solve my problem

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


What is the construction be + verb (perfect form)? I have come across it multiple times in legalese. For instance:     to ensure that every person be granted adequate assistance

In which cases should I use the subjunctive mood?     I suggest that every applicant fill out the form carefully.        If she were rich, she would live on Long Island.


I've been learning about Quantum Dynamics, time evolution operators, etc. I am confused about the notation used in integrals. Normally I am used to integrals written in this way (with $dx$ on the right side):  $$\int f(x)dx$$  In this manner of notation, I can easily see the integrand as it is sandwiched by the integral sign and the $dx$. However, I often see integrals written in this way (with $dx$ beside the integral sign):  $$\int dx f(x)$$ Is this notation not ambiguous? This is especially confusing for me when used in products, as I cannot identify what is the integrand sometimes. For example, I don't understand which is true in the following (when evaluating time evolution operator): $$\begin{align}\left(\int ^t_{t_0} dt' H(t')\right)^2\stackrel{?}{=}\int ^t_{t_0} H(t') dt'\int ^t_{t_0}  H(t'')dt''\\\stackrel{?}{=}\int ^t_{t_0} dt' H(t')\int ^t_{t_0} dt'' H(t'')\\\stackrel{?}{=}\int ^t_{t_0} dt'\int ^t_{t_0} dt'' H(t') H(t'') \end{align}$$  The last line is especially confusing for me as I'm not sure if the integrand changes. Could I please get clarification for these different notations? Is there a reason for such notation? (If I'm not wrong, it is to group the integrals and the integrands in separate places for convenience? I'm not sure if it sacrifices clarity for this though.)  EDIT: There is also an issue of when operators are involved: $$\begin{align}\int dx \hat{F}(x) \hat{G}(x)\stackrel{?}{=}\int \hat{F}(x)dx\hat{G}(x)\\\stackrel{?}{=}\int \hat{F}(x)\hat{G}(x)dx\end{align}$$ How do you know which operator is in the integrand? And assuming the general case where $\hat{F}$ and $\hat{G}$ do not commute, you cannot write the integral with $\hat{G}(x)$ on the left of the integral. How is this not ambiguous?

I've noticed that in QFT literature, integrals are usually written as $\int \!dx ~f(x)$ instead of $\int f(x) dx$. Why?


I sought the answer to the question about amplitude of light waves first, but I was actually thinking about whether the wavelength is the only property of a single quanta of light. I suppose direction may be another, since it can be focused.   Now my question is about wavelength only...do photons actually have a wavelength? Or is that only a property that can be measured based on interactions with other particles (as in, how the photon can affect the state of an electron)?

I picture light ray as a composition of photons with an energy equal to the frequency of the light ray according to $E=hf$. Is this the good way to picture this? Although I can solve elementary problems with the formulas, I've never really been comfortable with the idea of an object having or being related to a "frequency". Do I need to learn quantum field theory to really understand this?


We have known for quite some time now that light travels at a finite speed of 3x10^8m/s (approx) through vacuum. But why is that? Why can't the speed be infinite? Or at least higher than the current value? What is limiting its speed? I mean, the speed of sound is limited by the density of the medium. Then, what limits the speed of light in vacuum? Does finiteness of speed of light mean the possibility of existence of a omnipresent medium like aether, which, may be is intangible (or doesn't interact with the particles we know of currently)?    I do know that light is propagated by photons. That only makes me more curious as to why the speed is fixed to the current value? Especially as to WHAT is limiting the speed of a particle with no inertia?

I will try to be as explanatory as possible with my question. Please also note that I have done my share of googling and I am looking for simple language preferable with some example so that I can get some insight in this subject.  My question is what is so special about $c$? Why only $c$. Its like chicken and egg puzzle for me. Does Einstein reached to $c$ observing light or does he got to light using some number which turned out equal to $c$.   Why is $c$ not relative. If something has zero rest mass like a photon why they only travel at $c$ in vacuum and not with $c+1$ or $c-1$?


I am new to this, can anyone help me please?  it was said to me that SQL injection exploit can read sensitive data from the database with this way of coding. and I need to parameterize the SQL queries so that the application is not vulnerable to SQL Injection. can someone help me with that?  if(isset($_GET['n']))       {       $id=$_GET['n'];  $query= mysql_query("select * from announcements where announce_id=" . $id);  while($row= mysql_fetch_array($query))   this should do this for example: announcement.php?ann=223  thank you very much

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


Is it possible to add another Stack Exchange website?  For instance, Internal Combustion Engine.  Is there a vote page or something else?

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


So in many sources I have read that   A pure state contains only one element, since the only entry on the  density matrix will be 1.   But what about superpositions?  I mean a state like   $$\mid \psi\rangle = \alpha\mid0\rangle+\beta\mid1\rangle$$   for example is a pure state but it's corresponding density matrix can have 4 non-zero elements.  Why is it that these definitions seem to ignore superpositions?

I am currently trying to establish a clear picture of pure/mixed/entangled/separable/superposed states. In the following I will always assume a basis of $|1\rangle$ and $|0\rangle$ for my quantum systems. This is what I have so far:   superposed: A superposition of two states which a system $A$ can occupy, so $\frac{1}{\sqrt{2}}(|0\rangle_A+|1\rangle_A)$ seperable: $|1\rangle_A|0\rangle_B$ A state is called separable, if its an element of the (tensor)product basis of system $A$ and $B$ (for all possible choices of bases) entangled: $\frac{1}{\sqrt{2}}(|0\rangle_A|1\rangle_B+|1\rangle_A|0\rangle_B)$ is not a state within the product basis (again for all possible bases). mixed state: Is a statistical mixture, so for instance $|1\rangle$ with probability $1/2$ and $|0\rangle$ with probability $1/2$ pure state: Not a mixed state, no statistical mixture   I hope that the above examples and classifications are correct. If not it would be great if you could correct me. Or add further cases, if this list is incomplete.   On wikipedia I read about      Another way to say this is that while the von Neumann entropy of the whole state is zero (as it is for any pure state), the entropy of the subsystems is greater than zero.   which is perfectly fine. However I also read on wikipedia a criterion for :     Another, equivalent, criterion is that the von Neumann entropy is 0 for a pure state, and strictly positive for a mixed state.   So does this imply that if I look at the subsystems of an entangled state, that they are in a mixed state? Sounds strange... What would be the statistical mixture in that case?  Moreover I also wanted to ask, whether you had further illustrative examples for the different states I tried to describe above. Or any dangerous cases, where one might think a state of one kind to be the other?


Since I want to add line number in my manuscript, I have to wrap align environment into linenomath environment to have right numbering. I wanted to define new environment in preamble in which I want Latex to put the math inputting into these environments, but It didn't work. Can you help me please? Here is my codes.  \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[switch*, displaymath,pagewise, mathlines]{lineno} \leftlinenumbers \linenumbers  \newenvironment{Align}{\begin{linenomath*}  \begin{align}}{\end{align}    \end{linenomath*}}  \begin{document} \begin{Align} x+y=10 \end{Align} \end{document}

In the example below, an error is caused by \begin{align} and \end{align} but I do not see why:  \documentclass{book} \usepackage{amsmath} \newenvironment{subalign}{\begin{subequations}\begin{align}}{\end{align}\end{subequations}} \begin{document} \begin{subalign}      a&=b\\     &=b \end{subalign} \end{document}


When I read  the distance between Earth and Voyager 1 is decreasing.  Is it right?

The  of March 01, 2013 put it's distance at 14 hrs 04 mins 23 secs of light-travel time from Earth. A  (earlier today) tweet says it is 14 hrs 04 mins 22 secs of light-travel time from Earth. An  tweet put it still further out at 14 hrs 04 mins 25 secs of light-travel time.  The Voyager 2 tweets on Voyager 1's proximity to Earth too has reduced similarly to  earlier today from  reported on Feb 28 2013  It could quite simply be a typo ... If not a typo then my curiosity is piqued; I was under the impression the Voyagers are outbound from the Solar System now without any major in-system activities now.   How is it the Voyagers are closer to Earth than before?


Suppose $V$ and $W$ are finite-dimensioanl vectors spaces. Suppose $T\in\mathcal{L}(V,W)$ and $T'\in\mathcal{L}(W',V')$ where $T'$ denote the dual map of $T$ as defined in Axler (2015).     $\textbf{My Question}$: Are the dimensions of $W$ and $W'$ the same? If so or not so, what is the basic intuition behind this?   Reference: Axler, Sheldon J. $\textit{Linear Algebra Done Right}$, New York: Springer, 2015.

As an exercise in my textbook, I need to prove that if $V$ is a finite dimensional vector space with dual space $V^*$ over $\mathbb{R}$, then dim$(V)$=dim$(V^*)$.  Let $\omega\in V^*$ and let $\{e_1,...,e_n\}$ be a basis for $V$. Define $e^i\in V^*$ by $e^i(e_j)=\delta_{ij}$. We show that $\{e^1,...,e^n\}$ spans $V^*$. $\omega(v)=\omega(v_1e_1+...+v_ne_n)=v_1\omega(e_1)+...+v_n\omega(e_n).$ If $\omega(e_1)=\lambda_1,...,\omega(e_n)=\lambda_n$, then $\omega(v)=v_1\lambda_1e^1(e_1)+...+v_n\lambda_ne^n(e_n)$=$\lambda_1e^1(v)+...+\lambda_ne^n(v)$.   To show $\{e^1,...,e^n\}$ is linearly independent, suppose that $0=c_1e^1+...+c_ne^n$ is the zero mapping to $\mathbb{R}$. Consider the image of $e_1:$  $0(e_1)=c_1*1+...+c_n*0=c_1$ Hence, $c_1=0$. Repeating the procedure for $e_j$, $2\leq j\leq n$, we see that $c_1=c_2=...=c_n=0$.  Does this proof look correct?  If the proof is correct, I have an additional small question. It seems like this proof is dependent on the fact that $V$ is a real (or complex) vector space, since we define the covectors to have the image set $\{0,1\}$. Is there a proof that works for vectors spaces over general fields?


I have $x$- and $y$-data, and I want a power-law fit ($y=ax^b$). I always fit $\log(x)$ and $\log(y)$ by $p_1x+p_2$ (Matlab poly1), but when I fit $x$ and $y$ with $p_1x^{p_2}$, I did not get exactly the same result. Why?!  And what is the best way for doing this? First take logs then linear fit??

I have a set of values $x$ and $y$ which are theoretically related exponentially:  $y = ax^b$  One way to obtain the coefficients is by applying natural logarithms in both sides and fitting a linear model:  > fit <- lm(log(y)~log(x)) > a <- exp(fit$coefficients[1]) > b <- fit$coefficients[2]   Another way to obtain this is using a nonlinear regression, given a theoretical set of start values:  > fit <- nls(y~a*x^b, start=c(a=50, b=1.3))   My tests show better and more theory-related results if I apply the second algorithm. However, I would like to know the statistical meaning and implications of each method.  Which of them is better?


I need to check a value is a number. I have two solutions: typeof input !== 'number'  and isNaN(input)  What is the difference. Who choose one over the other?

I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?


I am connected to friends hotspot via wifi so I want to keep track of my data usage of her hotspot. So I am checking the WiFi data usage, but since its for 3 months its not very useful.  How can I reset the WiFi data usage to zero? That would help. But I dont see how to do it.

I'm using Android KitKat. I'm not able the clear the data usage of mobile data (Mobile) as well as Wi-Fi. Is there any option to clear the data usage in rooted and non-rooted Android devices?  (Click image to enlarge)    Somebody Please do help. Am using Non-rooted Android Device.


I have a RedHat setup with Apache and multiple users.  I gave each user a dir in /var/www/html to host their sites.  Sites are served, but cannot write files (eg. log files, uploads, cache files).  I have all the users as members of the group apache and the dir's have write access for the group.  Anything that I am forgetting to do here?  EDIT: Adding some details. Apache runs as 'apache' with group 'apache'.  All the users are in the apache group, as the user apache is in the users groups.

SELinux is preventing the apache user from writing to a log file which it owns. When I do setenforce 0 it works. Otherwise it shows this error  IOError: [Errno 13] Permission denied: '/var/www/webapp/k/site/k.log'   The security context of the file:  $ ll -Z k.log  -rw-r--r--. apache apache system_u:object_r:httpd_sys_content_t:s0 k.log   The file was created when the SELinux mode was set to permissive.  How to set the security context so the apache user can write in that directory? I did set that directory security context using chcon but I can't find a suitable file type.  From audit.log:  type=AVC msg=audit(1409945481.163:1561): avc:  denied  { append } for  pid=16862 comm="httpd" name="k.log" dev="dm-1" ino=201614333 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=file type=SYSCALL msg=audit(1409945481.163:1561): arch=c000003e syscall=2 success=no exit=-13 a0=7fa8080847a0 a1=441 a2=1b6 a3=3 items=0 ppid=15256 pid=16862 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)


Question:     Prove the following: if $A$ is an invertible $n × n$ matrix, then A is the change of coordinates matrix from some basis  $B$ of $\mathbb R^n$ to some basis $C$ of $\mathbb R^n$   I know this is true, but I have no idea how to even start solving this.

In the course that I am having, we are treating change of basis matrices as the matrices of the identity operation from one basis S to another basis say B.  So, our instructor introduced a theorem :      If A and B are similar, i.e., S−1AS = B for an invertible matrix S, then they have the same characteristic polynomial. In particular, they have the same eigenvalues, det(A) = det(B) and Trace(A) = Trace(B).   And hence came the question here... Is every invertible matrix a change of basis matrix?  Every change of basis matrix is certainly invertible, is the converse true?


As we know in Hilbert Space, a nonempty closed convex set always contains a element of smallest norm. I wanna find a example to show the convexity in some way is necessary. No loss of generosity, for simplification, let the domain be $[0,1]\subset R$.  Thanks.

Minimum principle is following: Let $M$ be a closed convex nonempty subset of Hilbert space. Then there exists $x\in M$ which have a minimum norm.  Assume that $M$ is not convex subset. What is a counterexample, when there have not the element with minimum norm in space $\ell^{2}$?


have faced below problem while writing query, not sure why it is happening Please find the below example   SELECT 21000.000000/22000.000000 * 22000.000000   sql engine result is 20999.999999999999990000000  But if you do the same through calculator, we will be getting 21000. Why is it like this? and how to achieve the calculator result with out rounding off

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


How can I grab the data which the browser sends to a server?   Is there any specific application for it?(windows and linux systems)

When using Google chrome there is a handy network monitor tool. However the chrome network tool only keeps track of the current open webpage.    There are a lot of complicated network monitor tools available and I only need the features of the chrome network monitor tool.   To keep track of all the browsers (Chrome, Firefox, IE etc.) activity I am searching for a tool that has the same idea and interface as the chrome network tool.  Someone knows a tool like that?    Some screenshots with the wished features:  A overview of all the files downloaded   when selecting a file you can nicely see the headers   And with the tab response the content of the body is visible


The stronghold seems to be really far away from my spawn point, and I end up losing all the 'eye of enders' I have. Any idea on how far a stronghold can be from a spawn point?(Since there can be just 3 in a world, I assume they can be really far away!)

I've been searching for hours in the game to find a Stronghold and haven't seen one. Apparently lots of mobs and treasures can be found there, but the question is where can we find those?  Can we find them near a ravine or abandoned tunnels?


i'm making a video game, and i'm having, i think, a concept problem. The game will be a platformer which will use tile maps, so to start i will create a mask matrix indicating the tiles to be loaded, and etc..., so my problem is, how to handle the scrolling? should i create a giant mask matrix indicating in each position of the whole level what is supposed to be loaded, and according to the position of the player, change the section to be drawed?? Is this a correct approach to this situation??

What is the most practical way to implement camera/viewport to a 2D-game?  I've read, that I should store the object world position instead of position relative to the screen?  Current situation:  I have implemented a simple 2D-game where I load objects and levels from XML-files. Currently the level XML-file looks like this:  <map>    <tile obj="ground" x="0" y="555" />    <tile obj="ground" x="16" y="555" />    <tile obj="ground" x="32" y="555" />    ... </map>   All objects have a 2d-vector "position" storing their current location on the screen.  What I want it to be:    In the picture:   Camera is either 800x600 or 640x480 Blocks and sprites are 16x16 pixels. World size may vary The coordinates probably should be normalized relative to the world, not to the screen? Viewport position relative to player's x, y and moves when the player reaches camera dead zone (similar to ).   I'm asking pseudo examples / articles, but if you need to know what I'm using for the development: SDL & C/C++.


The following code does not compare two date.  var dateTextB=columns[0];         var dateB = new Date(dateTextB);          alert(dateA+' '+dateB);          if (dateA==dateB)         {         // code         }          dateA= new Date(dateTextB);   That prints   Mon Aug 18 2014 23:30:00 GMT+0600 (Central Asia Standard Time)----------Mon Aug 18 2014 23:30:00 GMT+0600 (Central Asia Standard Time)  But Does not fulfill if condition. But prints same values sometimes.  I  have tried  if (dateA==dateB.getTime()) also.  Does anyone know what is wrong here?

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


When querying:     Where is your mother at?   Is that considered to be proper English language usage?  Alternatively, you could just state more simply:     Where is your mother?   Is adding the trailing preposition considered slang here, does it have no value and should it just be eliminated?

I want to use something like this in a cartoon, animated banner advertisement:     Where my employers at?   or      Where my entrepreneurs at?   Are there connotations of the phrase I should consider, for example is it too slangy or is its use too closely linked with hip hop culture to be acceptable in the business sector?


I have the following code: int main() {     char *input = "why isn't this possible?";     input[0] = 'W';     return 0; }  I want to modify the first value of the string, but it appears to cause an access violation on the input[0] = 'W'; line. Any ideas why this is happening. Oddly I don't recall this error happening on my old machine running Visual Studio, but happens with GCC and Pellas C.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I suspect that I totally goofed and too eagerly retagged  with  based on  following a comment on the question.  Upon noticing that the question was then the only one tagged [serverfault], I did ...and now suspect that I did something unholy: I subsequently dropped the [serverfault] tag that I added to the question.  (This just keeps getting messier I know....)  :/  What confuses me is that the  led me to believe that [serverfault] was an appropriate tag to use...and post-dates the  that led me to think I resurrected a demon; but the second round of MSO reading included Jeff Attwood's rather unflattering thoughts on the tag (or maybe more specifically [belongs-on-serverfault] - same meaning I think, though).  (Yes, "confuses" is mild.  I am totally confused at this point!)  :}  Bottom line, the SO  tag I seem to have created(?) still exists but now has no questions tagged with it: should/would someone please delete it?

During the re-tagging of questions, tags sometimes become orphaned from existing questions.  Are these zombie tags ever removed from the ?  What if a tag is misspelled and needs to be removed? How do we get rid of it?


In Ubuntu 14.04, the passwd executable is  -rwsr-xr-x 1 root root 47032 gen 27 01:50 /usr/bin/passwd   and the ping executable is  -rwsr-xr-x 1 root root 44168 mag  7  2014 /bin/ping   so (for both) the uid of the running process should result root, even when they are ran from a regular user. If I run passwd from user1, in fact, I obtain  $ ps -aux | grep passwd root      4317  0.0  0.0  85940  2004 pts/0    S+   10:24   0:00 passwd   but if I run ping from user1 it is not the same:  $ ps -aux | grep ping user1    4362  0.0  0.0   6500   632 pts/0    S+   10:29   0:00 ping 192.168.8.1   Why the uid of the process has been set to root in the first case and not in the second one?

Ping is a a program owned by root with the user id bit set.  $ ls -l `which ping` -rwsr-xr-x 1 root root 35752 Nov  4  2011 /bin/ping   As I understand it, if a user runs the ping process, then the effective user id will change from the real user id (i.e. the user id of the person who launched the process) to the user id root. However when I try this and look at the output of ps to see if the ping process is running as the root user, I still get the real user id showing.  ps -e -o user,ruser,euser,cmd,args | grep ping sashan   sashan   sashan   ping -i 10 -c 1000 www.goog ping -i 10 -c 1000 www.google.com


I am writing a small paper for my school using LaTeX.  In LaTex, the default figure numbering is done per-chapter ( 1.1, 1.2, 1.3, 2.1, 2.2, etc)  However, my school's guidelines specify that figure numbering should be done progressively. (1, 2, 3, 4, 5, etc)  I'm sure that there is a simple way to do this in LaTeX, but I have not been able to find any documentation about this yet.

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


25 horses, 5 race tracks; we need to choose the top 3 horses. What is the minimum number of races you need?  I have thinking deeply and figure out this: First race all 25 horses in groups of 5 to figure out the top 3 in each group (which will leave 15 horses). Call them: A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 Here, A1 is faster than A2. A2 is faster than A3. The same applies for the rest of the groups. Now race A1, B1 C1 D1 E1 Lets say the order of the horses according to ranking was A1, B1,C1,D1,E1  So A1 is No 1. Now A1 is faster than B1 and B1 is faster than C1. So we can get rid of the entire D and E groups. 9 horse remain. Also, A1 is faster than B1 and B1 is faster than C1. So we can get rid of C2 and C3. Now 7 horses remain. A1 is faster than B1. B1 is faster than B2. Get rid of B3, and 6 horses remain.  Out of these, we know A1 is the fastest. So now race A2, A3, B1,B2,C1 to figure out No 2 and No 3 positions.

There are $25$ horses. You can take $5$ horses at a time and race them. Each horse always finishes the race in the same amount of time, and there are no ties. The only information you get from each race is the order that the $5$ horses finished in. What is the smallest number of races you need to find the $3$ fastest horses, in order?   I found this problem on  and cannot figure out the best answer. Please help.


Let $K$ be a convex open set in $\mathbb R^n$ and $f$ a convex function defined on $K$; how to show that $f$ is continuous?

I'm trying to solve the following problem:  Let $f:K\rightarrow \mathbb{R} $, $f$ convex and $K \subseteq \mathbb{R}^n$ convex. Then $f$ is continuous on $K$.   I have proved the only case $n=1$, but for an arbitrary $n$??


The sieve of Eratosthenes is an algorithm to calculate all the primes up to $n$. It works by iterating $i$ from $1$ to $n$, and at each time strikes out the multiples of $i$. In many optimizations, I'm seeing that we can actually stop at  $i \leq \sqrt n$ but I don't understand why. The explanations I found are all based on this hypothesis:  Every composite number has at least one prime factor that's smaller than its square root.  Though I understand this hypothesis, I can't draw a conclusion with it. Programmatically, I see that it makes sense if we consider an optimization on how we'd strike the multiples of $i$ by starting from $i^2$: we'd end up striking the multiples of $\sqrt n$ starting at $n$, so there's no point in iterating $i$ further. But mathematically, I don't see how by stopping at $\sqrt n$, we can be sure that all the remainings unvisited integers are primes with the sole hypothesis above. Thanks a lot for your hints. EDIT: I see that my question is associated with another question, but if you read the other thread, OP specifically stated they don't want to know why we can stop at $\sqrt n$ but why we are picking $\sqrt n$.

I have a question about Sieve of Eratosthenes,   I refer at the "simply version" :   If I have an $\boldsymbol{n}$ and I want the prime numbers up to n,  I search and delete multiply up to  $ \leqslant \sqrt n $ .   For example:  $ n = 28;   \sqrt n = 5,29 $  After 5 I'm sure that I haven't delete multiply but I will find only prime numbers.   Now my question isn't how does it work, and why it is work..  But my question is why $ \sqrt n $ ? and for example why not $ \log n $ (is an example for trying to pass my question) How do you get to think that the $ \sqrt n $ has the power in this context?  How do you get to think that the $ \sqrt n $ assures me that there aren't more multiples to be erased?  Is there an explanation? graphic, numerical, of any kind? Thanks!


Given an undirected graph $G=(V,E)$ Prove the following a) Let $|V|=m$ and $|E|=n$. It holds that $2n\leq m^2−m$ b) If $|V|>3$ and $\not\exists v_0∈V:d(v_0)=1$, then there is a circuit in $G$. I need some help to prove a) and b). I know for b) if there are no cycles $G$ is a tree and the edges are $m - 1$ but that's about it. Thanks in advance to anyone who can help!

Given an undirected graph $G = (V,E)$ Prove the following a) Let $|V| = v$ and $|E|= e$. It holds that $2e <= v^{2}-v$ b) If $|V| > 3$ and $\exists! v_{0} \in V: d(v_{0})=1$, then there is a circuit in $G$.


This question is from Kenneth Ross' Intro to Real Analysis book.  Evaluate $$\lim_{n \to \infty} \sum\limits_{k = 1}^{\infty} \frac{1}{n+k}$$  So far what I have is if $a_i$ is $\frac{1}{n+i}$, $\lim_{n \to \infty} a_i = 0$, which would mean the limit of the entire sum is zero. This doesn't seem right to me - the hint I was given for it was to write it as a Riemann sum and then express it as an integral, which makes this answer too easy. Is this correct, and if not, how do I express this as a Riemann sum?

I need help finding the following limit.  $$\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k+n}$$


I have two boxes, one with ten balls, eight white and two black and the other with ten balls, four white and six black. Without seeing I choose a box and choose three balls from this.  What is the probability that the fourth ball I'll choose is black if the other three are not all white?   $E$ = the fourth ball is black  $A$ = the three balls are ALL WHITE  Then $P(E) - P(E|A)$ will give me what I need.  I think I am ok with $P(E|A)$.  For $P(E)$:  $C$ = I choose first box and $D$ = I choose second box  $P(E) = P(E|C) \cdot P(C) + P(E|D) \cdot P(D)$  I will find $P(E|C), P(E|D)$ from the right groups of four balls  So, if $a$ is a white ball and $b$ is a black ball then:  For the first box: $aaab, baab, abab, aabb$ I sum the possibilities for all these groups and I get $P(E|C)$.  For the second box:  $aaab, baab, abab. aabb, bbab, babb, abbb, bbbb$ I sum the possibilities for all these groups and I get $P(E|D)$.  The other thing I thought was: $E$ = the fourth ball is black  $B$ = the three balls are NOT all white  Then $P(E|B)= \frac{P(E \cap B)}{P(B)}$

I have two boxes, one with ten balls, eight white and two black and the other with ten balls, four white and six black. Without seeing I choose a box and choose three balls from this.  What is the probability that the fourth ball I'll choose is black if the other three are not all white?    My question is: Can I find the probability that the fourth ball is black if the other three balls are all white and then count $ 1- $ this probability?   I solved my question. For the exercise, that's my trying:   $E$ = the fourth ball is black  $A$ = the three balls are ALL WHITE  Then $P(E) - P(E|A)$ will give me what I need.  For $P(E)$:  $C$ = I choose first box and $D$ = I choose second box  $P(E) = P(E|C) \cdot P(C) + P(E|D) \cdot P(D)$  I will find $P(E|C), P(E|D)$ from the right groups of four balls  So, if $a$ is a white ball and $b$ is a black ball then:  For the first box: $aaab, baab, abab, aabb$ I sum the possibilities for all these groups and I get $P(E|C)$.  For the second box:  $aaab, baab, abab. aabb, bbab, babb, abbb, bbbb$ I sum the possibilities for all these groups and I get $P(E|D)$.


The task is to calculate the following determinant by using the properties of a determinant: $$\begin{vmatrix}         n^2 & (n+1)^2 & (n+2)^2 \\         (n+1)^2 & (n+2)^2 & (n+3)^2 \\         (n+2)^2 & (n+3)^2 & (n+4)^2 \\         \end{vmatrix}$$ Hint: The result is $-8$.

Today, at my linear algebra exam, there was this question that I couldn't solve.   Prove that $$\det \begin{bmatrix}  n^{2} & (n+1)^{2} &(n+2)^{2} \\  (n+1)^{2} &(n+2)^{2}  & (n+3)^{2}\\  (n+2)^{2} & (n+3)^{2} & (n+4)^{2} \end{bmatrix} = -8$$   Clearly, calculating the determinant, with the matrix as it is, wasn't the right way. The calculations went on and on. But I couldn't think of any other way to solve it. Is there any way to simplify $A$, so as to calculate the determinant?


Before you downvote, I don't propose that any user that gets spam flagged would be instantly destroyed. Read on.  In the recent spam wave, I've noticed how the flagging system works. People very quickly reach the magic 6 spam flag count, and the post gets annihilated. That's good.  However, there are problems with that:   These spam flags get cleared from the queue. So mods won't see them nor be able to destroy the user effectively, without some sort of pointer, or manual lookup at the recent flags. Spam flags induce a -100 reputation penalty, which is 100% useless since the user always have 1 reputation point, and will not get lower.   My suggestion is as follow, if ALL of the following are true:   The user only has one post. The user only has one reputation (meaning that his only post was never upvoted). The user's only post has reached 6 (or more?) spam flags The user registered less than a week ago.   If all of the above are correct, the user should be automatically destroyed. That's what us mods do, why not automate the process?

My common workflow when I see a blatant spam post by a 1 rep user is:   flag as spam (when I'm a mod this auto-deletes) go to user profile As a mod, I destroy the user. As a regular user I spam flag the other spam posts linked from the profile   These are a bit more clicks than absolutely necessary. While it is not terribly important to optimize this, it would be nice if we could perform these steps with even less effort.  My main assumption is that a 1 rep user that has one of their posts flagged as spam until deletion is almost certainly a pure spammer. I might be wrong there, but I've never seen an example that violates this rule.  Having to go to the profile is an unnecessary step, but I always do that to determine if the user has created more spam posts. Destroying is also not necessary, but it is quicker if the user has multiple posts, and if I have to go to the profile anyway it's also only a few clicks away.  To make this quicker, I suggest that users that have never earned any reputation and that have all their posts deleted by spam flags should be auto-destroyed. Destroying accounts doesn't really slow down spammers much or at all, but it is somewhat tidier and many mods do it anyway, even for single post spammers. It would also serve as feedback that this user can't possibly have more spam posts, preventing other users from checking the user's profile without need.  When I spam flag a post from a 1 rep user as a mod, I'd like to get immediate feedback on how many other posts the user has, and maybe even a quick way to directly preview those posts and destroy the account.  This would of course not happen for posts from real, active users due to the 1 rep limitations. Excessive self-promotion and other borderline spam issues are usually not dealt with by account destruction. This restriction also severely reduces the potential for abuse of this feature.  As for leaving accounts alive to gather information about spam URLs and/or IPs, this is something that should happen behind the scenes anyway that that we mods should not have to think about. The community and mods provide enough information by spam flagging, it would just have to be collected and aggregated by SE internally (and maybe this already happens).


After trying to install Acroread I did try to  to remove it, with no success,  the message follows. Please help me because the software center was disabled as the result  sudo apt-get remove acroread Reading package lists... Done Building dependency tree        Reading state information... Done Virtual packages like 'acroread' can't be removed You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  acroread-bin:i386 : Depends: libfontconfig1:i386 (>= 2.9.0) but 2.8.0-3ubuntu9.1 is to be installed                      Depends: libxml2:i386 (>= 2.6.27) but it is not going to be installed                      Depends: libxt6:i386 but it is not going to be installed  google-chrome-stable:i386 : Depends: xdg-utils:i386 (>= 1.0.2) but it is not installable  libxml2 : Depends: liblzma5 (>= 5.1.1alpha+20120614) but 5.1.1alpha+20110809-3 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I've downloaded and installed Android Studio and also added the path to my .bashrc  export PATH="~/android-studio/bin/:$PATH"   What I'm looking at now is that one command which will launch android studio from anywhere in the Ubuntu file system. For example if I type subl or atom anywhere it opens up the respective editor. Can something like that be done here?

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


Let $f(x)=7x^{32}+5x^{22}+3x^{12}+x^2$. Find the remainder when $x^2+1$ divides $f(x)$ and $xf(x)$.  I tried this problem two ways, substituting $x=1,-1$ in $f(x)$ to find the remainder, and by long division, but, that's not getting me to the answer. I think there is a shorter and elegant technique for solving this question. Please help. Thank you.r

Let $f(x) =7x^{32}+5x^{22}+3x^{12}+x^2$. (i) Then find the remainder when $f(x)$ is divided by $[x^2+1]$. (ii) Also find the remainder when $xf(x)$ is divided by $[x^2+1]$. Given both the remainders will be of the form $4(ax+b)$. The 'polynomial long division method' can be applied, but that won't be logical enough, because its too long a process. Can you tell me any other shorter & easier process? Thanks.


I have implemented a server client chat program using GUI. When the server is run, the client tries to connect to the server. When connection established, each one sends a message first, then chat, i.e, in my case, the client send the server a msg "client" and then the server sends a msg "server". Then they can chat. Problem is the server receives the msg "client" and the client does not receive the msg "server". At client console, nullpointerexception is occurred. And after that, only the server can send messages to the client and it is displayed at client side.  The codes are shown below and an image is attached for the GUI. Both client and server have same interface. Note that codes for GUI components are not shown for simplicity. The method private void msg_sendActionPerformed is for the SEND button - see the GUI image.   error: Exception in thread "main" java.lang.NullPointerException at chatapp.client.main >> chatmate.setText(sss);   import java.io.*;  import java.net.*;   public class server extends javax.swing.JFrame {   static ServerSocket ss; static Socket s=null; static PrintStream p; static BufferedReader b;   private void msg_sendActionPerformed(java.awt.event.ActionEvent evt) {                                                String m;     m=msg_text.getText();     p.println(m); }                                               /* Create and display the form */     java.awt.EventQueue.invokeLater(new Runnable() {         public void run() {             new server().setVisible(true);         }     });      String msgin;     ss = new ServerSocket(444);     s=ss.accept();      p = new PrintStream(s.getOutputStream());     b = new BufferedReader(new InputStreamReader(s.getInputStream()));     String sss = b.readLine();     chatmate.setText(sss);     p.println("server");      while (!(msgin=b.readLine()).equals("exit"))     {           msg_area.setText(msg_area.getText()+"\n"+msgin);       } }   }   package chatapp;   import java.net.*;  import java.io.*;  public class client extends javax.swing.JFrame {  static Socket s; static PrintStream p; static BufferedReader b;   private void msg_sendActionPerformed(java.awt.event.ActionEvent evt) {                                              // TODO add your handling code here:     String m;     m=msg_text.getText();     p.println(m); }                                                /* Create and display the form */     java.awt.EventQueue.invokeLater(new Runnable() {         public void run() {             new client().setVisible(true);         }     });      s = new Socket("localhost",444);     p = new PrintStream(s.getOutputStream());     b = new BufferedReader(new InputStreamReader(s.getInputStream()));     p.println("client");     String sss= b.readLine();     chatmate.setText(sss);     String msgin;     while (!(msgin=b.readLine()).equals("exit")) // waits until gets msg     {          msg_area.setText(msg_area.getText()+"\n"+msgin);       }  }   }

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?


Assuming perfect technique and material, how does the mass of a ski jumper affect the performance?  The higher potential energy of heavier jumpers could favour heavier jumpers, but then also friction and air drag would play a role.   How do these factors depend on the mass and why are lighter jumpers favoured?

Does a ski racer with a greater mass have an advantage over a racer with a lesser mass?  If mass of one racer is 54 kg and the mass of a more slender racer is 44 kg I know the speed at which they descend should be equal if they were to fall in a vacuum. How does friction force, air resistance and momentum play a part in determining the advantage or disadvantage of larger mass in ski racing?


I have an old laptop which had an HDD failure. So I'm trying to fix it... got a new 128gb Solid state HDD. However, the windows(visa) sticker with the product code has over time lost some of the letters. I found ubuntu as a free OS alternative. I have formatted the new HDD using an external SATA caddy and can view it using my netbook (no cd drive or usb stick).   How can i setup a bootable ubuntu install on the new external SSD so when i plug it into the laptop i am attempting to fix, it all boots up correctly?  Many Thanks.

I would like to see a full how-to guide on how to install Ubuntu.


This is a pretty basic question, but one I am having a hard time finding an answer to. How do you calculate the likelihood of a simple linear model? Like, say, $$y=\beta_0+\beta_1x+e$$ I am working on model selection via AIC and would like to have a better sense of how it works.   edit: So I think I figured it out. When calculating the likelihood of a linear regression you are actually calculating the likelihood of the residuals. In the case that the residuals have a normal distribution the least-squares and maximum-likelihood parameter estimates are mathematically equivalent, but if you have a different distribution of residuals this will not be the case. Is this correct?

I am new to Machine Learning, and am trying to learn it on my own. Recently I was reading through  and had a basic question.   Slide 13 says that "Least Square Estimate is same as Maximum Likelihood Estimate under a Gaussian model". It seems like it is something simple, but I am unable to see this. Can someone please explain what is going on here? I am interested in seeing the Math.   I will later try to see the probabilistic viewpoint of Ridge and Lasso regression also, so if there are any suggestions that will help me, that will be much appreciated also.


I have accepted as postdoc researcher in a Swedish university. Three professors in the university are correspondent for this position. I have to travel to Sweden within 2 weeks and start my new job. However, I should make sure about some issue before leaving my homeland. They all are so quick in answering. However, I sent them a short e-mail but did not receive any reply from 10 days ago. I don't  know what I should do. Does such a behavior mean "No"? Or am I annoying them because of my e-mail?

As a grad student, I just find it tremendously frustrating when emails are ignored by faculty (both at my institution and at other places). Is this acceptable? I'd be content with a simple response with one line along the lines of "I have read this email and am busy right now, will respond in X days when I can write a more detailed email." I understand that, as a first year student in my field, I'm not really in a position to request anything of anyone, but it just seems like common decency.  Instead, I never hear back, as if my email has been jettisoned off into oblivion.


I am trying to install Ubuntu 15.10 from the directions .  My machine is a Windows computer running Windows 10, which was upgraded from Windows 8.1 several months ago.  When I try to run the installer, after the "For best results page" I get the message:  "This computer currently has no detected operating systems"   which I did not see when I just installed Ubuntu from the same USB stick on my Windows 7 machine.  I have toyed around with all of the boot options in the BIOS such as:   Having the computer boot in UEFI mode (default) (no change) Having the computer boot in "legacy os mode"   Finally, turning fast boot off made one difference.  Now, when tying to install I immediately get this message (before it asks about any partitioning):    clicking try again always fails, clicking continue anyway leads me to the screen where I selected where I am located but I am not sure I want to continue with that installation.  I would appreciate any help.

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


I have a Raticate which, according to , either has Att/Def/Sta of 8/13/11 or 14/1/11. One of these is considerably more "perfect" than the other, but they both result in identical CP and HP stats at every level.  Given there's never any difference in their CP or HP, is there actually any difference between an 8/13/11 Raticate and a 14/1/11 one?

Every pokémon has 3 base stats: stamina, attack, defense. Stamina determines a pokémon's HP. However, I still don't understand what attack and defense do. If pokémon use moves that deal a fixed amount of damage (e.g. Vine Whip does 7 damage), why do attack/defense stats matter?   For example, Venusaur has a higher attack stat than Bulbasaur (198 vs. 126). Both of them can use Vine Whip. Wouldn't they both deal the same amount of damage? So why does it matter that Venusaur has a higher attack stat than Bulbasaur?  I feel like there should be some kind of equation that uses the attack stat of the attacker, and the defense stat of the defender in order to modify the damage in some way. Otherwise, these two stats seem irrelevant.  Note that I am not talking about Type Effectiveness or STAB. I know how those modify the damage. I'm asking about how the attack and defense stats that pokémon have modify the damage they do.     "V0001_POKEMON_BULBASAUR"   ...       Stats {         BaseStamina: 90         BaseAttack: 126         BaseDefense: 126   }   "V0003_POKEMON_VENUSAUR"   ...       Stats {         BaseStamina: 160         BaseAttack: 198         BaseDefense: 200       }


import java.math.BigInteger;  public class PascalsTriangle {      public int row = 0;     public BigInteger[][] pascal = new BigInteger[ (int) (row +1)][];      public PascalsTriangle(int dimension) {         row = dimension + 2;         pascal  = new BigInteger[row +1][];         pascal[1] = new BigInteger[1 + 2];         pascal[1][1] = new BigInteger("1");          for (int i = 2; i <= row; i++) {             pascal[i] = new BigInteger[i + 2];              for (int j = 1; j < pascal[i].length - 1; j++) {                 pascal[i][j] = pascal[i - 1][j - 1].add(pascal[i-1][j]) ;             }         }     }      public BigInteger getface(int row, int column) {         return pascal[row][column];      } }   I was trying to print a pascals triangle but the integer requirement for me is very high, i.e more than the max value of long, so I used BigInteger.  But I'm getting a NullPointerException at the part where I add BigIntegers in the class PascalsTriangle.  Is this the right way to add a 2 dimensional BigInteger array?


I have a table with the following structure:  PERSON   Sequence    TEXT   1        1         John ran   1        2         across the field   2        1         Bill also   2        2         ran across the field after John     I would like to write a query that produces the following result:   PERSON   TEXT  1        John ran across the field  2        Bill also ran across the field after John   Is something like this possible with T-SQL

To illustrate, assume that I have two tables as follows:  VehicleID Name 1         Chuck 2         Larry  LocationID VehicleID City 1          1         New York 2          1         Seattle 3          1         Vancouver 4          2         Los Angeles 5          2         Houston   I want to write a query to return the following results:  VehicleID Name    Locations 1         Chuck   New York, Seattle, Vancouver 2         Larry   Los Angeles, Houston   I know that this can be done using server side cursors, ie:  DECLARE @VehicleID int DECLARE @VehicleName varchar(100) DECLARE @LocationCity varchar(100) DECLARE @Locations varchar(4000) DECLARE @Results TABLE (   VehicleID int   Name varchar(100)   Locations varchar(4000) )  DECLARE VehiclesCursor CURSOR FOR SELECT   [VehicleID] , [Name] FROM [Vehicles]  OPEN VehiclesCursor  FETCH NEXT FROM VehiclesCursor INTO   @VehicleID , @VehicleName WHILE @@FETCH_STATUS = 0 BEGIN    SET @Locations = ''    DECLARE LocationsCursor CURSOR FOR   SELECT     [City]   FROM [Locations]   WHERE [VehicleID] = @VehicleID    OPEN LocationsCursor    FETCH NEXT FROM LocationsCursor INTO     @LocationCity   WHILE @@FETCH_STATUS = 0   BEGIN     SET @Locations = @Locations + @LocationCity      FETCH NEXT FROM LocationsCursor INTO       @LocationCity   END   CLOSE LocationsCursor   DEALLOCATE LocationsCursor    INSERT INTO @Results (VehicleID, Name, Locations) SELECT @VehicleID, @Name, @Locations  END      CLOSE VehiclesCursor DEALLOCATE VehiclesCursor  SELECT * FROM @Results   However, as you can see, this requires a great deal of code.  What I would like is a generic function that would allow me to do something like this:  SELECT VehicleID      , Name      , JOIN(SELECT City FROM Locations WHERE VehicleID = Vehicles.VehicleID, ', ') AS Locations FROM Vehicles   Is this possible?  Or something similar?


If the Dark Mark was branded on the left forearm of all the Death Eaters, then why didn't the Ministry just check their arms? That would prove if they were under the Imperious curse or not.

How did Barty Crouch Jr. and the other Death Eaters not get caught by the Ministry, when they have tattoos on their arms of the Dark Mark? Is the use of a cloak alone enough, no raids on their body parts? Even Barty Crouch Jr's father was shocked when he was revealed to be a Death Eater.


my price calculator doesnt works after a ajax call. I hope someone can help me.  ajax call     Price calculator     HTML
Gesamtpreis: 0,00 EUR

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 am learning oop in python so i am having some problem to understand sefl keyword properly.   Suppose a program :  class ge:    def __init__(self,a,b):       self.p=a       self.l=b    def ff(self):       aaa=self.p+self.l       print(aaa)  hh=ge(1,2) hh.ff()   I am confuse why its necessary to use any string with self with dot ? what it means ? Like:  self.a=a and we can change self.a to ay string like self.b , self.c what it means ?? why its necessary ?  My second question is :  what is difference between defining class with parameter and without parameter ?  class hello(object):    def __init__(self,a,v):       self.a=a       self.v=v    def p(self):       f=self.a+self.v       print(f)  he=hello(1,2) he.p()   if i defined  class hello(object) its working but  if i defined class like: class hello(): its also working  but if i defined like: class hello:  its also working   what is the difference class hello(object):  , class hello(), class hello:

I'm learning the Python programming language and I've came across something I don't fully understand.   In a method like:  def method(self, blah):     def __init__(?):         ....     ....   What does self do?  What is it meant to be?  Is it mandatory?  What does the __init__ method do?  Why is it necessary? (etc.)  I think they might be OOP constructs, but I don't know very much.


I've used Linux and FreeBSD as my main desktop environments from 2000 to 2006. Back then we would have to edit keyboard maps to make Portuguese Brazilian work. Since then, I stopped using Linux as desktop and moved to MacOS because it was very time consuming to just get things done.  I've been hearing about all the evolution of the Linux desktop in the last decade and a couple of weeks ago I just bought a new Dell XPS preloaded with Ubuntu 16.04 and what a surprise... I just can't get my keyboard to work correctly!  At first I couldn't get it to write the cedilla "ç" using US-international. By following the instructions in  I could get it to work, but now all consonants get "accented" (.e.g., '+s becomes ś or '+r becomes ŕ), which is just not possible in Portuguese. The expected behavior would be 's or 'r.  Why is it so difficult to just get things right?  I would like to know if is there any solution or workaround to this problem.  EDIT: Someone marked this as duplicate of another question on how to use multiple languages. This is not the issue here. My question is how to make Ubuntu/Linux correctly work to write Brazilian Portuguese using a US keyboard.  In other words, typing ' followed by s should output 's and not ś, meanwhile typing ' followed by a should output á and typing ' followed by c should output ç.  So, the question is how do I get this behavior?  EDIT: As I got no real answer I coded a small ibus input method, based on ibus-tmpl for solving this. Probably not a good solution, but the quickest workaround I could find. It is available on

How can I have one keyboard input layout and multiples languages in Ubuntu 17.10? If I have English language I can't type "'e" and get an "é", as I can do in Portuguese and Spanish.  When I manage to do that on Settings -> Region & Language, I'm able to change languages, but it also changes the keyboard layout.  Is there any way to change language (Portuguese or Spanish for example) and set the keyboard input layout (US International for example)?


I try to update my account at Stack Overflow, but see this error:  Oops! There was a problem updating your profile: This email address is already registered. If it belongs to you, log in above or visit our account recovery page to get access to this account.  Do I have the same problem as ? Or something else is going on?

I think I accidently created two accounts and now I cannot change my username:      Oops! There was a problem updating your profile: •This email address is already registered. If it belongs to you, log in above or visit our account recovery page to get access to this account.   I did the recovery process but that did not help! I know that this question was asked multiple times but I cannot find a solution for me. Similar topics for example:    How to merge?


Hello to everyone! I found this image in one of the topics called «». Is this a «cutting mat» theme? Where can i find it? Thanks!

I'm trying to change the Viewport background color. But I can't seem to find the right settings.    Anyone knows where to find it?


I'm reading a .pdf file about Probability.  the link  The author introduces the lemma 4.1, suggesting to consult the proof in a specific book. I tried to search the lemma in the book but i didn't find it. Please help me to find a name for this lemma so as i can consult its proof...     Lemma 4.1. Let $Z_1, Z_2, \dots$ be a sequence of random variables having distribution functions $F_{Z_n}$ and moment generating functions $M_{Z_n}$ s.t. $n \geq 1$. Furthermore, let $Z$ be a random variable having distribution $F_Z$ and moment generating function $M_Z$. If $M_{Z_n}(t) \to M_Z$ for all $t$, then $F_{Z_n}(t) \to F_{Z}(t)$ for all $t$ at which $F_Z(t)$ is continuous.

I know that if the moment generating function of two distribution converges to the same function then the two distribution converges in CDF. But how can we prove this thing explicitly ?


Let $A$ be the Cantor set and   $B = \pi\, (-A \cup A)$.  Is B a perfect set with no rational numbers?

Give an example of a perfect set in $\mathbb R^n$ that does not contain any of the rationals.  (Or prove that it does not exist).


I am totally lost for words, i have no idea what's going on...   //import java.util.Random;  public class TestInProgress {     public static void main(String[] args) {         long start, end;         long average;  //      Random random= new Random();      for(int j=0; j<5; j++) {          average= 0L;         for(int i=0; i<100; i++) {              start= System.nanoTime();                 double temp= fastComputeSigm(0.0);             end= System.nanoTime();             average+= (end - start);         }          average= average/ 100L;         System.out.println("AVERAGE FASTCOMPUTE: "+average);          average= 0L;         for(int i=0; i<100; i++) {              start= System.nanoTime();                 double temp= Math.exp(0.0)/(1.0 + Math.exp(0.0));             end= System.nanoTime();              average+= (end - start);         }          average= average / 100L;         System.out.println("AVERAGE SIGMOID: "+average);     } }  static double fastComputeSigm(double value) {     return 0.0; }   }  The most surprising is the output:     AVERAGE FASTCOMPUTE: 98 AVERAGE SIGMOID: 38625 AVERAGE FASTCOMPUTE:   106 AVERAGE SIGMOID: 65 AVERAGE FASTCOMPUTE: 299 AVERAGE SIGMOID: 201   AVERAGE FASTCOMPUTE: 36 AVERAGE SIGMOID: 65 AVERAGE FASTCOMPUTE: 53   AVERAGE SIGMOID: 57   see that? I uncommented Random (and its import) What would you expect? output:     AVERAGE FASTCOMPUTE: 90 AVERAGE SIGMOID: 324 AVERAGE FASTCOMPUTE: 131   AVERAGE SIGMOID: 73 AVERAGE FASTCOMPUTE: 217 AVERAGE SIGMOID: 36   AVERAGE FASTCOMPUTE: 53 AVERAGE SIGMOID: 12 AVERAGE FASTCOMPUTE: 53   AVERAGE SIGMOID: 69   I tried this on eclipse Oxygen.3a Release (4.7.3a) I'm using java 10.0.2 My computer has a Intel Core i5-7300HQ with those cache memories : L1 256, L2 1024, L3 6M I run on windows 10  note: I tried to make the forloop with j<1,2,3,... several times no helping the first sigmoid always has absurd time length  edit: tried launching it with windows commandline (javac and java), same result

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


Perhaps an "inter-stack" feature could be added to deal with question like  that are applicable on  as well. Such a feature would allow a single question and answers to appear on multiple sites. Reputation and badges could be awarded to the stack from-which the viewer came - or in the case of search-engine traffic make the user choose which stack to join before upvoting.

See also:   Many of the newer sites have a certain degree of overlap. With the creation of Chem.SE, I noticed quite a few questions on Physics.SE which could have benefited from the chem community and vice versa. There also are a few that could benefit from bio.SE.. Now these questions don't warrant a migration. They can be double-posted, but this doesn't lead to a smooth experience. Even when cross-linked, changes to either post (new answers,new comments,etc) aren't effectively relayed to the other site, and the two questions are just that-- two, separate questions. One solution that came to my mind was a "soft migration" option for mods. By this, a question on site A stays on site A. But, it appears in the site B question list as well. Edits/answers should bump it. Basically, there will be a placeholder item in the questions list of site B. It shows the votes/views/answers of the post on site A, along with the tags (maybe stylized differently). These should be an unobtrusive way to quickly identify what the site is. The post should also be bumped whenever the post is bumped on Site A, and it should display the rep/time/etc of the bumping user as usual. Here's a quick mockup of what happens on the site B question list:  Without being obtrusive or in-your-face (stuff like [migrated] is sort of in-your-face), the post is elegantly shown to be on Physics.SE (well, if you know the icon, anyway). The tags are italicized to show that they link to a different site tags, and the "bumping user" (me) has his/her rep on that site shown. We can also add an indicator on the question on site A () that shows that it was soft-migrated. We can use tooltips as well on the icons to tell us why they're here. After all, half of SE documentation is in tooltips.  Now I know that these issues will probably be raised:  Rep: An avid user on Site B gets no Site B rep for giving a good answer on Site A. Frankly, I don't care about this to much, but others may.  Implementation: It may get complicated. Internally, I'd propose that none of the question data is copied, rather Site A pushes the vote/bump data whenever a vote/bump happens. The easiest way to then implement the soft merge would be to have a table of questions soft-merged "to" site B on site B itself, with columns for all the vote/etc data. The questions table should have an extra column for "soft-migrated to"--that way Site A can determine where to push new data to on every vote/bump. Now, all Site B has to do is take the JOIN of the questions table and the soft-merge table and display them in the new questions list (or any list, for that matter). With some extra formatting, maybe. Of course, I may be oversimplifying this and I don't really know what I'm talking about ;-)  Is there a need? : Yes, I would say so. Such questions can get awesome answers is both the communities participate, but our don't-cross-post-much policy deters this. In the end, this will result in better post quality, making the Internet better. Also, as area51 grows, we will see this problem more and more, and this will become more and more necessary.   Thoughts? Any better ideas? Waffles?  Update: Another use case for this would be to soft migrate all MSO  questions over to child metas, effectively solving


Are there any other Wizarding Banks in the Wizarding World, like for other countries like the U.S.A., France, Bulgaria, etc....

In the first Harry Potter book, Hagrid tells Harry that Gringotts is the only bank:     ‘They didn’ keep their gold in the house, boy! Nah, first stop fer us   is Gringotts. Wizards’ bank. Have a sausage, they’re not bad cold –   an’ I wouldn’ say no teh a bit o’ yer birthday cake, neither.’      ‘Wizards have banks?’      ‘Just the one. Gringotts. Run by goblins.’      Harry Potter and the Philosopher's Stone, Chapter 5: Diagon Alley.   In the second one, we learn that Gringotts has people working in others places of the world:     Bill was the oldest Weasley brother. He and the next brother, Charlie,   had already left Hogwarts. Harry had never met either of them, but   knew that Charlie was in Romania, studying dragons, and Bill in Egypt,   working for the wizards’ bank, Gringotts.      Harry Potter and the Chamber of Secrets, Chapter 4: At Flourish and Blotts.   It has been suggested on this very website that there is probably more than one currency in Harry Potter's wizarding world: . (Personally, I'm of the opinion that Rowling used a hyperbole in the passage discussed in that question).    So, was Hagrid exaggerating? Was he referring just to the United Kingdom? Is Gringotts really the one and only bank on Earth? And, more importantly, is there any canon answer that supports either hypothesis?    Possible answer:


I've been a user of version 12.04 for about 6 months with a dual boot system with Windows.  In an attempt to delete Windows, I made a mistake and needed to reformat the Hard Drive.  I had version 12.04 on a CD and tried to do a boot install.  It didn't work, probably because I needed the correct installer.  I found an old thumb drive with Ubuntu installed, and was able to load version 10.10, thinking that the update process would be easy.  Unfortunately, it wouldn't update because the support for that version ended last year. So I downloaded the current version 12.04.4 to both a DVD and to a thumb drive, but neither would install.  I tried to work with the terminal function, but have not been able to figure out the correct syntax.  Help.  Should I reformat the drive, if so, How? Or is there another way to install version 12.04 that I haven't tried?  Ken

I would like to see a full how-to guide on how to install Ubuntu.


Is there a way to ignore an out parameter? I.e.    bool myIntIsValid = int.TryParse(stringValue, void);   or  bool myIntIsValid = int.TryParse(stringValue, out new int());

I'm making a call:  myResult = MakeMyCall(inputParams, out messages);   but I don't actually care about the messages.  If it was an input parameter I didn't care about I'd just pass in a null.  If it was the return I didn't care about I'd just leave it off.    Is there a way to do something similar with an out, or do I need to declare a variable that I will then ignore?


I've been using TeXLive and Texmaker 4.5 with XeLateX, and the use of the fontspec package slows everything down.  More precisely, it takes 21 seconds to compile this :    \documentclass[11pt,a4paper]{article}  \usepackage{fontspec}  \usepackage{xunicode}  \usepackage[french]{babel}  \begin{document} test \end{document}     If I take out the \usepackage{fontspec}, it takes no more than a second.   What can I do ? What are the alternatives ? Can it be related to the fact that on texmaker parameters , my DVI viewer is MikTeX (it says "C:/Program Files/MiKTeX 2.9/miktex/bin/yap.exe" %.dvi) ? Seems strange to me since I installed and am using TeXLive. I don't remember installing MikTex, but it's not impossible. What is the correct path if I want to use TeXlive ? Just the main TeXLive folder ?   As you can tell, I'm a beginner and non-english speaker, thank you for your understanding.

I try to compile a document that is written in Chinese using xelatex. But I find that the compiling speed is insanely slow: after about 1.14 minute, the final pdf file is generated. Here is a MWE:  \documentclass{article} \usepackage{xeCJK} \begin{document}  测试 \end{document}   If I change the Chinese version to English version (e.g., simply replace 「测试」 with "test"), it makes no difference and the compiling time is more or less the same.   If I comment out \usepackage{xeCJK} and compile the English version using pdflatex. The compilation speed is fast (around 1.5 seconds).   How to solve this problem? Ps, I am using a Windows 8.1 machine.


when 7 is degree and when it is radian what will be the behaviour?Is in both the cases it is algebraic over Q or not?

Show that if $x$ is rational, then $\sin x$ is algebraic number when $x$ is in degrees and $\sin x$ is non algebraic when $x$ is in radians.    Details: so we have $\sin(p/q)$ is algebraic when $p/q$ is in degrees, that is what my book says. of course $\sin (30^{\circ})$, $\sin 45^{\circ}$, $\sin 90^{\circ}$, and halves of them is algebraic. but I'm not so sure about $\sin(1^{\circ})$.  Also is this is an existence proof or is there actually a way to show the full radical solution.  One way to get this started is change degrees to radians. x deg = pi/180 * x radian.  So if x = p/q, then sin (p/q deg) = sin ( pi/180 * p/q rad). Therefore without loss of generality the question is show sin (pi*m/n rad) is algebraic. and then show sin (m/n rad) is non-algebraic.


I did disable commercial entries in my privacy-settings. However, I still receive entries in my dashboard.

How can I disable Amazon search results in the Dash?


From what I can glean, it'll and I've exist as standard contractions, but I am unsure of whether it'll've either exists or is acceptable.  "It will have" should be able to be reduced to "it'll've", shouldn't it?

I've seen a contraction of two words.  I can't see why it wouldn't've been possible to have been contracted twice.  Is it possible and how should it be punctuated?  Update:  Ok, to sum up the answers so far   This appears in spoken British and American English It is from one of the lower  Even if spoken this way sometimes, it isn't really written as a double contraction, except as written speech in fiction. And from my own googling in , it appears most written forms are old British words, often nautical like fo'c'sle.


I have my Regular Expression /'(.*)(?:(?:'\s*,\s*)|(?:'\)))/ and my test code ('He said, "You're cool."' , 'Rawr') (My test code simulates parameters being passed into a function.)   I will explain my Regular Expression as I understand it and hopefully a few of you can shed some light on my problem.  1)/' means at the beginning of the matched string, there needs to be '  2)(.*) means capture any character except \n 0 or more times  3)(?:(?:4)|(?:5)) means don't capture but try to do step 4 and if it doesn't work try step 5  4)(?:'\s*,\s*) means don't capture but there needs to be a ' with 0 or more whitespace characters followed by a , with 0 or more whitespace characters  5)(?:'\)) means don't capture but there needs to be ')  So it seems that it should return this (and this is what I want):  '+He said, "You're cool."+' ,  But it returns:  '+He said, "You're cool."' , 'Rawr+')  If I change my test code to ('He said, "You're cool."' , 'Rawr' (no end parenthesis) it returns what I want, but as soon as I add that last parenthesis, then it seems that my OR operator does whatever it wants to. I want it to test first if there is a comma, and break there if there is one, and if there is not one check for a parenthesis.  I've tried switching the spots of step 4 and step 5, but still the OR operator seems to always default to the (?:'\)) side.  How can I match the shortest amount possible?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I'm currently running Ubuntu 16.04 but would like to install another Linux distro by dual-boot. I tried installing another distro but during installation I realised that it had to also be root and this could not be allowed. How can I have both running on my machine?

I have brand new machine.  I want to install Ubuntu and one more Linux distributions on same machine. When the machine is up I want to have the option to choose which Linux to load.   Is it possible?  How to do it?


Are these examples grammatically correct?  1:     I want to tell you something./ I want to tell you that _______.      I want to say something to you./ I want to say to you that _______.   2:     You just told five people we met today that they're special.      You just said to five people we met today that they're special.

Possible Duplicate:          Both words seem to be used interchangeably. I generally don't differentiate between them and intuitively pick one over the other. Is there a standardized way to distinguish between the two?


Although I've set up a username and password when I was installing Ubuntu 13.04, when I type in my password it says it's incorrect although language is checked and my password's correct. What's wrong?

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?


How can I see my IP address on Ubuntu? I used   ifconfig eth0   but it only displays HWaddr and I don't see where the IP address is.

I have Ubuntu server 12.04 installed, so I have no GUI. When I do the command ifconfig, I cannot find my internal IP address. It says inet addr: 127.0.0.1. Here is the output of ifconfig -a: eth0   link encap:Ethernet  HWaddr 00:06:4f:4a:66:f0     BROADCAST MULTICAST  MTU:1500  Metric:1     RX packets:0 errors:0 dropped:0 overruns:0 frame:0     TX packets:0 errors:0 dropped:0 overruns:0 carrier:0     collisions:0 txqueuelen:1000     RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  eth1   link encap:Ethernet  HWaddr 00:16:ec:05:c8:9c      BROADCAST MULTICAST  MTU:1500  Metric:1     RX packets:0 errors:0 dropped:0 overruns:0 frame:0     TX packets:0 errors:0 dropped:0 overruns:0 carrier:0     collisions:0 txqueuelen:1000     RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  lo     Link encap:Local Loopback     inet addr 127.0.0.1  Mask:255.0.0.0     inet6 addr:  ::1/128 Scope:Host     UP LOOPBACK RUNNING MTU:65536  Metric:1     RX packets:1800 errors:0 dropped:0 overruns:0 frame:0     Tx packets:1800 errors:0 dropped:0 overruns:0 carrier:0     collisions:0 txqueuelen:0     RX bytes:143896 (143.b KB)  TX bytes:143896 (143.8 KB)  here are the contents of etc/network/interfaces: # The loopback network interface auto lo iface lo inet loopback  # The primary network interface auto eth0 iface eth0 inet dhcp  If someone could edit this for me, the contents of etc/network/interfaces should be on separate lines. The output of host askubuntu.com was: ;; connection timed out; no servers could be reached.  I set up owncloud and webmin a few months ago and was using them for a month with no problems. I think the power went off one day 2 months ago and I never turned the server back on until yesterday. I haven't done anything that would have affected the internet setup So i'm not sure why it doesn't work anymore. As far as my network topology goes, I have a pci-e network card for the pc. The ethernet line goes from the network card to a switch, and then to a modem/router from there.


I have been trying to get rid of this but nothing is working, and its super annoying please help! I've tried clearing cache but it didn't work.

I keep getting the "Low on Space: Application data space is low. To free up" [the rest is cut off] message.  I've moved every app I can over to the SD card, cleared the cache, compacted my K9 mail cache.  Advanced Task Killer (ouch!) says I have 98M Available Memory  File Manager says I have 223M/748M (29%) free.  That's not so bad -- but I'm stuck in the no-updates scenario. The market downloads won't really start, gmail won't update, etc. I've rebooted several times, and nothing changes. Aaaargh.  What can be done, other than uninstalling everything ?


I enjoy the derivation of $T_{\mu\nu} = \rho u_\mu u_\nu$ by Dirac, reproduced in . But when I try to rewrite it with metric convention $(-+++)$ (used by MTW), I find a rather puzzling result.   The action for the relativistic dust should now be: $$ S_M = -\int \rho c \sqrt{-v_\mu v^\mu} \sqrt{ |\det g| } d^4 x         = -\int c \sqrt{-p_\mu p^\mu} d^4 x $$ since $v_\mu v^\mu < 0,\, p_\mu p^\mu < 0$, while the rest of the derivation remains almost the same, which is: $$     \delta S_M         = - \delta \int c \sqrt{-{p}_\mu {p}^\mu} d^4 x = $$ $$         = - \int c {\delta(-g^{\mu\nu} {p}_\mu {p}_\nu)             \over 2\sqrt{-{p}_\alpha {p}^\alpha}} d^4 x = $$ $$         = \int c { {p}_\mu {p}_\nu             \over 2\sqrt{-{p}_\alpha {p}^\alpha}}             \delta(g^{\mu\nu}) d^4 x = $$ $$         = \int c { \rho v_\mu \rho v_\nu             \sqrt{ |\det g| }^2             \over 2 \rho c \sqrt{ |\det g| } }              \delta(g^{\mu\nu}) d^4 x = $$ $$         = \int {1\over2} \rho v_\mu v_\nu              \delta(g^{\mu\nu}) \sqrt{ |\det g| } d^4 x $$ From which we calculate the stress energy tensor using the standard GR formula for it: $$     T_{\mu\nu}         = - {2\over\sqrt{ |\det g| }}{\delta S_M\over\delta g^{\mu\nu}} = $$ $$         = - {2\over\sqrt{ |\det g| }} \left(                 {1\over2} \rho v_\mu v_\nu \sqrt{ |\det g| }             \right)= $$ $$         = - \rho v_\mu v_\nu $$ As you can see, it gives an extra minus sign. Clearly I've done something stupid, but I just couldn't spot it. Please help me find that mistake (or mistakes) in the above derivation.

If one were to derive the stress-energy tensor for a metric with $(+,-,-,-)$ signature would it be different from the stress-energy tensor derived from the same metric but with $(-,+,+,+)$ signature?


Jquery delegate() deprecated , then how to listen dynamic create object event  FOR Example     $(document).ready(function() {   $(document).find("p").on("click", function(event) {     $("#contain").append("
Click this paragraph
" + event.timeStamp);   }); });
Click this paragraph.

     Here contain>p click event not happened with on event delegate is working is there any idea for this instead of delegate() or live() ?

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 was wondering if there was a way to see any group $G$ as a subgroup of the inverse group of a ring, $G \leq A^\times$? Thanks!

Let the functor $F\colon\bf Ring\rightarrow\bf Grp$ send the ring $A$ to its group of units $A^\times,$ and the ring homomorphism $f\colon A\rightarrow B$ to the group homomorphism $f^\times\colon A^\times\rightarrow B^\times:a\mapsto f(a)$. I was curious about this functor, and in particular, whether it is essentially surjective. That is, for any group $G$ (not just finite,) is there a ring $A$ such that $G\cong A^\times$? If not, what groups $G$ satisfies this? A similar question was asked in  but what can be said for infinite groups, or groups in general? Calling groups that satisfy this condition R-groups, I have proved that any finitely generated abelian group is an R-group. I have no idea what to do from now, but I  have a conjecture that the unit group of the group ring $\mathbb F_2[G]$ is isomorphic to $G.$ If this is true, certainly, all groups are R-groups, and the functor $F$ is essentially surjective, but I am having trouble proving it. Can anyone help me?


My professor gave us a worksheet with diophantine equations including this one he claims that it is one of the easier ones but that it has a unique solution.  Find all integer solutions to the equation $$x^2 − x = y^5 − y$$.  Also my professor will give extra credit for all prime number solutions (x and y).

How to list all integer solutions of   $m^2-n^5 = m - n$  Here $m$ and $n$ are some positive integers.  Also, I want to know the name of this type equations (if name exist).   Regards Rosy


fg, bg and jobs are used for job management. And for some reason (maybe it's just me), I'm not able to find where their binaries are nor their manpages (whereis prints no information). which gives no output. The commands themselves work just fine, though.  I ran commands like find /bin bg, but with no hits. I also ran find / bg to cast a wide net.

I tried which cd and it didn't give a path but instead returned the exit code 1 (checked with echo $?). The coreutil cd itself is working, so the executable should be there, right? I also ran a find for cd, but there was no executable file shown. How is it implemented then?  Update:  I don't know if I should ask this in another post but since I think it is good here, I'm expanding (?) the post... So the answer was actually quite simple, there's no executable for that — because it's a builtin — But I've found some builtins (bash shell in Fedora) have the executable files! So builtin -> no executable isn't right I suppose? Maybe an answer explaining what builtins actually are (builtin commands?), which actually is the matter here, rather than focusing more on cd... Some good links posted previously indicate that builtins are not programs... so what are they? How do they work? Are they just functions or threads of the shell?


I've been reading about 'flat module' in Dummit and foote algebra book.  It is a R-module that preserves exactness after tensoring it to any exact sequence of R-module. (i.e., It preserves injectivity.)  I'm wondering why its name is 'flat'.  I guess it is geometric object which is somehow 'flat' in algebraic geometry.  I tried to find articles about it, But I couldn't.  Can someone help me?  Thanks!

I am studying Atiyah and MacDonald's book "Introduction to Commutative Algebra" and I have just read the definition of a flat module.  It seems to me that if they have called that kind of modules "flat" there must be some sort of geometric intuition  or something like that. Why are they called so? Or is it just a meaningless name?  Thanks