flags Questions
2
Solved
What is the point of the [Flags] attribute you can bit test without it?
7
Solved
I'm writng a small application in PHP + MySQL and have come to the point where there is an object that has a couple (8 so far but not expected to increase) of flags associated with it. The flags ar...
3
Solved
In some code I'm working on I should take care of ten independent parameters which can take one of two values (0 or 1). This creates 2^10 distinct conditions. Some of the conditions never occur and...
Aquamarine asked 25/4, 2010 at 7:18
3
Solved
I understand how Enums work in C#, and I get what the Flags attribute brings to the table.
I saw this question, here. Which recommends the first flavor, but doesn't provide any reason/justificatio...
5
Solved
In my keyboard hook, each keypress gets a flag that states if it was injected or not.
http://msdn.microsoft.com/en-us/library/ms644967(VS.85).aspx
I've distilled a KBDLLHOOKSTRUCT from the lParam...
1
Solved
I'm trying to figure out where to add extra warning flags like -Wall and -Wextra in Xcode, I'm using version 3.1.4 on Leopard. Apple's documentation is for an old version, if I follow their instruc...
Bridgetbridgetown asked 3/1, 2010 at 20:1
1
Solved
While trying to write a custom control I've come across a problem with the System.Windows.Forms.TextFormatFlags enum in combination with the Visual Studio (2005/2008) editor. The reason for this pr...
3
Solved
Take this scenario: You have a few flag enumerations in C# tied to (and in fact generated from) Enum-ish tables in SQL Server. Say you are a distributor, and you allow your resellers to specify wha...
Castello asked 14/11, 2009 at 0:37
4
Solved
Can anyone explain flags in Go?
flag.Parse()
var omitNewline = flag.Bool("n", false, "don't print final newline")
3
Solved
If I have an enum that's marked with [Flags], is there a way in .NET to test a value of this type to see if it only contains a single value? I can get the result I want using bit-counting, but I'd ...
1
Solved
I am currently struggling with HTTP Session replication on tomcat with complex objects.
Some objects implement Serializable but hold non-serializable members.
Unfortunately, the stacktraces do no...
Marden asked 2/11, 2009 at 10:19
6
Solved
I'm not very used to programming with flags, but I think I just found a situation where they'd be useful:
I've got a couple of objects that register themselves as listeners to certain events. What...
6
Solved
How could I make a function with flags like how Windows' CreateWindow(...style | style,...), for example, a createnum function:
int CreateNum(flag flags) //???
{
int num = 0;
if(flags == GREATER...
2
Solved
I have an array with some flag for each case.
In order to use print the array in HTML and use colspan, I need to convert this :
[{'serve': False, 'open': False}, {'serve': False, 'open': False}, {...
Batish asked 12/10, 2009 at 7:53
6
Solved
It's known that CF indicates unsigned carry out and OF indicates signed overflow. So how does an assembly program differentiate between unsigned and signed data since it's only a sequence of bits? ...
3
Solved
I have two flags:
[Flags]
enum Flags
{
A = 1,
B = 2
};
I set them like this:
Mode = Flags.A | Flags.B; // default value
for(int i = 0; i < args.Length; i++) {
switch(args[i])
{
case "--a"...
4
Solved
I have a flag attribute enumeration that is behind a web service as follows:
[Serializable,Flags]
public enum AccessLevels
{
None = 0,
Read = 1,
Write = 2,
Full = Read | Write
}
My problem i...
Candescent asked 3/2, 2009 at 0:36
2
Solved
Is there any way to enable execution-time variable expansion for cmd.exe (normally done by typing cmd /V:ON) without starting a new instance of cmd.exe?
Similarly, can other settings/flags be chan...
Frazzle asked 29/1, 2009 at 19:56
7
Solved
I'm working on a system were a user can edit existing objects ("Filter" domain objects to be exact) through a GUI. As a UI hint, we only want to enable the save button if the user really modified s...
Railey asked 14/10, 2008 at 12:7
3
Solved
C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enu...
© 2022 - 2024 — McMap. All rights reserved.