Praveen Kumar

Ranch Hand
+ Follow
since Nov 06, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Praveen Kumar

Hi All,


In an interview, I faced above question and I answered that JVM is platform dependent and there is separate JVM for each OS. So we need to run the code in respective JVM then we can use same java code in
all OS. I hope i said is correct answer .. Then interviewer asked me that Do we have any rules to follow in java coding ?. Here I am not aware the rules we need to follow.

Please tell me what rules we need to take care when ever your developing java code for all platforms ?.






11 years ago
Hi,


Today I have been asked some examples of singleton design patterns in core java. But I could not able to get any examples. Please tell me if you know anything :-)
11 years ago
Sorry ... I mean

Class X {


public static X getInstance() {

returns X;

}



11 years ago


Please tell me what are the difference and when i need to go for singleton and static class ?
11 years ago
Hi

I know concepts about shallow copy and deep copy. Just i want to know when we will go for shallow copy and deep copy ?. Please suggest some examples that would be great.

11 years ago
Hi ,


I have two domain classes say Race and Registration and i am using Searchable plug in to search the values in Race and Registration. Race and Registration domain classes have one to Many relationship.

Race domain class :: properties are name, dateCreated, city and state and Registration domain( Who are participated in Race ) properties are :: UserName , city, state, email etc...

I am using search on Race domain like ... Race.search(....)

I am getting the data as per searchable default functionality as per score( hit). But I want to display the result in different format say When i searched for value,

if the search value equals(presents) to Race.name in one Race instance, Race.city in another Race instance and Race.state in another Race instance and Registration.city in another instance and Registration.state in another instance then I should get the result as


Race.Name Race Instance
Registration.city Instance
Registration.state instnace
Race.city Race Instance
Race.state Race Instance

That means we should give first preference (boost) to Race.Name and then prefernce to associated properties like city and state in Registration and finally to other properties in Race domain . for that i have configured boost in Race and registration like this :

Race ::
static searchable = {
[except : ['id','version','distance','cost','maxRunners'] ]
spellCheck "include"
registrations component : true
boost name 4.0
}

Registration ::

static searchable = {
[except : ['id','version','dateCreated','paid','dateOfBirth'] ]
root false

boost city : 3.0
boost state : 3.0

}

But still i am getting Race.city and Race.state earlier than Registration.city and state values in search result.


please help me on this.








12 years ago
Thanks a lot. You helped me a lot :-)
12 years ago

I am working searchable plugin in grails app to have sophisticated search functionality in my app.

Though it is working exceptionally well, Here i have small doubt i have.

Suppose i have domain property as name and the values for the name in the DB is :

Praveen race
Praveen Kuma race
Praveen Kumar Race

When i searched as "Praveen race" the data is coming as

Praveen Kuma race ............................
Praveen Kumar Race ..............................
Praveen race ....................................

But the user expects Praveen race row is the first one as there is exact match with "Praveen race" right ?. I have not configured any sort functionality.

Please help me out.




12 years ago
Thanks Gregg Bolinger for your reply.

I know how to stop the running server instance. I thought it be would be good if they provides the stop-app command. Any way Thanks.

We always prefer simple and best way to do things.

12 years ago
We have command to run the Grails app (run-app) and many editors supporting it. Basically the command starts the underlying server like tomcat and whatever it is.

Why they have not provided stop app command to stop the running app. Stopping the server is not much difficult right (Unix it is very very simple).

[removed useless and annoying !! from subject - GB]
12 years ago
Thanks a lot Halley Thomas :-) .

I can see bunch of overloaded methods there. I am sure that with the help of default methods we can do groovy things :-).



12 years ago
I am new to Groovy world and the language is pretty interesting.

I am going many samples on groovy language,

I found that we can apply many closures to the list like collect , multiply , find, findAll and every and any. I have gone through http://groovy.codehaus.org/groovy-jdk/java/util/List.html api to verify what are other closures we can apply on list. Surprisingly I could not find any above mentioned closures on List api.


I am not getting how this closures are not mentioned in api when we are using closures on the list ?

Please clear this doubt,
12 years ago
Hi peter,

Very good stuff regarding the response time of the web app. Thanks a lot.

I am sure that response time is one of the main thing we need consider when you are tuning the web app. In addition too we need to consider many other things.

Could please direct me to that material.

Thanks
Praveen
13 years ago
Thanks a lot for your reply. But i did not get answer fully to my question.

Please help me out.


Thanks
Praveen
13 years ago
Hi,

I don't have much idea on how to do performance tunes to the any application. Now I would like to get the solid knowledge on performance tuning.

Could any one tell me what are the standards of any web app and normal app ?.


Pl. provide good stuff on performance tuning.





Thanks
Praveen.
13 years ago