» Home » Logical » Page 1
MongoDB - Java - what is Easiest way to combine logical OR and logical AND?
Category : Java

I have the following query as an example:
year = 2012 OR year = 2011 AND name = John OR name = Mike AND county = USA OR country = Canada


What is the best way to construct this using the JAVA driver?
Using the DBObject is a bit tricky as it's actually a Map so keys have to be distinct.
I could not find a decent example with QueryBuilder either (i.e. one using a loop).<


View Replies


Basic identities of logical expressions and deriving logical expressions from truth table?
Category : Web Design

I was wondering what a basic identity of a logical expression is and how to get it. I looked on google but couldn't find anything about it.


Say, for example I have a logical expression ~(~(P ^ ~(P ^ Q)) ^ ~(Q ^ ~(P ^ Q)))
Below is the result I got from a truth table and I don't know what to do with it to get a basic identity.


0
1
1
0

View Replies


Logical AND in Forth?
Category : Web Design

I know the AND word defines binary and... but what defines logical and?


View Replies

TAGS : Logical Forth

How to use logical and in c++
Category : C & C++ & C#
if (age > 40 && age < 60)

or


if (age > 40 & age < 60)

As you can see I am not sure if C++ uses two and signs or one.


View Replies

TAGS : logical

How to use logical operators in ant?
Category : Programming Languages

i have a small peice of code which prints if platform is unix or windowsas


<if>
<equals=${arg1} value="linux-86"/>
<then>
<echo message="linux"
<then>
<elseif>
<equals=${arg1} value="linux-64"/>
<then>
<echo message="linux"/>
</then>
</elseif>
<else>
&

View Replies


Logical OR seems to act like conditional OR
Category : Programming Languages

I'm somewhat unclear about the conditional vs. logical || oprators. Well, looking at what I just wrote, let me restate that: My code does not do what it supposed to do based on the differences between conditional and logical OR.


I have text box as date field that has its text property set to "mm/yyyy" by default. My validator evaluates true for this condition and for a empty value (


View Replies


Logical value of an assignment in C
Category : Coding
while (curr_data[1] != (unsigned int)NULL &&
((curr_ptr = (void*)curr_data[1]) || 1))

Two part question.


What will (curr_ptr = (void*)curr_data[1]) evaluate to, logically. TRUE?


Also, I know its rather hack-ish, but is the while statement legal C? I would have to go through great contortions


View Replies


Logical xor operator in c++?
Category : C & C++ & C#

Is there such a thing? First time I encountered a practical need for it, but I don't see one listed in stroustrup. I intend to write:


// Detect when exactly one of A,B is equal to five.
return (A==5) ^^ (B==5);

But there is no ^^ operator. Can I use bitwise ^ here and get the right answer (regardless of machine representation of true and false)? I never


View Replies

TAGS : Logical operator

Logical problem
Category : Programming Languages

I would like to know some solutions to such a problem.


It is given a number lets say 16 and you have to arange a matrix this way


1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7

the language doesn't matter, (prefferably PHP);


View Replies

TAGS : Logical problem

Logical SQL query
Category : Databases

I have 3 rows and 3 columns in SQL Server which are all numeric. After execution, the result should return the 4th row and 4th column. The new column should contain the sum of the numbers in that row. The new row should contain sum of data of respective column.


View Replies

TAGS : Logical query

Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .