argument (2,720)


java - IllegalArgumentException or NullPointerException for a null parameter?

java - IllegalArgumentException or NullPointerException for a null parameter?

Closed.This question is opinion-based.It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by…


How do you pass a function as a parameter in C?

I want to create a function that performs a function passed by parameter on a set of data. How do you pass a function as a parameter in C?…


linux - Bash Pipe Handling

Does anyone know how bash handles sending data through pipes? cat file.txt | tail-20 Does this command print all the contents of file.txt into a buffer, which is then read by tail? Or does this comm…



c# - Enforcing required function call

I have a "Status" class in C#, used like this: Status MyFunction(){if(...)// something bad return new Status(false, "Something went wrong") else return new Status(true, "OK");}Yo…


Why can't I explicitly pass the type argument to a generic Java method?

I have defined a Java function: static<T> List<T> createEmptyList(){return new ArrayList<T>();}One way to call it is like so: List<Integer> myList=createEmptyList();// Compiles Why can't…


How do you create optional arguments in php?

In the PHP manual, to show the syntax for functions with optional parameters, they use brackets around each set of dependent optional parameter. For example, for the date() function, the manual reads:…


set_error_handler Isn't Working How I Want It To Work

I'm taking the leap: my php scripts will ALL fail gracefully! At least, that's what I'm hoping for... I don't want to wrap(practically) every single line in try...catch statements, so I think my bes…


python - What does**(double star/asterisk) and*(star/asterisk) do for parameters?

In the following method definitions, what does the*and** do for param2? def foo(param1,*param2): def bar(param1,**param2):…


Is there a good method in C# for throwing an exception on a given thread

The code that I want to write is like this: void MethodOnThreadA(){for(;;){// Do stuff if(ErrorConditionMet) ThrowOnThread(threadB, new MyException(...));…


functional programming - Can I Do This In Lisp?

I have been searching everywhere for the following functionality in Lisp, and have gotten nowhere: find the index of something in a list. example:(index-of item InThisList) replace something at a s…




function arguments with parameter pass python type not parameters example