Win a copy of Terraform in Action this week in the Cloud forum!

Deyna Cegielski

Ranch Hand
+ Follow
since Nov 24, 2004
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 Deyna Cegielski

I'm trying to create a task list to process so i can check their results afterwards although im getting a bit stuck. Heres what i have so far.



I am getting a ClassCastException.

Thanks
Hi, im having trouble performing assertions of datasets and tables due to null values in some of the columns.

Consider the table TBL with columns COL1, COL2, COL3, COL4 COL5 and COL3 is optional.

My initial dataset would look like this (as this would be the norm for a row in this table):

<dataset>
<TBL COL1="val" COL2="val" COL4="val" COL5="val"/>
</dataset>

Now, i want to DELETE this row, so my expected dataset would be:

<dataset>
<TBL/>
</dataset>

So when create the actual dataset and compare that against the expected dataset they are exactly the same (if i output them to xml) but the assertion fails with a column count error (expected 0, found 5).

I dont understand why because i am comparing datasets and not tables (and columns).

Any help would be appreciated.
14 years ago
thanks, that was what i was after, a pool of x threads continuously running and services requests until the requests stop!
Hi,

im writing an application that needs to process x number of rows in a database (1000's) in a multi threaded applcation. i do not want to go to the database once and retrieve all the rows but instead implement a simple cache of size y to store the data in and make subsequent calls to the database for another y rows when they are all processed. is this a good approach and how would i go about implementing it - i was thinking about using an ArrayList and tailoring it towards my needs.

Thanks,
14 years ago
Thanks, in that light, lets forget about how ive implemented the executor, using one of the executors in Java 5, how would i initialise it to start managing the threads and tasks?
I've created my own PooledExecutor to create and manage a variable size thread pool. I've become a bit unstuck as to how to actually "initiate" the executor so to speak so that it begins to create threads and assign tasks to them.

Thanks
after some more thinking, i was wondering whether i could utilize a builder design pattern with the factory/dao pattern so that the factory creates the type of object i want (which can best be described as a composite object, made up of a data pertaining to multiple tables (and multiple rows), over multiple schemas. then the DAO.build() uses the builder to actually construct the object.
14 years ago
Would this be considered bad design?

I am considering writing a Data Transfter Objects factory to go with a Data Access Objects factory for creating Data Transfter Objects which are essentially java representations of a table from an oracle database (there are a lot of tables!). The implementation of the Data Transfter Objects will then be hidden from the Data Access Objects.

//get instance of dao factory
//call a method of the dao, e.g. build()
//build() gets and instance of dto factory
//build() creates the necessary dto's for the dao

Thanks.
14 years ago
I was wonder if this was possible...

I've written a factory which is instantiated by the main application. I also have some threads that want to use that factory to create some DAO's. is there a way for the thread to access the factory without explicitly giving the thread a reference to it upon its creation?

Thanks.
14 years ago
thanks i must have missed those, pinpointing the method your after cna be quite tricky at times
15 years ago
my help interface consists of a split pane with a jtree on the left and a jeditorpane on the right.

clicking on a node in the tree heirarchy loads the relevant page into the editorpane

ive added a toolbar that lets you move back and forward through your visited page history (similar to ie). the problem is the last node selected before you start using the back and forward buttons remains selected throughout.

is there a method that explicitly highlights a particular node item, so when a user clicks back, the node that is highlighted becomes deselected and the node whos page has just loaded becomes highlighted.

thanks
[ April 21, 2006: Message edited by: Deyna Cegielski ]
15 years ago
is there anyways to sort a vector into ascending/descending order?
im trying to do this for a vector of dates.
15 years ago
a section of my program that im writing requires some data comparisons betweens the current date and a date stored in the database. im running into 2 problems atm which i cant see to fix.

1. inserting the dates into the database
orginally i was using strings but was told it is better to use the DATE type. ive got a text field for a date in which the format is checked to be consistent to dd/mm/yyyy using a small class i wrote (returns a boolean) before a new record is added to the database. this was working fine with the date being stored as a string but now i am using a DATE and a date like 20/04/2006 wont be stored in the db as 2006-04-20 instead its stored as something slightly random.

2. retrieving dates from the database
i am trying to exract the date from the database using the resultset.getDate("startDate") method into a java.util.date object. from here i want to compare it to another date object (the current date) to test if the retreived date is less than say x weeks away (then do my intended handling of the data).

any help would be appreciated! i havent got much hair left to pull out!
[ April 20, 2006: Message edited by: Deyna Cegielski ]
15 years ago
ive been implementing a help system that uses a splitpane with a jtree in the left side (which allows the user to navigate to diferent help sections) and a jeditorpane in the right side (which will display the information).

ive setup to jtree with no problems and added the treeselectioneventlistener to listen and respond to changes in selection, but ive become a little unstuck as to how i am going to translate a selection, into loadin the appropriate document into the jeditorpane.

any ideas?

been working on this most of the afternoon there may be an easier way to do this but i have been trying to get the index of the selected node, its parent(if it has one) and its grandparent(if it has one) and so forth...

e.g.

-root1
--node1
--node2
--root2
----node1
----node2

so if the user selects node 2 in root 2 i want to be able to get the index path to the node, i.e 0,2,1 (have my own plans of what i want to do with this path). getting he correct path is proving to be tricky.

any help would be appreciated

[ April 20, 2006: Message edited by: Deyna Cegielski ]
[ April 20, 2006: Message edited by: Deyna Cegielski ]
15 years ago
yup, that fixed it, cheers!
15 years ago