I have to custom module for Scilab. After reading of documentation, I try to use toolbox_skeleton, but I don't know how I can load this module into Scilab: I press "load", select "loader" of module from "contrib" folder, and type c_sum(3,5) into window of Scilab - then I will get error "Unknown variable c_sum". Where have I made a mistake?
The normal step:
call the builder.sce
and then the loader.sce
Related
I'm exploring R modules https://cran.r-project.org/web/packages/modules/vignettes/modulesInR.html and I wondered if there is a way to check that a function is being run inside a module (mind, not just defined but running inside the module).
My use case is that I have a script that sometimes I source as a normal R script and sometimes as a module with modules::use(). I would like to wrap the package loading in this script to use library if called normally and modules::import() if run into the module.
Found a way in how modules override the library function:
environmentName(environment()) == "modules:root"
to be called in the environment where a function is defined, not in a function itself.
I'd like to add a command to Atom to quickly change the spell-checking language. To do so I use the given code in the init.coffee script. I found the right spot to change the config data.
My problem is that Atom (or spell-check) does not recognize the change. How do I tell the package: "the config changed, please refresh yourself"?
atom.commands.add 'atom-workspace', 'Spell-DE', ->
atom.config.settings['spell-check'].locales = ['de-DE']
sc = atom.packages.getLoadedPackage('spell-check')
# sc.PLEASE_READ_SETTINGS_AGAIN(); <<< what could this be?
The change is recognized by Atom once I opened the spell-check-settings.
Okay, got it: atom.config.set('spell-check.locales', ['de-DE']); is doing the trick.
I am inside a directory structure where I have:
--train.lua
--utils
--sample.lua
train.lua has got an import line saying require('sample'), however when running the code Torch7 complains with the message
"module 'sample' not found:No LuaRocks module found for sample
I have tried changing instead to require('utils.sample'), but it still crashes. How to overcome this error?
I do not have the problem you described. Could you post the code in the files?
My three files:
main.lua
require 'utils.sample'
help()
utils/sample.lua
function help()
print("help")
end
I using th main.lua to run the code
I'am trying to load an image in Julia using the package Images and the function load.
julia> load("/train/1.bpm")
ERROR: FileIO.File{FileIO.DataFormat{:UNKNOWN}}("/train/1.bpm") couldn't be recognized by FileIO.
I am using Julia 0.4.2.
How can I solve the problem?
Thanks a lot
According to the error statement: FileIO.DataFormat{:UNKNOWN}}("/train/1.bpm"), the file extension is wrong. (bpm used instead of bmp).
Use the correct file format (julia> load("/train/1.bmp")) and you'll be good.
I'm trying to compile one of my HTML5 project using Google Closure. I'm recieving several errors that I don't know how to solve. In fact, it's the same error but for different variables.
Here the errors messages:
variable window is undeclared
variable event is undeclared
variable console is undeclared
variable Audio is undeclared
These variables are Javascript built-in variables. If I compile this same project directly in command-line, it works. But, in my case, I need to compile this project using an ant file (build process). My ant build script is using the same jar file that I use in command-line. With the option warnings="verbose", it doesn't work. If I remove it, it works. If I would like to use the option warnings-"verbose", what I have to do? Please explain me the difference.
Could somebody help me please?
Thank you!
The option --warnings=verbose sets the compiler to "ninja mode"; i.e. every single variable in your file should be declared (an annotated!) correctly. For example, the window variable is unknown to the compiler, but Closure has an implementation of window (independent of the platform used). If your variables are included in some other file, use externs. If yo still want to use Verbose mode without the 'undeclared variable' error, use the flag --jscomp_off=checkVars