expression Questions

1

Solved

With C# 6's expression-bodied members, I can write: public string FullName => $"{_firstName} {_lastName}"; And I can write: static void Print(string message) => Console.WriteLine(message);...
Hierophant asked 18/2, 2016 at 9:20

2

Solved

I need a little piece of magic. I believe what I am trying to do makes sense, but if it I've not seen a problem with the plan the reasons why would be just as welcome. I have an expression Expres...
Foredeck asked 5/4, 2013 at 8:43

2

Solved

I am trying to do a simple dynamoDB scan with a filter expression (documentation here) This is my expression string: "attribute_exists("my_db_key") AND ("my_db_key" = 1)" This simply states: "...
Nahshun asked 4/3, 2015 at 15:4

2

Solved

Is that possible to convert Expression to Expression<Func<T, bool>> if instance of Expression was created on T ? At the end I have list List<Expression> and need to produce on Ex...
Takamatsu asked 2/2, 2016 at 14:53

3

Solved

I'm in the process of creating a more elaborate filtering system for this huge project of ours. One of the main predicates is being able to pass comparations through a string parameter. This expres...
Gorky asked 15/5, 2012 at 11:33

2

Solved

I want a method like OrderBy() that always orders ignoring accented letters and to look at them like non-accented. I already tried to override OrderBy() but seems I can't do that because that is a ...
Chaetopod asked 28/1, 2016 at 12:28

1

Solved

Given an Expression<Func<TEntity, bool>> along the lines of entity => entity.SubEntity.Any( subEntity => ( (subEntity.SomeProperty == False) AndAlso subEntity.SubSubEntity.Fo...
Frimaire asked 27/1, 2016 at 16:24

2

In pdb (or ipdb) we can execute statements and evaluate expressions with the ! or p commands: p expression      Evaluate the expression in the current context and print its ...
Deckard asked 13/1, 2016 at 14:47

1

Solved

I'm just trying make the same expression like below using Linq.Expression: Expression<Func<Organization, bool>> expression = @org => @org.OrganizationFields.Any(a => a.CustomF...
Spotless asked 11/1, 2016 at 20:25

1

Hi I am trying to use that code to get property User.Email of customer that contains User. but its an object (User of type User) so it throws exception. what should i fix? public static IQueryable...
Autecology asked 22/12, 2015 at 12:39

3

Solved

I've been trying to use regular expressions on scanf, in order to read a string of maximum n characters and discard anything else until the New Line Character. Any spaces should be treated as regul...
Vernettaverneuil asked 14/2, 2013 at 11:15

3

Solved

The following code is wrong (see it on ideone): public class Test { public static void Main() { int j = 5; (j++); // if we remove the "(" and ")" then this compiles fine. } } error CS0201...
Octopus asked 22/12, 2015 at 18:24

2

Solved

I was playing with Scala 2.11's new macro features. I wanted to see if I could do the following rewrite: forRange(0 to 10) { i => println(i) } // into val iter = (0 to 10).iterator while (ite...
Archeozoic asked 18/12, 2013 at 18:33

3

Solved

I have a simple scenario, where i am trying to test the performance of a expression compiled tree on an list of stock objects. Below is the code The performance of expression compiled tree is 5x s...
Leisured asked 26/7, 2012 at 20:59

1

Solved

I'm currently trying to convert an Expression<Func<T,object>> to an Expression<Func<T,bool>> Currently the watch shows me that my expression holds Expression<Fu...
Saprogenic asked 17/11, 2015 at 9:38

4

Solved

I just discovered Racket a few days ago, and I'm trying to get more comfortable with it by writing a little script that generates images to represent source code using #lang slideshow. I know that...
Homestead asked 25/4, 2013 at 17:45

4

Solved

I'm wondering why this code doesn't compile: int x=-3; System.out.println(x-----x); Whereas this code does: int x=-3; System.out.println(x--- --x); I think the priority is for pre a...
Brezin asked 10/11, 2015 at 8:27

3

Solved

The code below won't compile: Func<Person, bool> theLambda = (p) => p.Year >= 1992; foreach (Person pers in PersonList.FindAll(theLambda)) { Console.WriteLine(pers.Name); } public ...
Myeshamyhre asked 31/10, 2015 at 15:31

2

Solved

I have an IQuerable<object> source object and have to get from it something like that (but using reflection). source.Select(t => new SelectListItem { Name = t.Name, Value = t.Id }) How...
Litter asked 11/1, 2013 at 9:36

2

Solved

Given a lambda that takes an Identification object, and returns a property: Expression<Func<Identification, object>> fx = _ => _.Id; And a conversion lambda that converts an objec...
Konrad asked 24/10, 2011 at 9:16

3

To my semi-surprise with Xcode compiling C (gnu11) #include <stdio.h> int main(int argc,char**argv) { short s = 1; printf( "%zd %zd %zd\n", sizeof(s), sizeof(s*s), sizeof(s?s:s)); return ...
Eiser asked 11/10, 2015 at 19:7

1

Solved

I have the following snippet of code: int x=2,y=3; if ( (y == x++) | (x < ++y) ) // rest of code I know that in C++ you're taught not to rely on evaluation order of subexpression,because it's...
Bookerbookie asked 24/9, 2015 at 7:25

4

Solved

I need an SSIS expression to get the left part of a string before the separator, and then put the new string in a new column. I checked in derived column, it seems no such expressions. Substring co...
Fail asked 6/6, 2012 at 20:21

4

Solved

I want to create a SQL Select to do a unit test in MS SQL Server 2005. The basic idea is this: select 'Test Name', foo = 'Result' from bar where baz = (some criteria) The idea being that, if the...
Kathe asked 30/1, 2009 at 22:28

3

Solved

I'm working with Struts 2 and when I'm accessing ValueStack variables I don't know whether to use % or # or $. I try all of them until I find the correct one. Can anybody explain what is the differ...
Eaglestone asked 4/11, 2011 at 10:26

© 2022 - 2024 — McMap. All rights reserved.