module

Using Zend Framework and Doctrine with independend modular structures

I've seen a lot of articles about integrating ZF and Doctrine. There is also a proposal for ZF here but they have always two possible structures. Either they put all models into one top level model directory or they put it into a module related model directory. application |-- Bootstrap.php |-- configs |-- controllers |-- models ...

Using two git repos in one folder

Hi! Here's the scene: I'm currently working on my own framework and on a client's website. Here is the structure: . .. _application _framework _public I'd like to have a repo with _framework/* _public/index.php and the structure _application (empty folders for _controllers _models and _views) on github. Also I'd like to have a repo c...

jruby include java class performance vs include a package

I have a jruby rails app with a ruby module in lib that is name-spacing my java objects so I don't have conflicts. I'm wondering what the difference is between including the specific classes in that module and including the package. I've included the sample code below. In the console, for example 1 when I say MyMod:: and hit tab, it h...

Drupal: module, cck or other

I have a legacy PHP form that I'm moving over to Drupal 6. I'm trying to make things easy for me as well as the future admins of the site. The below form is the heart of the old site data. So far in cck I have Locations, in taxonomy I have Countries, now I just need to allow these Species data to be added. I would do it in CCK, but I als...

Joomla module development, Why do I get Call to undefined method JDocumentRendererModule...?

I've been trying to get my first module to work, but keep getting Fatal error: Call to undefined method JDocumentRendererModule::isTuesday() and can't for the life of me figure out what is wrong. I think I followed all tutorials to the letter, however as I am not really comfortable with PHP, I suspect the problem really lies between the...

ds python import math module

I'm trying to get some python code I've written earlier on Windows to work on my DS. I'm using (DSPython), and when I tried to import math, it failed with "ImportError: No module named math". I've gotten most all other modules I need that don't rely on math working. But math is normally a builtin module, so I can't just find math.py on m...

What Are The Advantages and Disadvantages of Putting ActiveRecord Methods into Modules?

What are the advantages and disadvantages of creating a module like: module Section def self.included(base) base.class_eval do has_many :books end end def ensure_books return false if books <= 0 end end ...where ActiveRecord methods are used in the module instead of directly on the class(es) they belong to? ...

Can a java module call a c module ?

Just out of interest , is it possible to call a C module from a java module ? If so , how to do that ? ...

Import all the modules in a directory

Is there any way to import all modules in the current directory, and return a list of them? For example, for the directory with: mod.py mod2.py mod3.py It will give you [<module 'mod'>, <module 'mod2'>, <module 'mod3'>] ...

md5 module error

I'm using an older version of PLY that uses the md5 module (among others): import re, types, sys, cStringIO, md5, os.path ... although the script runs but not without this error: DeprecationWarning: the md5 module is deprecated; use hashlib instead How do I fix it so the error goes away? Thanks ...

ruby module as collection of methods

I have a rails app that loads lots of data from some java services. I'm writing a module that will allow me to populate some select boxes with this data and I'm trying to include these properly so I can reference them in my views. Here's my module module FilterOptions module Select def some_select return "some information"...

C++ app: modules design

Hi My app contains several modules (big classes) like network io, data storage, controls, etc. Some of them can cooperate. What would be a good way of declaring and binding the modules? I see several possibilities: 1) All modules declared as global, so we have in main.cpp #include ... ModuleA a; ModuleB b; ModuleC c; and if a wants ...

Ruby on Rails - One model can see module, another cannot?

Hi, I have a simple module for adding the current user to a newly created object: module AttachUsers def create_with_author(author, params) created = new(params) created.author = author created.save created end def create_with_author_and_editor(author, params) created = new(params) created.author = author...

How to modify Joomla default search module?

I want to remove the label "Search" in Joomla search module (default search module). I have modified the default_form.php from the directory /joomla15/components/com_search/views/search/tmpl/ and even removed the following code but it makes no difference on the site: <label for="search_searchword"> <?php echo JText::_( 'Search K...

Order include file depending on inherit

Hi there people and greetings from Sweden! I have a really tricky problem here. I'll try to show exactly what I mean. I'm building a modulebased CMS, and some modules inherit from a parent module. My problem is that the parent modules need to be included before the "children". I fetch moduleinfo from a XML file and store it in an arra...

How to modularize a Spring MVC application?

Hi there I could not see any samples so far and im wondering is it even possible, can i modularize my spring application? I dont mean just packages and jars. I would like to be able to have lets say a controller a few beans and some views + images and css. All the files necessary bundled together and dropped into the app like a jar. o...

What are some Pythonic ways to share variables with objects defined in a module?

I'm building a module where there are a whole lot of diverse objects which need to be controlled by several variables. If this were C, I would pass the objects a pointer to the variable / object I want them to watch, have the application change the variable as it needs to, and the objects in the module would "see" the new value. In mod...

Python os.path is ntpath, how?

Can someone tell me how Python "aliases" os.path to ntpath? >>> import os.path >>> os.path <module 'ntpath' from 'C:\Python26\lib\ntpath.pyc'> >>> ...

how to enable 2 module in joomla php

Hello, I have created 2 module for joomla. When I enable any one its working fine with joomla in left and right. But when I enable both the website is not working...its not display any website content. Please help me how I can enable more then 2 module. Thanks, Manoj Singhal ...

How to import or include data structures (e.g. a dict) into a Python file from a separate file

I know I can include Python code from a common file using import MyModuleName - but how do I go about importing just a dict? The problem I'm trying to solve is I have a dict that needs to be in a file in an editable location, while the actual script is in another file. The dict might also be edited by hand, by a non-programmer. script....