How can I call a Perl class with a shorter name?
I am writing a Perl module Galaxy::SGE::MakeJobSH with OO. I want to use MakeJobSH->new() instead of Galaxy::SGE::MakeJobSH->new(), or some other shortnames. How can I do that? ...
I am writing a Perl module Galaxy::SGE::MakeJobSH with OO. I want to use MakeJobSH->new() instead of Galaxy::SGE::MakeJobSH->new(), or some other shortnames. How can I do that? ...
I'm trying to follow the custom module tutorial at http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/modules-and-namespaces/creating-your-own-modul I've got a local deployment of dojo at http://localhost:8081/dojo-1.3.2/dojo/dojo.js For my custom module I've created the following javascript file at http://loca...
The following Perl code .. if ($^O eq "MSWin32") { use Win32; .. do windows specific stuff .. } .. works under Windows, but fails to run under al...
I want to simulate MyApp that imports a module (ResourceX) which requires a resource that is not available at the time and will not work. A solution for this is to make and import a mock module of ResourceX (named ResourceXSimulated) and divert it to MyApp as ResourceX. I want to do this in order to avoid breaking a lot of code and get...
I have some Java programs, now I want to find out whether it is modular or not, if it is modular then up to what extent, because modularity can never be binary term i.e. 0 or 1. How do I decide that particular code is modular upto this much extent. I want to know how to make code much more modular? ...
Module M Class C end end What I need is something like: M.was_defined_here?(M::C) M.classes.include?(M::C) Does this exists somehow? I know I could parse M::C.name. But someebody could have the idea to change Module#name, to make it more astetic or something. I want a clean solution. ...
So I downloaded the Magento free blog extension but it only supports a single blog. So I duplicated the extension as I need more than one blog in my magento store. I changed all the references and calls appropriately in my extension copy and was able to install it as a separate extension. However when I want to create a new post from t...
module M def f=(x) @f= x end def f @f end end class A extend M end class B < A end A.f= 42 puts A.f puts B.f this produces 42 nil Is @f a class variable to A and B? How do I share a variable between A and B by only writing this into M? ...
I want to use OCaml to generates sets of data and make comparisons between them. I have seen the documentation for Module types like Set.OrderType, Set.Make, etc, but I can't figure out how to initialize a set or otherwise use them. ...
I am teaching a graduate level Python class at the University of Paris, and the students need to be introduced to the standard library. I want to discuss with them about some of the most important standard modules. What modules do you think are absolute musts? Even though responses probably vary depending on your field (web programmin...
I recently discovered ELMAH as a drop-in module for error logging for ASP.NET and am now wondering: what other killer modules do I not know about? What's your favourite/indispensible ASP.NET module/handler/whatever? (I work in ASP.NET 2.0 so please specify version compatibility!) ...
I'm trying to find a way to lazily load a module-level variable. Specifically, I've written a tiny Python library to talk to iTunes, and I want to have a DOWNLOAD_FOLDER_PATH module variable. Unfortunately, iTunes won't tell you where its download folder is, so I've written a function that grabs the filepath of a few podcast tracks and ...
Hello SO, I don't know how to do one thing in Perl and I feel I am doing something fundamentally wrong. I am doing a larger project, so I split the task into different modules. I put the modules into the project directory, in the "modules/" subdirectory, and added this directory to PERL5LIB and PERLLIB. All of these modules use some ...
in Zend Framework Quickstart, protected function _initAutoload() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'Default_', 'basePath' => dirname(__FILE__), )); return $autoloader; } i thought if the namespace was 'Default', i dont need to specify it? eg. their class also ha...
Hi, I have created a project using the PRISM framework. I have a few modules that I can register and display in the shell and this works fine. What I need to do is dynamically display and hide the modules when a particular event is received from the event aggregator. I fire off a DisplayModule event that should be received and hide an ...
I mean, can I create them dynamically? ...
Hi. Does anyone know whether it is possible to run mvn exec:java on mvn aggregate POM? Currently I get: 2009-09-24 02:24:14.404 :bash: karolrvn@karolrvn-laptop : ~/adfadf/programming/verknowsys/codadris/ide_projects $ mvn exec:java -e -Dexec.mainClass=codadris.coviob2.App_Coviob2 + Error stacktraces are turned on. [INFO] Scanning for...
It's apparently a bad idea to put all bindings in one module, so what do you think is the more elegant way? I think Bob's idea could be good start for this discussion: It's hard to come up with one-size-fits-all rules for this sort of thing, but one Module per package is certainly a good place to start. Putting a Module in each pack...
I have installed the pg module with help of gem install pg Which returned Successfully installed pg-0.8.0-x86-mswin32-60 When a .rb-file looks like this require 'rubygems' require 'pg' I get an LoadError (exception 126) which tells me that it can't find the module C:/Ruby/lib/ruby/gems/1.8/gems/pg-0.8.0-x86-mswin32-60/lib/pg.so....
Are there any modules or functions for dealing with trees? I have a type that looks like this: type t = Leaf of string (* todo: replace with 'a *) | Node of string * t list and I'm struggling to do insertion, removal of subtrees, etc. I've used the googles but can't find anything. ...