I'm sure there's a good reason, but could someone please explain why the java.util.Set interface lacks get(int Index), or any similar get() method?
It seems that sets are great for putting things into, but I can't find an elegant way of retrieving a single item from it.
If I know I want the first item, I can use set.iterator().next(), ...
How does Informatica handle unstructured data sources like PDF. If a tabular report is stored as a PDF, can we read it out from PDF as a tabular data (like a data table in .net)?
...
I've created the following structure which maps unique double values to one or more pairs of integers:
@SuppressWarnings("boxing")
private static final HashMap<Double, Integer[][]> rules =
new HashMap<Double, Integer[][]>() {
private static final long serialVersionUID = 1L;
{
put(-0.6, new Integ...
Could you recommend a good book on C# algorithms and data structures? I am looking for something that is intermediary to advanced as a difficulty level. Java would also be acceptable, but I would prefer a book on C#.
...
Let's say I have a struct defined as:
typedef
struct number{
int areaCode;
int prefix;
int suffix;
} PhoneNumber;
When I create an instance of this struct, if I use the following syntax:
PhoneNumber homePhone = {858, 555, 1234};
...which constructor is it calling? The default constructor, or the copy constructor, or non...
Looking at the implementation on Wikipedia, it would seem that a standard BST (non self balancing) never re-arranges itself during inserts, and so the very first item added will always be the root. Is this correct? If so, doesn't that mean that there is the potential for a BST to often have much worse than O(logN)?
Using this as a refer...
Hi, I'm creating a movies website, IMDB.com like.. I'm really new to PHP and programming at all but I have some books and StackOverflow of course :)
I have already done lot of the work, but now I have more than 600 lines of code (PHO only) per page and more than 20 database tables only for storing and geting the movie data (many-to-many...
Hi .
I googled for a Tree Visualization Framework or something like that in C++ .
And i wondered that i didn't find anything like that.
Are There any (good) Framework to draw a Tree (or other Data Structures) ?
It should be in C++.
...
I want to use a data structure for sorting space-time data (x,y,z,time).
Currently a processing algorithm searches a set of 4D (x,y,z,time) points, given a spherical (3d) spacial radius and a linear (1d) time radius, marking for each point, which other points are within those radii. The reason is that after processing, I can ask any 4D ...
More specifically, there's something wrong with my nearest neighbor search. I've confirmed that the tree is built correctly, and that all the helper functions work as expected.
Note this differs slightly from standard KD-trees in that I'm looking for the closest 3 points.
struct Node
{
unsigned int axis;
Point* obj;
struct Node* left...
What suggestions do people have for a timeslot data structure?
I have a number of activities and I'm planning to display them in a datagrid with days as columns and timeslots as rows. This suggests to me a timeslot data structure with 5 properties for the five days (the columns) for every value I want to use e.g. a timeslot ID and the n...
What I really like in C# are generic lists. A list that can contain only one type of objects.
Is there something like a generic list in Cocoa/Objective-C? As far I only know NSArray who will take a pointer to any object.
...
I want to create a HashMap in java for users with preferences. This would be easy to do in a database, but unfortunately I can't use a database. What I need is a way to find a user by name in the HashMap, and to find all the users with a certain interest (e.g. golf). If I delete a user, then all their interests should be deleted.
Anyon...
I'm currently working on implementing a list-type structure at work, and I need it to be crazy effective. In my search for effective data structures I stumbled across a patent for a quad liked list, and this sparked my interest enough to make me forget about my current task and start investigating the quad list instead. Unfortunately, in...
Please give me some hints on my issue.
I'm building a queue data structure that:
has a backup on hard disk at realtime
and can restore the backup
Can respond to massive enqueue/dequeue request
Thank you!
...
I have the following data:
User System SubSystem
user1 System1 SubSystem1
user2 System1 SubSystem2
user3 N/A N/A
and i need to be able to determine the system/subsystem tuple from the user. I must be able to add users at any time without rebuilding and redeploying the system
I know the database would be the best option ...
Is there a way to read cobol data in a Java program? More concretely I'm confronted with the following case:
I have a file with fixed length records of data. The data definition is done as Cobol copybooks. What I think of is a library which taking into account the copybooks would be able to read those records.
Ideally it should be pos...
I only see a Queue interface, is there no Queue class in the Java Collections?
...
Duplicate: http://stackoverflow.com/questions/769097/choosing-a-stl-container
I'm looking for a data structure that acts like a set in that it doesn't allow duplicates to be inserted, but also knows the order in which the items were inserted. It would basically be a combination of a set and list/vector.
I would just use a list/vector a...
I'm looking for a data structure that is basically a bounded stack.
If I declare that the stack can hold at most 3 items, and I push another item in,
the oldest item is popped.
...