I keep seeing written usage of which in cases where the writer clearly intends it to be restrictive. For example:   "" "" (And other occurrences on the same page and in the same blog.)   I have been counting these as errors because it is my understanding that that is restrictive, and which is not.  Do I have this right?

When is it appropriate to use that as opposed to which with relative clauses?


I'm quite the novice in terms of my knowledge of game development, and I'd incredibly appreciate any further insight on this. To be a bit more specific, I encountered this video, () and It documents the roles of game programmers and graphics programmers at Naughty Dog but even with the descriptions, I'm still uncertain of what those jobs actually entail. Sorry If this wasn't a suitable place for the post, but for any help thanks in advance.

I know the answers are obvious, someone told me this: Graphics Programming: DirectX(or Direct3d), OpenGL, Vulkan, Metal..  Gameplay Programming: Bringing everything together. From design, music, levels, etc.  But could you please explain me in depth the difference? This way i can focus on a specific role in game programming!


In books from the 19th century and the first half of the 20th century, I realised, that sometimes names are highlighted by increasing the spacing inside these words. Here an Example from G. Frege's "Begriffsschrift"  where the name "Leibniz" is highlighted in this particular way. Is there a name for this style of typesetting? How can it be achieved in LaTeX? I am interested in a solution for all flavours of LaTeX but a solution which is compatible with XeTeX and fontspec would be the preferred one.

I am trying to enlarge letter spacing.  I have already tried , but it seems it can enlarge only for a single phrase and i would like to enlarge for entire document.  Soul command was something like this:  \so{phrase with more letter spacing here}   Which is the command to set a higher letter spacing for all the document?


For example: Space (jump) + WASD (move) and  R (Sprint). In this case I can sprint, but I can't jump at the same time.  But if I try Space + WASD + another key like F it does work.  I have a Sharkoon Skiller Pro (it is made for gaming), and sticky keys are off.  PS: This is annoying in games like Minecraft.

Whenever I play a PC game with the directional keys, I can only press two buttons at a time.  For instance if I am playing a shooter like R-Type, I cannot hold down the fire button while moving diagonally at the same time.  The computer simply ignores the extra button press.  How do I remove this limit so I can shoot while moving diagonally?  This limitation seems to apply for every game.  I am running Windows 7 if it makes any difference.  I noticed the same problem back when I used Windows XP.


I'm trying to group a bunch of data by the company name with all unique data for that company after it Example table Company name   Company Address   Order Number Company 1        Address 1         0001 Company 1        Address 1         0002 Company 2        Address 2         0003 Company 2        Address 2         0004 Company 3        Address 3         0005  What i would like is for the output to be like this Company name     Company Address   orders Company 1        Address 1         0001,002 Company 2        Address 3         0003,004 Company 3        Address 3         0005

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I'm studying abroad in Florence this summer and I'm trying to decide on the best layover option (flying from NYC). I've narrowed it down to Frankfurt via Lufthansa, but I'm paranoid about delays...would a 2 hour 20 minute layover be enough time? Or should I opt for 5 hours instead?

I have a flight from Stuttgart to Frankfurt whose ETA at Frankfurt is 9:10. I have a connecting flight from Frankfurt to Chennai at 10:50. Both the flights are booked as part of the same ticket. So, there is a layover of 1h40m at Frankfurt airport. Would this be enough? I have been watching the terminals closely and I find that my first flight exits me at A2-3 and the connecting flight is at C15/C14. IS there a passport control and security check along the way and would this time be sufficient?  If i miss the flight, what happens?   Both flights are operated by Lufthansa


I am using the XeTex typesetting system on a Macintosh running Snow Leopard. I would like it to produce a PDF/X file. Is this possible? I am mainly concerned with ensuring the fonts are embedded.

Solution  Full solution for producing PDF/X compliant document can be found in MWE and answer to this question:   Adapted MWE and compilation method are taken from Leonid's answer to this question.  Please note that solution requires compilation with TeXLive 2015 (or later).  Original question  I am trying to compile my source with XeLaTeX to produce PDF/X-1a:2001 compliant document. Getting PDF/X-1a:2001 is possible with pdfx package (while using up-to-date TeX distribution), but only when document is compiled with pdflatex.  Since I am using OTF and TTF fonts in my document, I have to use XeLaTeX to compile it. This is MWE:  \documentclass{book} \usepackage[x-1a1]{pdfx} \begin{document} Some text \end{document}   When I try to compile this document with MiKTeX's 2.9 xelatex I get following error and compilation halts:  ! Undefined control sequence. l.111 \pdfminorversion                       =4 %  assumed for PDF/A ;  options may change this for...  ?    Is there any way to compile PDF/X-1a:2001 with XeLaTeX, either using pdfx or different package?  Ps. I used MiKTeX 2.9, because I don't want to update my TeX Live 2013/Debian distribution I normally use. With MiKTeX I get most recent version of pdfx package.  EDIT: Since it isn't obvious from Leonid's answer and is mentioned only in comments, please note that you need TeXLive 2015 in order for Leonid's answer to work fully. TeXLive 2013 (installed by your system's package manager) or MiKTeX 2.9 won't do the trick (this is true as of March 2016; it might change by the time you read this).    I also tried to compile this MWE with LuaLaTeX to see if this works. It didn't. I get following error:  ! Undefined control sequence. \pdfx@findUUID ... \pdfx@tmpstring {\pdfmdfivesum                                                    {#1}} \expandafter \pdfx@e... l.360 \pdfx@findUUID{\jobname.pdf}  ?   In the event version of LuaLaTeX matters: lualatex --version outputs  This is LuaTeX, Version beta-0.76.0-2013062821  (MiKTeX 2.9 64-bit) (rev 4627)


If $\alpha+\beta-\gamma=\pi$, show that  $$\sin^2\alpha+\sin^2\beta-\sin^2\gamma=2\sin\alpha\sin\beta\cos\gamma$$ Please don't ask about ideas because I really don't have one. I was initially thinking about a triangle with the given angles... But no chance EDIT. Sorry guys, now is correct.

I most humbly beseech help for this question.  If $A+B+C=180$ degrees, then prove $$ \sin^2(A)+\sin^2(B)-\sin^2(C)=2\sin(A)\sin(B) \cos(C) $$ I am not sure what trig identity I should use to begin this problem.


I am using ubuntu 14.04 and currently i am running it in the inside windows mode installed with Wubi. My problem is my filesystem is running on low disk space. Can i extend the filesystem size without affecting my file? How could i do that?

I had installed Ubuntu inside Windows XP but then I formatted XP and installed Windows 7.   EDIT1: I used Wubi for the same. I want to know which one of the two will solve my problem? creating a virtual disk or resizing root? Also is resizing root possible as the 4GB ext4 partition is already in a NTFS format Hard Drive partition.  At the time of installation I had allocated only 4GB of space to Ubuntu. I want to increase that size as I keep getting a low disk space notification.   I have surfed through a lot of similar questions but this is not a duplicate.  Because I want to know a little about the file systems. In order to solve my problem,do I have to increase the size of root.disk? Or will it be solved by creating a virtual disk?  Also I want to know the difference between creating a virtual disk and just increasing disk space of root.I'm new to Ubuntu so I don't know how the file systems function.  EDIT2:I have created a virtual disk of 10gb ,but I'm still getting the same notification.Is there anyway to install all further applications on the virtual disk I created?


I want to compute the Galois group of some polynomials, but I want to see some examples first. For example this proposition could be helpful. I don't know how to prove it <.<  Let's consider a polynomial $f(x)= x^4+ax^2+b \in \mathbb{Z} $. Let $ \pm\alpha , \pm\beta$ denote the roots of $f(x)$. Note that $f$ is irreducible iff $\alpha^2, \alpha\pm\beta \notin \mathbb{Q}$. So let's suppose that $f(x)$ is irreducible. Let's denote $G$ the galois group of $f$ (the Galois group of the splitting field $\mathbb{Q}(\alpha,\beta)/\mathbb{Q}$)  $i)$ $G\cong V$ the Klein 4-group iff $\alpha\beta \in \mathbb{Q}$  $ii)$ $G\cong \mathbb{Z}_4$ iff $\mathbb{Q}(\alpha\beta)=\mathbb{Q}(\alpha^2)$  $iii)$ $G\cong D_8$ the dihedral group of order 8, iff $\alpha\beta \notin \mathbb{Q}(\alpha^2)$  I need help with the proofs of this propositions... Well I'm very lost with the computation of Galois group, some care must be exercised, I don't have it. For example I know that Galois group acts transitively, in the sense that $u\in K/F$ a galois extension, the other roots of the minimal polynomial of $m_u(x)\in F[x]$ are precisely the elements $ \sigma(u)$ , where $\sigma \in Gal(K/F)$. And clearly any automorphism, is determined by only the value of a basis. In this case we are working on $\mathbb{Q}(\alpha,\beta)$, so I have to know the values of both. But I have to respect the algebraic relations involving $\alpha , \beta$ I proved that in $i),ii)$ $\mathbb{Q}(\alpha,\beta) = \mathbb{Q}(\alpha) $ So I have to know the values on $\alpha$.   My first question is: If in both cases $i),ii)$, I have an extension of degree 4 (so $|G|=4$) I have to map $\alpha$ to determine the automorphism, but I have also to map $\alpha$ to all of it's four roots. Why the galois group in this case are different?  My second question is about $iii)$ I have no idea How to attack it.

From Hungerford, section V, chapter 4 exercise 9:     Let $x^4+ax^2+b$ in  $K[x]$ (with char $K\neq $2) be irreducible with   Galois group $G$.      (a) If $b$ is a square in $K$, then $G =  \mathbb{Z}_2\times\mathbb{Z}_2$.       (b) If $b$ is not a square in $K$   and $b(a^2-4b)$ is a square in $K$, then $G = \mathbb{Z}_4$.       (c)   If neither $b$ nor $b(a^2-4b)$ is a square in $K$, then $G = D_4$   (dihedral group).   What I've tried  With (a):  Let be $u_1,u_2,u_3,u_4$ the roots of the quartic, then $b=u_1u_2u_3u_4$ is in $K$ and there exists $a\in K$ with $a^2=b$. On the other hand, $G = \mathbb{Z}_2\times\mathbb{Z}_2$ if and only if $\alpha=u_1u_2+u_3u_4$, $\beta=u_1u_3+u_2u_4$, $\gamma=u_1u_4+u_2u_3$ are in $K$, but I don't find the way to rely those results.   With (b) I know that $b=u_1u_2+u_1u_3+u_1u_4+u_2u_3+u_2u_4+u_3u_4$ but again I dont know how to continue.  Any help? Thanks.


i'm trying to use a variable that i get it from an html form here is the html code  <input type="date" name="begin_date"> <input type="date" name="end_date">   and i will enter something like this 2015-6-20 00:00:00 in the text fields. then i want to use those variables in mysql where clause like below:  ->where('o.invoice_date >= $begin_date AND o.invoice_date < $end_date');   but somehow it doesn't work...  when i do it like  ->where('o.invoice_date >= "2015-6-20 00:00:00" AND o.invoice_date < "2015-6-20 00:00:00"');   it works fine but not with variables.. what's the problem?

MySQL column > sdate, edate ( its 2 column).  sdate is start date for project starting and edate is end date for project ending.  so i need to make search between them..  Search
 <form method="post" action="search.php">   Start Report Date : <input type="text" name="sdate" />   End Report Date : <input type="text" name="edate" />   <input type="submit" name="Submit" value="Search" /> </form>  This is example data in mysql sdate             Project Name      edate 22 December 2008  project 1         23 December 2008 25 December 2008  project 2         26 December 2008 24 December 2008  project 3         27 December 2008 1  January 2008   project 4         20 January 2008 10 December 2008  project 5         12 December 2008   so let say a user entered sdate ( eg, 22 December 2008 ) and edate ( eg, 30 December 2008 ).  It should display  22 December 2008  project 1         23 December 2008 25 December 2008  project 2         26 December 2008 24 December 2008  project 3         27 December 2008   So i need a php code sql query which should display entries lies between those 2 dates..  Please help me..   Thanks very much..


Some context:   provide some insights as to why vote counts are not displayed by default.  It is, for me, a rather unsatisfying reason. Not because it is not valid, but because it really is a shame that something that helpful has a restrained access for a very technical down-to-earth reason...  Now, I'm not sure showing the vote counts publicly for every post is the solution either. But first, why I think getting some information as to how much debate there is over a post is important.  Why I think such info might be useful:  I believe a 0-average or even a negative-average vote count may still have merit if 10 people voted up and say 10 people voted down (or even 11).  I feel negative votes put a lot of pressure on the poster (and that's good that it makes you re-think your answer), but sometimes, things are not that black and white.  Not to mention that there is quite a trend factor, I could sometimes witness some mimetism, to a mild extent of course. I think it is good for a user to see what the community thinks as a whole. Average votes are one thing, but is it significant all by itself? I am unsure.  Talking about peer pressure, when your post is down-voted, you (should) consider removing it, but if people are divided about it, then it might have some merit if only to show that, that people are divided about it.  Hence my feature request:  I think it would be interesting to have a way to measure how debatable (and debated) a question/answer is. If you can't show the votes explicitly, then I suggest something like an attribute saying that people are debating over it.  For instance, if a post has received more than n votes we might provide attributes like:   "unanimous", if most post go in one direction "debatable"/"debated"/"discussed"/"subject to discussion" or even "to be considered carefuly" (although this one seems biased), if there are many votes on either side   Of course, n, most and many are yet to be defined.  Not to mention that doing this instead of showing vote counts has two good points on top of provided that information:   only posts with more than n votes would be featuring this, so overall, the overhead is reduced, the accusation that less-experienced users might use vote counts to balance out questions/answers doesn't hold anymore since the vote count is unkown and since it requires many votes, adding one isn't that significant.   Discussion:  I think there is much to debate on this one.  What do you think? Why do you think it is a good/bad idea? Do you see the merit of such a feature? Do you even agree that such a feature would help the users evaluate their answers and those of others?

Just curious, why is there a required privilege (especially one as high as 1000) to view vote counts for a post? It's not like someone can mess up a post by just viewing the vote counts. Is it just to give people incentive to reach 1000?


I've tried searching through most of the other posts on here about getting WoW to work, but most people say they can execute the .exe and have no problems loading the launcher. I also tried looking for the game in the Play on Linux database but it doesn't appear to exist anymore. I tried using a playonlinux script but that failed after selecting the .exe. How can I get WoW to run? It always gets stuck at the same spot 1/3 of the way finished with Updating Blizzard Update Agent" screen. I'm using Ubuntu 12.10.

I need a tutorial on how to install World of Warcraft for Ubuntu.


I admit this sounds like a dumb question. I know very little about physics, but I've always wondered that given the fact that:  A unit of measurement is a very specific constant value.  Then how can a formula like: $$E=mc^2$$ Be so precise and so clean when it has to use already pre-defined unit of measurements as values. I assume (I'm googling this and I know almost no physics, just what I remember from high-school) That this formula claims that $1 \text{joule} = 1 \text{kg} * (\text{speed of light}) ^ 2 \frac{m}{s}$ The meter, the kilogram, the second, the joule (composed of the base units) and so on are very very specific values defined by the International System of Units. How can one find a law, that just so happens to find a relationship between these exact values, without needing a custom made constant value or set of values to multiply or add by? Edit: So I understand that my understanding of the equation itself was off. It does not claim that $1 \text{joule} = 1 \text{kg} * (\text{speed of light}) ^ 2 \frac{m}{s}$ but instead that a mass of $1 \text{kg} * (\text{speed of light}) ^ 2$ = A certain amount of energy expressed in joules. My understanding of the equation itself improved, but my original question still stands. How is such a clean relationship found between the kg and the speed of light without multiplying or summing by a custom constant or set of constants? If you were to change to a different system, wouldn't you be unable to neatly say that exactly 1 unit multiplied by the speed of light = a certain amount of energy? You would need to translate your metric for mass to 1 kg. In pounds for example I think you would have to say: E = $2.20462pounds * c^2 m/s$ Is this off? And so on.. If you want to keep it clean with 1 unit you would have to change the constant from the speed of light to a different value (a smaller value in the case of pounds at least).

Why is it that many of the most important physical equations don't have ugly numbers (i.e., "arbitrary" irrational factors) to line up both sides?   Why can so many equations be expressed so neatly with small natural numbers while recycling a relatively small set of physical and mathematical constants?  For example, why is mass–energy equivalence describable by the equation $E = mc^2$ and not something like $E \approx 27.642 \times mc^2$?  Why is time dilation describable by something as neat as $t' = \sqrt{\frac{t}{1 - \frac{v^2}{c^2}}}$ and not something ugly like $t' \approx 672.097 \times 10^{-4} \times \sqrt{\frac{t}{1 - \frac{v^2}{c^2}}}$.  ... and so forth.    I'm not well educated on matters of physics and so I feel a bit sheepish asking this.   Likewise I'm not sure if this is a more philosophical question or one that permits a concrete answer ... or perhaps even the premise of the question itself is flawed ... so I would gratefully consider anything that sheds light on the nature of the question itself as an answer.    EDIT: I just wished to give a little more context as to where I was coming from with this question based on some of the responses:  @Jerry Schirmer comments:      You do have an ugly factor of $2.997458 \times 10^8 m/s$ in front of everything. You just hide the ugliness by calling this number c.   These are not the types of "ugly constants" I'm talking about in that this number is the speed of light. It is not just some constant needed to balance two side of an equation.  @Carl Witthoft answers:      It's all in how you define the units ...   Of course this is true, we could in theory hide all sorts of ugly constants by using different units on the right and the left. But as in the case of $E=mc^2$, I am talking about equations where the units on the left are consistent with the units on the right, irrespective of the units used. As I mentioned on a comment there:     $E=mc^2$  could be defined using units like $m$ in imperial stones ($\textsf{S}$), $c$ in cubits/fortnight ($\textsf{CF}^{−1}$) and $E$ in ... umm ... $\textsf{SC}^2\textsf{F}^{−2}$ ... so long as the units are in the same system, we still don't need a fudge factor.   When the units are consistent in this manner, there's no room for hiding fudge constants.


My Venndiagram package went mad. The following code  \documentclass{standalone} \usepackage{tikz} \usepackage{venndiagram} \begin{document} \begin{venndiagram3sets} \fillOnlyA \end{venndiagram3sets} \begin{venndiagram3sets} \fillOnlyB \fillOnlyC \end{venndiagram3sets} \end{document}   produces   How to fix that? For 2 or 3 years it was ok, but now sth went crazy. Is some package missing? I would be grateful for any suggestions.

I was trying out the  package in order to answer another . Having drawn the diagram for , I thought I'd try a slightly more complex example:  \documentclass[tikz,border=20pt,multi]{standalone} \usepackage{venndiagram} \begin{document} \begin{venndiagram3sets}   \fillOnlyA \end{venndiagram3sets} \end{document}   But this did not yield the expected results:    The diagram should shade just that part of set A which intersects with neither B nor C, as I understand it.  As far as I can tell, this example is just example 3 on pages 6/7 of the documentation. The issue is not caused by the use of standalone - I get the same results with article, except on a bigger page, obviously.  Have I missed something crucial or might this be a bug? I'm wondering if there's a compatibility issue with current versions of TikZ.


Consider the following minimal example  \documentclass{article} % \usepackage{unicode-math} \begin{document} $1\pm2$ \end{document}   Compiling with lualatex (texlive 2018) without unicode-math yields    whereas compiling with unicode-math (uncommenting the corresponding line) yields    Clearly, the \pm sign is too low in the second case.  I observe the same phenomenon with xelatex, and with e.g. \setmathfont{TeX Gyre Pagella Math}.  Any hint to fix the issue would be welcome.

Why does the \pm sign is ower compared to the number next to it? Is it normal behaviour? How can I raise it so to be at the same level as the number?  My distribution is Vanilla TeX and it is installed less than a week ago so it is updated.    \documentclass{article}  \usepackage[top=0.7in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}  \usepackage{parskip}  \setlength{\parindent}{0cm}  \usepackage{amsmath}  \usepackage{unicode-math}  \usepackage{fontspec}  \usepackage[greek,english]{babel}  \setmainfont [     Ligatures=TeX,     Extension=.otf,     UprightFont=*,     BoldFont=*Bold,     ItalicFont=*It,     BoldItalicFont=*BoldIt,     Mapping=tex-text ]{GFSArtemisia}  \setsansfont[Mapping=tex-text]{GFSArtemisia.otf}  \setmathfont{latinmodern-math.otf}  \setmathfont[range=\varnothing]{Asana-Math.otf}  \setmathfont[range=\int]{latinmodern-math.otf}  \begin{document}  $$x= \pm 1$$  \end{document}


So I've read conflicting information and am confused. I read that more relevant training data will decrease the variance of a model. However, I read about how in k-fold cross validation, if k is very large, and you train on k-1 of the folds, and test on 1 fold, then the variance will likely be really high, since the training size is huge. Which one of these is true?

How do  methods compare in terms of model variance and bias?   My question is partly motivated by this thread: . The answer there suggests that models learned with leave-one-out cross-validation have higher variance than those learned with regular $K$-fold cross-validation, making leave-one-out CV a worse choice.  However, my intuition tells me that in leave-one-out CV one should see relatively lower variance between models than in the $K$-fold CV, since we are only shifting one data point across folds and therefore the training sets between folds overlap substantially.  Or going in the other direction, if $K$ is low in the $K$-fold CV, the training sets would be quite different across folds, and the resulting models are more likely to be different (hence higher variance).  If the above argument is right, why would models learned with leave-one-out CV have higher variance?


What is a medical term, as in a mental or eating disorder, that means "a compulsion with being healthy, while actually being unhealthy," stemming primarily from a poor understanding of science, medicine, physiology, and the effects of exercise?   For example, a man who does hot yoga to "sweat out toxins" (MYTH!), but in reality, due to the effects of dehydration, his kidneys are retaining water and actually hanging onto any toxins that may be in his system.

Is there a word for the opposite condition of ? For example,  someone who denies being sick when they clearly are? I would just say that they are "in denial". Is there any other adequate word?  I thought about the obvious 'hyperchondria' but it doesn't seem to be used anywhere and doesn't look suitable as—from —just replacing 'hypo' by 'hyper' wouldn't fit well:     1555–65;  < Late Latin  < Greek,  neuter plural of hypochóndrios  pertaining to the upper abdomen (supposed seat of melancholy), equivalent to hypo- hypo- + chóndr ( os ) ensiform cartilage + -ios  adj. suffix


I'm trying to get the dict key whose value is the maximum of all the dict's values.  I found two ways, both not elegant enough.  d= {'a':2,'b':5,'c':3} # 1st way print [k for k in d.keys() if d[k] == max(d.values())][0] # 2nd way print Counter(d).most_common(1)[0][0]   Is there a better approach?

I have a dictionary: keys are strings, values are integers.  Example:   stats = {'a':1000, 'b':3000, 'c': 100}   I'd like to get 'b' as an answer, since it's the key with a higher value.  I did the following, using an intermediate list with reversed key-value tuples:  inverse = [(value, key) for key, value in stats.items()] print max(inverse)[1]   Is that one the better (or even more elegant) approach?


Finding sum of $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\binom{n}{k}^{-1}$   Try: $$\lim_{n\rightarrow\infty}\sum^{n}_{k=0}\frac{k!\cdot (n-k)!}{n!}$$  $$\lim_{n\rightarrow}(n+1)\sum^{n}_{k=0}\int^{1}_{0}x^{n-k}(1-x)^kdx$$  $$\lim_{n\rightarrow\infty}\int^{1}_{0}x^{n}\sum^{n}_{k=0}\left(\frac{1-x}{x}\right)^{k}dx$$  $$\lim_{n\rightarrow\infty}\int^{1}_{k=0}x^{k}\sum^{n}_{k=0}\frac{x^{k+1}-(1-x)^{k+1}}{(2x-1)(1-x)^k}dx$$  Could some help me to solve it, Thanks

How to calculate the sum of sequence $$\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{2}}+\frac{1}{\binom{n}{3}}+\cdots+\frac{1}{\binom{n}{n}}=？$$ How about its limit?


I need to make passwordless login for same linux server with same user.  [airwide@eir ~]$ hostname -i 10.3.7.73 [airwide@eir ~]$ ssh airwide@10.3.7.73 airwide@10.3.7.73's password:    how can make to passwordless for same server?

For some reason, I have a server that if ssh into another server...you don't need to enter the  password.  How is this done? Can someone give me step by step instructions please?


Any help with the following would be very much appreciated:  A few days ago I installed the latest stable Linux kernel (3.16.3) and then I used the one liner from  to remove my old kernels.   The command removed a bunch of packages, including my AMD fglrx drivers (I am now running the latest OpenSource Gallium), however it didn't remove the old kernels from /boot (which are not installed anymore). Please see below for details.  $ uname -a Linux linux 3.16.3-031603-generic #201409171435 SMP Wed Sep 17 18:36:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux   $ sudo ls -l /boot total 153701 -rw-r--r-- 1 root root  1158016 May  3 01:30 abi-3.13.0-24-generic -rw-r--r-- 1 root root  1163858 Aug 15 03:56 abi-3.13.0-35-generic -rw-r--r-- 1 root root  1163858 Sep  3 23:24 abi-3.13.0-36-generic -rw-r--r-- 1 root root  1204707 Sep 17 20:04 abi-3.16.3-031603-generic -rw-r--r-- 1 root root   165510 May  3 01:30 config-3.13.0-24-generic -rw-r--r-- 1 root root   165652 Aug 15 03:56 config-3.13.0-35-generic -rw-r--r-- 1 root root   165671 Sep  3 23:24 config-3.13.0-36-generic -rw-r--r-- 1 root root   170795 Sep 17 20:04 config-3.16.3-031603-generic drwxr-xr-x 5 root root     1024 Sep 30 13:20 grub -rw-r--r-- 1 root root 28803145 Sep 26 18:48 initrd.img-3.13.0-24-generic -rw-r--r-- 1 root root 26876001 Sep 23 17:05 initrd.img-3.13.0-35-generic -rw-r--r-- 1 root root 28958561 Sep 26 18:46 initrd.img-3.13.0-36-generic -rw-r--r-- 1 root root 28616184 Sep 30 13:31 initrd.img-3.16.3-031603-generic drwx------ 2 root root    12288 Aug 28 16:23 lost+found -rw-r--r-- 1 root root   176500 Mar 12  2014 memtest86+.bin -rw-r--r-- 1 root root   178176 Mar 12  2014 memtest86+.elf -rw-r--r-- 1 root root   178680 Mar 12  2014 memtest86+_multiboot.bin -rw------- 1 root root  3372643 May  3 01:30 System.map-3.13.0-24-generic -rw------- 1 root root  3386444 Aug 15 03:56 System.map-3.13.0-35-generic -rw------- 1 root root  3386479 Sep  3 23:24 System.map-3.13.0-36-generic -rw------- 1 root root  3629877 Sep 17 20:04 System.map-3.16.3-031603-generic -rw------- 1 root root  5776416 May  3 01:30 vmlinuz-3.13.0-24-generic -rw------- 1 root root  5806368 Aug 15 03:56 vmlinuz-3.13.0-35-generic -rw------- 1 root root  5806848 Sep  3 23:24 vmlinuz-3.13.0-36-generic -rw------- 1 root root  6417328 Sep 17 20:04 vmlinuz-3.16.3-031603-generic   Now my questions are:   How do I correctly delete all the files in my /boot except for the 4 files related to 3.16.3? Can I just manually remove them and then upgrade grub using ? Please see the output of the command below. Since I don't know the meaning of it, could someone please let me know if this displays an error or if this is what I should be seeing?    Thanks a lot! :)  $ sudo dpkg --list 'linux-image*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name                    Version          Architecture     Description +++-=======================-================-================-=================================================== un  linux-image             <none>           <none>           (no description available) un  linux-image-3.0         <none>           <none>           (no description available) ii  linux-image-3.16.3-0316 3.16.3-031603.20 amd64            Linux kernel image for version 3.16.3 on 64 bit x86

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


I am getting the below ERROR.  java.lang.NullPointerException     at java.util.Properties$LineReader.readLine(Properties.java:434)     at java.util.Properties.load0(Properties.java:353)     at java.util.Properties.load(Properties.java:341)     at org.apache.qpid.example.jmsexample.hello.Hello.runTest(Hello.java:29)     at org.apache.qpid.example.jmsexample.hello.Hello.main(Hello.java:16)   My code is :  Properties properties = new Properties(); properties.load(this.getClass().getResourceAsStream("C:/Users/xxx/Documents/workspace-sts-3.8.3.RELEASE/hello.properties"));   Now ititially it looks like the file is missing or something like that.   So I added a check.  File f = new File("C:/Users/xxx/Documents/workspace-sts-3.8.3.RELEASE/hello.properties");       if(f.exists()) {              System.out.println("File exists");         }       else {           System.out.println("File DOES NOT exists");       }   This yields are result of :  File exists   So Im all out of options as to what else is missing. The file definitely exists and is properly populated. What else could I be missing ?

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


I am trying to find song titles in a MySQL database from PHP like this:  $sql = "SELECT s.* FROM {$this->tableName} AS s WHERE s.song LIKE '%{$value}%'";   If the title is e.g. "über", then searching for "uber" returns a match. But if I type "über" I don't find anything.  The song column is a fulltext column, utf8_general_ci.  I have a slight feeling that the problem is not in MYSQL, but in PHP.  Anyone any ideas?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Version: Ubuntu 16.04  I have used it some weeks, but now it gives me this message when I'm trying to install software and update or upgrade:  Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) /var/lib/apt/lists/ locked   followed by this:    .  and another error:  ** (appstreamcli:4560): WARNING **: Exception: Unable to get write lock on /var/cache/app-info/xapian/default: already locked   What should I do?

It started few days ago. I'm running sudo apt update command and it never ends. Terminal output is  Get:1 http://ru.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:2 http://archive.canonical.com/ubuntu xenial InRelease                      Hit:3 http://ppa.launchpad.net/attente/java-non-latin-shortcuts/ubuntu xenial InRelease Hit:4 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:6 http://ru.archive.ubuntu.com/ubuntu xenial-updates InRelease              Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]     Hit:8 http://dl.google.com/linux/chrome/deb stable Release                      Hit:9 http://ru.archive.ubuntu.com/ubuntu xenial-backports InRelease            Fetched 341 kB in 2s (150 kB/s)   While this proccess system fan speed is boosted on my laptop and it's kinda annoying to listen to this. There is no excessive cpu activity though. Can you guys hint me why it happens?


Original post on stackoverflow:   I am trying to do a logistic regression analysis in R with two continuous explanatory variables and six other explanatory categorical variables, and find a good regression model to do predictions. When I do step-wise model selections, there are always some levels of certain categorical variables identified as insignificant. I am just wondering how should I deal with this situation. Should I simply drop these levels, or I should force the program to keep all levels of the categorical variables and try to drop the relatively insignificant variables?  Thanks a lot!

In answer to  factor pooling in model selection was discussed.  If a factor or categorical variable is to be dropped in model selection, should all levels be dropped simultaneously? If so, why?  The motivation for dropping factors is to aid model interpretation. For example, I might be interested in explaining the factors that influence customer behaviour when visiting a store and have a categorical variable "travel mode" with factors "walking, bus, private car, taxi, etc." In this context, I can remove all the dummy variables except "private car" because they have an insubstantial estimated magnitude and are not significant predictors of behaviour. I then end up with a "travelled in private car" vs "didn't travel in private car" variable and don't have to worry about troubling the reader with interpreting the other largely uninteresting variables.


A colleague of mine often pulls me up on my awful grammar, earlier today I said "I never went to poker yesterday" and she told me that it was grammatically incorrect.   I understand that I could/should have said "I did not go to poker yesterday" but I would like to know whether my original statement was technically a grammatically correct statement, because in my head it makes logical sense.   Thanks

I usually come late to the daily scrum meetings (but I do compensate, by working late!). For the last 6 working days, I have been coming on time, or even slightly earlier.   At lunch, I told my manager this      I have never been late for the daily scrum for this sprint (last 6 working days).   He told me that my usage is incorrect because, I cannot use never and restrict it to a time period. Never, apparently, is for eternity, e.g, I have never drunk Russian vodka.   What is the correct usage?


Currently, my answers are voted up, but I can't get my reputation points.  is my account, and my reputation points are stuck at 2,270, but I'm sure I'm getting upvotes, so what is wrong with my account or this is a kind of bug or something?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I'm using SSH to access a jump-box, essentially.   I have two machines. The "local" machine, the one I'm physically seated in front of, is running Fedora 25. The "server" is running Cent OS 7. It sits behind a router, and I use it to hop into the network behind that router. Both machines have an identical user account, "user1."  I connect to the server by opening my favorite terminal emulator on the local machine and entering "ssh -X -p 2201 server-dns.net" where server-dns.net is the correct domain name of the server. I enter my password, and I reach a prompt. When I look at the prompt, I see that my username hasn't changed, but my hostname has.  This is where the confusion begins. Both machines have a copy of Firefox installed, but only the server has a copy of Chromium installed. When I launch Chromium once connected, the remote instance of Chromium appears, and I can browse the remote network. But when I launch Firefox, my local install of Firefox opens. Why? When I ssh in as a different user, and launch Firefox, the remote install of Firefox opens. I know this issue is related to the usernames being identical, but how?

I'm using Slackware. Firefox is running. I also have a virtual machine running Ubuntu 16.04 using VirtualBox.  I've installed Firefox on the virtual machine, and Firefox is installed on the host computer.  I opened an SSH session in the virtual machine and ran Firefox. It opened a new window of my host computer's Firefox.  Why did it do this? I was expecting two running instances of Firefox: one on my host computer and one on the virtual machine.


How should I capitalize a word with an adverb separated by a hyphen in a title?  e.g.  "Make-up" or "Make-Up" (noun) "Strap-on" or "Strap-On" (noun) "Stripped-down" or "Stripped-Down" (adj.) "Up-to-Date Account" or "Up-to-date Account" or "Up-To-Date Account"  I've heard that in a title you should always capitalize the last word, no matter if it is a proper noun or an adverb. I'm trying to work out if it applies to a hyphen word with an adverb on its end.

Do you capitalize both parts of a hyphenated word in a title?  "My Ex-Wife Hates Me"  or  "My Ex-wife Hates Me"


I was updating my ubuntu 12.04 and got few issues. I think something is broken that has to be fixed. Kindly help me to fix the issue when i run update command. I am receiving below errors.  W: There is no public key available for the following key IDs: 1397BC53640DB551  W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)  W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources  Hash Sum mismatch  E: Some index files failed to download. They have been ignored, or old ones used instead.

I decided to upgrade  sudo update-manager -d   Then it's opening the update-manger GUI. After clicking the upgrade button It's return the below error list:  W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32, W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32, E:Some index files failed to download. They have been ignored, or old ones used instead.   How to resolve this issue?


Let's say I invest $100 in ACME, Inc. Then it goes up by 100%. Now my shares are worth $200. Do I now have a "theoretical" $200, or is it possible for me to "get out" some amount of money without selling/losing those shares? Do I have to sell the shares to get my $200?

Suppose you buy stocks from company FOOBAR at price X. After a while, the price is Y = X * 1.25, so you decide you want to collect that 25% profit. You sell the stocks, cashing out your original X plus a 25% profit. Yay! You made money. But haven't you also put yourself out of the trading business by not having stocks anymore? If you just want to take profit but also continue investing, you collect the 25% and you are back to having just X to invest. Now stocks from FOOBAR are too expensive for you (current value is Y). What do you do? Do you select another cheaper (pontentially worse) stock just to be able to buy it? You wait until FOOBAR price is X again? (losing time and also maybe the stock is not as attractive now?). Does this mean stocks are mainly for the long-term-collect-once type of investment? How do short/middle term traders make money, without falling in a diminishing returns type of situation? Thanks!


This is my Graph:  \begin{figure}[htb]     \centering     \tikzsetnextfilename{kalman}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3.5cm,thick,Zustand/.style={circle,fill=blue!10,draw,font=\Large},Beobachtung/.style={circle,fill=red!10,draw,font=\Large}]         \node[Zustand] (1) {1};         \node[Zustand] (2) [right of=1] {2};         \node[Zustand] (3) [right of=2] {3};         \node[Zustand] (4) [right of=3] {4};      \draw[->](2) to[out=170,in=10] node [midway, above] {0.5} (1);     \draw[->](1) to[out=350,in=190] node [midway, below] {0.3} (2);      \draw[->](1) to[loop left] node [midway, left] {0.5} (1);     \draw[->](2) to[loop right] node [midway, right] {0.7} (2);      \draw[->](4) to[out=170,in=10] node [midway, above] {0.8} (3);     \draw[->](3) to[out=350,in=190] node [midway, below] {0.8} (4);      \draw[->](3) to[loop left] node [midway, left] {0.2} (3);     \draw[->](4) to[loop right] node [midway, right] {0.2} (4);  \end{tikzpicture} \caption[Kalman]{Übergangsgraph der Markov-Kette} \label{fig:kalman} \end{figure}   and i have the problem that it is not shown in the right place in my document. It is placed after the definition which follows in the code, weird somehow and i can't figure out why...

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


This is in refernce to testing if a given number is prime by square root method. Qs:  I understand the logic behind taking square root ( based on factor pair) but why do we consider only the prime numbers below the sq. root to test the divisibility and not all the numbers? 2). Also as any number with a square  root will have that sq. root as a factor, so why cant that be considered as another factor apart from (1 and itself) ( I guess may b we consider only integers ?)

I was going through the fundamental theorem in Number Theory where any non zero integer n can be represented as a product of distinct primes. A related problem with this theorem is to prove that for every such number, there exists a prime $p$ such that $p< \sqrt n$. I was wondering if there is any mathematical proof that no prime $p$ exists for the number $n$ such that $p> \sqrt n$.


As a developer I might have broken something as my 18.04 tries to load packages also(?) for arm64:  $ sudo apt update Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease               Hit:3 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu bionic InRelease Hit:5 http://dl.google.com/linux/chrome/deb stable Release                  Get:4 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]  ...  Fetched 494 kB in 2s (249 kB/s)                   Reading package lists... Done  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  404  Not Found [IP: 91.189.88.162 80]  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages  404  Not Found [IP: 91.189.88.162 80]  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages  404  Not Found [IP: 91.189.88.162 80]  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages  404  Not Found [IP: 91.189.88.162 80]  E: Some index files failed to download. They have been ignored, or old ones used instead.   Why is this happening? Where does it get that binary-arm64?  There are no *.list under my /etc/apt/ that would include anything related to arm.

On Ubuntu 12.04 LTS x64, we'd like to remove the i386 foreign architecture it comes with, but I don't see a dpkg command to do this cleanly.  In , the user is advised to just remove the line from /etc/dpkg/dpkg.cfg.d/multiarch, I can do that (or even remove that file altogether), but I was wondering whether there is a more "appropriate" way to do that.  The reason we want to do that is that we maintain a large number of continuous integration agents using Puppet and want to stick to "pure 64". We install our own Debian packages from our own maintained repository and this fails unless we provide an i386 version of the package. I'm aware that it's possible to override the architecture in the specific repository configuration but it'll be cleaner to just disable the non-64 architecture altogether.


3 random variables have equal pairwise correlation, what are the possible values of correlation?  I think 1 and 0 are the obvious answers, but are there any more, and how could I find them?

There are three random variables, $x,y,z$. The three correlations between the three variables are the same. That is,  $$\rho=\textrm{cor}(x,y)=\textrm{cor}(x,z)=\textrm{cor}(y,z)$$  What is the tightest bound you can give for $\rho$?


I have a string that contains HTML, for example  var myString = "

testing

";   I need to target p and replace "testing" with something else, say "Hello World". I would normally use  $("p").innerHTML = "Hello World";   However, this is part of a string, not part of the DOM. How can I use jQuery's selector system to select from a string of HTML?

I have an HTML string representing an element: '
text
'. I'd like to append it to an element in the DOM (a ul in my case). How can I do this with Prototype or with DOM methods?  (I know i could do this easily in jQuery, but unfortunately we're not using jQuery.)


A cubic cheese consists of 27 smaller cubes of cheeses (3x3x3). A mouse will eat the first cheese cube and then eat an adjacent cheese cube (no diagonal eating allowed). Show that the mouse can't end up eating the middle cheese cube last.  EDIT:   The mouse has to eat every cube and can't move into empty space.  Any ideas on how to show this?

We have a $3\times3\times 3$ cube which has $27$ cubes each $1\times1\times1$ stuck together as usual. $2$ cubes are neighbours if they have a common face. The corner cubes are the $8$ cubes at the corners of the big cube. Can the worm start from a corner cube and eat its neighbour cube, continuing until at the end the last cube eaten is the one in the center of the big cube which has 6 neighbour cubes?


What is the standard practice if I can no longer find students that contributed to a paper that we would like to publish now? The students contributed data, but obviously had nothing to do with writing the paper. Still, I feel that they deserve authorship. I can no longer find a current email address for them. Should I put them only in the acknowledgements section?

The paper in question is based on research my collaborator X and I did together some months ago. Our respective contributions to the research were around 2/3 for X and 1/3 for me. In terms of the actual text of the paper, X wrote about 1/3 and I wrote about 2/3.   During the writing of the actual paper, X decided to leave academia. I can no longer contact X: emails to the old address go undelivered and there is no forwarding address for physical mail. Attempts to find X through web searches and contact X through mutual acquaintances have been unsuccessful. X has thus not seen a complete draft of the paper, only the sections that were actually written by X.  In these circumstances, is it ethical for me to submit a paper with X's name on it, without a complete version having been checked by X and without X's approval?  If I do submit it, should it contain a note of the fact that X was unable to check the completed paper? I am considering the hypothetical possibility that I could have inadvertently introduced an error while writing the complete paper (and such an error might survive through peer-review and into publication); responsibility for such an error should be mine alone.   There is no possibility of separating out my contribution into a separate paper. Either the work has to be published as a whole or not at all.  I am in a field where alphabetical listing of authors is standard, so there is no question of the order of authors.


Rename all the files in .ts files in a directory My echo command works but not if I try to make it a new variable.  #!/bin/sh for file in "${1}"/*.ts; do   echo ${file} | sed -e 's|.ts|.mkv|'   new_name=${file} | sed -e 's|.ts|.mkv|' done

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


WHY did he go slightly "pink" ?? WHY did he go pink "with the effort"? What effort? Does "pink" mean angry, embarrassed,  healthy or other meaning in this sentence? I am so so not sure what "pink" means this sentence, since some of the following definitions in the dictionary and my own understanding all make sense, but surely there should be ONLY one correct :   In the Collins dictionary it says: If you are in the pink, you are fit, healthy, and happy.  In the Collins dictionary it also says: If you go pink, your face turns a slightly redder colour than usual because you are embarrassed or angry, or because you are doing something energetic.  Which is it in this sentence?  as far as I understand as the following , all seems right, because:  1 healthy: he is getting out more often rather than stays indoors and with the effort he now looks slightly pink.  2 embarrassed: he is embarrassed because he doesn't enjoy watching morris dancing. (if so, then it leads to why?? is there some culture gap here??  3 angry: he kept a straight face while watching the morris dancing, and a previous fact in the novel suggests he is not a big fan of it, and his face became pink before red.  4 may be he is tired: he kept a straight face and by doing so (with the effort) he became a little tired and the color of his face became pink, showing easily-get-tired. (he is a  quadriplegic and any effort cost him more energy than normal person)  5 other explanations  here is the sentence:     We, in the meantime, had gradually been increasing Will’s outings—and   the distance that he was prepared to travel. We had been to the   theatre, down the road to see the morris dancers (Will kept a straight   face at their bells and hankies, but he had gone slightly pink with   the effort), driven one evening to an open-air concert at a nearby   stately home (more his thing than mine), and once to the multiplex   where, due to inadequate research on my part, we ended up watching a   film about a girl with a terminal illness.      Me Before You by Jojo Moyes   The context is that Will is a quadriplegic and in wheelchair and he rarely goes out. "We" means Louisa, his carer and his family. Could anyone help with this silly question?

This is a follow-up question to my previous one, , as in that one I have established that "pink" in this context mean "embarrassed" other than "angry or healthy."  Then it leads to my second confusion, why is he embarrassed? I have checked the definition of morris dance on wikipedia, so far as I know it's a culture dancing, some cultural heritage. but why embarrassing? is there some culture gap I have missed??  Here is the sentence:     We, in the meantime, had gradually been increasing Will’s outings—and   the distance that he was prepared to travel. We had been to the   theatre, down the road to see the morris dancers (Will kept a straight   face at their bells and hankies, but he had gone slightly pink with   the effort), driven one evening to an open-air concert at a nearby   stately home (more his thing than mine), and once to the multiplex   where, due to inadequate research on my part, we ended up watching a   film about a girl with a terminal illness.      Me Before You by Jojo Moyes   I searched the whole novel, and there are only two times "morris" are mentioned, the other is in a conversation in a horse racing watching:      ‘Don’t be grumpy. They say you should try everything once,’ I said.       ‘I think horse racing falls into the “except incest and morris   dancing” category.’       ‘You’re the one always telling me to widen my horizons. You’re loving   it,’ I said. ‘And don’t pretend otherwise.’       Me Before You by Jojo Moyes   The context is that Will is a quadriplegic in wheelchair and he rarely goes out, and he does not like go watching horse racing. "We" means Louisa, his carer.    Could anyone help with this question?


I was going through personal profile of  and .  Their personal info written as:     Hi, I'm not really a person.      I'm a background process that helps keep this site clean!      I do things like         Randomly poke old unanswered questions every hour so they get some attention   Own community questions and answers so nobody gets unnecessary reputation from them   Own downvotes on spam/evil posts that get permanently deleted   Own suggested edits from anonymous users      And this users are not listed in  voters tab.   How can background process vote this many times? Is voting being done democratically? Are StackExchange employees handling this accounts?

I see the  on the user page.  It seems to edit posts sometimes.  What is it? And why has it downvoted over 1800 times? See also:


So I was going to say something the other day like   "After eating this, you are going to want to go there."  I wanted to express that after eating that, the person would end up with a wish about going to some place. It's taken out of context, it could be a restaurant or so here.    Is this a correct/good way of saying this? What gave me some doubts is that it was kind of a messy sentence to say. It has two "go" in it and everything. Is perhaps the formulation "After eating this, you will want to go to there" better? As I understood from the thread below though, "you will want to" is more intended for instructions. So how would this fit here?    Is this thing expressed differently in different regions?    The other day was one of the first day of my life that I spent in an English speaking country, so I realized that I've got to step up my game a few notches :)

I know several questions were asked about the difference between "going to" and "will". Based on several answers (see, for instance, ,  and ), I understood that "will" is more spontaneous and "going to" is used with more planned actions.  So, it seems that everything is pretty fine. However, in , Kosmonaut has an answer in which he states: "Let's say that tomorrow you will walk your dog from 7 - 8 AM".  On the one hand, you probably planned to walk your dog long before and thus I should use "Let's say that tomorrow you're going to walk your dog from 7 - 8 am".   On the other hand, since I'm saying "let's say...", I'm deciding right now (thus, unplanned) that you will walk your dog. So, even though in this hypothetical situation you made a plan, I'm in a more spontaneous mood deciding right now that that's what you will do tomorrow, and, thus, I should use "will".  Which one (if any) of the above explanations is right?


Why we usually do not exceed ARMA(5,5) models in practice? Is there any mathematical justification for this?

The function auto.arima in the forecast package of R is a powerful tool to identify the best ARIMA(p,d,q) model for a given data series. In the   of the function, they report the following:  auto.arima(y, d=NA, max.p=5, max.q=5, max.order=5, max.d=2, start.p=2, start.q=2, ...)   According to the above function it seems that, by default, auto.arima tries to find the best model among all the combination having:   p equal or lower than 5 q equal or lower than 5 d equal or lower than 2 order equal or lower to 5, i.e. p + q + d  ≤ 5.   However, why does the default code stops at these conditions? Is there any particular reason why p, q and d should be equal or lower than 5, 5 and 2 and their sum lower than 5?


Yeah, I did this, it was stupid.  I did not know it will pull its dependencies with it, I just wanted to install python 2 and 3 from scratch (because of this problem: ).  Now, I still can use my terminal, checked these answers:      However after running sudo apt-get install ubuntu-desktop I get these errors:  Setting up python-ldb (2:1.1.24-1ubuntu3) ... /var/lib/dpkg/info/python-ldb.postinst: 6: /var/lib/dpkg/info/python-ldb.postinst: pycompile: not found dpkg: error processing package python-ldb (--configure):  subprocess installed post-installation script returned error exit status 127 No apport report written because MaxReports is reached already                                                               Setting up python-tdb (1.3.8-2) ... /var/lib/dpkg/info/python-tdb.postinst: 6: /var/lib/dpkg/info/python-tdb.postinst: pycompile: not found dpkg: error processing package python-tdb (--configure):  subprocess installed post-installation script returned error exit status 127 No apport report written because MaxReports is reached already                                                               dpkg: dependency problems prevent configuration of python-samba:  python-samba depends on python-crypto; however:   Package python-crypto is not configured yet.  python-samba depends on python-ldb (>= 1.1.2~); however:   Package python-ldb is not configured yet.  python-samba depends on python-tdb; however:   Package python-tdb is not configured yet.  dpkg: error processing package python-samba (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already                                                               Processing triggers for libc-bin (2.23-0ubuntu7) ...  Errors were encountered while processing:  mercurial-common  python-crypto  python-dnspython  python-ldb  python-tdb  python-samba E: Sub-process /usr/bin/dpkg returned an error code (1)   What is the way to restore these dependencies (16.04 LTS)?

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


Creating a list of dictionaries via a for loop  I've been trying to create a list of dictionaries via a for loop, code shown below  a=["x","y","z"] b=[1,2,3] dict1={} superlist=[] for i in range(0,len(a)):     dict1['name']=a[i]     dict1['values']=b[i]     superlist.append(dict1)   What I'm expecting as my output is  [{'name':'x', 'values':1},{'name':'y', 'values':2},{'name':'z', 'values':3}],   instead I get  [{'name':'z', 'values':3},{'name':'z', 'values':3},{'name':'z', 'values':3}].   I'm not really sure what's going on here and it'd be great if someone can explain and help me get my desired result.

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


How can I go about creating a Kelvin’s Tetrakaidecahedron Cell / tetrakaidecahedron. I'm willing to try it using Geometry nodes, Python, etc.. For more background on what it is. Tetrakaidecahedron (Kelvin Cell)    I'm using Blender 2.93.0

The idea I have is to start from the tetrakaidecahedron, have the edges and create something organical as the photomicrograph below.


If G be a cyclic group of prime order p ,prove that non identity element of G is a generator of the group.  Let , a be the generator of the group . Then o(a)=p ==>a^p = e, where e be the identity element . G={a,a^2,a^3,.....,a^p(=e)}.

If G be a cyclic group of prime order p, prove that every non identity element of G is a generator of the group.


On CentOS linux, I just deleted a large log file over 3gb on XFS file system. After deleting the file, the available file space did not return to the drive seen via df -h. Is there anything I can do to find the missing free space?

I have been asked this question in two consecutive interviews, but after some research and checking with various systems administrators I haven't received a good answer. I am wondering if somebody can help me out here.  A server is out of disk space. You notice a very large log file and determine it is safe to remove. You delete the file but the disk still shows that it is full. What would cause this and how would you remedy it? And how would you find which process is writing this huge log file?


For example, with winform, I drag a button named button1 on the winform.  this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.Click += new System.EventHandler(this.Alert);   the answer is how can I get the function names bound to button1 in code.  I want to get the function names,then use names to find source codes about button1, when user click button1, I will give the source code about button1.

Is there a way to tell if an event handler has been added to an object?  I'm serializing a list of objects into/out of session state so we can use SQL based session state... When an object in the list has a property changed it needs to be flagged, which the event handler took care of properly before.  However now when the objects are deserialized it isn't getting the event handler.  In an fit of mild annoyance, I just added the event handler to the Get property that accesses the object.  It's getting called now which is great, except that it's getting called like 5 times so I think the handler just keeps getting added every time the object is accessed.  It's really safe enough to just ignore, but I'd rather make it that much cleaner by checking to see if the handler has already been added so I only do so once.  Is that possible?  EDIT: I don't necessarily have full control of what event handlers are added, so just checking for null isn't good enough.


I'm learning a bit about sound and was wondering:  If the speed of sound is determined by the amount of matter the source is surrounded with, why doesn't it go through a wall?  Example:  Speed of sound in air is 343 m/s but in water, it moves at 1500 m/s because of the increase of matter surrounding it. And since iron has more tightly packed matter, it moves even faster because it's moving the matter to move the vibrations.  If this is true, why doesn't the sound go through walls? Is it because it loses its "strength" for the amount it travels?

We know that speed of sound is higher in a denser medium. So when a sound wave strikes a wall, why does it echo instead of passing through it with a speed faster than the speed of sound in air?


If $(a + ib)^3 = 8$, prove that $a^2 + b^2 = 4$       Hint: solve for $b^2$ in terms of $a^2$ and then solve for $a$   I've attempted the question but I don't think I've done it correctly:  $$ \begin{align*}   b^2 &= 4 - a^2\\   b &= \sqrt{4-a^2} \end{align*} $$  Therefore, $$ \begin{align*}   (a + ib)^3 &= 8\\   a + \sqrt{4-a^2} &= 2\\   \sqrt{4-a^2} &= 2 - a\\   2 - a &= 2 - a \end{align*} $$  Therefore if $(a + ib)^3 = 8$, then $a^2 + b^2 = 4$.


The formula for the  the sum of infinite terms of a geometric progression  is $S_{\infty} = \dfrac{a}{1 - r}$, where $r < 1$. Why is this only defined for $r < 1$? My teacher doesn't know why.

When is the formula $$S_{\infty} = \dfrac{a}{1-r}$$ valid?   Does |$r| <1$?


How can I show that if some group $G$ has only one subgroup $K$ of order $n$, then $K$ is a normal subgroup? Would that mean that it only has one subgroup total? If so then I guess that makes sense.

Suppose $H$ is the only subgroup of order $o(H)$ in the finite group $G$. Prove that $H$ is a normal subgroup of $G$.  I've been trying this problem for quite a while but to no avail. What I can't understand is, how do you relate the subgroup being normal/abnormal to its order?  This question is from I.N.Herstein's book Topics in Algebra Page 53, Problem no. 9. This is NOT a homework problem!! I'm studying this book on my own.


How do I remove a question? I have ask a few questions and I have gotten the answer either on here or an outside source, or the question wasn't understood so I have to rephrase it.  Anyways  I want to delete some of them now. How do I do that?

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


When I try to install VLC using apt-get, I get the following error:  parameswaran@parameswaran-Compaq-Presario-CQ61-Notebook-PC:~$ sudo apt-get install vlc [sudo] password for parameswaran:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc   It's happening in my Ubuntu i386 Compaq Presario cq61, and I'm new Ubuntu user.  Somebody please tell me how to solve this issue and install packages in my laptop?

This is what happens:  sudo apt-get install vlc Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc   Please help. I would also like to know when this error occurs, I've seen it before too.


For example, I have:  def run():   x = input()   switch (x):     case 1:       print "case 1"     case 2:       print "case 2"       break;     case 3:       print "3"     case (4,5):       print "4"       print "5"       break;     default:       print "default"   It is just pseudocode on Python. I tried to rewrite this program using real Python syntax:  def run():   x = input()   if x == 1:     print ("case 1")   if x == 1 or x == 2:     print ("case 2")   else:     if x == 3:       print ("3")     if x == 3 or x == 4 or x == 5:       print ("4")       print ("5")     else:       print ("default")   Looks very ugly. Can I do this in another way; for example, using dictionaries?

I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario?


The title says it all: what's the easiest way to find what version of Windows is installed on a PC? I often find myself trying to help people with various issues on their computers, and the first question I ask is "what Windows do you have?". Most of them don't know how to answer, so I'd like to find out what's the easiest way to find out. Thank you!

During the beta of Windows 10 it was hard know what version you were running unless it had it posted to the desktop. Once that wasn't there - how do you tell what version / build you are running?   This will become more of an issue as Microsoft starts releasing more builds with the new update mechanism.


Some time ago I saw a documentary in which they said that to have the experimental certainty of the existence of a string we would need a particle accelerator with the same diameter of the milky way. Now such a thing seems to me (as a layman) asymptotically out of the possibilities of advanced civilizations to accomplish.  Is this the only way to test beyond doubt the veracity of this theory or there are other sub-evidences that could either prove or disprove string theory?

I know that there's big controversy between two groups of physicists:   those who support string theory (most of them, I think) and those who oppose it.   One of the arguments of the second group is that there's no way to disprove the correctness of the string theory.  So my question is if there's any defined experiment that would disprove string theory?


I am trying to figure out why for two variant variables that are identical, vba says it's not.  Public netw, netw_c As Variant  netw = Range("C2").Value netw_c = Range("C1").Value * Range("B2").Value  If netw <> netw_c Then     StrUoM = StrUoM + "Error on net weight, net weight of CS is different to the net weight ZCU times their number in it." & Chr(10) End If  Why this if loop returns me a true statement ? I noticed also, by looking a lot into this issue that if I declared my two variables netw, netw_c as Single. So, the problem is not about making it functionnal, it works with this declaration but, I don't understand why. Here are how are defined the variable in VBA:  Thank you !

I have trouble comparing 2 double in Excel VBA  suppose that I have the following code  Dim a as double Dim b as double a = 0.15 b = 0.01   After a few manipulations on b, b is now equal to 0.6  however the imprecision related to the double data type gives me headache because  if a = b then  //this will never trigger end if   Do you know how I can remove the trailing imprecision on the double type?


I use Tasker's Wifi Near option to activate some tasks in my phone when I arrive at my workplace. My problem is that sometimes I pass by my workplace, with no intention of entering, and the tasks get activated.  Is there a way to make Tasker activate the tasks IF I've been near my workplace's wifi spots for more than a minute?

How can I execute a tasker task only after a certain condition has been true for a certain time?  Normally a profile executes its task as soon as all conditions are met. I want to delay this activation, until the conditions have stayed true for some time.  E.g.    do something after the screen has been continuously off or on for 10 minutes do something after wifi xy has not been near for 10 minutes do something after cell towers x,y,z have not been near for 10 minutes.


I know I can use Super + D to show the desktop - but how can I add an icon to do so as a favorite in the launcher?

I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop file?  (I know that I can use the Ctrl + Super + D   and that I can install , but I specifically want a button in the dash.)


Which of the following method is better?  vector<int> vecInts; // initialize vecInts; // method ONE     for( vector<int>::size_type szInd = 0; szInd < vecInts.size(); ++szInd ) {   // process vecInts[szInd] }  // method TWO for( vector<int>::iterator iter = vecInts.begin(); iter != vecInts.end(); ++iter ) {   // process *iter }   During code review, I am always suggested by one person that I should replace the method one with iterator version and I argue that it doesn't matter. Am I right? Thank you

Take the following two lines of code:  for (int i = 0; i < some_vector.size(); i++) {     //do stuff }   And this:  for (some_iterator = some_vector.begin(); some_iterator != some_vector.end();     some_iterator++) {     //do stuff }   I'm told that the second way is preferred. Why exactly is this?


There are some such packages that are not actually available from the repository, but are instead "Provides" provided by other packages.  For example, packages may depend on libc-dev, but (at least in my case) libc-dev is provided by libc6-dev.  Is there way to check which package provides some other package/dependency?

Some packages, have a Provides: header. For example, the package postfix on Debian Wheezy has Provides: mail-transport-agent.   The package mail-transport-agent which doesn't exist physically is considered as a "virtual" package.   How can I know, on a Debian based system, if a given virtual package is "installed" (or "provided")? Can I list every "provided" virtual package?  Hint: to list every existing virtual package, installed or not, do: aptitude search "~v"


I have some function linked into another and I want to a) do (remove a class) something to the result of one of those functions and I want to b) do something else (add a class) with the very same result when the click-event - that fires the functions also the first time - is fired the next time. While a) works nicely, I do get an error for b) Uncaught ReferenceError: randActivity is not defined because the result that I have in a) is now not set/defined anymore. I don't get why. Can sobody please help me on that code         window.onload = function() {         var items = Array("pushup", "pullup", "run");           function rand(items) {             var randActivity = items[items.length * Math.random() | 0];             document.getElementById(randActivity).classList.remove("not");         }           var runden = 0;         var display = document.querySelector('#displayTimer'),             timer = new CountDownTimer(5),             timeObj = CountDownTimer.parse(5);         format(timeObj.minutes, timeObj.seconds);         timer.onTick(format);           document.querySelector('#startTimer').addEventListener('click', function() {             if (runden != 0) {                 console.log(randActivity); // this is the spot where the error happens.                  document.getElementById(randActivity).addClass("not");             }             timer.start();         });           function format(minutes, seconds) {             minutes = minutes < 10 ? "0" + minutes : minutes;             seconds = seconds < 10 ? "0" + seconds : seconds;             display.textContent = minutes + ':' + seconds;             var zeitErgebnis = seconds;             if (zeitErgebnis == 00) {                 runden++;                 rand(items);                 display = document.querySelector('#displayTimer'),                     timer = new CountDownTimer(5),                     timeObj = CountDownTimer.parse(5);                 format(timeObj.minutes, timeObj.seconds);                 timer.onTick(format);             }         }     };  The error happens in the addevent if the function is fired NOT for the first time. But shouldn't be the variable of randActivity then have the result that it has within the function of format()? Why not?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


When I access with https protocol, it works. But I access with http protocol, it doesn't work at all.  My Nginx version is 1.12.1. Here is the config: /etc/nginx/sites-available/***:  server {     listen 80;     server_name ***;     client_max_body_size 10240M;      location / {         proxy_pass http://localhost:8080/guacamole/;         proxy_buffering off;         proxy_http_version 1.1;         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;         proxy_set_header Upgrade $http_upgrade;         proxy_set_header Connection $http_connection;         proxy_cookie_path /guacamole/ /;         access_log off;     }      listen 443 ssl; # managed by Certbot     ssl_certificate /etc/letsencrypt/live/***/fullchain.pem; # managed by Certbot     ssl_certificate_key /etc/letsencrypt/live/***/privkey.pem; # managed by Certbot     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot      if ($scheme != "https") {         return 301 https://$host$request_uri;     } # managed by Certbot }

This is my first time setting up a server and I've just installed a SSL cert. I have also made some changes to the iptable to allow access to 443. Below is the output of iptables -L   target     prot opt source         destination ACCEPT     all  --  anywhere       anywhere        state RELATED,ESTABLISHED ACCEPT     tcp  --  anywhere       anywhere        state NEW tcp dpt:http ACCEPT     icmp --  anywhere       anywhere ACCEPT     all  --  anywhere       anywhere ACCEPT     tcp  --  anywhere       anywhere        state NEW tcp dpt:ssh ACCEPT     tcp  --  anywhere       anywhere        state NEW tcp dpt:smtp ACCEPT     udp  --  anywhere       anywhere        state NEW udp dpt:smtp ACCEPT     tcp  --  anywhere       anywhere        tcp dpt:urd REJECT     all  --  anywhere       anywhere        reject-with icmp-host-prohibited ACCEPT     tcp  --  anywhere       anywhere        state NEW tcp dpt:https   I also checked nmap by ssh'ing into the server and run nmap from the server itself.  Starting Nmap 5.51 ( http://nmap.org ) at 2016-04-15 15:31 SGT Nmap scan report for <my.domain.ip> Host is up (0.0000050s latency). Not shown: 994 closed ports PORT     STATE SERVICE 22/tcp   open  ssh 25/tcp   open  smtp 80/tcp   open  http 443/tcp  open  https 3005/tcp open  deslogin 3031/tcp open  epic   When I tried telnet [my.domain.ip] 443 remotely  Trying <my.domain.ip>... telnet: connect to address <my.domain.ip>: Connection refused telnet: Unable to connect to remote host   Lastly, I do not know if nginx.conf plays a part but below is a snippet of the code for the ssl for the domain  #include /etc/nginx/conf.d/*.conf;  server {     listen          <my.domain.ip>:80;     server_name     mydomain.com www.mydomain.com;     index           index.html index.htm index.py;     access_log      /var/log/nginx/mydomain.com.log;     error_log       /var/log/nginx/mydomain.log.error;     root            /home/fr/;     charset         utf-8;      #error_page 500 502 503 504 /custom_50x.html;     #location = /custom_50x.html {     #        internal;     #}      location / {         uwsgi_pass  <my.domain.ip>:3031;         include     uwsgi_params;     }      location /static {         root        /home/fr/env/FRuler/fruler/;     } }  ### for ssl  ### server {     listen          <my.domain.ip>:80;     server_name     mydomain.com www.mydomain.com;     index           index.html index.htm index.py;     access_log      /var/log/nginx/mydomain.com.log;     error_log       /var/log/nginx/mydomain.log.error;     root            /home/fr/;     charset         utf-8;       location / {         uwsgi_pass  <my.domain.ip>:3031;         include     uwsgi_params;     }      location /static {         root        /home/fr/env/FRuler/fruler/;     } }  server {     listen 443 ssl;     server_name     mydomain.com www.mydomain.com;     ssl on;     ssl_certificate /etc/ssl/mydomain/ssl.crt;     ssl_certificate_key /etc/ssl/mydomain/server.key;     server_name mydomain www.mydomain.com;     access_log  /var/log/nginx/mydomain.com.log;     error_log   /var/log/nginx/mydomain.log.error;     location / {         root /home/fr/;         index index.html;     } } ### end of ssl ###   Any help is appreciated.


I'm trying to understand a seemingly easy case while learning regular expressions.  Suppose I have a code like this:  import re  a = "Eventin queue contains 5 elements, first element is 20 minutes old" b = re.search(r"Eventin queue contains \d+ elements, first element is \d+ minutes old", a) print(b)   For some reason, bonly returns this result: <_sre.SRE_Match object; span=(0, 66), match='Eventin queue contains 5 elements, first element >  As you can see, it's not a full result that I was expecting. However, if I use re.findall() I get ['Eventin queue contains 5 elements, first element is 20 minutes old']  Am I misunderstanding something here? Shouldn't re.search() return the full match as well?

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


$$\overline{z}=z^n$$ where $n\in \mathbb{N}$   So I have started with moving the polar representation as the expression is in the n-th power  $$rcis(-\theta)=r^ncis(n\theta)$$   I can not multiply both sides in $r^{(-n)}$ as $n\in \mathbb{N}$ how should I continue?

If $n$ is an integer and $n>2$, then $$\bar{z}=z^{n-1}$$ has $n+1$ solutions. Does this have something to do with the rational root theorem?


I have two lists. For example:  keys = [1, 2, 3, 2, 4, 2, 1]   and  values = [1, 2, 3, 4, 5, 6, 7]   I want to create a dictionary of lists out of them as shown below:  dict = {1: [1, 7], 2: [2, 4, 6], 3: [3], 4: [5]}    What is the fastest way to do it and what generates the efficiency gains, both by using any module and also by not importing any additional module?

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


Simple question out of curiosity...  Beside the use of cryptographic safety and prime factorization, what other uses are there for prime numbers?  Thank you.  Edit:  To clarify and not confusing with a possible 'duplicate' post. I'm asking for other uses than cryptographic-like applications. (this include cryptography (ex. RSA), hashes, pseudo random, etc.) It doesn't necessary have to be something with engineering either. But knowing the innovative uses of primes in programs would be nice to know.  Another frequent answer is Cicadas, because they emerge every 13 or 17 years. For me that is something up for debate as it could also be just a coincidence. I am comparing this example with petals, where you can see a repeated form of Fibonacci sequence with all different types of petals. All the while, doing some more research there are Cicadas that emerge every year as well.  I'm just curious as what else there is out there that could benefit from the use of primes.

Prime numbers (or coprimes) have few well-known uses but interesting ones.  The classical example is that prime numbers are used in asymmetric (or public key) cryptography. Prime numbers and coprimes are also used in engineering to avoid resonance and to ensure equal wear of cog wheels (by ensuring that all cogs fit in all depressions of the other wheel).  Are there other known real-world, and especially physical world or engineering, applications for prime numbers?  Existing questions on the Mathematics stackexchange forum revolve mostly around computation examples (see for example ). These questions do not list physics or engineering real-world examples of prime numbers. They concentrate mostly on computational examples.


[time] nouveau 0000:68:00.0: i2c aux 0003: timeout 01119000  or  [time] nouveau 0000:68:00.0: i2c aux 0007: timeout 01119000  after install Ubuntu 18.04 and booting into it, I get these messages while [time] is the specific timestamp.

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:


The equation $x^{13}-e^{-x}+x-\sin{x}=0$ has    No real root More than two real roots. Exactly two real roots. Exactly one real root.   I tried doing with the odd derivative  and check whether the derivative change sign or remain same(positive or negative) so i find $f^{(15)}(x)=e^{-x}+cos(x)$ now i am not able to determine how this will change the sign. Is there any other way to do the same problem thanks

What can be said about roots of equation like   $$ x^{13} - e^{-x} + x - sin(x) = 0$$  If we assume f (x) to be above equation then f'(x) is positive, but I am not sure doing it this way. Is there some other general method?


When I click "Share" on a question or an answer, if I am logged in, a /{$account_id} is automatically appended to the link, probably for the  family of badges [citation needed]. However, this account ID can be easily used for resolving the account name and other public details, simply through https://domain.stackexchange.com/users/{$account_id}.  This may lead to users accidentally leaking their account when they share the links. As far as I understand from a quick google on "StackExchange real name policy" and "StackExchange multiple accounts policies", StackExchange does not have any explicit stances on anonymity or having multiple virtual online identities, but this problem may accidentally make other people know about your StackExchange account as another virtual identity.  As a matter of fact, I only have one SE account, and as you can see, it is obviously anonymous from real life. Just now, I almost included my account name when sending it to a friend who doesn't know about this identity of mine.  Here I am suggesting three possible solutions:   In account settings, set the preference not to include the account ID, but instead, like a non-logged-in visitor. This may, however, lead to the Announcer-family badges not working. Make a separate table (or whatever) in the database that maps numbers to question/answer IDs + user ID, so when a user clicks "share", a random/increment number is generated and mapped to the user's ID and question/answer ID. Simply encrypt the user ID with an internal key, then with the question/answer ID, i.e.:    share_link = 'https://domain.stackexchange.com/q/' + question_id + '/' + encrypt(     key: question_id,     message: encrypt(         key: internal_key,         message: user_id     ) )

Update (Jan 8, 2019) This is now 8 years old, but still getting occasional upvotes/attention, so I thought it's worth giving a summary of the current state.  Despite originally being , over the last decade some changes have made the privacy implications much clearer.  You now click "share" instead of "link", and the pop-up is very explicit that the link includes your user ID. There is a  asking that this user ID be anonymized or hashed, to allow users to earn publicity badges (the intention behind having the user ID present in the URL, as per ) while eliminating the privacy issue. Original Post It seems to me there is something of a privacy leak when permalinking to a question.  For what I would assume is the purposes of tracking which user is responsible for bringing traffic back to an SE site (for badges, etc.), the user ID of the user obtaining the permanent link . I wouldn't argue that this shouldn't be the case, but I find no warning or mention of this when I do these actions.  I'm sure I'm not the only one that doesn't desire anonymity on SO but would like at least pseudonymity on some places I might share a SO link, such as on a random blog.  As a user, I would not expect sharing a permanent link to leak my identity.   Unless you are familiar with Stack Exchange links or your own userID, it's certainly not obvious by looking at the link that it includes your personal info.  It'd be nice to have fair warning that using that feature will do so, and perhaps provide/describe the workaround: to simply remove the user-id segment from the URL.  Other features would be a preference that formats future permanent links to exclude the user id. Example (from this question)  Permalink:  Link to my user page:


Example 1) Let the number be 7. Then we have a set {3,4}, so the product of the numbers is 10 and the numbers are mutually coprime.  Example 2) for n=12, coprimes set = {3,4,5}, where product is 60 which is maximum.  Example 3) n = 9, coprimes set = {4,5}, product is 20 which is maximum product.

Consider all possible values for $(a_1,\ldots,a_n)$ (where each $a_i$ may be a positive integer or 0) when  $a_1 + \cdots + a_n = n$.  Consider $(a_j,\ldots,a_k)$ the values in $(a_1,\ldots,a_n)$ which are non-zero.  Given a set of values for all $a_i$, $j\le i\le k$ can we check whether they maximise $\operatorname{lcm}(a_j,\ldots,a_k)$ without testing all other cases?  Is there a computationally viable way  to always pick values for all $a_i$ which maximise $\operatorname{lcm}(a_1,\ldots,a_k)$?


I have been using ubuntu 13.10 (amd64bits) for a while and always the same problem happen with me when I add a new VPN connection.  My problem is the same as described in the follow website ->    The process name with bug is : nm-connection-editor. I also try to kill the process but without success.  Obs.: Between first problem (+-7months ago) and today, I had updated my OS a few times, the bug still alive! One important thing about kill the process, if I do not kill, the process still using around 30% of my CPU, but if I kill the process, then it turn to 0% CPU usage, but still showing as a process alive. ;(  Any idea how to get around??

I spend my days hopping between VPN connections in Ubuntu 10.10 and this is becoming severely annoying. What happens is that every once in a while - typically several times a day - when I click on the networking icon in the top bar, the nm-applet's VPN Connections flyout menu is gone. (Said menu item is still there, it just doesn't have a submenu or do anything when clicked.) Every time I killall nm-applet and start it again, which usually brings the menu back.   Has anybody here experienced this and been able to fix it?


My Wife, Daughter and I are traveling to India for 2 months from US. We would be there arriving at Mumbai.  Can we as a family take 1 iPad + 1 iPhone + 1 Camera + 1 my office laptop with me? Please note we are 2 Adults and 1 5 year old.

My Aunt lives in Newyork (United States) she's Indian, she's been there more than a year. I just ordered her 2 iPhone 6 phones for me and my brother personal use. The main problem is that with 2 iPhone + her own personal 1 iPhone 5s she is using. Will the Customs officials in Airport clear that 2 new Sealed iPhone as duty free or she will be charged? Help me here. If she will be charged than how much PERCENTAGE EXCISE TAX shall she pay?


I was able to prove that there are infinitely many prime numbers but I'm not able prove that there are infinitely many primes that are equivalent to $3 \pmod{4}$. How do I go about doing this?

I'm having difficult proving this.  As a hint the exercise to prove first, that if $a\lneqq \pm 1$ satisfies $a \equiv 3 \pmod4$, then exist $p$ prime, $p \equiv 3 \pmod 4$ such $p\mid4$. But I'm not really getting for what purpose can this be used.


As I am not very good with explaining things, I want to start with the code below:       public function meta ( ) {             $keywords_arr = $this->keywords();              /*             echo "<pre>"; print_r($keywords_arr);die;             gives following output:             Array             (                [0] => f                [1] => Business                [2] => AP Online Top Business Short Headlines                [3] => AP Online             )             */                            $focuskw  = is_array($keywords_arr[0]) ? $keywords_arr[0] : null;             return array(                     '_yoast_wpseo_focuskw' => $focuskw                       ); }   So now my question, is there any way i can eliminate the useless items from keyword array.  So that I can get some meaningful word that I can set as focused keyword.  In this case the first item "f" (but it can be any item) and i cannot set "F" as focused keyword.  So How to eliminate such meaningless items from array without adding complexity(i.e probably not running loop). I am not sure if it is possible.  I hope I am a bit more clear now.   Thank you

Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work.


Find $ \int_0^\infty \frac{x}{x^3 +1} dx$ What cantor should I choose?

So guys I have this improper integral $\int_{0}^{\infty}\frac{x}{x^3+1}dx$. I checked that it converges by $ \int_{0}^{1}\frac{x}{x^3+1}dx + \int_{1}^{\infty}\frac{x}{x^3+1}dx $ and using the $\frac{c}{(x-a)^\lambda}  $ and $\frac{1}{x^\lambda} $ criteria. But for finding the value I have trouble.I tried $ \int_{0}^{\infty}\frac{x}{(x+1)(x^2-x+1)}dx$ and $\int_{0}^{\frac{\pi}{2}}\frac{tg\alpha}{tg\alpha^3+1}dx$ but it gets me nowhere. Any ideas on solving it?


This icon showed up a few days ago, but I have no clue what it is. I have done a Google image search and can't find it.  This is on my Samsung S7 in the notification bar.

After I recently updated my phone about a day ago, this strange sign showed up on the top left that I have never seen before. Does anyone know what it means? Or how to get rid of it?


I'm new to tikz and LaTeX in general, so sorry if this is a silly question. I'm looking to replicate this:    So far, I have the following.  \begin{tikzpicture}[x=1cm, y=1cm, z=-0.6cm]     % Axes     \draw [->] (0,0,0) -- (4,0,0) node [at end, right] {$x$};     \draw [->] (0,0,0) -- (0,4,0) node [at end, left] {$y$};     \draw [->] (0,0,0) -- (0,0,4) node [at end, left] {$z$};      % Vectors     \draw [->, thick] (0,0,0) -- (0,2,1);     \draw [->, thick] (0,0,0) -- (2,2,0);      \draw [loosely dashed] (0,0,1) -- (0,2,1);     \draw [loosely dashed] (0,2,0) -- (0,2,1);     \draw [loosely dashed] (2,0,0) -- (2,2,0);     \draw [loosely dashed] (0,2,0) -- (2,2,0);      % Labels     \node [left] at (0,2,1) {$\begin{bmatrix}                                0\\2\\1                               \end{bmatrix}$};     \node [right] at (2,2,0) {$\begin{bmatrix}                                 2\\2\\0                                \end{bmatrix}$};  \end{tikzpicture}     It is missing the axis ticks and the orientation of the axes is different from the picture (although I guess mathematically it doesn't make too big of a difference). I've been reading the pgf manual and been looking through the forum, but I'm still stumped!

I would like to draw some 2D and 3D vectors in Tikz with certain properties. The following primitive graph sums what I desire:   I just need the first quadrant of the Cartesian coordinate system for my representation.  I need the vector to be connected to the respective values on the distinct dimensions(not a projection, just orthogonal dashed lines).   The code segment below does what I want to achieve in 3D with two exceptions:  The projections on the xy plane and z dimension are given instead of connecting the head of the vector to the corresponding value in each dimension.  Numerical values are missing in dimensions.   Code: \documentclass[tikz]{standalone} \usepackage{tikz-3dplot} \begin{document}  \tdplotsetmaincoords{60}{120} \begin{tikzpicture}     [scale=3,     tdplot_main_coords,     axis/.style={->,blue,thick},     vector/.style={-stealth,red,very thick},     vector guide/.style={dashed,red,thick}]  %standard tikz coordinate definition using x, y, z coords \coordinate (O) at (0,0,0);  %tikz-3dplot coordinate definition using r, theta, phi coords \tdplotsetcoord{P}{.8}{55}{60}  %draw axes \draw[axis] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};     \draw[axis] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};     \draw[axis] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};  %draw a vector from O to P \draw[vector] (O) -- (P);  %draw guide lines to components \draw[vector guide] (O) -- (Pxy); \draw[vector guide] (Pxy) -- (P); \end{tikzpicture} \end{document}


Stack Overflow in Portuguese is offline, and its meta as well. Other Stack Exchange sites appear to be normal. Any idea what's going on?

Stack Overflow was down for a long time here, probably about an hour.  What was the cause?