Patrick Noah

Greenhorn
+ Follow
since Aug 22, 2011
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 Patrick Noah

I figured it out, I did not have the query string argument "q="
Yes, I am passing in the values provided to me by google.
Hi, I am trying to consume the google custom search REST API with the following java code. I get an exception that says "bad request". What am I doing wrong? Here is the google api documentation I have been following: https://developers.google.com/custom-search/v1/getting_started

Thanks in advance.



[Added code tags - see UseCodeTags for details]
Suppose I have a 6 item array I want to convert to a 2*3 array. So imagine [1,2,3,4,5,6] to
1 2 3
4 5 6

I want to do something like:
for(int row=0; row < 2; row++)
for(int col=0; col < 3; col++)
2darray[row][col] = pop 1-d array from first element

but java arrayList doesn't support this "pop array from first element" like perl does. How do I go upon doing this? Thanks.
11 years ago
Hi, I am trying to parse a date such that it will interpret the time as my current time zone. I read on google that I can do this by appending a Z in my format string, which I have tried with no success. What is the format string I need to use and what does the date I need to pass in look like?
12 years ago

Paul Clapham wrote:The way for a program to return a value is to call System.exit(n), where n is the value you want to return. This value can then be examined by the shell script which called the program; I expect that's what you had in mind when you said your jar had to return a value.



Thanks, I need to return a string though, is there a way to do this?
12 years ago
This jar will be called from another program, and I need the return value from the jar to call another method from this program.
12 years ago
Hi I have an executable jar which must return a value. However, it seems the main class must follow this signature: public static void main(String[] args), and since the jar file executes the main class, how do I get this jar file to return a value? By the way, I am using netbeans 7 to generate the jar. Thanks.
12 years ago
I have the following date:
formattedStr = "4-3-2011 23:11:0";

I want it in the format MM-DD-YYYY HH:MM:SS

I tried using formatter but it didn't help:
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Date sampleDate = formatter.parse(formattedStr);
System.out.println(sampleDate);
}
catch(Exception e){
System.out.println(e.getMessage());
}
}
Does anyone know how to do this?
12 years ago
I get this message in netbeans:
org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: NTLM authentication scheme selected

After googling this it seems that my code(trying to send an email with EWS API) does not work with NTLM authentication:

Any ideas?
12 years ago
I get this message in netbeans:
org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: NTLM authentication scheme selected

After googling this it seems that my code(trying to send an email with EWS API) does not work with NTLM authentication:

Any ideas?
12 years ago
Thank you. Do I need to add a jar or something? I already downloaded the EWS API for java. I added the src folder that has the microsoft... package to the library in netbeans but that didn't work.
12 years ago
Has anyone used this with java? I am trying to get it to work. I downloaded the EWS Managed API and the following jars:
commons-httpclient.jar, commons-codec-1.4.jar, and jcifs-1.3.15.jar. I added the jars to my library in netbeans 7.

I tried "import microsoft.exchange.webservices.data;" and get an error saying the package does not exist.
12 years ago

Bear Bibeault wrote:

Patrick Noah wrote: but YOU CAN CLEARLY SEE IN BOLD THAT I DO HAVE THIS PROPERTY!



Please don't post in all-caps. Thanks.

And, no, you don't. Look again. Carefully.



Sorry for the all caps . The property "howdeep" is in UserData.java, in lowercase. If I'm only trying to set "howdeep", what am I possibly missing? Are you possibly referring to setHowDeep(String value) ? My understanding is that setter method names are not case-sensitive. Please correct me if I'm wrong.

Thanks!

12 years ago
JSP
I have the following form, myform.html:


I want to set this howdeep value in my bean, UserData.java:

I do this by using <jsp:set Property> in my SaveName.jsp:


I want to see if this variable is getting set by using jsp:getProperty but I get the following error: org.apache.jasper.JasperException: Cannot find any information on property 'howdeep' in a bean of type 'user.UserData' but YOU CAN CLEARLY SEE IN BOLD THAT I DO HAVE THIS PROPERTY! What is wrong? Thanks.
12 years ago
JSP