Questions tagged [invocation]

187 questions
6
votes
2 answers

python encoding error only when called as external process

A simple file like $ cat x.py x = u'Gen\xe8ve' print x when run will give me: $ python x.py Genève however, when run as a "command substitution" will give: $ echo $(python x.py) ... UnicodeEncodeError: 'ascii' codec... I've tried with different…
Matteo Gamboz
  • 373
  • 3
  • 11
5
votes
1 answer

Why this kind of function invocation is wrong in JavaScript?

I'd like to create an anonymous function and then invoke it immediately. 1) This will bring a syntax error. Why? function () { alert("hello"); }(); 2) wrap the function definition with () and it works. (function () { …
Morgan Cheng
  • 73,950
  • 66
  • 171
  • 230
5
votes
3 answers

JNI object references obtained through the Invocation API: local or global?

I'm using the JNI invocation API, which starts a JVM within a C program; in this situation, you get a JNIEnv pointer which remains valid until you explicitly destroy the JVM. Does the local/global distinction still apply here? What's the meaning of…
Flavio
  • 11,925
  • 3
  • 32
  • 36
5
votes
5 answers

Overloaded methods priority

I have a base-class called Element. Some other classes (like Label and Image) both extend this class. I now have a dispatching class having the following methods: public class Dispatcher { public static AbstractPropertyEditor
Atmocreations
  • 9,923
  • 15
  • 67
  • 102
5
votes
1 answer

Assuring multicast delegate execution list order in C#?

After doing some reading I understand that handlers invocation order is the same order as subscribed but it is not guaranteed . So lets say I have : public event MYDEl ev; and subscribers do : ev+=GetPaper; ev+=Print; ev+=EjectPaper; What is…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
4
votes
4 answers

Declaring variables in the arguments to a function in C

I have a sort of bizarre wish; I don't know if any compiler or language extension out there allows this. I want to be able to declare variables inside a function invocation, like this: int test(int *out_p) { *out_p = 5; return 1; } int…
zmccord
  • 2,398
  • 1
  • 18
  • 14
4
votes
2 answers

In javascript what does ( ... ) do exactly

Possible Duplicate: What do parentheses surrounding a JavaScript object/function/class declaration mean? Recently discussing with a colleague which is best (function(){...}()) or (function(){...})() I got to wondering what ( ... ) actually does…
wheresrhys
  • 22,558
  • 19
  • 94
  • 162
4
votes
1 answer

How do I invoke this function with JavaScript?

I am just working with basic level of javascripts. Today I found the below and for scrolling down DIV layer when new data adds to DIV. I couldn't understand how to Call the function. Is it to be used using window.onload function? or any other. And…
Mad coder.
  • 2,175
  • 8
  • 38
  • 53
4
votes
4 answers

What environment variables affect the 'java' binary?

Most unix commands whose operation changes based on values of environment variables have a section "ENVIRONMENT VARIABLES" in their man page. No such luck for the java binary (Sun/Oracle Java 6), though I'm fairly certain that things like CLASSPATH…
Brian Gruber
  • 626
  • 7
  • 11
4
votes
1 answer

iOS: What is the processing overhead in invoking an Objective-C method?

I am writing some real-time audio processing code, which is to be executed in an audio unit's render callback. This thread is at the highest priority level the system recognises. Apple instructs to minimise the amount of processing that goes on in…
P i
  • 29,020
  • 36
  • 159
  • 267
4
votes
2 answers

Python warn if method has not been called

Suppose you want to call a method foo on object bar, but somehow while typing the method invocation you intuitively treated foo as a property and you typed bar.foo instead of bar.foo() (with parenthesis). Now, both are syntactically correct, so no…
4
votes
0 answers

Linker error - (use -v to see invocation)

Often times upon compiling my 'c code' with Xcode, I get a "linker command failed with exit code 1 (use -v to see invocation)" error. I am interested in the "use -v to see invocation" statement. Where in Xcode can I "use -v" to see the invocation?…
Darrell
  • 139
  • 7
4
votes
6 answers

The best way to invoke methods in Python class declarations?

Say I am declaring a class C and a few of the declarations are very similar. I'd like to use a function f to reduce code repetition for these declarations. It's possible to just declare and use f as usual: >>> class C(object): ... def…
adrian
  • 1,447
  • 15
  • 24
4
votes
1 answer

EJB Invocation failed on component by java.security.AccessControlException

I have a method in EJB Bean @Override public void checkReqPermission(List req, MyContext context) throws AccessControlException, Exception { if(notAllowed) throw new AccessControlException("Unauthorized Access : User is …
saravanakumar
  • 1,747
  • 4
  • 20
  • 38
4
votes
2 answers

How do I invoke a method with array parameter in java?

I have an assignment in which I have to perform operations on array in Java, I have to make separate functions of each operation, which I will write but I can not figure out how to invoke a method with array parametres. I usually program in c++ but…
user3054791
  • 75
  • 1
  • 1
  • 7
1
2
3
12 13