I generated a grid with 300m spacing but the ids generated from top to bottom in sequential oder. How could I get in horizontal from left to right sequence.
I am using QGIS 3.2.0 on a Mac (and also have QGIS 2), and I have a fishnet grid (probably created in Arc) that comprises of nearly 2 million grid cells. As a result, every change I make to the attribute table takes hours, so I can't experiment as I would usually.  I need to label each grid cell such that the north-westernmost cell is "1", and the numbers proceed by rows, until the last number goes into the south-easternmost cell. Using the row-number doesn't work, as that's not how the table is sorted. I've done this before, but cannot remember how.
A student of mine has been self-studying some elementary number theory. She came by my office today and asked if I had any hints on how to prove the statement      If $m$ is odd then $\gcd(2^m-1,2^n+1)=1$.    It's been a while since I took number theory and I'm not sure what to do. She said she is learning about congruences, primitive roots, and power residues.  She has not taken any group theory. Can I install Kali tools on Ubuntu? Finding $\lim\limits_{x\to1^-}\Bigl(\prod\limits_{n=0}^{\infty}\Bigl(\frac{1+x^{n+1}}{1+x^n}\Bigr)^{x^n}\Bigr)$ Compute : $$L=\lim_{x\to 1^-} \left(\prod_{n=0}^{\infty} \left(\frac {1+x^{n+1}}{1+x^n}\right)^{x^n}\right)$$   My try:   Writing out the first few terms I noticed that the limit can be expressed as $$L=\lim_{x\to 1^-} \frac 12\left(\prod_{n=1}^{\infty} (1+x^n)^{x^{n-1} -x^n}\right)$$ $$L=\frac 12\lim_{x\to 1^-} \left(\prod_{n=1}^{\infty} (1+x^n)^{x^{n-1}}\right)^{1-x}$$  Converting to exponential form I get $$L=\frac 12 \exp {\left(\lim_{x\to 1^-} (1-x)\sum_{n=1}^{\infty} \left(x^{n-1}\ln(1+x^n)\right)\right)}$$  And got stuck here. I did try to use approximation $\ln x\sim x$ hereon to get final answer as $\frac {\sqrt e}{2}$ but I think it was improper to use approximation and hence I believe that the answer I got is flawed. I also noticed that the form I obtained is quite similar to be used for a Riemann Sum but I didn't get a way to tackle the problem using that way.  Can someone please help me with this problem.... Central limit theorem and the law of large numbers I have a very beginner's question regarding the Central Limit Theorem (CLT):  I am aware that the CLT states that a mean of i.i.d. random variables is approximately normal distributed (for $n \to \infty$, where $n$ is the index of the summands) or the standardized random variable would have a standard normal distribution.  Now the Law of Large Number states roughly speaking that the mean of i.i.d random variables converges (in probability or almost surely) to their expected value.  What I don't understand is: If, as the CLT states, the mean is approximately normally distributed, how then can it also converge to the expected value at the same time?   Convergence would imply for me that with time the probability that the mean takes a value which is not the expected value is almost zero, hence the distribution would not really be a normal but almost zero everywhere except at the expected value.  Any explanation is welcome. Setup Apache in Amazon AWS I tried to setup apache 2.2 in amazon aws using amazon ami. i did installed httpd and php and congirue http.conf to use /var/www/html.  Then put file index.html on that folder. But when i tried to use browser to browse my domain which is ec2-122-248-255-181.ap-southeast-1.compute.amazonaws.com, nothing was loaded.  I did start httpd by running apachectl start, and i can see it listening on port 80.  Does anybody know what is wrong? The multi-part identifier could not be bound Could someone please explain the role of the transistor in this circuit? I have a feeling it has to do with the LC circuit but I'm not sure and don't understand completely. The following is an image of the circuit (the transistor is n-type. It is used in lots of sensors to detect and generate ultrasonic waves. Windows Unable to Delete ._. File showing a collection of sets contain all closed sets Let $X$ be infinite set and $a \in X $. Let $$\mathscr{F} = \{ A \subset X: |A| \; \; finite \; \;, a \notin A \}$$  Then $\mathscr{F}$ is the set all of all closed sets for some topology $\mathcal{T} $ on $X$. Also, any two continuous maps $f,g: (X, \mathscr{T}) \to Y$ ( $Y$ is metric space) have the property that if $f(b) = g(b)$ for all $b \neq a $, then $f(a) = g(a)$.  In my notes my professor posted this theorem without proof, so I was wondering what is best way to proof this theorem. How to make different materials for different objects? When I change one material, it changes it on another object. Why and how do I fix it? is there some link between the objects?    Here is my blender file of Iron Man's faceplate.  Here is my whole screen with the main portion of the face selected. On the right, you can see the material, and I can tell you that that is the same as the eyes part: I use ubuntu to deal with daily job. Now I buy a new laptop, and I want to migrate my whole system(programs, packages, data, settings, etc) to the new machine.  I know I can copy my home folder to new machine and I will get (almost) all data and settings. But is there a safe way to copy the whole system? Or it's a bad idea? How to add custom C++ keywords to be recognized by Minted? I have defined several structures and types in a C++ project. I have to write some documentation for this code, and I use  to typeset my code.   I would like to be able to add some keywords to the minted database, so minted will also recognize these and give them the appropriate color. (I would like to have them colored in the same way a type, eg. double would be colored.) In either case, one coin flip resulted in a head and the other resulted in a tail. Why is {H,T} a different outcome than {T,H}? Is this simply how we've defined an "outcome" in probability?   My main problem with {H,T} being a different outcome than {T,H} is that we apply binomial coefficients (i.e. we count subsets of sets) in some common probability problems. But if we take {H,T} and {T,H} to be different outcomes, then our "sets" are ordered, but sets are by definition unordered...   I feel as though the fact that I'm confused about something so basic means that I am missing something fundamental. Any help or insight whatsoever is greatly appreciated! I've taken some stock photography of lots of clear bottles, and now want to remove the background (which is white-ish, because at a pinch I could leave it...) so that the bottle becomes transparent with highlighting.  My bottles are clear with different colored liquids with multiple refraction and reflection surfaces.  I am looking for a background color subtraction effect that will allow me to get to transparent (hopefully with some sort of effect/opacity slider).  Ideas that I can't pull off yet:   Combine layer with a color fill layer (keyed off the "transparent color") in some manner to produce some output that could be used as the starting point of a layer mask Same layer combination as above, but somehow translating "pure white" to transparency.   Notes for what doesn't work (Photoshop terminology):   "Color Range" and delete (fuzzy select, but not graded/alpha) - results in harsh lines and only leaves the pure white and dark highlights and shadow refractions/reflections Magic wand selections for the same reason "Background Eraser" because although it is able to only subtract a certain color and leave "the rest", it (like all tolerance based tools) eventually hits a colour slightly outside of the range that it just won't touch.   I'll add more if I can remember what I've found How to do the port forwarding from one ip to another ip in same network? I would like do some NAT in iptables. So that, all the packets coming to 192.168.12.87 and port 80 will be forwarded to 192.168.12.77 port 80.  How to do this with iptables?  Or   Any other ways to achieve the same? How can I update all Snap packages? I know that I can update a snap package using  sudo snap refresh &lt;package&gt;   But is there a way to update all snaps, like   sudo apt dist-upgrade For PhD applications, I have mentioned that I am interested in some research areas. Besides, I am thinking about mentioning some professors' names, so that it shows I have read their websites and I am not just sending out generic statements applicable to many schools.  But is it good to mention some professors' names in the statement of purpose, if I don't know them personally? In what cases is it good, and in what cases it isn't?  For example, is it good to only mention    those whose research directions are aligned with my research interests, or/and those whose books or notes I have heard of, or better, might have read some parts of, or/and those who are already established and famous (such as having certain titles), or/and those that are directing the PhD graduate programs, or/and those that are heads of the departments?    What will other professors who are not mentioned think? How will you do, if it were you? Looking for solo (one person) RPGs - do they exist? I am looking to find out if solo RPGs exist, and which you'd recommend.  I do not mean "one-on-one" 1 player + 1 GM games. I really mean "1 person."  Update: After receiving two (fine, up-voted) answers that indicate Choose Your Own Adventure solutions (which rocks with nostalgia), I should add that I'm not looking for simple linear decision tree gaming. A counterexample: I've got my own little creative-writing mini-game where I write out a story, but once every 5 sentences a series of dice-rolls forces my written sentence into something else, and I have to adapt as writer. Not really an RPG, but also non-linear. Two definitions of $\limsup$ Here are two equivalent definitions of $\limsup_{n\rightarrow\infty} a_n$:   Let $u_n=\sup\{a_n, a_{n+1}, a_{n+2},\ldots\}$. Then $$\limsup_{n\rightarrow\infty} a_n = \lim_{n\rightarrow\infty} u_n =    \lim_{n\rightarrow\infty}\left(\sup\{a_n,a_{n+1},\ldots\}\right)$$ Let $E$ be the set of all subsequential limits of $\{a_n\}$. Then $$\limsup_{n\rightarrow\infty} a_n = \sup E$$   I'm curious as to which one people usually learn first, or which one people find more intuitive. Baby Rudin only has the second definition, but doesn't mention the first as far as I know.  As far as intuition, I think of the second definition as "the biggest limit point." I'm not sure how to think of the first definition though. I can see that $u_n \ge u_{n+1}$ for all $n$, but I'm not sure how to interpret the limit of those $u_n$ conceptually.  Are there any other ways to conceptualize $\limsup$? What is better to have? A pokemon with higher IV but lower CP or vice versa? Me and my friends have encountered this situation many times. We need to decide which Pokemon to evolve. Take the following scenario:   Growlithe A: 20% more CP than Growlithe B. (898 instead of 743). Growlithe B: 26% more IV than Growlithe A. (87 instead of 69 in this case).   I didn't give more details about each Pokemon because I'd like a general answer that others can use.  Thank you kind folks!  P.S this is not a duplicate, since I understand what a higher IV interprets into.  Yes, a higher IV will define the MAX CP, but it's not the only thing to consider. A higher IV also means better chance of better moves for the evolved pokemon - and those are much more important than a high CP. Also consider that I have many Arcanines and I don't have the stardust to max them out (that is a different question).