Search Results

Search found 2 results on 1 pages for 'jeffh'.

Page 1/1 | 1 

  • Nodejs removing event listeners [migrated]

    - by JeffH
    Looking to get some help. I'm new to Nodejs and wondering if it is possible, to remove this custom event emitter. Most of this code comes from the Hand on nodejs by Pedro Teixeira. My function at the bottom is attempting to remove the custom event emitter you setup in the book. var util = require('util'); var EventEmitter = require('events').EventEmitter; // Pseudo-class named ticker that will self emit every 1 second. var Ticker = function() { var self = this; setInterval(function() { self.emit('tick'); }, 1000); }; // Bind the new EventEmitter to the sudo class. util.inherits(Ticker, EventEmitter); // call and instance of the ticker class to get the first // event started. Then let the event emitter run the infinante loop. var ticker = new Ticker(); ticker.on('tick', function() { console.log('Tick'); }); (function tock() { setInterval(function() { console.log('Tock'); EventEmitter.removeListener('Ticker',function() { console.log("Clocks Dead!"); }); }, 5000); })();

    Read the article

  • Are there Windows API binaries for Subversion or do I have to build SVN to call the API from Windows

    - by JeffH
    I want to call a Subversion API from a Visual Studio 2003 C++ project. I know there are threads here, here, here, and here that tell how to get started with C#.NET on Windows (the consensus seems to be SharpSvn, which I've used easily and successfully on another project) but that's not what I want. I've read the chapter on using APIs in the red-bean book which says: Subversion is primarily a set of C libraries, with header (.h) files that live in the subversion/include directory of the source tree. These headers are copied into your system locations (e.g., /usr/local/include) when you build and install Subversion itself from source. These headers represent the entirety of the functions and types meant to be accessible by users of the Subversion libraries. I'd like to use CollabNet Subversion but there doesn't seem to be API binary downloads, and I'd just as soon not build the whole thing if I can avoid it. Considering another approach, I found RapidSVN's C++ API, but it doesn't appear to offer Windows API binaries either and seems to require building SVN (which I would be willing to do as a last choice if RapidSVN's API is higher-level than the stock SVN offering.) Does calling the API from C++ in Windows have to be this much more work compared to using SharpSvn under .NET, or is there something I haven't found that would help me achieve my goal?

    Read the article

1