Eric Gero

Ranch Hand
+ Follow
since Jul 20, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Eric Gero


Eric: I am looking for an SVG library to use in a Swing app. I have looked at Batik, but there does not seem to be much documentation available. Does anyone know of any other SVG libraries?
15 years ago
I believe the actual "locking" depends on the operating system. The lock may be implemented as an advisory lock, so if other apps don't check for it, they won't know the file is locked.

try {
File file = new File("myfile");
FileChannel fileChannel = new RandomAccessFile(file, "rw").getChannel();

FileLock myLock = fileChannel.lock();

try {
myLock = fileChannel.tryLock();
} catch (OverlappingFileLockException e) {

}

myLock.release();

fileChannel.close();
} catch (Exception e) {
}

Eric
[ April 14, 2007: Message edited by: Eric Gero ]
17 years ago
You might want to look at DVDFab Decrypter. I has that feature and only costs about 30 bucks.

Eric
17 years ago

Originally posted by Bear Bibeault:


That's not the way it should be done to begin with. Object detection, rather than browser detection, is the way to go.



That is actually what I meant, but I didn't word it very well. Reading from the link you posted, new IE version means new IE problems. Should I act surprised now?

Eric
I am not sure it will replace the way we use JavaScript, but learning AJAX should at least make us better JavaScript coders. Like many developers, I never JavaScript much attention until I started playing with AJAX. I knew enough to create the functions I needed for my apps, and disregarded the rest.

There are also quite a few libraries and frameworks that allow you to do wonderful things in AJAX, yet shield you from the task of writing much JavaScript at all. I guess it is a matter of personal preference.

Eric
I have read that IE 7 is supposed to be more compatible with W3C standards. Does anyone have any experience with IE 7 and AJAX? Is it still a matter of checking to see if a browser is specifically IE when creating an XMLHTTPRequest object?

Eric

Originally posted by Patrick Brooks:
Oops, I meant set instead of get, but that still doesn't solve the problem of not being able to reference a class in the same project.



The problem is not in an import, or being able to reference a class in the same project. The problem is that the array is created, but has nothing in it. When you try to access one of those objects, you will get a NullPointerException.

Eric
17 years ago
Patrick,

In the UseTaxpayer class, you create an array to hold Taxpayers, but you never put any Taxpayers in it, that is creating a NullPointerException when you try to call TaxpayerArray[i].getSocial();

Also, it is standard to use camelCase. Instead of TaxpayerArray, you would normally write taxPayerArray for the variable name.

public class UseTaxpayer
{
public static void main(String[] args)
{
Taxpayer TaxpayerArray[] = new Taxpayer[2];
for(int i = 0; i < TaxpayerArray.length; i++)
{
TaxpayerArray[i].getSocial();
TaxpayerArray[i].getGrossYearly();

}
}
}

Hope that helps,
Eric
17 years ago
Have you verified that nothing else is using the port, or that the port is not blocked? The default for MySQL is 3306 I think. You may also want to verify that the port accepts TCP/IP.

Eric
[ April 05, 2007: Message edited by: Eric Gero ]
Thank you both for the info. I will do some more reading. I like the idea of being able to code in Java, then compiling into Javascript. I am all for anything that makes life easier.

Eric
17 years ago
GWT
I am not very familiar with GWT, but I have used Taconite and Prototype in a few projects. What advantages does GWT offer over frameworks like Taconite or Prototype. Why would I make the switch?

Thanks,
Eric
17 years ago
GWT
If you just need the data dumped to xml, you can use Toad for MySQL. It has an export tool that will do it for you.

http://www.toadsoft.com/mysql_freeware.htm
Are you passing any parameters to the stored procedure? I have seen this happen when passing dynamically generated sql to a MS SQl server where the statement has an unmatched quote, or extra comma. The DBA should be able to profile the query to record what is actually being called.

Eric
Thanks Steve, that makes sense.
17 years ago
You can get the table names as follows:

DatabaseMetaData dbmd = dbConn.getMetaData();
ResultSet rsTables = dbmd.getTables(server.getInitialCatalog(), null, null, null);
String tableType = null;

while (rsTables.next()) {
tableType = rsTables.getString("TABLE_TYPE");
if (tableType.equals("TABLE")) {
tableListModel.add(tableCount, rsTables.getString("TABLE_NAME"));
tableCount++;
}
}

This link has a pretty good explanation of it.
http://members.aol.com/kgb1001001/Articles/JDBCMetadata/JDBC_Metadata.htm

Eric