bitarray
What is the fastest way to transpose the bits in an 8x8 block on bits?
I\'m not sure the exact term for what I\'m trying to do. I have an 8x8 block of bits stored in 8 bytes, each byte stores one row. When I\'m finished, I\'d like each byte to store one column.[详细]
2023-03-24 19:51 分类:问答How to set BitArray to set specfic Bits based on value?
How do I use BitArray to do a few things such the most basic, setting a value to bits, not just bits! I am starting to regret ever using this crap called BitArray.[详细]
2023-03-18 11:02 分类:问答How to split a BitArray
I need to split an BitArray (from std.bitmanip) into its halfs. Until now I\'ve found out that slicing is not implemented, iterating over it and appending or assigning produces Out of range exception[详细]
2023-03-15 16:59 分类:问答Turning bits into values
How does a computer know that (int x, y) x << y means shift over y bits? I don\'t mean the shift part. I mean the y part. Does the computer shift x by one and subtract one from y until y == 0? I[详细]
2023-03-13 18:49 分类:问答python bitarray to and from file
I\'m writing a large bitarray to a file using this code: import bitarray bits = bitarray.bitarray(bin=\'0000011111\') #just an examp开发者_运维知识库le[详细]
2023-03-11 11:12 分类:问答how to model bitarrays in django?
What would be the best way to store a large bitarray within a django model (mysql backend)? for example, how could i store this object:[详细]
2023-03-11 06:26 分类:问答Populating a set of checkboxes based on a file
I\'m trying to figure out how to read a file (not created by my program), using a BinaryReader, and checking or unchecking a set of checkboxes accordingly.[详细]
2023-03-10 23:49 分类:问答Encoding value from the list as a BitArray
I have a list of N colors. I need to represent any of those values as a BitArray. If N = 129 to 255tha开发者_运维技巧n, obviously, each color should be represented as a BitArray with Length 8. It is s[详细]
2023-03-03 04:41 分类:问答Counting bits set in a .Net BitArray Class
I am implementing a library where I am extensively using the .Net BitArray class and need an equivalent to the Java BitSet.Cardinality() method, i.e. a method which returns the number of bits set. I w[详细]
2023-02-12 21:16 分类:问答Most efficient way to reverse the order of a BitArray?
I\'ve been wondering what the most efficient way to reverse the order of a BitArra开发者_开发问答y in C#. To be clear, I don\'t want to inverse the Bitarray by calling .Not(), I want to reverse the or[详细]
2023-02-06 19:31 分类:问答