Top "Set" questions

A set is a collection in which no element is repeated, which may be able to enumerate its elements according to an ordering criterion (an "ordered set") or retain no order (an "unordered set").

Swift Set to Array

An NSSet can be converted to Array using set.allObjects() but there is no such method in the new Set (…

arrays swift set
Use curly braces to initialize a Set in Python

I'm learning python, and I have a novice question about initializing sets. Through testing, I've discovered that a set can …

python python-2.7 set
Copying sets Java

Is there a way to copy a TreeSet? That is, is it possible to go Set <Item> itemList; …

java copy set
Set the Value of a Hidden field using JQuery

I want to set the value of a hidden field, using JQuery. Hidden Field: <input id="chag_sort" type="…

javascript jquery set hidden-field
Python Set Comprehension

So I have these two problems for a homework assignment and I'm stuck on the second one. Use a Python …

python set set-comprehension
Deleting elements from std::set while iterating

I need to go through a set and remove elements that meet a predefined criteria. This is the test code …

c++ iterator set std c++-standard-library
How to get all subsets of a set? (powerset)

Given a set {0, 1, 2, 3} How can I produce the subsets: [set(), {0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}, {0, 1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}, {0, 1, 2, 3}]

python set powerset
How do I add the contents of an iterable to a set?

What is the "one [...] obvious way" to add all items of an iterable to an existing set?

python set conventions iterable
c# - How to iterate through classes fields and set properties

I am not sure if this is possible but I want to iterate through a class and set a field …

c# class properties set field
Collection that allows only unique items in .NET?

Is there a collection in C# that will not let you add duplicate items to it? For example, with the …

c# set hashset