I'm working on a python class that is being shared between two products. 90% of the functionality applies to both products. For the 10% that's different the code is littered with this kind of thing:
#Start of file
project = 'B'
#Some line of code
if project == 'A':
import moduleA
elif project == 'B':
import moduleB
#Many line...
I am creating a module for Drupal 7.x, and I want to create a database table when the module is installed (enabled for the first time). How can I do this? Thanks.
...
Is there a way to use modules that were imported in a local session in a remote session? I looked at import-pssession, but I don't know how to get the local session. Here's a sample of what I want to do.
import-module .\MyModule\MyModule.ps1
$session = new-pssession -computerName RemoteComputer
invoke-command -session $session -scriptbl...
Hi Guys,
I have tried to implement Drupal connect with facebook functionality via fbconnect module. I have installed and set up the plugin. When I click on the facebook button the new popup window is opened and it requires my facebook credentials. After I enter those, instead of just simply logging in to my site, drupal asks of me to cr...
I have a base class for some plugin-style stuff, and there are some methods that are absolutely required to be implemented.
I currently declare those in the base class as virtual, for example
public virtual void Save
{
throw new NotImplementedException();
}
and in the descendand I have a
public override void Save()
{
//do s...
Hi!
I am building a cgi application, and now I would like it to be like an application that stands and parses each connection, with this, I can have all session variables saved in memory instead of saving them to file(or anyother place) and loading them again on a new connection
I am using lamp within a linux vmware but I can't seem to...
I would like to set some values in the node before actually writing the data to the DB. I already have it working by modifying book_nodeapi but I would like to do it from outside the code, some _alter option that allows me to leave the module code untouched would be great.
Thanks
...
Hi,
I'm starting to write a application in php with one of my friends and was wondering, if you have any advice on how to implement module support into our application.
Or is there a way how to automatically load modules written in php by a php application? Or should i just rely on __autoload function?
And we don't need plugins that a...
I'm building a server that loads modules. Each module is a .jar file. Inside the jar there's all the classes that the module needs. The server needs to read the jar, find the main class (it doesnt have the main method on it is just the class that makes the module work but not as a different program), build an object of that class and sto...
I have a simple small question which someone who knows will be able to answer easily, I searched google but couldn't find the answer.
There are many programs running at once on a computer, and my question is: when a program loads a DLL, does it actually load the DLL file or does it find the memory in which the DLL is already loaded? For...
Hi,
I have a question regarding one single module that is distributed over multiple directories.
Let's say I have these two file and directories:
~/lib/python
xxx
__init__.py
util
__init__.py
module1.py
module2.py
~/graphics/python
xxx
__init__.py
misc
__init__.py
...
What is the recommended way to extend class behavior, via class_eval and modules (not by inheritance) if I want to extend a class buried in a Gem from a Rails 3 app?
An example is this:
I want to add the ability to create permalinks for tags and categories (through the ActsAsTaggableOn and ActsAsCategory gems).
They have defined Tag a...
Hi Stackies,
I want to include this module in every ActiveRecord model in my Rails app, without dropping include NotificationResourceableTraits in each file. Is there a way?
module NotificationResourceableTraits
def self.included(base)
base.has_many :notification_resources, :as => :notification_resourceable
base.has_many :not...
I'm getting a redirect loop when using Login Toboggan. It doesn't happen all of the time and I think I've narrowed it down to something with the session, specifically the active-tabs[last-active-href] value.
Since it's intermittent, I was able to print out a session of a working copy and a non-working copy. Here are both:
WORKS -- Arr...
Is it possible to load a module at runtime in Perl? I tried the following, but it didn't work. I wrote the following somewhere in the program:
require some_module;
import some_module ("some_func");
some_func;
...
Hi,
I'm trying to create an eclipse project from scratch using m2eclipse plugin to help resolving dependencies.
The project consists of the following modules:
test-ear
test-ejb
test-war
The ear references both other projects, and pom files are ready and working in each project.
Still I have one situation:
Instead of just maven buil...
I am making a custom Joomla! template which should allow for multiple modules in the right column. Everything is working fine, and I am using "modules.php" to create a custom HTML wrapper for each module in the column. Only problem is - I need to remove the bottom border from the last module that appears in that column, whichever one it ...
Preface: Yes, I've read:
http://drupal.org/node/547518
I am writing 'foo' module for Drupal6, where I am organizing the code in an OO fashion.
There's a class called Foo that has a bunch of setters and accessors, and it is working quite well at abstracting some pretty nasty code and SQL.
The question is is it common practice to expose...
I'm wondering what the difference is between the following two modules
# First Example
module Parent
module Child
end
end
and
# Second Example
module Parent::Child
end
Using the 2nd method, it appears as though the Parent module must be previously defined, otherwise I get an 'uninitialized constant' error
Given this, what is t...
What are the best or most useful dev-related PowerShell modules that exist today? Not looking for sys admin management tools for Active Directory/Microsoft Exchange/etc., but more for development utilities.
Please list one module per answer, so they can be voted up accordingly.
I'll provide a few to start off.
...