flags Questions

6

Solved

I'm looking for a package that would take a string such as -v --format "some example" -i test and parse it into a slice of strings, handling quotes, spaces, etc. properly: -v --format some example...
Mayda asked 6/12, 2015 at 14:53

11

Solved

Given a case where I have an object that may be in one or more true/false states, I've always been a little fuzzy on why programmers frequently use flags+bitmasks instead of just using several bool...
Carousel asked 10/9, 2009 at 17:12

6

Solved

I'm trying to update my C++ compiler to C++11. I have searched a bit and I have come to the conclusion that I have to use the flag -std=c++0x or -std=gnu++0x, but I don't know many things about fla...
Fellah asked 28/4, 2012 at 12:52

2

Solved

I am trying to get into testing in Python using the doctest module. At the moment I do Write the tests for the functions. implement the functions code. If Tests pass, write more tests and more co...
Herriot asked 9/4, 2012 at 21:31

2

Solved

I am looking for a way to pass miscellaneous options using runpy or other tools. In particular, I would like to get the output of an optimized python script in another non-optimized python script. ...
Underlet asked 12/7, 2021 at 10:30

4

I'm trying to add specific flags of chrome (flags that are found in "chrome://flags/") to the running of my browser in the tests. The flags I'm trying to enable are: "#enable-webgl-draft-extens...
Hamilton asked 30/5, 2018 at 14:58

11

Solved

Do you know any Java cookie implementation which allows to set a custom flag for cookie, like SameSite=strict? It seems that javax.servlet.http.Cookie has a strictly limited set of flags which can ...
Covington asked 10/3, 2017 at 11:23

5

Solved

The question I have is about the flag I have here for the while loop. This works but not like I think it should. I assume I'm not understanding something so if someone is able to explain, that woul...
Oller asked 19/12, 2020 at 6:33

8

Solved

I've got an Enum marked with the [Flags] attribute as follows: [Flags] public enum Tag : int { None = 0, PrimaryNav = 1, HideChildPages = 2, HomePage = 4, FooterLink = 8 } On sitemapnodes i...
Bedwarmer asked 9/3, 2010 at 12:39

6

Solved

I need to emulate enum type in Javascript and approach seems pretty straight forward: var MyEnum = {Left = 1; Right = 2; Top = 4; Bottom = 8} Now, in C# I could combine those values like this: ...
Rollerskate asked 26/10, 2009 at 17:50

3

Solved

Consider I have this extension method: public static bool HasAnyFlagInCommon(this System.Enum type, Enum value) { var flags = value.ToString().Split(new string[] { ", " }, StringSplitOpti...
Drover asked 13/12, 2012 at 18:38

2

Solved

I use python 3.4 , pyQt5 and Qt designer (Winpython distribution). I like the idea of making guis by designer and importing them in python with setupUi. I'm able to show MainWindows and QDialogs. H...
Seavey asked 29/11, 2016 at 13:16

8

Solved

I am asking this out of a curiosity. Basically my question is when you have a database which needs a row entry to have things which act like flags, what is the best practice? A good example of this...
Alberich asked 24/9, 2008 at 1:12

2

The following CMakeLists.txt SET(CMAKE_CXX_FLAGS "/DWIN32") SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS}) add_executable(hello hello.cpp) ends up running C:\Program Files (x86)\Microsoft Visual Stu...
Gilpin asked 6/6, 2013 at 15:5

5

After performing a mathematical operation, for say, multiplying two integers, is it possible to access the overflow flag register in a CPU with C++ ? If not what are other fast ways to check for an...
Matthias asked 16/1, 2013 at 12:52

2

Solved

Is there a flag or some special key in python to use pattern multiple times. I used to test http://gskinner.com/RegExr/ my RegExp, it worked correctly in it. But when testing in correct enviorment ...
Babysit asked 27/7, 2012 at 11:5

2

Solved

So I may be pushing the boundaries just a bit... Basically I have the following enum, declared in C# code: [Flags] public enum FlaggedEnum : int { Option1 = 1, Option2 = 2, Option3 = 4, Optio...
Debbi asked 10/10, 2009 at 5:14

5

Solved

I have a problem with flag bits. I have an int variable to hold flags. First I set some flags to that variable. Later I need check how many flags were set in that variable. But I don't know to do i...
Vitelline asked 20/5, 2011 at 4:17

8

Solved

Is there a way to add an "All values" option to an enum without having to change its value every time a new value is added to the enum? [Flags] public enum SomeEnum { SomeValue = 1, SomeValue2 ...
Renettarenew asked 13/12, 2011 at 11:19

1

Solved

I'm trying to run tests which call the same function multiple times with different arguments each time. This is an application that accepts different command line flags. If no commandline flag is s...
Kilimanjaro asked 17/9, 2019 at 7:49

3

Solved

To lock my orientation to portrait, I use: activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); I'm unsure what flag tells the activity to go back to relying on the device or...
Embry asked 15/6, 2011 at 16:43

6

Solved

For the sake of curiosity I'm trying to read the flag register and print it out in a nice way. I've tried reading it using gcc's asm keyword, but i can't get it to work. Any hints how to do it? I...
Bloomer asked 29/7, 2011 at 16:25

3

Solved

I have created a simple application having a button. Clicking it triggers a notification, and clicking on the notification launches a new instance of the same application. However, I wanted that cl...
Isomorphism asked 8/4, 2013 at 14:46

4

Solved

I'm using this line below in order to set a strikethrough on my TextView: tv.setPaintFlags(tv.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); However later on in the Fragment, if they click the ...
Raouf asked 18/9, 2013 at 20:31

11

For the life of me, I can't remember how to set, delete, toggle or test a bit in a bitfield. Either I'm unsure or I mix them up because I rarely need these. So a "bit-cheat-sheet" would be nice to ...
Entebbe asked 18/9, 2008 at 15:46

© 2022 - 2024 — McMap. All rights reserved.