M Hasan

Ranch Hand
+ Follow
since Oct 22, 2016
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
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by M Hasan

Hi, I am learning spring mvc for a month now. Previously  i worked in jsp and jsf .now my question is what should i focus more jsp or jsf with spring. Most of the online tutorials and books use jsp with spring. My friend who works for a company told me that he uses thymeleaf. Now please tell me what to focus more..should i start learning thymeleaf or focus more advance jsp or jsf?
7 years ago
@Tim Cooke sorry. What I mean here is when I run the application it behave like @InitBinder is not there ..that means whether it is there or not the application behave same. For an example when I give a name, if the name does not contain Mr/Mrs then it should add Ms ..this is not working plus the date suppose to be like 2008/10/10 but I am using InitBinding so that even I put 2008-10-10 then it should work .
7 years ago
Hi I am learning Spring Framework. I was trying to implement @InitBinder to the project and I do not know why it is not working. Please help to figure the bug.












spring-dispatcher-servlet.xml


web.xml :



The project runs with no error but @InitBinder not working.
7 years ago
Thanks. It was nice that you took your time to rewrite it.
7 years ago
I found this question at http://www.programcreek.com/2015/03/leetcode-odd-even-linked-list-java/.
I debug the soltion and understood a bit. Here is the code:


My problem is I do not understand two parts:
1. Why ListNode connectNode = head.next; needed?
2. Why p1.next = connectNode; needed?

If we are changing the nodes towards the while loop than why need to connect them using connectNode. Are not they already connected?
Is there any better approach?
7 years ago
Mr. Junilu Lacar if I were like you I would not use that words "Don't expect us to spoon feed you the answer". Respect people or know how not to hurt some one's feeling. I tried I could not solve it. That's why I am here.  You sir opened javaranch to help people not to hurt people. If it pleases, here is the answer:

arr.length --> 3
arr[i].length --> 4
7 years ago
Here the code now and I am in the limbo. Need help.

7 years ago
Thanks for that. You are right I don't need that inner if condition. But still I could not solve it.
7 years ago
I am trying to solve a problem. It works for m x m  matrix not for m x n .so the problem is, a m x m or m x n matrix has only one 0 in somewhere. If we encounter 0 we have to make 0 towards to its row and column. For an example:

1 2 3 5
4 5 6 8
0 7 9 1
should give:

0 2 3 5
0 5 6 8
0 0 0 0

Here is my code:

7 years ago
Thanks Praveen for your help. I will try this later today.
7 years ago
Thanks Praveen and Paul. Sorry praveen you understand me wrong. I certainly understand the different between Recursion and Nested Loop. After all it is not possible to finish degree in CS without knowing the main difference between them. But Paul, I appreciate your answer too as you asked me to specify what kind of problem I face little hard. As an example :



I believe I have to practice more on these kind of problem. But any kind of direction from you guys can boost my skill may be.

Thanks
7 years ago
Hello there,
I need some suggestion or help. I have completed my BSc in CS. Still looking around for Job. But the biggest challenge I am facing is recursion. I can do simple recursion with no problem but when it comes recursion with while or for loop, I get completely lost. Two of my interview I faced with tracing recursion problem. I was able to answer all problems on time but I was so disappoint with recursion problem. I need some suggestion what to do or which direction can help me to get more comfortable with recursion problems.

Thanks.
7 years ago
For an example if the arraylist = [0, 0, 0, 1, 1, 1, 1, 2]
The output has to be = [1, 1, 1, 1]

I found this question in Elements of Programming Interviews in Java book.
7 years ago
Hi, I am trying to solve a problem in a book. Here it is:

Write a program that takes an array/arraylist of integer and finds the length of a longest sub array/arraylist whose entries are equal.



I need help to solve it. Thanks
7 years ago