I have 7 columns that have a yes or no in them (N2-T2). I need an equation that will place a 1 in "AI2" if there is a yes in any of the N-T cells. In my previous work with Excel I have only used the colon in an equation if I am adding the cells. Is this correct or does it have more use?
I tried the equation below and I get an error; #Va...
Hi all, I have a function which I use to limit form inputs to numbers only, or number and decimals depending on the field. Allowing decimals and numbers is easy enough, but I am trying to take it a step further and allow only one decimal, while also making sure that decimal is not the first character in the field. I have successfully a...
Hey all,
$url = mysql_real_escape_string($_POST['url']);
$shoutcast_url = mysql_real_escape_string($_POST['shoutcast_url']);
$site_name = mysql_real_escape_string($_POST['site_name']);
$site_subtitle = mysql_real_escape_string($_POST['site_subtitle']);
$email_suffix = mysql_real_escape_string($_POST['email_suffix']);
$logo_name = mysql_...
int expenseCode;
if (int.TryParse(sourceRecord.ExpenseCode, out expenseCode) && _ExpenseCodeLookup.ContainsKey(expenseCode))
{
destRow.PROFIT_CENTER_NAME = _ExpenseCodeLookup[expenseCode];
}
else
destRow.PROFIT_CENTER_NAME = "Unknown";
The thing I am conerned about is will the first expression always be run (setting expenseC...
Is there a way to test if a certain element (.container) is hidden, in a whole document? Such as (which doesn't work properly):
$(".showall").click(
function () {
if ($(".container").is("hidden"))
{perform a task}
else
{return false;}
});
...
I have 3 ranges of numbers and the answer depends on the range.
75-79=0.255
80-84=0.327
85+ =0.559
I tried to create an equation that accounts for the ranges, however excel states that I have entered in too many arguments for this function. Below is the equation that I entered that is not working. (X2 contains the number)
=IF(X2=7...
I have multiple user types in a system that shows each user different views and templates of the stored information, often based on whether they are logged in and what current_user.user_type is. As a result, I have lots of this:
#controller
@project = Project.find(params[:id])
if current_user.user_type == "Company"
redirect_to :contro...
Im trying to set up a form where a user has to pick an option from a select or enter a value in an input. One must be required but not both. I was attempting to write an if else statement
if the state is selected then remove the class on province, if province is filled then remove class on state
$("#state").bind('change' , function() {...
I have a small problem. I access the site thru foro.php?id=74&mode=add or foro.php?id=74&mode=edit it works fine.. But when I add a colon, semicolon (; or :) to foro.php?id=74&mode=add it goes to the edit option
foro.php?id=74&mode=add;
foro.php?id=74&mode=add:
foro.php?id=74&mode=add’
Below is my code
<?php
$numb=mysql_real_escape_...
Hi guys, well to begin with I'm sure this is a simple question.
I am developing an iPhone app with the iAd Framework, which only runs for iOS 4.0 or higher.
Still, I wanna choose a iPhone OS 3.0 deployment target, which causes everything to crash.
How do I conditionally include the iAd framework?
...I mean, it would be something like...
I have a full list of timezones in a select menu like so:
<option value="Pacific/Kosrae"> Pacific/Kosrae( +11:00 GMT ) </option>
<option value="Pacific/Kwajalein"> Pacific/Kwajalein( +12:00 GMT ) </option>
<option value="Pacific/Majuro"> Pacific/Majuro( +12:00 GMT ) </option>
<option value="Pacific/Marquesas"> Pacific/Marquesas( -...
Hi, I'm trying to make a SELECT where I need to select a specified table by a column wich define the type of subject:
table_buildings
id name location source_type source_id
1 NY Appartament New York 0 NULL
2 Guggenheim Museum Manhattan 1 27
3 M...
I could probably use multiple else if statements, but is there a simpler and cleaner way to do an if (condition or othercondition..) in objective-c?
...
Please have a look at the following:
jQuery(document).ready(function() {
var full_url = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname;
var part_url = window.location.protocol + "//" + window.location.host + "/domain/shop/";
part_url = part_url + "cat1/";
if (full_url ==...
I'm letting users search my database for data by city.
My query looks like:
$results = mysql_query("SELECT * FROM mydb WHERE City='".$city."' LIMIT 10");
I want a user to be able to search 'all cities', so I'd like to either remove the WHERE statement if $city=='all cities'; or use a wildcard for the WHERE statement that matches all ci...
Is it possible to do something like this?
if (myVariable == 100 for more than 1 second) {
}
So if myVariable equals 100 for more than 1 second do something.
Thanks!
Elijah
...
when i'am calling timer1.Start() func in an event handler that contains two adjacent if blocks, its tick events doesn't fire and the code following it also doesnt get executed.
on the othr hand, using an if-else pair instead solves the problem. why it can be so??
...
So far, I have some working code that goes into a list of servers and does some regex to grab data from a log file. What I want to do is to pring out a status of "NOTHING TO REPORT FOR THIS SERVER" if there is NO data to capture from the regex on a particular server.
Right now, it goes through each server and if data matches the regex,...
An easy question to ask, hope not to stupid.
$var=0;
$condition="$var!=0";
if($condition) {
# do something #
}
else {
# do something else #
}
Obviously the code up there doesn't work as intended. Is there a nice way to obtain an if-condition from a string? Or do I have to parse the string in some disturbing way?
EDIT
I didn't...
I ran into this a bit ago and was wondering why the "Begin" & "End" is need to result in correct values. the if statement(s) is a singleton and does not require the "Begin" & "End" where multiple statements in the if would require it and if omitted would generate an execution error when trying to create/alter the procedure.
Any ideas...