Top "Methods" questions

A method is a block of code that performs a task and is associated with a class or an object.

What's wrong with using $_REQUEST[]?

I've seen a number of posts on here saying not to use the $_REQUEST variable. I usually don't, but sometimes …

php methods form-submit
Visual Studio says "Method must have a return type"

It says "Method must have a return type" whenever I try to debug it. I don't know how to fix …

c# methods spritebatch
Android ViewPager setCurrentItem not working after onResume

I've got this strange issue, ViewPager's setCurrentItem(position, false) works perfectly fine, then im switching to another activity, and after …

android methods android-viewpager onresume
Properties vs Methods

Quick question: When do you decide to use properties (in C#) and when do you decide to use methods? We …

c# properties methods
How to achieve method chaining in Java?

I want to achieve method chaining in Java. How can I achieve it? Also let me know when to use …

java methods chaining
In Python, when should I use a function instead of a method?

The Zen of Python states that there should only be one way to do things- yet frequently I run into …

python function coding-style methods
How to check if a web service is up and running without using ping?

How can i check if a method in a web service is working fine or not ? I cannot use ping. …

c# wcf web-services methods ping
Python: Bind an Unbound Method?

In Python, is there a way to bind an unbound method without calling it? I am writing a wxPython program, …

python class methods bind
Why can't I apply ToUpper() to an OwnerNode?

This works: Output "Cluster Group: ""$($Group.Name)"", Current Owner: $($Group.OwnerNode), Current State: $($Group.State)" This does not work: Output "…

string powershell methods invocation
How to override to_json in Rails?

Update: This issue was not properly explored. The real issue lies within render :json. The first code paste in the …

ruby-on-rails json methods overriding