I have a String Array called copy. I want to check if copy[0] matches with copy[2] and copy[3]. If it matches, then print something.  I tried using IF statements but i keep getting errors.  public static void main(String[] args) {     String[] copy = {"1","2","1","1","5","6","7","8","9"}; }
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?
Sensitivity to initial conditions and topological transitivity 1099 for settlement what about lawyer fees? I am getting a settlement from a business over a suit but most of the settlement will go to the attorney to cover their fees incurred on contingency.  If the 1099 reports the full settlement, will I have to pay taxes on the full amount or if not, how do I tell the IRS it is not all taxable. Otherwise, I could easily end up owing more in taxes than I get for my small portion. Varying behavior for possible loss of precision Bash Script if condition is always true How to make a bootable ISO image from a bootable DVD? I want to make a .iso image of a bootable OS DVD, to use in VirutalBox.    Nautilus can make a .iso, but only of data files, it seems. The .iso it created was not bootable.  What is available to make a bootable .iso from a bootable DVD? Should first and last name be formatted? Am I Running as a Service dimensional analysis of the Shannon-Hartley theorem In the infamous  the bandwidth of the channel is measured in Hz (Hertz) but the channel capacity is measured in bps (bits per second). So, either I'm missing something obvious or there's a dimensional mismatch in the equation.. Can somebody please help me understand? How to prove that $\lim\limits_{x\to0}\frac{\sin x}x=1$? How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated. "The resource cannot be found." error when there is a "dot" at the end of the url Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in? How can I fix a geoTiff with an incorrect CRS? Trying to load and plot a raster (it's a DEM) in R, but having problems.    Using R I read in a raster file:  library(raster)  dem &lt;- raster("DEM_Victoria.tif")  # &gt;70 MB print(dem)  class       : RasterLayer  band        : 1  (of  3  bands) dimensions  : 5444, 6007, 32702108  (nrow, ncol, ncell) resolution  : 100, 100  (x, y) extent      : 176615.6, 777315.6, 5650397, 6194797  (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +ellps=WGS84 +no_defs  data source : DEM_Victoria.tif names       : DEM_Victoria values      : 0, 255  (min, max)   My confusion here is the extent vs the CRS. The extent shows coordinates from a UTM Zone 55S system, while the CRS reports it as longlat.   Similarly, gdalinfo reports:  Driver: GTiff/GeoTIFF Files:  DEM_Victoria.tif Size is 6007, 5444 Coordinate System is: GEOGCS["GDA94",     DATUM["unknown",         SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433]] Origin = (176615.587999997427687,6194797.138000000268221) Pixel Size = (100.000000000000000,-100.000000000000000) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   COMPRESSION=LZW   INTERLEAVE=BAND Corner Coordinates: Upper Left  (  176615.588, 6194797.138) (Invalid angle,Invalid angle) Lower Left  (  176615.588, 5650397.138) (Invalid angle,Invalid angle) Upper Right (  777315.588, 6194797.138) (Invalid angle,Invalid angle) Lower Right (  777315.588, 5650397.138) (Invalid angle,Invalid angle) Center      (  476965.588, 5922597.138) (Invalid angle,Invalid angle) Band 1 Block=6007x1 Type=Byte, ColorInterp=Red Band 2 Block=6007x1 Type=Byte, ColorInterp=Green Band 3 Block=6007x1 Type=Byte, ColorInterp=Blue   Is this real? A problem? (well it is to me, but perhaps because I don't understand something) Fixable?  I tried 'Assign projection' in QGIS, which uses this command:  gdalwarp -t_srs EPSG:28355 -srcnodata -32768  DEM_Victoria.tif DEM_Victoria.tif.tmp   but it failed with:     ERROR 1: Too many points (12100 out of 12100) failed to transform,   unable to compute output bounds. Related to the question :  It is well known that   $$\zeta(2n) = f(2n) \pi^{2n}$$  where $f(n)$ is an function in rationals: (the denominator = OEIS : 6, 90, 945, 9450).  Apery proved that $\zeta(3)$ is irrational, and presumably $f(2n+1)$ is so for all (but the latter is open).  But what else is known about $f(2n+1)$? What sort of pattern does it share (if any) with $f(2n)$? Numerically does it fit well? Is there any clue/progress since Apery as to its form? Of course, $f(2n+1)$ may in effect divide out the $\pi$, meaning that somehow $\pi$ is not involved in $\zeta(2n+1)$ in any essential way. How do I install pdfedit? Idea of paying for things with time I recently read the .  This book had the idea of the time you live as something that can be used to pay for things. When you run out of "money" you die.  I was wondering is this the original source for this idea? Or does anyone know of an earlier book with the same idea? Finding descendants of British great grand uncle who emigrated to Australia? From  I have received the information of the person with the possibility of great-grandfather.   However, I have a bigger problem from here which is whether he really is my great-grandfather because there was a brother to him in the information.   If I can find his brother's descendants, then I may be able to learn the kinship with DNA testing.   How can I find the living descendants of this great grand uncle?  I was born and grew up in Japan where research is easy for me but I do not know the best way in Britain and Australia.  C.Z.Ede is the name of the candidate for my great-grandfather and his information can be found at   There is also a Mr Peter Zohrab site () which mentions "Sydney Cuthbert Ede, Eagleville Station, Talbotville, Victoria, Australia".  Mr Peter Zohrab from that site suggested that I look for descendants of Sydney Cuthbert Ede in Australia or New Zealand. However, I have not yet found any. I am also inquiring at the church in which he was baptized. So basically this proof centers around proving that (S,*) is a group, as it's quite easy to see that it's abelian as both addition and multiplication are commutative. My issue is finding an identity element, other than 0. Because if 0 is the identity element, then this group won't have inverses.  The set explicitly excludes -1, which I found to be its identity element, which makes going about proving that this is a group mighty difficult. Shrink the database only up to its initial size which is set after creating database In SQL server every database has a property Initial Size (MB) which can be seen in properties of database in SSMS. By default it will be 3 MB for mdf and 1 MB for ldf file.  So now if create a new database then it will be set to default size(i.e 3 MB for mdf and 1 mb for ldf file). But after creating the database  I change the initial size to some other value say For mdf 10 MB and ldf 5 MB.(In real-time some database administrator may want to change initial after creating database)  But now if shrink the database it will shrink beyond the initial size I have set after creation(consider that no data is there in database otherwise it will shrink to its actual content size). It will shrink till the initial size it had during creation of database(i.e 3mb for mdf and 1 mb for ldf). I was expecting to shrink till the initial size which I have set(i.e 10 mb for mdf and 5mb for ldf). Can it be possible to do? If possible then how?  In some article i saw like dbcc SHRINKFILE can be used to shrink beyond initial size and dbcc SHRINKDATABASE cannot shrink beyond initial size. But I want to shrink only till the initial size to which I have set.  Note: I know that shrink is bad and should not be done.But I want to know how it can be done? If sql server considers only the initial size set during creation of database then what is the use of setting the initial size after creating database?  EDIT:  From microsoft shrink related article: Using DBCC SHRINKDATABASE you can not shrink database below its initial size.  My question is Can I change the initial size of existing database itself?  EDIT:  I have about 5 sql server instance. All the database where created with default size of 3 mb for data and 1 mb for log(about 3 years back). Now all the databases are in the range of 100-1000 mb. I wont shrink the database normally as it is not good practice. But some database grow more than 10 GB(mdf file itself as i insert so much data in it). So when database is large I will shift unimportant and old contents from this database to another server as it is not required in that server for me. So that database size reduces from 10 GB to 1 GB. Now the remaining 9 Gb left unused. Now I  want to specify database size to be reduced to 2 GB so that i will get 1 GB free space(Also 2 Gb is the ideal size for this database), Which can be used to avoid autogrowth till next 1 Gb of data is filled. Also i have set 100 MB auto-growth for this kind of large database which has more writes. So instead of specifying size as 2 GB in shrinkfile command,if it was possible to change initial size to 2 GB (which shrink considers) then it would have been better. During this database creation there was no plan about size ,autogroth etc. As it was created about 3 years back. Now i am planning to set autogrowth etc. I cant again create new database with new initial size and shift data. So I was asking whether I can change the Initial size for existing database? Is it OK to ask on SO for help in explaining someone else's working piece of code, from Open Source projects or library examples etc.? Or does this belong somewhere else? How to insert text before the first line of a file?