Questions tagged [invocation]

187 questions
0
votes
2 answers

Questions regarding objects/calling functions

So I solved this problem for a class I am taking via project euler, now I need to do it using objects and I've been scouring google but was hoping for some advice on where I might be going wrong. Was trying to store the variables to call for later…
Nhare
  • 3
  • 1
0
votes
2 answers

JavaScript Function Invocation

I recently have started reading "JavaScript: good parts" and quoting one of the examples which I couldn't understand. I added a test function to the original example: var add = function(a,b) { return a+b; }; var myObject = { val: 0, …
Yar
  • 7,020
  • 11
  • 49
  • 69
0
votes
1 answer

Invoke Method with client.soda ( Statement Object Model )

I am trying to build Esper EPL statements in Java. I use the com.espertech.esper.client.soda lib for this, but I can't find a tutorial to help me. The PatternExpressions are the only part that I need as of now. As an example let's use the EPL: every…
Splitframe
  • 406
  • 3
  • 16
0
votes
1 answer

How to block the JSP being called by GET method

I have an existing JSP which is coded like this. <% if( (request.getParameter("userid")!=null) && (request.getParameter("token")!=null) ) { session.setParameter("USERID", request.getParameter(userid); session.setParameter("Token",…
0
votes
1 answer

Polymorphism in C++ std::list::iterator

Ignoring a lot of detail: Suppose i have an abstract Card class containing the function: virtual int getType()=0; derived by the also abstract GreenCard in which there is a virtual int getType()=0; as well. Then GreenCard is derived by…
Tsaou
  • 21
  • 1
  • 4
0
votes
2 answers

Invocation Stack History Overflow

Been playing around with LISP in class. This is admittedly the first LISP code I've written. I can't figure out why this code produces the error "invocation stack history overflow" for input values over 2000 to the function (longest_collatz n). Can…
Dagrooms
  • 1,507
  • 2
  • 16
  • 42
0
votes
3 answers

Python encountering unexpected ')` in very short program

Python is seeing some problem with how I am opening a file with the code below if __name__ == "__main__": fileName = sys.argv[1] with open(fileName, 'r') as f: for line in f: print line It is producing the error…
KDecker
  • 6,928
  • 8
  • 40
  • 81
0
votes
1 answer

JavaScript: invocation as a function/method

I am trying to sharpen my JavaScript skills and I am aware that there are four basic ways to invoke a function - which alter the way this is defined. The two I am interested in are the basic two: Invocation as a function Invocation as a…
keldar
  • 6,152
  • 10
  • 52
  • 82
0
votes
1 answer

locking resources or not on multithreaded server

I'm creating a client-server structure where the server has a thread for every client. That specific thread only sends and receives data. In the main thread of the server I'd want to read the input that the clientthread received. But it's possible…
Wouter Standaert
  • 299
  • 1
  • 4
  • 13
0
votes
3 answers

How do I call a method on an object when it is outside the scope of where the object was created

I have an ArrayList called "filmList" in a separate class called actors, I want to use case 2 in the switch to call newActor.filmList.get(i); but I keep getting object may not be initialized errors from the compiler. If I put the same line in switch…
Nodstuff
  • 3
  • 1
  • 3
0
votes
3 answers

Method invocation with condition beforehand java

I'm stuck on a problem that is: -how to set a precondition for all the methods in class so that any method is invoked, these preconditions are checked and if they are met, the invocation begins. If not, an exception is thrown. What I need that for?…
0
votes
1 answer

Invoking Browser via application Icon Like Youtube Application Without Showing My Application

i want to invoke browser with a specific url like youtube application. I've try using Navigator Invoke but, its show my application. i dont want to show my application just show browser when user click the application icon, can anybody help me…
lichienmine
  • 63
  • 1
  • 1
  • 6
0
votes
3 answers

Execute a piece of code in a function from the second invocation onwards

If I desire to run a piece of code in a function, only from the second invocation of the function onwards, Questions: Is there something wrong to do that? How can I possibly achieve this ? Is using a static variable to do this a good idea ?
nitin_cherian
  • 6,405
  • 21
  • 76
  • 127
0
votes
4 answers

When to invoke main rather than call main?

When calling "main" that exists in another class, it is quite easy to just say: otherClass.main(stringArgs); What is the reason behind first using reflection to get the class and then invoking the method, other than calling it in a static manner?
jmpyle771
  • 635
  • 5
  • 15
0
votes
1 answer

method cannot be applied to given types / cannot find symbol

I can't seem to get past this error. My code: import java.util.*; public class Collector { public static void Names () { java.util.Scanner input = new java.util.Scanner(System.in); // Prompt the user to enter the number of…