Claudiu Chelemen

Ranch Hand
+ Follow
since Mar 25, 2011
Claudiu likes ...
Eclipse IDE Oracle Java
Merit badge: grant badges
For More
Romania
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
10
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Claudiu Chelemen

I would go for both Paul's and Chris's approaches:
- define what makes your record unique and create an unique constraint on those columns in the database (maintains data integrity)
- application wise, I think it's nice to check first that the record is not in the database, and if it's not, then INSERT it.

I would choose this approach as it allows me to output a relevant message to the user, otherwise I'd have to parse the SqlException to check what the problem was.
Should it be the unlikely case that another used adds the record between the select and the insert, you would end up with an SqlException and you could output a more generic error message.

Claudiu
Hi Isaac,

Did you try going through an online proxy ? I remember seeing proxies out there where you could choose the country.

Claudiu
8 years ago
I took a quick glance at the code and I noticed that the update sql in the GeneralDBAccess class is not well formed, it should have commas after each set.
Claudiu

Junilu Lacar wrote:I know this is nitpicky but CSV stands for Comma Separated Values -- if the delimiters value separators are semicolons, then it's not CSV. That's all I was pointing out.



It's actually pretty common that CSV files would have a different separator, and most of the times it would be semicolon. Eg. on windows platforms, it gets the separator from the regional settings.
So I wouldn't say it's all that wrong.

As for the program, do you have anything so far ?

Claudiu
8 years ago
Well, what is the name of the procedure you've just created on the database ?
Then, what's the procedure you're trying to call from the java code ?

Claudiu
10 years ago
I'm not really a big fan of regex, however in this case we could use it to get the String's length, and it would be in accordance with the initial specs.



After getting the string's length, the number of possibilities to reverse the string is countless.

Claudiu
10 years ago
Assuming you have both projects in the same workspace, on the project B properties, you can add the project A as a dependency, under Properties -> Java Build Path -> Projects -> Add -> (Project A).

Claudiu
Think in terms of basic HTML. How can you make a simple option tag automatically get selected on page load ?
Also, consider from moving away from scriptlets and using JSTL and EL.

Claudiu
10 years ago
JSP
Hi Chris,

It's perfect what you did so far.
My doubt is that the classes you're trying to use have a different package declaration, other than "graph".

Since you're using Eclipse, try removing the import you wrote in your main class. Then, inside one of your method's body, write the name of a class you're trying to use. Next, press Ctrl+Space immediately after the class name you just wrote and Eclipse will automatically add the import for you.

As an alternative, instead of Ctrl+Space you can also try Ctrl+Shift+O (Organize imports) and the outcome should be the same.

Cheers,
Claudiu
Hello

The cause of the NullPointerException is clearly stated in the stacktrace:

Sumer Selvaraj wrote:
java.lang.NullPointerException
common.SessionCheck.sesCheck(SessionCheck.java:12)



Now, if you check line 12 in your SessionCheck class, what's the value of your session variable ?

Claudiu
10 years ago
JSP
Yesterday, after seeing you post, I decided to give this DocShare a try. I don't know about others, but installing and configuring it nearly gave me a brain aneurysm. In short: incompatibilities, conflicts, bugs.

But then I stumbled upon Saros, which made quite a good impression.
I'd recommend giving it a try, seems really easy and straightforward, and configuring it with an xmpp account was a piece of cake.

Claudiu
Take a look at these methods, they would surely minimize code lines, but I would exercise caution (I never used them before in a production environment). They both seem to do a shallow copy of the origin's bean properties, most probably using reflection.

BeanUtils.html#copyProperties(java.lang.Object, java.lang.Object)
PropertyUtils.html#copyProperties(java.lang.Object, java.lang.Object)

Cheers
Claudiu
10 years ago
It's the fine print right at the end of JLS 8.4.3:

If two or more (distinct) method modifiers appear in a method declaration, it is customary, though not required, that they appear in the order consistent with that shown above in the production for MethodModifier.



Claudiu
10 years ago
Hi Collin

The problem with your code is that you're using not one, but three different odometers.

Also, you should differentiate the trips and the odometer, as they're not the same thing.
Maybe you should consider chaning the structure of your Odometer class ? Think about an odometer, what is it supposed to store and what interactions can you have with it..

Claudiu
12 years ago
I've also used the pager plugin on the jquery-based tablesorter, it's quick and simple.

http://tablesorter.com/docs/
http://tablesorter.com/docs/example-pager.html

Cheers,
Claudiu
12 years ago