Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
27 views

I have a question ovi, my question is about input() how do I make a input on a if statement block and make it about it for example a heads and tails game.
GUY RUFF's user avatar
0 votes
0 answers
23 views

I have a large xhtml file, below the imports there is a component that should only render when a test from a Bean returns true. <c:if test="#{MyBean.myFunction()}"> <div id=&...
boycott-nestle's user avatar
-6 votes
1 answer
116 views

import pandas as pd a=1 b=2 c=3 for n in range(10, len(df)-1): if df.loc[n].isin([a]).any() and df.loc[n].isin([b]).any() : for x in range(0, ...
Kan's user avatar
  • 41
1 vote
2 answers
99 views

I am a beginner in Ruby and I am having trouble with if else statement. As you know, Ruby will return the last calculated code if the return keyword is not specified. Here is the issue. def aMethod(*...
user31692069's user avatar
0 votes
1 answer
105 views

Is there an obvious reason why an if-else statement would not be processed in a button's onCLickListener()? I have a HomeScreen Widget with a Settings Activity incorporated. In there, there is a ...
Bossredman's user avatar
2 votes
4 answers
128 views

I am still a beginner in python. I am trying to find a common value with if statement, import pandas as pd df = pd.read_csv("data.csv") for n in range(2, len(df)): if df.loc[n].isin([2]...
Kan's user avatar
  • 41
0 votes
1 answer
45 views

I want to add a custom column to concatenate several columns with some if statements. I am getting a "Token 'else' expected error message. Can you please tell me what I forgot or did wrong? Power ...
Louchie20's user avatar
3 votes
2 answers
154 views

I'm learning Assembly through the "Easy 6502 by skilldrick" website. I have one question. I'm in the part about branching. I wrote the following code: LDA #$FA ADC #$01 BCS ...
Federico Egidi's user avatar
0 votes
4 answers
206 views

My vba excel code is using split funtion from a combo box value. It takes an ID (alias=GG) which is a value right of the 6th hyphen. GG = Split(Sheet1.ComboBox1.Value, "-")(6) example return ...
Dasal Kalubowila's user avatar
0 votes
1 answer
90 views

I want to check to see if value from a form exists in Microsoft Access table using vba or macro that is user friendly but need help putting it together. I've tried, Private Sub Donor_Key_LostFocus() I ...
Sue Clark's user avatar
0 votes
0 answers
62 views

I'm trying to solve Project Euler Problem 12 in C++, which is to find the first triangular number with over 500 divisors. I am currently trying to write a function that counts the number of divisors ...
Andy Mc's user avatar
3 votes
2 answers
273 views

So, I am learning C language and was trying to make a function that returns the length of a string. In the if statement I mistakenly used "" instead of ''. So, instead of comparing to char '\...
Schrey's user avatar
  • 69
0 votes
2 answers
147 views

I am using a large dataset which contains patients with 5 different cancer types. Each patient can have one or more cancer diagnosis, identified in the n.cancers column. There are also columns for ...
Evridiki Georgaki's user avatar
1 vote
2 answers
187 views

I'm currently trying to filter a dataset containing audio data on bird species. The data looks like this: head(audiomoth_sample) id park park_abbr am_no sci_name com_name start_s end_s conf date_time ...
Peregrine9991's user avatar
1 vote
3 answers
128 views

Trying to aggregate a list of names that are overdue. This works great until I add an AND to the IF, then everything falls apart and no results are returned. I need to aggregate a list of names by ...
Brad's user avatar
  • 1,381
3 votes
3 answers
182 views

My stored procedure has this structure: if Count 1>0 then count 2 with (condition 1,) if Count 2>0 then count 3 with (condition 1,2) if Count 3>0 then count 4 with(condition ...
Annapurna's user avatar
  • 121
3 votes
1 answer
68 views

I have created the following pandas dataframe: import pandas as pd import numpy as np ds = {'col1' : [234,321,284,286,287,300,301,303,305,299,288,300,299,287,286,280,279,270,269,301]} df = pd....
Giampaolo Levorato's user avatar
-4 votes
4 answers
354 views

How to implement a method that receives two strings and displays a message with the longer string and its length, without using if, switch or ternary operators?
Marce Puente's user avatar
4 votes
3 answers
141 views

I am looking to show hospital procedure times done out of hours which would be between 19:00pm to 07:59am. For example a procedure start time at 01:15 should show as "Out of Hours" or "...
Gwen Taylor's user avatar
2 votes
2 answers
84 views

I'm writing code in VBA that will format files. There are different subs for each file type that should be activated by double-clicking a cell in a worksheet. The thing is that I'm using elseif ...
Kim Lelouch's user avatar
0 votes
1 answer
122 views

Snippet: struct Foo { constexpr explicit operator bool() const noexcept { return false; } }; int main() { if(auto a = Foo{}) // declaration OK { } auto b = Foo{}; // ...
Juergen's user avatar
  • 3,769
3 votes
1 answer
96 views

I am working on a simple 2 player dice rolling game and have found a problem that i haven't been able to fix, after a While loop, it refuses to execute an if statement def Main(): global player1_score,...
user30428193's user avatar
0 votes
0 answers
15 views

I used setx to deine my variable waOk now in a new cmd i get C:\Users\Jml>echo %waOk% ok C:\Users\Jml>if %waOk% == "ok" (echo ok) else (echo non ok) non ok why the "if" doesn'...
user3065266's user avatar
0 votes
0 answers
49 views

I'm trying to analyse acf/pacf plots of industrial production index, using first and seasonal differences to correctly identify SARIMA parameters. Data are stored in "zoo" time-series object ...
walkman_w902's user avatar
4 votes
1 answer
89 views

I am doing a simple substring check using vars in .bashrc. This check should prevent adding a new path entry to $PATH that already exists in $PATH. The lhs is fine but the rhs of the compare expands ...
user1741276's user avatar
-1 votes
1 answer
69 views

Hi, I have a list of percentages in row A, and I want to create a formula that, whenever the percentages don't add up to 100%, an even amount is added to each cell in Column A, and the number is ...
user21897381's user avatar
0 votes
1 answer
32 views

my function guess_loop only gets the first of duplicate values or its only filling in the first when I print display if I select B as my first letter it fills in fine but when i select O it only gets ...
JustinPhi's user avatar
2 votes
1 answer
115 views

My Objective: In Excel, I need to identify 'Special' projects. The excel formula already identifies if a project has 'Not Started' and 'Ended,' as well as what year (year 1, year 2, year 3) the ...
Purrsia's user avatar
  • 930
-1 votes
2 answers
124 views

currently I am trying to interpret the following line of code: if (! defined $variabletype) {$variabletype = "";} I am relatively new to perl so while I can guess what this conditional ...
user18040093's user avatar
0 votes
1 answer
71 views

We are trying to run a task conditionally, but the condition always seems to be true, even if it shouldn't. We have 3 files that are passing a parameter from the devops variables down to each file: ...
Ben5's user avatar
  • 933
-3 votes
1 answer
85 views

Straightforward question, how can I differentiate these ifs? if (a is not 1 and not 2) { ... } and if (a is not 1 and 2) { ... } As I understand it, first one can be written as if (a != 1 &...
Daniel's user avatar
  • 7,800
0 votes
0 answers
42 views

In a makefile I need to check, whether a program rocq exists in the system. If it exists assign one value to the variable, otherwise assign another value. I created the following code: OUTPUT=$(shell ...
user4035's user avatar
  • 24k
1 vote
3 answers
172 views

A program that prints the second last word of a sentence. public class secToLast{ public static void main(String args[]){ String gg = "I love India"; int len = gg.length()...
Aditya Sahu's user avatar
1 vote
1 answer
124 views

My Objective: In Excel, I need to find out what year (year 1, year 2, year 3, or ENDED) the project has been and will be through fiscal year (FY)2025 (using dates 10/01/24-09/01/25 for FY25). Version ...
Purrsia's user avatar
  • 930
0 votes
1 answer
91 views

I have a Svelte component with logic that's structured like this. See in playground here. <script> let a = true let b = false </script> <p>Hover over the asterisk at the end ...
Antrikshy's user avatar
  • 3,138
0 votes
1 answer
25 views

I am using the following DAX in the measure below: UPS %No Maint Bypass = VAR TotalMaintBypass = COUNTROWS ( FILTER ( ALL ( 'UPS (2)' ), 'UPS (2)'[UPS Maintenance Bypass] = "TRUE"...
cghanta's user avatar
  • 47
1 vote
0 answers
44 views

I am trying to create a indicator variable for panel data flagging "on/before" a certain year and "after". Trying both "ifelse" and "case_when" approaches, I do ...
Va Nee L. Van Vleck's user avatar
1 vote
2 answers
75 views

Using R, I want to check the ManufShortName column and if there is the word 'BLANK', then I want to return the word 'BLANK' in another column named AnalysisNotesCode in the same row. If there is a ...
SharonP's user avatar
  • 59
-1 votes
1 answer
40 views

Im using pyautogui and detecting multiple images through three if statements. But only the top if statement is activated, even though the other if statements should be true according to previous tests ...
Daniel's user avatar
  • 11
0 votes
1 answer
33 views

I have a simple sum column and a simple if statement in sum 0 that says "if sum antal=0 then 1 else 0" But on the last row it returns 0 instead of 1. I have tried to change the number ...
Michael Christensen's user avatar
-1 votes
2 answers
785 views

I’m confused about when to use switch vs if in Dart. I want to know which one is better for specific situations and when to choose one over the other. I tried using both if and switch to check a ...
PSAU's user avatar
  • 17
-2 votes
2 answers
117 views

so what is the difference between these two vhdl programs: process(clk) begin if(clk=1) q<=d; end if;end process; and this one: process(clk) begin if(rising_edge clk) q<=d; end if;end ...
Gahit Moncef's user avatar
0 votes
1 answer
96 views

Fairly experienced coder here. Here is some Swift code in a playground: var word : String? = "Hello, World!" if let word { print("it is a \(word)") } else { print("The ...
Eric Neufeld's user avatar
4 votes
4 answers
203 views

Suppose I have a dataframe df in R like this: A B C D 1.4 4.0 6.0 1.0 2.5 1.5 2.4 2.3 3.0 1.7 2.5 3.4 Say I want to write a function that checks the value of each cell ...
Astral's user avatar
  • 209
0 votes
1 answer
66 views

I'm having trouble getting this login page to work. It needs to take the user to a specific page depending on their credentials. There are 3 different tables for the different types of users. This is ...
OLLY M's user avatar
  • 1
0 votes
4 answers
185 views

char array[8][13]; memset (&array, 0, sizeof(array)); /* this is a rough example this is in a struct that is memset */ if (array[0]) { printf("this is valid"); /* again this code is ...
John Reed's user avatar
0 votes
1 answer
116 views

The following ruby method is expected to return either an array or nil, depending on whether or not the api call was successful. # @return [Array or nil] - but should not throw error if anything ...
nextstep's user avatar
  • 1,492
0 votes
0 answers
44 views

I am trying to add today's date on a column if that column contains 3 different words. I can do it with 1 word but no with 3 different. More specific: If B11 contains "Accepted, rejected or ...
Eni's user avatar
  • 1
-1 votes
1 answer
67 views

import time list = ["@gmail.com", "@yahoo.com", "@outlook.com"] email = input("Email: ") time.sleep(1.5) if email in list: print(email) else: ...
XhanjiGamer's user avatar
1 vote
2 answers
135 views

I am dynamically populating an array in Excel from another array in a different sheet based on a criteria and was successful in that but now I wish to auto update the returned total based on another ...
Jonathan Marshall's user avatar

1
2 3 4 5
1244