bind

Boost beginner, boost::bind nightmare

Hello, I've got this header (redone from a boost asio example): #ifndef MSGSRV_H_ #define MSGSRV_H_ #include <asio.hpp> #include <boost/array.hpp> #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> #include <boost/system/error_code.hpp> namespace msgSrv { class msgSrv { private: asio::ip::udp::socket *asioSocket; ...

Tkinter button bind

Hello, Help urgently.. This is my code: import Tkinter from Tkconstants import * tk = Tkinter.Tk() class MyApp: def __init__(self,parent): self.frame = Tkinter.Frame(tk,relief=RIDGE,borderwidth=2) self.frame.pack() self.message = Tkinter.Message(tk,text="Symbol Disolay") label=Tkinter.Label(s...

Is there a library which handles the parsing of BIND zone files in Python?

Hi, This is related to a similar question about BIND, but in this case I'm trying to see if there's any easy way to parse various zone files into a dictionary, list, or some other manageable data structure, with the final goal being committing the data to a database. I'm using BIND 8.4.7 and Python 2.4. I may be able to convince manag...

bind ip to subdomain

Hi, I have a linux client that reports his ip adress to a server who writes the ip down in a mysql table. Now my question is how to bind this ip adresse to a subdomain in the moment it is submitted by the client? i heard about the Linux DNS Bind but the addresses their are declared static in a file called "named.conf" if im getting it ri...

Using regex with jQuery binding of custom events?

Is it possible to use a regex in jQuery's bind method for custom events. Something like... $(selector).bind(myRegex, function(){}) ...

bind ip to subdomain

i have a linux client which uses pppoe to connect to the internet and everytime this client comes online I wanna bind his ipadress to a subdomain. dyndns is not an option due to their TTL. It looks like i have to setup my own nameserver on my root server to accomplish this task because I cannot create the keys needed to run an nsupdate o...

pass a callable object to a member function

class Action { public: void operator() () const; } class Data { public: Data(); ~Data(); Register(Action action) { _a = action; } private: Action _a; } class Display { public: Display(Data d) { d.Register( bind(Display::SomeTask, this, _1) ); } ~Display(); void...

Socket remains open after program has closed (C++)

Hey folks, I'm currently writing a small server application, and my problem is, that when I close my app (or better, press the terminate button in eclipse), the socket sometimes stays open, so when I execute my app the next time, bind() will fail with "Address already in use". How can I properly close my sockets when the program exits? I...

Unbinding specific jquery elements

Let's say I want to handle all links on a page, via a special function, so I do: $('a').bind("click", handleLinks); But I have a navbar with links that I want to handle differently. So I want to do this, which does not work: $('#navbar a').unbind("click", handleLinks); I do not want to specifically exclude the navbar in the first s...

Jquery function binding

Can I get a couple of good examples on how to bind 3 separate functions I've got going on? ...

Bind Results from a Left Join using mysqli

Hi, I'm recently changing to mysqli and while performing an update on a script, i couldn't manage to use the same SELECT information as i did before. How can I bind_results from a Left Join between 3 tables? This is the script: "SELECT actor.id, actor.name, actor.gender, thumbs.id, thumbs.filename, thumbs.actorid FROM actors, thum...

Boost::bind and std::copy

I'm trying to use Boost::bind and std::copy to print out the values in a list of lists. Obviously, I could use loops, and I may end up doing so for clarity, but I'd still like to know what I'm doing wrong here. Here is the distilled version of my code: #include <boost/bind.hpp> #include <iterator> #include <algorithm> #include <list> ...

Unbind a div and then bind it later.

$('.tab').click(function() { $(this).unbind("click"); var classy = $(this).attr("class").split(" ").splice(-1); var ihtml = $('.content.'+classy).html(); $('#holder').html(ihtml); $('.tab').removeClass('highlight'); $(this).addClass('highlight'); $(this).unbind("click"); }); So in this code I have basically, a tabbed interface. ...

PLS-00049: bad bind variable

CREATE OR REPLACE TRIGGER update_quant AFTER INSERT ON sales FOR EACH ROW DECLARE v_prod_name product.prod_name%TYPE; BEGIN UPDATE despatch SET quantity = quantity + :new.quantity WHERE prod_name = v_prod_name; END; / 5/28 PLS-00049: bad bind variable 'NEW.QUANTITY' How do you suggest I go about this error? I am trying ...

Using boost::bind with a constructor

I'm trying to create new objects and add them to a list of objects using boost::bind. For example. struct Stuff {int some_member;}; struct Object{ Object(int n); }; .... list<Stuff> a; list<Object> objs; .... transform(a.begin(),a.end(),back_inserter(objs), boost::bind(Object, boost::bind(&Stuff::some_member,_1) ) ); ...

boost::bind, boost::asio, boost::thread, and classes

sau_timer::sau_timer(int secs, timerparam f) : strnd(io), t(io, boost::posix_time::seconds(secs)) { assert(secs > 0); this->f = f; //t.async_wait(boost::bind(&sau_timer::exec, this, _1)); t.async_wait(strnd.wrap(boost::bind(&sau_timer::exec, this))); boost::thread thrd(&io,this); io.run(); //thrd(&sau_ti...

How do I bind a click event to created dom elements in a jQuery $.each loop? only seems to be binding to the last element!

Consider the following code, in theory the click event should bind to each element but for some reason (unbeknown to me) it will only bind to the last link. does anyone have any ideas? $.each(data, function(i,aitem){ linkid = 'address'+i; $("#SearchResults").html($("#SearchResults").html()+'<p><a id="'+linkid+'" href="#">'+ aitem...

binding lvalue to a reference

Hello everyone, I think I am missing smth back in my theoretical background on this thing. I know there were similar posts but I still do not get it. I have such a code: void somefunc1(Word &Key) { somefunc2(Key); } void somefunc2(char &char1) { return; } compiler generates me an error here: somefunc2(Key); [BCC32 Error]...

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 xaml)? Also, how do you specify the data template (another xaml file) for the view mode...

boost::bind accessors?

Suppose I have the following code: int f(int, int); int main() { SomeFunc(boost::bind(f, 1, 2)); } From the SomeFunc() function, is it possible to access the arguments held by the bound type? Something like this (pseudo code): // Obvious syntax issues... void SomeFunc(boost::bind& functor) { if(functor.function == &f) {...