Samrat Som

Ranch Hand
+ Follow
since Feb 04, 2009
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Samrat Som

Hi All.

After a long time here in this forum  

I am looking for a kind of solution where we have to dynamically generate pdf or word document based on some parameters using some predefined template. Now I need some suggestion, how to go ahead and attack the problem.
What I understand is to convert the template into a XML and then parse the XML and generate the PDF with the dynamic values on the run time. Please help me here with your suggestion or approach.

Thanks in advance
Samrat
7 years ago
Hi Chris,

Thanks a lot for takingout your precious time to resolve this issue.
actually your suggestion of forlop of cursor is good and readable.

there was an issue with my snippet and i have found it.
Basically after

Fetch d into v_old_id,v_new_id;
exit when d%notfound; -----> This was missing and therefore it was going to infinite loop
10 years ago
I have problem in PL/SQL
Let me tell you , there is a table and I want to do the matching algorithm

Table Name : uf_sam_reassign_match
OLD_ID NEW_ID
1 1
2 1
2 2
3 2
4 1
4 3

Desired output should be in the table uf_sam_reassign_match_actual1

OLD_ID NEW_ID
1 1
2 2
4 3


The PL/SQL Snippet for the same is





But somehow at the row 4 of table uf_sam_reassign_match mentioned below its going to a infinite loop

Old_Id New_id
3 2


Please help me here.
I dont have any clue why its going to a infinite loop.


Thanks in Advance.
10 years ago
The correct answer is abc123. As the synchronized method are class level lock and the numbers.start () thread would only get access to the synchronized method say(). only after letters.start() thread has completed its execution. This is the final answer , as I suppose.
Thanks a lot....Anastasia
Thanks Anastasia,

As my understanding goes , we need to override the hashcode function to extract the value ,which we can do it with the help of equals without considering the map data structure.
Map helps for quicker retrieval with the help od hashcode method with the help of equals.
I think hashcode implementation needs to be made mandatory rather than leaving it to decision of the programmer to override it.Otherwise , it beats the basic purpose of Map implementation.

Please add if I am wrong
Buckets are basically a data structure that is being used in the Paging algorithm of the Operating System . To be in a very Laymans language.

1.Buckets are stored in the heap.

2.The objects representing a particular hashcode is being stored in that bucket.(basically you can consider the header of the linked list data structure to be the hashcode value which is represented in the terms of bucket)

3.The references of the object is being stored in the link list , whose header represents the value of the Hashcode.

4. The JVM creates them and the size, depends upon the memory being allocated by the JVM.

I hope I have tried to clear your doubts.
14 years ago
Welcome to the group of Sun ceritified professionals.....njoy
14 years ago
This contract will only comes into play when we are overriding
Equals
Hashcode.

But one question creeps in my mind . Though, I understand the previous statement ,but someway or somehow. There pops up a doubt. As according to the concept of Maps, the hashcode helps to find out the right bucket and then equals find out the right object referencing to it.

Even if we are not overriding the hash method , but internally the without overriden hash method should also adopt this kind of approach, mentioned theoretically.
Hi I am preparing for the SCWCD and just in the first few pages of HFSJ. I deployed a servlet using Tomcat. But there is a doubt that bugging me a lot.

Whenever we deploy a webapps , we need to make a entry into the server.xml. Can it be more dynamic .Actually I am compiling the classes in the separate directory and putting it to the Tomcat /webapps folder with the help of the ANT build Script.

Suppose I created a Webapps and directly put the classes file in the Tomcat home and restart it, can able to find the webapps to be working, without always making an entry to the server.xml.

Or

Is there anything in the ANT Build script where we can make a change to the file by searching a particular string .Such as making an entry in the Server.xml file.

Thanks in Advance
14 years ago
Congr8s and do a party on your success...please include us
14 years ago
Congr8s...and have a gala party for it
14 years ago
Static Method ---> Class Level
Normal Method --> Instance Level.

Static method are being called by the class name. Basically this is needed when we want to achieve an objective in the class level. Whereas In Normal method , it can be called on the instance level
14 years ago
Hi.
I need help in reading Red,Green,Blue components of a Portable Pixel Map image stored in a file .After reading this components,i must then covert them to Grayscale.

Can anybody put some light in it. Thanks in Advance.
14 years ago