Munish Dabra

Greenhorn
+ Follow
since Nov 18, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Munish Dabra

True Scott , my code does n't take care of the special words like a person's name, book title, important words, acronyms etc.

But I couldn't think of anything to do that . Any Ideas ?
19 years ago
I need to setup something more generic on application level for the scenario mentioned:

Any of my actions/Jsp can optionally set One or more particualr request attribute keys (different user ids etc ), on the basis of which I need to check some data specific security (to match the userid with current logged user )in AppGlobalAction(all action extends this action).
What I dont like is to get all these request attribute in AppGlobalAction and check everytime although we need this data specific security thing for only few actions.
Other thing Is there any better way to achieve this thing. Can we set request attibute in our action as an array or something like that . I dont want to define so many attribute with different names and check them all the time?
19 years ago
yes guys , there was a little typo in the example.And final piece i think should be :

if(str != null && !str.trim().equalsIgnoreCase("")){
String[] sentences = StringUtils.split(str.trim().toLowerCase(),'.');
for(int i=0;i<sentences.length;i++){
sentences[i] = StringUtils.left(sentences[i].trim(),1).toUpperCase().concat(sentences[i].trim().substring(1));
}
return StringUtils.join(sentences,".").concat(".");
}
any comments !
19 years ago
i code like this , but didnt quite like it..any straithword commons api or better way to do it ?

if(str != null){
String[] sentences = StringUtils.split(str.toLowerCase(),'.');
for(int i=0;i<sentences.length;i++){
StringBuffer formattedSentence = new StringBuffer();
formattedSentence.append(StringUtils.left(sentences[i],1).toUpperCase());
formattedSentence.append(str.substring(1));
sentences[i] = formattedSentence.toString();
}
return StringUtils.join(sentences,'.');
}
19 years ago
basically sentence case

e.g. hI thIS iS StUPId QuesTIon

Output : This is stupid question
19 years ago
Is there any api which take the string and convert it to mixed case. If somthing is there in commons..that will work too.

Thanks
Munish
19 years ago
I'll series 6 or 7 from NASD are the right ones...but i guess you might not be able to appear for that as prerequisite as per NASD for the certification is:
"You must be sponsored by a firm who is a member of the NASD or is a Self Regulatory Organization (SRO)."
yeah, agreed with Jyothi..Program in General Insurance is a good exam from AICPCU/IIA . Even I am doing the same.
But not justified somehow with series 6 or 7 , they sounds too much on business side.Is there anything else which can go well for Financial domain esp something in Fixed income.
I'm just wondering , Is there any good domain certification in finance or insurance exist there for tech guys
well as far my understanding it is not issue..
you can always control what middlegen creates using ANT.

Their are two ways of solving this..

1) using ant task

<many2many>
<tablea generate="true" name="LIBRARY" />
<jointable name="LIBRARY_BOOK" generate="false" />
<tableb generate="true" name="BOOK" />
</many2many>

2) or u can control by table ...

<table name="LIBRARY"></table>
now middlegen should generate mapping files for only LIBRARY table.and you can always add more <table> tags for more tables.

I hope that helps
Thanks Paul..But sometimes one has no choice since database server and application server may be in different timezone.and making your application dependent on timezone esp when you are using timestamp to compare with one of the other columns in database is risky..Is n't it?

I tried using createSQLQuery() too...but i am getting alias exception...I will appreciate if you can tell me which persistant objec to use while writing query.
I was just wondering how to get the 'current timestamp or date' from DB2 database using hibernate query language(hql) or some other way in hibernate.

you can say something similar to this , but using hql or criteria or some other way in hibernate.

SELECT current timestamp FROM sysibm.sysdummy1

It is so surprising that i could not find some simple way of doing this in hibernate.

I will appreciate any help regarding that.
Thanks Paul.I was just wondering where the (default build file of wsad)can be found ..i mean in which folder under wsad..or is it generated dynamicaly by some java file..

You help will be greatly appreciated
20 years ago
Hi !

I am new to ant and presently in my project i have to first rebuild the project (using default build in wsad) and after that i have to run two more ant scripts for some changes in urls.

What i wanna do is create a single ant file which will serve all the three purpose in a sequence.And i didnt have to do these three things separetely.

I was just wondering how to do that? Can anybody help me out....
20 years ago