module

How can I move my Python2.6 site-packeges into Python2.7?

I just ran an update on ArchLinux which gave me Python3 and Python2.7. Before this update, I was using Python2.6. The modules I have installed reside in /usr/lib/python2.6/site-package. I now want to use Python2.7 and remove Python2.6. How can I move my Python2.6 modules into Python2.7 ? Is it as simple as doing mv /usr/lib/python2.6/...

Different JAAS Ldap login module implementations?

I have been implementing an out of the box JAAS LdapLoginModule for a Java 1.6 application. The implementation has gone smoothly except for a deployment to an IBM AIX platform. It would appear that the IBM Java runtime uses a different class path for LdapLoginModule. The Sun class path is: com.sun.security.auth.module.LdapLoginModule ...

Python-like "as" keyword (for namespacing) in Ruby

I was just over looking at this question. The first thought that popped to my head was that ruby must have some sort of "as" type keyword like Python's import to help avoid namespace pollution. I've googled a bit but it seems that it's recommended to wrap your code in modules to avoid namespace problems with ruby. This seems problemat...

Configuring Magento Layout for New Admin Module

I'm trying to create a custom report in the Magento back-end; my strategy is to first make my new module mimic the existing Reports/Sales/Orders functionality in the admin panel, and then make the required changes once I've seen how the pieces fit together. I've added my new menu item, and the module loads the basic admin layout and some...

Find a list of modules that 'altered' a specific form in Drupal

Is there a trick, addon or patch that allows me to find out what modules altered a specfic form? A list of all hook_form_alters is not too hard to achieve. But I want to list only those that actually changed my form. Modules can alter a form trough a generic modulename_form_alter() and modulename_form_FORMID_alter() it would be nice i...

Python import module results in NameError

I'm having a module import issue. using python 2.6 on ubuntu 10.10 I have a class that subclasses the daemon at http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ . I created a python package with a module containing code that imports some models from a django project. The code works when used from a class, no...

Zend: Create action in a specific controller in specific module with command line

I want to create a testAction in testController of testModule with command line. So I go to tesModule directory(cd application/modules/test) and run the following command. zf.sh create action test -c test It created a action in application/modules/test/controllers/testController.php but it created testAction's test.phtml file in appl...

NetBeans module - How to get instance of FileObject for testing

I'm trying to write some unit tests for my NetBeans module, but i'm unable to get an instance of the FileObject class: @Before public void setup() throws URISyntaxException{ URL url = this.getClass().getResource("/project-template/"); file = new File(url.toURI()); } @Test public void testIsProject...

Own Shipping Module for Magento - Next step in onepage checkout does not work anymore.

Cheers, I created my own shipping module for magento 1.4.1.1. , which so far does not work. After really getting frustrated with this, I exactly copied everything from http://www.magentocommerce.com/wiki/5_-_modules_and_development/shipping/create-shipping-method-module . As with my own module, it does not work. In the onepage checkout,...

Exception when running a Python method from another class.

Here is my code. import urllib2 import urllib import json from BeautifulSoup import BeautifulSoup class parser: """ This class uses the Beautiful Soup library to scrape the information from the HTML source code from Google Translate. It also offers a way to consume the AJAX result of the translation, however encodi...

Converting CruiseControl to Hudson

Hello Everyone, I am currently writing a Perl script that will convert CruiseControl config.xml files to a Hudson config.xml for each project. However I am stuck at one key part: How do I make it so the sub modules of a project also get the goals from there CC config? I can do the root module fine, and set up the configurations fine as...

Is there a wiki system that can be easily "plugged-in" to an existing CakePHP application?

I'm looking for a wiki system, that can easily be incorporated into an existing CakePHP application. I would have done it seperately from the CakePHP application, but the buyer requests that the user authorisation is done from the same tables. ...

How small should I make make modules in Haskell?

I'm writing a snake game in Haskell. These are some of the things I have: A Coord data type A Line data type A Rect data type A Polygon type class, which allows me to get a Rect as a series of lines ([Line]). An Impassable type class that allows me to get a Line as a series of Coords ([Coord]) so that I can detect collisions between ot...

Auto-load a module on python startup

I want IPython or the Python interpreter to auto-load a module when I start them. Is it possible? For example when I start IPython: $ ipython ... >>> from __future__ import division >>> from mymodule import * In [1]: Something like this. Thanks! ...

How to enter the URI to setup the ModuleCatalog in Prism WPF

I am getting a bit frustrated with prism. Something that should be so easy is really getting me stuck! I am trying to load my ModuleCatalog from a file. I created the ModuleCatalog.xaml file in my shell project. In the file's properties I have removed the Custom Tool action and I have set Build Action to Resource (I also tried Conten...

extending an irc bot with modules

I've created an IRC bot in Python from scratch just for the fun of it. I've got a way to load modules into it, but you have to manually type out the code to load each module as below: if data.find('PRIVMSG %s :add_mod foo\r\n' % channel) enabled_mods.append(foo) if data.find('PRIVMSG %s :rm_mod foo\r\n' % channel) enabled_mods.r...

How can I safely compile a Perl 5.12 module for Perl 5.8.9?

I want to install File::Fetch, which is a core module in Perl 5.12, in my Perl 5.8.9. In general, I want to compile and install future-dated modules in my back-dated Perl because I cannot upgrade my Perl. So I downloaded the module and also its dependencies. It's quite painful following the dependency tree but I'm more concerned about ...

Ruby on Rails: where should I store modules?

I am new to Ruby on Rails and my questions are about the application design, based on Rails 3. There are many data on the internet on the creation of standard websites (such as blogs) on Rails, but my application requires more than just "post and read" and I am not sure how to implement that. The idea: The model "Route" includes a num...

Rails: class' id / object_id changes during same request

I have been having a problem when I try to compare two Rails models. They should evaluate as the same, but the way ActiveRecord implements == is causing it to fail. What's even stranger is the unit tests are passing. Suppose a User has many Posts, and Posts has many Comments. User also has_many comments. (and this is comparing two obje...

HttpContext.Current.Session null on page rendering when im adding CustomUrlAuthorizationModule tag to web.config

Dear, I'm facing a problem with HttpContext.Current.Session when I'm adding CustomUrlAuthorizationModule tag to web.config. Every time i'm adding the above tag to my web.config, HttpContext.Current.Session is null every time the page is rendered. PS: i'm using HttpContext.Current.Session from SQLSiteMapProvider class from BuiltSiteMap...