expression Questions
2
Solved
Ran into a strange interaction between print and the ternary conditional operator that I don't understand. If we do...:
print 'foo, ' . (1 ? 'yes' : 'no') . ' bar';
...then we get the output...:
...
Aphra asked 20/2, 2020 at 3:20
3
Solved
Hopefully this is quite simple. I want to use the CSS calc operation to perform two calculations:
I want to set my width to the equivalent of
(100% / 7) - 2
However if I try to perform more tha...
Nobie asked 22/12, 2013 at 18:11
2
Apparently, this ternary expression with void() as one argument compiles:
void foo() {}
//...
a == b ? foo() : void();
Is void() a valid expression by the standard, or is it just a compil...
Purgatory asked 28/1, 2020 at 20:17
1
Solved
I have the following child object that we use an expression to map our 'entity' to our 'domain' model. We use this when specifically calling our ChildRecordService method GetChild or GetChildren:
...
Hawaiian asked 3/1, 2020 at 16:15
6
Solved
I'm attempting to use a variable inside of a LINQ select statement.
Here is an example of what I'm doing now.
using System;
using System.Collections.Generic;
using System.Linq;
using Fake...
Unscientific asked 12/12, 2017 at 21:1
0
Consider the following code in AutoMapper
CreateMap<ViewModel, ServiceModel>()
.ForMember(
x => x.Type,
opt => opt.MapFrom(y =>
y.TypeName switch
{
"FirstName" => typeof(F...
Infest asked 5/12, 2019 at 10:30
2
Solved
I need to select some lines inside of a list of file names to bring them at the end of the list.
Suppose I have Files.txt with this list:
filename1.aaa
filename1.bbb
filename1.ccc
filename2.aaa
f...
Monomorphic asked 13/9, 2013 at 10:7
5
Solved
I encountered a statement in Java
while ((line = reader.readLine()) != null) {
out.append(line);
}
How do assignment operations return a value in Java?
The statement we are checking is line = ...
Arborescent asked 2/7, 2016 at 19:52
1
On doing the following,
from sympy import *
x, y = symbols('x y')
p1 = plot_implicit((Eq(x**2 + y**2, 5)))
I get the following traceback:
Traceback (most recent call last):
File "test.py", li...
Antiperistalsis asked 9/10, 2019 at 15:48
2
Solved
I need to concatenate two expressions (with or statement)
My code:
var items = new List<Item>
{
new Item { Color = "Black", Categories = new List<string> { "cat1", "cat2" } },
new I...
Poole asked 6/10, 2019 at 20:28
1
Solved
I want to plot a legend with bquote containing 4 rows (kappa=0.5, kappa=1, kappa=1.5, kappa=5).
Fot example:
kappa_var <- c(0.5, 1.0, 1.5, 5.0)
plot(1000, type="n", xlab="x", ylab= expression...
Mosqueda asked 22/9, 2019 at 11:40
2
Solved
I wanted to know if this is possible:
public class Foo<T> where T : Func<T>
or
public class Foo<T> where T : Func<>
It seems like the compiler is telling me it not pos...
Delitescent asked 4/10, 2014 at 22:18
3
Solved
When we pass an object which is managed by temporary smart pointer to a function by raw pointer or by reference, does the standard guarantee that the object's lifetime will extend to the function l...
Garibaldi asked 4/9, 2019 at 7:26
4
I know in Ruby, almost everything is an expression. Even those in other language such as if-else statement, case statement, assignment statement, loop statement is an expression in Ruby.
So I wan...
Lindbom asked 9/3, 2012 at 15:21
8
I have a question concerning evaluation of math expression within a string.
For example my string is following:
my_str='I have 6 * (2 + 3) apples'
I am wondering how to evaluate this strin...
Firework asked 28/8, 2012 at 16:3
2
Solved
I am just wondering what happens with that piece of code.
Why the result is incorrect only when printed directly, why is the newline ignored?
user@host_09:22 AM: perl
print 2 >> 1, "\n";
pri...
Staffman asked 12/6, 2019 at 7:30
7
Solved
I've read, Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc...) and tried understanding Sequence points on "comp.lang.c FAQ" after wasting more than 2 hours of time tryi...
Amino asked 28/11, 2012 at 22:7
3
Solved
Trying to count all rows in a column where column=Yes
I have two columns in my report Accepted and rejected.
I'm trying to count the rows where accepted=Yes and do the say thing for rejected.
I'v...
Harbourage asked 4/3, 2013 at 15:2
6
Solved
I know there are a few answers on the site on this and i apologize if this is in any way duplicate, but all of the ones I found does not do what I am trying to do.
I am trying to specify method in...
Arvad asked 22/11, 2011 at 10:28
8
I like to use a progress bar while running slow for loops. This could be done easily with several helpers, but I do like the tkProgressBar from tcltk package.
A small example:
pb <- tkProgress...
Sedan asked 8/9, 2011 at 14:21
2
Solved
I'm trying to make a service that returns a catalog based on the filters.
I've seen a few results on the internet, but not quite my issue. I hope you can help me with mine.
The issue is that this...
Tillo asked 10/4, 2019 at 20:16
4
Editing this question in the hope to make it clearer.
We have entity framework code first setup. I've simplified two classes for the purposes of example, in reality there are around 10+ more class...
Celestyn asked 15/3, 2019 at 17:2
9
Solved
What is the best was to evaluate an expression like the following:
(A And B) Or (A And C) Or (Not B And C)
or
(A && B) || (A && C) || (!B && C)
At runtime, I was planning ...
Rhoden asked 8/12, 2008 at 17:5
1
Solved
In SSIS package I have derived column in which I want to format phone like below:
CASE
WHEN TRY_CONVERT(BIGINT, phone) IS NULL THEN
NULL
ELSE
phone
END
How can I use the SSIS expression to a...
Recalcitrate asked 2/4, 2019 at 20:3
2
Solved
I have two lambda expressions:
Expression<Func<MyEntity, bool>> e1 = i = >i.FName.Contain("john");
and
Expression<Func<MyEntity, bool>> e2 = i => i.LName.Contain("...
Prismatoid asked 16/5, 2012 at 7:1
© 2022 - 2024 — McMap. All rights reserved.