The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
33 views

Logical operators in if-else in R

I have the following table (5 columns and 3 rows) called mat : AC CA RES 1 0 2 2 1 3 0 0 0 1 The operation being performed is mat[1]/mat[1]+mat[2] I am testing for the following : ...
2
votes
5answers
83 views

Is there any straightforward way to apply a logical operator on a Perl array?

I'm looking for something like this: (where OR is my hypothetical built-in function) Code: @x=(1, 0, 1, 1, 1); $a=OR(@x); print $a; Expected result: 1 Is this possible with Perl?
1
vote
1answer
47 views

SELECT .. SELECT in Mysql

I am trying to write a query for mysql (Search Module) where I am facing difficulties because of the select operation to be carried out inside same table. My Query: (SELECT * FROM user WHERE ...
-1
votes
4answers
77 views

Compound relational operators in C

I am trying to convert a piece of pseudo code into a C code and I have conditions like if (-4 <= X <=8) THEN {Do Something} else {Do something else} Is the syntax in if statement valid? Can ...
1
vote
1answer
50 views

Ternary Operator in Multiple conditions

I have one if condition in c# if (item.ReporSubCategoryId == 1 || item.ReporSubCategoryId == 2 || item.ReporSubCategoryId == 3 || item.ReporSubCategoryId == 4) { <a ...
-2
votes
2answers
28 views

how to solve the postfix and prefix operator expression?

I wrote the following code: int main(){ int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); i=-1,j=-1,k=0,l=2,m; ...
0
votes
3answers
18 views

Trying to pass the user type in a condition laravel

When I grab the current user (who is a manager) like so: $user = Auth::user()->user_role; I then die and dump this: dd($user); This displays string(7) "Manager" I then want to use a ...
1
vote
2answers
58 views

Logical “Except” operator for If statements in R

FYI, I'm new to using R so my code is likely quite clunky. I've done my homework on this but haven't been able to find an "Except" logical operator for R and really need something like that in my ...
6
votes
2answers
52 views

NA, TRUE and FALSE properties

I can't logically understand the properties of TRUE, FALSE and NA. Here are some examples... NA | T [1] TRUE NA | F [1] NA NA & T [1] NA NA & F [1] FALSE Can you explain me these ...
1
vote
2answers
47 views

R: Dealing with TRUE, FALSE, NA and NaN

Here is a vector a = c(T,F,F,NA,F,T,NA,F,T) I'd like a simple function that returns TRUE everytime there is a TRUE in a and False everytime there is a False or a NA. The 3 following things do not ...
2
votes
7answers
153 views

Execution order of conditions in C# If statement

There are two if statements below that has multiple conditions using logical operators. Logically both are same but the order of check differs. The first one works and the second one fails. I ...
1
vote
0answers
60 views

Does order of parameters in logical operators matters equality?

I'm constructing some class that will contains a logical expression: public enum LogicalOperator { And, Or }; public class LogicalExpression { public LogicalOperator Operator { get; private set; ...
-7
votes
2answers
96 views

Working of Logical OR ( || ) in C?

I am a beginner C programmer.......... was working with Logical Operators recently. The logical OR (||) is zero whenever both operands are zero. Or the working is somewhat different. How does it ...
0
votes
3answers
41 views

Logical operators, how are these evaluated?

I'm going through past papers to revise and there was a question that wasn't explained and I can't seem to find much online in regards to this question/topic. Binary values a = 00110011 b = 10101010 ...
0
votes
0answers
79 views

Combine two Binary images

I have obtained two individual segmentations - initial and the one after splitting clumps of cells . (Original image - Initial segmentation) I'm stuck up now as I am unable to combine these two ...

1 2 3 4 5 21
15 30 50 per page