Java - Refactor similar classes
What does it mean to "program to an interface"?
Let $F$ be a field and $x\in F$. If $x=-x$ and $1\neq -1$, then $$0=\frac{x+x}{1+1}=\frac{1+1}{1+1}x=x.$$ This means that the statement in the title is true if and only if $1\neq -1$. But how do we know that $1\neq -1$ for an arbitary field? Is there a way to edit SVG files in Illustrator where you can specify a CSS class for each path?  I already know in Illustrator that if you give the layer name an actual name, Illustrator will use that name as the path's ID, which is fine if you don't plan on reusing the icon more than once on the same page.  My current workaround is to just use the IDs method, but then later convert the IDs to classes in my code editor, but it's pretty annoying to have to do every time I generate my SVG sprite.  If that's currently not possible in Illustrator, are there any other apps that will allow you to specify that? Or maybe a Grunt or Gulp package?  It looks like you might be able to do it with Inkscape with a , so I might look at that if there's no other good solutions out there. How can a "proper" function have a vertical slope? Plotting the function $f(x)=x^{1/3}$ defined for any real number $x$ gives us:   Since $f$ is a function, for any given $x$ value it maps to a single y value (and not more than one $y$ value, because that would mean it's not a function as it fails the vertical line test). This function also has a vertical tangent at $x=0$.   My question is: how can we have a function that also has a vertical tangent? To get a vertical tangent we need 2 vertical points, which means that we are not working with a "proper" function as it has multiple y values mapping to a single $x$. How is it possible for a "proper" function to have a vertical tangent?  As I understand, in the graph I pasted we cannot take the derivative of x=0 because the slope is vertical, hence we cannot see the instantaneous rate of change of x to y as the y value is not a value (or many values, which ever way you want to look at it). How is it possible to have a perfectly vertical slope on a function? In this case I can imagine a very steep curve at 0.... but vertical?!? I can't wrap my mind around it. How can we get a vertical slope on a non vertical function? How to disable "time travel" entirely? Every time I open a question I get this oh so funny 90s feel with scrollers and whatnots. In every question I need to click it off. The button seems to only work for the specific page I load; loading a different page shows the theme again.  Is this an attempt to keep people from using the site for a few days or how do I tell you "please never ever do anything like this if you want me to keep contributing here"? Yes I have no sense of humor if this is an attempt at that.  How do I turn off "time travel" (also known as "back to the future") mode off permanently, on all questions, and preferably network-wide? Integer solutions for $x^2-y^3 = 23$. What countries allow me to pass their borders visa-free?  Am I allowed to visit and work in EU and Schengen countries? Toggle Switch to swap the connections of two buttons Background Video is shown in Rendered mode but not when szene is rendered What is the square root of $i^4$? What is the $\sqrt{i^4}$?   $i^4$ = $(i^2)^2$ So is $\sqrt{i^4}$ = $\sqrt{(i^2)^2}$ = $i^2$ = $-1$?  Or is $\sqrt{i^4}$ = $\sqrt{1}$ = $1$?  When I plug it into my TI-89 Titanium, I get $1$.  Edit: I now see why $i^4 \neq -1$. $$\sqrt{x^2} = \left|{x}\right| $$ So$$\sqrt{(i^2)^2} = \left|i^2\right| = \left|-1\right| = 1$$ Why is this sequence of functions not uniformly convergent? For the following sequence of functions and its limit function, we can see that $f_n(x)$ is clearly pointwise convergent  $$f_n(x) = x^n\text{ }\forall x\in[0,1]\text{ and }\forall n\in\mathbb N^*\\ f(x) = \begin{cases}0&amp;\text{if } x\in[0,1)\\1&amp;\text{if } x=1\end{cases}$$  However, I was wondering why this is not uniformly convergent. The condition for uniform convergence is:  $$|f_n(x) - f(x)| &lt; \epsilon,\ \ \ \forall x \text{ when } n &gt; N$$  Now most sources present an argument along the lines of: assume that $f_n(x)$ is uniformly convergent and that $0 &lt; x &lt; 1$, this means that $x^n&lt;\epsilon$ whenever $n&gt;N$. Specifically, this would mean $x^{N+1}&lt;\epsilon$ for some fixed $N$. But if we now pick $x$ such that $1 &gt; x &gt; ε^{\frac{1}{N+1}}$, then this would lead to a contradiction, therefore $f_n(x)$ is not uniformly convergent.  However, I was wondering why couldn't we take $n$ to infinity. If $0 &lt; x &lt; 1$, then $\lim_{n\rightarrow \infty} |f_n(x) - f(x)| = 0$ (which is less than $\epsilon$). Now since $|f_n(x) - f(x)|$ will always be $0$ if $n &gt; \infty$, then wouldn't this be uniformly convergent? Environment variables when run with 'sudo' Buffering GeoJSON file using Python? I'm trying to perform a simple buffer on GeoJSON file using Python script. I am able to do it on a shapefile using Python script and on GeoJSON using QGIS fix distance buffer tool but I can't figure out how to do it on GeoJSON using Python script. I read many posts on it but none of them include working solely on GeoJSON. I also know that it is possible to convert GeoJSON to .shp but I need to work only with GeoJSON files.  My code that works for .shp file:  from osgeo import ogr  ds = ogr.Open(r'C:\vector files\tryyy.shp', 1) in_lyr = ds.GetLayer() out_lyr = ds.CreateLayer('new_buff44',in_lyr.GetSpatialRef(),ogr.wkbPolygon) out_lyr.CreateFields(in_lyr.schema) out_defn = out_lyr.GetLayerDefn() out_feat = ogr.Feature(out_defn) bufferDist = -0.00015075  for in_feat in in_lyr:      geom = in_feat.geometry()     out_feat.SetGeometry(geom)     for in_feat in in_lyr:          geom = in_feat.geometry().Buffer(bufferDist)         out_feat.SetGeometry(geom)         for i in range(in_feat.GetFieldCount()):             value = in_feat.GetField(i)             out_feat.SetField(i, value)         out_lyr.CreateFeature(out_feat)  del ds print "finish"   When I change the file from shp to geojson in the org.Open line I get:      NoneType' object has no attribute 'CreateFields'   I thought that if I read vector file as OGR datasource object then it doesn't matter which format is the original vector file.   Can someone help me understand what I should change so that the code will work on GeoJSON files? Prove that $(n-1)! \equiv -1 \pmod{n}$ iff $n$ is prime [Wilson's Theorem] How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks. What was the joke that Geordi told Data in TNG: "Encounter at Farpoint"? states:     Apparently at some point during this mission, Geordi La Forge told Data a joke, which the humorless android did not "get" until years later, when he activated his emotion chip during the events of Star Trek: Generations.    Is it known what the joke is? Simple explanation to the induction from the slowly changing $\vec B$ of a solenoid in the region of $0$ magnetic field Number of automorphisms of a direct product of two cyclic $p$-groups Suppose I have $G = Z_{p^m} \times Z_{p^n}$ for $m, n$ distinct natural numbers and $p$ a prime. Is there a combinatorial way to determine the number of automorphisms of $G$? Finding the volume of the tetrahedron. Find the volume of the tetrahedron with the vertices $P(1,1,1)$, $Q(1, 2, 3)$, $R(3, 1, 2)$, and $S(2, 3, 1)$. Anthology series with suspended animation and a galaxy-wide empire? Is there a single word that describes both Witches and Wizards? In the Harry Potter world, there's the term "muggle" for people with no magical abilities, "muggle-born" for those with magical abilities who's parents are muggles and "squib" for those with no magical abilities who's parents are magical.  But is there any collective term for all magical people (as opposed to wizards for males and witches for females)?  I don't recall seeing any word that refers to all men and women and children with magical abilities, and it's the only group left without noun or collective noun to describe them. This is an exam question I was practising. I have the general understanding of Linear programming, but how would you go about finding the Decision Variables, Objective function and Constraints for this?  My Opinions: Decision variables: $M_1$- # of Model $1$ to be produced $M_2$ and $M_3$(similar definition as $M_1$)  Objective function: I'd Multiple the Cost to make in house by cost to buy from subtractor  to get Minimise: $3900M_1+7500M_2+27300M_3$  Constraints: $3M_1+1.5M_2+2M_3\ge0$  $1.25M_1+2.5M_2+0.75M_3\ge8500$  $M_1,M_2,M_3\ge 5500$  No idea where number order would go? Do I use it in the Constraints and multiply by the Hours?  Now, am I on the right track?