Mahendran Aiyappan

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

Recent posts by Mahendran Aiyappan

Matthew Brown wrote:
1. You've converted the input to upper case, but you've got references to lower-case letters in your regular expression


I am not sure I understand it correctly. Please correct me if I am wrong. My regular expression is [^a-z]*[\\s]?[^\\d\\w]?[POSITIVE\b]+[^a-z]* which has POSITIVE in caps.

Matthew Brown wrote:
2. [POSITIVE\b]+ doesn't look for the word "POSITIVE". It looks for any letters in the word "POSITIVE". I think you're confusing square and regular brackets. And with [\\s]? - why are the brackets there?


I am new to regular expression. What is regular brackets mean? is it ( ) ?

Thanks,
Mahendran
13 years ago
Hi Guys,

This is regarding composing an regular expression to satisfy the given conditions.

The conditions are:
1. I wanted to return true/false if a particular word is present in the paragraph.
2. The word can be anywhere (in the beginning, middle, or end)
3. It should return only for whole words with an exception. The word can precede (or) follow by only one special character such as ,.;()[]{} etc
4. Also it is case insensitive search.

In the below code I am searching for a word Positive. I have hardcoded the string in the regex. Ideally in this case the output should be false, but it is returning true.
So I am not sure how to do this.



Thanks in advance.
Mahendran

13 years ago
Actually there are many ways to read the contents of XML. This one is using JDom.

here

Mahendran
15 years ago
You can have some thing like this:

<input type="text" name="username" id="username">
<input type="password" name="password" id="password">


and then in the script function you can have

if(document.getElementById("username").value == "" || document.getElementById("password").value == ""){
alert("Username or password cannot be blank");
//elem.focus(); // set the focus to this input
return false;
}

Mahendran.
Correction please:



Thanks,
Mahendran
15 years ago
Hi Guys,

Is it possible to do the following condition in switch statement?
I know its crazy to do this using switch but my question is what level of support does switch statement provides.



Thanks,
Mahendran
15 years ago
William,

Thanks for your quick reply. Yes my question is "serialize objects from multiple java classes" only.

And thanks for your solution.

Mahendran
15 years ago
Hi guys,

I wants to serialize/deserialize multiple java classes into a single file. Is it possible to do that?

Thanks,
Mahendran
15 years ago
Hi Guys,

I am facing a problem with connection pooling on jboss 4.2.1GA. For every db call a new connection is created. In other words it seems to be no pooling of connections. Is there is any way to specify this in the properties. My connection properties are as follows:



Thanks,
Mahendran.
15 years ago
Ulf,

Currently I am handling those missing as you pointed out. But I will get more information regarding this and I will ask to make a database change if possible.

Thanks,
Mahendran.
16 years ago
Paul and Ulf,

Is this looks alright?



Thanks,
Mahendran.
16 years ago
Paul,

In the database there is field to store the browser version, os version. I have requested to fill that data. That's it. No idea about why are we storing it.

Thanks,
Mahendran
16 years ago
Paul,

Is there any other standard API other than Servlet specification to do the parsing and return accordingly(Browser Version, Os Version etc)?

Thanks,
Mahendran.
16 years ago
Paul,

Through HttpServletRequest I could only get the user agent string, But I require browser version and os version which any way is part of user_agent. But my question is there any method which will return something like this



Thanks,
Mahendran.
16 years ago
Hi All,

I need to get the OS version and Browser Version from the user-agent HTTP header. Is there any standard API which should parse it and return? One more question. What is OS_TEXT, OS_CODE, BROWSER_TEXT, BROWSER_CODE in this context?

Thanks for your suggestions,

Mahendran
16 years ago