Palraj Jayaraj

Ranch Hand
+ Follow
since Jun 06, 2012
Palraj likes ...
Eclipse IDE Chrome Java
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Palraj Jayaraj

We are having a view, with pulldownmenu items (Group by, Grouped by). 'Group by' has sub-menu which are the columns in the views. When any of the submenu is selected, THe view entries will be grouped with the column and also there will be a entry added to 'Group by' Menu.

We are having a util method of signature:

I use the below calls to simulate the same.



After the first statement is executed I am able to see the 'Resource' entry in the 'Grouped by' menu. But, when the second statement is being executed, I'm getting no items under 'Grouped by' in the above method.

The thing I don't understand is the submenu is present in the UI (I'm able to see it). But, when I try to access it programmatically, I'm not getting that submenu.
I'm trying to listen to events from a particular tables through DatabaseChangeListener Interface.

But, I'm able to find only a way to register for events for the database. Kindly, let me know how to listen to a single table change in the particular table.

Thanks in advance.
Hi everyone, I was taking up a challenge in 'hackerrank'. I build a solution and when i submitted the code, the first 7 Test cases of the site is getting passed and the next 3 test are failing saying "Wrong Answer". I'm sure, where the solution is wrong .

Algorithm I Used for the Problem:

1) get the No. of Busy slots.
2) Get the Starting and ending time into an array.
3) arrange them in ascending order based on the 'Starting time of the Meeting'.
4)add 1 slot in the beginning of the array: to mark the start of the day. Likewise, add a slot in the end of the array to mark the end of the day.
5) Combine 2 meetings, if they are overlapping.
6) find the time slot available between each meeting and compare with the Given 'time slot'.
7) if the 'Time slot' fits, print them.

Below is the problem:
Given M busy-time slots of N people, You need to print all the available time slots when all the N people can schedule a meeting for a duration of K minutes.
Event time will be of form HH MM ( where 0 <= HH <= 23 and 0 <= MM <= 59 ), K will be in the form minutes.

Input Format:

M K [ M number of busy time slots , K is the duration in minutes ]
Followed by M lines with 4 numbers on each line.
Each line will be of form StartHH StartMM EndHH EndMM [ Example 9Am-11Am time slot will be given as 9 00 11 00 ]
An event time slot is of form [Start Time, End Time ) . Which means it inclusive at start time but doesn’t include the end time.
So an event of form 10 00 11 00 => implies that the meeting start at 10:00 and ends at 11:00, so another meeting can start at 11:00.

Sample Input:
5 120
16 00 17 00
10 30 14 30
20 45 22 15
10 00 13 15
09 00 11 00

Sample Output:
00 00 09 00
17 00 20 45

Sample Input:
8 60
08 00 10 15
22 00 23 15
17 00 19 00
07 00 09 45
09 00 13 00
16 00 17 45
12 00 13 30
11 30 12 30

Sample Output:
00 00 07 00
13 30 16 00
19 00 22 00

Constraints :
1 <= M <= 100

Note: 24 00 has to be presented as 00 00.




Kindly, let me know, what is wrong ?

Paul
7 years ago
I want to access an 'Excel Document' in the 'Sharepoint' site, from my 'Spring Application'.

But, to open the excel document, the user has to type in the 'user name' and the 'password'. is there way to open a 'stream' (FileInputStream/OutputStream) with this file, in sharepoint??

I'm planning to use a JExcelApi to read and write the document. is there a better way to do for an Excel document in the sharepoint.

I'm thinking of WebServices. is there a way in Web services to send the Username and password to the document??

Thanks,
Paul
7 years ago
Hey Jacky,

While creating a program, I had an excel sheet under a folder named 'a' in 'resources' folder, under 'src' folder'.

When I ran the program, I also got a Null-Pointer Exception.

Please refer to the attachments named:

in Folder a_Eclipse.jpg: https://docs.google.com/file/d/0BzcpOxYvgyz3b0cwNkpMdmFiZk0/edit?usp=sharing

in Folder a_Explorer.jpg: https://docs.google.com/file/d/0BzcpOxYvgyz3cVRJNk5hNGxveHc/edit?usp=sharing




But, when I had the same excel under the 'resources' folder itself (in 'src' folder), I did not get any errors.

Please refer the attachments named:

without Folder a_Eclipse.jpg: https://docs.google.com/file/d/0BzcpOxYvgyz3WjVQMFdMMENoQmM/edit?usp=sharing

without Folder a_Explorer.jpg: https://docs.google.com/file/d/0BzcpOxYvgyz3RHdsaDhNdW9HcUU/edit?usp=sharing





have the image under 'resources' and run the program. It should solve the problem.

It is weird though, I'm not aware of the root cause. But, it should solve your problem
8 years ago
My advice is to have the 'resources' folder under the default package.

and try the below code:

I hope this works
8 years ago

I have created a java project in my home computer and I exported it as a 'Runnable Jar file'.

and I sent it over to my friend for using that. But, unfortunately I deleted the whole project from my Computer.

now, My friend needs to update the source code.

Is there a way to create a new Java project by using the 'existing runnable jar file'.

Thanks,
Paul

P.S.: I tried to decompile the class file to get the source. But, My bad that I'm getting the decompiled java files having only 'null' values
Could somebody explain me what is the significance of Return value of the method "intercept" of an Interceptor class, please?

Any tutorial or document would do.
8 years ago
Thanks Joe for the reply..

As you told me, I introduced a new class for Displaying the values.. it works fine. Thanks for the tutorial though
8 years ago
seriously I'm in dark over this. Please guide me how to do that.

Thanks in advance,
Paul
8 years ago
Thanks Joe. That was really helpful.

Now I have declared 3 actions in the struts.xml doc.
Namely:
1) welcome-which will navigate to the index.jsp
2) view- which will navigate to display.jsp
3) create- which will navigate to write.jsp

The code used is:
<action name:"welcome">
<result >
/index.jsp
</result>
</action>

And similarly for other 2 actions....

I'm using the action as below

<a:href="<s:URL action="welcome"/>"> click here to goto welcome page </a>

Is this correct way of using ??

View.jsp is able to display the value if I directly navigate from write.jsp and that too only the last entered values.

But, view.jsp loses the ability to display, of the flow goes through the index.jsp.

Could you please say me why??

Thanks again for the suggestion, will use array list
8 years ago
Hi,

I'm just trying to create an web application in struts2.x. I'm trying to emulate a simple message forum.

I'm able to load the values onto the fields in the "Bean class" objects. But, I'm unable to retrieve the values from the "Bean class" objects.

I suspect the "<s:iterator value="message_List"> field in "display.jsp" page.

Kindly, help me. Thanks in advance.

below is the code:

struts.xml



index.jsp


Display.jsp


Write.jsp


Bean class (Messages.java)


Action class (CreateMessage.java)



Thanks in advance,
Paul
8 years ago
Thanks Joe for the reply.

Sorry forgot to post the "Output".

But, Let me tell you, I just changed the getter and setter methods to the "Camel Case". It is working..

Thanks Buddy
8 years ago

I'm trying to retrieve the value of 6 properties in struts. But, for some values I'm getting as "0" (wrongly), but for others, I'm not getting the values, itself.

below is the code. Please, help resolve this. Find attached the "Project structure" as an Image file.

Another question - is there a way for logging values, events in struts?? (Just to check for step by step values in "ActionClass"

Thanks in advance,

ActionClass.java



Web.xml


struts.xml


index.jsp
8 years ago
I'm trying to retrieve the value of 6 properties in struts. But, for some values I'm getting as "0" (wrongly), but for others, I'm not getting the values, itself.

below is the code. Please, help resolve this. Find attached the "Project structure" as an Image file.

Another question - is there a way for logging values, events in struts?? (Just to check for step by step values in "ActionClass"

Thanks in advance,

ActionClass.java



struts.xml



Web.xml


index,jsp
8 years ago