Tagged Questions
-1
votes
2answers
32 views
In an IF statement, does condition checking continue after one is found to be true (PHP)
For IF statements using OR or similar operators, after one is found to be true, does PHP continue checking the rest or does it stop there?
For example.
if(true == true OR a_checking_function())
...
-1
votes
0answers
7 views
Nest a power function into IF function for the if_true_value
trying to nest a power function in to a If function for the if_true_value. Formula using is =IF(B45="","0","(POWER(B45-$D$13),2)" excel 2010
-1
votes
0answers
21 views
Wordpress - Showing And Not Showng Category On Breadcrumb
I have this code in function.php
elseif ( is_single() && !is_attachment() ) {
$cat = get_the_category(); $cat = $cat[0];
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
echo ...
0
votes
3answers
94 views
How to code PHP function that displays a specific div from external file if div called by getElementById has no value?
Thank you for answering my question so quickly. I did some more digging and ultimately found a solution for grabbing data from external file and specific div and posting it into another document using ...
-1
votes
0answers
90 views
if/else statement returning incorrectly
I'm having real difficulty attempting to get an if/else statement to return true. Towards the end of the code there is an interrupt service routine. Within it there are 3 if statements related to the ...
0
votes
1answer
23 views
Can not get a PHP table to function properly. PHP Dungeon
I am working on creating a Dungeon scenario with PHP. Essentially what I am attempting to accomplish is creating a 10 x 10 table that will display a set of variables that are defined by a random ...
1
vote
1answer
38 views
How to write a compound IF statement checking two sets of two values
I know the title is confusing, but I can't figure our how to word it properly. I'm trying to figure out how to properly format a compound conditional in an IF statement in Excel. It's for a school ...
1
vote
2answers
61 views
If statement keeps looping - c
So I'm trying to finish off this program and all I need to do is implement some form of user input for this card game but so far everything I've tried just loops endlessly (or until I run out of ...
1
vote
3answers
57 views
Getting 'Fatal error: Call to undefined function' when using a function inside an if statement?
Ok, so I just finished off a function for validating the firstname field on a form.
This function works correctly on its own.
But since I want to make this function re-usable for more than one ...
0
votes
0answers
66 views
How to use an if statement to check values in user accounts
I have the following function which, put simply, allows one value to be taken from one user account and put into another. Now what I need to do is check that the member has enough coins available in ...
-1
votes
2answers
89 views
delphi function with Tcolor return
just a quick one, busy with an assignment...
can someone just check if my logic is correct on this function because it does not seem to work, I dont get any errors when compiling
I call the function ...
0
votes
0answers
22 views
Python 3, merging similar functions
In python 3 I have a small portion of code that takes an object, gets values from that object and creates a list in fixed order. However, getting the values can be done in various ways which means I ...
1
vote
1answer
35 views
Matlab different function over different intervals
I would like the function y to be zero if temp is less than 0.5 and exp(x) otherwise.
However what i tried below just sets all of y to zero. Any suggestions?
x = 0:.01:2;
tmp = x.^2;
if tmp<0.5
...
0
votes
3answers
59 views
PHP - Can I use a function for an equation in this if statement?
I have an alarm system that I want to run, but depending on the statistic, it needs to alarm for greater than or less than the stat for this time last week. The if statement is simply:
if ((($past / ...
3
votes
4answers
75 views
function nested in if statement
I'm having an issue with the following code if anyone could help me I'd be most grateful. Basically I have several links on several pages on a page that call urls. At the moment it's only calling the ...
0
votes
2answers
348 views
Excel Fuction Help - Compare 2 Cells in Worksheet to 2 Cells in another worksheet, if they match, return value from a different column
Im wondering if someone would be able to offer some advice on the best way to do this please:
Data in Worksheet # 1
Col A | Col B | Col C
Part-1 | 8 | 2
Part-2 | 7 | 7
...
0
votes
1answer
33 views
If Statement Inside a Function Not working
Similar questions have been posted but I have not been able to find an answer.
This IF statement works correctly by it's self.
$subject_id_top = "case studies";
if($subject_id_top == "case studies") ...
0
votes
1answer
100 views
c++ if loop and functions
In my program it first asks for the number of employees. The if loop says that if the input is input < 1 to output saying "Please enter a value of at least 1". If you input 0 or -1 it outputs for ...
0
votes
1answer
92 views
SQL Syntax error near variable in IF statement
I'm new in MySQL and I'm getting:
SQL syntax error near 'IsTrue=1 THEN' of the IF statement
The MySQL function is like :
DELIMITER $$
CREATE DEFINER=`root`@`localhost` FUNCTION `GetABCD`(Var1 ...
0
votes
5answers
55 views
Not doing anything for the first time running the function in javascript /jquery
The problem is I need to break the function if it is first time running
is there any function available , or I have to do something like the following?
var times = 1
function abc () {
if (times ...
0
votes
3answers
90 views
Adding if-else statement causes JavaScript to stop working
I have an assignment for my web design class & we were given a basic code that we need to modify to do more. As soon as I add an if, else if statement, the javascript stops working. I can't figure ...
0
votes
1answer
67 views
Generating Radio Button Result Depending On TextArea Value
A few days ago I did not manage to generate a result from my radio button, I managed to solve that problem now. My other problem is how do I generate ONLY few set of the radio button depending on ...
1
vote
1answer
65 views
remove repeated elements of a data.frame based on previous and next values in R
First of all, hallo! This is my first post here and I have to admit that I'm bit nervous
I have a data.frame where each element is in triplicates and has it own value, here is an example
test ...
0
votes
2answers
57 views
my function isn't returning anything in python
I made a function definition for a game I am working for in computer science class.
def bidf(bid): #this card is going to repeat until they give a valid bid
bid=float(input("What is your bid? ...
0
votes
0answers
105 views
Checking the value of data from a dropdown box in a form using an IF statement calling a function
I'm trying to set up an IF/Else IF statement to check the values from a dropdown box to run a different set of code depending on the value. I'm using a function to get the information and an array as ...
0
votes
4answers
68 views
Confused! PHP If not working
I'm slightly confused. Probably just me being very thick! Basically, I have the following function:
// Check if a verified email
function verified($username)
{
global $conn;
if($username == ...
0
votes
1answer
146 views
php code to fix canonical issue with joomla
as we all know joomla has some pretty big issues with canonical problems, and not really a way of dealing with this problem... i've written a code that checks for the url and adds the rel= canonical ...
2
votes
2answers
61 views
Issues with using conditionals based on user input in JavaScript
I am building a joke website for some friends, and one page on the website I would like to have somewhat of an interactive game. I am used to C++ so the transition to javascript is an interesting one.
...
-5
votes
1answer
71 views
Issue with loop involving if statements and functions [duplicate]
The Desired outcomes of this program are as follows:
Select a Shape (1) sphere (2) cylinder (3) cone (q) quit: 1
Select a Computation (1) volume (2) surface area: 1
Enter radius of sphere: 5.5
Volume ...
2
votes
1answer
146 views
How do i call multiple functions using if statements that have multiple parameters in C++
This program runs all of the functions for each condition, when it should only run one function for each condition. Why? i am supposed to Write functions that compute the volume and surface area of a ...