expression Questions
1
So let's say that I have the following classes:
public class Model {
public AnotherModel InnerModel {
get;
set;
}
}
public class AnotherModel {
public String Value{
get;
set;
}
}
Now I ...
Potsdam asked 12/11, 2014 at 15:12
1
Solved
Is there a way to convert the property selector Expression<Func<T, TProperty>> to Expression<Func<object, object>> and vice versa? I already know how to convert to Expressio...
Airminded asked 8/10, 2014 at 9:19
1
Solved
I'm using regular expressions to help find/replace in Visual Studio 2012.
According to msdn, (?([^\r\n])\s) matches any whitespace character except a line break. But I don't understand how it works...
Linseylinseywoolsey asked 5/11, 2014 at 6:15
3
Solved
I'm trying to get an Label on an arrow that says:
||x|| cos (alpha)
But I can't seem to make it work.
I can write the ||x|| without problems, and the cos (alpha) without problems, but I don't...
Brindle asked 4/11, 2014 at 9:29
1
Solved
I am trying to copy the behavior of Entity Framework in creating the query from expression and i found my way using ExpressionVisitor when getting the property of the model by using Attribute
thi...
Madelaine asked 21/10, 2014 at 5:42
3
Solved
I have these 3 predicates:
times(X, Y):-
Result is X * Y.
minus(X, Y):-
Result is X - Y.
plus(X, Y):-
Result is X + Y.
and I want to pass for example times(2,2) in the plus(X, Y) like this pl...
Stupefy asked 19/10, 2014 at 17:54
2
Solved
The Rust Guide states that:
The semicolon turns any expression into a statement by throwing away its value and returning unit instead.
I thought I got this concept down until I ran an experime...
Virelay asked 19/10, 2014 at 2:10
2
Solved
I need to combine two lambda expressions, in a way that the second expression "contains" the first.
I searched a lot but did not find any clear answer...
What i am trying to do is the following :
...
Amble asked 17/10, 2014 at 10:37
3
This line won't compile:
Shape shape = (i % 2) ? Circle(5) : Rectangle(5, 5);
(I know it's useless since whatever the expression returns will be reduced to a simple Shape, that's not the point).
C...
Bridgettebridgewater asked 3/10, 2014 at 23:56
5
Solved
I'm new to expressions, and i'd like to know how if it's in any way possible to convert my expression
Let's say in this example my TModel is of type Customer, and assigned it somewhere like this:
...
Stanfield asked 11/10, 2011 at 9:10
5
Solved
Using an expression like this on the style attribute works on Chrome but doesn't work on IE8
style="width:{{progress}}%"
http://jsfiddle.net/5VDMD/12/ (to test it please type a number in the te...
Calotte asked 5/12, 2012 at 5:40
1
Solved
I am working on filter mechanism using expressions and can't figure out how call Any method using Expression.Call. Below is example which doesn't make sense but illustrates my problem :
var person...
Seychelles asked 15/9, 2014 at 10:4
3
Solved
I'd like to write a statement like the following:
Expression<Func<AClass, bool>> filter = x => true;
Except instead of AClass, I'd like to use a Type variable determined at runtim...
Persecution asked 11/9, 2014 at 17:34
3
Solved
I have some doubt about type conversion, could you explain me what happens in an expression like this:
unsigned int u = 10;
int a = -42;
std::cout << u - a << std::endl;
Here I know ...
Rosiorosita asked 1/9, 2014 at 15:32
5
Solved
In the following code:
int c;
while((c=10)>0)
What does c = 10 evaluate to? Is it 1 which indicates that the value 10 is assigned to variable c successfully, or is it 10? Why?
Clerissa asked 15/5, 2013 at 14:21
4
Solved
I'm working with the thymeleaf standard dialect and trying to render a list of checkboxes in a form. The rendering is ok, however, the problem is where I try to apply the "checked" property to the ...
Nissie asked 18/12, 2013 at 19:20
1
Solved
For some reasons, I'd like to play with R calls (at least as far as syntax is concerned) in a more Lisp/Scheme-like fashion (we all know that R has been heavily inspired by Scheme).
Thus, I set up...
Gaslight asked 20/6, 2014 at 14:53
3
Solved
Is possible to convert a Predicate<T> to Expression<Func<T, bool>> in some way?
I would like to use the next IQueryable function using the filters of the my ICollectionView:
pub...
Protege asked 21/3, 2012 at 10:1
2
Solved
While discussing the Type(identifier); syntax and how it's a declaration, I came across Type(::x); not working with Clang. I would expect that given a global variable x, it would treat ::x as an ex...
Snap asked 8/7, 2014 at 3:7
2
I've got a logical string read in from a configuration file written by someone else that contains expressions such as the following:
(VALUE_1)OR((NOT(VALUE_2))AND(NOT(VALUE_3)))
However, I'm a l...
Hathcock asked 1/2, 2012 at 12:56
4
Shift operators: << >>
bit-wise operators: ~, &, ^, |
sizeof operator: sizeof()
Per the C++ standard (n3797), I can only confirm that ~ yields prvalue (5.3.1/2), but not the others...
Jequirity asked 1/7, 2014 at 20:10
2
Solved
I am attempting to have a button be enabled or disabled in an angularjs app based on whether a comparison of two text fields evaluates to true or false. I have provided example code below and also ...
Riffraff asked 14/6, 2014 at 20:29
3
We are currently investigating the use of OData query syntax in our Web APIs.
We are not looking to implement a full OData implementation - merely leverage the query syntax.
It is generally consid...
Exclave asked 28/11, 2013 at 3:6
1
Solved
I'm trying to create dynamic queries against Entity framework (or other Linq provider).
Let me explain my problem with some sample code.
If I hardcode an expression :
var id = 12345;
Expression...
Hephaestus asked 12/6, 2014 at 15:24
5
Solved
In Chrome and Firefox,
typeof foo
evalulates to 'undefined'.
But
typeof (function() { return foo; })()
throws an error:
ReferenceError: foo is not defined
This destroys the notions that I...
Generous asked 10/6, 2014 at 20:58
© 2022 - 2024 — McMap. All rights reserved.