bitmask
When is it better to store flags as a bitmask rather than using an associative table?
I’m working on an application where users have different permissions to use different features (e.g. Read, Create, Download, Print, Approve, etc.). The list of permissions isn’t expected to change o[详细]
2023-02-26 06:32 分类:问答why am I getting a segfault error from the following code in C?
I have a project due in my operating systems class where I\'m supposed to simulate a translation lookaside buffer.[详细]
2023-02-26 01:59 分类:问答Best way to generate the following bitmask for a given input?
I\'m trying to find out the best way to generate the following bitmask : - For a given input n, the output would be a bitmask which has the first (n-1) bits set, and all other bits unset开发者_如何转开[详细]
2023-02-20 11:08 分类:问答Getting upper and lower byte of an integer in C# and putting it as a char array to send to a com port, how?
In C I would do this int number = 3510; char upper = number >> 8; char lower = number && 8;[详细]
2023-02-19 17:05 分类:问答FilterIterator bitmask (or bitfield)
I\'m struggling with bitmasks (or is it bitfields?). I\'m not sure how to do it anymore. I want to create a DirectoryFilterIterator that accepts flags of what to filter. I thought I\'d use these bits[详细]
2023-02-17 18:48 分类:问答Examining Binary File for Information using Bit Masks
I have been given the following programming task (edited to obscure mission-specifics): The raw (binary) file (needed for Phase II implementation) can be interrogated to detect if pods are present.F[详细]
2023-02-16 13:10 分类:问答TopCoder FourBlocks problem
The code below is an answer to a popular topcoder problem FourBlocks(You need to log in). The solution uses bitmask memoization to find the max sum in the grid using blocks of size 1 and a square bloc[详细]
2023-02-10 06:51 分类:问答Python bitmask (variable length)
in order to solve one research problem we have to organise the bitmask search in python. As an input we have a raw data (we present it as a sequence of bits). Size is smth about 1,5Gb.[详细]
2023-02-08 17:27 分类:问答Java stripping zeros from function
I\'m trying to flip some bytes around in Java and the function I have is working correctly for some bytes and failing for others.[详细]
2023-02-06 21:14 分类:问答Storing flags in a DB
In my application, I\'d like the user to select his working days. then store them in the database. Of course my applicati开发者_StackOverflow社区on will process the users\' data like: Is today a worki[详细]
2023-02-05 03:42 分类:问答