module

Creating an extensive project to be sold

Howdy, I am going to start a C# project from scratch that will consist of several modules so it can be sold by modules of an existing PHP/ASP/MySQL/Oracle/MS SQL application that manages to show 3D objects and create 2D and 3D CAD files from a web app that the user can use to create all the stuff. My question is, to start from ground z...

Why doesn't url rewrite work?

In asp.net 3.5, I'm rewriting the url http://www.abc.com/archive/1108/harpersdecember to the following http://www.abc.com/article.aspx?docId=78 I'm using this code to do it: Context.RewritePath("/article.aspx?docId=78"); It works fine locally but when I upload to the remote web server, I get a 404 when trying to re...

Can I invoke an instance method on a Ruby module without including it?

Background: I have a module which declares a number of instance methods module UsefulThings def get_file; ... def delete_file; ... def format_text(x); ... end And I want to call some of these methods from within a class. How you normally do this in ruby is like this: class UsefulWorker include UsefulThings def do_work ...

Is there a way to execute php code in a sandbox from within php

I want to execute a php-script from php that will use different constants and different versions of classes that are already defined. Is there a sandbox php_module where i could just: sandbox('script.php'); // run in a new php environment instead of include('script.php'); // run in the same environment Or is proc_open() the only ...

Why does the order of including modules make a difference in Ruby?

This question is best summed up with a code example: module TestOne module Foo def foo 42 end end module Bar include Foo end class Quux include Bar end end TestOne::Bar.ancestors # => [TestOne::Bar, TestOne::Foo] TestOne::Quux.ancestors # => [TestOne::Quux, TestOne::Bar, TestOne::Foo, Object, Kernel]...

python ImportError No module named

Hello, I am very new at python and I am getting this error: Traceback (most recent call last): File "mountain.py", line 28, in ? from toolkit.interface import interface ImportError: No module named toolkit.interface Python is installed in a local directory: My directorie tree is like this: (local directory)/site-packages/toolk...

How do I find which file Perl loaded when I use a module?

in Perl, when I do use < module name> < ver>, the system finds the .pm for the library somewhere in the @INC path. Is there a reliable way to which file was actually loaded? ...

Best way to import version-specific python modules.

Which method makes the most sense for importing a module in python that is version specific? My use case is that I'm writing code that will be deployed into a python 2.3 environment and in a few months be upgraded to python 2.5. This: if sys.version_info[:2] >= (2, 5): from string import Template else: from our.compat.string imp...

How do I work with multiple git branches of a python module?

I want to use git to allow me to work on several features in a module I'm writing concurrently. I'm currently using SVN, with only one workspace, so I just have the workspace on my PYTHONPATH. I'm realizing this is less than ideal, so I was wondering if anyone could suggest a more 'proper' way of doing this. Let me elaborate with a hypo...

Refactoring python module configuration to avoid relative imports.

This is related to a previous question of mine. I understand how to store and read configuration files. There are choices such as ConfigParser and ConfigObj. Consider this structure for a hypothetical 'eggs' module: eggs/ common/ __init__.py config.py foo/ __init__.py a.py 'eggs.foo.a' needs some configuration i...

How to UDP Broadcast from Linux Kernel?

I'm developing a experimental Linux Kernel module, so... How to UDP Broadcast from Linux Kernel? ...

How to arrange a Makefile to compile a kernel module with multiple .c files?

How to arrange a Makefile to compile a kernel module with multiple .c files? Here is my current Makefile. It was auto generated by KDevelop TARGET = nlb-driver OBJS = nlb-driver.o MDIR = drivers/misc EXTRA_CFLAGS = -DEXPORT_SYMTAB CURRENT = $(shell uname -r) KDIR = /lib/modules/$(CURRENT)/build PWD = $(shell pwd) DEST = /lib/modules/$...

How can I set Perl's inclusion path for modules for a CGI script?

Hello! I’ve got several Perl modules installed on my hosting machine in ~/perl, how do I add them to Perl module path? Setting PERL5LIB or unshifting the paths to @INC surely works, but the environment variable does not help when running as a CGI script and the @INC way is not very portable. Is there a better way? This has to be a common...

How do I find the module dependencies of my Perl script?

I want another developer to run a Perl script I have written. The script uses many CPAN modules that have to be installed before the script can be run. Is it possible to make the script (or the perl binary) to dump a list of all the missing modules? Perl prints out the missing modules’ names when I attempt to run the script, but this is ...

asp.net, url rewrite module and web.config

Hi, i'm using ASP.net with .NET 3.5 on IIS7 (Vista) with the URL Rewrite Module from Microsoft. This means, that i have a <system.webServer> <rewrite>...</rewrite> ... </system.webServer> section within the web.config, but i get a warning, that within the system.webServer the element "rewrite" is not allowed. How can i con...

Making a virtual package available via sys.modules

Say I have a package "mylibrary". I want to make "mylibrary.config" available for import, either as a dynamically created module, or a module imported from an entirely different place that would then basically be "mounted" inside the "mylibrary" namespace. I.e., I do: import sys, types sys.modules['mylibrary.config'] = types.ModuleTyp...

Should I use Module::Install or Module::Build?

I'm writing a programmer's text editor (yes another one) in Perl called Kephra, which is also a CPAN module of course and bundled with Module::Install. Recently I saw that Module::Build has gone into core, so if I switch I could reduce dependencies. Is there any other reason to switch? ...

How can I get BerkeleyDB for ActivePerl 5.10?

I'm trying to find out where a BerkeleyDB PPM is for ActivePerl 5.10. Anyone have a clue where to find this, or how to build it? I had found a lead here. They claim BerkeleyDB 0.33 had built ok for Perl 5.10. They provide a link to the PPM, but not to the supporting zip file. So I got around it, manually getting the ppm and the zip and ...

What's the easiest way to detect compilation failures, missing packages, etc in a Perl application?

I have a Perl application someone else wrote and I'm trying to make it run on my local machine. But I keep getting an error in one of the modules, which appears to be based on a missing module somewhere. What are some good tools or practices to track this thing down? ...

Are there Perl modules that can't be used in CGI?

I had a recent problem where Tie::File proved the best answer I could work with for a Perl program. I'm at a point where I'm ready to work with CGI, and I need to ask: are there Perl modules that can't be used in CGI, especially that Tie::File? If there are any complications, are there ways to reconcile them? ...