Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

All Questions

Tagged with
0
votes
0answers
34 views

Call a method with parameters in tensorflow graph from session

I have a neural network model in tensorflow. I implemented gradients computation in such wayclass Graph(object):...def compute_gradients(self):with tf.variable_scope('optimizer') ...
0
votes
0answers
36 views

How to send SQLitecommand with parameters as a parameter to Method?

I want to write a method which gets a SQLiteCommand as a parameter. The method executes the command on the database, the problem is most of the command have parameters and probably the parameters will ...
1
vote
0answers
53 views

invoke method with list of parameter c#

I have a class:namespace TestLib1public class TestLib1{public IEnumerable<TestedParameter> Measure1(IEnumerable<TestedParameter> _inParameters){ // this is just to do ...
1
vote
1answer
8 views

How do I pass a return value from one method to another?

I need to pass a return value from windCorrectionAngle method to groundSpeed method and place it at the very end of the expression ("windCorAng"). This is the only part that doesn't work for me. From ...
1
vote
1answer
17 views

Use global variable in jQuery function and then set it

I want to make a function that updates a variable defined in the function parameters - the example below should set 'cargo' to '10'.var cargo=0;function itemChange(action,item,x){...
-1
votes
3answers
26 views

Passing returned variables to other static methods for calculations

Good evening all, I have to create a program that utilizes two classes. One that will contain the main method for output and the other class will be for static methods to call to the main method. I'...
2
votes
2answers
60 views

Stop method parameter names from being highlighted in Android Studio [duplicate]

I have a really annoying problem with the methods in my projects. Here you can see what i mean... it's really hard to see and I would prefer that the name would not show at all or at least be more ...
0
votes
1answer
22 views

Set type to variable from method with parameter of variable type

Basically, I have a class Text with a set of properties.I want to fill these in with properties from other classes.I could use Method Overloading, but since I am basically doing the exact same ...
0
votes
0answers
16 views

Changing value of passed values java [duplicate]

Im experimenting with some stuff, and i was just wondering if thwre is any way to modify the source of the parameter values passed to a method? Like if i have this method for swapping two values:...
0
votes
1answer
29 views

Java - Get the array position from a method's parameter

void someMethod(int x){--do some calculations here--}...int[] i=new int[8];someMethod(i[3]);Let's say in my someMethod I want to do calculations with the input parameter's value, ...
4
votes
2answers
44 views

How to make a hashmap of dynamic methods in Java

This is a bit of a specific question, but I want to know how to make a HashMap of functions that are obtained in parameters, like so://All functions will take in string and return voidpublic ...
-1
votes
1answer
30 views

Why are object references different after assignment in a static method? [duplicate]

Why a1==a2 is true after assignment a1=a2 in the main method, but a1==a2 returns false if we do the same in another static method m?class A {};public class Program{static void m(A a1, A a2){...
1
vote
2answers
34 views

Test that method is called with proper parameters all across the software

I've just ran into a problem recently when a method in my service was called with wrong parameters. This caused some kind of outage, so I'm thinking about how to prevent that in the future.So ...
0
votes
1answer
31 views

Display another method value to another method

There are three class Main class, Calc class and Result class;I want to get calcSum() return value to Result class, result() method; but it shows 0.what is the problem? Calc Classpublic class ...
0
votes
0answers
17 views

Javascript - Is it possible to pass an input parameter to use as a method caller on an object [duplicate]

function callContract(ABI, Address, functionName) {var Contract=eth.contract(ABI).at(Address);var getData=Contract.(addToTotal)functionName.getData(5); //rewordeth....
-1
votes
2answers
38 views

Scala setting Type on parameter in a method invocation

I have a typo (because I didn't mean it to be there) in my scala code, and can't quite work out if its benign.On line 84 - does scala just allow that :Long to let me remind myself what type the ...
0
votes
2answers
43 views

Javascript string argument is undefined, cannot access .length property

So I'm working on freecodecamp challenge where i need to decode ceasar ciphers. I've made a secondary function that is called from the main function to decode each word in the string. I'm having ...
0
votes
1answer
49 views

How to call Scala method with Map Mutable signature?

I have a Scala code:import collection.mutable._def myMethod(mycollection: Map[A, B])={...}How do I call this method?Tried this:myMethod(["test1", "test2"])Got error:Identifier ...
0
votes
0answers
29 views

How to get parameter name,type and value from collection of methods

With this I get collection of methods from some random class that I previously loaded with URLClassLoader:public static Collection<Method> getMethods(Class<?> clazz, String packageName) {...
3
votes
2answers
58 views

Why can't Lists be included in `Integer…` parameter

Here's what I am trying to do: public void add(Integer... newIntegers) {for (Integer i : newIntegers) {integers.add(i);}}I am not sure why, but I can't put an ArrayList<...
0
votes
2answers
36 views

Family Tree, method confusion

I am currently working on a project that involves creating a program that can input and display a person's family tree. However, after creating a class called Person with a constructor to set up the ...
1
vote
2answers
37 views

Passed parameter into void method (integer or object)

I'm trying to find out what is the output of the following code and I almost got all of them right except 2 lines. Line 3 and 7.The expected output would be:1 : 10 2 : 20 3 : 20 4 : 15 5 : 40 ...
0
votes
2answers
76 views

Usage of const and references in parameters in c++ [duplicate]

There are multiple ways of making a method. I'm not quite sure when to use const and reference in method parameters.Imagine a method called 'getSum' that returns the sum of two integers. The ...
-1
votes
1answer
26 views

How do I pass an overloaded method with a parameter?

I'm writing a program where the user enter specs of a PC, and then I print out those specs. I have two classes, the main class (PCSpecsDriver), and the class that gets the input (PCSpecsClass). In ...
2
votes
2answers
53 views

How to call a C++ class method, which is given as a parameter?

I'm trying to pass a method as a parameter to other method.Magner.h:Class Manager{public:timeCount(void (Manger::*function)(void));void passedFuction();}In Manager.cpp, I'm trying to call ...
-2
votes
2answers
47 views

Pass POJO in paramater

Assuming this is my pojo:public class POJOFoo{}public class POJOFoo2{}Assuming this is my method and i want to either use the same method to display POJOFoo and POJOFoo2.public void Foo(Object ...
4
votes
0answers
78 views

How to convert method passed arguments into one object in Java

There is Jax-Ws web service method which gets 20 argument. arguments should be validated, so I have to pass all of them to another validator method separately or create class object by passing ...
0
votes
1answer
31 views

How to pass Object as parameter [duplicate]

I'm new to C++ so I will probably have a lot of mistakes. I'm coming from C# and am not quite familiar with methods in C++. So I have an Elevator class, a Forklift class and a Crate class. I need to ...
0
votes
3answers
166 views

java interface method input itself

I have an interface that has a method that takes in itself, such aspublic interface Vehicle {void bump(Vehicle other);}Now, I want to implement this interface in such a way that a Vehicle will ...
0
votes
4answers
63 views

Creating Non-Object Specific Methods

Is it possible to make a method that uses an object as a parameter, but doesn't specify exactly what type of object will be passed? The method would try to use the compareTo method that most objects ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,