Let's assume I have a main script, main.py, that imports another python file with import coolfunctions and another: import chores
Now, suppose coolfunctions also uses stuff from chores, hence I declare import chores inside coolfunctions.
Since both main.py, and coolfunctions import chores ~ is this redundant? Is there any other way...
Hello! The Term::Size-module jumbles up the encoding. How can I fix this?
#!/usr/bin/env perl
use warnings; use strict;
use 5.010;
use utf8;
binmode STDOUT, ':encoding(UTF-8)';
use Term::Size;
my $string = 'Hällö';
say $string;
my $columns = ( Term::Size::chars *STDOUT{IO} )[0];
say $columns;
say $string;
Output:
Hällö
140
...
i found some modules for feed parsing(aggregator,feeds,feedapi). i am confusing to choose right one. i need to filter and classify the feeds. can any one guide me
...
I'm hoping to implement something like all of the great plugins out there for ruby, so that you can do this:
acts_as_commentable
has_attached_file :avatar
But I have one constraint:
That helper method can only include a module; it can't define any variables or methods.
The reason for this is because, I want the options hash to d...
Hi,
I've installed the composite layout module and I created a view with a list of 'testomonials'(just a simple list of title and excerpt).
On my front page, I have been able to include a couple of other nodes within that page and a couple of blocks (e.g. within then same composite layout). However, I want to also include the list v...
I am quite new to using Joomla. I have created a custom module, however I would like to add some code near the </body> tag (or near the opening <body> tag) so it is guaranteed to be not nested in any tables whatsoever that might be in the template.
I have located details on how to do this within a content plug-in, however I would like ...
Hi, I need to write a module that gives me a page will all possible paths in a drupal install, including orphaned pages. (site map won't work for that).
I can query the url_alias table for aliases, and I can query the menu_router table for all paths, even ones set in page/feed displays in views. But, variable paths (those with arguments...
Hello all,
i need to integrate modules that are developed in separate win form application.Application can run and test individual and in the integrated.i required to create a set up and deploy at client site.My two biggest challenges are keep assemblies in one place and reference them in application.
For Example
Module 1. A stand...
I would like to additional instructions to a custom Drupal form, similar to hook_help, but at the bottom of the form. Is there a function or hook available for this?
...
Hi,
I have installed rpx module in drupal 6 . it is working for gmail, yahoo only . not working for open id login as well as aol login.
Please any one help . with this issue
...
I am trying to get up to speed with Python, trying to replace some C with it. I have run into a problem with sharing data between modules, or more likely my understanding of the whole thing. I have a signal module which simplified is:
import sys, signal
sigterm_caught = False
def SignalHandler(signum, stackframe):
if signum == signa...
Curious how one would go about calling a class method from inside an instance method of a module which is included by an active record class. For example I want both user and client models to share the nuts and bolts of password encryption.
# app/models
class User < ActiveRecord::Base
include Encrypt
end
class Client < ActiveRecord::...
I have a Python package mymodule with a sub-package utils (i.e. a subdirectory which contains modules each with a function). The functions have the same name as the file/module in which they live.
I would like to be able to access the functions as follows,
from mymodule.utils import a_function
Strangely however, sometimes I can import...
What are first steps creating a loadable DLL module extension for PHP to create native support for my own library on Windows?
Would it require re-compiling PHP on windows? What are the tools needed? I don't want to have to use exec and the command line.
...
Would what mentioned in the title be possible? Python module style that is. See this example for what I exactly mean.
index.php
<?php
use Hello\World;
World::greet();
Hello/World.php
<?php
namespace Hello\World;
function greet() { echo 'Hello, World!'; }
Would this be possible?
...
Hello! I am searching a Perl module to write (SMTP) and read (IMAP) e-mails. Which module out of the bunch would you suggest?
...
I have a problem with Flex module. I want to access url variables by this.loaderInfo.url, i call a function in createionComplete handler of module and sometimes it works and sometimes it doesn't. (Can't access... null). Any suggestions?
This function is called in creationComplete handler of module. And although it throws error window, t...
I’m having a lot of trouble understanding how to create a module that will add an extra button to the shopping cart page. I found lots of info on payment modules and stand-a-lone page modules, but nothing for this.
I simply need to add a button underneath the regular “Checkout” button that can post item data to another website. I’ve c...
I have lists of data such as
a = [1,2,3,4]
b = ["a","b","c","d","e"]
c = ["001","002","003"]
And I want to create new another list that was mixed from all possible case of a,b,c like this
d = ["1a001","1a002","1a003",...,"4e003"]
Is there any module or method to generate d without write many for loop?
...
I have a package with a few modules, each module has a class (or a few classes) defined within it. I need to get the list of all modules within the package. Is there an API for this in python?
Here is the file structure:
\pkg\
\pkg\__init__.py
\pkg\module1.py -> defines Class1
\pkg\module2.py -> defines Class2
\pkg\module3.py -> define...