module

Fortran 90 compiling issue: undefined reference to <modulename>

I'm having trouble trying to compile a simple fortran program which uses a module in the same directory. I have 2 files: test1.f90 which contains the program and modtest.f90 which contains the module. This is test1.f90: program test use modtest implicit none print*,a end program test This is modtest.f90: module modtest impli...

Python: why can't an imported module reference another imported module?

main.py: import subone import subtwo subone.py: a = 'abc' subtwo.py: print subone.a Running python main.py throws a NameError: name 'subone' is not defined. I expected it to print 'abc'. Refactoring it to use from import and classes doesn't help: main.py: from subone import * # Only using from X import * for example purpose...

Developing and using the same Python on the same computer

I'm developing a Python utility module to help with file downloads, archives, etc. I have a project set up in a virtual environment along with my unit tests. When I want to use this module on the same computer (essentially as "Production"), I move the files to the mymodule directory in the ~/dev/modules/mymodule I keep all 3rd-party mod...

How to attach debug IIS native module with VS 2010

I am getting difficulty debugging my custom IIS module written in C++, using VS 2010. The problem is that IIS worker process (w3wp.exe) starts too quickly and there is no way to catch it at the beginning in VS "attach to process" dialog. Is there a good skill to do this? Thanks. ...

Use XQuery library modules dynamically with Java

With XQuery you can use library modules within your query. They can be imported via import module namespace mynamespace = 'com.mynamespace' at 'filename.xq'; The question is: is there a way to determine which file is associated with the module namespace so that the programmer can decide dynamically? For example, my dynamic configura...

Getting a list of classes that include a module

I have a mixin for which I would like to get a list of all the classes that have included it. In the mixin module, I did the following: module MyModule def self.included(base) @classes ||= [] @classes << base.name end def self.classes @classes end end class MyClass include MyModule end This works pretty well: ...

Importing nested modules in Python

I'm trying to import a few libraries into my program (which is a google AppEngine application). Basically, I'm supposed to put all libraries in the root folder, but I've just created another folder called lib and placed them within that folder. (I've created the __init__.py) Imports regularly work fine by using the import lib.module o...

Magento - how to include javascript file on a page by page basis

In magento I know how to include js files in the page layout file. How though, do i include specific javascript files only on certain pages with my custom module. For example i am writing a custom module that will work with the product view and list pages. I therfore want to have some sort of layout update that i can use with my module...

developing for modularity & reusability: how to handle While True loops?

I've been playing around with the pybluez module recently to scan for nearby Bluetooth devices. What I want to do now is extend the program to also find nearby WiFi client devices. The WiFi client scanner will have need to have a While True loop to continually monitor the airwaves. If I were to write this as a straight up, one file prog...

Public Properties within VB Module - Cross-client Behavior

Can one client call a public property within a VB.NET module and see the value of that public property changed by another client accessing it at the same time? Example: Client 1 calls Public Module DataModule Private theDateTime As DateTime = GetAdjustedDateTime() //initial TZ value Public Property GetSetDateTime() As DateTim...

Flex 4 load multiple modules in sequence

Hi, I'm planning to break my Flex applications into different modules and need some advice regarding the loading of modules. Currently, on load of the application, I need to add 5 modules as children to HGroups under a viewstack. I'm using a ModuleManager to perform this and listens to the ModuleEvent to add the elements as IVisualEle...

Modules in CakePHP

Hi everyone! I am using this awesome framework during 6 months and I learnt a lot about it, but I wonder if it's possible to create an internal structure to simulate modules like in Codeigniter. I know there is the possibility to use plugins for that, but it seems too difficult to connect it together and pass info between them. My goal...

How do I use netlink for kernel to kernel communications?

I've read lots of examples and questions here about how to have a user-space program communicate with a kernel module via the netlink interface. I've also read about how netlink and generic netlink can be used for kernel to kernel communications. I have not found any code to demonstrate this capability. If netlink is not the correct appr...

Python shell is restarted every time when a new module is run

I use Python 3.1 inside Windows XP and when I try to use more than one module at the same time, the Python shell restarts. What can I do? This is my module benutzer.py: class Benutzer(object): def __init__(self,benutzer): self.name = benutzer self.email = None def setzeEmail(self, adresse): self.email ...

Which Perl module can format a number with a variable number of leading zeros?

Could somebody tell me a Perl module with a function, that converts digits like this: func( 1, 3 ) # returns 001 func( 23, 4 ) # returns 0023 func( 7, 2 ) # returns 07 ...

How can I conditionally import a package in Perl?

I have a Perl script which uses a not-so-common module, and I want it to be usable without that module being installed, although with limited functionality. Is it possible? I thought of something like this: my $has_foobar; if (has_module "foobar") { << use it >> $has_foobar = true; } else { print STDERR "Warning: foobar not...

How should I maintain my object modules in Perl?

I'm writing some object module in Perl using Moose. I use to store instances of created objects then use them. The basic representation of my object's data remains the same, but from time to time I add more functionalities - e.g. class methods or object methods. Can I continue using my stored objects, which were created with an earlier...

Prawn - how to generalize the common things in the pdf document into a separate module for code re-usage?

I am using the Rails Prawn to generate pdf files. Now that i am able to generate pdf with all necessary things that i need(eg. table, header, footer, logo, borders etc...). Now I need to use the common things(header, foooter, borders) in a method inside separate module and call this method from my original program? My original program:...

Rails: Keeping all the ActiveRecord "validates" lines in a separate file?

A couple of my model classes are getting a little cluttered with all these "validates" calls, so I thought I'd be able to move them into a separate class and 'require' that, but it doesn't seem to work. class Auction < ActiveRecord::Base require 'auction/validations' ... class Auction::Validations include ActiveModel::Validations...

Kohana 3 How to render module inside application

Hi All, How to integrate module inside application? I have modules having two controllers and two respective views inside module. Now I want to integrate this module inside my application, so that views and actions can be handled by this module only. ...