packages

How do I dynamically discover packages from a partial namespace in perl?

限于喜欢 提交于 2019-12-08 12:32:58
问题 I have a directory structure that looks like: Foo::Bar::Baz::1 Foo::Bar::Baz::2 etc Can I list the packages from something like: use Foo::Bar::Baz; Thanks! Edit: Made it more clear what the modules are. 回答1: Just to be clear, are you looking at random packages in random Perl code? Or for Perl modules , e.g. "a/b/c/d1.pm" with module "a::b::c::d1"? In either case, you can not use a single "use" statement to load them all. What you need to do is to find all the appropriate files, using either

Java Import Package (to package above present work directory)

十年热恋 提交于 2019-12-08 09:40:05
问题 how do I import package (to package above present work directory) in Java? here is the directory structure: Coba.java import halo.*; public class Coba { public static void main(String args[]) { Orang org = new Orang(); System.out.println(org.a); } } Orang.java package halo; // I can't import kabar.*; since it's above present work directory public class Orang { public int a; public Orang() { this.a = 1; } public void haha() { /* i want to: Tes t = new Tes(); System.out.println(t.b); */ } } Tes

r package development imports not loaded

好久不见. 提交于 2019-12-08 09:12:57
问题 Hi I am new to writing R packages. I try to import dependencies via: Imports: forecast, ggplot2, dplyr When I click Build & Reload in Rstudio my library is built successfully. However when checking if the dependencies are loaded for real Rstudio tells me that they are not. In my namespaces file I only have exportPattern("^[[:alpha:]]+") Is it a problem that there is no specific import of namespaces like in https://github.com/robjhyndman/forecast/blob/master/NAMESPACE What is wrong? 回答1: You

Importing multiple versions of the same Module/Package for Benchmarking

99封情书 提交于 2019-12-08 09:04:31
I am working on a Package, this package using BinDeps to pull in some C source code, and compile some binaries. My julia module then mostly just exposes ccalls to those functions. Now there are about 5 different options for how the C source can be compiled, with various different optimisations turned on. And to go with them various other changes that are triggered by by a constant that is written to the deps.jl that is output by BinDeps. So I would like to import each of the different builds of my package as different modules, so I can benchmark them using BenchmarkTools.jl . Currently, my

Where does R (for Windows) store packages before it installs them?

最后都变了- 提交于 2019-12-08 08:42:53
问题 I am aware of where the installed packages go! ICMY, it's nicely outlined here: Where does R store packages? However, I do wonder where R caches the ZIP files (assuming Windows) it downloads from CRAN, i.e. prior to installing them in the library. Any help most appreciated! 回答1: From the documentation for install.package : destdir (parameter, default=NULL) : directory where downloaded packages are stored. If it is NULL (the default) a subdirectory downloaded_packages of the session temporary

import of packages does not work - probably version conflict

China☆狼群 提交于 2019-12-08 08:03:44
问题 After a long period where things went OK (I mean here I could pip install packages and then use them in a jupyter notebook with the import statement), I ran into multiple problems recently. I think this happened when I upgraded my anaconda install from Continuum Analytics (though not sure) I get error reports for basic imports like pandas or matplotlib like --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-3

Python Relative Imports and Packages

喜夏-厌秋 提交于 2019-12-08 07:29:18
问题 I'm trying to create a package and I have a tree structure that looks like this: dionesus/ setup.py dionesus/ __init__.py dionesus.py Dionesus.py has a class called Dionesus. The init .py is empty. How do I import the class Dionesus without having to specify the top level folder? I have to do: import dionesus d = dionesus.dionesus.Dionesus() I would like import statements to look like: import dionesus d = dionesus.Dionesus() 回答1: First, you can still use an absolute import, just using the

How do I install Perl's Parse::Lex for ActivePerl?

喜你入骨 提交于 2019-12-08 07:27:06
问题 Hi I am using ActivePerl 5.10.1 on Win XP. I can't find Lex package from the PPM list. Can I install other package to enable Parse::Lex? 回答1: I do believe ParseLex is in the base set of packages in PPM. Try: > ppm install ParseLex from the command line? You'll need to set the http_proxy environment variable if behind a proxy, you can do it for that session only by issuing this before the command above: > set http_proxy=http://host:port/ e.g. > set http_proxy=http://10.100.9.10:8080/ If using

dpkg remove to stop processes

天涯浪子 提交于 2019-12-08 02:13:51
问题 I am currently running Ubuntu 12.04. I've created a debian package that currently installs successfully and starts three new processes. I have also made these three processes start at runtime by placing the following script inside /etc/init.d: # This example is from http://www.debian-administration.org/article/Making_scripts_run_at_boot_time_with_Debian # Also used http://wiki.debian.org/LSBInitScripts/ ### BEGIN INIT INFO # Provides: bleh # Required-Start: $remote_fs $syslog $network #

Eclipse | Packge turns into a directory, breaks my whole project

 ̄綄美尐妖づ 提交于 2019-12-07 16:02:30
问题 So the issue i am having is extremely weird. When i have a preexisting project set up (and am moving it from computer A to computer B). I make a new project and import it the normal way. It is very, very package based and there are around 30-40 packages. Two packages are made into directories instead of packages. For example, instead of org.project1.tools.stuff it is org/project1/tools/stuff. I have checked the code, at the top it goes package org.project1.tools.stuff and then the imports and