I am trying to run a service on port 61009 on localhost on centos8, but getting connection refused. I tried opening the port using firewall-cmd command. The output of the firewall-cmd --list-all looks like the following. public (active)   target: default   icmp-block-inversion: no   interfaces: eth0   sources:    services: cockpit dhcpv6-client ssh   ports: 61008-61010/tcp 61022-61024/tcp 61009/tcp   protocols:    masquerade: yes   forward-ports:    source-ports:    icmp-blocks:    rich rules:        My OS details are as follows. NAME=“CentOS Linux” VERSION=“8 (Core)” ID=“centos” ID_LIKE=“rhel fedora” VERSION_ID=“8” PLATFORM_ID=“platform:el8” PRETTY_NAME=“CentOS Linux 8 (Core)” ANSI_COLOR=“0;31” CPE_NAME=“cpe:/o:centos:centos:8” HOME_URL=“https://www.centos.org/” BUG_REPORT_URL=“https://bugs.centos.org/” CENTOS_MANTISBT_PROJECT=“CentOS-8” CENTOS_MANTISBT_PROJECT_VERSION=“8”  telnet localhost 61009 telnet: connect to address ::1: Connection refused Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused How can i open ports on centos8?


I use _thread.start_new_thread to start a thread, but I need to exit it completely on certain occasions. Thread runs a slow built-in function (thats why I cannot return from it), so, in a way, I need to stop that function. Thats why I think to use thread (with that slow function in it), because I know its possible to stop it somehow. But how would I do that with specifically thread, not threading, module? Or how could I exit, lets say, cv2's gaussianBlur function, before it ends?


Why doesn't gcc or build-essential install the latest version of GCC (9 as of today) on Ubuntu 18.04 LTS?

What's the reasoning behind it?  Thanks!


Showing that $1-\cos(x) <\frac{x^2}{2}$ holds

Show that for all $x \in (0, \frac\pi2)$ the inequality $1-\cos(x) <\frac{x^2}{2}$ holds.   Setting $f(x) = \frac{x^2}{2}+\cos(x)-1$ and differentiating it results in $f'(x)=x-\sin(x)$.  Differentiating the function once more we get $f''(x)=1-\cos(x) \geqslant 0$, since $-1 \leqslant \cos(x) \leqslant 1$.  So we know that $f'$ is strictly increasing. My question is, how should we continue from here?


What is the equivalent of Java wildcards in C# generics

I'm developing an application where I the need to invoke a method of a generic class and I don't care about the instances actual type. Something like the following Java code:  public class Item<T>{   private T item;    public doSomething(){...} }  ... public void processItems(Item<?>[] items){  for(Item<?> item : items)    item.doSomething(); }   At the time I was on a hurry, so I solved my problem by defining a interface with the methods I needed to invoke and made the generic class implement it.  public interface IItem   {    void doSomething(); }  public class Item<T> : IItem {   private T item;    public void doSomething(){...} }  ... public void processItems(IItem[] items) {  foreach(IItem item in items)    item.doSomething(); }   This workaround works fine, but I'd like to know what is the correct way to achieve the same behavior.    EDIT:  I forgot to refer that the caller of processItems doesn't know the actual types. Actually the idea was that the array passed as argument to processItems could contain intermixed types. Since its not possible to have such an array in .Net, using a non generic base class or interface seems to be the only way.


Drawing straight line between the two points


Can I say: "a group of ten-year-olds" or should I add the noun for example students  "a group of ten-year-olds students"? Thank you in advance for your answer.


We know that one irreducible polynomial on $\Bbb{Z}_2[x]$ is  $x^8 + x^4 + x^3 + x + 1$. How to check that it is irreducible? And how to generate irreducible polynomial for any degree?


I would like to be able to create parallel lines with a defined distance, in the same way that the editor's parallel copy tool does.


Auto hiding top panel in 17.10 GNOME 3.26.1

I know Ubuntu 17.10 released only a few days ago, but has someone figured out how to auto-hide the top panel like the dock auto-hides when apps are full screen.  I have followed multiple tutorials online, but none of them worked.


Geometric proof for irrationality of $\pi$

Is there a geometric proof for irrationality of $\pi$? That would be neat.


will running ubuntu from a live usb key affect my windows 10 installation in any way?

I have made a live installation of ubuntu to a usb key using the provided usb universal installer and selected an amount of persistant hard drive space on the key. What I want to know is, will booting from and using the usb key ubuntu OS in anyway way, shape or form touch, affect, write to or modify my internal hard drive with windows 10 sitting on it?   Thanks in advance?


Binomial coefficient (case differentiation)

If you want to proof $\binom{n}{k}$ + $\binom{n}{k+1}$ = $\binom{n+1}{k+1}$, you have to differentiate between 5 cases. Why 5 cases and where do they come from ? It should have something to do with  $\binom{N}{k}$ = $\frac{n!}{k!(n-k)!}$ .


Why is the list updated even when it is passed by value?

public class Node<T> {     T data;     Node<T> next;     Node(T data){         this.data = data;     } }   public  class LinkedListUse{      public static void print(Node<Integer> head){         Node<Integer> temp = head;              while(temp != null){             System.out.print(temp.data +" ");             temp = temp.next;         }         System.out.println();     }          public static void increment(Node<Integer> head){         Node<Integer> temp = head;         while(temp != null){             temp.data++;             temp = temp.next;         }     }          public static void main(String args[]){              Node<Integer> node1 = new Node<Integer>(10);         Node<Integer> node2 = new Node<Integer>(20);         node1.next = node2;         increment(node1);         print(node1);     } }  Since node1 has been passed by value (and not pass by reference) in the function increment, hence the output should be 10 20 according to me, but the solution is 11 21. Can you please help me out with the explanation behind this


Prove that if $\sum a_n$ converges absolutely, then $\sum a_{2n}$ converges.

In posting this question, I noticed a lot of 'similar' threads pop up, but felt that they required a fundamentally different approach.  If any of you feel differently, please feel free to vote this thread as a duplicate and I will delete it.  Here is my approach, I would appreciate help/correction where relevant, as I am unsure of how robust my answer is:  If $\sum a_n$ converges absolutely, then we have that $\sum |a_n|$ converges. This implies that $\sum a_n$ also converges, and that the sequence $(a_n)_{n \in \mathbb{N}}\to 0$.$^{(1)}$  This means that the sequence $(a_n)$ is bounded and monotone (decreasing), and as such convergent.  Looking at $(a_{2n})$ we notice it is a sub-sequence of $(a_n)$ and converges to the same value (Bolzano-Weiestrass).$^{(2)}$  Then the partial sums $(s_{2n}) \to A$ and thus $\sum a_{2n} = A$  Is this sufficient? I feel it is a little wishy/washy in using bolzano-weistrass.  Do I need to formally show $(a_{2n})$ is a sub-sequence of $(a_n)$  Any tips/hints/corrections are greatly appreciated.  $^{(1),}$$^{(2)}$ - I am not required to show these results, as quoting the theorem from my notes is considered sufficient by my professor.


Is "currently-installed" a proper compound adjective?

I'm in the process of working on technical documentation and the phrase "currently-installed" came up. The context of the orginal sentesnece is as follows:     "You are not licensed to use the currently-installed product."   Normally I see this written as "currently installed" but I was told the other way is correct because it is a compound adjective. Which form is correct?


Copying a file with cp, is there a way to pause the operation? NB: copying a single file or copying a large number of files


Does convergence in probability imply a.s. convergence in a countable space?

Let $(\Omega, \mathcal F,\mathbb P)$ be such that $\Omega$ is countable. I'm trying to find a simple example of random variables $X_n$ which converge to $0$ in probability but not a.s.  If $\mathcal F = 2^{\Omega}$ (i.e., $\{\omega\} \in \mathcal F$ for each $\omega$ since $\Omega$ is countable), it is shown  that such random variables do not exist. But now we only assume (of course) that the $X_n$ are measurable.   question is essentially the same (but the measure there need not be finite).


Prove that if $d$ is a common divisor of $a$ & $b$, then $d=\gcd(a,b)$ if and only if $\gcd(a/d,b/d)=1$

Prove that if $d$ is a common divisor of $a$ & $b$, then $d=\gcd(a,b)$ if and only if $\gcd(\frac{a}{d},\frac{b}{d})=1$   I know I already posted this question, but I want to know if my proof is valid:  So for my preliminary definition work I have:  $\frac{a}{d}=k, a=\frac{dk b}{d}=l,b=ld $  so then I wrote a linear combination of the $\gcd(a,b)$,  $$ax+by=d$$ and substituted:  $$dk(x)+dl(y)=d              d(kx+ly)=d              kx+ly=1              a/d(x)+b/d(y)=1$$  Is this proof correct? If not, where did I go wrong? Thanks!


How do the /review pages (for example, ) work?   What actually happens when you click "flag for removal"? Is there a limit to the number of questions that can be reviewed?   Related:


Image migration script - Allowed memory size of 134217728 bytes exhausted

I am trying to import around 130k images via url. I thought it would be convenient to write a cli artisan command.  I am using laravel and "Spatie/MediaLibrary".  This is my script:  public function handle()     {        Article::where('index_block_position',0)->each(function($article){             if($article->featured_image != ''){                 try{                     $featuredImage = $this->mediaLibrary->addMediaFromUrl($article, 'http://myoldwebsite.com' . $article->featured_image, 'featured_image');                     $libraryImage = $this->mediaLibrary->addMediaFromUrl(MediaLibrary::first(), 'http://myoldwebsite.com' . $article->featured_image);                     $article->index_block_position = 1;                     $article->save();                     $this->info("Article {$article->id} image: {$featuredImage->id} - Library image: {$libraryImage->id} - added");                     Log::useDailyFiles(storage_path().'/logs/featured-image-migration.log');                     Log::info("Article {$article->id} image: {$featuredImage->id} - Library image: {$libraryImage->id} - added");                 }catch (\Exception $e){                     $this->info("image: {$article->featured_image} - exception: {$e->getMessage()}");                     Log::useDailyFiles(storage_path().'/logs/featured-image-migration.log');                     Log::info($e->getMessage());                 }             }         });         $this->info('All done!');     }   Unfortunately, after 10 or so images added I get the following error:  Symfony\Component\Debug\Exception\FatalErrorException: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24576 bytes)   I am not sure how i can make this work because i have 130k images to import and the memory limit of 128M is already exhausted after 10 images...  I would appreciate suggestions.


Are there quicker and less error prone methods for finding determinant?

Edit: I don't think this is a duplicate. That question is generally about efficient algorithms for calculating the determinant. While my question is about practical tips and tricks which can be used when doing this sort of thing by hand.    During one of the questions I was solving I came across the following determinant:  $\left|\matrix{t-1&3&0&-3\\2&t+6&0&-13\\0&3&t-1&-3\\1&4&0&t-8}\right|$  I solved it directly by expanding from the third column and got the result $(t-1)^4$.  However, along the way I made a couple of calculation errors and finding them took me a while. This got me thinking that maybe there are some tips and tricks I could use to calculate this in a faster less error prone method. Or maybe, at least know that I got the right answer in some way?  Any tips that could interest me?


Reading a basis for $\operatorname{Null}(A)$ and $\operatorname{Null}(A^T)$ from the reduced row-echelon form of $A$

I know that it is possible to read the basis for $\operatorname{Null}(A)$ and $\operatorname{Null}(A^T)$ by simply looking at the reduced row-echelon form (RREF) of the matrix $A$. I have only an approximate idea of how to do it.  For example, if we $$A = \begin{bmatrix} 1 & 2  & 0  & -1 \\  0 & 0 &1  &2 \\  0 &0  &0  &0  \end{bmatrix},$$ then one of the basis vectors for $\operatorname{Null}(A)$ will be $\begin{bmatrix}-2 & 1 & 0 &0\end{bmatrix}^T$, and the other one will be $\begin{bmatrix}1 & 0 & -2 &1 \end{bmatrix}^T$. So, basically we're "going around" over eight digits and alternating signs. But I noticed that this method isn't perfect. Does someone have a better idea of how to read bases for these two spaces from the RREF of $A$?


value of $k$ in cube painting with $6$ different color

Let $k$ be the number of distinct ways of painting $6$ sides of a cube with $6$ distinct colors, where you would regard  two cube coloring the same If one can be obtained from the other by rotation, Then $k$ is    what i try  Number of distinct ways of painting a cube with $6$ distinct color is $\displaystyle 6\times 5\times 3!=180$  I have color Top side, can be done as $6$  and opposite face bottom  side with $5$ color Now arranging $4$ color in $4$ sides as $(4-1)!$  But my answer is wrong, Help me please


I want to implement robust line fitting over a set of $n$ points $(x_i,y_i)$ by means of the Least Absolute Deviation method, which minimizes the sum  $$\sum_{i=1}^n |y_i-a-bx_i|.$$  As described for instance in Numerical Recipes, you can find the optimal slope, by canceling the function  $$s(b):=\sum_{i=1}^n x_i\text{ sign}(y_i-bx_i-\text{med}_k(y_k-bx_k))$$  where $b$ is the unknown. To find the change of sign, a dichotomic search is - appropriately - recommended. Anyway, the starting search interval as well as the termination accuracy are based on purely statistical arguments (using a $\chi^2$ test).  I was wondering if there is an analytical way to derive safe bounds for the slopes (i.e. values such that $s(b)$ is guaranteed positive or negative), as well as the termination criterion (minimum of $|s(b)|$). (In fact, I don't even know if the function is monotonic.)  Note that my question is not related to the simplex approach for this problem.


Green rep change notification doesn't match the actual number in the tab

This evening the strangest thing just happened to me. I got notified of a +4 rep change, but when I opened the tab, I saw only an unread +5 from (presumably) a question upvote. See the screenshot:    How did that happen? Is this a bug?


Delete apps from Launchpad or from Finder?

Is there an advantage to delete apps from Launchpad (Hold one app like in iOS) vs from finder?    And why some apps cannot be deleted from Launchpad?


Consider the following sentences:   Cooking is my favourite activity. Cooking apples are essential for this recipe.   Cooking functions in the first sentence as a gerund. How does it function in the second?  A similar question could be asked of the term cleaning lady. However, while a cooking apple represents an apple which is (itself) cooked, a cleaning lady represents a lady who cleans (something else). Is there a difference?  Other examples:   Talking point vs. Watering can Reading material vs. Cutting board


Matrix determinant where $a_{ij} = i + j$

So I'm studying for my course of linear algebra and the following problem was inside the book with exercises. "Given a matrix $A \in \mathbb{R}^{n \times n}$, where $a_{ij} = i + j$, calculate it's determinant". The first thing I did was make a small visualization of what this sort of matrix would look like. I came up with this: $$ A = \begin{pmatrix} 1 + 1 & 1 + 2 & ... & 1 + n\\ 2 + 1 & 2 + 2 & ... & 2 + n\\ ... & ... & & ...\\ n + 1 & n + 2 & ... & n + n \end{pmatrix}$$ I set of to set up an expression for the determinant using cofactor expansion (I don't know if this is the correct English terminology for it, the formula is given below, I also found on wikipedia this is called "Laplace Expansion"?) to the first row (thus making $j = 1$ in the expression): $$ \sum^{n}_{i = 1}(-1)^{(i + 1)}a_{i1}det(M_{i1})$$ where $det(M_{i1})$ is the minor for the $i1$-th element. This is the point where I am stuck and could definitely use some help. I've tried writing $A$ in terms of summations to maybe see something in it, but this evolved into some very complex expression which I'm not even going to bother typing down (it's really, really long). I have a feeling that I can bring the $a_{i1}$ out of the summation but I'm not sure how I would go on doing that. Thanks in advance


Can someone please tell me how to put a grid [(-6,-6) to (6,6)] in the figure I drew using the following code. Also, if you notice the arrowheads near labels 'y1' and 'y2', those are really small so how can I increase their size.  The image attached is what I actually want. Many thanks in advance.    \documentclass[11pt]{article} \usepackage{tkz-euclide}  \begin{document} \begin{figure}[h!] \centering \resizebox{7cm}{7cm}{     \begin{tikzpicture}      \draw[->] (-6,0)--(7,0);     \node[scale=2, right] at (7,0) {$y_1$};     \draw[->] (0,-6)--(0,7);     \node [scale=2, above] at (0,7) {$y_2$};     \draw (2,6)--(2,2)--(6,2);     \draw (-6,2)--(-2,2)--(-2,6);     \draw (-6,-2)--(-2,-2)--(-2,-6);     \draw (2,-6)--(2,-2)--(6,-2);     \node [scale=2, right] at (6,2) {$b-a$};     \node [scale=2, right] at (6,4) {$b$};     \node [scale=2, right] at (4,4) {$c_0$};     \node [scale=2, left] at (-4,4) {$c_1$};     \node [scale=2, left] at (-4,-4) {$c_2$};     \node [scale=2, right] at (4,-4) {$c_3$};      \draw (4,4)--(4,4);     \filldraw (4,4) circle (3pt);     \draw (-4,4)--(-4,4);     \filldraw (-4,4) circle (3pt);     \draw (4,-4)--(4,-4);     \filldraw (4,-4) circle (3pt);     \draw (-4,-4)--(-4,-4);     \filldraw (-4,-4) circle (3pt);  \end{tikzpicture} } \end{figure} \end{document}


I am confused by the Taylor's Inequality formula: $$|R_n(x)| \le \frac M{(n+1)!}|x−a|^{n+1}$$   What do $R_n$, $M$, $n$, $x$, $a$, stand for i.e. what to substitute inside each variable? What purpose does this formula serve/How to apply it in situations/problems?


Single Flag deletes comment with profanity

There is an existing question  4 years old about a post a year prior, that focuses on a post containing the word(s) 'accept', 'accepted' and/or 'accepting' I do not believe this is the same.  I am a 10k+ user on a beta site, saw a new post that was not a good fit, down voted it, voted to close and left a comment while the view count was at 2.  I moved on.     The OP posted a comment and I came back when I got the notification.  The comment contained profanity and I flagged it as Rude, and the comment instantly disappeared (screen shot above is after it disappeared)  I looked at the  and it does not seem to be a documented feature.    How did a non-admin delete a comment with a single flag?


I am running Ubuntu 17 on my Thinkpad E480.  I have an external fingerprint reader and would like to know how to use it.  I tried using lsusb, but it didn't show the fingerprint device.  Any ideas?


When should we use "object-oriented" and when "object oriented" when talking about programming?  An example:     Why should I start writing object oriented code?   I personally think that there should be a hyphen, because "oriented" connects to the word "object", but I am not sure.


Multiple tag search using OR operator broken for logged out users

I just noticed an odd bug.  Steps to recreate:   Do a search for two tags, using the OR operator.   Observe that it properly returns results that contain either tag. Log out. Do a search for two tags, using the OR operator.   Observe that you only get results for the first tag, the OR and second tag are stripped out of the search.   Is this a bug, or on purpose for some reason?


Dealing with "java.lang.OutOfMemoryError: PermGen space" error

Recently I ran into this error in my web application:     java.lang.OutOfMemoryError: PermGen space   It's a typical Hibernate/JPA + IceFaces/JSF application running on Tomcat 6 and JDK 1.6. Apparently this can occur after redeploying an application a few times.  What causes it and what can be done to avoid it? How do I fix the problem?


Which type of #include ("" or ) when writing a library in C/C++

I am writing a library in C++. The library has multiple headers and cpp files and needs to be cross platform (Windows Visual Studio and Linux gcc). When built the library and headers are installed in a system directory somewhere, where they can be found by other code on the same machine (e.g. /usr/local on a Linux system).  If one of my headers needs to #include one of my other headers then should I use angle brackets or quotes?  I feel like angle brackets is what should be used once the library is installed so that system directories are checked, but when building the library I need to use quotes so that local directories are checked and I don't pick up an out of date version from the system directories.  I am aware ow what the different versions of #include <filename> and #include “filename” mean. I am asking which is appropriate and why, for the situation of writing a library.


I've executed a JDBC query to obtain a resultset. Before iterating over it, I'd like to quickly find out how many rows were returned. How can I do this with high performance?  I'm using Java 6, Oracle 11g, and the latest Oracle JDBC drivers.


Can I write off time I spent working on my business?

So, I'm a freelance web programmer by trade, which means that my time really is money. I, occasionally, work on side projects of my own and forgo the possibility of earning direct income for that time.   I wonder, can my freelancing business bill my side project (as a business) for time spent? Could I deduct that expense from the side project's taxes?  This is in regards to U.S. tax law.


Romantic manga with time-traveling police officer

The story is about a young woman, working as a police officer or something. She is in love with a fellow colleague. While visiting her old high school she meets a wanted criminal. Said criminal was about to commit suicide by jumping of a building. The main heroin wanted to prevent this, but falls with him.  Instead of dying she somehow travels back in time into her younger self back in high school. There she meets this criminal, who still hasn't committed any crimes. She now wants to "re-educate" him, so that he won't end up the same as his future self. Meanwhile they fall in love with each other.  Her previous crush from the future somehow ended up in the past as well and they collaborate together to save the "criminal".  I remember reading this manga back in 2017. Back then it was still ongoing.


The uses between pointer and reference in C++

I am a beginner and puzzled by the uses of reference. I have been studying a lot on pointer. Recently, I start working on reference. Can I summarize reference in a sentence like that  "what references can do, can be done with using pointers"   As I see, pointer store an memory address, so we can go into specific address to do things but reference doesn't even take a memory, it's just a alias.  Here is pointer implement   #include <iostream> using namespace  std;  void Increment(int* value) {    (*value)++; } int main() {    int a = 8;    int* ptr_a = &a;      Increment(ptr_a);    cout << a << endl;    std::cin.get(); }    and here is reference implement  #include <iostream> using namespace  std;  void Increment(int& value) {     value++; } int main() {     int a = 8;     int& ref_a = a;       Increment(ref_a);     cout << a << endl;     std::cin.get(); }   I get the exactly same output. As a result, can I conclude the differences as "Pointers cover all the function of references"?  Thank you


How is this grammar works?  In resume:  I lead a group of three developers and ...  → Led group of three developers and ...  Is this a past participle or  (it just omits subject)?  Is it just omits subject?  I was led group of three developers and ...  becomes  Led group of three developers and ...    And a example likes this in Google Play:  Added reading progress bar    Is this a telegram style?


Placing points on a curve generated using PGF plot

Using methods like  (and with more details ) can be useful when one tries to draw "free" curves. However, once a free curve is obtained it can be very useful to access arbitrary points on it. Unfortunately, the following naive approach is useless:  \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}   \draw[->] (-2,0) -- (2,0);   \draw[->] (0,-2) -- (0,2);    \draw[thick,mark=ball] plot [smooth,tension=1.5] coordinates{(1,1) (1.4,0.5) (0.4,-0.2) (0.6,-0.2) (0.2,-1.4) (-0.5,-1.1) (-1,-1.6) (-1.4,0.4)}   node[pos=0.5]{A} node[pos=0.9]{B}; \end{tikzpicture} \end{document}   since it yields the following:    So what is the right way to specify points on a curve generated as above?


Using Newton's method calculate $ \frac{1}{\sqrt{a}} $ without division

Suggest algorithm for the numerical calculation $ \frac{1}{\sqrt{a}} \ a > 0 $ without division, use Newton's method.  My idea is:  $$ \frac{1}{\sqrt{a}} = (\sqrt{a})^{-1} = a^{-\frac{1}{2}}$$ $$ x = a^{-\frac{1}{2}} \Rightarrow f(x)=x^2 - a^{-1}$$ And next step is calulate $ f'(x)=2x $, but after substitution I got: $$ x_{n+1} = \frac{x_n^2+a^{-1}}{2x_n}$$ And know I still have divion, I guess. Maybe you've better idea on this task?


Is voltage divider is a good option for supply voltage to an IC ?  I am working with a 555 timer, MAX232 ,an Inverter SN74LVC and with a 12V relay.  I heard that voltage devider is not a best way to step down 12v to 5V  for supply voltage.


I've read in several places around the Student Loans repayment policies and I see a lot of forgiveness perks for having made more than 125, or 300 payments.  I am currently on the IBR repayment plan and I receive a monthly bill for $0.00.  Does this $0.00 count as a payment?  What about the payments greater than the amount due? If I made 300 payments of $1.00 each, would that constitute forgiveness?


Using \@-ified punctuation while using \frenchspacing

After reading  about spacing and punctuation, I was left wondering about an issue that didn't seem to be addressed: using \frenchspacing together with the modified punctuation \@., \@?, etc.  As far as I can tell visually, using \frenchspacing together with these commands works correctly (i.e., it seems like nothing breaks, and the extra space is suppressed as normal), but are there problems that can arise from doing so?   Moreover, when using \frenchspacing, "should" I still use \@. and its friends where it would ordinarily be necessary, in case someone wants to remove \frenchspacing later? Would accommodating (hypothetical) future editors in this way be "standard", "above and beyond the call of duty", or "crazy"?


The central limit theorem, What it means

For instance I have a hypothetical data like the one below  Month # Households  total revenue   Average revenue  Jan-15  113 51791   458.3274336 Feb-15  196 43819   223.5663265 Mar-15  207 85322   412.1835749 Apr-15  348 95057   273.1522989 May-15  152 18265   120.1644737 Jun-15  155 42235   272.483871 Jul-15  198 12005   60.63131313 Aug-15  246 44688   181.6585366 Sep-15  299 51006   170.5886288 Oct-15  197 54446   276.3756345 Nov-15  239 58685   245.5439331 Dec-15  326 33685   103.3282209 Jan-16  179 85471   477.4916201 Feb-16  137 33720   246.1313869 Mar-16  163 68143   418.0552147 Total   3155    778338  3939.682467   Now, the CLT suggests that because the sample size( # hh) is sufficiently high, the average revenue will have approx a normal distribution.  but, can we say that about the distribution of the overall average revenue? In that case, our sample size (which I think would now be the number of months) isn't sufficiently high so can we not approximate the distribution of average overall revenue to a normal distribution and use t-test kind of tests?


Difference between ArrayAdapter adapter and ArrayAdapter adapter?

If I use ArrayAdapter or ArrayAdapter<String>, it does not affect my code.  For example, if I write it like:  ArrayAdapter adapter = new ArrayAdapter(getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, values);   Instead of:  ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, values);   Are these two things different? What is the purpose of <String> here?   I have searched the web and only knew that <String> shows something like collection?! Not sure.  I am a newbie in Android. Please help.


How does substitution for limits exactly work?   I see often answers that use the substitution $t=\frac1x$, then changing $x\rightarrow\infty$ to  $t\rightarrow0^+$.  I have seen , this appears to solve my question in the finite case. How does it work when going to infinty?   Books I'm using don't cover substitutions, but they seem very useful.


How to use a custom font in Puppeteer running on an ubuntu server?

I am trying to push one of my projects to production on a digital ocean Ubuntu droplet. I installed Source Sans Pro as a font next to a default font that was already installed called 'dejavu'. . I already rebuild the cache with: fc-cache -f -v When I run the command fc-list, I can cleary see that Source Sans Pro is installed (I assume):  After I cleared the cache I also restarted the app with pm2 restart app.js and sudo service nginx restart to make sure the changes had effect. I use Handlebar.js and Puppeteer to generate an invoice. In that template I use the following code to use this custom font: <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <style>     body {       font-family: 'SourceSansPro';       font-stretch: normal;     }   </style> </head>  Anyway, when I generate the invoice, for some reason the pre-installed font is the one that gets rendered:  What do I need to do to use SourceSansPro instead of the already installed dejavu font?


I've encountered different usages of preposition + Home and I want to learn which of them are correct.  Some examples:     Back home   Back at home   Back to home


Alternatives to chkrootkit for root kit checking?

I am currently using  to check for rootkits on my MacBook. Does anyone know of a more efficient piece of software to run rootkit checks on MacBooks and macOS?


Is it ok for a cast iron skillet to have small visible pores on their surface?

I just got my first cast iron skillet, it's brand new pre-seasoned. While I know cast iron is generally porous, I was surprised to see actual visible pores in there. Is it normal for cast iron cookware to have these sort of pores?


Let $u=u(x)=x^2+x$, $v=v(x)=x^3+x$ be two elements of $k[x]$, $k$ is a field of characteristic zero.  Is $R=k[x^2+x,x^3+x]$ a UFD?  Remark: It is well-known that $k[x^2,x^3]$ is not a UFD, since $x^2x^2x^2=x^3x^3$ are two different decompositions of $x^6$ to irreducibles. Also see  slightly similar question. I do not know if $R$ is integrally closed (in its field of fractions $F(R)=k(x^2+x,x^3+x)$)? Thank you very much!


Let $M$ be a  (finite dimension) and a $d:M\times M\mapsto \mathbb{R}^+$  on $M$.  Does this define a Riemannian manifold $(M, g)$? Is it possible to derive a metric tensor $g$ from the metric $d$?  I don't care about the pathologies, let's say that you have geodesic completeness or any kind of regularities you want on $M$ and $d$.  Just for motivational background: it is well known how to get a metric on a Riemannian manifold. My question is the other way around.


With no result after googling about it, I'm trying to figure it out if the new MSI PS42 8RB-035 is fully compatible with Ubuntu. Is there someone running Linux on the machine who could give me a feedback ?  Here is the spec :  or   To complete my question, it's not about how to empirically know about ubuntu compatibility in general but how to know cutting edge hardware compatibility where there is no information yet, precisely on the machine I gave in exemple.


How can I run an application with a GUI as admin from a non-admin user session?

I defined 2 user accounts:   one with admin privilege (with sudo right) => lets call it adminuser. a 2nd one without any privilege => lets call it normaluser and I configure the autologin on this 2nd user normaluser.    So when I open a normaluser session and want to run an application with admin privilege,  I open a terminal Ctrl+Alt+T and:   su adminuser sudo anyapplication ...   It works fine, without having to quit the normaluser session (no need to open a adminuser session).    But what should I do if the application needs to run with a GUI (Graphic User Interface) ? I though about that:  su adminuser gksu anyapplication ...   but I get  ** (gksu:9122): WARNING **: the connexion is closed No protocol specified No protocol specified (gksu:9122): Gtk-WARNING **: cannot open display: :0.0


What is the difference between !! and nothing?

Sometimes, I saw the following code:  if ( !!on_debugging )    which is the same as  if ( on_debugging )   I don't understand why these two !s are used. Is there any kind of difference?


I heard from some of experienced devs that you should not use sudo with pip install. What is wrong with that?


Cut part from video file from start position to end position with FFmpeg

I have a video file of 30 minutes, but I want to extract a video from 00:09:23 to 00:25:33.   I can define the startposition with -ss, but I couldn't find one for the end position. Any help please?


Let $G$ be a finite group of even order. Prove that there exists $a \in G$ of order $2$.

Let $G$ be a finite group of even order. Prove that there exists an element $a \in G$ of order $2$.  My attempt:   Since the order of $a$ is even, $o(a)$ = the least positive integer $n$ such that $a^{2n}$=e.  Let $o(a)= 2n$  $a^{2n} = (a^2)^n = a^n = e$


I'd like to give users a certain amount of traffic. Let's say user A gets 1 GB and user B get 5 GB.  I have a great script which does log all this info, however this script is called when the user disconnects (client-disconnect).  Now, my problem is the following: what if user A uses up 1 GB of data and simply never disconnects? He would be able to use thousands of GB's. Is there any way run a specific script periodically within OpenVPN (so no crontab, since OpenVPN passes environment variables).


I stumbled across a relatively simple FM radio transmitter online.    Credit:   I wanted to understand how it works (it is called "super simple" on the website), but several hours I have nothing but a vague understanding.   I believe R2, L1, C3 form an oscillator, and then the transistor Q1 is used to modulate the signal. C1 would just be used to remove any DC offset. However, this leaves R1, C2, C4, C5, and R3 and,  for these components,  I have no clue what they do.   Could someone please explain how this "super simple" transmitter works?


$g\circ f$ is Surjective and $g$ is Injective then Prove that $f$ is surjective

Let $f : A \to B$ and $g : B \to C$ be functions such that $g\circ f: A \to C$ is a surjection and $g$ is an injection , Then prove that $f$ is a surjection.  Since $g$ is a function $\forall y \in B$ we have $$g(y)=z \tag{1}$$ for some $z \in C$  Since $g\circ f$ is a surjection $\forall z \in C \exists x \in A$ such that $$g\circ f(x)=z$$ that is  $$g(f(x))=z \tag{2}$$  from $(1)$ and $(2)$ we have  $$g(y)=g(f(x))$$ and since $g$ is an injection we get  $$f(x)=y$$ so $f$ is surjective.  Is my proof correct?


Is there more information on what Yoda did on Dagobah?

His  and  give some details on his housing situation and how he helped out a couple surviving Jedi, but is there any story or series of stories that better explain the hardships of his exile? Like how he kept sheltered after his lifeboat fell apart and then eventually built the house we see if the films, or how he figured out which plants/creatures were safe to eat and which were poisonous. Or even how he specifically dealt with the inner-conflict (and possible guilt) of the downfall of the Jedi Order. What about after Luke left to fight Vader? Did business simply return to usual for him?  There is  and subsequent answers which I first considered mine to be a dupe of, but they all seem silly and appear to not fully address the question in favor of nailing the perfect Yoda-ese. Plus it's over a year old and something new might have come out since then.  I'd prefer anything that explains it from Yoda's POV.  Please link any shops that sell whatever (if any) materials on this subject, as this is something that I would actually like to read about first hand.


How to decrease the counter in tikz foreach loop

I have the following code:  \documentclass[11pt]{article} \usepackage[a4paper]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance = 0.5cm, auto] \node (0) {Block 0}; \node (1) [below= of 0.south] {Block 1}; \node (2) [below= of 1.south] {Block 2}; \end{tikzpicture} \end{document}   It prints this:    I tried to do the same with pgf loop, but don't know how to decrease the counter:  \foreach \x in {0,...,2} {   \ifnum\x=0\relax       \node (\x) {Block \x};   \else       %\prev=\x - 1 <- ???       \node (\x) [below= of \prev.south] {Block \x};   \fi }


how can I upgrade wsp with compatibility mode

I have an wsp in Sharepoint2007 ,and I need to used in SharePoint2010. How can I upgrade the solution. beast regards


"Bike Factory" or "Bikes Factory" title is more usual?

In Lithuanian language we usually say in plural "Bikes Factory". But I have checked by Google results count that there it is more usual in English to use the title "Bike Factory" instead of plural "Bikes Factory". Am I right? Thank you!


I have this script, which changes NVIDIA-SETTINGS vibrance, when certain application/process is launched (in my case Counter-Strike:Global Offensive game)  Script:  #!/bin/bash  on="1023" off="0" dv="0"   # RESET sleep 10 log "RESET" nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"  while true; do #daemon mode dv=`nvidia-settings -q "[gpu:0]/DigitalVibrance[DFP-0]" -t`   if pgrep -l csgo | grep csgo_linux   then #  log "Process csgo_linux found"     if [ $dv -eq $off ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$on"     fi   else # No process found     if [ $dv -eq $on ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"     fi   fi    if [ $dv -eq $on ]; then   sleep 5   else   sleep 1   fi  done   What is wrong with this script, why it gives me these errors?  622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected 622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected 622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected 622 csgo_linux64 /home/matas/Desktop/vib-gui.sh: line 18: [: -eq: unary operator expected /home/matas/Desktop/vib-gui.sh: line 28: [: -eq: unary operator expected   EDIT:  #!/bin/bash  on="1023" off="0" dv="0"   # RESET sleep 10 nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"  while true; do #daemon mode dv=`nvidia-settings -q "[gpu:0]/DigitalVibrance[DFP-0]" -t`   if pgrep -l csgo | grep csgo_linux   then #  log "Process csgo_linux found"     if [ "$dv -eq $off" ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$on"     fi   else # No process found     if [ "$dv" -eq "$on" ]; then       nvidia-settings -a "[gpu:0]/DigitalVibrance[DFP-0]=$off"     fi   fi    if [ "$dv -eq $on" ]; then   sleep 5   else   sleep 1   fi  done


Can an electron inside an atom annihilate?

We know that in QFT, all particles are being created and annihilated, and because of the conservation laws, on average the number of particles remains constant.  Suppose we have an electron in an atom. Is it possible that this electron gets annihilated with a created positron, and the created electron paired with the positron takes its place? In other words, is it possible that the electron inside an atom gets destroyed and supplemented by another electron? In this case, does this mean that the position of the electron in the atom suddenly changes?


How to derive completeness relation in quantum field theory with a Lorentz invariant measure?

$\bullet$ 1. For the one-particle states, the completeness relation is given in Peskin and Schroeder, $$(\mathbb{1})_{1-particle}=\int\frac{d^3\textbf{p}}{(2\pi)^{3}}|\textbf{p}\rangle\frac{1}{2E_\textbf{p}}\langle\textbf{p}|$$ How does one derive this?   $\bullet$ 2. In expanding a general Fock state $|\Psi\rangle$ as $|\Psi\rangle=\mathbb{1}|\Psi\rangle$ can we approximate the identity operator as $$\mathbb{1}\approx(\mathbb{1})_{1-particle}?$$ If yes, when?  $\bullet$ 3. If not, how does one derive similar completeness relations for 2-particle states $|\textbf{p}_1,\textbf{p}_2\rangle$ (or in general, for $N$-particle states $|\textbf{p}_1,\textbf{p}_2...|\textbf{p}_N\rangle$)?


How to get around Windows 10 Upgrade Assistant stuck at 99%

(I know there are threads on this, but the site won't let me comment on them and respond to the answers cited there which don't work for me)  I have:   turned off Windows Updates (although it is up to date on Windows 7) turned off anti-virus and other security tools removed all external devices other than mouse   I have 100s of GB of free space.  I'm now on my 4th install attempt. It redownloaded each time - just as well I have unlimited downloads because it would be very expensive otherwise. It sits on 99% for five hours or so and then reboots or shuts down the machine. When I restart, it's as if the WUA had never run before.


Banach-Tarski theorem without axiom of choice

Is it possible to prove the infamous Banach-Tarski theorem without using the Axiom of Choice?  I have never seen a proof which refutes this claim.


What is wrong with the round function in Python 3.6.3? I tested the code below:  a = 0.5 b = 0.5000001 print (round(a),round(b))   ..and get result as  0 1   So rounding 0.5 -> 0 but 0.500001 -> 1. Should both variables get value of 1?


Is project more Leaflet or OpenLayers or Map Server friendly?

I have several tables in a database on PostGIS.  I want to create a website where the users can log-in, show the layers they want and filter the elements of the layers based on the fields of the layers.  I want to create a very friendly interface for the users to filter the layers. I mean just boxes to check and limits of interval to set.  Based on this description, I would say that OpenLayers is better but on the other hand, the numerous community around Leaflet makes me think that the support is better with Leaflet.  Moreover, I just started learning HTML/CSS and I know barely nothing about JavaScript but learning is not trouble for me. I love it and I will need to improve my web development skills anyway (for another project).  I have seen  but it dates from 3 years ago at least and I am wondering if Leaflet hasn't solved its cons. For example OpenStreetMap changed from OpenLayers to Leaflet.


Finding radius of convergence $\sum _{n=0}^{}(2+(-1)^n)^nz^n$

1) $\sum _{n=0}^{}(2+(-1)^n)^nz^n$  2) $\sum _{n=0}^{}n!z^n$  3) $\sum _{n=1}^{}\frac{1}{n^2}(\sqrt{ n^2+n}-\sqrt{n^2+1})^nz^n$  Hello, I struggle to show the radius of convergence for the above functions. I began with the second one and came to the conclusion that the radius of convergence is $0$ but I'm not sure if that's correct. I would appreciate it if you could help me with the other ones!


How to solve the Thread-Exception error in my project

I wrote a simple code to provide a mini system for a game ticket reservation and while running my project i got some errors in the following function as shown below in the code   Code:   public void reverseTicket(int seatNum,int gameCode,int categ,int price)  {     checkseat(seatNum);     for(int i=0;i<=seat.counter;i++)     {     if(set[seat.counter].available==true)     {       gameCode=gameCode;      set[seat.counter].number=seatNum;      set[seat.counter].category=categ;      set[seat.counter].price=price;         seat.counter++;         break;      }     else     {         System.out.println("is seat number is full");        }       }  }     public void checkseat(int num){  for(int i=0;i< set.length;i++)  {      if(set[i].number==num)      {          System.out.println("Seat is reserved");          set[i].available=false;          break;      }      }  }   the errors appeared:   Exception in thread "main" java.lang.NullPointerException at sports.game.tickt.fans.checkseat(SportsGameTickt.java:199) at sports.game.tickt.fans.reverseTicket(SportsGameTickt.java:170)   How can I fix that please?


How to disable the single view for a custom post type?

I created a custom post type:  register_post_type('sample_post_type',array(     'labels' => array(         'name' => _x('Sample Posts', 'post type general name'),         'singular_name' => _x('Sample Post', 'post type singular name')     ),     'public' => true,     'show_in_nav_menus' => false,     'exclude_from_search' => true ));   How can i disable the single post view for this specific post type? Displaying a simple 404 is fine, or redirecting to the homepage. This is inside a plugin, so i can't create a single-sample_post_type.php file to setup an empty page.


I saw somebody with a Python gold badge but can't dig up where now... This badge isn't listed on Stack Overflow ().  Where is the reference?


Add an answer to the question with many existing answers already

Tried to add an answer to  via ios-app, but tired to reach "add an answer" button by scrolling down.   Is it possible to add an answer without scrolling over all existing answers via ios-app?   On the web I need to scroll only answers on the first page to reach desired button.


Problem with the number of the elements of a set and its proper subset

Is it possible that "a set" & it’s "proper subset" have same number of elements? Example?


In how many ways can you choose $k$ numbers out of $\{1,2,3,\dots,n\}$ so none of them is consecutive?

I am a newbie in combinatorics and still don't have enough tools to handle this kind of problems.  Assuming I have a set of integers: $ \{1,2,3,4,\dots,n\} $  In how many ways, can I choose $k$ numbers out of those $n$, such that none of them are consecutive?  For instance, for the following set $ \{1,2,3,4,5\} $  For $ k=3 $ I have only 1 option: $\{1,3,5\}$  My purpose is first of all to understand the way you would think about this  problem, not necessarily the solution itself (I have the final answer for it).  Thanks.


define different font depending on the compiler

I am writing a class file and want to use fontspec and unicode-math if the compiler is luatex or xetex. If the compiler is pdftex I would like to define default fonts like cmr and phv instead. I am trying to use \sys_if_engine* in the cls-file but getting the error: sys not defined or somethins like that. Can I get around this?


Valid alternative to Box Tidwell method for Linear Regression

I am building a Logistic Regression model (in sklearn) and want to verify that the assumption regarding the linearity between X and the logit function is correct. I am using Python so am looking for an alternative to Box Tidwell (because coding this up doesn't come as easy as in SPSS as far as I am aware). I have devised what I think is an appropriate alternative but I wanted to double check that I am correct in this way of thinking. What I have done is: Built my model and fitted it to some training data Sampled 100 evenly spaced points in between the min and max of my independent variable X and calculated the probability of these points predicted by my model (using the predict_proba function) Plotting the sampled X points against the logit of the probability and observed that there is a linear relationship (note that predict_proba does return the probability of the samples belonging to each class so I just picked one of the classes) Doing this makes me believe that I have not violated the assumption but am I unknowingly already assuming linearity in this method? Is this method valid? Thanks! EDIT: I know this type of question has been asked a lot. However, they all go with the Box Tidwell method (or in a few cases ANOVA) which is something I want to try and avoid. So I just wanted to check if the method I used was valid :)


The group $G$ has order 56. Show that it contains normal Sylow p-subgroup.

I'm new at this topic, so I'm not sure about whether is my solution acceptable or not. Could you check it?  By Sylow theorem there exist $|P|=7$ and $|Q|=8$. Sylow $p$-subgroup is normal iff it is unique. Denote by $n_p$ amount of different Sylow $p$-subgroups. Suppose $n_i \neq 1$ for $i=2,7$. Since $|G|=n_p \cdot N_G(P)$ and $n_p\equiv 1 \pmod{p}$, we have that $n_7=8$ and $n_2=7$. So there are $8$ conjugates of $P$ which intersect in identity. Thus there are $(7-1)\cdot 8=48$ elements of order $7$ which can't be elements of Sylow 2-subgroups. There left $8$ elements which are obviously not enough to construct $7$ different Sylow 2-subgroups of order $8$. We've got contradiction.


Can alpha, beta or gamma radiations emitted by a radioactive substance be controlled?

Just saw this question in a school class 10 exam. Google search did not yield useful results. Can anyone please explain the answer here?


URL Alias not working in Apache with Redmine

This is a follow-up to my original post  because I got no answer there. The problem is that the request is being routed to Redmine despite the fact that Apache has an Alias for it. Anybody have any solutions?


Do you know a good software to download all PDF links in a web page??  Operating system is Windows 7.


What happens to a virtual function when assigning a subclass to its superclass?

Say I have class B that derives from class A. If B overrides a virtual method f of class A, what exactly happens with this virtual method when I assign an instance of class B into an instance of class A?  Most basic example:  #include <stdio.h>  class A {   public:     virtual void f()     {       printf("I am A\n");     } };  class B : public A {   public:     virtual void f()     {       printf("I am B\n");     } };  int main() {   // Instance of B:   B b;   b.f();    // Reference to A:   A& a_ref = b;   a_ref.f();    // Assignment:   A a = b;   a.f();    return 0; }   Output:  [windel@hoefnix]$ g++ wtf.cpp [windel@hoefnix]$ ./a.out  I am B I am B I am A   When using a reference, all is going as expected, but with a cast, I was put on the wrong foot here.


Downloading older versions of OSX from a store

I am having an old Mac Pro (I think it is mid or late 2007), which is actually not capable of running latest OS X nor latest Xcode... Still, it is pretty much fast ( dual core 2.66 GHz, 8 GB ram, 400GB hard-disk ...) for some other tasks. For example, it is perfect for running Android Studio on it...  But, currently I don't have an OS X installed on it. So I am trying to make a bootable USB with ideally OSX Yosemite installed on it. But there is no Yosemite available to download anymore (nor for example Mavericks).   I have found  and there is a statement that if we have a paid apple developer account, we will be able to download older OS X versions. Still, even if I have a paid developer account for iOS development, I can't find nothing except Yosemite updates and combo updates.   Also I have tried to install Lion which coming along with Mac, but that didn't worked. I get message saying:     Item temporarily unavailable   So, currently, I can't get this machine running anyhow.  Is there are way to download a Yosemite or Mavericks from a Store ? I don't know if the answers from above are outdated, or this is not possible ?


How to split strings into text and number?

I'd like to split strings like these  'foofo21' 'bar432' 'foobar12345'   into  ['foofo', '21'] ['bar', '432'] ['foobar', '12345']   Does somebody know an easy and simple way to do this in python?


Why can't $ i\hbar\frac{\partial}{\partial t}$ be considered the Hamiltonian operator?

In the time-dependent Schrodinger equation, $ H\Psi = i\hbar\frac{\partial}{\partial t}\Psi,$  the Hamiltonian operator is given by  $$\displaystyle H = -\frac{\hbar^2}{2m}\nabla^2+V.$$  Why can't we consider $\displaystyle i\hbar\frac{\partial}{\partial t}$ as an operator for the Hamiltonian as well? My answer (which I am not sure about) is the following:   $\displaystyle H\Psi = i\hbar\frac{\partial}{\partial t}\Psi$ is not an equation for defining $H$. This situation is similar to $\displaystyle F=ma$. Newton's second law is not an equation for defining $F$; $F$ must be provided independently.   Is my reasoning (and the analogy) correct, or is the answer deeper than that?


Is it true that if $X$ is connected, then for every nonempty proper subset $A$ of $X$, we have $\mathbf{Bd} \ne \emptyset$? Does the converse hold?  I start by trying to understand what $\mathbf{Bd}$ means in "formal terms" (i.e. $\bar{A} \cap \overline{X-A}$ is the 'boundary' of $A \in X$)?  This means I'm supposed to figure out if the boundary of subset of a connected space is empty or not, right? I think that if a set is connected then it contains no partition into two sets, so there would exist points that are both in $A$ and in the complement of $A$ in $X$. This would be an informal definition of a boundary. (A boundary contains points in a set $A$ and points outside of it, right?)   What I mean is, if $X$ is connected, and $A \subset X$ is connected, then $A$ could have a boundary which means that technically, $X$ cannot be partitioned into $A$ and $A$-complement without making the boundary of $A$ an empty set.  Right?


How do I prove this method of determining the sign for acute or obtuse angle bisector in the angle bisector formula works?

The formula for finding the angular bisectors of two lines $ax+by+c=0$ and $px+qy+r=0$ is $$\frac{ax+by+c}{\sqrt{a^2+b^2}} = \pm\frac{px+qy+r}{\sqrt{p^2+q^2}}$$ I understand the proof of this formula but I do not understand how to determine which sign is for acute bisector and which one for obtuse. I can find the angle between a bisector and a line, and if it comes less than $45^\circ$ then it is acute bisector. But that is a lengthy method and involves calculation. My book says, if $ap+bq$ is positive then the negative sign in the formula is for acute bisector. I want a proof of this method. Edit: Using the method for finding the position of two points with respect to a line is okay for the proof.


Use of plurals for singular organisations

In spoken and written British English (perhaps more commonly the former), people tend to use plurals for singular organisations. For instance, "Liverpool are on top of the table", or "The Treasury are aware of the severity of the economic crisis".  Is this correct English? Or merely colloquial and local to the UK and Ireland?


How to fix a nullPointerException in the map-object without destroying the onMapReady activity

My app should display a map in the first fragment. The app is organised by a Navigation Drawer. The map get's displayed without a problem, BUT it doesn't show the default zoom and location I provided.  The first error I got while creating the app was a NullPointerException. I know how to fix it, so I said that my map-fragment (which is mapFragment) is not null. The app now started working, but the code I wrote in my method onMapReady as well as the Button to get the current location and move the camera to this specific location didn't show/didn't work.  I also tried changing the code for the map but I always ended up in the same spot. If I don't write map!=null I get a NullPointerException. If I do write it, the app doesn't zoom in properly to the specific location.  In the Mainactivity:  @Override protected void onCreate(Bundle savedInstanceState) {   super.onCreate(savedInstanceState);   setContentView(R.layout.activity_main);   SupportMapFragment mapFragment = (SupportMapFragment)   getSupportFragmentManager()           .findFragmentById(R.id.mapFragment);   if(mapFragment != null) {       mapFragment.getMapAsync(this);   } }   this is were I have to prevent the NullPointerException (mapFragment)    Here I set the default Location and zoom, which doesn't get applied to the map (while having the mapFragment!= null):  @Override public void onMapReady(GoogleMap googleMap) {      mMap = googleMap;      if(ContextCompat.checkSelfPermission(this,         Manifest.permission.ACCESS_FINE_LOCATION) ==         PackageManager.PERMISSION_GRANTED)     {         buildGoogleApiClient();          mMap.setMyLocationEnabled(true);     }      LatLng Luxembourg = new LatLng(49.611622, 6.131935);     mMap.moveCamera(CameraUpdateFactory.newLatLngZoom     (Luxembourg, 14)); }     this is the method to retrieve the user's current location (which also doesn't work while having mapFragment!= null):  @Override public void onLocationChanged(Location location) {     lastLocation = location;      if(currentUserLocationMarker != null)     {         currentUserLocationMarker.remove();     }      LatLng latLng = new LatLng(location.getLatitude(),      location.getLongitude());      MarkerOptions markerOptions = new MarkerOptions();     markerOptions.position(latLng);     markerOptions.title("current user location");     markerOptions.icon(BitmapDescriptorFactory.defaultMarker     (BitmapDescriptorFactory.HUE_RED));      currentUserLocationMarker = mMap.addMarker(markerOptions);      mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));     mMap.animateCamera(CameraUpdateFactory.zoomBy(14));      if(googleApiClient != null)     {         LocationServices.FusedLocationApi.removeLocationUpdates         (googleApiClient, this);     } }     this is the mapFragment itself:  <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent"     xmlns:app="http://schemas.android.com/apk/res-auto">      <fragment         xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:tools="http://schemas.android.com/tools"         android:id="@+id/mapFragment"         android:name="com.google.android.gms.maps.SupportMapFragment"         android:layout_width="match_parent"         android:layout_height="match_parent"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toTopOf="parent"         tools:context="com.example.mapwithmarker.MapsMarkerActivity" /> </FrameLayout>     I expect the map to have the default location and zoom I provided as well as the button to move the map to the user's current location.


Hello I have generated XML content as string. But I have to convert string to XML data type.  String str = "<?xml version="1.0" encoding="utf-8"?><Message><Rc1>12343322</Rc1><Rc2>125145552</Rc2><Rc3>54682242</Rc3><Rc4>7777332287</Rc4></Message>"   How can I convert this string to xmldoc type?


Website disappeared suddenly from first page results

-Background- A new webpage that we created for a Hungarian venue site in NodeJS has its 'SSO' behaving oddly. It's online for about two-three-ish weeks at the moment. (iranytiszababolna.hu) The SEO analysis seems alright even when we put it through various analysis tools. -Now the problem- A few weeks ago the page came up on the first pages when we typed 'Tiszababolna' (Name of the city), but it doesn't anymore unless we also type other keywords such as 'Irány' (Let's go to...) We know that Indexing takes quite a bit of time to pick everything up. However, when we search just the city name on Google it doesn't even show up on ANY page. This is especially odd behavior considering it worked just fine not long ago. I'd like to clear this up as the client is concerned. :(


I can see notifications about my own suggested edits waiting review, but I don't see them in review queue

I'm editing some tags on Anime&Manga and whenever I do that, the review notification appears with the number of my edits currently waiting to be reviewed. Why show them to me if I can't do anything about them?


How to install y4pdf package in Tex Live on Windows XP?

I want to install y4pdf package to my Tex Live 2010 distribution. The package itself is consisting of the following files according to :   y4pdf.cfg y4pdf.dtx y4pdf.ins y4pdf.sty   Does anyone have experience where to put concrete files in order to make it work?


Can I use Stack Exchange to tell people about my new tool or technology

I have created some useful tools and I am willing to put all those tools on a website and let people use those tools and donate me money if they like it. These tools are related to web design and project management etc. But I don't have a budget for advertisement.  Now if I ask a dummy question on Stack Overflow (which I know only my tool can solve or my tool would be the choice) then will this be spam advertisement? Because this way I will reach the exact audience that I need and it will help them? I have not done this yet btw.  Please guide me as i am struggling with this scenario, and also tell me if there is anything wrong with the question and i will update it or change the tags etc. dont downvote. Thank you.


How to find all the links to a directory

When I stat a directory I get a listing that tell me there are 5 links to the directory.  stat dir   My question is how do I get information (names and locations) to all these 5 links?


Today just when I started installing a new copy of Windows 10 on my laptop I realised that I hadn't retrieved the windows product key from the hard disk.  I quickly took out the USB stick which I was using to install windows and forcibly shutdown my laptop using the power button.  Now I can't boot into Windows so I made an Ubuntu bootable usb stick to access the files from the hard disk but the following message comes up:  Error mounting /dev/sda4 at /media/ubuntu/Data: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999" "/dev/sda4" "/media/ubuntu/Data"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   What can I do in this situation? Is it possible to contact the manufacturer to get the product key?


Some of my Apps Icons are changing to a generic app icon, and I have no idea why. Tried to restart the system and nothing. 3 days ago i updated my Skype and then the icon is gone.


Is there a way to bypass resistance/immunity to fire damage?

I want to use fire-based spells for thematic reasons and a lot of things have immunity to it.   Is there a feat or class feature I could use to bypass/reduce those? For example, is there something that ignores fire resistance and reduces fire immunity to just resistance?   I know the easy way around it is just to pick another damage type spell but I really want to roleplay a pyromancer/firebender-type character.


how to use the pigeon hole principle on a graph problem?

I have this given problem:  In a class there is 6 students,every 2 students of 6 know each other in advance or they don't.  Show that there is 3 students that don't know each other in advance or that there is 3 that know each other in advance.  This problem looks simple but when i try to write a solution for it i'm confused if it's enough or not, here is my attempted:  Case (every two students know each other in advance):  Let $G=(V,E)$ be a graph with $|V|=6$ vertices ,to represent this case the number of edges in this graph should be $|E|=3$. By using the pigeon hole principle we want to place $|V|=6$ pigeons(vertices) in $|E|=3$ holes(edges) where at each hole there is exactly 2 pigeons.  if we choose a pigeon(vertex) $u\in{V}$ at hole $a\in{E}$ then this ensures that there is 3 other vertices in different holes that are unreachable from $u$.  Is this solution correct or even enough? for the second case i'm planning to use the same reasoning but I plan to let the vertices be the holes ,and edges for the pigeons.


I'm trying to select a picture from gallery , get bitmap of that picture and encode that bitmap into base64. But I get this error:   Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference  Here is what I've done :   private Bitmap bitmap;  private String encodedbitmap;   ...  Intent intent = new Intent(Intent.ACTION_PICK);     intent.setType("image/*");     startActivityForResult(intent, 100);  ...  @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {      if(requestCode==100 && resultCode==RESULT_OK ){          Uri selectedimg=data.getData();          new Encodeimg().execute();      }   ...   private class Encodeimg extends AsyncTask<Void,Void,Void>{     @Override     protected Void doInBackground(Void... params) {          bitmap=BitmapFactory.decodeFile(selectedimg.getPath());          ByteArrayOutputStream stream= new ByteArrayOutputStream();         bitmap.compress(Bitmap.CompressFormat.JPEG,100,stream);         byte[] bytes=stream.toByteArray();         encodedbitmap= Base64.encodeToString(bytes,0);         return null;     }   EDIT: I know what a NullPointerException is. I just don't understand why I get that error in this situation. Because I don't see a null object here.


How do I (or can I) SELECT DISTINCT on multiple columns?

I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to an active status.  So I'm thinking:  UPDATE sales SET status = 'ACTIVE' WHERE id IN (SELECT DISTINCT (saleprice, saledate), id, count(id)              FROM sales              HAVING count = 1)   But my brain hurts going any farther than that.


I want to know by an example how prices in stock market changes

Let us assume there is a listed company x. Currently it has 100 shares issued to trade in free float market. Current price of stock is let say 10. Now please let me know if I purchase one share of company x at the market price of 10. How it will effect the stock price. And please add and exemplify some other scenarios whichever you find good to explain more. For more information let say promoters of the company holds 100 shares with them like 50% of the company is with promoters and the other half is with people who invest or trade in that company. If I've missed to tell or assume any other vital info. needed please assume it yourself while mentioning it. Thank You


How to prove that a semilocal ring such that all of its localizations at any maximal ideal are Noetherian is a Noetherian ring?   For example, for the easier example, $\operatorname{Max}(R)=\{m_1,m_2\}$, and $R_{m_1}$ and $R_{m_2}$ are noetherian rings. I believe that the ring $R$ is Noetherian, but I don't know how to prove it.  Thanks in advance.


I have a WinForms application raising exceptions from code in an EventHandler (E.G. a Button click subscriber);  I have a try..catch block around the invocation of the ShowDialog of the Form;  The exception does not propagate to the try..catch block, but it just stops at the handler and the Form gets closed.  1) How can I propagate the exception to the block?  2) What is the best practice in these cases?  This is a new VS 2010 AddIn probject with a simple Tools menu entry added by the wizard:      Public Sub Exec(ByVal commandName As String, ByVal executeOption As vsCommandExecOption, ByRef varIn As Object, ByRef varOut As Object, ByRef handled As Boolean) Implements IDTCommandTarget.Exec         handled = False         If executeOption = vsCommandExecOption.vsCommandExecOptionDoDefault Then             If commandName = "MyAddin1.Connect.MyAddin1" Then                  Dim form1 = New Form1                  Try                     form1.ShowDialog()                 Catch ex As Exception                     MessageBox.Show(ex.Message)                 End Try                  handled = True                 Exit Sub             End If         End If     End Sub   The only content of the Form is a button with a static handler raising a "New Exception()".  When I click the button, the exception is not caught.


I had installed two operating systems in dual boot mode with a grub menu i.e windows and Ubuntu. Now i have lost the password to Ubuntu OS. If i reinstall windows, grub will not take it and there will be error. I can't see the partition on which Ubuntu was installed. I want to completely remove the Ubuntu and reinstall windows with entire capacity of my Hard Disc available to me with only one OS i.e Windows. Can you help?


Prove $\lim\limits_{n \to \infty}\frac{a^n}{n!}=0~~~(a>0).$

Problem Prove  $$\lim_{n \to \infty}\frac{a^n}{n!}=0~~~(a>0).$$ Proof Denote $x_n=\dfrac{a^n}{n!}$ where $n=1,2,\cdots.$Then $$\frac{x_{n+1}}{x_n}=\frac{a^{n+1}}{(n+1)!}\cdot \frac{n!}{a^n}=\frac{a}{n+1}\to 0~~~(n \to \infty)$$which implies the series $\sum\limits_{n=1}^{\infty} x_n$ is convergent, by the ratio test. It follows that $$\lim_{n \to \infty}x_n=0,$$which is just the necessary condition for the positive convergent series.


Cayley tables for two non-isomorphic groups of order 4.

Not sure how to make tables, but:  For a binary operation $*$, and set $\{e,a,b,c\}$, in the Cayley table, $a*a$ can be filled with either the identity or an element different from both $e$ and $a$. If in the table the place for $a*a$ is filled with $e$, then the rest of the table can be filled out in two different ways.  What are the two different ways?  Thanks


I do sudo cat /tmp/1 > /etc/udev/rules.d/69-libmtp.rules but I get   bash: /etc/udev/rules.d/69-libmtp.rules: Permission denied   System: Ubuntu 16.04 Linux kernel: 4.6


About divergence of $\sum_{n=2}^\infty \frac{1}{(\log n)^p}$

So I have a question like this-     Show that $$\sum_{n=2}^\infty \frac{1}{(\log n)^p}$$ diverges if $p>0$.   I have tried root test,ratio test etc with no help. We know that $n>\log n$ which gives $\frac{1}{(\log n)^p}>\frac{1}{ n^p}$ which does not help us because of the direction of inequality. I don't know how to proceed here and any help or hint would be very much appreciated!


Linear independence of the set of vectors

Let $\{(a_{ij},...,a_{in}) \in T^n \mid i = 1,...,s \le n\}$ be a set of vectors. Prove that if $$|a_{jj}| \gt \sum_{i=1, i\neq j}^s|a_{ij}|, \quad 1 \leq j \leq s$$ then the set is linearly independent.  My attempt: I was trying an example with $n=s=3$,  $|a_{11}| \gt $$\sum_{i=1, i\neq j}^{n=3}|a_{i1}|= |a_{21}|+|a_{31}|$   $|a_{22}| \gt $$\sum_{i=1, i\neq j}^{n=3}|a_{i1}|= |a_{12}|+|a_{32}|$  $|a_{33}| \gt $$\sum_{i=1, i\neq j}^{n=3}|a_{i1}|= |a_{13}|+|a_{23}|$  For the linear independence we would have to satisfy, that $x=y=z=0$  $$         \begin{pmatrix}         a_{11} & a_{12} & a_{13} \\         a_{21} & a_{22} & a_{23} \\         a_{31} & a_{32} & a_{33} \\         \end{pmatrix}           \begin{pmatrix}         x \\         y \\         z \\         \end{pmatrix} = \begin{pmatrix}         0 \\         0 \\         0 \\         \end{pmatrix} $$  But I just don't know what's next. Like the $|a_{jj}|$ are on the places where are pivots and if these elements are after Gauss elimination nonzero, then our given set in linearly independent. But I don't know how to prove it. Thanks for help.


If $a,b,c$ are positive real numbers, then prove that $[(1+a)(1+b)(1+c)]^7$>$7^7a^4b^4c^4$. I am stuck on this question and do not know how to proceed. Any hint or clue how I might tackle this question


Why is Santa Claus a man but Santa Maria a woman?

When it comes to cities and boats named after saints, it seems that "Santa" is always female and "San" is always male.  e.g. Male Saints: San Diego, San Francisco, San Antonio Female Saints: Santa Barbara, Santa Maria  So why isn't "Santa Claus" a woman like all the other "Santa"s?


What's the best way to version CSS and JS URLs?

As per Yahoo's much-ballyhooed , we serve up static content from a CDN using far-future cache expiration headers. Of course, we need to occasionally update these "static" files, so we currently add an infix version as part of the filename (based on the SHA1 sum of the file contents). Thus:  styles.min.css   Becomes:  styles.min.abcd1234.css   However, managing the versioned files can become tedious, and I was wondering if a GET argument notation might be cleaner and better:  styles.min.css?v=abcd1234   Which do you use, and why? Are there browser- or proxy/cache-related considerations that I should consider?


What is the convolution of $ t^m \ast t^n $ where m and n are general positive integers?

I want to work out a general form of the convolution $ t^m \ast t^n $. I started with:  $$ t^m \ast t^n = \int_0^t (t - \tau)^m \tau^n \ d \tau $$  Then using the binomial expansion:  $$ \int_0^t \tau^n(\sum_{k=0}^{m} \binom{m}{k}t^{m-k}(-\tau)^k) \ d \tau $$  Integration by parts - let $ u = \sum (...)$ and $ v' = \tau^n \ d\tau $ :  $$ \frac{\tau ^{n+1}}{n+1}(\sum_{k=0}^{m} \binom{m}{k}t^{m-k}(-\tau )^k) - \int \tau^n(\frac{\mathrm{d} }{\mathrm{d} \tau } (\sum_{k=0}^{m} \binom{m}{k}t^{m-k}(-\tau )^k) ) $$  But I am unsure on how to differentiate the sum with the binomial in it.


Why doesn't systemctl\ {restart,status}\ sshd\; work?

The output of the above command when passed through echo is:  # echo systemctl\ {restart,status}\ sshd\; systemctl restart sshd; systemctl status sshd;   Even if I paste the output to the terminal, the command works. But when I try to directly run the command, I get:  # systemctl\ {restart,status}\ sshd\; bash: systemctl restart sshd;: command not found...   I have two questions..   What exactly is this method of substitution and expansion called? (So that I can research it and learn more about it and how to use it properly).  What did I do wrong here? Why doesn't it work?


I'm new here and I don't know which ubuntu version is better for my netbook ASUS Eee PC 1015PX. The 32 or 64 bit version.  Procesor specs can be found   Thanks!


Are there any applications of elementary number theory to science?

I've taken a class on elementary number theory (for fun), but now I wonder: was it at all useful to learn number theory for my future career in physics?  More to the point, are there any applications of elementary number theory (the kind that would be taught in a first or second undergrad-level course) in the natural sciences (especially physics, but also chem, bio, or maybe geology)?


Error while using .equals() method on multi dimensional array java

if(NewItem.itemArray[i][3].equals(itemNO)) {      for (int x = 0; x < 4; x++)     {         NewItem.itemArray[i][x] = null; //Change all the values in the row to null     }   The compiler throws an exception when I try to run the program. What is wrong?  The following is the exception it shows.  Exception in thread "main" java.lang.NullPointerException     at DeleteItem.deleteItem(DeleteItem.java:34)     at EditItemDetails.editItem(EditItemDetails.java:25)     at CD_Universe.editItemDetailsActions(CD_Universe.java:84)     at CD_Universe.main(CD_Universe.java:109)


Why nuclear fusion deliver energy instead of taking?

In nuclear physics, when you break eg. a nucleus of Uranium, some neutrons are liberated, and the original atom degrades to a lighter element. The energy that was used to keep these subatomic particles together is liberated (strong interaction), and a small part of the mass is converted to energy (E=MC^2) so you get a lot of energy with a small amount of atoms.  So why nuclear fusion (the opposite operation) could even liberate MUCH more energy? I would naively expect it to take a lot of energy, not liberate it.  I'm not a physician nor a student, just interested in physics, and this has always been a mystery to me.   EDIT: actually, both of your answers are great and cristal-clear. That makes perfect sense and is exactly what I was looking for. I wish I could accept both answers, but the one with the graphic was a bit more complete. But thank you two!


How can I share a windows folder with my virtualbox ubuntu installation?

So I have a Windows folder, let's say F:\UShare . I want to use/mount that folder inside my VirtualBox Ubuntu installation.  It is still unclear to me what I have to do, even after reading .


Best performance evaluation measure for GARCH model?

I want to compare the performance of various volatility models like GARCH, eGARCH, and gjrGARCH from actual volatility (computed using high frequency data). I found three common performance evaluation measures used profoundly in literature, i.e. Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE). But I found conflicting results from the above three criteria, like I found RMSE is minimum for GARCH model, MAE is minimum for eGARCH model, and MAPE is minimum for gjrGARCH model.   I want to know which one is the best measure for evaluating performance and which results should I report? If all three are equally valid then how can I interpret the results? Is there any other way to compare the performance of various volatility models other than performance measures?


Let $A$ be a group, where $a^2=1$, a belongs to $A$. Prove that this group is commutative.

Let $A$ be a group, where $a^2=1$ and $a$ belongs to $A$. Prove that this group is commutative.  Thank you for help.


Is there a way to take a screenshot using Java and save it to some sort of image?

Simple as the title states: Can you use only Java commands to take a screenshot and save it?  Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?


First of all, I know that this question has already been answer, but I need a little help. My "problem" is that I need to give more space to my root partition. This is my GParted screenshot:


NullPointerException while sorting XML using JDOM

I have a String formatted as XML and trying to sort it. I thought of creating an XML file from String and then sort the xml file itself.  I am using  library to try to sort the XML. I have created a JDOM document from the string and am trying to use comparator based on attribute as key but am getting NullPointerException on comparing. Below is the code:  File xmlFile = new File(filePath);  SAXBuilder builder = new SAXBuilder(); org.jdom2.Document document = null; try {     document = (org.jdom2.Document) builder.build(xmlFile); } catch (JDOMException e1) {     System.out.println(Constants.JDOM_ERROR+e1.getLocalizedMessage()); } catch (IOException e1) {     System.out.println(Constants.IO_EXCEPTION+e1.getMessage()); }  org.jdom2.Element rootElement = document.detachRootElement(); List<org.jdom2.Element> children = new ArrayList<org.jdom2.Element>(rootElement.getChildren()); rootElement.removeContent();  Comparator<org.jdom2.Element> comparator = new Comparator<org.jdom2.Element>() {     public int compare(org.jdom2.Element o1, org.jdom2.Element o2) {         return o2.getAttributeValue(key).compareTo(o1.getAttributeValue(key));     } }; Collections.sort(children, comparator);  org.jdom2.Document newDocument = new org.jdom2.Document(rootElement); rootElement.addContent(children);  XMLOutputter xmlOutput = new XMLOutputter(); xmlOutput.setFormat(Format.getPrettyFormat()); try {     xmlOutput.output(newDocument, new FileWriter("sorted.xml")); } catch (IOException e) {     System.out.println(Constants.IO_EXCEPTION+e.getMessage()); }   This line throws the exception:  return o2.getAttributeValue(key).compareTo(o1.getAttributeValue(key));   Here is the stacktrace:  Exception in thread "main" java.lang.NullPointerException   at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351)   at java.util.TimSort.sort(TimSort.java:230)   at java.util.Arrays.sort(Arrays.java:1512)   at java.util.ArrayList.sort(ArrayList.java:1454)   at java.util.Collections.sort(Collections.java:175)   Am not able to understand whats wrong. Please help.


The full question is to solve $f(x)f(2x^2) = f(2x^3+x)$, prove there are at most one solution per degree of $f(x)$ and then find all the solutions. (Here $f(x)$ is assumed to be polynomial.)  So far I have proven that $(x^2+1)^n$ works for even degree polynomials, and I'm pretty near certain there are no odd solutions.  Is the following a valid argument for there only being at most 1 solution per degree? Let $K$ be the degree of $f(x)$ then $f(x)f(2x^2) = f(2x^3+x)$ produces $3k+1$ linearly independent equations with only $k+1$ independent variables. Therefore for any degree $K$ polynomial there can be at most 1 solution.  Finally, is there any elegant way to prove that no odd solutions exist?


How to change background image of lock screen?

Where can I change the background image from the Windows 8 lockscreen?


How do you make a paragraph indent within a table?

I can manually try and indent, but it only works on the first 'paragraph' within the cell, and the \hspace won't even work with the second paragraph. Is there an easier way?  \ctable[     cap= A short caption,     caption= This is a longer caption,     ]{lp{2in}p{2in}}{}{\FL     title1 & title2 & title3\ML     label &     \hspace{1em} This is paragraph one.  This is paragraph one.\newline     \hspace{1em} This is paragraph two.  This is paragraph two.&     \hspace{1em} This is paragraph one.  This is paragraph one.\newline     \hspace{1em} This is paragraph two.  This is paragraph two.\NN     label2 &     \hspace{1em} This is paragraph one.  This is paragraph one.\newline     \hspace{1em} This is paragraph two.  This is paragraph two.&     \hspace{1em} This is paragraph one.  This is paragraph one.\newline     \hspace{1em} This is paragraph two.  This is paragraph two.\LL     }   As an alternative, I might try simulating a table with minipages, but after briefly trying that, it seems like this should be e


How is a quantum superposition different from a mixed state?

According to , if a system has $50\%$ chance to be in state $\left|\psi_1\right>$ and $50\%$ to be in state $\left|\psi_2\right>$, then this is a mixed state.  Now, consider the state  $$\left|\Psi\right>=\frac{\left|\psi_1\right>+\left|\psi_2\right>}{\sqrt{2}},$$ which is a superposition of the states $\left|\psi_1\right>$ and $\left|\psi_2\right>$. Let $\left|\psi_i\right>$ be eigenstates of the Hamiltonian operator. Then measurements of energy will give $50\%$ chance of it being $E_1$ and $50\%$ of being $E_2$. But this then corresponds to the definition above of mixed state! However, superposition is defined to be a pure state.  So, what is the mistake here? What is the real difference between mixed state and superposition of pure states?


What do all these things that a moderator can do mean?

Recently, I saw a bunch of images showing what a mod can do. I'm just wondering, what do the options mean?  For example, what's the difference between "destroy" and "delete" a user?  And what's annotate a user?  And how do you convert an answer to an edit?


Where can I find inexpensive or better yet free product images?

I am wanting to build a product catalog template that can take XML and import it through InDesign to automatically style text and place product photos. The problem is I don't have a product database of photos, descriptions or prices to work from. Does anyone have ideas on where I could go to find such content? I could write the text myself but at the very least I would like the photos to be sharp and professional.


I got my google play and google play services deleted from my rooted phone.I had moved all the apps on internal apps to my partitioned sd card,which got corrupted.Tried installing google play apk and services from other sites but they would not install. Phone model:Galaxy Y S5630  Need your help.


What is the correct way to handle "answer plagiarism"?

Example:   User A gives a not-great but working answer User A gets upvotes User A gets accepted answer User B gives the quantifiably best possible answer User B gets more upvotes User A edits answer to include answer B   Is this acceptable by the SE community? I can think of pros & cons for each.  How should this be handled?


I just upgraded to Ubuntu 19.04. I used to have 9 workspaces. In 19.04, on first boot, I only had two workspaces, but once I dragged a window from the first to the second workspace (initially empty) in Activities, a third workspace appeared, and once I dragged a window into the new third workspace a fourth workspace appeared, etc. So in this manner I was able to recover 9 workspaces.  However, after rebooting, now there are only two workspaces, and even if I place a window onto the second workspace, no third workspace appears.  How do I get more than two workspaces in 19.04?


What is the proper way to convert the generic type array and use it in java?

Food.java  public class Food { }    Animal.java  public class Animal<E> {     private E[] a = (E[]) new Object[5];       public E[] returnArray() {         return a;     }        public static void main(String[] args) {         Animal<Food> animal = new Animal<>();          Object[] objs = animal.returnArray();         Food[] fd = (Food[]) objs; // error happens here!         fd[0] = new Food();       } }   error message  Exception in thread "main" java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ltestsample.Food; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap'; [Ltestsample.Food; is in unnamed module of loader 'app')     at testsample.Animal.main(Animal.java:19)   error happens when I try to convert the generic type array, Food[] fd = (Food[]) objs, it seems fd and obj are both Food[] array, what's going wrong here.


I am getting below error while saving record. Record is saved but unable to redirect to detail page.     This page has an error. You might just need to refresh it. Error in   $A.getCallback() [Cannot read property 'fire' of undefined] Callback   failed: apex://CreateOpportunityController/ACTION$SaveOppRecord   Failing descriptor: {c:CreateOpportunity}   Below is lightning helper:  var saveAction = component.get("c.SaveOppRecord"); saveAction.setParams({     "oppRec": component.get("v.opportunityRec"),     "AccountId": component.get("v.accountId") }); saveAction.setCallback(this, function(response) {     var state = response.getState();     if (state === "SUCCESS") {         if(response.getReturnValue().startsWith('SUCCESS')) {             var self = this;             var toastEvent = $A.get("e.force:showToast");             toastEvent.setParams({                 "title": "Success!",                 "message": "The Opportunity record has been created successfully."             });             toastEvent.fire();             this.cancelOpportunity(component, event);          }     } }); $A.enqueueAction(saveAction);


Is there a simple, but tight lower bound for the error made when $\sum_{n=1}^{k}\frac{1}{n^2}$ is used to approximate $\frac{\pi^2}{6}$?

As a math-for-fun exercise, I've recently been seeking bounds for the error $R_k$ made when using $\sum_{n=1}^{k}\frac{1}{n^2}$ to estimate its beautiful sum $\frac{\pi^2}{6}$. Applying the Comparison Test for series multiple times, I derived the following estimates: $$\frac{1}{k+1}<\frac{\pi\coth(\pi)-1}{2}-\sum_{n=1}^{k}\frac{1}{n^2+1}<R_k<\ln\left(1+\frac{1}{k}\right)<\frac{1}{2k+2}+\frac{1}{2k}$$ The lower estimate $\frac{\pi\coth(\pi)-1}{2}-\sum_{n=1}^{k}\frac{1}{n^2+1}<R_k$, which I derived with WolframAlpha's help, is pretty useless. $\frac{1}{k+1}<R_k$ is good, but I want to improve it. Given how clean and tight the upper estimate $R_k<\ln\left(1+\frac{1}{k}\right)$ is, I figured I could find a similar lower estimate that's just as clean and tight. After thinking for a while, I came up empty handed. I can't seem to find a positive sequence $a_n$ lying between $\frac{1}{n^2+1}$ and $\frac{1}{n^2}$ for which $\sum_{n=1}^{k}a_n$ has a clean expression. Any ideas or hints? Edit: I'm not trying to prove the convergence of $\sum_{n=1}^{\infty}\frac{1}{n^2}$ nor any other series.


Creating a random string with A-Z and 0-9 in Java

As the title suggest I need to create a random, 17 characters long, ID. Something like "AJB53JHS232ERO0H1". The order of letters and numbers is also random. I thought of creating an array with letters A-Z and a 'check' variable that randoms to 1-2. And in a loop;  Randomize 'check' to 1-2. If (check == 1) then the character is a letter. Pick a random index from the letters array. else Pick a random number.   But I feel like there is an easier way of doing this. Is there?


Running "chmod -R 777 / " broke sudo; results in "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

I made a big mistake by running:  sudo chmod -R 777 /   After that, a problem appeared, which is that sudo won't work anymore. When I run sudo in any command this error appears:   sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set   And when I searched for the problem I figured out that some permissions are messed up in the /usr/bin/sudo file but I can no longer become root so I can change the permissions!


FPGA doesn't seem to work the way I imagined

A couple of years ago I read an interesting Wikipedia article about something called a "field-programmable gate array". The article made it sound like it's a box of logic gets which you can arbitrarily wire together to implement any kind of logic you want (but without needing thousands of discrete components).  Now, I had assumed this works something like a PROM. As in, you buy a die which has all the gates on it, with everything connected to everything, and then there's a glass window to the die, and you use one of those extremely expensive UV-laser writers to "burn" through the connections you don't want, resulting in the logic circuit you designed. (And maybe there's a version that's erasable too, like how CD-RW is somehow erasable.) Once you've "burned" your program into the chip, it behaves as if it were that actual combination of logic gates. (Because now it is that combination of logic gates!)  However, more recently I've been reading about this, and it appears this isn't how the technology works at all. A lot of recent articles talk about needing to send a "bitstream" to the FPGA at system power-up (and even the possibility of encrypting this bitstream to stop your competitors reading it). This makes it sound alarmingly like a FPGA isn't a hardware construct at all; it makes it sound like really it's just an ordinary microprocessor that's simulating your design in software.  In particular, that means a design programmed into an FPGA can never run any faster than the underlying microprocessor that's simulating it. Which kind of makes the entire endeavour sound... kinda pointless. I thought the whole point of an FPGA was to make custom logic that does stuff faster than you can do it in software. But all this "bitstream" stuff makes it sound like it is still software...  I'm a little confused here. How does an FPGA actually work?


Why do some people pronounce "singer" as "singGer"?

I teach English to elementary students in Korea.  One day, I noticed an African American female teacher pronounce the word,"singer" differently- "sinGer" , a strong G-sound. Is it common in America? Recently while watching CNN, I saw an basketball star pronounce this word the same way.  I just want to know whether it has to do with region, ethnicity, or etc.  I would appreciate if you could let me know. Thanks.


Why actionFunctions are not as fast as RemoteAction

Can anyone tell me why actionFunctions are not as fast as RemoteActions in Vf pages?


Prove that any finite subset of a linearly independent set is linearly independent

My problem: Prove that a set of vectors $S$ is linearly independent if and only if any finite subset of $S$ is linearly independent.  I tried like this:  Suppose S is LI.Then the vector $0$ cannot be expressed as a linear sum of all elements of $S$.  How it follows that a finite subset is also LI from this fact. I think $S$ can be finite or infinite.  This is a question from the book Linear Algebra - Friedberg et al.


I've been programming, writing articles and presentations on LaTeX for couple of years; and made few tutorials about starting working with latex, adjusting properties to write on Georgian, drawing 2D/3D images with tikz...  Now, I want to start working with its core, writing commands, adjusting styles, without relying (so much) on prewritten packages.  Can anyone advise, how and from where can I start?


Was asked by a new Ubuntu user - who also wants to learn about programming - what he could use to run BASIC code. He was working through a BASIC book before trying out Ubuntu, and he'd like to continue without having to switch back to Windows.  It looks like there are a few BASIC packages in the standard repositories, as well as projects like Mono which may include some kind of BASIC support.   What would be a good recommendation from the standard repositories - or from a deb package - for someone learning the basics of BASIC and new to Ubuntu?


How to Find the convergence of this sequence

how to find if this sequence converges or diverges. Please help I am having hard time to solve this.  (1+(1/n))^n


Infinitely generated subgroup of a finitely one (weird)

I'm solving this question in Hungerford's book:     8. Let $G$ be the multiplicative group generated by the real matrices $a=\begin{pmatrix}2&0\\0&1\end{pmatrix}$ and $b=\begin{pmatrix}1&1\\0&1\end{pmatrix}$. If $H$ is the set of all matrices in $G$ whose (main) diagonal entries are $1$, then $H$ is a subgroup that is not finitely generated.   I've already proved that $H$ is a subgroup of $G$ and every element of $H$ is of the form:   $$         \begin{pmatrix}          1 & x \\         0 & 1 \\         \end{pmatrix} $$  I thought this question really weird, $H$ is a subgroup of a group generated by $a$ and $b$ but $H$ itself can't be generated by $a$ or $b$, how can be possible?  My question is how to show $H$ is infinitely generated? I didn't find any good candidates to generate $H$.  Thanks in advance


I was recently speaking with a non-native English speaker and they asked me a question as to when we use the word 'the'.  EX: I will see you in the class vs I will see you in class. Is there a rule as to why the latter sounds more natural.


Different answer counts if there are deleted answers

At the left (site), it says 3 Answers (1 Accepted Answer + 2 self-deleted-answer). At the right (app), it says only 1 Answer; self-deleted answers are not visible.


Using superclass to initialise a subclass object java

SuperClass object = new SubClass();   Why use a superclass to instantiate a subclass object like above? Because the only way i learnt to instantiate an object is to:   SubClass object = new SubClass();   I'm learning java.


Closed unit disk homeomorphic to $\mathbb{R}^2$?

I've already shown the existence of a homeomorphism between the open unit disc and $\mathbb{R}^2$ and now I'm trying to work out whether the closed unit disc is homeomorphic to $\mathbb{R}^2$ or not. Clearly the only real difference is the fact it includes the points actually on the circle, but because the continuous, invertible, bijective map I defined for the open disc was $\dfrac{x}{1-|x|}$ this clearly is not defined for the points on the line.   Intuitively I'm thinking it's not possible to form a homeomorphism with the closed disk precisely because of these points on the circle but can't really form a decent argument. I was thinking along the lines of showing that the non-open, closed subset $\bar{D}(0,1) \backslash D(0,1)$ (which is just the set of points on the actual circle i.e the boundary/frontier of the closed disk) can't possibly bijectively map to a closed subset of $\mathbb{R}^2$ - which clearly would have to be the case in a homeomorphism.   Any advice would be greatly appreciated.


Let $(a_n)$ be a strictly increasing sequence of positive integers such that: $a_2 = 2$, $a_{mn} = a_m a_n$ for $m, n$ relatively prime.

Let $(a_n)$ be a strictly increasing sequence of positive integers such   that: $a_2 = 2$ and $a_{mn} = a_m a_n$ for $m, n$ relatively prime. Show that $a_n = n$, for every positive integer $n$.   This is a result apparently due to Paul Erdős, and  has a proof by induction.  I tried like this, $a_{10}=a_2a_5$. After this what we can do?    [Editor's comment] Possibly due to the apparent simplicity of the conditions it may be difficult to appreciate the subtleties of this question. If we try and construct a counterexample like $a_3=4$, $a_4=5$, $a_5=6$, then the requirements dictate $a_6=8$, $a_{10}=12$, $a_{15}=24$. At this point we realize that we have been speeding. For monotonicity forces $a_9\le 11$, and therefore $a_{18}\le22<a_{15}$, violating the requirements. It is not obvious why something similar ruins all the modifications to the sequence $a_n=n$. [/comment, JL]


How can I solve Unable to lock the administration directory (/var/lib/dpkg/)

I am really New to UBUNTU 14.04 and whenever I try to update or install anything I get this error:  sudo apt-get update [sudo] password for trojanfm:  E: Could not ge lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


We are on SQL Server 2008 R2 and have DBs compatibility level set to SQL 2000 or 2005.  What are differences in compatibility level across the versions ?  Are there any advantages changing it to 2008 or higher?


How do I make objects ignore certain Light sources?

I have a scene which has a spot light as the main light source. To get the scene as bright as I want, I have to set the value for the strength to be quite high, something like 5000. The problem is, some textures get too bright and start losing details.  My question is, is there any way, maybe through nodes, to make an object not being influenced by a certain light source?  Thanks in advance - Marten