Deciphering bitwise flags

I read the article below and believe it to be a good fit for what I'm trying to do.  I'm having a little trouble interpreting how it applies to my situation.
http://sqlmag.com/t-sql/get-wise-about-bits
I'm trying to understand what the where clause should look like below.  Let's say the CategoriesFlag value for a record is 6.  It should return orders for orders of category B, category C, or categories B and C.
CREATE TABLE #client (ClientID INT,
ClientName VARCHAR(100),
IsCategoryAClient BIT,
IsCategoryBClient BIT,
IsCategoryCClient BIT)
CREATE TABLE #order (OrderID INT,
ClientID INT,
OrderDate DATETIME,
CategoriesFlag TINYINT)
-- Category definitions
-- 1 - Category A
-- 2 - Category B
-- 4 - Category C
-- therefore a CategoriesFlag value of 6 would mean that the client is a category B and category C client, but not a category A client
SELECT c.ClientName, o.OrderID
FROM #client AS c JOIN #order AS o ON c.ClientID = o.ClientID
WHERE -- some expression that restricts results to only category B OR category C clients
Can someone help me out with the where clause here using the & and | operators?
Thanks!

Is there a way to prevent a particular user from replying to your threads?  You're an nonconstructive pain in the ass. Thanks for developing some ANSI standards 30+ years ago.  The
ones that are almost irrelevant.  If your consulting business is doing so well then you wouldn't be responding to posts from peons like me at 1:30 in the afternoon...
Here
Thanks again for your never ending support of people trying to educate themselves!  Jackass.
Good day mateoc15 
I see that you already reported CELKO's post as abusive. I absolutely understand your angry and your argument. As a moderator here, I try to be moderate, and not to say publicly everything that I think. Therefore, I can not agree with the second part of
the sentence but I totally agree with the first part.
There is not way to prevent a particular user from replying to your threads (It is a great Idea by the way). I can only give you the suggestion, to ignore the user that bother you. There is a big group of users that ignore him and you can join them.
with that said, there are other people that tried to help you,.and this is minimal polite behavior responding those :-) and to close the thread in the end.
Please inform us if you need any more help, and if this issue is close than please close the thread.
Good day :-)
[Personal Site]  [Blog]  [Facebook]

Similar Messages

  • What is an alternative to bitwise flags?

    I was trying to be smart and elegant, and I ended up shooting myself in the foot by coding my entire application to use flags to store various combinations of settings.
    Now, I have hit a point where I have > 64 options. I need to move away from flags or I will be forced to create additional fields, which will make my application really messy given its current state.
    What should I consider as an alternative to using flags other than creating a separate boolean variable for each option?
    By flags, I mean bitwise flags, e.g.:
    [Flags]
    public enum Time
    None = 0
    Flag1 = 1,
    Flag2 = 2,
    Flag3 = 4,
    Flag63 = ...

    You could use a BitArray in conjunction with static fields to provide labels for the bits:
    static class Flags
    public static int WorkProperly = 0;
    public static int CompileFaster = 1;
    public static int AutoImproveCodeQuality = 2;
    class FlagTest
    static void Main(string[] args)
    BitArray bits = new BitArray(100); // > 64
    bits[Flags.AutoImproveCodeQuality] = true;
    Or, with an enum, but you'd have to cast the value every time:
    enum Flags
    Never = 0,
    MostOfTheTime,
    Sometimes,
    OddThursdays,
    WhenPigsFly
    BitArray bits = new BitArray(1000); // lots of bits
    bits[(int)Flags.Sometimes] = true;

  • Obtaining comma-separated list of text values associated with bitwise flag column

    In the table msdb.dbo.sysjobsteps, there is a [flags] column, which is a bit array with the following possible values:
    0: Overwrite output file
    2: Append to output file
    4: Write Transact-SQL job step output to step history
    8: Write log to table (overwrite existing history)
    16: Write log to table (append to existing history)
    32: Include step output in history
    64: Create a Windows event to use as a signal for the Cmd jobstep to abort
    I want to display a comma-separated list of the text values for a row. For example, if [flags] = 12, I want to display 'Write Transact-SQL job step output to step history, Write log to table (overwrite existing history)'.
    What is the most efficient way to accomplish this?

    Here is a query that gives the pattern:
    DECLARE @val int = 43
    ;WITH numbers AS (
       SELECT power(2, n) AS exp2 FROM (VALUES(0), (1), (2), (3), (4), (5), (6)) AS n(n)
    ), list(list) AS (
       SELECT
         (SELECT CASE WHEN exp2 = 1  THEN 'First flag'
                      WHEN exp2 = 2  THEN 'Flag 2'
                      WHEN exp2 = 4  THEN 'Third flag'
                      WHEN exp2 = 8  THEN 'IV Flag'
                      WHEN exp2 = 16 THEN 'Flag #5'
                      WHEN exp2 = 32 THEN 'Another flag'
                      WHEN exp2 = 64 THEN 'My lucky flag'
                 END + ', '
          FROM   numbers
          WHERE  exp2 & @val = exp2
          ORDER BY exp2
          FOR XML PATH(''), TYPE).value('.', 'nvarchar(MAX)')
    SELECT substring(list, 1, len(list) - 1)
    FROM   list
    Here I'm creating the numbers on the fly, but it is better to have a table of numbers in your database. It can be used in many places, see here for a short discussion:
    http://www.sommarskog.se/arrays-in-sql-2005.html#numbersasconcept
    (Only read down to the next header.)
    For FOR XML PATH thing is the somewhat obscure way we create concatenated lists. There is not really any using trying to explain how it works; it just works. The one thing to keep in mind is that it adds an extra comma at the end and the final query strips
    it off.
    This query does not handle that 0 has a special meaning - that is left as an exercise to the reader.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Trying to send an email with the mail client, says password is wrong

    The password is right but when I enter it in, it keeps saying that it's wrong and gives the server.ntmp error msg

    Not sure if this is what you meant, but the DeliveryNotificationOptions is a bitwise flag enumeration:  You can get the value you need for a delivery receipt by using a static property node on the DeliveryNotificationOptions class.  Read receipts are a bit different.  For this, you apparently have to add a custom header to the email named "Disposition-Notification-To" where the value is the address where the reciept should be sent.  Of course the functionality relies on the recievers server supporting the functionality.  If you need more info, I would suggest searching MSDN since the question is more about the use of a Microsoft .Net assembly.

  • UserAccountContol Status

    Hi there,
    I am trying to design some code that will access Active Directory and retrieve a users account status. I would like to access the UserAccountControl attribute and retrieve the status - whether locked/disabled/expired. Once I connect using LDAP, is there a way of passing in the user id and getting back the value of the attribute? Since it is a bitwise flag, I'm not sure how to go about this.
    Any help appreciated!
    Thanks

    I too am curious about that "Airplane mode" icon.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • Using LDAP to search attribute bit flags using attribute OID values

    Hello everyone,
    My question stems from trying to understand the OID and syntax behind this classic LDAP search to find disabled users:
    "(useraccountcontrol:1.2.840.113556.1.4.803:=2)"
    What I am interested in is the value 1.2.840.113556.1.4.803, specifically how it differentiates from the value 1.2.840.113556.1.4.8, which is the OID of the useraccountcontrol attribute:
    http://msdn.microsoft.com/en-us/library/ms680832(v=vs.85).aspx
    Now, this website below says that the 03 and 04 are designators of the AND and OR operations, respectively, and are added on to the end of the OID:
    https://www.appliedtrust.com/blog/2011/04/keeping-your-active-directory-pantry-order
    However, using this logic, I can't get these 03 and 04 operators to work with other attribute OID's that use flags as values, such as the "searchflags" attribute, e.g. a LDAP search of "(searchflags:=1.2.840.113556.1.2.33404:=0)
    returns nothing, using the OR (04) operation at the end of the "searchflags" OID of 1.2.840.113556.1.2.334.
    So back to my original question, for the useraccountcontrol OID of 1.2.840.113556.1.4.8, is this OID at all related to the bitwise AND extensible match of 1.2.840.113556.1.4.803 (like just adding a 03 to designate an AND operation), or is this
    extensible match
    value of 1.2.840.113556.1.4.803 completely separate from the useraccountcontrol OID of 1.2.840.113556.1.4.8?
    If I have my terms mixed up, please feel free to correct me on what the proper terms are.
    Thanks!

    Hmm yeah I posted that link above in my OP as well, and I was hoping that the OID values of these bitwise filters were somehow related to the shorter OID of the "useraccountcontrol" attribute, but it looks like it's just a coincidence.
    So I wonder if the "useraccountcontrol" section of
    this article from my OP is a little misleading when it says:
    To make a comparison, we either need to use the LDAP_MATCHING_RULE_BIT_AND rule (1.2.840.113556.1.4.803), or the LDAP_MATCHING_RULE_BIT_OR rule (1.2.840.113556.1.4.804) for our attribute OID (the AND rule adds a 03 suffix to denote the AND operation,
    and the OR rule adds a 04 suffix).
    Following this logic, I should be able to use the "03" and "04" in other bitwise operations with different OID's to search "AND" or "OR", but as I pointed out in my OP above, I can't seem to make this work with adding the 
    "03" and "04" onto the end of other OID's. So I will go with Christoffer that these bitwise OID's (1.2.840.113556.1.4.803 and 1.2.840.113556.1.4.804) are unique in themselves, and the fact that they are 2 characters away from the OID of the "useraccountcontrol"
    attribute (1.2.840.113556.1.4.8) is just coincidence.
    This does seem strange however, and it seems like there should be some correlation here....
    If anyone has any more info, I would love to hear it!

  • Best practice/pattern for flag values

    I'm writing a class that has several public static final int fields that can be combined bitwise. I'm debating whether to number all the default values zero, have zero represent the defaults but NOT have public fields numbered zero, or number every field with a power of two.
    I've thought of the following pros and cons:
    The advantages of the first pattern include allowing the defaults to be set explicitly in user code, making the coder's intent apparent. The disadvantages include it being an error to test flags against the default (zero) values, and that error not being apparent to the user.
    The advantages of the second pattern include there being no default values to erroneously test against. Disadvantages include the inability to set defaults explicitly.
    The advantages of the thid pattern include being able to test against defaults and set defaults explicitly. Disadvantages include the possibility of erroneously setting two mutually exclusive flags.
    I'm leaning toward the third pattern, because I can make it my own problem to test for mutually exclusive flags. Is there anything else I haven't considered?
    Edited by: kjkrum on Oct 2, 2010 9:50 AM

    kjkrum wrote:
    I'm writing a class that has several public static final int fields that can be combined bitwise.Perfect, do it.
    public class Person {
    // female is 0, male is 1
      public static final int FLAG_GENDER = 1;
      public static final int FLAG_EMPLOYEE = 2;
      public static final int FLAG_CLIENT = 4;
      protected int flags = 0;
      public String getGender() {
        return (isFlag(FLAG_GENDER) ? "male" : "female");
      public boolean isEmployee() {
        return isFlag(FLAG_EMPLOYEE);
      public boolean isClient() {
        return isFlag(FLAG_CLIENT);
      public void setGender(String gender) {
        setFlag(FLAG_GENDER, (gender == "male"));
      public void setEmployee(boolean value) {
        setFlag(FLAG_EMPLOYEE, value);
      public void setClient(boolean value)
        setFlag(FLAG_CLIENT, value);
      protected boolean isFlag(int flag) {
        return ((flags & flag) == flag);
      protected void setFlag(int flag, boolean value) {
        if(value) {
          flags |= flag;
        else {
          flags &= ~flag;
    }Done, that took me a whole 10 minutes with rewrites.
    I'm debating whether to number all the default values zero, have zero represent the defaults but NOT have public fields numbered zero, or number every field with a power of two.
    I've thought of the following pros and cons:
    The advantages of the first pattern include allowing the defaults to be set explicitly in user code, making the coder's intent apparent. The disadvantages include it being an error to test flags against the default (zero) values, and that error not being apparent to the user.
    The advantages of the second pattern include there being no default values to erroneously test against. Disadvantages include the inability to set defaults explicitly.
    The advantages of the thid pattern include being able to test against defaults and set defaults explicitly. Disadvantages include the possibility of erroneously setting two mutually exclusive flags.
    I'm leaning toward the third pattern, because I can make it my own problem to test for mutually exclusive flags. Is there anything else I haven't considered?
    Edited by: kjkrum on Oct 2, 2010 9:50 AMWhat's more important... you sitting here trying to make a philisophical decision, or getting the class definition written?
    Edited by: pierrot_2 on Oct 3, 2010 3:28 PM

  • Managing bit flags in an array of bytes

    In my program, I have a large array of bytes. Some arbitrarily long groups of bytes in this array act as groups of bit flags. I need to be able to retrieve and manipulate these bit flags. I read that the best way to do this is with bitwise operations; something I have never learned before. I wrote methods that seem to work, but because I have never done anything like this before, can someone check my work?
    Here is an example program, where the only contents of the byte array is a single two-byte grouping of 16 bit flags:
    public class test
        static byte[] bytes = new byte[2];
        static byte[] pow2 = {1, 2, 4, 8, 16, 32, 64, -128};
        static byte[] pow2i = {-2, -3, -5, -9, -17, -33, -65, 127};
        public static void main(String[] args) throws Exception
            writeBitFlag(0, 6, true);
            for (int i = 0; i < 16; i++)   
                System.out.println("Flag " + i + ": " + getBitFlag(0, i));
            System.out.println();
            writeBitFlag(0, 12, true);
            invertBitFlag(0, 0);
            invertBitFlag(0, 0); 
            invertBitFlag(0, 1);
            for (int i = 0; i < 16; i++)   
                System.out.println("Flag " + i + ": " + getBitFlag(0, i));  
        }//end main
        public static boolean getBitFlag(int startAddress, int flag)
            return (bytes[startAddress + flag / 8] & pow2[flag %= 8]) == pow2[flag];
        }//end getBitFlag
        public static void invertBitFlag(int startAddress, int flag)
            bytes[startAddress + flag / 8] ^= pow2[flag % 8];
        }//end invertBitFlag
        public static void writeBitFlag(int startAddress, int flag, boolean flagVal)
            if (flagVal)
                bytes[startAddress + flag / 8] |= pow2[flag % 8];
            else
                bytes[startAddress + flag / 8] &= pow2i[flag % 8];
        }//end writeBitFlag      
    }//end class testDoes this look like the right way to do what I am trying to do?

    You could try BitSet which provides these function for you.
    public class test { 
        public static void main(String[] args) throws Exception {   
            byte[] bytes = new byte[2];
            writeBitFlag(bytes, 6, true);
            for (int i = 0; i < bytes.length*8; i++)   
                System.out.println("Flag " + i + ": " + getBitFlag(bytes, i));
            System.out.println();
            writeBitFlag(bytes, 12, true);
            invertBitFlag(bytes, 0);
            invertBitFlag(bytes, 0); 
            invertBitFlag(bytes, 1);
            for (int i = 0; i < bytes.length*8; i++)   
                System.out.println("Flag " + i + ": " + getBitFlag(bytes, i));  
        }//end main
        public static boolean getBitFlag(byte[] bytes, int flag) {
            return ((bytes[flag >> 3] >> flag) & 1) != 0;
        public static void invertBitFlag(byte[] bytes, int flag) {
            bytes[flag >> 3] ^= (1 << (flag & 7));
        public static void writeBitFlag(byte[] bytes, int flag, boolean flagVal) {
            if (flagVal)
                bytes[flag >> 3] |= (1 << (flag & 7));
            else
                bytes[flag >> 3] &= ~(1 << (flag & 7));
    }//end class test

  • Bit Shifting for Flags ( Constructive Criticism Please)

    I came up with a class that handles flag manipulation using Bitwise operators. Does anyone think this is more efficient than using boolean variables for flags? Or is this just overkill.
    The reason Im asking is Ive used this approach before on Muds that I have written/updated. Just wondering if it is outdated.
    * Allows for 64 different on/off flags.
    public class State
            public static final byte ST_00 = (byte)0 ;
            public static final byte ST_01 = (byte)1 ;
            ....fill here......
            public static final byte ST_63 = (byte)63 ;
         private int lowStates = 0;
         private int highStates = 0 ;
         public boolean is( byte bitIndex )
              if( bitIndex > 31 )     
                   return ( (highStates & ( 1 << (bitIndex%32) )) == 1 ? true :  false ) ;
              else
                   return ( (lowStates & ( 1 << bitIndex ) ) == 1 ? true : false ) ;
         public void remove( byte bitIndex )
              if( bitIndex > 31 )
                   highStates &= ~(1 << (bitIndex%32) ) ;
              else
                   lowStates &= ~(1 << bitIndex ) ;
         public void set( byte bitIndex )
              if( bitIndex > 31 )
                   highStates |= (1 << (bitIndex%32) ) ;
              else
                   lowStates |= (1 << bitIndex ) ;
         public void toggle( byte bitIndex )
              if( bitIndex > 31 )
                   highStates ^= (1 << (bitIndex%32) ) ;
              else
                   lowStates ^= (1 << bitIndex) ;
    * Simple implementation
    public class INeedFlags
           public static final byte FLAG_1 = ST_00 ;
           public static final byte FLAG_2 = ST_01 ;
           public State flags = new State() ;
           public static void main(String[] args)
                INeedFlags obj = new INeedFlags() ;
                obj.flags.set( FLAG_1 );
                obj.flags.toggle( FLAG_2 ) ;
                if( obj.flags.is( FLAG_1 ) )
                   System.out.println("Yep its set");
    }

    i often use bit flags.
    my variation is to have the flag constants as long bitmasks.
    this allows for multiple flag set / test in one instruction :
    if (flags.has(FLAG_1 | FLAG_3)) {..}
    also no bitshifting required should make it as fast as comparing booleans.
    ( in c++, the compiler optimises it away to almost nothing).
    the java code is a quick hack of your post (sorry about the indents)
    Adrian
      * Allows for 64 different on/off flags.
    public class State
        public static final long ST_00 = 0x00000001 ;
        public static final long ST_01 = 0x00000002 ;
        public static final long ST_02 = 0x00000004 ;
      ....fill here......
        public static final long ST_62 = 0x40000000 ;
        public static final long ST_63 = 0x80000000 ;
        public State(long bitFlags)
            state = bitFlags;
        private int state = 0;
        public long value()     
            return ( state );
        public boolean equals( long bitFlags )
            return ( state == bitFlags ) ;
        public boolean is( long bitFlag )
            return ( has(bitFlag) ) ;
        public boolean has( long bitFlags )
           return ( (state & bitFlags) != 0 ) ;
         public void clear( )
              state = 0 ;
         public void remove( long bitFlags )
              state &= ~bitFlags ;
         public void set( long bitFlags )
              state |= bitFlags ;
         public void toggle( long bitFlags )
              state ^= bitFlags ;
      * Simple implementation
    public class INeedFlags
            public static final long FLAG_1 = ST_00 ;
            public static final long FLAG_2 = ST_01 ;
            public static final long FLAG_3 = ST_02 ;
            public State flags = new State() ;
            public static void main(String[] args)
             * This still works
                 INeedFlags obj = new INeedFlags() ;
                 obj.flags.set( FLAG_1 );
                 obj.flags.toggle( FLAG_2 ) ;
                 if( obj.flags.is( FLAG_1 ) )
                    System.out.println("Yep its set");
               * but you can also say
                 obj.flags.clear( );
                 obj.flags.set(FLAG_1 | FLAG_2);
                 if( obj.flags.has( FLAG_2 | FLAG_3 ) )
                    System.out.println("one of them is set");

  • Binary Flags

    I'm making some games where the user needs to select/check
    several different boxes and leave several others unchecked. I have
    put it in a binary "flag" what the correct answer is. That is:
    11010
    Reading from the rights side of the number, that would be box
    1 unchecked, box 2 checked, box 3 unchecked, box 4 checked, and box
    5 checked. (There may be more boxes, but they are all unchecked and
    leading zeros don't show.)
    I've worked out th different bitwise operations to tell me if
    they are correct, incorrect, or a mixture. But I'm trying to figure
    out how to give feed back at the end. Basically I want to highlight
    all the ones that should have been checked and hide all the ones
    that should not have been checked, i.e. if there is a zero in the
    flag hide the corresponding box and if there is a one put a
    highlight color on the box.
    How does one quickly read through a binary number and see
    which are ones and which are zeros?

    Where I do things like this I tend to use a string
    representation of the binary flags. This approach is flexible - you
    can easily split it to an array - or retrieve it from an array of
    individual flags via join("") - I tend to do this- , convert it to
    a decimal number (e.g. if you wanted to use the flash binary
    operators), or just check the individual flags based on the index
    in the string. I used this approach recently to measure
    uninterrupted progression from start of a loading queue (i..e.
    queue completion without gaps) ... very simple after each character
    flag is set, its just indexOf("0") if you set a flag of "1" for a
    loaded clip.
    E.g.:
    var binString = "0110101"
    function isChecked(bin, idx) {
    return Boolean(bin.substr(idx,1))
    trace('decimal for currentbinary representation is
    :'+parseInt(binString,2))
    trace ('is third checkbox
    checked?:'+isChecked(binString,2))

  • What's bitwise for?

    I read the little thing for "Shift and Logical Operators" and I'm a tad confused. What exactly can you do with them? Very odd little buggers...

    There are several things that bitwise shift and logical operators are useful for.
    The most obvious is to test individual bits (or as an extension of this, groups of bits) within an int, long, or other numerical type value. For instance, the AWT events use flags like this extensively. Let's examine java.awt.event.InputEvent's getModifiers() method.
    It returns an int value with various bits set to indicate which modifier keys (Shift, Ctrl, Alt, etc.) are depressed. One way to find out if the Ctrl key was pressed when the event was generated is to do this: (assuming this is your method implementing the KeyListener interface)
    public void keyPressed(KeyEvent event) {
      int modifiers = event.getModifiers();
      if (modifiers & KeyEvent.CTRL_MASK != 0) System.out.println("Ctrl is pressed");
    }The value of the CTRL_MASK constant is some value with only 1 bit set in it. (i.e., it is a power of 2.) So anding some value with CTRL_MASK will result in CTRL_MASK if the bit was set, or 0 if it wasn't, because all the other bits are false in the mask, so those are the only possible result of ANDing another number with it.
    So the reason for using a mask in cases like this instead of just a bunch of booleans reduces memory usage significantly. (I believe a boolean in Java takes up a full 32-bit word. Anyone care to confirm or deny this?)
    Bit operations are also extremely helpful when interfacing to a device, or calling native code, or reading data files, or processing image data.
    Secondly, bitwise shifts and mask operations are much faster ways to do divide, multiply, and modulo operations by powers of 2. For instance:
        n % 16 == n & 15     // 15 in binary: 1111, this just discards (=0) higher bits
        n % 256 == n & 255   // 255 in binary: 1111 1111, same: masks off high bits
        n / 2 == n >> 1
        n / 4 == n >> 2
        n / 8 == n >> 3
        n / 16 == n >> 4
        n / 256 == n >> 8
        n * 2 == n << 1
        n * 4 == n << 2
        n * 8 == n << 3
        n * 16 == n << 4
        // etc.Hope this provides some insight into the common uses of bitwise operators. Understanding binary arithmetic turns out to be extremely useful. It's worth spending some time with the various operators and learning how they work.
    (Also, I didn't mention the lesser-known '>>>' operator, known as the unsigned right shift. Of course if you don't have a good grasp on twos-complement binary notation, the purpose of this operator won't make sense. I don't know what a good source on this subject is off the top of my head, but if you're interested, I'm sure someone can recommend something.)
    Cheers,
    Colin

  • Console decipher??

    I can see on console that someone accessed my computer while I was away. I am wondering what they did.
    Below is what was in console for the time period I was not at my computer. Hope someone cal help me decipher this.
    11/27/13 5:08:19.000 PM kernel: Wake reason: EC.LidOpen (User)
    11/27/13 5:08:19.000 PM kernel: Previous Sleep Cause: 5
    11/27/13 5:08:19.000 PM kernel: wlEvent: en1 en1 Link DOWN virtIf = 0
    11/27/13 5:08:19.000 PM kernel: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
    11/27/13 5:08:19.000 PM kernel: en1: 802.11d country code set to 'X0'.
    11/27/13 5:08:19.000 PM kernel: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
    11/27/13 5:08:19.000 PM kernel: TBT W (1): 0 [x]
    11/27/13 5:08:23.000 PM kernel: en1: 802.11d country code set to 'US'.
    11/27/13 5:08:23.000 PM kernel: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
    11/27/13 5:08:25.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0 No Ack
    11/27/13 5:08:28.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0 No Ack
    11/27/13 5:09:16.000 PM kernel: PM notification timeout (pid 274, Mail)
    11/27/13 5:09:16.000 PM kernel: en1: 802.11d country code set to 'X0'.
    11/27/13 5:09:16.000 PM kernel: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
    11/27/13 5:09:16.000 PM kernel: hibernate image path: /var/vm/sleepimage
    11/27/13 5:09:16.000 PM kernel: sizeof(IOHibernateImageHeader) == 512
    11/27/13 5:09:16.000 PM kernel: Opened file /var/vm/sleepimage, size 4294967296, partition base 0x0, maxio 400000 ssd 0
    11/27/13 5:09:16.000 PM kernel: hibernate image major 14, minor 0, blocksize 512, pollers 5
    11/27/13 5:09:16.000 PM kernel: hibernate_alloc_pages flags 00000000, gobbling 0 pages
    11/27/13 5:09:16.000 PM kernel: hibernate_setup(0) took 0 ms
    11/27/13 5:09:30.000 PM kernel: hibernate_page_list_setall start 0xffffff806b0bd000, 0xffffff806b121000
    11/27/13 5:09:30.000 PM kernel: hibernate_page_list_setall time: 264 ms
    11/27/13 5:09:30.000 PM kernel: pages 965128, wire 112101, act 365880, inact 23847, spec 41, zf 33615, throt 0, could discard act 225557 inact 180053 purgeable 18351 spec 5683
    11/27/13 5:09:30.000 PM kernel: hibernate_page_list_setall found pageCount 535484
    11/27/13 5:09:30.000 PM kernel: IOHibernatePollerOpen, ml_get_interrupts_enabled 0
    11/27/13 5:09:30.000 PM kernel: IOHibernatePollerOpen(0)
    11/27/13 5:09:30.000 PM kernel: IOPolledInterface::ioStatus 0xe00002eb
    11/27/13 5:09:30.000 PM kernel: PMStats: Hibernate write took 10329 ms
    11/27/13 5:09:30.000 PM kernel: all time: 10329 ms, comp bytes: 0 time: 0 ms 0 Mb/s, crypt bytes: 0 time: 0 ms 0 Mb/s,
    11/27/13 5:09:30.000 PM kernel: image 0, uncompressed 0 (0), compressed 0 (0%), sum1 40725862, sum2 0
    11/27/13 5:09:30.000 PM kernel: wired_pages_encrypted 0, wired_pages_clear 0, dirty_pages_encrypted 0
    11/27/13 5:09:30.000 PM kernel: IOPolledInterface::ioStatus 0xe00002eb
    11/27/13 5:09:30.000 PM kernel: hibernate_write_image done(e00002eb)
    11/27/13 5:09:30.000 PM kernel: sleep
    11/27/13 6:05:19.000 PM kernel: Wake reason: EC.LidOpen (User)
    11/27/13 6:05:19.000 PM kernel: Previous Sleep Cause: 5
    11/27/13 6:05:19.000 PM kernel: TBT W (1): 0 [x]
    11/27/13 6:05:21.000 PM kernel: en1: 802.11d country code set to 'US'.
    11/27/13 6:05:21.000 PM kernel: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
    11/27/13 6:05:24.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0 No Ack
    11/27/13 6:05:27.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0 No Ack
    11/27/13 6:06:21.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0 No Ack
    11/27/13 6:06:24.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0 No Ack
    11/27/13 6:09:28.000 PM kernel: MacAuthEvent en1   Auth result for: 00:1d:d1:b7:59:d0  MAC AUTH succeeded
    11/27/13 6:09:28.000 PM kernel: wlEvent: en1 en1 Link UP virtIf = 0
    11/27/13 6:09:28.000 PM kernel: AirPort: Link Up on en1
    11/27/13 6:09:28.000 PM kernel: en1: BSSID changed to 00:1d:d1:b7:59:d0
    11/27/13 6:09:29.000 PM kernel: AirPort: RSN handshake complete on en1

    If you use a password to logon and have it set to ask for that password when the system wakes from sleep mode whoever opened your Mac could not access anything on it without knowing the password.
    If you have those thing set to Auto Logon and not to ask for a password when wakiing from sleep then you only have yourself to blame for any changes someone else made to your Mac.
    I suggest you start using those basic security systems.

  • How to get flagged messages in to tasks or alternatively view another users to do list.

    If someone could just help me out I would be extremely appreciative.
    2 of us work in one mail box together called admin. when one of us is away we like to use the flags to create follow ups for each other on certain email items.
    Firstly, I can only see my main accounts to do list
    Secondly, when I flag a contact / message / anything in fact, in any mailbox it only appears in their respective to do lists and not in their tasks. Thus I cannot see what I have flagged for them at a glance as I can not find a way to view other peoples
    to do list. i.e. neither of us can see any of the flags in the shared mailbox we use (admin) unless we log in under a different profile, which is troublesome as it takes way to long to switch back and forth.
    I presently use colour categories to delegate who is currently in charge of answering certain emails and use custom flags to note what we are waiting for in particular to a certain email and then mark a tick when it has been dealt with. Simple system but
    not currently working in full due to the follow up flags not appearing in tasks.
    This also affects my task synching on my mobile where once again it only shows what is in tasks... i.e stuff I have physically typed in outlook rather than flagged content; mails, contacts etc.
    Any ideas how to get the follow up flags appearing in tasks or an ability to see other peoples to do lists... the first is more preferable but I will take what I can.
    Kindest Regards
    Woody

    Just add the 'admin' mailbox as additional account in Outlook, as opposed to additional mailbox (i.e. don't add it from Accounts Settings -> More settings -> Advanced, but from File -> Add account instead).
    It will then show flagged items and tasks from all accounts in the 'To-do' list.

  • Creation of PO item without Flag IR_IND

    Hi Experts,
    I need a soloution for the following problem. We have the necessary creating puchase order items with value 0. In this case, the purchase order get the status "Held". The reason is the flag IR_IND. I had try to delete the flag in BADI "BBP_DOC_CHANGE_BADI" but at this time the flag is not set.
    Thank you in advance.
    Best regards
    Dirk

    Hi Dirk,
    You can actually use the BADI BBP_CREATE_PO_BACK to change the flag value before filling the PO Craetion BAPI interface parameters
    Sangeeta

  • Derive found flag in SQL with where clause using TABLE(CAST function

    Dear All,
    Stored procedure listEmployees
    ==========================
    CREATE OR REPLACE TYPE STRING_ARRAY AS VARRAY(8000) OF VARCHAR2(15);
    empIdList STRING_ARRAY
    countriesList STRING_ARRAY
    SELECT EMP_ID, EMP_COUNTRY, EMP_NAME, FOUND_FLAG_
    FROM EMPLOYEE WHERE
    EMP_ID IN
    (SELECT * FROM TABLE(CAST(empIdList AS STRING_ARRAY))
    AND EMP_COUNTRY IN
    (SELECT * FROM TABLE(CAST(countriesList AS STRING_ARRAY))
    =================
    I have a stored procedure which lists the employees using above simple query.
    Here I am using table CAST function to find the list of employees in one go
    instead of looping through each and every employee
    Everything fine until requirements forced me to get the FOUND_FLAG as well.
    Now I wanted derive the FOUND_FLAG by using rownum, rowid, decode functions
    but I was not successful
    Can you please suggest if there is any intelligent way to say weather the
    row is found for given parameters in the where clause?
    If not I may have to loop through each set of empIdList, countriesList
    and find the values individually just to set a flag. In this approach I can’t use
    the TABLE CAST function which is efficient I suppose.
    Note that query STRING_ARRAY is an VARRAY. It is very big in size and this procedure
    suppose to handle large sets of data.
    Thanks In advance
    Regards
    Charan
    Edited by: kmcharan on 03-Dec-2009 09:55
    Edited by: kmcharan on 03-Dec-2009 09:55

    If your query returns results, you have found them... so your "FOUND" flag might be a constant,...

Maybe you are looking for