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

Questions tagged [methods]

A method is a block of code that performs a task and is associated with a class or an object. It is related to the non-object-oriented concepts of functions and procedures.

0
votes
2answers
31 views

Why is node.appendChild() not working?

I have this bit of code that's later going to be used to spit out the dates in a calendar. I'm trying to do this dynamically so I can load in the dates from the current month. I'm using reactjs and I ...
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') ...
-1
votes
2answers
21 views

Java Script Objects calling in Index.HTML file

So, Im creating a HTML file which has buttons with labels like: First Name, Last name, etcI need to program the button so that when user clicks it the Fist name button should go away and in the &...
0
votes
5answers
88 views

Using methods on arrays

I am very new to C#, and trying to make a program that counts an array, and I'm having trouble using methods/properties on the array (Reset, PrintCounters, Increment). the problems occur from the for ...
0
votes
0answers
12 views

call a method from another component only works to one tab in createMaterialTopTabNavigator- React native

Method getData() common to tab A,B & C but on another page getData called but only data fetched or render works only for first landing tab not all tab.On page Data.js code as followclass ...
-2
votes
1answer
48 views

How to avoid a golang function having different behaviors between calling the embedding and embedded types?

Let's say in a 3rd party library we have an interface and a struct implementing this interface. Let's also assume there is a function that takes ParentInterface as argument, which have different ...
1
vote
0answers
19 views

.getSelectedItem() is not working in combo box

Combo comboLevels=new Combo(shellAfterCasual, SWT.NONE);comboLevels.setBounds(52, 31, 91, 23);String[] items=new String[] { "Swedish 1", "Swedish 2", "Swdish 3" };comboLevels....
0
votes
1answer
31 views

Why can’t I call jQuery methods stored within an array?

The buttons are supposed to execute show, hide, toggle, etc. functions on the image, but they do not work as intended. I have been told that I am destroying the reference to this inside the show, hide,...
0
votes
2answers
21 views

Should 'registerCustomer()' be in a Customer class or main/driver class

Say I wanted to implement the following methods:void registerCustomer();void displayCustomer();void editCustomer();void deleteCustomer();And say I have the following classes:public class Main ...
0
votes
1answer
32 views

Check for Palidrome using Recursion and Char Array search

I'm currently trying to use a function that compares the left and right side character to return a true or false Boolean value as to whether the string entered by the user is a palindrome or not, but ...
0
votes
1answer
22 views

Invoking a Method dynamically | Javascript

I've created a function called multiMap, which takes two arrays as parameters and maps them to key value pairs in an object. In some circumstances, the second array of values might be functions, which ...
2
votes
3answers
63 views

Scala private apply method?

I'm currently making a class that can store English words. I want to make it as safe as possible(if an input is invalid - return error message) and here is where I'm lost. I have this code that stores ...
0
votes
2answers
30 views

Unable to save images in the right directory

I am trying to save images in a directory. Images are correctly saved in the right place, but when I inspect these with the path in the finder, all the images are damaged and unsable. damaged images...
0
votes
1answer
37 views

Refactor with a ternary operator

Here is my code which actually working as I expect : static func imageName(for page: Int, isThumbnail: Bool) -> String {return isThumbnail ? "\(page)_thumb.jpg" : "\(page).jpg"}static ...

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