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
15
votes
1 answer

Bind to a property of a parent element in wpf

'I want to bind the Height property of the RichTextBox to the Height Property of the GridView`s Row. How can I do that? I do not know how to get the Row's Height as I can not access the Row in xaml what I would like to do. The Ancestor type should…
msfanboy
  • 5,273
  • 13
  • 69
  • 120
15
votes
1 answer

JavaFX: Bind StringProperty with constant string prefix

I have a question to the bind functionality in JavaFX. What I want is to bind 2 string properties. But their values should not be equal. Let's make me an example: I have a StringProperty with represents the last opened project in my application. The…
a3po2.0
  • 251
  • 1
  • 3
  • 8
15
votes
2 answers

NS: got insecure response; parent indicates it should be secure

I'm trying to run Bind on Centos 6.3 on my school network and I'm having trouble getting external queries to work. I can dig/query my own zones running on my server, but once I dig for an external domain name I see the following in my log files: NS:…
Jorre
  • 17,273
  • 32
  • 100
  • 145
14
votes
2 answers

Is std::bind still useful compared to lambdas?

Possible Duplicate: Bind Vs Lambda? My use of std::bind had dropped to 0 now that lambdas have gained wide support. Are there any problems that std::bind is uniquely suited for over a lambda function? Was there a compelling reason to keep…
deft_code
  • 57,255
  • 29
  • 141
  • 224
14
votes
1 answer

Setting up a custom nameserver with BIND9

Lets say that I purchased a new domain (somedomain.com) from a domain registar and I wanted to setup my own nameserver on a server that has two IP addresses. First I buy the domain. I get the server. install BIND9. I login to the server and prepare…
matsko
  • 21,895
  • 21
  • 102
  • 144
14
votes
4 answers

What's the point of using boost::mem_fn if we have boost::bind?

I'm having a look at the Boost libraries that were included in C++'s Technical Report 1 and trying to understand what each does. I've just finished running an example for boost::mem_fn and now I'm wondering what's the point of using it instead of…
José Tomás Tocino
  • 9,873
  • 5
  • 44
  • 78
14
votes
1 answer

Why std::bind can be assigned to argument-mismatched std::function?

I have code as follows: #include #include using namespace std; void F(int x) { cout << x << endl; } int main() { std::function f1 = std::bind(F, std::placeholders::_1); f1(100); // This works, will print…
lambda
  • 585
  • 6
  • 10
14
votes
2 answers

Nested bind expressions

This is a followup question to my previous question. #include int foo(void) {return 2;} class bar { public: int operator() (void) {return 3;}; int something(int a) {return a;}; }; template auto func(C&& c) ->…
user328543
  • 577
  • 3
  • 9
14
votes
2 answers

How to test implementations of Guice AbstractModule?

How to test implementations of Guice AbstractModule in a big project without creating fake implementations? Is it possible to test bind() and inject() methods?
Nikolas
  • 2,322
  • 9
  • 33
  • 55
14
votes
2 answers

jQuery trigger not firing with bind() or on() for custom events

Can anyone tell me why this code would not be working? $('body').on('test', function() { alert('test'); }); $('body').trigger('test'); I'm using jquery-1.7.2.min. I do not get any errors, just nothing happens. I've tried putting the code inside…
iamface
  • 673
  • 1
  • 9
  • 27
13
votes
3 answers

Cleanly binding/unbinding to a Service in an Application

I have an Android application that is binding to a persistent service (once started with startService()). The service is an integral part of the application and thus is used in almost every Activity. Hence I want to bind to the service just once…
Sven Jacobs
  • 6,278
  • 5
  • 33
  • 39
13
votes
2 answers

Opposite of std::bind, add dummy parameters to function

I need something that is the opposite of std::bind, that adds dummy parameters to a function signature instead of how boost::bind binds parameters away. e.g. I have this function: std::function myFunc; But I want to convert it into a…
user406009
13
votes
3 answers

ElasticsearchException failed to bind service error

I really wana start elasticsearch for connect opencart. I have set network.host: 0.0.0.0 (also try to my local IP), http.port: 9200, and give executive authority to my new account. I use centOs6, Java 1.8, and don't use root account. I want to use…
jun
  • 143
  • 1
  • 1
  • 9
13
votes
4 answers

How to bind scroll event on element in AngularJS directive

How can I bind scroll event on element in AngularJS directive ? I bind scroll on $window, but now i need to change it to this class ".body-wrapper" (angular.element(document.queryselector(.body-wrapper)) doesn't work) . Any ideas ?…
user6644024
13
votes
5 answers

How to bind a constructor in C++?

Needless to over explain. The following code is self-evident: struct X { X(int n){} }; int main() { std::vector src; std::vector dest; // Below is not valid in current C++, but that is just what I want. …
xmllmx
  • 39,765
  • 26
  • 162
  • 323