Questions tagged [invocation]

187 questions
2
votes
3 answers

iPhone: Using dispatch_after to mimick NSTimer

Don't know a whole lot about blocks. How would you go about mimicking a repeating NSTimer with dispatch_after()? My problem is that I want to "pause" a timer when the app moves to the background, but subclassing NSTimer does not seem to work. I…
2
votes
3 answers

Invoking a Linux process from Windows and receiving stdout

I have a legacy application in our company built on... ahem; Classic VB (VB 6). It has got a optimizer(CPLEX MIP Solver) component running on a Linux server and is developed in Java. If we want to provide a Windows UI to invoke the optimizer…
Tuxist
  • 179
  • 1
  • 3
  • 12
2
votes
1 answer

How come my code works in the codeacademy javascript console, but not the one in chrome?

function forEach(array, action) { for(i = 0; i <= array.length; i++) { action(array[i]); } }; console.log(forEach([1, 2, 3], console.log)); How come this code executes the way I want it to in the codeacademy javascript console, but…
joyfulchute
  • 89
  • 1
  • 7
2
votes
2 answers

Safe to pass objects to C functions when working in JNI Invocation API?

I am coding up something using the JNI Invocation API. A C program starts up a JVM and makes calls into it. The JNIenv pointer is global to the C file. I have numerous C functions which need to perform the same operation on a given class of…
bubbadoughball
  • 193
  • 2
  • 11
2
votes
1 answer

Changing name destroys project ability to run! Xcode

I recently changed my project name and then I when I run I get a Apple Mach-O Linker error here it is. ld: file not found:…
Xcoder
  • 199
  • 14
2
votes
3 answers

JavaScript - invocation looks funny

I'm new to JavaScript and so I've been reading a book called Speaking JavaScript. The code below shows how to create a new environment for each function so that the values in each function are isolated. I get the gist of function f() but the last…
bvh
  • 443
  • 4
  • 10
2
votes
0 answers

TestNG's getCurrentInvocationCount() is too high?

I have a test listener class using extends AbstractWebDriverEventListener implements ITestListener, IInvokedMethodListener in beforeInvocation a call to ITestNGMethod.getCurrentInvocationCount() returns 0 in afterInvocation a call to…
MushyPeas
  • 2,469
  • 2
  • 31
  • 48
2
votes
1 answer

Mapping an interface method invocation to a remote instance method invocation via reflection

The system consists of a set of peer to peer connections. Each peer provides a set of 'actions' that it can perform. Each action is represented by a method on an interface, say public interface IMyCoolActions { int Add(int first, int…
Petrik
  • 1,961
  • 13
  • 23
2
votes
11 answers

how does the following code work

Currently I'm trying to invoke it like this: class Test { public static void test() { System.out.println("hi"); } public static void main(String[] args) { Test t = null; t.test(); } } The output of the code…
Sai Praveen
  • 79
  • 1
  • 3
2
votes
4 answers

Multiple function invocations in javascript ie combine(foo)(bar)

I have seen in the past that you can do something like this: function combine(arg1){ return function(arg2){ return (arg1 + arg2); }; } combine("foo")("bar"); And the result will be "foobar". You can of course do something like:…
Rchristiani
  • 424
  • 3
  • 18
2
votes
1 answer

Mockito.verify selective methods call

In my application, I have code that looks like - request.setParameter("a",false);//line1 request.setParameter("b",someObject);//line2 request.setParameter("c",someObject);//line3 request.setParameter("d",someObject);//line4 I have mocked the…
user1339772
  • 783
  • 5
  • 19
1
vote
2 answers

Is there a way to invoke a Python function with the wrong number of arguments without invoking a TypeError?

When you invoke a function with the wrong number of arguments, or with a keyword argument that isn't in its definition, you get a TypeError. I'd like a piece of code to take a callback and invoke it with variable arguments, based on what the…
Andrey Fedorov
  • 9,148
  • 20
  • 67
  • 99
1
vote
1 answer

How to pass Null\Void instead of an array?

Having some invokeMethod that takes in (java.lang.String method_name, Object[] params, Class[] params_classes) How would you invoke some method with signature like void MyMethod()?
myWallJSON
  • 9,110
  • 22
  • 78
  • 149
1
vote
0 answers

with NSInvocation causing SIGABRT

I've followed a few tutorials and I cant seem to adapt them to my needs. Simply I have a manager objects that returns a NSInvocation to be stored and invoked at a later point in the app. and when I run the application, my method signature is null…
cream-corn
  • 1,820
  • 14
  • 26
1
vote
1 answer

How to set invocation count during execution for test method that uses data provider in TestNg &java/ Kotlin?

I did refer this link and understood about IAnnotationTransformer. I have a scenario where I have parameterized data with data provider. Need to run test with certain data for N number of times using invocation Count which. How do I leverage the…