This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Paulo Aquino

Ranch Hand
+ Follow
since Apr 29, 2002
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 Paulo Aquino

Looking forward to receive my copy, thank you!
5 years ago
Congratulations on the new book, Robert!

I've been doing application development in Java/JEE for more than 10 years now. Recently, my interest was piqued by quantitative trading and R programming had been associated with this more often than not. My question is, using your book, how can someone with a programming background be able to get up to speed in using R for specific purpose like quantitative trading? What are the particular parts of your book that someone like me should focus on?
Also, just to add, I'm currently doing the Data Scientist toolbox on coursera. Thank you.

5 years ago
Hi. Im trying to a small module and in creating the module I figured I would need a factory method for two classes.

Here is my factory class.

public FormatObjFactory{

public static FormatObj createFormatObj(String format){

if (format.equalsIgnoreCase("format1"){
return new Format1();
}else if (format.equalsIgnoreCase("format2"){
return new Format2();
}else{
return null;
}

}
}

Both Format1 and Format2 classes implement the FormatObj interface.

public class Format1 implements FormatObj{

}

public class Format2 implements FormatObj{

}

The interface contains two method signature.

public interface FormatObj{
public void createTitle();
public void createBody();
}


My problem here is I need to pass a list of specific data object per specific implementation. Meaning, if you instantiate it this way...

FormatObj obj = FormatObjFactory.createFormatObj("format1);
obj.createTitle(); // this is ok... they will have their own way of implementing the creation of title...
obj.createBody(); // I want them to have their own implementation of creating a body, however the method would need a specific object per specific implementation (meaning... format1 needs List<SpecificDTOForFormat1> list, format 2 needs List<SpecificDTOForFormat2> list)...... should have been like this ---> obj.createBody(List<SpecificDTOForFormat1> list);

The object SpecificDTOForFormat1 and SpecificDTOForFormat2 are not related at all. I was thinking if both of these objects extend from the same parent class...i could have made one of my interface methods like this...

public void createBody(List<ParentClass> listObject);

so if I do obj.createBody(List<SpecificDTOForFormat1> list) ... i think this will be accepted because they come from the same hierarchy. Unfortunately I cant edit the object structure, I just came in to write a small module and make it as a generic as possible, implement it the OOP way.

Anyone has any suggestions?


Ankit Garg wrote:As the question stands to me, I also think that the answer should be D, because the question specifically mentions HTTP servlet.

Edit: On a second thought, if we implement Servlet interface to create a servlet, we can serve HTTP requests. The words "provide an Http Servlet" in the question makes it a little confusing. If the question had said, "Which abstract class or interface must be extended or implemented to serve HTTP requests", then A would've been correct as a servlet that implements the Servlet interface can serve HTTP requests...



So the answer is still correct? Its just a matter of correct/appropriate wordings?

shwetha Gattu wrote:Hi All,
Accidentally I brought charles lyons for 310-081 instead of 083 exam. Is it ok if I read that book? I have already started reading HFSJ book as suggested by many people. Wanted to your ideas on Charles lyons book.
Thanks in advance

-Shwetha



I also accidentally bought the 310-081 book of Charles Lyons yesterday. I got it from another country so there is no more option to return it. Will this book be enough for the 310-083 exam? Thanks
Hi List,

I'm looking to develop custom components using JSF(Myfaces,trinidad,ajax4jsf,richfaces) for my masteral thesis. I was hoping some people out there have ideas on what components can be developed or improved. The plan is to contribute the output of the thesis to open source community.

Thanks...
12 years ago
JSF
Hi! Did anyone here have any experience on using JMeter with JSF? I dont know how I could pass the request parameter.
13 years ago
Thanks Bill! I've already deciphered that...I thought SAX was really that complicated...
Hey Bill...do you have any sample code that uses stax to parse xml?
I want to parse the xml then recreate it and put in inside a Stringbuffer, you might be wondering why would I parse a xml then just recrate it, actually I need to parse a huge xml and I would want to cut it section by section...so any leads?
<PurchOrder>
<PurchOrderNo>1</PurchOrderNo>
<LastChanged>1/1/01</LastChanged>
....
<PurchOrderLine>
<PurchOrdLineNo>1</PurchOrdLineNo>
<LastChanged>1/1/01</LastChanged>
....
</PurchOrderLine>
....
</PurchOrder>

I have a repeatable element(<LastChanged> How do you parse this using SAX? Where do i put the code?startElement()?characters()?endElement()? I have a very huge XML File, so SAX is the way to go. Any kind soul out there willing to help?
How's your article on Stax doing?
Passed as well! How did you know that 68% was the passing mark?
14 years ago