Combining OR, AND & NOT logic in Gmail – where do PARENTHESES go?

I have Gmail’s multiple inbox set up, and can’t seem to combine OR, AND and NOT logic for the search term. My top group shows red-bang and drafts, my second group yellow-bang, my third red-star, and my fourth yellow-star.

The search for my first group is:
in:draft OR has:red-bang -is:snoozed

which works fine, except that if i a draft message ALSO has a yellow bang, it shows in both groups

the logic i want, expressed in excel logic is:

has:red-bang AND -is:snoozed
in:draft AND -has:yellow-bang AND -has:red-star AND -has:yellow-star

I can’t seem to get the brackets and OR in the right order to get this logic to be searched

I found an example here, which suggests it should be (term1 OR term2) but that didn’t work for me.

Any help or articles that properly explain it with examples of more complicated uses rather than just mentioning they exist, would be much appreciated!

Thanks in advance

plotting – Combining expressions and text together in PlotLegends Mathematica

I have a code which goes like this:

Plot({Sin(x), Sin(2 x), Sin(3 x)}, {x, 0, 2 Pi}, 
 PlotLegends -> "Expressions")
Plot({Sin(x), Sin(2 x), Sin(3 x)}, {x, 0, 2 Pi}, 
 PlotLegends -> {"This is for x", "This is for 2x", "This is for 3x"})

which produces the plots:

enter image description here

I need to write legends in such a way that it takes, say, 1st expression and then besides that it writes “This is for x” (same for 2nd and 3rd). How can we do this in Mathematica?

I tried with this code (not sure why 😀!):

Plot({Sin(x), Sin(2 x), Sin(3 x)}, {x, 0, 2 Pi}, 
 PlotLegends -> {"Expressions", {"This is for x", "This is for 2x", 
    "This is for 3x"}})

But, I am getting another set of legend down the figure:
enter image description here

How can one accomplish this?

Mathematica version: 12.1

Thanks in advance.

Customizing a Chart in Apple Numbers by Combining Columns

I have a chart where I am tracking reading progress through the Bible. I have the books in a table with the following data as columns:

  1. Book name
  2. Book length (in time, as measured by an audiobook)
  3. A checkbox column to indicate whether the book has been read

I’d like for the color of each column to indicate whether that book has been read or not. Right now, when I add all the columns to a chart, I get the following results:

  1. The X axis, which should be the book names, just shows “Untitled 1”, “Untitled 2”, etc., unless I manually edit the labels.
  2. The checkbox (“Read”) column seems to show up as a data point. I say “seems”, because I can’t actually see it in the chart’s body, but it shows up in the legend. I’m guessing “checked” = 1 and “unchecked” = 0, which get converted to seconds based on the scale of the audiobook lengths.

Any way I can do the following?

  1. Get the X axis to correctly display the book names
  2. Combine the book lengths with the “read” column and display read books in one color and unread books in another color

mysql – Insert INTO a table combining * with a column value

In MySQL, I am trying to insert all values from table A to table B, but I need to change the structure of table B and a column where all the values would be 0.

Is it possible to mix and create such a query as below, or what could be the possible query for this case?!
Many thanks.

$limitid = 50;
$pr1 = "INSERT INTO B SELECT * FROM A where > $limitid ;
//to get 
$pr1 = "INSERT INTO B (*,col10) VALUES(*,0);

unity – Combining Rotation, Jump, and Crouch Animations with 2D Blend Tree

I have a 2D Freeform Blend Tree that I’m using to animate a character that can currently:

  • Walk / Sprint Forward
  • Walk / Sprint Backward
  • Strafe / Sprint Strafe Left
  • Strafe / Sprint Strafe Right
  • Idle

My goal is to add in rotation, jump, crouch, and “firing when walking” animations.

In just dealing with turning or even jumping for now, I understand how to handle and call the animations in the code, but not sure of how it should be set up in the animator.

Do I transition to rotation/jump animations on the base layer? I’m reserved doing it this way because I lose the ability to blend and take advantage of those transitions.
Can I build it into my current 2D blend tree even though the blend tree is only X and Z axis?

enter image description here

public class twoDControllerMovement : MonoBehaviour
    Animator animator;
    public CharacterController controller;

    (SerializeField) private float walkSpeed = 12.0f;
    (SerializeField) private float strafeSpeed = 10.0f;
    (SerializeField) private float sprintMultipler = 2.0f;
    (SerializeField) private float rotationSpeed = 120.0f;

    // Start is called before the first frame update
    void Start()
        animator = GetComponent<Animator>();
        controller = GetComponent<CharacterController>();

    // Update is called once per frame
    void Update()

        // handle sprint
        float currentWalkSpeed = walkSpeed;
        float currentStrafeSpeed = strafeSpeed;
        bool runPressed = false;

        // handle shift
        if (Input.GetKey(KeyCode.LeftShift))
            currentWalkSpeed = walkSpeed * sprintMultipler;
            currentStrafeSpeed = strafeSpeed * sprintMultipler;
            runPressed = true;

        // calculate movement
        float strafe = Input.GetAxis("Strafe") * currentStrafeSpeed * Time.deltaTime;
        float translation = Input.GetAxis("Vertical") * currentWalkSpeed * Time.deltaTime;
        float rotation = Input.GetAxis("Horizontal") * rotationSpeed * Time.deltaTime;

        // execute movement
        transform.Translate(strafe, 0f, translation);
        transform.Rotate(0, rotation, 0f);

        // handle movement animations
        if (runPressed) {
            animator.SetFloat("VelocityZ", Input.GetAxis("Vertical") * sprintMultipler);
            animator.SetFloat("VelocityX", Input.GetAxis("Strafe") * sprintMultipler);
        } else 
            animator.SetFloat("VelocityZ", Input.GetAxis("Vertical"));
            animator.SetFloat("VelocityX", Input.GetAxis("Strafe"));

        // handle roration animations
        if (Input.GetAxis("Horizontal") < 0.1f)
        } else if (Input.GetAxis("Horizontal") > 0.1f)


Also open to any feedback on improving the code above, my goal is as small and clean as possible! I do have a slight delay in animations starting when switching directions that I have to work out at some point and would eventually.

json – Template for combining recorded audio with viable sharePoint list fields

Looking for Core Scaffolding ( e.g. JSON, or API) designed to mix in fixed audio with individual fields in a SharePoint list.

In example the audio has a fixed message- such as “Current Pallets in Inventory” and then a designation for a specific SharePoint list field value.

Any samples/examples would be most appreciated.

Combining a Ribbon with a Search Bar

I would put a search bar on the Home tab and optionally put a button on the Quick Action Toolbar. This button activates the search bar.

Thinking about how a search bar is used, it is not that obvious what it provides other than what a simple button for the Find command provides. To activate the search bar, a user has to click it or press the keyboard shortcut for it. Either way, a bar itself does not have to be always shown on the screen.

I think that the only thing that a search bar provides is the indication that users can search. This is useful for new users.

You state that your application is “fairly large,” from which I assume that users are expected to use it repeatedly and soon they get familiar with its basic functionality. In this case, we should not spend screen real estate for new users too much.

google sheets – combining if and or

I am having difficulties creating this formula in google sheets. I have columns D,E,F with the headers:
Should Actual Diff.
Under D and E a drop down with Top Expert,Professional,Working Knowledge,Awareness of

I want the following conditions:

If “Top Expert” and “Top Expert” then “No Need”

If “Top Expert” and “Professional” then “Slight Need”

If “Top Expert” and “Working Knowledge” then “Need”

If “Top Expert” and “Awareness of” then “Strong Need”

If “Professional” and “Top Expert” then “No Need”

If “Professional” and “Professional then “No Need”

If “Professional” and “Working Knowledge” then “Slight Need”

If “Professional” and “Awareness of” then “Need”

If “Working Knowledge” and “Top Expert” then “No Need”

If “Working Knowledge” and “Professional then “No Need”

If “Working Knowledge” and “Working Knowledge” then “No Need”

If “Working Knowledge” and “Awareness of” then “Slight Need”

If “Awareness of” and “Top Expert” then “No Need”

If “Awareness of” and “Professional then “No Need”

If “Awareness of” and “Working Knowledge” then “No Need”

If “Awareness of” and “Awareness of” then “No Need”

I was able to create ONE formula for just one but then it stopped working

3d – Combining Quaternion Rotations

I’m trying to understand Quaternions in relation to rotation and orientation.

As an example in learning, I’m trying to rotate a point (e.g. at (0.7071, 0, -0.7071), on the unit sphere) about the line x=z (or the vector (0.7071, 0, 0.7071) for a unit vector pointing in x/z direction. It should rotate around the unit sphere, passing through (0,1,0)

I’ve read that “multiple rotations are just multiplication”, but if that’s the case, why are the following are not equivalent?

# This version does what I want, rotates a point about the line x=z
val q = Quaternion().setAngleAxis(toRadians(45), 0.7071, 0, 0.7071)

# neither of the following multiplications produce the equivalent to the above q
val qx = Quaternion().setAngleAxis(toRadians(45), 1, 0, 0)
val qy = Quaternion().setAngleAxis(toRadians(45), 0, 1, 0)
val q1 = qx.mul(qy)
val q2 = qy.mul(qx)

(My reasoning is like looking at a unit vector starting in the x direction, which if I rotate 45 degrees in the y axis would give me a vector pointing in the z=x direction, but this is clearly naive as it doesn’t work)

An example plot of qx * qy (but using 5 degree rotations instead of 45) is:

qx * qy rotation of point over 360 degrees

The q rotation I want gives me:

rotation about vector pointing in x/z direction

My understanding is qx and qy represent rotations about the given axis, or indeed also represent orientations, and if I use these independently and plot them, I get what I would expect, a point being rotated as required.

But if I start from either one of these, why doesn’t the multiplication of the other (which represents an initial orientation multiplied by a rotation) result in a rotation that would rotate a point by both the x and the y axis?

Which leads me to the question, what does qx * qy (or vica verca) represent here? (I think this is the key bit I’m not understanding.)

Is it possible to apply something to qx or qy to get the original q directly?

Data tables: Combining 2 columns into 1

I am a budding UX designer currently working on a booking management system that allows both booking by the HR and employees. HR can make bookings on behalf of the employees via the management system whereas the employees make their bookings on a mobile app.

HR cannot overwrite data input by employees (e.g name, email, mobile) but can do so if it’s data input by HR themselves.

Presently, the system only shows 1 name column which is the one imported by the HR. As such, we have instances where the HR wants to change the name but couldn’t because it has been updated by the employees on the mobile app.

On the backend however, there are 2 names data, HR imported name and employee updated name.

Proposed solution:
I proposed to concatenate the 2 name columns and create a new column ‘latest name’ so the HR will not need to refer to 2 columns for the ‘same’ information. This column will always show employee updated name when available, otherwise HR imported name. All employee updated name will be indicated with an asterisk and upon hover, a tooltip will appear to tell the HR that it has been updated by employee.
Proposed design

We will still keep the 2 original name data, but tucked in a filter column button where user can choose to show.

However, my engineer mentioned that many rows are already overloaded and prefers a more generic solution.

Does anyone here have any ideas how else I can do it?