expressões-lambda

What are the advantages of Lambda Expressions present in Java 8?

Java 8 will be released soon (March 2014) and the main feature of this release are Lambda Expressions. Could anyone describe ... as the question says, what this feature will add in practice for developers and, if possible, some example of commented code?

What are lambda expressions? And what's the point of using them?

When I started using LINQ I saw that I could use the famous lambda expressions. I even know that x => x * x is a lambda ... and what the advantage of using them is. Then I ask you: What are lambda expressions? And what's the point of using them?

What does the "=> " operator mean?

I was seeing some solutions in JavaScript and in one case I saw this command line: return args.reduce((s, v) => s + v, 0);. But I don't know what the => Operator means. What is its function?

Convert Java Lambda predicates

I am trying to perform a model transformation using Java lambda. Below follows a block of code that exemplifies what I want t ... ranslatePrimitivePredicate method would be the concatenation of the terms, such as, "{varA stick} === 1". How can I do this?

Lambda function syntax

I am well at the beginning of the study of the Lambda function and I am well lost. I know the code could only be done with th ... ered and show the sum and I think the error is in line 5. How would that line look to sum all the numbers stored in the list?

doubt expression linq, clause IN

I have the following expression retorno = (from ven in context.VendaModel select new { ... public int cupom { get; set; } public string cnpj_filial { get; set; } public string cnpj_matriz { get; set; } }

How to create a custom list using data from four tables?

I have the following Class: Nota { int id; int idFornecedor; int idProduto; int idClasse; } And I have th ... int idProduto; int idClasse; string fornecedorDescricao; string produtoDescricao; string classeDescricao; }

Nomenclature or language in lambda

We have this expression: var teste = meucotexto.minhatable.Where(x => x.meu_campo.....) How do I read this part x => x.meu_campo I read X is for X. my_field or x from X. my_field or something else?

How to assemble a lambda expression and pass it by parameter to a generic function?

I need to pass two parameters to a generic function that returns database data and select only a few specific columns to disp ... (parameter passing): dgPesquisar.DataSource = UsuarioRepositorio.GetAll(null, u => u.login, u.Senha, u.NOmeCompleto );

How to map two list properties using Automapper

Class RegisterNewPessoaCommand public class RegisterNewPessoaCommand { public RegisterNewPessoaCommand(PessoaNatureza pes ... lId) : null ), new List<PessoaContato>() <========recebe as list de p.PessoasContatosViewModel ));

If, ElseIf and Else with Java 8

I would like to build a method using Java 8, replacing the IF, ELSE-IF and ELSE conditionals. For this, I built a code sequen ... .filter(Matcher::find) .map(Matcher::group) .map(String::trim) .orElse(null); }

How does Python handle common functions and lambdas functions internally?

I'm looking at Python's lambdas functions compared to the common functions that def uses to create them. Here is an example ... with respect to lambda expressions. Question How does Python handle common functions and lambdas functions internally?

Send list of objects to View, by ViewBag Asp.net

I'd like to get some data: Class: public class Produto { public Produto() { this.Categoria ... var geral = db.ProdutoDb.Where(x => x.CodProduto == produto.CodProduto); return View(produto); }

Return a single element from a list in a LINQ

I'm taking elements from a list and I can't delete the elements, I have to return all of them. I found a problem at the end o ... spose(); tagValuesDisposable?.Dispose(); }); disposables.Add(disposable); }

Map function with lambda in a list of Python dictionaries

Good night, I'm taking the data via API and turning it into one .JSON to write to a list:. Inside lsta info there is a list o ... 1B3B27CEFD0>, <map object at 0x000001B3B27F0048>) How do I list the elements within the dictionaries of that list?

What are the advantages of using AWS-StepFunctions?

Given that there is already a system or processes in progress (all functional) with AWS-Lambda functions what would be the ad ... ready have the logs implemented in CloudWatch? In another scenario, what if we were starting the system from the beginning?

About the structure of the 'sorted' function, how does it work?

The statement below is made as many times as the size of the Vector sub. What is the result of this instruction? sorted(sub, ... t = 0 while (int_type): count += (int_type & 1) length += 1 int_type >>= 1 return count

What does the [&] operator mean before a function?

I am trying to read the code of a function that is defined like this: auto loop = [&](int ntensor, char** data, const int64_t* strides, int64_t n) { ... }; What Does [&] mean before the function?

AWS Lambda, NodeJs, MongoDb

I am creating a Lambda application with nodejs and mongodb, I managed to deploy and tested on aws, but I have a but, any lamb ... as many active connections. What can this be? I have to by some flag in command sls deploy --region us-east-1 --stage dev

C# - How to make a lambda filter with more than one field?

My List: public class Carro { public int Ano; public double Valor; } List<Carro> Fiat = new List<Carro>( ... ; Fiat.Add(new Carro {Ano = 2002, Valor = 8000 }); How to make a filter in this list using lambda with more than one field?