module

F#, namespaces, modules, fs and fsx

I'm aware of other questions about modules and namespaces in F#, but they're not helping me right now. I've got a project with Utilities.fs namespace Company.Project.Namespace module Utilities = //stuff here Functions.fs namespace Company.Project.Namespace open Utilities module Functions = //stuff here And I'm tryin...

using __init__.py

I am not getting usage scenarios or design goals of python __init__.py in my projects. Assume that I have 'model' directory (refers as a package) which I have kept the following files. 1. __init__.py 2. meta.py 3. solrmodel.py 4. mongomodel.py 5. samodel.py I found two ways of using __init__.py. I have common definition which n...

How do I authenticate into Gmail using Perl?

I've installed this module to gain access and controls within a Gmail inbox. However, when I try to connect through a small Perl script and test the functionality, I get this error message. Error: Could not login with those credentials - could not find final URL Additionally, HTTP error: 200 OK This is an error built within the Gma...

Perl: Check to see if your file was loaded as a module or run directly

How do I write a test in Perl to see if my file was run directly or imported from some other source? I'd like to do this to make it easy to bundle everything in one file but still write unit tests against the functions. My idea is to have something like this: if (running_directly()) { main(); } def main { this(); that(); } def t...

Customizing joomla search result page layout

The joomla search results appear on the home page. I want it to show up on a new page. According to some online posts I had to modify the mod_search.php to set the item id to a non existing item so i set it to 0, but the problem is that the changes are not being reflected in my search module at all. I also tried putting a hidden field ca...

class variables and module inclusion, specifically in ActionController

I want to have some kind of single list that is initialized in a seperate module, then can be included in a controller and modified at the controller-class level, and accessed at the controller-instance level. I thought class variables would work here, but something strange is happening, they don't seem to be being initialized within my ...

Drupal views filters dynamically

Hi, I am integrating location with views modules in the filters options I find a distance/proximity filter, I need to dinamically set latitude and longitude using geolocation html5 feature. Anybody have an idea to help me??? I try Service module too, to make json requests but I dont know how to add filters paramenters. Thanks your help...

How to install a module for two perl-installations simultaneously?

Supposing I have one perl in /usr/bin (which came along with my os-distribution) and another one (build form the source) in /usr/local/bin – is there a simple way to make a module available to both perl-installations with only one cpan; install module-name? ...

How to use jQuery ajax in Joomla module

I'm creating a module where in my main PHP file I've added a reference to a Javascript file. In that Javascript file, I do a jQuery call on dom ready that does an Ajax post to grab the initial content for a div. The URL that it posts to is another PHP file (gateway.php) that is part of my module. (This gateway.php does a call to a remote...

JavaFX - good or not? I need docking in it.

Hello, I have just explore javaFX. I am now programming modul based application by netBeans platform. I have minimal UI now, but I am going to do quite complex GUI. Is javaFX good for me? And if yes, how I can implement docking in main window? (i think about usage of JFX becouse I want good looking app) ...

Installing a perl application along with the supporting modules onto a Windows PC that doesn't have a compiler

I'm building a perl application that interacts with a PostgreSQL database via the DBD::Pg module, and that uses Perl/Tk for it's GUI. It works fairly well on my system, but I'm designing it for a family member to use for their business. They don't have a c++ compiler and don't have a clue what CPAN is. The goal is to not bog them down by...

Do python packages (multi-file modules) behave exactly as one big module?

I've just read an article that supposedly introduced me to a new concept: Up to now I was sure that python packages (i.e directories with an __init__.py file) behave exactly the same as java packages, that is - little namespaces to help arrange the code (minus java's "package" scoping). But, according to this link: http://diveintopython3...

Python: Classname same as file/module name leads to inheritence issue?

My code worked fine when it was all in one file. Now, I'm splitting up classes into different modules. The modules have been given the same name as the classes. Perhaps this is a problem, because MainPage is failing when it is loaded. Does it think that I'm trying to inherit from a module? Can module/class namespace collisions happen? M...

Where to specify window component's position?

I created module in netBean platform, then I created window component there, and I want to specify default position in main window. For exapmle position "editor". Where I can do it? ...

How to build a dotnetnuke module from source i.e blog module

So i have dotnetnuke community version 5.2 and i downloaded the source for blog 3.5. For the purpose of learning i want to build the module using source code. But no matter how i add the module from the host account, it fails. Any experience dotnetnuke user able to guide me through? There is practically no good documents online regarding...

Module based php system.

Hello! I'm trying to make a module based php system. Each module is a class which implements a module interface and got the same name as the php file. Each module is located inside a directory called Modules. I can list every module in the directory, but how do i get an instance of them? Is it even possible? A little pseudo-code to ...

Manual alternative to mod_deflate

Say I don't have mod_deflate compiled into apache, and I don't feel like recompiling right now. What are the downsides to a manual approach, e.g. something like: AddEncoding x-gzip .gz RewriteCond %{HTTP_ACCEPT_ENCODING} gzip RewriteRule ^/css/styles.css$ /css/styles.css.gz (Note: I'm aware that the specifics of that RewriteCond need ...

inspect the parameters to "use", and pass on the rest?

I have a Perl module and I'd like to be able to pick out the parameters that my my module's user passed in the "use" call. Whichever ones I don't recognize I'd like to pass on. I tried to do this by overriding the "import" method but I'm not having much luck. EDIT: To clarify, as it is, I can use my module like this: use MyModule qw...

Why can you reference an imported module using the importing module in python

I am trying to understand why any import can be referenced using the importing module, e.g #module master.py import slave and then >>>import master >>>print master.slave gives <module 'slave' from 'C:\Documents and Settings....'> What is the purpose of the feature? I can see how it can be helpful in a package's __init__.py file, b...

Prism with multiple Modules and Modules depends on

Hi I'm in a scenario where I'm thinking about to have several modules, and let modules depends on other modules. say that we are building a business system while one part is invoicing and we have customers in different branches. So one industry may want to use some tools and create the invoice in their way, and another industry may wan...