Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Atul More

Ranch Hand
+ Follow
since Dec 26, 2016
Atul likes ...
Java jQuery Spring
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
9
Received in last 30 days
1
Total given
6
Given in last 30 days
4
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Atul More

Hi,

I have a code and I want to find out the most exact match string.



So it should return me "What is a".

The code I have return me multiple statements.
Can somebody help me.


Thanks,
Atul
Spring framework, Security, Web, Rest, Social, Integration, Test, Boot, Orm.
I have used Spring in almost all the projects.
At few points it is the good option like Security, Rest. Easy configurations with extensive functionality and use.
1 week ago
Hi,

Follow this URL, might be it will help you.

Spring Junit Test

Thanks,
Atul
1 week ago
Thank you Camplbell for your inputs.
3 weeks ago
Hi Campbell,

Thanks for pointers.
I am searching on the internet and found this java class. Which allow me to read a file. Also allow me to start from a position where I left last time.

RandomAccessFile

As I mentioned earlier as well, I need to read the file again but I dont want to read it from the beginning but from the position where I left earlier.

Thanks,
Atul
3 weeks ago
Hi,

How can I read a file (E.g.- log file) periodically which is updating continuously.
Lets say I started reading file. After 1 minute again I came and read a file again.
But here I want to read a file from the next where I left.
How can I achieve this?
Is Java classes allow me to read a file from in between?

I am not looking for code but a pointers like how can I achieve this? What things I need to look at if I will go for complete implementation.

Thanks,
Atul
If you'd like to stay with that architecture for some more time, consider using a custom interceptor (based on SpringBeanAutowiringInterceptor source code if you like) managing a local ApplicationContext, possibly in interaction with an EJB 3.1 @Singleton, or a CDI-Spring bridge instead.
4 weeks ago
HI,

You need to mention spring mvc ralated mapping in web.xml and create the mvc xml file which contains the required bean definitions.

Atul
4 weeks ago

Piet Souris wrote:hi Carey,

whether you will use the SumCount.collect in parallel or not, you must provide a non-null adder of two SumCounts. Now, given the SumCount, it is hard to say what the "sum"of two SumCounts should do, but as you write, it is not being used, so it really doesn't matter.

So add something like this to SumCount:

and make this change:

and your code compiles and runs, with nothing but SUCCESSES.

However, whatever your algorithm is, it differs from my interpretation. For example, running your code, I get SUCCESS "message are", 501, -1
while my algo would give +1 (it would not do any split). But I must admit: I did hardly test my code, so a handful of bugs is not unlikely.

But most of all: will Atul still be enthousiastic about Streams?   





Piet .. Yes still enthousiastic about Streams 
Thanks for the help.
@Carey: No its not. Just build a logic. Even you can build it by other way.
I just want the count, not any other thing.
Hi All,

First of all sorry it is my mistake that I have given a wrong example.
The example is: calculateBreakPoint("Atul More is java developer", 9);//3
Let me explain few points:
I have to read a string.
Based on the criteria, I have to break it in such a way that a bunch of word's length should not go beyond the given criteria.
When the criteria matched with the word length count, the break point count increased by 1.

So, I build a logic, to read a string in reverse order, read each word and calculate its length with criteria. Till the criteria level does not match I added a word length. One it match I assume it as a break point and added 1 to counter.

@Piet: Sorry it was wrong example, the correct one I mentioned above. Now the break point count should be 3. Please check.
@Divyansh: The explanation is as per above.
@Carey: Sorry it is -1 but it is my mistake and kept it as 1.

Thanks,
Atul
Hi,

I have to write a functionality in which I have a string and I need to break it in such a way that it should break on the length. I need to count the break points.
E.g. - "Atul More is java developer" and breakPointLength is lets say 8. So the String should break in 4 points like "Atul", "More", "is java", "developer".
The criteria for String is: not greater than 500 characters and breakPointLength should not greater than 500.
Below is the program:



I have a question, can I write the same thing using Java8 streams, though the string converted into array after split.
I tried it convert it but not able to succeed as I am not able to backtrack on the previous element from the current element on the stream.

Thanks,
Atul
Hi Prasad,

Thanks for reply.
The thing was came to my mind as well but I was not sure, whether it will work or not as I am new to Java8 functional programming.

I made some changes to the solution which you provide and its working as expected.

Thank you,
Atul
Hi,

I want to filter a list, which contains some data object. Based on the criteria I want to filter out the object of the list and return the list.
Below is the code for reference.


From the above, I want only one object in the final list which contains the "abc".
I missed the code, can somebody help me to get the fileter list based on the criteria.

Thanks,
Atul