How can I learn if an algorithm runs in O(n) time, or O(nlogn)?
Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?
Shapefile layer no longer editable (toggle edit option greyed out) in QGIS? The FAQ mentions bounty, but sometimes a question just doesn't really have a right answer:   No solution exists The question as written is unanswerable and unsalvageable There may be a technically correct answer, but the asker is unable to utilize it for some reason.   In these cases, a bounty, and more answers, won't really help. What is the appropriate etiquette in these cases? Should the question be closed? Left hanging? Problem statement  Prove that if $A$ is an uncountable set and $B$ is a countable set, then $A\setminus B$ must be uncountable.  What I think  The statement does not mention $A$ and $B$ relationship. I think there are two possibilities:   If $A \cap B = \emptyset $, then $A\setminus B$ is trivially uncountable If $A \cap B = B$, then $B \subset A$ and as a bijection can not be made between $A\setminus B$ and $\mathbb{N}$, $A\setminus B$ is uncountable.   And there is where I'm stuck. How can I prove that a bijecton can't be made?  TIA. $a+1,a-1$ invertible for nilpotent element Given a ring $R$ (with unity), prove that if $a \in R$ is nilpotent, then $a+1,a-1$ are both invertible.   Suppose $a^n=0$. Then $1=1-a^n=(1-a)(1+a+\ldots+a^{n-1})$, so $1-a$ is invertible.  If $n$ is odd we can use $1+a^n=(1+a)(1-a+\ldots+a^{n-1})$.  But what if $n$ is even? Description list with aligned descriptions is exactly what I'm looking for. I want my description environment to produce this:  Label is long   text  lab2            blalballalaa label3          possible second rule label four      hello world   Someone offered this:  \newenvironment{mydescription}[1]                                                   {\begin{list}{}%    {\renewcommand\makelabel[1]{##1:\hfill}%    \settowidth\labelwidth{\makelabel{#1}}%    \setlength\leftmargin{\labelwidth}    \addtolength\leftmargin{\labelsep}}}   {\end{list}}   Which works great (the parameter is the longest label), except I think the enumitem should be able to do this. Unfortunately, the documentation for it is extremely confusing to me. Could someone show me how to achieve the same result with enumitem? Calculating percentage of overlap between 2 features from 2 different layers using ArcGIS Desktop? I have two layers. Layer 1 has features that are property/parcels with area in acres. Layer 2 has features that are wetlands/bodies of water with area in acres. I want to calculate parcels that have for example 0% wetlands, 10% wetlands, 20% wetlands, 30% wetlands etc. to 100% wetlands.   How can I do this on ArcGIS Desktop?   Ideally, I want to find parcels/properties that have a limited number or a limited percentage of wetland coverage. Multiple Inheritance in java Why (and how) did using cat on binary files mess up the terminal? If I understand the cat manual correctly:       concatenate files and print on the standard output   cat will take files as argument and print them on standard output. What I don't get is if I use the command:    cat img.png &gt; copy.png   I will obtain 2 png files identical while if I just    cat img.png     I have all chance that my terminal get messed up and misinterpret what I type.     How's that possible?   Binary values are still binary data. Why it does not simply shows a series of 0 and 1 or the interpretation of those binary data in ASCII or whatever the encoding in terminal is?   Is this behavior also possible by cating a text file containing strange characters?   Should a mechanism to prevent this behavior  like try{}catch{} statement should be implemented? Check if a class is derived from a generic class I have a generic class in my project with derived classes.  public class GenericClass&lt;T&gt; : GenericInterface&lt;T&gt; { }  public class Test : GenericClass&lt;SomeType&gt; { }   Is there any way to find out if a Type object is derived from GenericClass?  t.IsSubclassOf(typeof(GenericClass&lt;&gt;))   does not work. Let $a,b,c,d,p$, and $q$ be natural numbers such that $ad-bc = 1$ and $\frac{a}{b} &gt; \frac{p}{q} &gt; \frac{c}{d}$.  How prove that  $q \geq b+d$? I have 256 colors working just fine in konsole,. I thought I'd give tmux a try because, unlike screen, it seems to support vi mode.  However I find that the colors of my prompt show up and this is most likely because I have a 256 color mode prompt. What do I need to do to get tmux to recognize all 256 colors? A switch that is only ON if the reference voltage is matched -+ 0.1 volts Im a beginnerish will electronic and im looking for a switch that is only ON if the reference voltage is matched -+ 0.25 volts. So if i have a reference of 2.7v to match and i feed the switch a 2.75v the switch would be ON. But if i feed it  2.5v or 2.85v the switch would is OFF.   This might be a simple google search, but i am lacking the correct terminology. Determining a matrix from its characteristic polynomial Let $A\in\mathcal{M}_{n}(K)$, where $K$ is a field. Then, we can obtain the characteristic polynomial of $A$ by simply taking $p(\lambda)=\det(A-\lambda I_n)$, which give us something like $$p(\lambda) = (-1)^n\lambda^n + (-1)^{n-1}(\text{tr } A)\lambda^{n-1} +  \cdots + \det A$$ Now, how can we obtain the matrix $A$ knowing the characteristic polynomial? Proving the two given vectors are orthogonal I am given the vectors $\mathbf{w}, \mathbf{v}, \mathbf{u}$ in $\mathbb{R}^n$ such that $\mathbf{u} \neq 0$ and $\mathbf{w} = \mathbf{v} - \frac{\mathbf{u}\,\bullet\,\mathbf{v}}{\|\mathbf{u}\|^2}\bullet\mathbf{u}$. I am asked to show that the vector $\mathbf{w}$ is orthogonal to $\mathbf{u}$.     So far, I have written out the definition of orthogonal: two vectors are orthogonal if and only if their dot product is zero.   So what we need to prove is $\mathbf{w}\bullet\mathbf{u} = 0$ where $\mathbf{w}\bullet\mathbf{u}$ is defined as $\mathbf{w}^T\bullet\mathbf{u}$.   However, I have been stuck on this problem for about an hour and haven't made any significant progress from here. How do we go about proving that the vectors are orthogonal? Prove $\mathbb{Z}_2 \times \mathbb{Z}_2$ is not isomorphic to $\mathbb{Z}_4$ Convert UTC/GMT time to local time We are developing a C# application for a web-service client. This will run on Windows XP PC's.  One of the fields returned by the web service is a DateTime field. The server returns a field in GMT format i.e. with a "Z" at the end.  However, we found that .NET seems to do some kind of implicit conversion and the time was always 12 hours out.  The following code sample resolves this to some extent in that the 12 hour difference has gone but it makes no allowance for NZ daylight saving.  CultureInfo ci = new CultureInfo("en-NZ"); string date = "Web service date".ToString("R", ci); DateTime convertedDate = DateTime.Parse(date);               As per :     UTC/GMT Offset       Standard time zone: UTC/GMT +12 hours   Daylight saving time: +1 hour   Current time zone offset: UTC/GMT +13 hours     How do we adjust for the extra hour? Can this be done programmatically or is this some kind of setting on the PC's? How confident is my model? Is there a way to know? I'm not the most experienced person when it comes to commands. I worked out how to do stuff like when holding x you have y effect. I wanted to think of something that gave other people an effect when hit. Here is what I came up with but I got stuck when it said it couldn't execute the command.  /scoreboard objective add nokill dummy  /scoreboard objective add poi dummy  /scoreboard players set [player] nokill 1  /scoreboard players add @a poi 1 {SelectedItem:{id:minecraft:diamond_sword,display:{Name:{Poison sword}}}}  /execute @a[score_poi_min=1] ~ ~ ~ /effect @p[score_nokill_max=1,r=5] {HurtTime:1} minecraft:poison 10 1 Is it true every ideal of $\mathbb{Z}[x]$ is finitely generated? Let $I$ be any ideal of $\mathbb {Z}[x]$, and $I=\left&lt;{f_1,f_2 , ...}\right&gt;$.  Without loss of generality, $f_1$ has minimal (absolute value) coefficient of constant term (if there exist).  Then, let $g$ be any element of $I$ .  We have for some integer $m$ that $g - mf_1$ is element of $I$ (minimal coefficient and division algorithm).  I guess this process terminate finitely, but I don't know how can I do next step.  ( ex. $g-mf_1, g-mf_1-nf_2, ...$)  Please help me and thanks for in advance. Image uploader shouldn't remove unused link references