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.

4006 questions
13
votes
3 answers

How to use ButterKnife inside adapter

I would like to use ButterKnife to bind my views inside listView adpater. I tried this, but i can not simply use my "spinner" var. public class WarmSpinnerAdapter extends ArrayAdapter { Context context; public…
Stepan
  • 1,041
  • 5
  • 23
  • 35
13
votes
3 answers

How do I "rebind" the click event after unbind('click')?

I have an anchor tag made into a "button". Sometimes, this tag needs to be hidden if there is nothing new to show. All works fine if I simply hide the button with .hide() and re-display it with .show(). But I wanted to…
Ben
  • 2,917
  • 10
  • 28
  • 47
13
votes
1 answer

How do you bind a grid's children to a list?

In my ViewModel I have a list of items that I would like a grid in my view to bind to (the items will be the grids children). The list is a list of view models for the items. How do you bind a grid to the list (I can access .children in code but not…
Dan dot net
  • 6,119
  • 5
  • 28
  • 25
13
votes
2 answers

How to bind, unbind and rebind (click) events in JQuery

After asking the same question 2 weeks ago here, I finally found "the" solution. This is why I am answering my own question. ;) HOW TO BIND, UNBIND AND REBIND EVENTS IN JQUERY?
John Doe Smith
  • 1,623
  • 4
  • 24
  • 39
13
votes
3 answers

Android - bindService more than once

Is it ok to use bindService more than once with the same context to the same service ? Can I use bindService multiple times with the same context to the same service and unBindService only once ? Thanks
refaelos
  • 7,927
  • 7
  • 36
  • 55
13
votes
3 answers

Confusion about Function.prototype.bind()

I'm a huge fan of ES5's Function.prototype.bind and currying arguments (basically creating default arguments for functions). I was fooling around with that a bit, but I can't for the life of me figure out my own construct anymore. This is my…
jAndy
  • 231,737
  • 57
  • 305
  • 359
13
votes
2 answers

std::function -> function pointer

Here is a code: #include using namespace std::tr1; typedef void(*fp)(void); void foo(void) { } void f(fp) { } int main() { function fun = foo; f(fun); // error f(foo); // ok } Originally i need to make a…
fogbit
  • 1,961
  • 6
  • 27
  • 41
13
votes
1 answer

Compiling code that uses socket function bind() with libcxx fails

I am using the new libcxx library and I have a code that calls the socket function bind(). The problem is that when I type using namespace std; the compiler gives me an error for the following code: int res = bind(sockfd, (struct sockaddr *)&myAddr,…
Roman Kutlak
  • 2,684
  • 1
  • 19
  • 24
12
votes
1 answer

Does std::bind work with move-only types in general, and std::unique_ptr in particular?

I'm trying to use boost::asio and run into a bit of a quagmire. I'm trying to compile the following code: std::unique_ptr buffer = buffers.pop(); std::function t =…
Max
  • 4,345
  • 8
  • 38
  • 64
12
votes
2 answers

Error starting userland proxy: listen tcp 0.0.0.0:2049: bind: address already in use

On Ubuntu 18.04, I'm trying to install Hyperledger Cello, and during the install, I get: make[2]: Entering directory '/home/julien/cello' docker-compose -f bootup/docker-compose-files/docker-compose-nfs.yml up -d --no-recreate WARNING: Found orphan…
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
12
votes
2 answers

Binding const member in code behind from xaml in WPF

Is there any good way to bind a property to a const value in codebehind? When I use ComboBox, I usually do this way in xaml and code behind: XAML:
Aki24x
  • 1,058
  • 1
  • 13
  • 28
12
votes
1 answer

Access to composer autoloaded files in laravel 5

Trying to use a non-Laravel package: https://packagist.org/packages/luceos/on-app Edited composer.json to require it and did the composer install, update, then dump-autoload -o. This package requires an initialization:…
arikin
  • 188
  • 11
12
votes
2 answers

Javascript's Bind implementation?

Since bind is not a cross browser (old ones) function , there is a polyfill for it : ( from John Resig's book) /*1*/ Function.prototype.bind = function () /*2*/ { /*3*/ var fn = this, /*4*/ args =…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
11
votes
3 answers

C++0x lambda wrappers vs. bind for passing member functions

This is basically a question about the readability, style, performance of 2 different approaches to creating/passing a functor that points to a member method from within a class constructor/method. Approach 1: using namespace…
Vusak
  • 1,420
  • 9
  • 12
11
votes
5 answers

In JQuery when should you use .bind() over .click() - or any other given event?

I understand the difference between Live and Bind but when should I use use .bind() over a 'standard' event method as shown below. Are there any key differences in the way these two calls work? $('.clickme').bind('click', function() { // Handler…
Andrew
  • 9,967
  • 10
  • 64
  • 103