I need to get the name of a expression parameter. What i want to do is similar to what FluentNhibernate does with column mapping:
Map(x => x.Name)
From this, i need "Name".
How do I do this?
I can get x by doing this:
Expression<Func<User, object>> exp = x => x.Id;
exp.Parameters[0].Name;
But im not able to get "Name". Note th...
I have three related tables: People has ID fields for both Organisations and Locations. Locations has an ID field for Organisation. I want the Locations combo box in my People table to show only the Locations that have the Organisation_ID that was entered previously. I tried WHERE but it doesn't seem to recognise the [People].[Organisati...
Hi folks,
I'm trying to do some eager loading on an EF Entity.
so, if the entity is called Orders .. then I guess i would do the following...
_someContext.Orders.Include("Whatever") ....
But the problem is, I have a method like the following ...
public IQueryable<Order> Find(Expression<Func<Order, bool>> predicate)
{
return Curr...
Hey guys,
How do I change a label's colour (for example labelname = myLBL) programmatically?
Thanks
Andy
...
Hey! I am trying to play with making my app look better and I found this and was incredibly impressed with the workspace example found here: http://expression.microsoft.com/en-us/ff624123.aspx look at the example with state timeline and props with the workspaces which switch what has focus in the window.
The code can be found here : htt...
Hi,
I am trying to upload video created using MS Expression Encoder 4 to YouTube, but after processing any video is played in 3 seconds.
Any ideas? Is it problem of encoder configuration or YouTube?
Thank you.
...
Hi Guys,
Trying to get an OrderBy on an IQueryable to work, not having much luck.
Here's my method:
public ICollection<T> FindAll<T>(Expression<Func<T,bool>> predicate, Expression<Func<T,int>> orderingKey) where T : Post
{
return repository
.Find()
.Where(predicate)
.OfType<T>()
...
Hi,
We use the Jeks parser at present to evaluate expressions. I cannot see a way to evaluate string expressions with it - for example:
IF( "Test 1" = "Test 2")
Is there anything out there that can evaluate string and mathematical expressions in Java? Preferably free or open source.
Thanks for any help,
Andez
...
Hi all,
Could you answer me how to do next, please?
How to do this with Lambda?
Is it possible to delegate some object instance and use its properties and methods in case if this method doesn't know type of delegated object?
class class_a {
public string getChildData<T> (T dynamicInstance) {
return dynamicInstance.prop;
...
I need to create a designer for Silverlight in WPF and I’m thinking of a few options
Use a WebBrowser control,
display the content there and
communicate Silverlight using the
JavaScript Bridge. Not sure if this
will be enough for the scenarios I
need to support (see below). This is what KaXaml is doing. SilverlightSpy uses a a more so...
As per @Potatoswatter's suggestion, I have created a new discussion.
Reference is this response from @Potatoswatter
Given the code snippet,
int i = 3, &j = i;
j = ++ i;
The comment which I seek clarity on, is this. (which seems to be an important missing piece in my understanding of the unsequenced evaluation a.k.a sequence point)...
Hello
I need to either call exec() or eval() based on an input string "s"
If "s" was an expression, after calling eval() I want to print the result if the result was not None
If "s" was a statement then simply exec(). If the statement happens to print something then so be it.
s = "1 == 2" # user input
# ---
try:
v = eval(s)
...
I am trying to create the following dynamically, however I am having problems calling the extension method "FirstOrDefault"
using(var context = new Entities())
{
var list = context.Engines.Include("Cars").Select(e => e.Cars.FirstOrDefault()).ToList();
}
I have the following
Expression parameter = Expression.P...
Hi,
In my SSIS 2005 package, I need to give the FTP Connectionstring via an expression as I need to keep it configurable for the user from the dtsConfig file.
At the moment I tried giving the following expression:
Connectionstring = @[User::FTPServer] + "." + @[User::FTPUser] + "." + @[User::FTPPass]
For this unique syntax, I took poi...
I'm using mercurial as a SCM, and an output from the hg parents command in my makefile to store build number and version information in my program. However, mercurial is not always present on machines where I try to build the program. Thus, hg parent fails.
I'd like to use a substitute string (hard-coded or output from other program) whe...
int main() {
int i = -3, j = 2, k = 0, m;
m = ++i || ++j && ++k;
printf("%d %d %d %d\n", i, j, k, m);
return 0;
}
i thought that && has more precedence that || as per this logic ++j should execute, but it never does and the program outputs -2 2 0 1. What is going on here? What are the intermediate steps?
...
Preface :
i know, exist several topics talking about MVVM and how it is good (or bad) but my question is a bit different :i want to know if really exist any successful project that uses partially or completely MVVM, all all as a designer viewpoint.
I am starting another project using MVC (web), i have some experience with it and it wor...
I'm trying to find out what the algorithm would be by being given two languages L1 and L2 to determine if they are equivalent (L1 = L2).
It's surprisingly difficult to come up with one as I've found, although I am pretty sure it needs to be converted to a DFA first and then reduce each of them to a minimal DFA..
Also, I know that if L1...
Hi, I am using a GridView and I require the user to be able to filter using 2 controls. One simply filters the type of row - there is a column called action, and the user selects one of the distinct values from the database in a dropdown box, and the gridview only displays the rows with that value in the action column. On it's own this w...
I’m looking at using Expression Engine for a new site I’m developing does anyone have any experience of using EE, good or bad?
I’ve looked at some other CMS but found they are quite big and although you get everything, I like EE as it looks like you can streamline it to exactly what you want your users to use?
The main feature I need i...