I have an ObservableCollection that I can't seem to get to display in a window. Here is the code:
The View Model:
public class QueryParamsVM : DependencyObject
{
public string Query { get; set; }
public QueryParamsVM()
{
Parameters = new ObservableCollection<StringPair>();
}
public ObservableCollection<St...
I would like to store tuples objects in a concurent java collection and then have an efficient, blocking query method that returns the first element matching a pattern. If no such element is available, it would block until such element is present.
For instance if I have a class:
public class Pair {
public final String first;
public...
I have a mapping defined where a parent object has a collection of child objects. In my design, I'd like to be able to delete the child objects without having to remove them from the collection on the parent object and re-saving the parent object. However, when I try this, I get the "deleted object would be re-created on save" error. ...
Hello,
I need to create a Set with initial values.
Set<String> h = new HashSet<String>();
h.add("a");
h.add("b");
Is there a way to do it in one command?
Thanks
...
Hi guys.
I need an advice in problem with TFieldDef. I need to add one additional string property to the TFieldDef called Description. I want to see that property when I iterate over TFieldDefs collection. How to do this in Delphi 2007?
Thanks for your time.
...
I have quite large List named items (>= 1,000,000 items) and some condition denoted by <cond> that selects items to be deleted and <cond> is true for many (maybe half) of items on my list.
My goal is to efficiently remove items selected by <cond> and retain all other items, source list may be modified, new list may be created - best way...
The Java Collections Framework is like the C++ Standard Template Library: "a unified architecture for representing and manipulating collections (objects that group multiple elements into a single unit)."
http://java.sun.com/docs/books/tutorial/collections/intro/index.html
...
I want to use a collection in place of 2D array so that I don't need to give its size at the time of declaration and I can add as many elements as I want dynamically.
...
Let's say you have a function (X) that takes a single object and does some work with it. It can fail in some way:
function X(obj) throws SomeException
And I have a collection of these objects, and want to run X on all of them. So I wrap that up in its own function:
function Y(objs)
foreach obj in objs
X(obj)
end
end
What is...
Is there the equivalent of a Java Set in php?
(meaning a collection that can't contain the same element twice)
...
I have a product collection that I am getting from a configurable product, and I want to filter that collection to only include products that have images attached to them. How do I go about this?
Code looks something like this:
$configurableProduct = $this->getConfigurableProduct();
$childProducts = $configurableProduct->getTypeInstanc...
My problem is not usual. Let's imagine few billions of strings. Strings are usually less then 15 characters. In this list I need to find out the number of the unique elements.
First of all, what object should I use? You shouldn't forget if I add a new element I have to check if it is already existing in the list. It is not a problem in ...
I need to do something like this...
Collection<T> myCollection; ///assume it is initialized and filled
for(Iterator<?> index = myCollection.iterator(); index.hasNext();)
{
Object item = index.next();
myCollection.remove(item);
}
Obviously this throws ConcurrentModificationException...
So I have tried this but doesn't does s...
Hi,
Is it possible to create a photo collection using the flickr API?
I haven't found any example code to achieve this, however you CAN do it on the flickr website, and i suppose flickr uses the API internally for their site?
Dennis
...
Why is ReadOnlyObservableCollection.CollectionChanged protected and not public (as the corresponding ObservableCollection.CollectionChanged is)?
What is the use of a collection implementing INotifyCollectionChanged if I can't access the CollectionChanged event?
...
I'm attempting to Serialize my custom collection UserDataCollection, made out of UserData objects. I wondered when implementing Serialization, does the actual object (UserData) also need have the attribute [Serializable] and inherit from the ISerializable interface?
I want to serialize each object (UserData) in the collection, all it's...
I have a testing scenario where I want to check if two collections are equal. I have found the class Microsoft.VisualStudio.QualityTools.UnitTesting.CollectionAssert, but it only works on ICollection<T>. Since I'm testing a repository for Entity Framework, and thus need to compare IObjectSet<T>s, that won't do - IObjectSet<T> doesn't imp...
I have this code for serializing my custom collection of UserData Objects. However the current property only represents the item currently being used in the collection, so it only serializes that one object.
I want all the objects serialized in my collection, how would I go about that in the GetObjectData implementation of my Collectio...
Before using google collections I had something similar to next code:
private Set<A> aSet = ...;
private Set<B> bSet = ...;
public Foo getFoo (Map<?, List<Bar>> bars, Set<?> set) {
for (Object item : set) {
for (Bar bar : bars.get (item)) {
//build foo;
}
}
...
}
and I was able to make calls like these:...
hi all how r u
i faced problem with datatable when i run to client it throw exception and mention the "in" in foreach.
Collection was modified; enumeration operation might not execute.
this is the code plz help:
foreach (DataRow dr in stStatusTable.Rows)
{
if (Convert.ToInt32(dr["st_id"]) == stStatus.st_id)
{
dr["st_id"...