extension

Building Python C extension modules for Windows

I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't know how to do it in Windows. Would I need to buy a copy of Visual Studio, or does Visual Studio Express work? Can I just use Cygwin or MinG...

Specific Client Detection based on headers. Firefox extension?

I have a website in which I want to be able to detect a certain user based upon a permanent attribute of a specific user. My original plan was to use an ip address but those are difficult to maintain since they can change frequently. Cookie's and Sessions are almost out of question because they expire and tend to be difficult to manipul...

How do I Extend Blogengine.Net to collect statistics of visitors?

I love BlogEngine. But from what I can se it does not collect the standard information about the visitors I would like to see (referrer, browser-type and so on). When I log in as Admin I have a menu item named "Referrer". I can choose a weekday and then I'll be presented with 1 or 2 rows with "google.com 4 hits, "itmaskinen.se 6 hits...

How to serve files from IIS 6 on Windows Server 2003?

I have files with extensions like ".dae" , ".gtc" , etc. When I try to hit these files over http, the server returns a 404, but they are in the directories. However I can serve readily known file extensions; if i just rename them to say, xml, they are accessible. Any suggestions for what the problem may be? ...

Initial skeleton for Firefox extensions?

I always seem to have a hard time starting a new Firefox extension. Can anyone recommend a good extension skeleton, scaffold, or code generator? Ideally one that follows all the best practices for FF extensions? ...

Reading 32bit Packed Binary Data On 64bit System

I'm attempting to write a Python C extension that reads packed binary data (it is stored as structs of structs) and then parses it out into Python objects. Everything works as expected on a 32 bit machine (the binary files are always written on 32bit architecture), but not on a 64 bit box. Is there a "preferred" way of doing this? ...

Vim extension (via Python)?

Howdy, is it possible to extend vim functionality via custom extension (preferably, written in Python)? What I need ideally is custom command when in command mode. E.g. ESC :do_this :do_that ...

Is it idiomatic Ruby to add an assert( ) method to Ruby's Kernel class?

I'm expanding my Ruby understanding by coding an equivalent of Kent Beck's xUnit in Ruby. Python (which Kent writes in) has an assert() method in the language which is used extensively. Ruby does not. I think it should be easy to add this but is Kernel the right place to put it? BTW, I know of the existence of the various Unit framew...

How do I execute a page-defined JavaScript function from a Firefox extension?

Hi, I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not inside extension, but a page that is loaded by Firefox): document.funcToBeCalled = function() { // function body }; Then, the extension will run this on some even...

Alternative to libraries of static classes

I have a large collection of static 'Utility' classes that contain very generic static methods. For example, I have a CollectionUtility class that has useful methods like: public static void RemoveDuplicates(ICollection collection)... etc With C# 3.0 I've been converting these to extension methods. Now, I've heard some talk that in an...

Script a ruby command-line app; best way to do this?

I have a command line Ruby app I'm developing and I want to allow a user of it to provide code that will run as a filter on part of the process. Basically, the application does this: read in some data If a filter is specified, use it to filter data process the data I want the filtering process (step 2) to be as flexible as possible....

How to build Python C extension modules with autotools

Most of the documentation available for building Python extension modules uses distutils, but I would like to achieve this by using the appropriate python autoconf & automake macros instead. I'd like to know if there is an open source project out there that does exactly this. Most of the ones I've found end up relying on a setup.py file...

How To Create a Quick Minimal Firefox Extension?

What the minimum basic setup required to begin developing a Firefox extension? ...

Can not add '.* " at mapping of IIS.

Hello All, I am unable to add .* at extension mapping in IIS (defaultwebsite -> properties -> home directory -> configuration) because it gives the message "Wrong file Extension". The operating system is Windows 2003 server. I can add .* at mapping in IIS when the operating system is Windows XP ...

NAnt extension function, Project object

Is there a way to access the Project object from a NAnt extension function, as can be done from an extension task? In this example, I want to use the BaseDirectory property inside the Bar function: [FunctionSet("foo", "Foo")] public class FooFunctions : FunctionSetBase { public FooFunctions(Project project, PropertyDictionary properti...

TYPO3: setting plugin as of the "USER_INT type"

I have a working TYPO3 extension. It is attached this wiki page. How can I change the code of this extension so it is of the USER_INT type? I.e. I don't want TYPO3 to cache the output of this plugin, and want TYPO3 to invoke the extension ever time a page that uses the extension, i.e. disable the caching for this extension. ...

Scaling Literate Programming?

Greetings. I have been looking at Literate Programming a bit now, and I do like the idea behind it: you basically write a little paper about your code and write down as much of the design decisions, the code probably surrounding the module, the inner workins of the module, assumptions and conclusions resulting from the design decisions, ...

Opening a URL in current tab/window from a Firefox Extension

I am creating a Firefox Extension...what would be the javascript to open a URL in the current tab from a menuitem? e.g. in my overlay.xul file i have the following line: <menuitem label="Visit homepage" oncommand="window.location='http://www.somepage.com'"/&gt; but in firefox, when i click on the menu item, it opens the URL but it sc...

C++ extend a vector (with another vector)

I'm a C/Python programmer in C++ land, really working with the STL for the first time. In Python, extending a list with another list uses the list's extend method: >>> v = [1, 2, 3] >>> v_prime = [4, 5, 6] >>> v.extend(v_prime) >>> print v [1, 2, 3, 4, 5, 6] In C++, I'm currently using this algorithmic approach for vector extension: ...

php includes in html files-directories

Do all php include files have to be in an include directory, or is that just an organizational convenience? Can I include files from any directory using the path to that directory? Do html files that contain php includes have to have a php extension? If so, I guess that would mean all of my html docs would be php if they all have the men...