2,617 questions
0
votes
0
answers
127
views
Logic Issue In Pine Script - On Trading View Strategy
I am working on a mean reversion strategy for bitcoin to automate trades on an Indian crypto Exchange. The pine script is supposed to generate buy, sell, buy side target hit, buy side sl alerts and ...
0
votes
0
answers
27
views
How can I create routing Keys in Rabbit MQ with Not Equals, AND, OR and Equals?
I went through Rabbit MQ documentation on routing keys. I see that there are only operators * and # to define a routing key.
I have about 10,000 users whose birthday notifications are to be processed. ...
0
votes
0
answers
66
views
Logical condition equivalent with restrictions
I am developing an Azure DevOps custom task. Part of the setting of the inputs is a VisibleRule which can contain a condition which will determine if the input will be visible, if the condition is ...
1
vote
3
answers
106
views
Evaluate Postfix and Logical Operators in C with no short-circuiting approach
I came across this question when studying logical operators and conditionals in C.
#include <stdio.h>
int main() {
int x = 3;
int y = 2;
int z = 3;
printf("Result #4 = %d\n&...
0
votes
1
answer
73
views
How do I construct a boolean circuit from a boolean function when I cancelled our one of the variables?
I was given a truth table of four variables, let's call them A,B,C,D. I found every instance where the truth table was true and turned it into a function:
F = (-A^-B^-C^-D) v (-A^-B^-C^ D) v (-A^-B^ C^...
-1
votes
1
answer
102
views
Apply expanding calculations on SQL Server
I have this table in SQL server :
date
var
val
2022-2-1
A
1.1
2022-3-1
A
2.3
2022-4-1
A
1.5
2022-5-1
A
1.7
2022-09-1
B
1.8
2022-10-1
B
1.9
2022-11-1
B
2.1
2022-12-1
B
2.22
I want to group by column ...
-1
votes
1
answer
736
views
Write the Boolean Function F(A,B,C,D) using no more than 2 Nor Gates
I am working on a problem where I have to draw a logic circuit using no more than 2 Nor gates. The function F(A, B, C, D) = Σ(2,4,10,12,14) with don't care conditions Σ(0,1,5,8). After drawing the k-...
-1
votes
4
answers
133
views
Replacing a nested if statement with a single if statement that has a logical && (AND) operator to achieve the same output
Below is a code that demonstrates a nested if statement for exam marks:
public class NestIfExample {
public static void main(String[] args) {
Scanner inputDevice = new Scanner(System.in);
...
2
votes
1
answer
511
views
AND and OR logical operator shape [closed]
I was looking into logical operator diagrams to learn about that stuff and I couldn't find out why the AND operator has a straight base while the OR has a curved one. Does anyone have an answer, or a ...
1
vote
2
answers
183
views
Representing logical expressions as an Object?
How can I represent logical expressions that might or might not contain brackets as a object in Java?
I want to be able to be able to evaluate expressions that can be from only A to A AND B or more ...
0
votes
1
answer
145
views
How can the compiler affect the way logical values are represented in Fortran?
This question is based on these 2 other questions [1] [2], but I figured I'd get more progress if I asked something less specific and worked by myself from there.
According to an user in the first ...
1
vote
2
answers
355
views
Simplify a boolean expression with 4 variables to 3 variables
I'm doing some simplifications for a circuit and I ended up getting the following expression:
A.C'.D' + A.B'.C' + B.C.D' + B'.C.D + A'.B'.D'
which translates to the truth table where 0, 2, 3, 6, 8, 9, ...
-1
votes
1
answer
148
views
Precedence of pre-increment operation over post-increment operation [duplicate]
package test;
public class Test {
public static void main(String [] args) {
int a = 10;
int b = 12;
System.out.println( ++a == 11 || b++ == 12);
...
0
votes
1
answer
98
views
Power Query: Multiple Criteria Filtering with Logical Operators
I have the following table in power query:
I'm trying to return the latest files for BOTH words "RAM" and "SoCal". In this case, the return files would be:
RR RAM 2024-07-08.xlsx
...
0
votes
1
answer
80
views
How to logically extract a part of a WHERE clause condition and execute it outside of an SQL query later?
The scenario
Let's say we have a database table 'TABLE' with entities identified by 'ID'. Each entity has several features stored in columns (COLUMN_1 to COLUMN_N). There is an additional feature of ...