conditional-statements Questions
2
Solved
Is there a way to conditionally (through a script task or anything else), control the flow of program in SSIS?
Currently I have a package that would create 5 different excel sheets (through Execu...
Kinna asked 21/12, 2012 at 17:59
3
Solved
I have a system in which I get a lot of messages. Each message has a unique ID, but it can also receives updates during its lifetime. As the time between the message sending and handling can be ver...
Discrepant asked 7/2, 2013 at 8:57
5
Solved
I have an enum FileType
public static enum FileType {
CSV, XML, XLS, TXT, FIXED_LENGTH
}
FileType fileType = FileType.CSV;
Is there a better (cleaner) way to check fileType for multiple values...
Ferret asked 27/11, 2014 at 14:25
3
Solved
I am trying to understand the MARIE assembly language. I don't quite understand skipcond for
doing things like <, or >, or multiply or divide.
I am taking this simple program:
x = 1
while x...
Bicentenary asked 27/2, 2011 at 23:35
2
Solved
This should be simple, but I can't find how to do this (or maybe it's not possible).
In MSBuild I have an ItemGroup that is a list of files.
I want to execute a task only if a particular file is i...
Humid asked 29/9, 2011 at 8:18
10
I have been using a ternary operator in JavaScript to modify the value of an object based on user input. I have the following code, which runs as it should:
var inputOneAns = inputOne == "Yes" ? "...
Argumentum asked 10/7, 2017 at 22:11
4
Is it possible to decorate a function based on a condition?
a'la:
if she.weight() == duck.weight():
@burn
def witch():
pass
I'm just wondering if logic could be used (when witch is called?) ...
Rabbi asked 22/9, 2010 at 20:55
10
Solved
In Stroustrup's The C++ Programming Language: Special Edition (3rd Ed), Stroustrup writes that the declaration and initialization of variables in the conditionals of control statements is not only ...
Ouachita asked 4/10, 2009 at 17:20
2
I have the following code:
<Import Project="C:\Program%20Files%20(x86)\MSBuild\ExtensionPack\4.0.13.0\x64\MSBuild.ExtensionPack.tasks" />
<PropertyGroup>
<Workspace></Wor...
Absorb asked 20/7, 2017 at 13:9
1
Solved
This code works in GCC and Clang, bug not on MSVC:
#include <concepts>
#include <utility>
struct S {};
const S&& f();
S g();
static_assert(std::same_as<decltype(false ? f(...
Sinistrodextral asked 19/4 at 14:13
3
Solved
I was working on an algorithm of sub sequences.
What is the meaning of the statement:
if (counter & (1<<j))
within the context of the program below:
void printSubsequences(int arr[], int...
Distinguished asked 13/1, 2017 at 7:40
14
Solved
I have to find maximum of three number provided by user but with some restrictions. Its not allowed to use any conditional statement. I tried using ternary operator like below.
max=(a>b?a:b)>...
Knout asked 16/8, 2011 at 5:38
5
Solved
Sometimes when making conditionals, I need the code to do nothing, e.g., here, I want Bash to do nothing when $a is greater than "10", print "1" if $a is less than "5", otherwise, print "2":
if [ ...
Frayne asked 11/7, 2013 at 1:24
6
Solved
For some reason I can't remember how to do this - I believe there was a way to set a variable in Python, if a condition was true? What I mean is this:
value = 'Test' if 1 == 1
Where it would ho...
Sorrells asked 14/11, 2011 at 0:51
11
Solved
This is my code for true on everything but empty string, null and false:
if (routeinfo["no_route"] == "" || routeinfo["no_route"] == null || routeinfo["no_route"] == false) {
// do sth ...
}
Th...
Almund asked 24/2, 2017 at 19:14
2
Solved
I'm parsing an XML file via Element Tree in python and and writing the content to a cpp file.
The content of children tags will be variant for different tags. For example first event tag has party ...
Blare asked 22/3, 2013 at 10:30
9
Solved
Postgres is the database
Can I use a NULL value for a IN clause? example:
SELECT *
FROM tbl_name
WHERE id_field IN ('value1', 'value2', 'value3', NULL)
I want to limit to these four values.
I ...
Urbani asked 15/6, 2011 at 17:59
5
I want to do multiple versions of a documentation, which differ in the sections that are included. To achieve this I would usually use either the only directive or the ifconfig extension. However, ...
Heliometer asked 21/2, 2013 at 12:7
18
Solved
I have an IBOutlet that I have linked to from the storyboard
@IBOutlet var creeLigueBouton: UIBarButtonItem!
and I want to make it disappear if a condition is true
if(condition == true)
{
// M...
Stubstad asked 25/8, 2014 at 18:51
3
Solved
I have an enum with two variants:
enum DatabaseType {
Memory,
RocksDB,
}
What do I need in order to make a conditional if inside a function that checks if an argument is DatabaseType::Memory o...
Cyler asked 19/7, 2018 at 18:22
2
Solved
Assume I have two Fortran modules called modA and modB. Is there a way to use one or the other in a program based on a conditional statement? Does this require some type of preprocessing? For examp...
Vasileior asked 13/5, 2016 at 21:19
3
Solved
What's the difference between the following:
a = np.array([2,3,4])
b = np.array([2,7,8])
if a.any() == b.all():
print('yes')
and
a = np.array([2,3,4])
b = np.array([2,7,8])
if a.any() == b.a...
Archdeacon asked 11/6, 2018 at 15:39
3
Solved
I read the caveats in the docs on Cypress conditional testing, but nevertheless need to apply it to a particular test for certain reasons.
I have a function to do it, but there are certain selector...
Zinc asked 23/7, 2022 at 2:47
7
Solved
Is there a way to make a "Browsable" attribute conditional, so the property that applies it will sometimes appear in the properties page and sometimes not?
thanks :)
Isolationism asked 14/1, 2011 at 11:20
4
Solved
i was wondering if you can have conditional statments inside a heredocs, this is my script but it deosnt parse out the $username properly?
php code:
function doSomething($username) {
if (isset($...
Pavior asked 25/10, 2010 at 5:58
1 Next >
© 2022 - 2024 — McMap. All rights reserved.