func Questions

2

Solved

In my python code, I import func... from sqlalchemy.sql.expression import func Then, during my code I select data from a database table... select(func.max(MyTable.my_datetime)) ...where my_dateti...
Akins asked 20/3, 2023 at 10:52

7

Solved

Why is a Func<> created from an Expression<Func<>> via .Compile() considerably slower than just using a Func<> declared directly ? I just changed from using a Func<IInte...
Unideaed asked 18/11, 2010 at 3:27

13

How I can make a random color function using Swift? import UIKit class ViewController: UIViewController { var randomNumber = arc4random_uniform(20) var randomColor = arc4random() //Color Bac...
Touchdown asked 21/4, 2015 at 17:24

14

Solved

I'm trying to write a basic go program that calls a function on a different file, but a part of the same package. However, it returns: undefined: NewEmployee Here is the source code: main.go: ...
Story asked 26/1, 2015 at 15:27

7

Solved

I have Go program that has a function defined. I also have a map that should have a key for each function. How can I do that? I have tried this, but this doesn't work. func a(param string) { } ...
Wehner asked 20/7, 2011 at 21:54

10

Solved

Can someone provide a good explanation (hopefully with examples) of these 3 most important delegates: Predicate Action Func
Wellknown asked 19/2, 2009 at 19:49

3

I am trying to implement a fetch mock function in my test. Following tutorials I am trying to do this by using jest.fn(): const fetchFunction = jest.fn(() => { return null }) This does not wor...
Pyrosis asked 1/12, 2020 at 14:24

2

Solved

Is there anything wrong with my code here? I keep getting this error: System.InvalidOperationException: The request message was already sent. Cannot send the same request message multiple times....
Tubbs asked 30/7, 2014 at 21:28

1

Solved

I have func<Task> delegates in my project which can be null. Is there any way to make the call of such a delegate simpler as displayed below? public async Task Test() { Func<Task> func...

4

Solved

How to get the value of the passed parameter of the Func<> Lambda in C# IEnumerable<AccountSummary> _data = await accountRepo.GetAsync(); string _query = "1011"; Accounts = _data.Filte...
Limen asked 17/7, 2013 at 6:28

2

Solved

Disclaimer: this question is driven by my personal curiosity more than an actual need to accomplish something. So my example is going to be contrived. Nevertheless I think it's an issue that might ...
Orchidaceous asked 25/6, 2012 at 13:30

3

Solved

I've read multiple posts and blogs similar to Delegate-based strongly-typed URL generation in ASP.NET MVC But none of them really quite do what I'd like to do. Currently I have a hybrid approach ...
Rigby asked 17/12, 2015 at 22:44

1

Solved

I have a SwiftUI View called MyWatchView with this stack: VStack (alignment: .center) { HStack { Toggle(isOn: $play) { Text("") } .padding(.trailing, 30.0) .hueRotation(Angle.degr...
Ellieellinger asked 23/3, 2020 at 14:45

2

Solved

I am looking for a way to dynamically build an expression, based upon the method parameters. This is the code snippet from my service method, where I would like to build a predicate expression. ...
Saldivar asked 10/3, 2020 at 15:51

1

Solved

I'm running into an issue where some test code for a library I'm writing won't compile due to an ambiguous call but the usage seemed clear to me. Upon further investigation I've found that ad...
Kannada asked 23/2, 2020 at 4:21

4

Solved

In C# is it possible to pass a method a nullable Func? Neither Func<A, bool>? nor Func?<A, bool> is working.
Zebulen asked 15/5, 2012 at 14:44

2

Solved

I am refactoring a large iOS Swift project gradually. Some function have to be renamed and I cannot rename directly because many other modules directly calling it. Instead, for the first phase rele...
Deponent asked 31/10, 2019 at 8:55

2

Solved

I'm learning Swift 2 (and C, but also not for long) for not too long and I came to a point where I struggle a lot with recursive enumerations. It seems that I need to put indirect before the enum ...
Craggy asked 26/9, 2015 at 17:26

3

Solved

I am wondering if this is a sane choice of key for a dictionary? What I want to do is use an expression as the key in a dictionary, something like: var map3 = new Dictionary<Func<int, bool&...
Downwind asked 16/11, 2012 at 2:15

5

Solved

#include <stdio.h> void someFunc(void) { printf("%s\n"), __func__); } Each time the function is called it will print: someFunc What is the java equivalent? I have found (new Exception...
Sofiasofie asked 26/3, 2011 at 0:11

1

Solved

As input to another program I am using I need to input a delegate of the form: Func<double, double, double>. I want the function to be sent in to be F(a,b)=a+b*c+d where c and d are...
Keratinize asked 27/2, 2019 at 12:59

5

Solved

I found myself confused with the array and slice data types. From Go docs, arrays are described as follows: There are major differences between the ways arrays work in Go and C. In Go, Arr...
Lalia asked 31/7, 2012 at 9:29

4

Solved

Starting from C# 7.0 the throw keyword can be used both as an expression and as a statement, which is nice. Though, consider these overloads public static void M(Action doIt) { /*use doIt*/ } publi...
Hekking asked 15/1, 2019 at 23:8

5

Solved

I am using FluentValidation and I want to format a message with some of the object's properties value. The problem is I have very little experience with expressions and delegates in C#. FluentVali...
Hudgens asked 5/1, 2013 at 0:40

2

Solved

I have been searching on internet to find out the difference between Func and Expression Func, somehow i got the point,the first one is just a function gets the data and then apply the functi...
Dislocate asked 26/7, 2018 at 8:7

© 2022 - 2024 — McMap. All rights reserved.