Questions tagged [func]
Func is a family of delegate types in the .Net framework.
func
1,172
questions
0
votes
0
answers
18
views
Can I call a function to get data from other contract in smart contract with FunC in TON blockchain?
I have a question with TON blockchain
Suppose that, I have a smart contract, I want call a function of other smart contract to get data to continue process. How to do it in FunC:
() recv_internal(int ...
0
votes
0
answers
21
views
Can I get seqno of a sender address in FunC smart contract of TON blockchain?
I want to fetch seqno of a sender address in FunC for relay protection purpose.
How to get it ?
() recv_internal(int msg_value, cell in_msg_full, slice in_msg_body) impure {
if (in_msg_body....
0
votes
2
answers
71
views
Go Pass Func to Struct like fields, Error "too few values in struct literal of type Test"
type Test struct {
a int
b int
}
func f(a, b int) (int, int) {
return a, b
}
k := Test{(f(5, 6))} // Error
but
type Test struct {
a int
}
func f(a int) int {
return a
}
k := ...
0
votes
1
answer
51
views
Entity Framework Core: Passing a function to a Where and doing a Select will construct the object? [duplicate]
I am running into a very confusing issue with querying data in EF Core, and hoping that I can find the answer here.
I have School and Student entities that are mapped to the tables with the same name ...
0
votes
2
answers
59
views
Can I access params of method execution passed to a Func<> in C#/.NET?
I am attempting to make a method that can iteratively call RESTful API endpoints that implement paging until a specific JSON object is found. I'll outline the intended pattern below and then describe ...
0
votes
2
answers
72
views
Cannot convert anonymous method block to delegate because some of the return types in the block are not implicitly convertible
I want to refactor some functions that create asynchronously ViewModels. They were looking as follow :
public async Task NavigateToCreateFormVM()
{
try
{
IsLoading = true;
...
0
votes
0
answers
52
views
Unable to send internal message with UTF-8 comment in FunC (TVM exit code 9)
I have wrote simple contract that raffles TONs between participants (wallets that deposited into it).
However, I faced such issue, that while sending internal message from my contract to the winner ...
0
votes
1
answer
21
views
Get a total sum of the column whilst looping through rows
Patient
arrival datetime
depart datetime
Total in department
1
09/04/2024 23:00
10/04/2024 11:00
2
10/04/2024 07:42
10/04/2024 09:57
3
10/04/2024 09:15
10/04/2024 13:00
4
10/04/2024 08:56
10/04/...
-1
votes
1
answer
117
views
C# Func with Lambda Expressions
I am struggling to get my head around some c# codes. I am trying to find the documentation that provides the Syntax description for such usage of Func Delegates.
public class Person
{
public string ...
1
vote
2
answers
257
views
How can I run a func that lives in a seperate View in SwiftUI?
I have an app wherein once navigated to a second page and shown some results, the user has the option of running the same function but with some different parameters.
I am stuck on figuring out how to ...
1
vote
1
answer
50
views
have a button in a tableview cell print something
In my swift code below it features a button in a tableview cell. The problem is when i click on the button nothining is being printed. I dont know what to do next the button is connected and should ...
0
votes
2
answers
105
views
In C#, how do I replace a Func with a delegate in a function parameter?
Looking at the following function that expects another Function with an output type T and simply calls it at returns the result:
T CallFunction<T>(Func<T> lambda)
{
return lambda();
}
I ...
-3
votes
1
answer
89
views
I have trouble understanding this code. Sorry for the dumb question [closed]
void func(int N)
{
int i, j, arr[246913] = { 0,1 };
for (j = 2; j < 246913 / j; j++)
{
if (arr[j] == 1)
continue;
for (i = j * j; i < 246913; i += j)
...
1
vote
0
answers
56
views
can i update appointments in sfcalendar with drag and drop functionality?
I write the code of sfCalendar but in month view drag and drop not working
`SfCalendar(
onTap: (value) {},
onViewChanged: (value){
...
-2
votes
1
answer
128
views
Swift unabel to find "" in scope [closed]
So I'm trying to create an app with a login and register screen and I've created a guard function to create and add a new account in which i could log in later.
Thi is the implementation
import ...