I've written a very basic finance module in Ruby to ease my own calculations, as sometimes it's just a lot easier to enter irb and start calling functions. But the odd thing is, that in my module I have a submodule with a method called future_value (Finance::CompoundInterest.future_value) ... but according to irb it doesn't exist? It's...
I have a class that contains some private attributes. What I would like to do is to dynamically add some setters for these only for the execution of a specific block.
Example of what I would like to be able to:
class Content
attr_reader :a, :b
def initialize
@a = 1
@b = "plop"
end
def set(&block)
extend(Setter)
...
Can a flex module have styles different from the main application which loads the modules? Meaning... can I have a main set of styles for the application, and separate styles for each module.. with each of them rendering their own styles without disturbing the other at runtime?
My specific case:
The main application is developed by me.....
I've always wondered this. I have a habit of always adding
use strict;
use warnings;
use Data::Dumper;
to the top of every script I write. Does this add overhead if I don't even use the Dumper function? Also, in most cases Data::Dumper was called earlier in another package but I need it in this package so I include it again. In thi...
I'm using prism as an example; this is my first time playing with WPF. I've written two modules; orderModule and orderDetailModule. I was able to run my app and have them populate on one screen, now I'm trying to have only one module load and load the other with a button click. I was loading my modules in code before, then I noticed pris...
Hi,
I have this:
class Bullet < ActiveRecord::Base
include StagedVersionMethods
...
end
And this
module StagedVersionMethods
def initialize
puts self.bullet_id
end
end
When I create an instance of Bullet, the modules initialize method fires, but I get an ActiveRecord error:
...activerecord-2.2.2/lib/active_recor...
Hi,
I'm having a problem with the module Dynamic Registration for DNN.
The module is set up with form completion events in such a way that a user gets redirected to paypal and on completion of payment a user gets created and an email is sent out.
I also have it set up so that an email gets sent out on completion of payment, just to te...
I'm just about to start building my first magento module but I can't find any literature on the difference between the local and community folder in core. I've noticed that some people build their modules in local and others in community, what is the difference and why should I use one or the other?
Thanks
...
I have two separate functions, bar() and foo(). The execution flow of my program supposed to be as follows:
input -> bar() -> foo() -> output
Currently, a teammate of mine on the same development team made a foo() call inside the bar() function, which destroyed the modularity design. While it's better from modular design perspective to...
Does anyone have insight into when to use mx.modules.ModuleBase over mx.modules.Module? The documentation that I have seen isn't very clear on what each was designed for. What do they mean by "interacts with the framework" exactly? Does it just come down to visual vs. non visual components? Obviously a BaseModule which doesn't interact w...
Hey,
I'm using Drigg module for Drupal (drigg-code.org) and I'm trying to accomplish the following cagtegory structure:
A (parent category) - a, b, c (children)
B (parent category) - b, c, d (children categories)
When I click on 'b', I want to select the nodes from both A and B, but if I select the 'B' parent category, I want to only...
Hi,
I'm playing around with Ruby and I have written the following code:
module IdAndNameRedefine
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def use_id_and_name_from_module(use_attribute)
class_eval <<CODE
def id_and_name
"\#{id}-\#{#{use_attribute}.downcase}"
...
I am trying to include math.h in my Linux kernel module. If I use,
#include '/usr/include/math.h'
It give me theses errors:
error: features.h: No such file or directory
error: bits/huge_val.h: No such file or directory
error: bits/mathdef.h: No such file or directory
error: bits/mathcalls.h: No such file or directory
Why is this?
...
I am currently trying to make the Unicode-Map-0.112 module, but encounter an error, '0x1', that is evidently related to using nmake. I tried to follow suggestions on Perl Monks, i.e. http://www.perlmonks.org/?node_id=434813
However, I am unable to use ppm's capabilities because I am on a Windows machine without a network connection, a...
Hello,
I'm currently writing an application that works with modules. The module part is all okay, but I am not entirely clear on what would be the best approach to display multiple modules on a same page. The way common MVC like systems could work is that an URL like "site.com/article/full/18543/how-to-lose-weight" (I'm not implying any...
hi,
I have the Python modules a.py and b.py in the same directory.
How can I reliably import b.py from a.py, given that a.py may have been imported from another directory or executed directly? This module will be distributed so I can't hardcode a single path.
I've been playing around with __file__, sys.path and os.chdir, but it feels m...
Many thanks to ephemient for recommending to try vcvarsall.bat.
In DOS successfully ran vcvarsall.bat, which was part of MS C++ Express 2008
Next I continued to try to follow the PerlMonks advice by using ppm, i.e. http://www.perlmonks.org/?node_id=434813
So I tried to make, really nmake Unicode-Map-0.112 again. I received one more ...
By any chance is anyone aware of a Perl module that will allow a WMF image to be converted over to the PNG or JPEG format? I searched CPAN, but did not come across anything.
Due to installation limitations, must be a Perl module and work on Windows.
...
What is the best forum module to use for Drupal? The core is a bit lacking. I'm thining of investigating: http://drupal.org/project/advanced_forum
Anybody have any better suggestions?
...
mod1.py
import mod2
class Universe:
def __init__(self):
pass
def answer(self):
return 42
u = Universe()
mod2.show_answer(u)
mod2.py
#import mod1 -- not necessary
def show_answer(thing):
print thing.answer()
Coming from a C++ background I had the feeling it was necessary to import the module containing ...