python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
bitwise operations with c++11 enums
I have this c++11 class which contains a variety of enums. These enums contain bitmasks which eventual all get combined together into an 8-bit values using bitwise operators.
It looks like this:
class...
scottc11
Votes: 0
Answers: 1
How to write an extension that calculates bitmask from a given list of enums
I have an enum
public enum MyEnum{
None =0,
First = 1,
Second = 2,
Thirds = 4
}
I have a list of these enums
List<MyEnum> MyEnumList;
I would like to get a bitmask result of MyEnum...
Murometz80
Votes: 0
Answers: 1
Bit-masking - C++ to Python
I have come across a C++ function in my work that extracts integer numbers from a 16bit unsigned integer using bit-masking.
I need to port this over to Python, and am unsure if the same syntax is vali...
Jack Rolph
Votes: 0
Answers: 1
Checking integer tuples for binary conditions efficiently
I am writing a piece of code which takes 5 lists of integers (ships), a bitmask (hits) and outputs the number of 5-tuples (one integer from each list) that are consistent with the following two condit...
user6353
Votes: 0
Answers: 1