1,792 questions
1 vote
1 answer
82 views
Diff btw "Invoke( lambda )" and directly calling a lambda when we use Google Mock EXPECT_CALL
Since I learnt to use Google Test/Mock framework, I allways used the form to setup an expectation as following: EXPECT_CALL( mock_obj, mock_method ).WillOnce( Invoke( []() { do_things; } ) ); Few ...
2 votes
2 answers
106 views
I can't close the form from another thread
I've tried different ways to call the form's close method. The code below seems the most optimal to me, but it doesn't work as expected. I'd also like to avoid using Start-ThreadJob, as it requires ...
1 vote
1 answer
100 views
Can c++ std::invoke choose appropriate lvalue or rvalue reference arg overload automatically?
Here is a toy code to show what I hope it to work like: int func_invk_lr(int& a) { cout << "call left" << endl; return a; } int func_invk_lr(int&...
0 votes
1 answer
135 views
How to pass arguments to python fabric task
For fabric 2+ (specifically latest=3.2.2), how am I supposed to pass an argument to my task from the command line? (venv) ubuntu@ip-x-x-x-x:~/workspace/repo/tasks$ fab set-debug -v true No idea what '...
0 votes
0 answers
29 views
Could Pg function/procedure invokings be automatically logged?
I have a list of Pg functions. I want to write a log while each of them being invoked. I create a table call_logs(id serial,fn text,time timestsamp). I want to log each invoking automatically, that'...
1 vote
0 answers
90 views
Problem writing to a Control from another class and another thread
I have code that, using UDP, broadcasts the letter "P" to an Arduino WiFi. It should broadcast 3 times with 3 seconds interval and then stop. To monitor this, I want to see the broadcast ...
0 votes
1 answer
50 views
vb.net Invoke not returning proper values?
I'm interacting with GUI controls from a separate thread when invoked i'm always getting a "nothing" object despite what I think is the right code? Not sure where it's breaking. the second ...
2 votes
1 answer
1k views
ChatOpenAI: TypeError: 'FieldInfo' object is not a mapping
I have been experimenting with various langChain tutorials. Every time I call the invoke(messages) function, I get the error message TypeError: 'FieldInfo' object is not a mapping. I have gone ...
0 votes
1 answer
210 views
The thread callback doesn’t seem run when I construct `std::jthread` as a local variable inside a method, why?
I'm struggling to re-learn C++ and I'm playing around with jthread at the moment. I seem to have got things working when calling a class member function that I want on its own thread. However, the ...
0 votes
0 answers
102 views
Invoke and System.Windows.Forms.MethodInvoker delegate doesn t work
i have a QRCode scanning project with 2 Forms, form2 opens up after an IF loop in form1, as long as the condition is filled it opens form2 with different data (from different codes) until here ...
1 vote
1 answer
52 views
Kotlin labmda invoke alternatve
Assume we have the following code: fun interface A { fun a() } interface B { fun b(a: A) } fun x(callback: A.() -> Unit) = object : B { override fun b(a: A) { a.callback() ...
1 vote
2 answers
380 views
Call an async method (within a child form), from a thread from the main form
I really want to understand and solve this problem I've been struggling with for a few days. I read hundreds of threads and I can't get it to work. I have a primary form, and on a secondary form a ...
0 votes
0 answers
86 views
Instance of the class and invoke the method does not perform the same
Hey all I am trying to add a function method to VideoControl.cs so that I can call it from my Form1.cs button click. The code I am using is from a Github here. Right now, in order to start a movie, I ...
-1 votes
1 answer
143 views
Who will be the method invoker of a Class with no object?
In object-oriented programming, an "invoker" refers to an object or code that initiates/invokes the execution of a method or function on another object. But my question is what if a class ...
30 votes
10 answers
97k views
Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)
I am trying to build a web application, I didn't add any classes or packages I have just ran the app but it says java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi....