It irks me when I see a question on SO that I can answer, begin writing a detailed answer, and see that someone else answers with a one-liner.  Often, the other answerer will make many small edits to their answer, adding detail, so that even if I post my complete answer before they really finish theirs, it looks like I just copied their answer.  Is the answer-then-edit-repeatedly strategy acceptable/encouraged on Stack Overflow?  Should I stop letting it bother me and start doing it?

I feel like there's a problem with Stack Overflow, as the number of people prowling it increases.  Each question's answers are sorted by descending score and then by descending time of posting. This means that if a person sits down and answers a question in a long, thorough way, going through every nook and cranny, once they post their answer, it will already be one of about seven different ones, some of which have already been upvoted. This wouldn't be a problem if those answers were as thorough as the one this guy's posting, but they usually aren't. Some of them are downright wrong, some aren't even answers to the question asked because their poster didn't bother to read the question all the way through.  This causes a problem I like to call Stack Overflow's Fastest Gun in the West Problem. I've come to a point where I'd rather just send a short, simple, correct explanation, than to go and do some proper research, write a whole blog post about it or even make sure the code I post even compiles, just so it will be noticed, as opposed to the incorrect ones.  I'm sure I'm not the only one doing this and that it despairs many people from even trying to answer questions.  I've long ago learned to try to always raise a problem with a solution in hand, rather than just say "This is a problem, handle it," so my question, after this long tirade, is:     How do you think this can be changed? What would you change in Stack Overflow to make this problem go away without hurting the site?   I promise to vote on answers I like, even if it takes you a long while to post them. :)


I want to do that using gradient tool but things eventually go wrong< so what should I do ?

I have just made this in illustrator. I made a path and used gradient across the stroke, but this highlighted area appeared. So, how can I fix it using photoshop or illustrator ?


Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


I have a couple of commands that I need to run. These commands needs to continually run even after I exit my interface. When I have access to the Linux GUI, I execute something like:  cd /home/testuser/Scripts* xterm -hold -T "Background_Script1" -e  "service1-start.sh" & sleep 10 xterm -hold -T "Background_Script2" -e "service2-start.sh" &   Any help will be much appreciated.

I am using putty to interact with Linux server. I have started a process using putty. The process is running and will take 5-6 hours. I want that process to keep running after I close the putty session. How can I keep that process alive after closing the putty session? I do not want to keep the computer ON all the time. Is there any way to do this?.


I'm unclear on how attacks and grappling work with monsters as opposed to players. Let me elaborate my question.  With PCs, it seems clear to me. Let's say a PC has two creatures grappled and thus has no free hands. If the player attacks on its turn, it can make an unarmed strike against one of the grappled creatures (although it's not clear if it can use the hand that's grappling to make that attack: squeeze, crush, etc.).  Now in the case of a monster, it seems unclear because they have specific actions/attacks that can grapple. Can those same attacks be made even if they are holding the grapple? I'll use a couple of examples to clarify.  A Constrictor Snake has two options for attack: Bite and Constrict (which grapples on a hit). If a snake hits character A with Constrict (A is grappled) on turn 1, and turn 2 rolls around, can it attack a still-grappled character A with Constrict, or must it use Bite?  A T-Rex has multiattack with Bite and Tail, but can't use them on the same target. If a T-Rex hits character A with Bite (A is grappled) on turn 1, can it then Bite a still-grappled A on turn 2, since it can't attack A with its tail?  I'm asking because because a lot of gameplay or monster strategy blogs seem to indicate in their examples that the answer to this is "no".

The grappling rules sure are... light. Supposing one has an Extra Attack:   Assuming one has successfully grappled an opponent with one's first attack, can one then perform a normal attack action with one's Extra Attack? Against the grappled opponent or any opponent within reach? Limitations on weapons (e.g. one-handed only)? Assuming one has successfully grappled an opponent with one's first attack, can one's grappled opponent (now with move 0) perform a normal attack action? Against you or against any one in reach? Do advantage and disadvantage (along the lines of restraint) come into play? Are there grappling-specific attacks for damage (e.g. choke-hold)?


Let $X_1,...X_n$ $U(-\theta , \theta)$  I want to find the UMVUE of $\theta$ if it is exists.  My answer is , there is no UMVUE in this case.   Because there is no complete sufficient statistic that exists for $\theta$ . So although there exist an unbiased estimator of $\theta$, it is not a function of complete sufficient statistic.   So there is no there exist no UMVUE for $\theta$.  Am I correct in this situation?

I am having an issue finding a best unbiased estimator for $\theta$. Any help is appreciated. Let $X_1, ..., X_n$ be a random sample from a population with pdf: $f(x\mid\theta)=\frac{1}{2\theta}$ $-\theta<x<\theta,\, \theta>0$. I understand that $T(x) := |X_n|$ is the sufficient statistic since by the factorization theorem we have: $$f(x\mid \theta) = \left(\frac{1}{2\theta}\right)^n \prod_{i=1}^n I[|x_i|<\theta]$$ I think my main issue is showing that this sufficient statistic is also a complete sufficient statistic. Can somebody please aid me in this?


A ﬁnite group $G$ acts on a ﬁnite set $X$, the action of $g \in G$ on $x \in X$ being denoted by $gx$. For each $x \in X$ the stabilizer of $x$ is the subgroup $G_x = \{g \in G : gx = x\}$. If $x, y ∈ G$ and if $y = gx$, then express $G_y$ in terms of $G_x$.    How can I able to solve this problem? I am totally stuck on it.

Let $X$ be a topological space and $G$ a group acting on $X$.  Do we have this property:  $$\operatorname{orb}(x)=\operatorname{orb}(y)\iff\operatorname{stab}(x)\sim \operatorname{stab}(y)\qquad ?$$ where $\operatorname{orb}(x)$ is the orbit of $x$, $\operatorname{stab}(x)=\{g\in G\mid gx=x\}$, and the symbol $\sim$ means conjugate to.  One way is obvious: if $\operatorname{orb}(x)=\operatorname{orb}(y)$, then $x=gy$ for some $g\in G$, so $$\operatorname{stab}(x)=\operatorname{stab}(gy)=g\operatorname{stab}(y)g^{-1}.$$ But the other way is not obvious to me: if $\operatorname{stab}(x)\sim \operatorname{stab}(y)$, then $\exists k\in G$ such that for all $g\in \operatorname{stab}(x)$,  $ \exists h \in \operatorname{stab}(y)$ such that  $g=khk^{-1}$. Now since $gx=x$ and $hy=y$, then $khk^{-1}x=x$ so $hk^{-1}x=k^{-1}x$ hence $h\in \operatorname{stab}(k^{-1}x)$, but I can't go any further... Thanks for your help.


I am trying to understand why writing regex as a string is not working but using it without string does work.  this is my example:  var patt = new RegExp("/test_.*/gi"); var res = patt.test("test_4"); console.log(res);   will return false  but this:  var patt = /test_.*/gi; var res = patt.test("test_4"); console.log(res);   will return true  what is the difference

I try to write a simple Markdown parser in JavaScript. Therefore I want to check for the [link content][link id] syntax. I use the following code:  data = data.replace( /\[(.*?)\][ ]*\[([0-9]+)\]/g, '$1' );   It works well, but now I want to do this with a RegExp object. So I set up the following bit of code:  var r = new RegExp( '\[(.*?)\][ ]*\[([0-9]+)\]', 'g' ); data = data.replace( r, '$1' );   But it doesn't work. It even says that my regular expression (which works since the first example does a good job) is invalid:     unmatched ) in regular expression   I think it must have to do with some RegExp-object peculiarities I am not aware of. What am I doing wrong and how can the problem be solved?


I need to add a auto complete text field in my custom form module. The auto complete values should be retrieved from the database table. Can anybody tell me how to do that?

How do I add an autocomplete field in a class that extends FormBase?  I created a custom module, which uses a class that extends FormBase. I want to  programmatically create a form field that autocompletes the username from the user registered in the site.


I am confused about how to calculate the probabilities of getting a certain result when measuring a Pauli observable on a Bell state. When you measure an observable the state is projected onto an eigenstate of the observable. For example, given $|\psi\rangle = (|{+-}\rangle + |{-+}\rangle)/\sqrt{2}$ as the state and $\sigma_x = \begin{pmatrix}0 & 1 \\ 1 & 0\end{pmatrix}$ as the observable, if the probability is $1/2$, how to calculate actually it? What is the state after measurement?

I confused about how to calculate the probabilities and getting a certain result of measuring Bell's states with Pauli matrices as the operator. When you measure something, the state involved would be projected onto an eigenstate of the observable. given $|\psi\rangle = \frac{1}{\sqrt2} (|01⟩ + |10⟩)$ as the state and $\sigma_x = \left[\begin{matrix}0&1\\1&0\\\end{matrix}\right]$ as the observable. if the probability is 1/2, how to calculate them actually? What is the state after measurement?


Find the closed form of $$x+ \frac {2}{1\cdot 3} x^3 + \frac {2\cdot 4}{1\cdot 3\cdot 5} x^5 + \dots \quad \forall x \in (0, 1)$$   My approach:  Clearly we can see the formation of factorial in the denominator. so the series becomes-  $$x+ \frac {2^2}{3!} x^3 + \frac {2^2\cdot 4^2}{5!} x^5 + \dots $$  I cannot remember a series like that. then the other approach left is integration. now what to integrate, I am confused about that. I am just a beginner in this.

I was given the following function:   $$ f(x) =  x + \frac{2x^3}{1\cdot3} + \frac{2\cdot4x^5}{1\cdot3\cdot5} + \frac{2\cdot4\cdot6x^7}{1\cdot3\cdot5\cdot7}...   $$  $$ \forall x    \in [0,1) $$  And then I was asked to find the value of $ f(\frac{1}{\sqrt{2}}) $, which obviously requires me to compute the closed form expression of the infinite series.  I tried 'Integration as a limit of sum' but I was unable to modify the expression accordingly. How do I approach the problem?


After dropping my macbook pro, my touch bar has stopped working and I am getting frequent kernel panics  Does anyone have any idea how to solve this or which part of the macbook is faulty?   Thank you!

A few days ago my MacBook Pro slipped out of my hands and fell onto the tile floor. The outside got banged up quite a bit and the Touch Bar no longer lights up but still responds to touches sometimes but not all the time.   Anyway, since then it will randomly restart every once in a while with a kernel panic. I have the log posted below and wanted to know if anyone could tell me what is causing the panic?


Is there some solution to setup default EN keyboard layout for each Ubuntu logout?

I just put my drive with my existing Ubuntu 17.10 installation from my old into my new laptop which has a different keyboard layout and I noticed that the functionality to switch keyboards is missing. There is no icon in the menu bar and pressing super + space also does nothing. It works fine at the desktop and at the lockscreen, just not in GDM… it's working on Fedora though and I did nothing fancy there either.  I compared Fedora GDM config in /etc with Ubuntu, no luck.  Please tell me what's required to get it working.  I prefer to use Wayland, if your answer suggests configuring something related to X11 please explain why.  Edit:  Here is what I see in Region & Language, there is no Login Screen button as far as I can see.    Edit 2:  As requested by Gunnar Hjalmarsson:  $ cat /etc/default/keyboard  XKBLAYOUT=de,us,gb XKBVARIANT=,intl, BACKSPACE=guess


I have looked every were and cant find out why I cant subdivide this face. I split a default sphere and filled the top with a face and it wont let me subdivide that face. I need to so i can  use the displace modifier on it!

Hi I am currently starting out blender and i have created a face using vertices. I filled the face and now i want to subdivide it. However, the subdivision tool does not work on any of the faces. Can anyone explain to me how to subdivide the faces and why subdivide works on primitives such as cubes but not on the created face? Thank you


Let $f : \mathbb{R} \to \mathbb{R}^{n}$ be a vector valued function, $f_i \ge 0$. Can we show that       $$\bigg \lvert \int f(x) \,dx \bigg \rvert \le \int \lvert f(x) \rvert \, dx$$   The assertion above is obvious right when $n=1$ . But is it right when $n \gt 1$? For $n=2$ , we need to show   $$\int f\,dx^2+\int g\,dx^2 \le \int \sqrt{f^2+g^2}\,dx^2$$  For each nonnegative function $f, g : \mathbb{R} \to \mathbb{R}$, it is obvious that   $$\int f \,dx^2 + \int g\,dx^2 \le 2 \int \sqrt{f^2+g^2}\,dx^2$$  I think the assertion above is wrong, but I can not find the example of it .

Suppose $f :[a,b]\to \mathbb{R}^n$ is given by $f(t)=\langle f_1(t), \ldots, f_n(t)\rangle$, where each of the $n$ component functions is integrable over $[a,b]$. I think the following inequality   $$\left|\int _a^b f(t) \, dt\right|\leq\int_a^b\left|f(t)\right| \, dt$$  still hold but I don't know how to prove it. Any idea?  Thanks


I looking to make a basic LED circuit using a CREE LED from eBay. My only problem is calculating what value resistor that I need. If it is really neccesary, I could purchase an LED driver, but before doing so I would just like to know what value resistor I need to operate the LED.  I know how to work out the value for the resistor, my problem is that I do not know what the current I should use to calculate it is. The current of the LED is stated as 350mA ~ 1000mA, so what value do I use, is any value between these okay?  Just incase, here's the specs of the LED: Colour: Red Wavelength: 620-625nm Luminous Intensity: 62 DC Forward Voltage: 2-2.4V DC Forward Current: 350mA-1000mA PCB Size: 20mm View Angle: 130 Degree  I know this is probably a really stupid question with a really simple answer, but my 2 functioning brain cells don't know what to do. Any help would be greatly appreciated, have a nice day!

I have an adjustable 24VDC power supply.  I have 1W LEDs that I was planning on stringing 7 or 8 in series to get approximately 24V across all of them together. They are rated 3.3-3.8V each. Do I need a resistor in series to maintain current? I was thinking so since a lit LED is basically a short? I can't find an answer to what it is really needed for, just that most people say to put a resistor in series to 'limit current'...  if so, it would be a small resistor, around 2 or 3 ohm?


It's true for all Natural numbers.   What I've got so far:  Prove $P(0) \to $ base case:   Let $n = 0$  $(0)^3 < 4^0 = 0 < 1$  Then $P(0)$ is true.   Part Two:  Prove $P(n) \Rightarrow P(n + 1) $  Assume $P(n)$  $= n^3 < 4^n $  $= 4(n + 1)^3 < 4^{(n + 1)}$  im not sure if the last step is right.  Where can I go from here?

This is a problem set I have, it's not a homework but it's very important practice...  Send me some hints please, I don't want an answer I need to get it by myself but I'm failing miserably...   The problem is:     Prove that for all natural numbers $n$,  $4^n > n^3$


I know there is a list of games that are excluded when you share a library on steam, but I was wondering if there is also a way to exclude some additional games?

On my steam account, I have some games that I don't particularly want my sister to play, but I want to share my Terraria game with her so she can play with her friends.  Is it possible to only share Terraria with her through Family Sharing but no other games?


Let $\,f, f_n $ be Lebesgue integrable functions mapping reals to extended reals such that, almost everywhere, $\,f_n \to f $.   Show that $$\int\left\lvert\,f_n\right\rvert\,d\lambda\to\int\left\lvert \,f\right\rvert\,d\lambda\implies\int\left\lvert\,f_n - f\right\rvert\,d\lambda\to0$$   I have shown the converse by breaking absolute values down into the sum of positive and negative parts. I did not use the almost everywhere convergence condition, so I am expecting that to be important here. It makes me think of the DCT, but I cannot figure out how to use that since there is no (to me) obvious bound.

Let $1\leq p < \infty$. Suppose that    $\{f_k\} \subset L^p$ (the domain here does not necessarily have to be finite),  $f_k \to f$ almost everywhere, and  $\|f_k\|_{L^p} \to \|f\|_{L^p}$.    Why is it the case that $$\|f_k - f\|_{L^p} \to 0?$$   A statement in the other direction (i.e. $\|f_k - f\|_{L^p} \to 0 \Rightarrow \|f_k\|_{L^p} \to \|f\|_{L^p}$ ) follows pretty easily and is the one that I've seen most of the time. I'm not how to show the result above though.


Sigh. I fired up firefox today and it is somehow now set to use yahoo as the default search engine on the address bar.  no longer works, because keyword.url has been removed.  I have tried googling around but I cant seem to find a solution. How can this be solved? I am using Mozilla Firefox 29.0.1  Thanks

I love the ability to just type something into Firefox's address bar and do a Google search. But I was wondering if there was some way to customize what search engine Firefox used?


I am aware Unity is no longer the default desktop and is replaced by GNOME desktop starting 18.04 LTS.  Since 15.04 I have been using Unity.    Now I want to use the default GNOME desktop for 18.04 LTS but would like to get my application menus in the Top Bar.    Menus: File, View, History, Tools, etc from applications that I use, I cannot find anywhere.  Instead I have one option in a drop down which is generally "Quit".    There must be a default secret somewhere that lets me customize my user experience to some degree as the 18.04 LTS developers envisioned.  Where is it hiding?  How can I get my needs met according to GNOME developer design.  Thanks for your help

I installed the latest version of Ubuntu (17.10) , but the problem is, I can't find the menu bars of applications in the GNOME panel. For instance, the Chrome menu bar doesn't appear on the panel like in Ubuntu 17.04 and earlier versions.


Problem:    If $X ≥ 0,$ then for every $p \in R_+,$   $$ E(X^p)=\int_0^\infty px^{p-1}\mathbb{P}\{ X>x \}dx  $$   Show this, using Fubini's theorem with the product measure    $ \mathbb{P}\times Leb, $   after noting that    $ X^{p}(\omega)=\int_0^\infty px^{p-1}dx=\int_0^\infty px^{p-1} \chi_{\{ X>x \}}(\omega) dx. $   Actually, I have problems with the notations. I have passed measure theory but I have problems with this probability theory. This a problem from Erhan Çinar's book.  Here is what I have done      Let   $ \mu [-\infty , x]= P(X\leq x) $   so   $ \mu [x , +\infty]= P(X\geq x) $   then   $$ \int_0^\infty  d\mu(y)=\int_x^\infty \mathbb{P}\{ X>y \}dy, $$   Now I want to write    $$\int_0^\infty px^{p-1}\mathbb{P}\{ X>x \}dx=\int_0^\infty px^{p-1}(\int_x^\infty  d\mu(y))dx=\int_0^\infty\int_0^y px^{p-1}\mathbb{P}\{ X>y \}dxd\mu(y)= \int_0^\infty y^{p}\mathbb{P}\{ X>y \}d\mu(y)=E(X^p)$$   Please let me know where my problem is?

I'm trying to understand a passage from the book: A Basic Course in Probability Theory, Rabi Bhattacharya Edward C. Waymire, in the page 21. The calculation is the following:  If $X$ is a random variable on $(\Omega,\mathcal{ F}, \mathbb{P} )$, then for any $p > 0, x ≥ 0$, writing $x^p=p\int_0^x y^{p−1} dy$ in the formula $\mathbb{E}|X|^p = \int_Ω |X(\omega)|^p \mathbb{P} (d\omega)$ we  obtains:  $$ \mathbb{E}|X|^p=\int_{\Omega}\left(p\int_0^{|X(\omega)|}y^{p-1}dy   \right)d \mathbb{P} ~~ {\color{red}=^{??}}~ p\int_{0}^{\infty}y^{p-1}\mathbb{P}(|X|>y) dy $$ I do not understand how the left side of the above equation became the right hand side. I know that the Fubini's theorem should be used but do not know the complete details.


I've wrote a snippet for axis room API. While passing the json for testing, I have got Cross-Origin Request Blocked error.  At the same time console shows: {"message":"Could not parse the message.","status":"Error"}. (see the below image)    I hasn't solution for Cross-Origin Request Blocked error. But now I want to show the Could not parse the message error. How to do that?. Is a good way to solve Cross-Origin Request Blocked error. suggest me please.  My JavaScript code  <script type="text/javascript">     $(function () {         $('#Button1').click(function () {             alert('Alter with jQuery Button Clicked');             alert('Clicked');             $.ajax({                 type: 'POST',                 url: 'http://test.axisrooms.com/api/daywiseInventory',                 data: '{"accessKey": "7eb228097576abf56968e9845ab51b90","channelId": "103","hotels": [{"hotelId": "2","rooms": [ {"roomId": "1", "availability": [ { "date": "2014-05-30","free": 1},{"date": "2014-05-31","free": 1}]}]}]}',                 //data: "{accessKey':'cilentAPIKey'}",                 contentType: 'application/json; charset=utf-8',                 dataType: 'json',                 success: function (data) {                     callback(data);                     alert('sus'+data.toString());                 },                 error: function (response) {                     //alert(response);                     //alert('error' + response.valueOf(message));                                         alert('An error has occured');                 }              });         });     }); </script>

How do I send a cross-domain POST request via JavaScript?  Notes - it shouldn't refresh the page, and I need to grab and parse the response afterwards.


I was wondering out of these three which would you take  calculus by Spivak  calculus by Hughes-Hallet   calculus by Morris Kline  I'm taking calculus III next semester but I want a better book that's harder than calculus by Larson which I don't like all that much

I want to start signal processing and I need a book that satisfies my mathematical requirements: I am in the third grade of high school and I don't know any useful thing about limit, differential, ...  Please help me.


Vanilla JS only please  That is, its the output should be an object that only contains data, and ignores the original's methods/prototype.  Complex data structures that inherit from the default Object, like Array, can be copied in a shallow manner, as references.  The way I do it now is:  function shallowCopyObjectData(obj) {   output = {};   for (var i in item) {     output[i] = obj[i];   }   return output; };   The other way I've seen is:  function shallowCopyObjectData(obj) {   return JSON.parse(JSON.stringify(obj)); };   What is the most performant way to do it?  I've made a running jsPerf to compare speeds.  If you come up with a solution, please feel free to fork and add:   Edit @Barmar: I know a , but it asked about the fastest way to clone an object, which implied a deep copy that keep the constructor, prototype, etc.  This question asks about the fastest way to copy just the data in the top level

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I have the equation de ( mod x ) = 1 I currently have the values for e and x. Is there a way that I can get the value for d? I tried doing (x + e) + 1 but when I insert it into the equation, I get an answer that isn't 1.

Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm?


While browsing the questions, I noticed that if some question is marked as favorite by someone, favorite question marking icon is displaying wrong tooltip text for me:      This is a favorite question (click again to undo)   While I didn't marked it as favorite.

When viewing a question, when I hover over the star icon (under the voting module) the tooltip says I've made it a favorite when I haven't yet.


Having come across mathematical logic, a question suddenly came into my mind. We commonly know that the truth value of $P\to Q$ given as:  $\begin{matrix} P&Q&P \Rightarrow Q \\ T&T&T\\ T&F&F\\ F&T&T\\ F&F&T \end{matrix}$  I do not understand how $P\to Q$ holds when P is false. For example, let me propose a statement:  Let $n$ be a nonzero real number.  P: $n$ is a rational number  Q: $n\cdot0=k$, where $k$ is a nonzero real number.  We obviously know that Q is a false statement. Hence, I omit the case when Q is true. $\begin{matrix} P&Q&P\Rightarrow Q \\ T&F&F\\ F&F&T \end{matrix}$  P True: $n$ is a rational number;  P False: $n$ is not a rational number; $n$ is an irrational number.  How is it that $P\to Q$ holds true when P is false?

Provided we have this truth table where "$p\implies q$" means "if $p$ then $q$":  $$\begin{array}{|c|c|c|} \hline p&q&p\implies q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  My understanding is that "$p\implies q$" means "when there is $p$, there is q". The second row in the truth table where $p$ is true and $q$ is false would then contradict "$p\implies q$" because there is no $q$ when $p$ is present.  Why then, does the third row of the truth table not contradict "$p\implies q$"? If $q$ is true when $p$ is false, then $p$ is not a condition of $q$.  I have not taken any logic class so please explain it in layman's terms.       Administrative note. You may experience being directed here even though your question was actually about line 4 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 3, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


I really like the font (for the text mainly, not necessarily for the math) used in math books from the 40s-60s. I am for instance thinking of the font in . Anybody knows which fonts were used in such books and if there is a modern equivalent?

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


We are redoing our company website and we are discussing interview tips.  The phrase "caught flat-footed" came up and it sounds a bit derogatory to me.  Is it okay to use in a professional situation? Or is it slang?

Is it professionally okay to use the term "caught flat-footed"?


how to calculate float numbers: with bash  example        DRIVER_MEMORY=$(( 5 * 0.6 * 0.9 )) -bash: 5 * 0.6 * 0.9 : syntax error: invalid arithmetic operator (error token is ".6 * 0.9 ")   remark - results must be integer number  - so we can round the number to down

Using echo "20+5" literally produces the text "20+5".  What command can I use to get the numeric sum, 25 in this case?  Also, what's the easiest way to do it just using bash for floating point? For example, echo $((3224/3807.0)) prints 0 :(.  I am looking for answers using either the basic command shell ('command line') itself or through using languages that are available from the command line.


Prove that $\forall n \in \mathbb{N}, n \ge 2 \Rightarrow n \nmid (2^n-1)$.  I have tried a lot of different ways to do such as induction way or make the counter assumption then to show the contradiction, however, I didn't succeed.  Can anyone give me hints or solution to this ? Thank you.

Here is a problem which i have not been able to do for quite sometime.   For $n \geq 2$, show that $n \nmid 2^{n}-1$.   I have thought of proving this in two ways: One by using induction which didn't actually work. Next by Fermat's little theorem we have $2^{p-1} \equiv 1 \ (\text{mod} \ p)$, which actually says that for $p \mid 2^{p}-2$. But i couldn't proceed more than this. Any ideas by which i can actually solve the problem?


I just shifted from windows 8.1 to windows 10. My touchpad scroll was working with windows 8.1 but not with windows 10. I'm not able to find the settings for touchpad in control panel they only give options for mouse.

I have just updated Windows 7 to Windows 10.  My touchpad scolling (right-side) is not working anymore.    I have no idea how to fix this in Windows 10.  I have hit the start button and typed "synaptic", but have found nothing useful.  I used to have an icon on the taskbar that showed where I was touching the touchpad.  I used to be able to right-click that icon to change settings, but Windows 10 has not brought that icon over.  Also, the asus website has no synaptic touchpad drivers available for Windows 10.  I have tried the enaltech drivers, but upon the installation atempt I am told that my hardware is not correct.


I'm new to LINQ and I'm a little out of my depth here. I tried searching on MSDN and here without success. I feel there's probably a one-liner LINQ query for this that I'm incapable of finding.   Basically, I have a class called Student and a class called University. Each university holds a Student[] array. A student can be a member of multiple universities.   I also have an array of universities. The job is to construct a LINQ query that outputs an array of all students enrolled in more than one university.   I can easily get a union of all the different Student[] arrays across the universities via  University[] universities //initialize //fill universities with data Student[] bigListOfStudents = universities.SelectMany(b => b.Students).ToArray();   And then I would just need to grab all the elements of bigListOfStudents which appear in the array more than once. The opposite of .Distinct(). Wat do?  edit: to clarify, here are the basic Student and University classes. Jmbag is a unique student ID and is used to compare then, as in the Equals(Student s) override method, also to generate hash codes, and subsequently to permit LINQ queries.   class Student {     public string Name { get; set; }     public string Jmbag { get; set; }     public Student(string name, string jmbag)     {         Name = name;         Jmbag = jmbag;     }     public enum Gender     {         Male, Female     }      public static bool operator ==(Student student1, Student student2)     {         return student1.Jmbag == student2.Jmbag;     }      public static bool operator !=(Student student1, Student student2)     {         return student1.Jmbag != student2.Jmbag;     }      public override bool Equals(object obj)     {         if (GetType() == obj.GetType())         {             Student tempStudent = (Student)obj;             if (Jmbag == tempStudent.Jmbag)             {                 return true;             }         }         return false;     }      public override int GetHashCode()     {         int hash = 0;         foreach(char c in Jmbag)         {             hash += c.GetHashCode();         }         return hash;     } }   class University {     public string Name { get; set; }     public Student[] Students { get; set; } }

How do I select the unique elements from the list {0, 1, 2, 2, 2, 3, 4, 4, 5} so that I get {0, 1, 3, 5}, effectively removing all instances of the repeated elements {2, 4}?


I am using the document class amsbook and generate the amsrefs bibliography by  \begin{bibdiv}   \begin{biblist}     \include{bibcode}   \end{biblist} \end{bibdiv}      Now, there is a page that only says Bibliography, and the first actual reference appears on the next page.   I have no idea how this problem occurs. Can anyone help out?

There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there more things like them to be aware of?


Not showing free-space while reinstalling Ubuntu 14.04 LTS

Recently I installed Ubuntu 12.10 x64 Server Edition on my PC. Unfortunately, I attempted to install a lightweight desktop but due to the fact that I have an old graphics card, the PC does not perform so well. I am thinking of re-installing an Ubuntu version but I do not want to lose the contents in my home folder. Is there any way to do that with a Live CD?


According to some notes, definition of continuous function is as below :  Definition 1.1 (Continuous Function) A function $f:X→Y$ is said to be continuous if the inverse image of every open subset of $Y$ is open in $X$.  And therefore we can say a function $f:X→Y$ have continuous inverse if the image of every open subset of $X$ is open in $Y$. Wouldn't be better if we define a function as continuous if it mapped every open set in $X$ to an open set in $Y$ (in other word ,exactly what we defined for continuous inverse) ? What is technical reason beyond this definition ?

Continuity of function $f:X\to Y$ from topological space $X$ to $Y$ is defined by saying that for any open set $U_Y$, $f^{-1}(U_Y)$ is also an open set.  Intuitively, I find this weird. If we interpret “open set” informally as “a set whose elements are nearby each other” (indeed it is a set which is a neighbourhood of all its elements), then it makes intuitive sense to say that a continuous function $f$ is a function that does not “rip elements away from its neighbours”, i.e. if you input an open set $U_X$ (a set whose elements are “nearby each other”), then this should not produce a set where some elements are “not nearby each other”, i.e. it should produce an open set.  So is there an intuitive explanation at this level of abstraction (i.e. without reference to metric spaces for example) of why we don’t define continuity as “for any open set $U_X$, $f(U_X)$ is an open set”?


I want to map an arbitrary Ruby Array to a Hash.  Input:  ['bar1', 'bar2', 'bar3']   (The array will have between zero and three elements.)  Output:  { foo1: 'bar1', foo2: 'bar2', foo3: 'bar3' }   I'm looking for the most elegant solution.

In Ruby, given an array in one of the following forms...  [apple, 1, banana, 2] [[apple, 1], [banana, 2]]   ...what is the best way to convert this into a hash in the form of...  {apple => 1, banana => 2}


In the Hobbit: An Unexpected Journey, Gandalf attempts to convince Saruman that the "Necromancer" i.e. Sauron, has returned, but Saruman dismisses Gandalf saying:      Saruman: That's absurd. No such power exists in this world. This "Necromancer" is nothing more than a mortal man, a conjurer dabbling in black magic.   Would this mean that humans could learn and use magic? Or would Saruman be talking about what we would consider a magician in our world?

In both The Lord of the Rings and The Silmarillion, it is suggested that men can learn to use magic.  Quotes demonstrating this follow: (from The Lord of the Rings):  The Lieutenant of the Tower of Barad-dûr he was, and his name is remembered in no tale; for he himself had forgotten it, and he said: 'I am the Mouth of Sauron.' But it is told that he was a renegade, who came of the race of those that are named the Black Númenóreans; for they established their dwellings in Middle-earth during the years of Sauron's domination, and they worshipped him, being enamoured of evil knowledge. And he entered the service of the Dark Tower when it first rose again, and because of his cunning he grew ever higher in the Lord's favour; and he learned great sorcery, and knew much of the mind of Sauron; and he was more cruel than any orc.  (from The Silmarillion):  Those who used the Nine Rings became mighty in their day, kings, sorcerers, and warriors of old. They obtained glory and great wealth, yet it turned to their undoing  This makes me wonder...  are there any other instances of men who have the ability to learn magic?  Also, why don't all men learn magic?  It seems to me that Sauron would have had a much harder time dominating men if the men he sought to dominate were sorcerers, themselves. Additionally, if magic is something that can be learned, what, then, separates a maiar or an ainur from a mere man?


Where in the file system are SMS messages stored? plese list the path

Where in the file system are SMS messages stored?  I'm using ES File Explorer to browse around but can't seem to find this - is it on the phone or the SD, and where?  I have an HTC Wildfire but I would imagine it doesn't vary hugely from vendor to vendor (although I am an iOS developer who knows little about Android).


In bhaskar, the way to get the result, is to get the $\Delta  = b^2 – 4ac$, and then the $X = (–b \pm \sqrt\Delta)/2a)$. But from where come these constants?

In algebra, all quadratic problems can be solved by using the quadratic formula. I read a couple of books, and they told me only HOW and WHEN to use this formula, but they don't tell me WHY I can use it. I have tried to figure it out by proving these two equations are equal, but I can't.  Why can I use $x = \dfrac{-b\pm \sqrt{b^{2} - 4 ac}}{2a}$ to solve all quadratic equations?


I have gone though man apt.conf. I feel the information there is quite overwhelming and difficult to understand for beginners moving to Ubuntu/Debinan Platforms. Could some one explain in simple english what is the use of this file and how it can benefit an apt user. Further this file seems be not setup on my machine - so I think it's not required for normal usage, but I am trying to understand advanced usage. so want to dig in to it. ll /etc/apt/apt.conf ls: cannot access '/etc/apt/apt.conf': No such file or directory  Edit: I feel trying to understand the apt conf part on a whole makes sense as every thing should be some or the other way related. On going to /etc/apt and doing an ls -l /etc/apt$ ll total 72 drwxr-xr-x   7 root root  4096 Aug 28 23:46 ./ drwxr-xr-x 144 root root 12288 Sep  1 15:53 ../ drwxr-xr-x   2 root root  4096 Sep  1 15:53 apt.conf.d/ drwxr-xr-x   2 root root  4096 Apr  9 15:51 auth.conf.d/ drwxr-xr-x   2 root root  4096 Apr  9 15:51 preferences.d/ -rw-r--r--   1 root root  3412 Aug 31 20:35 sources.list drwxr-xr-x   2 root root  4096 Aug 31 20:34 sources.list.d/ -rw-r--r--   1 root root  3410 Aug 31 20:35 sources.list.save -rw-r--r--   1 root root 14771 Aug 28 23:46 trusted.gpg -rw-r--r--   1 root root  8497 Aug 27 01:28 trusted.gpg~ drwxr-xr-x   2 root root  4096 Aug 28 23:46 trusted.gpg.d/  Evey thing here is understandable after bit of digging. Except for apt.conf.d/ (and  auth.conf.d/, which seems to be empty and I am not bothered about this in this Q). Now on entering - apt.conf.d/ and doing ll you see bunch of more files - /etc/apt/apt.conf.d$ ll total 96 drwxr-xr-x 2 root root 4096 Sep  1 15:53 ./ drwxr-xr-x 7 root root 4096 Aug 28 23:46 ../ -rw-r--r-- 1 root root   49 Aug 18 01:22 00aptitude -rw-r--r-- 1 root root   40 Aug 18 01:21 00trustcdrom -rw-r--r-- 1 root root  630 Apr  9 15:51 01autoremove -r--r--r-- 1 root root 1349 Sep  1 15:53 01autoremove-kernels -rw-r--r-- 1 root root   92 Apr  9 15:51 01-vendor-ubuntu -rw-r--r-- 1 root root  168 Aug 31 20:32 10periodic -rw-r--r-- 1 root root  108 Apr  2 16:55 15update-stamp -rw-r--r-- 1 root root   85 Apr  2 16:55 20archive -rw-r--r-- 1 root root  168 Aug 31 20:32 20auto-upgrades -rw-r--r-- 1 root root  243 Dec 16  2009 20dbus -rw-r--r-- 1 root root 1040 Mar 12 18:50 20packagekit -rw-r--r-- 1 root root  114 Jun  5 18:43 20snapd.conf -rw-r--r-- 1 root root 2592 Jan 18  2020 50appstream -rw-r--r-- 1 root root 2164 Feb  9  2019 50apt-file.conf -rw-r--r-- 1 root root  625 Oct  7  2019 50command-not-found -rw-r--r-- 1 root root 5459 Apr 14 04:07 50unattended-upgrades -rw-r--r-- 1 root root  435 Jan 18  2020 60icons -rw-r--r-- 1 root root  251 Jan 18  2020 60icons-hidpi -rw-r--r-- 1 root root  182 Aug  3  2019 70debconf -rw-r--r-- 1 root root   32 Aug 28 12:34 99synaptic -rw-r--r-- 1 root root  305 Apr  2 16:55 99update-notifier  So through this Q, I am looking for answers regarding the significance of apt.conf and the set of files in apt.conf.d/ - what kind of configurations does these files enable ( and of course man apt.conf is not quite understandable at least for beginners) Second Edit following user535733 response - How are the files in the apt.conf.d named. Do they follow some naming convention that simplifies understanding what config aspects go where.

I was browsing through the apt folder to try my proxy settings and I was unable to find the apt.conf file in Ubuntu 11.04. Is there any alternative file for it?  Adding proxy settings to 99-synaptic in apt.conf.d does not help as it gets overwritten everytime I restart the system.


I happen to see that it is possible to update the Ubuntu image in daily basis. But I don't have the faintest idea on how it is done. Please explain the limits and possibilities in using Jigdo in simple terms.

I am trying to update the ISO image of Ubuntu using Jigdo . Can any one explain the exact way to do this ?


Why don't we use  " 's "(possessive S)  in the first sentence as in the second one?        I have the same color eyes as my father.   My personality is very similar to my father's.      Can we use "my father's" for the first sentence and "my father" for second one?  Or        She was born on the same day as me.   Her ideas are quite similar to mine.      Why in the first sentence do we use object pronoun, but possessive pronoun in the second one.

Of late I have noticed British people using the following sort of construct:     John and Jane make such a cute couple because John always wears a similar hat to Jane.   To my ear, that is ungrammatical, or at least nonsensical, because John seems to have mistaken his wife for a hat!  John’s hat cannot be similar to Jane;  it can only be similar to Jane’s hat.   For me, that sentence must therefore be recast as this:     John and Jane make such a cute couple because John always wears a hat similar to Jane’s.   That way the hat is no longer similar to her, merely to hers.  Is the former formulation actually grammatical, or is it a common mistake or simple carelessness?  Doesn’t it confuse people? Is it fit for formal writing?  How long has this been going on?   To the American ear, it sounds really messed up, like it is making a wrong comparison.  It’s like they have forgotten about the possessive case, which is the only one that makes sense here.    Edit  Here are actual “similar X to Y”  instances by British authors, where one would expect to find “Y’s” or “that/those of Y” instead:   In consultation, our members observed that other people with a similar disability to Mr Malcolm — perhaps with varying degrees of severity — would have been able to understand the sub-letting regulations.   Dave had a similar accent to dumper truck man, so that’s who I thought it was.   Believe it or not she was also Afrikaans with a similar accent to Anna, and, like Anna, she was not exactly a beauty.  Auroville’s two or three thousand inhabitants, most of whom live in similar style to André, come from all over the world, as a brief glance at its telephone book made clear . . .    But I still don’t understand it, nor do I know its history. When did the possessive go away, and why?  Shouldn’t those all have a possessive there?


This is a feature request to increase the number of close votes in /review, and somewhat similar to .  I know the concern is robo reviewers in search of a badge, but it seems odd to me that I have only 40 close votes per day, but 54 moderator flags.  If the community trusts me enough to give me that much ammunition to throw up to the mods, then why is there not enough trust to spend more time in /review?  Why not increase daily close votes in a way that reflects the community's trust in you?  Something like   Math.max(40, NumberFlags)    or even   Math.max(40, NumberFlags + (~~(UserRep / 10000) * 10)) //(+ 10 votes per 10K rep)   or maybe  Math.max(40, NumberFlags) + (~~(UserRep / 10000) * 10) //(+ 10 votes per 10K rep)

We all know       , but it seems the problem is people not reviewing enough. Whenever I had time, I would go through all 40 that I was given, but by then I wanted to do more. Would raising that limit of 40 and not counting Close Votes queue votes towards your daily close vote allowance help?


Let $G=GL(2,\mathbb{F}_3)$. Prove that $H/Z(G) \cong A_4$, where $Z(G)$ is the center of $G$ and $H=\{A \in G \mid \det (A)=1\}=\ker (\det)$.  We know that $|H|=\dfrac{|G|}{|\ker(\det)|}=\dfrac{48}{2}=24$, and $Z(G)=\left\{\lambda I \mid \lambda \in \mathbb{F}_{3}^{*}\right\}=\left\{\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right),\left(\begin{array}{ll} 2 & 0 \\ 0 & 2 \end{array}\right)\right\}$. So we have that $|H/Z(G)|=|A_4|$. At this point, if we find an injective homomorphism between $H/Z(G)$ and $A_4$, we can conclude that is an isomorphism. The problem if I don't know how $H$ is made, and consequently how the quotient is made. So, how can I build this homomorphism?

I am trying to prove that the quotient group $SL_2(\mathbb Z_3)/Z(SL_2(\mathbb Z_3))$ is isomorphic to $A_4$. I could show that $SL_2(\mathbb Z_3)$ has $24$ elements (one can see this calculating all the elements by hand or simply by noticing that $GL_2(\mathbb Z_3)$ has $48$ elements and that $SL_2(\mathbb Z_3)$ is the kernel of the morphism $\det:GL_2(\mathbb Z_3) \to G_2$). The center of $SL_2(\mathbb Z_3)$ is $\left\{\begin{pmatrix}1& 0\\0& 1\end{pmatrix}, \begin{pmatrix}-1& 0\\0& -1\end{pmatrix}\right\}$. I got stuck trying to show these two groups are isomorphic. By Sylow theory I can say that $n_3=4$, where $n_p=$ number of $p$-Sylow subgroups. Then I can define the action by conjugation on $X$ the set of all $3$-Sylow subgroups. So I have a morphism $\phi:SL_2(\mathbb Z_3) \to S(X)$. It is clear that $Z(SL_2(\mathbb Z_3)) \subset \ker \phi$. I don't know what to do from here. I would appreciate suggestions or an alternative solution to this problem. Thanks in advance.


I was tuning abovedisplayskip and found that \abovedisplayskip=3pt and \abovedisplayskip=0.0pt plus 3.0pt return different results—the former gives a slightly wider space. For example, the following returns pages 1 and 2 equally spaced only if 0.0pt plus 3.0pt. \documentclass{article}  \usepackage{amsmath}  \begin{document} %\abovedisplayskip=3pt \abovedisplayskip=0.0pt plus 3.0pt hello. hello. hello. \begin{equation} y=x. \end{equation} \clearpage  hello. hello. hello. \begin{align} y=x. \end{align}  \end{document}  Why are 3pt and 0.0pt plus 3.0pt different?

In the following code, I need to use +/- where I have used it, and plus/minus where I have used it.  \documentclass{amsart} \usepackage{lipsum} \usepackage{calc} \parindent=0 pt \parskip=12 pt plus 0 pt minus 0 pt \def\headsep{25pt} \newcommand{\LAYOUT}[5]{%   \setlength{\hoffset}{0pt}   \setlength{\voffset}{0pt}   \setlength{\topmargin}{#1 - 1in - \voffset - \headheight - \headsep}    \setlength{\oddsidemargin}{#2 - 1in - \hoffset}   \setlength{\evensidemargin}{\oddsidemargin}   \setlength{\textheight}{#3}   \setlength{\textwidth}{#4}   \setlength{\marginparwidth}{#5} } \newcommand{\FULLPAGE}{\LAYOUT{1in}{1in}{9in}{6.5in}{0.75in}}  \FULLPAGE \begin{document} \lipsum[1-10] \end{document}   If I replace the plus and minus in line 5 with + and - I get an enigmatic  "missing begin{document}" error.    If I replace the minus's in lines 10-11 with "-" I get an equally enigmatic error:  "Missing number, treated as zero. Illegal unit of measure (pt inserted)."   Can somebody please explain when one can use +/- and when one can use plus/minus?  Presumably there's a good reason why latex's error messages are so completely mystifying, and why inconsistencies like these keep appearing? It's really hard to explain to my coauthors, who regularly complain that latex is the most infuriating program ever devised by mankind.  Thanks very much for any advice!   Leo


So i`ve made a low poly tree and make the tree crown using an object info and a color ramp.   The problem is that when i`m exporting the model to unity the only texture that shows up is the log witch is a flat color, the crown goes grey.    I`m new to unity and exporting, so sorry if this is a simple question. And aalso sorry for the bad english

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


Why do we say "I would have gone travelling" instead of "I would have gone to travel"? Because "would" is a modal verb, we usually say that it is followed by an infinitive, not a gerund. Why does the second sentence sound incorrect?

I'm wondering whether or not the verb form that follows a catenative verb has the grammatical function of a noun or of a verb, and whether or not it depends on the first catenative verb.  "I like to run" "I like running"  the -ing and the to infinitive can easily be switched in this sentence, and it seems to be implying "I like [the act of[running]]", so both the infinitive and the gerund are nouns.  "I like to run marathons"/"I like running marathons"   These seem like they might still be nouns but need "verb powers" to take the object, and then these sentences really turn into "I like [the act of [running marathons]]"/ "I like [to be in the state of [running marathons]]".  Is this true for both the -ing (and so it would be a gerund) and the to-infinitive? Are they, sort of, initially verbs so that they can take the object, and then the verb + object becomes a noun phrase?  If this is true, I'm also wondering if the same rules apply for a catenative verb such as "start".  "I started to run in the mornings" "I started running marathons in 2008"  "start" is a catenative verb that isn't a cognitive/emotion verb, and specifically suggests action. So what is the grammatical function of the to-infinitive and -ing verb forms? are they verbs? are they nouns? It just seems incorrect to say that their grammatical function is a noun, but everything I've seen on the internet is pretty vague. I've also seen that to-infinitives are never verbs, but only from one source and it just doesn't seem right to me.  So any ideas on the true grammatical function of the -ing and the to-infinitive after a catenative verb? And is it universal across catenative verbs, or does it depend on the verb category?


I have a subnet like 2001:face:feed:beef::/64. I want to assign all of them to my server, without manually assign every address like 2001:face:feed:beef::[123456789abcdef]...  In ipv4, we may use DNAT to do this, but it doesn't have NAT concept in ipv6, so I want to know if this is workable and does it have some workarounds.

I know that the ip tool lets you bind multiple addresses to an interface (eg, ). Right now, though, I'm trying to build something on top of IPv6, and it would be really useful to have an entire block of addresses (say, a /64) available, so that programs could pick any address from the range and bind to that. Needless to say, attaching every IP from this range to an interface would take a while.  Does Linux support binding a whole block of addresses to an interface?


I am deaf and use a cochlear implant and a hearing aid.  I have a device called a "microlink" which acts as a bluetooth 1.1 headset (amongst other things) and transmits audio received via BT to FM whence it is received by tiny FM receivers attached to my CI and HA.  This PHONAK Microlink device was expensive and works fine as a mobile phone headset (HSP profile), but when I had a NOKIA E series phone I could also play music from the phone's media player - which was fantastic!  Now, I have a Blackberry and a Nexus 7 and neither of them will send audio other than a phone call via the HSP profile, I assume they insist on A2DP for audio.  This is crippling to me, since I cannot now listen to music from either of my Blackberry or Nexus 7 without being wired up to it (or using a direct connection to the Microlink).  I cannot believe in this age of backward compatibility that there cannot be some way of sending media player output to (mono) bluetooth HSP as used to be the case.  Also, since the NEXUS 7 is not a phone - what the heck is the use of HSP on the device? (which shows in the profile list) - a nice port of Android, but why does it still think it's a phone!?  I came across an entry in some list some time ago (that I can't find now!) talking about being able to enter some secret AT string or something to a phone which caused it to redirect audio (from its speaker) to HSP bluetooth - does anyone know anything about this?

I am able to make and receive calls from my Samsung ACE S5830 phone using a  Bluetooth device. However, when I play MP3 songs on my phone, the output does not play through the Bluetooth mono headset; it just directly plays from the phone's speakers.  Is there a way to direct all audio output to the Bluetooth mono headset?


I have a Textbox and I want to add text to the cursor position, how should I do it?  P.s. I know how to read cursor's position, but how do I add text to that position?

I have a standard WinForms TextBox and I want to insert text at the cursor's position in the text. How can I get the cursor's position?  Thanks


Is $2^{1/4}$ (fourth root of two) constructible using only a straight edge and compass? How would you construct it?  I understand that a number is constructible if it can be done in a finite number of step in a field.   I believe it is constructible because the degree of $Q(2^{\frac{1}{4}}$ over the rationals is $[Q(2^{1/4})): Q] = 4$, which has the form $2^k$. The degree is 4 because a basis for $2^{1/4}$ is $${1, 2^{1/4},2^{1/2}, 8^{1/4}}.$$ Is this reasoning correct?  If it is constructible, do I need to find the four roots of unity and multiple each by $2^{1/4}$? And then how do I proceed from there?

Given   A straight line of arbitrary length The ability to construct a straight line in any direction from any starting point with the "unit length", or the length whose square root of its magnitude yields its own magnitude.   Is there a way to geometrically construct (using only a compass and straightedge) the a line with the length of the square root of the arbitrary-lengthed line?  What is the mathematical basis?  Also, why can't this be done without the unit line length?


I have attached the problem together with the solution I have with me. I am facing problem deciding status of 2 BJT's. Please give me a generalised approach to tackle such problems.

I have already posted a similar problem in the link above. I am facing the same issue in this circuit. What will be the state of the 2 BJT's Cutoff, Saturated or Active ? Please suggest me a generalised approach to tackle such problems.


I'd like to create a class Matrix that accepts objects of type T extends Item for a game inventory. However, I'm having issues with implementing the class using generics / wildcards. This is what I have so far. public class Matrix<T> {     private final int maxVertical;     private final int maxHorizontal;      private T[][] contents;       public <T extends Item> Matrix(int maxVertical, int maxHorizontal) {          this.maxVertical = maxVertical;          this.maxHorizontal = maxHorizontal;           contents = new T[maxVertical][maxHorizontal];     }

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I'm a (proud) owner of a 5 year old running app for iOS & Android. The app is to train both beginners and experienced runners with training schedules (30 lessons in 10 weeks). When do you think it's the best time to ask a user for a review?   After landing on the dashboard X times After completing a run X times and viewing their stats (not my favo)  After completing a training schedule (+/- 10 weeks of running) After viewing total stats / last runs When viewing the achievements   My opinion: After completing 2 weeks of training, after closing my current training and landing on the Dashboard.  And: What 'popup' message would you recommend?  "How is training going with X?" "I am satisfied" / "Can do better".  [EDIT] Why this isn't a duplicate of : The usage of an sport app differs from other apps like games or news related apps. As you actively use the app during your excise you want as little information before, during, and after training. This means a different way of interacting and asking for a review.

Fig.1: A typical prompt, asking user for feedback/rating in iOS Background Any serious smartphone users must have seen a message similar to Fig.1 above at least once. Variations of such prompt include: "Please give us 5 star ratings if you love this app!", "Rate us :)", "Your rating helps improve this app!", etc. Basically, Fig.1 asks user to leave a (nice) feedback/rating for the app on its AppStore(or equivalents).  The Shorter Question  When and how often should a mobile app user be asked to leave a feedback/ratings?   The Longer Question #1. Which User-statistics? What are the significant user's behavioral statistics that should be based on to generate Fig.1? For example:  Number of runs since install/reinstall of the application Time elapsed since current application run Time elapsed since first application run Time elapsed since first application install Certain events (e.g. after certain number of stages are cleared for a game app)  #2. When to Ask? If multiple user-statistics are chosen to be calculated to generate Fig.1, specifically how should the user-statistics satisfy the condition of the event? For example:  Form a unified equation (e.g. X^2+Y^2=Z^2) with all significant user-statistics partaken fairly to trigger the event. Create (multiple of) "absolute" event triggers (e.g. every 10th app run; elapsing 2 hours since current application run). Both of the two. Generate Fig.1 whichever comes true first. Neither of the two. "There's a better way!"  #3. How often? What would be the optimal min/max frequency of Fig.1 generation? By optimal, I mean users are not to be bothered too much, yet developers gain maximum output of great feedbacks from users? #4. "Don't bother me again :(" Should users have an option to opt-out from receiving Fig.1 at all? #5. Universal User-statistics for All Mobile Apps? Should apps under different categories be based on different user-statistics? There are significant differences in size and type of user-statistics in apps under different categories. For example, a "Flashlight" app is not typically run for one hour straight, while a music/movie streaming app may be run for over one hour. #6. "This app does not need more feedback." Should every app of all kinds of user base ask this message? If any, should any mobile app stop generating Fig.1 when target conditions are met (e.g. downloads count, active user count, feedback count)? #7. Feedback/Rating Before Deletion Should users be asked to leave a feedback before deleting as seen in Fig.2 below? Users are more likely to leave very critical review on app deletion, but this kind of feedback will be very helpful for the developers to strengthen their app's weakness for next version release.                                                                                Fig.2: Asking user for rating before app deletion


Prove or disprove: let $G$ be a group and $a,b\in G$ elements of order $5$. If $a^3=b^3$ then $a=b$.   I saw the following example which tries to disprove the theorem: $G=\mathbb{Z}_{10}$ and $a=2,b=8$.  I'm not sure about that part, but $o(2)=5$ and $o(2)=8$. I think that $o(2)=\infty$ because there is not $n$ so $2^n\,mod\,10=1$ but I'm not sure.  Does this example disproves the theorem?

How would you prove that 2 elements of the group $G$ are equal, i.e., $a = b$ if we know that $a$, $b$ belong to group $G$ and that $m$, $n$ are relatively prime (integers) and that $a^m = b^m$ and $a^n = b^n$  Thanks!


Hello everyone my question may be stupid but I really don't understand why $$0 \times +\infty$$ is undefined since o times any number is zero no matter how large the number may be

I did a bit of math at school and it seems like an easy one - what am I missing?  $$n\times m = \underbrace{n+n+\cdots +n}_{m\text{ times}}$$  $$\quad n\times 0 = \underbrace{0 + 0 + \cdots+ 0}_{n\text{ times}} = 0$$  (i.e add $0$ to $0$ as many times as you like, result is $0$)  So I thought an infinite number of $0$'s cannot be anything but $0$? But someone claims different but couldn't offer a reasonable explanation why. Google results seemed a bit iffy on the subject - hopefully this question will change that.


I'm trying to remember a word, which definition I found on a movie if I remember correctly. The idea is to see someone as almost free of defects, even if those defects are there. It is what happens when someone is in love, thinking that everything the other person do is great. It is similar to bedazzled, but a false sense of it. I've been looking all over the internet and I just can't find it.  Thank you.

Some examples:   Instead of admitting that I'm an alcoholic, I just say I had one too many drinks. Instead of the bank admitting that it has lots of loans that are in arrears and are likely to default, it only says that it has underperforming loans. Instead of admitting that they overeat, they simply claim that they have a strong appetite.    Basically, I'm after a word for when a phrase is used that is not really a lie, but doesn't give the whole truth to make it sound more positive than it actually is. Usually when something should be dealt with, but it's kind of swept under the carpet by the misleading phrase.


I have a desktop of Intel core 2 and its a 64bit machine. Will ubuntu 20.02 run without any trouble? Thanks!

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


There is a  asking for a solution for windows 7. I have recently grew tired of newly launched applications to steal focus from my currently opened window. Is there a way how to prevent programs from stealing focus in Windows 10?  Thank you

Are there any solutions to prevent applications stealing focus from the active window?   This is especially annoying when I'm starting an application, switch to do something else and the new application starts receiving half a sentence of text.


How do you use an increment operator for booleans so every time it adds ++, it changes from true to false or from false to true?

Is there a better way to negate a boolean in Java than a simple if-else?  if (theBoolean) {     theBoolean = false; } else {     theBoolean = true; }


I am planning to travel from Canada to Nepal via India (dehli airport)? I am thinking to bring my one laptop and one tablet (surface RT). Now i would like to know if there is any custom tax or else. ?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


I want to import fonts from Google Fonts without having them in the directory and without having to import them in my .html file. Is there any way to reference a .css file from your main .css file?

Is it possible to include one CSS file in another?


Is it possible to export Latex to non pdf format? HTML, rtf, doc, ePub, odt will be good.  I read about that, but it seems obsolete now. Any new solutions for such important thing?  My OS is Windows.

Is there a converter that will convert LaTeX to HTML? I have tried several services but the LaTeX diagrams and some of the maths came out weird.  I actually converted the Latex to PDF without a problem. Then I used  to convert from PDF to HTML. The square root signs did not appear properly and some of the Cartesian coordinate plane diagrams had nothing on them except the grid.   \documentclass[12pt,a4paper]{report} \usepackage{amssymb} \usepackage{amsthm} \usepackage{amsmath} \usepackage{pstricks,pst-plot} \usepackage{pst-eucl} \addtolength{\hoffset}{0.2cm} \addtolength{\textwidth}{1.1cm} \addtolength{\textheight}{1.0cm} \addtolength{\voffset}{-0.7cm} \linespread{1.3} \begin{document}  If $x$ is non-positive then $x \leq -\sqrt{\frac{1}{2}}$     $\hspace{30 mm} $     (6)\\  (4) and (6) tell us that\\  (4)  $-1 \leq x \leq 0$  \\  (6)  If $x$ is non-positive then $x \leq -\sqrt{\frac{1}{2}}$\\  Therefore $-1 \leq x \leq -\sqrt{\frac{1}{2}}$\\  \vspace{50 mm}  \begin{align*} \psgrid[unit=2cm](0,0)(-2,-2)(2,2) \pnode(-1.8,.87){b}\uput[50](b){b} \pnode(-1.8,1.8){a}\uput[50](a){a} \psset{linecolor=green} \psline[linewidth=1pt](-1.8, 0)(-1.8,4) \psset{linecolor=green} \psline[linewidth=1pt](-1.8, 0)(-1.8,-4) \psset{linecolor=blue} \psellipticarc(0,0)(2,2){0}{180} \psset{linecolor=red} \psline[linewidth=1pt,linestyle=dashed,dash=2pt](-2,2)(-1.41,1.41) \psset{linecolor=red} \psline[linewidth=1pt](-1.41,1.41) \psset{linecolor=red} \psline[linewidth=1pt]{->}(4,-4) \psset{linecolor=red} \psline[linewidth=1pt]{->}(-2,2)(-4,4) \end{align*}  \end{document}   PDF output:    PDF->HTML output:


I'm creating a Panel that sits in the 3D Viewport.  Right now when it runs, it is inserted under the Misc tab.  I'd like to create my own tab to place it in.  How do I do that? class NormalToolPropsPanel(bpy.types.Panel):      """Properties Panel for the Normal Tool on tool shelf"""     bl_label = "Normal Tool Properties Panel"     bl_idname = "OBJECT_PT_normal_tool_props"     bl_space_type = 'VIEW_3D'     bl_region_type = 'UI'      def draw(self, context):         layout = self.layout          scene = context.scene         settings = scene.my_tool                  col = layout.column();         col.prop(settings, "strength")         col.prop(settings, "normal_length")         col.prop(settings, "selected_only")

I was watching this  on making a custom UI tab using Python, and in the line from bpy.types import Menu, Panel, UIList, I see the names of objects that look like they can all be used to make different UI elements. Does bpy.types contain all the objects that people use when they want to make custom UI elements?


I want to pick random numbers without repeats between 0 and a very large number, say, 2^64. I'll do this a lot of times and I don't have much RAM, so I can't just store the numbers that have already been used and compare each new number with that list. I know I could just store this list to a file, but that would be slow.  Is there an algorithm that can generate random numbers without repeats, that doesn't require all of the generated numbers to be stored somewhere? For example, it could be a function that takes a number from 0 to n as the input, and maps each possible input to a unique output from 0 to n. So, to generate, say, 100 random unique numbers, I can just call this function with arguments from 1 to 100. (I realize that such a function would not be "random," since every time it is called with the same input, it would give the same output. But the sequence of outputs would appear as random as any other pseudorandom number generator.)  So really this is three questions.   Is such an algorithm at all possible? What would the pseudocode look like, if it is possible? Is it practical to use in any realistic situation?   Note: There's a boatload of "random numbers no repeats" questions on here, but I didn't find any that had the "without storing already-used numbers" catch, so I don't think this is a duplicate.

I'd like to generate unique random numbers between 0 and 1000 that never repeat (i.e. 6 doesn't show up twice), but that doesn't resort to something like an O(N) search of previous values to do it. Is this possible?


I have generated a summary for a particular multiple linear regression > mod1 <- lm(log(wage) ~ education + experience + age) > summary(mod1)  Call: lm(formula = log(wage) ~ education + experience + age)  Residuals:      Min       1Q   Median       3Q      Max  -2.03367 -0.33094  0.04165  0.31958  1.84066   Coefficients:             Estimate Std. Error t value Pr(>|t|) (Intercept)  0.84480    0.71884   1.175    0.240 education    0.13805    0.11791   1.171    0.242 experience   0.05353    0.11796   0.454    0.650 age         -0.04173    0.11786  -0.354    0.723  Residual standard error: 0.4699 on 530 degrees of freedom Multiple R-squared:  0.2117,    Adjusted R-squared:  0.2072  F-statistic: 47.44 on 3 and 530 DF,  p-value: < 2.2e-16  Since the F-statistic = 47.44 is larger than the cut-off value qf(0.95, 3, 530) = 2.622, I can reject the null hypothesis that states the model is not significant. But on the other hand, I find that the p-values are larger than 0.05. What is the reason for this? Is there a way to solve this?

In a multiple linear regression, why is it possible to have a highly significant F statistic (p<.001) but have very high p-values on all the regressor's t tests?  In my model, there are 10 regressors. One has a p-value of 0.1 and the rest are above 0.9    For dealing with this problem see the .


I see there are a number of options from C# to Ruby to Python to Javascript.  For a newbie to programming which language would you recommend I choose for this situation (webdriver and newbie programmer) ?

I have start learning Selenium WebDriver, but i am confused between Java and Python. Which language should i choose? I do have basic ideas of Core Java but haven't wrote a single piece of code with python.  So please suggest me which is the better language for Selenium WebDriver?


Find all positive integer solutions $(a,b)$ such that $a^2=b^3+23$  I think there is no solution, yet I don't know how to prove it

As the title stated, I am wondering the integers $x,y$ that satisfy the equation $x^2-y^3 = 23$.


$$\left(\frac{1\cdot2}{p}\right) + \left(\frac{2\cdot3}{p}\right) + \left(\frac{3\cdot4}{p}\right) +\ldots+ \left(\frac{(p-2)(p-1)}{p}\right) = -1$$  Note: $\left(\frac{a}{b}\right)$ represents the Legendre Symbol.  I have tried using this method. For each $k$ between $1$ and $p-2$ denote by $k'$ its multiplicative inverse $\mod p$. To estimate the sum of all Legendre symbols $\left(\frac{k(k+1)}p\right)$ show first that $\left(\frac{k(k+1)}p\right) = \left(\frac{1+k'}p\right),$ then estimate the sum of $\left(\frac{1+k'}p\right).$

Let $p$ be an odd prime number. Prove that $$\left( \frac{1 \cdot 2}{p} \right) + \left( \frac{2 \cdot 3}{p} \right) + \left( \frac{3 \cdot 4}{p} \right) + \cdots + \left( \frac{(p-2)(p-1)}{p} \right) = -1$$ where $\left( \frac{a}{p}\right)$ is the Legendre symbol.  This seems to be a tricky one! I've tried using the property $\left( \frac{ab}{p} \right)=\left( \frac{a}{p}\right) \left( \frac{b}{p} \right)$ and prime factoring all the non-primes but to no avail. I had a quick thought of induction haha, but that was silly. I tried factoring the common Legendre symbols like $\left( \frac{3}{p}\right) \left[ \left( \frac{2}{p} \right) + \left( \frac{4}{p} \right) \right]$ but that didn't bring anything either. And I've been looking for pairwise cancellation with $1$ term leftover, but that does not seem to work.  Can you help?


Is it possible to disable smart (contextual) quotes for an entire document? If yes, how?  In particular, can the single quote ', double quote ", and backtick ` be left as-is by some option or method to directly disable such substitutions?    \documentclass{article} % minimal document which illustrates the issue. \begin{document}  Can "double quotes", 'single quotes' and `backticks` substitutions to any curly, smart, quote, contextual  be switched off for the whole document?  \end{document}   The package  appears limited to the \verbatim type sections. The package  has commands and environments for user-definable ‘smart quotes’ … yet, some switch to just completely disable smart quotes has been elusive.  The question  is looking for a package plus macros and rather than an off switch.  The systemic impact of add packages vs. toggle a switch(option?) have intrinsic differences.  On one hand, "adding a package" is a downstream approach. Downstream files have added cluster and complexity in the authors' files.  , add this package x for macro y, then add that package z, then override a, then define b so that b can then itself be overridden.  Each added package, definition and override also likely adds some computational complexity to the dynamic runtime execution as well.  On the other hand, "toggle a switch" is a upstream approach. I'm guessing these quote substitutions originate in the various TeX/LaTeX engines. Hypothetically or ideally, a smart quote option switch could be compiled and linked for execution efficiently at the source … with some pseudo logic like:  // over simplified pseudo code if smartQuotesOption == true {   // make quote substitutions happen } else {   // just skip the substitutions.   // so, maybe nothing or little to do. }   then conceptually users would use a command line option:     pdflatex --no-smart-quotes document.tex   or use some direct switch like the following in the LaTeX/TeX files:    \smartquotesdisable \smartquotesenable % default for backward compatibility   Such smart substitution enable/disable toggles do exist in document creation environments like various markdown tools, pandoc and mainstream word processors.  So, "Can smart quote substitutions just be toggled off?" …  If yes, great.   If no, then where would one submit a feature request for a smart substitution toggle? Or, find out if such a feature is already on the roadmap? :-)

This MWE  \documentclass[11pt]{article} \usepackage{upquote} \begin{document}  A `set` or 'set'   \begin{verbatim} A `set` or 'set' \end{verbatim}  \end{document}   Compiled with lualatex foo.tex given the PDF file:    I understand that is how Latex default font works. But I want ' and ` (straight quote and back quote) characters in the main text to also remain the same as in the input Latex file.  The package upquote fixes the verbatim text. How would one go about also fixing the ` and ' that show up in the main text as well?  Does one need a complete new font? Which one would that be? Or is there a package like upquote but for main text?  I googled but could not find something.  Using texlive 2017 on Linux.


I'm trying to find a fantasy/sci-fi book in which the main (human) character is kidnapped by intelligent dinosaurs. The dinosaurs are human sized and their behavior varies strongly based on sex. The females are dominant and generally aggressive, while the males are docile, more artistic and sensitive and used mainly for breeding. Males are kept separate from females.  The lizard/dinosaur type creatures have their own language which uses their tales to communicate. The human main character learns their language to survive, while the female captured with him fails to do so and is killed by the Dinosaurs.  One of the female Dinosaurs decides to keep the main character as a slave, she also rapes him at least once.  When he escapes and rejoins a human village, the main character ends up living with a woman with a harelip.  Later in the story another group of creatures show up who are very sexual and cannot handle their alcohol. The creatures they end up with have beautiful tails they use to hide their genitalia.

Many, many years ago, I read a book where dinosaurs were assumed to have suvived the K-T event (or it never happened), and they evolved to intelligent species that used not only language (which combined sound, posture, and colour changes on their skin) but also used technology.  In the series, a human is captured or somehow gets integrated with one of the evolved dinosaur groups.  Again, from a very faint memory, the dinosaurs had a level of technology that would be about middle ages, and the humans were much more analogous to American Indian.  That's really all I can recall about the book, and I am trying to find it for my daughter to read.  Can anyone help me out?


I'm trying to install an SDL library found here (). Per the instructions on the website I added two lines to my sources (/etc/apt/sources.list), but linux says that it cannot read the added lines that begin with 'rpm'. How do I install this library?  My terminal simply says E: type 'rpm' is not known on line 52 in source list /etc/apt/sources.list

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


Find $\int_0^1 \mathrm{\frac{x-1}{ln(x)}}\,\mathrm{d}x$  I tryed this:  $\int_0^1 \mathrm{\frac{x-1}{ln(x)}} = \int_0^1 \mathrm{\frac{x}{ln(x)}} - \int_0^1 \mathrm{\frac{1}{ln(x)}}\,\mathrm{d}x$  To $\int_0^1 \mathrm{\frac{1}{ln(x)}}\,\mathrm{d}x$  Let $t=lnx $ then $\frac{dt}{dx}=\frac{1}{x}$ and $dx=e^tdt$  $\int \mathrm{\frac{1}{ln(x)}}\,\mathrm{d}x \equiv \int \mathrm{\frac{e^t}{t}}$$\mathrm{d}t$ and well  $e^t=\sum _{n=0}^\infty \frac{t^n}{n!}$   $\frac{e^t}{t}=\sum_{n=0}^\infty \frac{t^{n-1}}{n!}$   $\int \mathrm{\frac{e^t}{t}}\,\mathrm{d}t=\int \mathrm \sum_{n=0}^\infty{\frac{t^{n-1}}{n!}}\,\mathrm{d}t=\sum_{n=0}^\infty\frac{t^n}{n*(n)!}$  How can I solve $\int_0^1 \mathrm{\frac{x}{ln(x)}}$ ?  Thanks for your help :) have a nice day

I would like to know how to prove the following two definite integrals.  A: $$\int_{0}^1\frac{x-1}{\log x}dx=\log 2$$  B:$$\int_{0}^1\frac{\log x}{x-1}dx=\frac{\pi^2}{6}$$  I found these two by using wolfram-alpha, but I can't prove them. I suspect that the following relations might be used.  $$\log 2=1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots=\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n}$$and$$\frac{\pi^2}{6}=\frac{1}{1^2}+\frac{1}{2^2}+\frac{1}{3^2}+\frac{1}{4^2}+\cdots=\sum_{n=1}^\infty\frac{1}{n^2}$$  I need your help.


I am very confused with whole ubuntu kubuntu thing. I installed ubuntu 18.04 a few weeks ago, but I felt it is a bit slow and laggy. I want to install kubuntu but I am not sure if I uninstall ubuntu. Should I just change the desktop environment with "sudo apt-get install kubuntu-desktop" or should I install clean kubuntu?   Also, if I install kubuntu, are the core terminal codes like update or clean the same or if I encounter with some problem like gpu problem, can I solve it with the codes or packages that I found for ubuntu?   Thanks

For you that have tested this, should we use Ubuntu and install different Desktop Environments (KDE/XFCE...) or we should install different distributions (Kubuntu/Xubuntu...). Are there any notable issues in performance / CPU consumption?  PS:  I know how to install them (already did), I wanted to know if anyone has any problems regarding the performance and what is better to install the desktop or to use the ditribution


I am looking for advice on how to present myself in the best light to future PhD programs in the humanities.   I currently am completing my MA from a respectable state school in the subject that I wish to get a PhD in. I expect to graduate with a GPA of 3.98. I have good GRE scores, letters of recommendations, statement of purpose, and writing sample.   My concern is my undergraduate GPA. I transferred from a top liberal arts college after two years to an Ivy League institution. My GPA from my first two years of college is high (3.8). However, the last two years of my college, my GPA dropped significantly (3.1). Combined, I have a respectable GPA of 3.45. However, most applications to the PhD programs make the applicant fill out the GPA boxes of the institutions attended separately (i.e. "was your GPA on a 4.0 scale?" - "If yes: enter GPA"). I do not have a good excuse for this decline. Furthermore, the PhD applications make you choose which was your "primary institution." To exacerbate my issue even more, some have a cut off of 3.3 GPA, which would make my application seem to be automatically rejected even though it is not reflective of my whole time as an undergraduate.   My questions are:   How much does undergraduate GPA matter compared to a master's degree GPA? Do I even have to report my undergraduate GPA given that I have an MA degree? (It seems that I do, but it's worth asking here.) Is there any way to list my college GPA as "combined" given the very specific constraints of the application? Or would any efforts to show a holistic grade appear dishonest? I would not like to draw more attention to my low GPA if possible. Is it prudent to list my liberal arts college as my "primary institution" even though my degree was conferred by the Ivy League one? Which would make my application stronger?    I am applying to extremely competitive programs and I really hope to get into one. Any and all suggestions on how to handle this is appreciated. Thank you for advice on the matter, I really would be grateful for it.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I'm trying to figure out some issue I'm having.  Basically what my issue is, is that the values that are being returned by my methods aren't right.   I have the print line statement just to be sure it's working but it always returns 1, even when I call to another method that should return a String.  The variable current_number/image_number is supposed to be updated every time I call to a method (If I keep calling to forward starting from 1, I should be getting 2, 3, 4 etc..).   This is my code  public class Menu {      static final int MIN_NUMBER = 1;     static final int MAX_NUMBER = 8;     static int image_number = 1;     static boolean exit;      public static int forward(int current_number) {         if (current_number < MAX_NUMBER) {             current_number++;         } else if (current_number >= MAX_NUMBER) {             current_number = MIN_NUMBER;         }         return current_number;     }      public static void showMenu() {         int current_number = image_number; // global int that equals 1          while (!exit) {             Scanner input = new Scanner(System.in);             Random rand = new Random();             int randomvalue = rand.nextInt(MAX_NUMBER) + MIN_NUMBER; // used in another method              System.out.println("1. forward"); // menu with options             System.out.println("2.");             System.out.println("3.");             System.out.println("4. Exit");             System.out.println(current_number);              int choice = input.nextInt();              switch (choice) {                 case 1:                     forward(current_number);                     break;                  case 4:                     exit = true;                     break;             }         }     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


The question is simple from a programmer's point of view. How do you know which language / libraries has been used to develop a specific software product.   Say you have average knowledge of computing who can understand by checking product file (.exe, .dll, etc) names / versions that this piece of software has been written using Visual C++ / .Net / QT , etc.  Any solid ideas by which one can know about a programs's programming language?

Whats the easiest way to find out what programming language an application was written in? I would like to know if its vb or c++ or delphi or .net etc from the program exe file.


All,  I have a Asus ZenBook Pro UX580GE-BN010T and prefer to work in an ubuntu environment. I already saw a lot of post about missing drivers for the screenpad.  So: Can someone confirm that the screenpad of the asus zenbook works on ubuntu? In the case of "yes", I'll install ubuntu right away

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


This makes it appear that my hostname if correct:  ubuntu@webserver:~$ hostname webserver   Below is the command I'm running and the output:  ubuntu@webserver:~$ sudo hostname webserver sudo: unable to resolve host webserver   Here is what is in my /etc/hosts file:  127.0.0.1 localhost webserverL  # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts   Here is what is in my /etc/hostname file:  webserver   I'm needing to get this to work properly to use Apache2.

When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:  ubuntu@(none):~$ sudo true sudo: unable to resolve host (none)   What can I do to solve it?


Can someone please verify if my proof is correct, and add to it if it isn't?  Since we're given that $B$ is countable, we know $B$ is either finite or has the same cardinality as, say, the set $\mathbb{Q}$. So $\vert B \vert = \aleph_0$.  Similarly, if $A$ is infinite,  then we know the result $\aleph_0 \leq \vert A \vert$.  This implies that $ \vert B \vert \leq \vert A \vert$.  Then $\vert A \cup B \vert = \vert A \vert$.  Am I missing something here?

This seems evident, but I cannot come up with a reasonable proof for:  Question: show that if $X$ is an infinite set and $Y$ is a countable set, then $|X \cup Y|=|X|$


I am making keyboard controls for a camera, and I am experiencing issues regarding the innacuracy of floats. I have the variables "float Xvelocity" and "float Zvelocity", I increment these velocities by adding or subtracting the acceleration speed every time the respective direction keys are being held (A, D, W or S). However, everything I try to make the float go towards zero simply work in very strange ways. I thought it would be as simple as: if (keys[GLFW_KEY_A] & xVelocity >-speed)     xVelocity -= acceleration / deltaTime; if (keys[GLFW_KEY_D] & xVelocity < speed)     xVelocity += acceleration / deltaTime; if (keys[GLFW_KEY_W] & zVelocity >-speed)     zVelocity -= acceleration / deltaTime; if (keys[GLFW_KEY_S] & zVelocity < speed)     zVelocity += acceleration / deltaTime;  if (!keys[GLFW_KEY_A] & xVelocity<0.f) {     xVelocity+=deceleration / deltaTime; } if (!keys[GLFW_KEY_D] & xVelocity>0.f) {     xVelocity-=deceleration / deltaTime; } if (!keys[GLFW_KEY_W] & zVelocity<0.f) {     zVelocity+=deceleration / deltaTime; } if (!keys[GLFW_KEY_S] & zVelocity>0.f) {     zVelocity-=deceleration / deltaTime; }  origin -= right * xVelocity; origin -= vec3(front.x, 0.f, front.z) * zVelocity;  This doesn't make my camera completely stop moving! It does decelerate, but it rarely becomes exactly zero, thus it keeps slowly moving after releasing the key, either towards the direction it was going before or away from it. Can someone explain why doesn't this deceleration work as I intended, (probably because of float inaccuracy, but maybe it's another reason) and how may I proceed to fix it?

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


For example I was fixing an issue with my Iphone which required me to change the hosts file in sys32.. But the computer would tell me I am not allowed to and to contact an administrator. I've already tried Net user administrator /active:yes but even when trying to change and save the hosts file while logged in on the Administrator-account, it will tell me I cant do that.. How do I give myself full access? this is really frustrating

If my account is already a member of the administrator group why do some functions on Windows 7 require me to run them as administator? I kind of thought that was implied?


If $\sin(4x)=2\sin(2x)\cos(2x)$ then:  $$\int \sin(4x)=\int 2\sin(2x)\cos(2x)$$ $$\frac{-\cos(4x)}{4}=\frac{-\cos^2(2x)}{2}$$  But considering now $x=2$: $$\frac{-\cos(4\cdot 2)}{4}\neq\frac{-\cos^2(2\cdot 2)}{2}$$ $$0.036\neq -0.214$$  What's the error that is behind this process ?  Thanks in advance.

I have  $$\int \sin(2x) \cos (2x)\,dx = \frac12 \int \sin(4x)\,dx = -\frac18 \cos(4x),$$  but I also have  $$\int \sin(2x) \cos (2x)\,dx = \frac12 \int \sin 2x \cdot 2 \cos 2x \, dx = \frac14 \sin^2(2x).$$  Which one is correct, and why is the other method wrong?


Apologies for the photo but I couldn't copy/paste because my mac is in recovery mode  Basically what I did was have Windows and Debian installed alongside encrypted OSX but this morning I was desperate for space and the other operating systems were hardly used on this machine so I used the bootcamp tool to try and delete windows and regain the extra space. The tool then gave an error but it looked liked windows had been removed so I went to the disk utility and  deleted any other partitions including the linux swap with the intent of merging them all manually. I then rebooted the machine to find the question mark folder so I went into internet recovery mode but it looks like it can't detect the encrypted OSX partition and repair the bootloader I am unsure what to do next as I need the files on this machine Any help would be appreciated

I have a situation very similar to the ones depicted in two previous questions I found ( and ), but still different (I address why my situation is different later on in the question).  The problem  I am really panicking, my computer has been in unbootable status for two days now and because of coronavirus lockdown, in Italy there is no any opened tech shop, at this point I do not know what to do and any help is very much appreciated.  I had a ~50 GB linux partition on the SSD (total ~250 GB) of my 15” Macbook Pro mid-2015. I created this partition to boot ubuntu back in 2016 and I used it regularly alongside macOS. About one year ago I updated to Mojave 10.14, and this is the macOS version my computer is running now (I am mentioning it because I suppose that the update changed the file system of my macOS partition to APFS, keeping unmodified the ubuntu partition, I guess).  Today I decided to remove the ubuntu partition, I started the computer on macOS, opened Disk Utility, find the ~50 GB partition assigned to ubuntu on the pie chart, I clicked on the “-“ sign to remove the partition and then “Apply”. Disk Utility returned to me instantly with an error (not remember exactly the text, but I remember that no error code was given) saying it could not perform the operation, so I googled a bit some solutions (MY COMPUTER WAS PERFECTLY WORKING) and I found a post suggesting to perform some operations from ubuntu, so I decided to restart my computer in order to open ubuntu - I repeat, it was perfectly working, many apps opened and fully working, etc. - and...  It booted into “GNU GRUB version 2.02”  I tried to restart my mac keeping “option” pressed, but it could only find the “EFI Boot” disk (picture attached) which is the one I usually select to boot Ubuntu. Also, Ubuntu now doesn’t even work anymore, because if I select “EFI Boot” it starts “GNU GRUB version 2.02”.  Now I really started panicking, I don’t care about data of the ~50 GB ubuntu partition, but so foolishly I haven’t backed up the ~200 GB macOS data, and I am just so affectionate to them, I would really like to recover them.  Data Recap   15” Macbook Pro mid-2015 Right now I am booting from the network. 256 GB SSD partitioned in: ~200 GB APFS macOS partition - FileVault encrypted - running Mojave 10.14 ~50 GB ubuntu partition - don’t remember the file system (data here doesm’t matter to me)   Photos Attached   diskutil list gpt -r show /dev/disk1 disk1 information from Disk Utility Disk Utility overview of the physical disk booting situation with only the “EFI Boot” partition   Why my situation is different  My situation is different from other questions because of 3 reasons:   The ~50 GB ubuntu partition is disappeared, maybe corrupted, indeed if you add up all the disk's size in diskutil list, you still miss ~50 GB. I have 2 disks at the same time (index 2 and index 3) that are in the FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF status When I call gpt -r show /dev/disk1 I don't get any "Suspicious MBR at sector 0" message unlike others users that wrote other questions.   Update 1  I just wanted to confirm that I am booting the mac from Network Recovery and also my Disk Utility version. Disk Utility Version is: "Version 13 (606)" - "Copyright 2002-2014 Apple Inc.". Is seems, indeed, pretty old.


Let $R$ be a PID and $A,B$ be two $m\times n$ matrices over $R$ with $m\leq n$. I want to show that if $A$ and $B$ have the same image, they only differ by multiplication by an invertible matrix from the right.   Expressing the column vectors of A,B by linear combinations of the column vectors of B,A yields square matrices $X,Y$ with $AX=B,\  BY=A$ and thus $AXY=A,\  BYX=B.$  Using the fact that $R$ is a PID, I can apply the elementary divisor theorem and assume $A$ to be "diagonal", meaning of the form $A=\left(\frac{\textrm{diag}(e_1, \dotsc, e_m)}{0} \right)$ for some $e_i\in R$.

Let $A$ and $B$ be $m\times n$ matrices over $\mathbb{Z}$ such that image($A$) = image($B$), where $A$ and $B$ are considered as maps $\mathbb{Z}^n \rightarrow \mathbb{Z}^m$. Does there exist an invertible $n\times n$ matrix $P$ such that $A=BP$? what happens if we consider the matrices to be over $\mathbb{Q}$ instead of $\mathbb{Z}$?  I would prefer some hints instead of full answer.  Thanks in advance.


I had a question at the interview. I just don't get why this prints 5 6 7 8 9...  let i = 0;  while (i < 5) {   setTimeout(() => {     console.log(i++);   }, 0);   i++; }

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