Tony Smith

Ranch Hand
+ Follow
since Jul 07, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tony Smith

Today it took me 30 min trying to figure out an issue and it turned out that the instance is not initialized. But the IDE didn't prompt any error. So I had similar code to something below:



Thanks!
10 years ago
Yes, the original thing I got stuck in my mind was that I forgot each row has same number of columns. a[1].length == a[2].length so this will work

System.out.println(array[array.length-1][array[0].length-1]);

As picking any row will yield same amount of columns for traditional array. But you also mentioned that each row may have different columns. While I am not quite familiar with that but I think I have heard of it before. I am not sure how to initialize array like that. But I came up with the following code, it might be able to still generate the last value of the 2d array when each row may have different numbers of columns and also if the numbers of columns was not given. I guess this is what I was looking for when I first asked the question.

System.out.println(array[array.length-1][array[array.length-1].length-1]);
11 years ago
Assuming you don't know the size of the arrays, is there a way to use .length or .size to get the final value of the 2d array? If no loop allowed either. I was just a little curious.
11 years ago
Hi thank you so much for taking your time to reply. I was aware of the usage of Arrays.asList but was reluctant because I thought it might allocate a brand new array or arraylist and needed to copy everything over again. Upon further reading, on more than one occasions, it appeared people are suggesting no new allocation were taking place other than just creating a specialized view or wrapper to the original array. Therefore minimum hit and memory usage for using Arrays.asList. If that is true then I think your solution is perfect. Thanks again!
11 years ago
I was trying to solve a problem and I had this as a partial step to my solution. So if you were given a large boolean array fill with all true value except one false hiding within somewhere. Is there any efficient way to search for the index of that false rather than going through the whole array?

11 years ago
For people who worked with websphere before in a company, is it more common to see people use IDE that came with websphere or something like eclipse?

What is the most common IDE came with websphere? WSAD? I found Rational Application Developer at IBM site is that related product?
15 years ago
Hi I am a bit curious about websphere. Is there anything special about the app server? What are the advantage a company would pick websphere rather than other app server? Is developing j2ee app a lot different with websphere than other server? Thank you.
15 years ago
congrats! remember yahoo with a ! is copyrighted!
15 years ago
I can't think of any scenario where one to many bidirectional would make sense. Can someone enlighten me?
what's the syntax differnece between hibernate hql and sql? Is sql 100% native sql which means you should be able to paste the sql code into mysql query browser and it should work?
Hi I am new to hibernate, I was trying out some code, nothing gets written to the database. However if I surround my code inside begintransaction and commit, it works fine. So my question is, should most operations be done inside transaction? Or when should the transaction be used?
If you are doing unit testing in your project does that mean you are doing test driven development?
15 years ago
Looking for part time nonpaid java internship in austin, TX area. I have 2 certifications, know a little struts, ejb3, hibernate and jsf.
15 years ago
When you say: makes persistence modelling easier and more natural. Why is that? Is that because you think xml files are easier to read through or? Do you make mapping first then create the tables? Is that what you mean by persistence modelling?
I passed it without job experience most people can do it within 3-6 months studying.