All Questions

4960
votes
73answers
1473098 views

Is Java "pass-by-reference" or "pass-by-value"?

I always thought Java was pass-by-reference; however I've seen a couple of blog posts (For example, this blog) that claim it's not. I don't think I understand the distinction they're making. What is...
1890
votes
22answers
852469 views

How do I pass a variable by reference?

The Python documentation seems unclear about whether parameters are passed by reference or value, and the following code produces the unchanged value 'Original' class PassByReference: def __init_...
1317
votes
15answers
338237 views

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):
129
votes
6answers
110317 views

Passing Parameters JavaFX FXML

How can I pass parameters to a secondary window in javafx? Is there a way to communicate with the corresponding controller? For example: The user chooses a customer from a TableView and a new window ...
418
votes
13answers
99742 views

What does map(&:name) mean in Ruby?

I found this code in a RailsCast: def tag_names @tag_names || tags.map(&:name).join(' ') end What does the (&:name) in map(&:name) mean?
86
votes
4answers
158630 views

How can I pass selected row to commandLink inside dataTable or ui:repeat?

I'm using Primefaces in a JSF 2 application. I have a <p:dataTable>, and instead of selecting rows, I want the user to be able to directly execute various actions on individual rows. For that, I...
377
votes
9answers
90349 views

Pass in an array of Deferreds to $.when()

Here's an contrived example of what's going on: http://jsfiddle.net/adamjford/YNGcm/20/ HTML: <a href="#">Click me!</a> <div></div> JavaScript: function getSomeDeferredStu...
20
votes
3answers
24983 views

Invoke direct methods or methods with arguments / variables / parameters in EL

How can I in JSF 2.0 invoke direct methods or methods with arguments / variables / parameters in EL? For example, getting the list size in EL: <h:outputText value="#{bean.list.size()}" /> Or...
415
votes
5answers
103110 views

What does the Star operator mean?

Possible Duplicate: What does *args and **kwargs mean? What does the * operator mean in Python, such as in code like zip(*x) or f(**k)? How is it handled internally in the interpreter? ...
8
votes
3answers
37684 views

Access Java / Servlet / JSP / JSTL / EL variables in JavaScript

I have a form in JSP. I have to populate it based on the request object (from the servlet). How do I use Java Script for accessing request object attributes or if you can suggest me any other better w...

Previous Next