Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
91 views

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 ...
Raj's user avatar
  • 1
0 votes
0 answers
25 views

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. ...
stalwalk's user avatar
  • 113
0 votes
0 answers
58 views

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 ...
CodeMonkey's user avatar
  • 12.6k
1 vote
3 answers
103 views

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&...
Salma Ihab Hamed's user avatar
0 votes
1 answer
65 views

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^...
Scorch's user avatar
  • 29
-1 votes
1 answer
102 views

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 ...
Homer Jay Simpson's user avatar
-1 votes
1 answer
663 views

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-...
TheIncrediblyStupidOne's user avatar
-1 votes
4 answers
127 views

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); ...
Tom Vuma's user avatar
2 votes
1 answer
435 views

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 ...
Surya's user avatar
  • 646
1 vote
2 answers
177 views

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 ...
Mariza's user avatar
  • 11
0 votes
1 answer
143 views

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 ...
Leo's user avatar
  • 15
1 vote
2 answers
290 views

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, ...
Waffle_Runian's user avatar
-1 votes
1 answer
143 views

package test; public class Test { public static void main(String [] args) { int a = 10; int b = 12; System.out.println( ++a == 11 || b++ == 12); ...
Mustafa Quraishi's user avatar
0 votes
1 answer
92 views

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 ...
user1527227's user avatar
  • 2,278
0 votes
1 answer
70 views

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 ...
Ipsider's user avatar
  • 571
0 votes
1 answer
110 views

I understand that it takes 4A and subtracts it from B but the two appended 1s that are added to B make it difficult for me to understand. What am I subtracting from 2A? 1B1? I couldn't find any ...
Mohi Reza's user avatar
2 votes
1 answer
143 views

This may seem like a stupid question, please bear with me. I wanted to confirm what a comma evaluates to so I did the following. xy <- c(1:10) ab <- c(10, 2, 1, 6, 8, 6, 7, 2, 10, 6) # I ran ...
blessingAlabi's user avatar
0 votes
2 answers
88 views

I have to check a Boolean flag and base on its condition return different data result. for example I have a collection of books and their prices, normal result of query is prices matching 10, BUT IF ...
Rya.M's user avatar
  • 1
0 votes
1 answer
44 views

Edited I have a custom formula in conditional fange that fails to do the expected. The condition depends on 3 factors with AND and OR spanning on a range from line 2 to 726. =and(X2>1000,OR(AC2=&...
Omri Mandel's user avatar
-1 votes
1 answer
95 views

I am a beginner in this, I was curious if i can write the below code more efficiently. I can't use loops or conditional statements, just logical operators. double a = Double.parseDouble(args[0]...
CowardPeasant's user avatar
1 vote
1 answer
143 views

I'm using ERB to generate a set of instructions with location data, and want to accept an offset in my input. When I try to check if that offset is present however, it sets it's value to nil. If ...
Daniel Cusumano's user avatar
1 vote
0 answers
542 views

I am using PromQL. I have different labels that represent the same thing for different environments. For example: http_server_request{env=~"$env"} It works fine for the dev environment, but ...
Michael Eluz's user avatar
1 vote
1 answer
65 views

My code: xdf = pd.DataFrame(data={'A':[-10,np.nan,-2.2],'B':[np.nan,2,1.5],'C':[3,1,-0.3]},index=['2023-05-13 08:40:00','2023-05-13 08:41:00','2023-05-13 08:42:00']) xdf = A ...
Mainland's user avatar
  • 4,702
1 vote
3 answers
62 views

The title is rather confusing (apologies), but I will try to explain it here. I have a dataset with multiple names of individuals, the number of coffees they have had on a particular day of the week, ...
Anurag Mishra's user avatar
3 votes
0 answers
919 views

Consider the following filter Keep this filter (also provided in query form) in mind. We'll come back to it later. from: { domain1 domain2 email1 email2 } subject: { +"exact string 1" +"...
Musixauce3000's user avatar
-3 votes
1 answer
141 views

Basically in my react app I want to filter an array that meets 3 conditions, but if I use && (and) two times it doesn't work, only if I use || (or) and && (and) together. Example of ...
FabioNevez's user avatar
1 vote
1 answer
79 views

I have a dataframe with columns: import pandas as pd import numpy as np df = pd.DataFrame({ 'A': [False, True, False, False, False, False, True, True, False, True], 'B': [True, False, False, ...
prashanth manohar's user avatar
0 votes
0 answers
160 views

I'm trying to load a wav file into a C++ app I Keep getting the program to print Invalid Wav File with exit code 5. This means the program thinks the chunkID didn't match RIFF or the format didn't ...
Vibe's user avatar
  • 29
0 votes
2 answers
135 views

I am trying to compare two vectors for identical elements, say for vectors a and b below. # vectors a and b a <- c(1, 2, 3, NA) b <- c(1, 3, NA, NA) # compare for identity a == b ## [1] TRUE ...
rainbird's user avatar
  • 337
3 votes
5 answers
511 views

I want to consolidate multiple OR and AND conditions in R. I think x1 == 1 | x1 == 2 can be consolidated as x1 %in% c(1, 2). I'm wondering how x1 == 1 | y1 == 1 and x1 == 1 & y1 == 1 can be ...
MYaseen208's user avatar
  • 24.1k
0 votes
1 answer
31 views

I'm setting a $scope variable to 0 or 1 based on a successful action and showing elements with ng-show. I'm resetting the $scope variable to empty when the step is finished. However, I have discovered ...
begeleiding's user avatar
0 votes
0 answers
185 views

Given arrays of $requiredElements = @('Valid1', 'Valid2') $elementsGood1 = @('Valid1', 'Valid2') $elementsBad1 = @('Valid', 'Invalid') I can get back an array of booleans like this $requiredElements....
Gordon's user avatar
  • 7,027
0 votes
1 answer
39 views

I'm Trying operator logic but in Linq not match the results when the value is 0 or nothing in VB.NET Let STATUS = If(BLC < 24 And PRSOBNET Is Nothing, "NEED TO PRODUCE", "") is ...
roy's user avatar
  • 729
0 votes
0 answers
34 views

I'm encountering an issue with the following code snippet in Python. Despite my efforts, the variable painted_img always remains filled with zeros (0), it is for sure that sp_intensity[seg] is not ...
user17349469's user avatar
0 votes
1 answer
64 views

I am using the easyPubMed package in R, but I think this applies to PubMed generally, for example using the website interface (which is perhaps simpler for debugging since we know the R package is not ...
rempsyc's user avatar
  • 1,038
-2 votes
1 answer
550 views

I have a df "DISC_CONS_Reports" with 6 columns, each with 2 or more factors. I want to do something very simple, adding a column named 'State' with value 'Conscious_pure' when column 1 ...
Smemoranda95's user avatar
0 votes
1 answer
92 views

I was writing a piece of code for a practice problem where I was trying the display the highest odd number. I kept running into a problem where when I was linking two statements together with a & ...
Jay's user avatar
  • 3
0 votes
1 answer
53 views

I'm trying to combine lists of statistics scraped from the NCAA Baseball website into a table with bind_rows. One of my tables is returning a list of logical operators because one of the teams I'm ...
John Gennaro's user avatar
0 votes
0 answers
62 views

I executed the below java code in IDE. the first sysout prints false. where as second sysout prints true. Some websites says because of operator precedence this occurs. System.out.println(false &&...
nullr4pt0r's user avatar
0 votes
1 answer
24 views

I have the following situation using BigQuery Tables. I have a table with a field containing a string with codes: Table A | Model | codevalues | | -------- | ------- | | 658 | CC(1.3),CMB(GA),ECO(...
Paulo Medeiros's user avatar
-1 votes
1 answer
84 views

I'm trying to re-write / translate logic statements written arithmetically, into strings of min/max functions, some of them fairly complicated. Preferably using things like sed, awk, perl, python, etc....
user avatar
0 votes
0 answers
128 views

I'm trying to make an if statement that can take in if (input == "Cell" || "cell") so i don't have to worry about the user typing it with a capital or not. But in the console, it ...
Stuwie's user avatar
  • 13
0 votes
1 answer
71 views

coupe=data.frame(read.csv(file.choose())) #UNITS AS PER GIRTH - I want to assign girth classes to each tree for further computation of value coupe$g.class = NA for (i in 1:(nrow(coupe))) { if (...
Anurag Mishra's user avatar
0 votes
1 answer
127 views

The inputs are A[2:0], B[2:0] and C[2:0] respectively. The outputs are E,RA,RB,RC. If at least at one of the inputs (A,B,C) none of the bits are equal to 1 or if at least at one input the bits that ...
Bhuhu's user avatar
  • 1
3 votes
4 answers
79 views

I have a data.frame with names of animals x=data.frame(c("lion","tiger","cow","vulture","hyena","leopard","deer","gazzelle&...
Anurag Mishra's user avatar
-1 votes
1 answer
47 views

Here is the class: class TreeNode: def __init__(self, key, left=None, right=None, parent=None): self.key = key self.left_child = left self.right_child = right self....
spacedustpi's user avatar
0 votes
1 answer
58 views

I want to know if in "if complex statements" can you check if the first element is true or false, then see if either the second or third element is true or false, and if the first element is ...
Elfza3h's user avatar
0 votes
0 answers
36 views

I have a dataset structured like below. Elapsed Time (sec) Vertical Translation (cm) Gantry Angle (deg) TreatmentDate 343.367 0.0454447 181.00000 Nov 2 344.065 0.0523568 184.46055 Nov 2 344.766 0....
ktvc's user avatar
  • 1
1 vote
0 answers
59 views

I am trying to write a simple code structure that verifies whether the && operator in a language (not a specific language, so I can't get help of truthy/falsy values) is left-associative or ...
pnguib's user avatar
  • 53
0 votes
1 answer
138 views

For a set of binary variables X = {x1, x2, ..., xn} (n>=1). Lets define sum operation for simplicity: sum(X) = x1 + x2 + ... + xn For another binary variable y, I want to write a constraint or more ...
Jengador's user avatar

1
2 3 4 5
53