bob morkos

Ranch Hand
+ Follow
since Sep 06, 2001
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 bob morkos

I'm trying to prove to somoene that you can't have a deadlock on a JDBC Query. Could somoene help me in proving him wrong. As long as you close your connections carefully and dont use transaction than you should not have deadlock. I need arguments to be able to explain to him, thanks for your feedback.
I'm trying to prove to somoene that you can't have a deadlock on a JDBC Query. Could somoene help me in proving him wrong. As long as you close your connections carefully and dont use transaction than you should not have deadlock. I need arguments to be able to explain to him, thanks for your feedback.
15 years ago
Could you provide details. I dont think this solution would be ideal. Maybe I don't understand, please elaborate.

Originally posted by Tony Morris:
Pass a callback to whatever it is that does whatever you're doing.
One of these for example:

15 years ago
When do u used dynamic SQL? I need to implement pagination and column sorting and dont know if SQLJ static SQL support this functionality. Could you confirm. Thanks in advance for your response.

Originally posted by Jeanne Boyarsky:
Now on to your question. There are both static and dynamic types of paging. Static means you get all the data in one shot. Dynamic means you go back to the database when the user clicks "next page." So the fact that you have pagination, doesn't tell you whether it is static or dynamic.

I dont know the difference, could anyone explain. In my application I will have pagination functionality. Does that mean it's dynamic?
I want to be able to web app with pagination features. I don't know if SQLJ is better than Hibernate. Could anyone provide feedback or opinion on those technologies. Thanks.
I'm new to SQLJ and wanted to know if it's supports pagination features. Any recommendation would be appreciated.
I'm new to SQLJ, do u think SQLJ is faster than procedure. I will have 2 million transactions per day and wanted to know if SQLJ would perform. What do u recommend from your experience.

Originally posted by deroshal:
How popular is using SQL/J in the market. I understand we can not use SQL/J for dynamic SQL. Is it database neutral? Can some oneI give the advantages and how it could be used effectively in Java application?

Thanks
deroshal

I have to create a function to calculate current time (for e.g.: 10:00 am) is between (07:00 am - 6:00 pm) > return a boolean true or false
Any help would be appreciated.
16 years ago
Thanks Steve, I forgot the break in my code. Anyways, is there a way you can say that the current time is 11:00 am and does it fall between 5:am - 3:00 pm

Originally posted by Steve Morrow:
As to why your code doesn't behave as expected, you've left out the break statements in your switch, so you're always falling all the way down to Calendar.SATURDAY...

16 years ago
The code below returns the wrong day of the week. Could anyone help?

// get the supported ids for GMT-04:00 (Eastern Standard Time)
// when daylight savings time is in effect

// Fours hours behind GMT, zulu, UTC
// SimpleTimeZone est = new SimpleTimeZone(-4 * 60 * 60 * 1000, "EST");

// create a GregorianCalendar with the Eastern Standard
// time zone and the current date and time
Calendar calendar = new GregorianCalendar();
Date dd = new Date(System.currentTimeMillis());
calendar.setTime(dd);

// Cat it all together
String myTime = new String(calendar.get(Calendar.HOUR_OF_DAY) + ":"
+ calendar.get(Calendar.MINUTE));
System.out.println("myTime is:" + myTime);

int dayNum = calendar.get(Calendar.DAY_OF_WEEK);
String day = null;

switch (dayNum) {
case Calendar.SUNDAY:
day = "SUNDAY";
case Calendar.MONDAY:
day = "Monday";
case Calendar.TUESDAY:
day = "Tuesday";
case Calendar.WEDNESDAY:
day = "Wednsday";
case Calendar.THURSDAY:
day = "Thursday";
case Calendar.FRIDAY:
day = "Friday";
case Calendar.SATURDAY:
day = "Saturday";

System.out.println("Day of the week is : " + day);
16 years ago
I have web site that goes through different enrollment process and I want to make sure that the client does not click on the browser back button. The following code does not work:


response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", 0);
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "post-check=0,pre-check=0");


Could anyone help and also how do I clear the browser history looking for server side code. Thanks.
16 years ago
Webroot contains folder directory src,WEB-INF, config

My prop file "abc.txt" directory is under config folder

Manifest:
ClassPath: config/abc.txt

Java code:

Properies prop = new Properties();
InputStreamReader in = null;
try {
in = new InputStreamReader(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream ("abc.properties")));
props.load(in);
} catch (FileNotFoundException e) {
System.out.println("FileNotFoundException: " + e.getMessage()):
}


I keep on getting FileNotFoundException




Originally posted by Nathaniel Stoddard:
Um ... the functions I'm talking about in java.lang.ClassLoader don't throw FileNotFoundExceptions. So, are you really using the right ones? Why don't you tell us the pathname of the property file that's in your WAR, and the code snippet you're using to open it.

16 years ago
Webroot contains folder directory src,WEB-INF, config

My prop file "abc.txt" directory is under config folder

Manifest:
ClassPath: config/abc.txt

Java code:

Properies prop = new Properties();
InputStreamReader in = null;
try {
in = new InputStreamReader(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream ("abc.properties")));
props.load(in);
} catch (FileNotFoundException e) {
System.out.println("FileNotFoundException: " + e.getMessage()):
}


I keep on getting FileNotFoundException




Originally posted by Nathaniel Stoddard:
Um ... the functions I'm talking about in java.lang.ClassLoader don't throw FileNotFoundExceptions. So, are you really using the right ones? Why don't you tell us the pathname of the property file that's in your WAR, and the code snippet you're using to open it.

16 years ago
I tried it and it did not work. Could you direct me to the right path. This is the only feature missing in my application. I can't seem to load that property file, but it works fine if I put it in the src folder. Any help would be grateful.


Originally posted by Nathaniel Stoddard:
You need to use the functions provided by java.lang.ClassLoader to do this sort of thing. Time to go read those API docs.

16 years ago