-
as seen on Programmers
- Search for 'Programmers'
Originally posted at stackoverflow.com/q/23961260
I come across the following code with a lot of frequency:
if (myArray.length == Constants.ZERO_INT)
or
if (myString != null && !myString.equals(Constants.EMPTY_STRING))
Neither of these makes much sense to me. Isn't the point of…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I know I'm able to this in PHP, but I can't remember the name or the way to do it, so I'll just explain what it is, and when someone tells me how it's called I'll update this question.
I have some error messages defined as constants on javascript, however, some of those messages need to contain dynamic…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
We are using a Perl utility to dump data from DB2 database. We installed DBI package and it is asking for DBD package also.
We dont have root access and when we try to install DBD package we are getting the following error:
ERROR BUILDING DB2.pm
[lijumathew@intblade03 DBD-DB2-1.78]$ make
make[1]:…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
We are using a Perl utility to dump data from DB2 database. We installed DBI package and it is asking for DBD package also.
We dont have root access and when we try to install DBD package we are getting the following error.
ERROR BUILDING DB2.pm
[lijumathew@intblade03 DBD-DB2-1.78]$ make
make[1]:…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've switched from using constants for Strings:
public static final String OPTION_1 = "OPTION_1";
... to enums:
public enum Options {
OPTION_1;
}
With constants, you'd just refer to the constant:
String s = TheClass.OPTION_1
But with Enums, you have to specify toString():
String…
>>> More