extensions

How to start writing a PHP5 extension in C++

I'm writing a PHP5 extension, and while I could write it in C, it would be easier to use C++ and take advantage of the STL and Boost. Trouble is, the tutorials I've seen only deal with C, and I'm looking for a basic example which uses C++ Here's what I've tried so far: config.m4 [ --enable-hello Enable Hello World support]) if tes...

Install PECL SSH2 extension for PHP

I am trying to install this http://fr2.php.net/manual/en/book.ssh2.php on a Centos 5 (a fork of RHEL 5). I installed libssh2 (yum install libssh2) wich is located in /usr/lib, and when I install SSH2 extension (via pecl install -f ssh2) I get this message checking for ssh2 files in default path... not found configure: error: The r...

PHP error: Unable to Load Dynamic Library (memcache.so)

error_log shows the following line on startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/memcache.so' - (null) in Unknown on line 0 The file exists and it compiled properly. PHP version is 5.2.6. After Googling for a couple of hours I managed to find a couple of similar problems, but no solutions...

Hover text at mouse created from firefox toolbar add-on

Hi all, I'm creating a firefox add-on, and I have a situation where if someone clicks on a specific item in my toolbarbutton menupopup, I want to display some text to appear beside the mouse for a couple seconds. I don't mean mouseover text, because when they click on the item, the I close the menupopup. I mean something like what's s...

Can I use VS2005 to build extensions for a Python system built with VS2003

RDFLib needs C extensions to be compiled to install on ActiveState Python 2.5; as far as I can tell, there's no binary installer anywhere obvious on the web. On attempting to install with python setup.py install, it produces the following message: error: Python was built with Visual Studio 2003; extensions must be built with a compiler...

How ubiquitous is hash_map?

The hash_map and hash_set headers aren't included in the C++ standard yet, but they're available as extensions with all the compilers I've used lately. I'm wondering how much I can rely on these in real code without sacrificing portability. I'm working on tools projects that need to run on a host of architectures and compilers, includi...

Threaded behaviour for Firefox extension possible?

Hi, Is threaded behaviour for Firefox extension possible? I mean to have a "thread" running per Firefox tab. Just finished an extension that does something to a page in a Firefox window, but figured out that it would require some major restructuring to get the extension working if I wanted to run the extension logic in every tab. Met...

How do you attach a custom callback function to the jquery autocomplete extension?

I'm using the jquery autocomplete 1.0.2 extension by Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer. I am attempting to execute my own callback function when .show() and .hide() are called from within the autocomplete control. I haven't found any way for it to actually recognize my callback function. If anyone is famil...

Folder "drop box" with custom behavior

I'm thinking of trying to create a "drop box" application that can automatically organize files as you drop them into a folder. I always end up with a bunch of random files on my desktop, and I think it would be useful to be able to drag them onto an icon/folder on the desktop and have them automatically sorted into other locations base...

Extension Method Help

I am writing an extension method where I happen to need the field name that the extension method is needed within the extension method. I can not figure out how to do this. My code: Extension method: public static Validate Demand<T>(this T parameter) { string name = ... var field = GetField(parameter); return Validation....

How do the Server Extensions work in X?

Let's take an example. When I run: xkbprint $DISPLAY keyboard.ps what happens in the system? I would like to know how the X really work because I regularly get nasty error reports such as Fatal Error: Cannot load geometry for /tmp/launch-NawGIk/:0 Exiting I know that the X11 was designed in a way that it i...

Best way to CustomViewData?

What's the most practical way to add custom properties to a side wide ViewDataDictionary? Let's assume a simple case: public ActionResult Index() { // ViewData["Title"] = "Home"; ViewData.Title = "Home"; return View(); } The first thing that comes to mind is a custom class and using "new" in a application base controller: publ...

How do I get File Type Information based on extention? (not MIME) in c#

Hi. How do I get the general File type description based on extention like Explorer does it? So not MIME but the information that the end-user sees, like. .doc = Microsoft Office Word 97 - 2003 Document .zip = ZIP File .avi = Video File. And how can I get the 'secondary' information that seems to be available, which I guess it not ext...

MS Extensions To STL

Hi all, If this is a "Google Is Your Friend" question, I apologize in advance. I've searched but perhaps I've been using the wrong terms for searching. Can anyone point me to any sort of introductory document on the STL extensions which MS provided with Visual Studio 2003? I believe the libraries were licensed from Dinkumware and I'v...

Is this the best way in C# to convert a delimited string to an int array?

Given the string below: string str = "1,2,3"; Will this be the best extension to convert it to an int array? static class StringExtensions { public static int[] ToIntArray(this string s) { return ToIntArray(s, ','); } public static int[] ToIntArray(this string s, char separator) { string[] ar = s.S...

Best content-type and extension for web delivered Excel 2003 SpreadsheetML file

I am working with an API that has a report URL call. The report has an "Excel 2003 XML" format option. When that is selected they deliver it as: Content-Type: application/vnd.ms-excel content-disposition: inline; filename="report-name.xls" OpenOffice.org up to 3.0 tries to bring this in as a text import and I'm concerned that Office 2...

Extending core Ruby classes when in Rails

Rails provides a number of extensions to core Ruby classes. One of these is the to_sentence method, added to the Array class, allowing for the following: ['a', 'b', 'c'].to_sentence # gives: "a, b, and c" I would like to extend this method to allow it to take a block, so that you can do something like the following (where people is an...

Radiant extensions on Heroku?

Anyone have any experience yet getting Radiant CMS extensions to actually make it onto a heroku instance? I have tried removing the submodules and adding the files back, but haven't really had much luck... ...

Finding sum of selected in flot

If I bind a function to flot's "plotselected" event, is there a way to get the main series indexes of the start and end points of the selected area? I saw that with "plothover" you can use the "item" variable, but it's not clear if that works for selections. Plus, I don't want to have to iterate through the entire series each time the f...

What are the best Visual Studio extensions?

Possible Duplicate: What is your favorite Visual Studio add-in/setting? I'm wondering what are the extensions that you love or can't live without? I know for me I'm a huge fan of Resharper ($) GhostDoc (Free) Copy As HTML (Free) What other greats are out there? Mark them as free or not as well... ...