Questions tagged [bind]

This tag means different things in different contexts: consider using less ambiguous tags instead. Common meanings include: the bind function in socket programming; binding to naming contexts; the bind method in jQuery; BIND the DNS server (named), . For boost::bind in C++, use [boost-bind]. Do not use this tag just to say that you're binding something to something else.

  • In and , bind() is a system call that associates an IP address and port number with a socket.
  • In , Function.prototype.bind() is a method to attach a function to a fixed this value.
  • In , bind is a method to attach a handler to an event. This method was deprecated in jquery v3.0
  • In , 'bind' is a connect/authenticate step.
  • in , 'bind' is the process of associating an object with a name in a context.
  • in , 'bind' is the process of associating a remote object with a name in an RMI Registry.
  • In , 'bind' is the process of associating an exported object with a name in a COSNaming context.
  • In bind or binding refers to specifying the target of an inject request.
  • In , questions about the library's boost::bind function should use the tag instead and questions about the function std::bind should use the tag .
  • BIND, the Berkeley Internet Name Domain is the most commonly used DNS server software on the Internet. Questions about BIND are often off-topic for StackOverflow and may belong on SuperUser.com or unix.stackexchange.com.
  • In , "bind" often refers to the >>= operator. Questions about it should use the tag .

Do not use this tag just to indicate that you're binding something to something else — use tags that are related to the topic of your question.

3779 questions
721
votes
22 answers

What is the use of the JavaScript 'bind' method?

What is the use of bind() in JavaScript?
Sandeep Kumar
  • 12,284
  • 19
  • 66
  • 100
720
votes
24 answers

jQuery Event Keypress: Which key was pressed?

With jQuery, how do I find out which key was pressed when I bind to the keypress event? $('#searchbox input').bind('keypress', function(e) {}); I want to trigger a submit when ENTER is pressed. [Update] Even though I found the (or better: one)…
BlaM
  • 26,721
  • 31
  • 89
  • 104
185
votes
9 answers

Removing event listener which was added with bind

In JavaScript, what is the best way to remove a function added as an event listener using bind()? Example (function(){ // constructor MyClass = function() { this.myButton = document.getElementById("myButtonID"); …
takfuruya
  • 2,133
  • 2
  • 12
  • 10
162
votes
12 answers

Update Angular model after setting input value with jQuery

I have this simple scenario: Input element which value is changed by jQuery's val() method. I am trying to update the angular model with the value that jQuery set. I tried to write a simple directive, but it's not doing what I want. Here's the…
Michal J.
  • 1,735
  • 3
  • 13
  • 11
139
votes
9 answers

jQuery how to bind onclick event to dynamically added HTML element

I want to bind an onclick event to an element I insert dynamically with jQuery But It never runs the binded function. I'd be happy if you can point out why this example is not working and how I can get it to run properly:
Jesper Rønn-Jensen
  • 91,561
  • 40
  • 112
  • 147
133
votes
22 answers

Docker Error bind: address already in use

When I run docker-compose up in my Docker project it failes with the following message: Error starting userland proxy: listen tcp 0.0.0.0:3000: bind: address already in use netstat -pna | grep 3000 shows this: tcp 0 0 0.0.0.0:3000 …
Ngoral
  • 2,332
  • 2
  • 13
  • 31
129
votes
5 answers

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, and for a certain class I decided it'd be nice to group the data of all of my buttons together as a class-level list of tuples, like so: class…
Dan Passaro
  • 3,741
  • 2
  • 22
  • 31
81
votes
1 answer

javax.xml.bind.JAXBException Implementation of JAXB-API has not been found on module path or classpath

I'm trying to run my Spring Boot application on Java 9, and I've faced with JAXB problem, which described in the guides, but didn't work for me. I've added dependency on JAXB api, and application started working. If you get the following exception,…
S34N
  • 5,119
  • 4
  • 29
  • 38
75
votes
4 answers

What does it mean to bind a multicast (UDP) socket?

I am using multicast UDP between hosts that have multiple network interfaces. I am using boost::asio, and am confused by the 2 operations receivers have to make: bind, then join-group. Why do you need to specify the local address of an interface,…
haelix
  • 3,405
  • 3
  • 26
  • 44
68
votes
5 answers

Why use std::bind over lambdas in C++14?

Before C++11 I used boost::bind or boost::lambda a lot. The bind part made it into the standard library (std::bind) the other part became part of the core language (C++ lambdas) and made the use of lambdas a lot easier. Nowadays, I hardly use…
Ralph Tandetzky
  • 20,730
  • 9
  • 61
  • 117
67
votes
4 answers

Why is the bind operator (>>=) defined as it is?

I have been studying Haskell for several weeks now (just for fun) and just watched Brian Beckman's great video introducing monads. He motivates monads with the need to create a more general composition operator. Following this line of thought, if…
broken.eggshell
  • 874
  • 5
  • 9
65
votes
10 answers

What is the difference between the bind and live methods in jQuery?

I'm curious to know the differences between the bind and live functions. To me they seem to be almost identical. I read the benefits of live/bind methods, but it didn't tell me about the differences... Thanks!
Kevin Brown
  • 12,094
  • 32
  • 90
  • 149
59
votes
7 answers

Bind Vs Lambda?

I have a question about which style is preferred: std::bind Vs lambda in C++0x. I know that they serve -somehow- different purposes but lets take an example of intersecting functionality. Using lambda: uniform_int<> distribution(1, 6); mt19937…
AraK
  • 87,541
  • 35
  • 171
  • 230
59
votes
2 answers

Understanding ASP.NET Eval() and Bind()

Can anyone show me some absolutely minimal ASP.NET code to understand Eval() and Bind()? It is best if you provide me with two separate code-snippets or may be web-links.
user366312
  • 17,582
  • 55
  • 198
  • 392
55
votes
4 answers

Why is bind() used in TCP? Why is it used only on server side and not in client side?

I wanted to know the exact function of bind() in TCP. What does it mean by 'binding' a local address to the socket? If it's assigning a port number to the socket, then why don't we use it in the client? I know that port is assigned by OS…
Crocode
  • 2,796
  • 6
  • 24
  • 29
1
2 3
99 100