JavaScript: split doesn’t work in IE?

you could add the code below to you program and it will work. var split; // Avoid running twice; that would break the `nativeSplit` reference split = split || function (undef) { var nativeSplit = String.prototype.split, compliantExecNpcg = /()??/.exec(“”)[1] === undef, // NPCG: nonparticipating capturing group self; self = function (str, separator, limit) { // … Read more

JPQL: Receiving a Collection in a Constructor Expression

The JPA spec (Version 2.0, 2.1 and 2.2 at least) doesn’t allow the use of collections as parameters in constructor expressions. Section 4.8 defines a constructor expression like this: constructor_expression ::= NEW constructor_name ( constructor_item {, constructor_item}* ) constructor_item ::= single_valued_path_expression | scalar_expression | aggregate_expression | identification_variable A single_valued_path_expression is what it sounds like – … Read more

Combine two Linq lambda expressions

So logically what we want to be able to do is create a new lambda in which it has a parameter of the input to the first function, and a body that calls the first function with that parameter and then passes the result as the parameter to the second function, and then returns that. … Read more

Get the name of a method using an expression

x => x.DoSomething In order to make this compilable I see only two ways: Go non-generic way and specify it’s parameter as Action<string, string> Specify Action<string, string> as your target delegate type by yourself: GetMethodInfo<IMyInteface>(x => new Action<string,string>(x.DoSomething)) if you are ok to go with second one, which allows you to omit arguments then you … Read more