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
53
votes
13 answers

Cannot assign requested address using ServerSocket.socketBind

When I'm trying to set up a socket server, I've got an error message: Exception in thread "main" java.net.BindException: Cannot assign requested address: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at…
Adrian Adamczyk
  • 2,560
  • 4
  • 23
  • 41
51
votes
4 answers

.live() vs .bind()

I want to know the main difference between .live() vs. .bind() methods in jQuery.
Pranay Rana
  • 164,177
  • 33
  • 228
  • 256
48
votes
6 answers

jQuery bind/unbind 'scroll' event on $(window)

I have this function: function block_scroll(key){ if (key) { $(window).bind("scroll", function(){ $('html, body').animate({scrollTop:0}, 'fast'); }); } else { $(window).unbind(); } } The first part…
o01
  • 4,178
  • 10
  • 36
  • 69
45
votes
4 answers

Why is JavaScript bind() necessary?

The problem in example 1 is 'this' referring to the global name instead of the myName object. I understand the use of bind() in setting the value of this to a specific object, so it solves the problem in example 1, but why does this problem occur in…
Tom
  • 1,531
  • 1
  • 9
  • 20
44
votes
2 answers

How to enable named/bind/DNS full logging?

I am trying to find the perfect logging clause in named.conf that would help me enable full-level logs for named service. Can someone give an example here? My current clause is given below, but this generates very minimal logs. logging { …
deppfx
  • 661
  • 1
  • 10
  • 22
42
votes
4 answers

Why does click event handler fire immediately upon page load?

I playing around with a function that I want to bind to all the links. At the present the function fires when the page loads, instead of when I click on the link. Here's my code. (I can post the function showDiv(), if you need to see it.) Can you…
Jeff
  • 3,723
  • 8
  • 38
  • 64
39
votes
3 answers

Remove focus programmatically?

I have a jquery ui dialog with tabs loaded dynamically/JSON with content. Due to the complexity, I can't really post a fiddle or a relevant code (too much code). What's happening is that when the dialog opens, you can tab through the elements within…
Jason
  • 7,152
  • 11
  • 70
  • 118
39
votes
2 answers

What does binding a Rails Server to 0.0.0.0 buy you?

I am using "www.xip.io" as a DNS wildcard for testing on different devices. I set my primary domain to my IP address. I fire up a rails server with bundle exec rails server and I go here www..xip.io:3000 and notice my rails server…
andy4thehuynh
  • 1,790
  • 3
  • 24
  • 36
38
votes
2 answers

When should I use std::bind?

Every time I need to use std::bind, I end up using a lambda instead. So when should I use std::bind? I just finished removing it from one codebase, and I found that lambdas were always simpler and clearer than std::bind. Isn't std::bind completely…
gnzlbg
  • 6,587
  • 3
  • 46
  • 94
37
votes
5 answers

React - TypeError: Cannot read property 'props' of undefined

I'm trying to create a click event be able to delete an item on my list, but when I click it I get "TypeError: Cannot read property 'props' of undefined". I'm trying to stick to ES6 as much as possible, and I'm pretty sure its something to do…
pyan
  • 683
  • 1
  • 8
  • 17
35
votes
5 answers

JQuery event model and preventing duplicate handlers

Once again I want to load a page which contains its own script into a div using $("divid").load(...). The problem I face is related to events. Let's say we trigger("monkey") from the parent page and on the loaded page we bind("monkey") and just do…
Mr AH
  • 1,070
  • 2
  • 11
  • 21
33
votes
1 answer

Detect user scroll down or scroll up in jQuery

Possible Duplicate: Differentiate between scroll up/down in jquery? Is it possible to detect if user scroll down or scroll up ? Example : $(window).scroll(function(){ // IF USER SCROLL DOWN DO ACTION // IF USER SCROLL UP …
Steffi
  • 6,287
  • 20
  • 68
  • 118
32
votes
11 answers

SQLite: bind list of values to "WHERE col IN ( :PRM )"

all I want to do is send a query like SELECT * FROM table WHERE col IN (110, 130, 90); So I prepared the following statement SELECT * FROM table WHERE col IN (:LST); Then I use sqlite_bind_text(stmt, 1, "110, 130, 90", -1,…
Sebastian
  • 1,321
  • 1
  • 14
  • 14
32
votes
3 answers

what's the difference between 'call/apply' and 'bind'

var obj = { x: 81, getX: function() { console.log( this.x) } }; var getX = obj.getX.bind(obj);//use obj as 'this'; getX();//81 var getX = function(){ obj.getX.apply(obj); } getX();//also 81 The use of bind and call/apply look…
bennyrice
  • 323
  • 1
  • 3
  • 7
31
votes
1 answer

dig returns SERVFAIL but +trace works

Here is the main problem: dig maktabkhooneh.info +trace works perfectly fine and returns the right answer. dig maktabkhooneh.info (without +trace) returns: ; <<>> DiG 9.8.1-P1 <<>> maktabkhooneh.info ;; global options: +cmd ;; Got answer: ;;…
Hamed Tabatabaei
  • 571
  • 1
  • 6
  • 14