set

Actuate - Class path set

How to set environment Classpath in Actuate iServer, the OS installed in the Server which we access through Putty is SunOS 5.8 The purpose for setting the env classpath is to archive old files (reports) from the encyclopedia of Actuate. ...

How can I represent sets in Perl?

I would like to represent a set in Perl. What I usually do is using a hash with some dummy value, e.g.: my %hash=(); $hash{"element1"}=1; $hash{"element5"}=1; Then use if (defined %hash{$element_name)) to decide whether an element is in the set. Is this a common practice? Any suggestions on improving this? Also, should I use defined...

How to implement std::set or std::hash_set to filter the duplicated item in an array list?

Given the below scenario, I'm having a list of item which might be having some duplicated item. I would like to filter the item, to print the only unique item. Instead of duplicating a list which remove the duplicated item, I tried to insert them into std::set and std::hash_set. Nevertheless, I found no useful example to perform the op...

Using a settable tolerance in the comparison object for an STL set

I want a tool to remove duplicate nodes ("nodes" in the finite element sense, simply a point in space with certain coordinates). Basically, I want to be able to take a collection of nodes, and reduce it by eliminating extra nodes that are within a certain tolerance in distance of other nodes. I figure that an STL set of nodes sorted by...

How can I do this 'for each' code in Sql Server 2008 without using cursors?

Hi folks, I wish to do the following pseduo code in Sql without the use of a CURSOR, if possible. for each zipcode { -- What city is this zipcode in? A zipcode can be in multiple cities, -- but one city area is always way greater that the others. -- Eg. 90210 is 96% in the city of Beverly Hills. -- The remaining 4% is...

Hibernate <set> key from joined table

I wonder if it's possible to define Set in Hibernate mapping in a such way, that element would specify not column in original (FOO) table, but in joined one (BAR). Let's say we have some FooContainer.hbm.xml, which contains Set of Foo objects: <set ...> <key column="COLUMN_FROM_BAR" /> <one-to-many class="xyz.Foo" /> </set> Here ...

What is the Use of Property {get, set} method in C # 3.0

Possible Duplicate: C# Automatic Properties Hello, I have recently moved towards .net (c#) platform from Java. Here I don't face much problem yet... anyway I 'm messed up with property{get, set} method. Actually I could not get up the exact meaning of these (property) according to me the same job of initial...

Can Python be made to generate tracing similar to bash's set -x?

Is there a similar mechanism in Python, to the effect set -x has on bash? Here's some example output from bash in this mode: + for src in cpfs.c log.c popcnt.c ssse3_popcount.c blkcache.c context.c types.c device.c ++ my_mktemp blkcache.c.o +++ mktemp -t blkcache.c.o.2160.XXX ++ p=/tmp/blkcache.c.o.2160.IKA ++ test 0 -eq 0 ++ echo /tm...

ExtJS : How to set combobox id?

Hello guys. I have a little problem. At my application Im always building two linked combobox - country and towns(then country are selected - towns began to load). So i thinked - mbe write a constructor and minimized my code? Ok i did it. But i got a problem: i have 2-3 couple of this linked comboboxes on page and when i selected at sec...

passing a value from flipsideviewcontroller to mainviewcontroller

Hi, i am tryng to pass a value from a slider on the flipside view to a instance variable on the mainview that i use to create a maximum user input number. I know that most of the code works as i can send a value across by initializing maxValue with a number in the (void) viewdidload. However, when i try to initialize it as shown below i...

how to sort a set using a Functor

hey, i am trying to sort my set container using afunctor: struct CompareCatId : public std::binary_function<Vehicale*, Vehicale*, bool> { bool operator()(Vehicle* x, Vehicle* y) const { if(x->GetVehicleType() > y->GetVehicleType()) return true; else if (x->GetVehicleType() == y->GetVehicleType() ...

Does PHP Have a Set Object?

I'm new to PHP, and I can't figure out this basic question. Does PHP have some sort of set or list object? Something like an array, but with the ability to dynamically add or remove any number of objects from it. ...

How to do binary search in a std::multiset without constructing a key_type object?

I have a container like this: // Sort functor struct SortByTime : std::binary_function<const TimeSortableData &, const TimeSortableData &, bool> { bool operator()(const TimeSortableData & a, const TimeSortableData & b) const { return a.GetTime() < b.GetTime(); } }; // Container that sorts by time typedef std::mult...

GCC Tree STL data containers

Possible Duplicate: remove_if equivalent for std::map Yesterday i wrote a program, which use multiset for storing elements like this: std::multiset < boost::shared_ptr < CEntity > > m_Entities; Then i try to use standard algorithm remove_if like this: std::remove_if(m_Entities.begin, m_Entities.end(), MarkedForDestroy); ...

how to free memory from a set

hey, i got a set that includes pointers to an allocated memory, i am using the clear method forexample : setname.clear(); and the set itself is getting cleared and his pointers but still i got memoryleaks the allocated memory stays uncleared for some reason. thanks in advance for your answer. ...

How do I initialize a std::set comparator?

I need to initialize some comparator of the new data type TType based on std::set with some object o of another class Object: typedef std::set <unsigned int, sortSet(o)> TType This declaration is otside the class (in header file). At the time of the declaration this object does not have to exist, it will be created later. class sortS...

is it possible for set to have std::vector as underlying storage for storage of its elements?

For small collections std::vector is almost certainly the best container whatever the operations applied to it are. Is it possible to have std::vector as underlying storage for the elements set container instead red-black tree involving a lot of heap allocations (maybe boost has something?) or do I have to invent it myself? Plain std::v...

Erase-remove idiom with std::set failing with constness-related error

Can someone help me out here? Compiling this code: void test() { std::set<int> test; test.insert(42); test.erase(std::remove(test.begin(), test.end(), 30), test.end()); // <- Line 33 } Is generating the following error when compiling: $ make g++ -c -Wall -pedantic-errors -Wextra -Wunused -Werror a_star.cpp /usr/lib/gcc/i686-p...

Selecting a node in the nested set model through a not-unique name

Hello, I am trying to manage the retrieval of a node in a nested set model table, not through the unique ID, but through the name (a string), and other nodes within the tree under different parents may be called the same way. As far as now I used an unique ID to get nodes inside the nested sets: SELECT node.name, node.lft, node.r...

Java Set iterator, safe for removal of elements?

I would like to iterate over a Set and remove the elements from the set that match some condition. The documentation of iterator says nothing about modifying the list while iterating over it. Is this possible? If not, what would be the best way to do it? Note that I only want to remove elements from the set that are provided by the Ite...