Anonymous functions or closures in programming languages such as Lisp, C#, C++ or Python. (Also, lambda expression.)

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Unable to figure out this (Statement) Lambda Expression

I have come across a piece of code that i can not figure out and that even might not work. Below you can find the code. The Code i try to figure out in context The method GetDataTableData() returns ...
1
vote
0answers
9 views

using a lambda or proc and rails-money

I want to be able to set the currency on the model dynamically using the currency as set by the model's parent. Like so: class Event < ActiveRecord::Base belongs_to :edition monetize ...
0
votes
2answers
22 views

Very Simple Lambda /Event Parameters Prob

So simply I am trying to pass MyReader into the EventHandler function. I know I have to use the " => " operator, but I still get errors. Here's my code: private void PrintButton_Click(object ...
0
votes
3answers
29 views

How Entity framework works with lambda-expressions in ASP.NET MVC

I'm working with EF code first. There are two classes which define my many to many association tables: public class UserProfile { [Key] ...
2
votes
0answers
74 views

Lambda expression execution

When the DoTranslation method is run, the output is the same hash code for all of the TranslatedObjects. Why is this happening as opposed to having a new List for each TranslatedObject? public class ...
1
vote
0answers
18 views

Why am I getting “not all Code path Returns a value error” on Func Delegate

I have a method which accepts a Func : private void testFuncCallBack(Func<string> funcDelegate) { //Some Code } Now I want to call and pass a func as a parameter: ...
0
votes
0answers
19 views

LINQ/Lambda update List items by spliting them into even groups

Some background of the application. This is for a WASP and SMPP transmitter accounts I have. I have a list<> that contains an object that has all the necessary objects for a SMPP PDU and to send a ...
0
votes
2answers
86 views

Conditional SELECT in Lambda expression LINQ

I'd appreciate if someone could advise on the following: I need to select different values (in my case Adapters) based on different conditions, I tried like this: return ...
0
votes
1answer
13 views

List<dynamic>.Find and List<dynamic>.FindAll

I am trying to do this but unable to find a workaround. I have a list of dynamic objects and its like ObjectList : List<dynamic> its filled with objects that have a dynamic property LastName. ...
1
vote
2answers
37 views

How to combine MemberExpression intances in C# for a LambdaExpression?

Given a class like this: public class AnEntity { public int prop1 { get; set; } public string prop2 { get; set; } public string prop3 { get; set; } } I am able to generate a lambda ...
0
votes
2answers
24 views

how to separate view and controller in python tkinter?

I have a problem with tkinter regarding separating UI and UI functionality in two modules,here is my code: 1-view.py from tkinter import * class View(): def __init__(self,parent): ...
0
votes
0answers
32 views

Override IsUnicode using Generic Extension

I'm trying to make a generic extension method on EntityTypeConfiguration<T> that will allow me to enumerate all the string properties on T and set the IsUnicode(false) for them. Here is what I ...
1
vote
2answers
40 views

Linq lambda entities , does not contain definition

I have this query code here : //Get all records based on ActivityID and TaskID. public IList<Model.questionhint> GetRecords1(int listTask, int listActivity) { ...
1
vote
1answer
57 views

mvc4 lambda: Add separate query to object model?

I have a query that pulls information about jobs: var jobs = db.jobs.Include(d => d.docs) .Where(o => o.officeid == 2); return View(jobs.ToList()); This works ...
0
votes
1answer
43 views

multi-threading and lambda variable scope

I am using a class that manages a pool of threads to run actions. Originally it was coded to take an Action (with no parameter) and I was calling it like this: void LoadTasks() { string param; ...

1 2 3 4 5 326
15 30 50 per page