Nautilus-actions-new equivalent FileManager-Actions? - nautilus

Is there a nautilus-actions-new equivalent for filemanager-actions, in order to create a new action from a command line ?
Nautilus-actions-new command returns command not found.
Nothing appears in the documentation on this subject (Help/Content...).
Thanks

The equivalent command for nautilus-actions-new is:
/usr/libexec/filemanager-actions/fma-new

Related

ie.waitforvalue command doesn't work properly

I tried to run this code but it doesn't work properly. It got stuck on line 3 and gives error "timeout, element not found".
ie.open g1ant.com
window ‴✱internet explorer✱‴
ie.waitforvalue script document.getElementsByClassName("footer_stuff").length expectedvalue 1
dialog ‴Page loaded!‴
ie.close
It's because "footer_stuff" class doesn't exist in g1ant.com page. Did you mean "footer"? Try the following code instead.
ie.waitforvalue script document.getElementsByClassName("footer").length expectedvalue 1

How to fix problem with Latex in R-Markdown?

I have an R Markdown issue, I am trying to write my thesis on it, when I run the code to generate the pdf, the following message is shown:
! LaTeX Error: Command \counterwithout already defined.
Or name \end... illegal, see p.192 of the manual.
Error: Failed to compile THESIS.tex. See THESIS.log for more info.
Execution halted
Any suggestion?
Found your error on TeX exchange, and the solution seems to be to define the following variables:
\let\counterwithout\relax
\let\counterwithin\relax
Before the package chngcntr (if you are using it).
(Credit to the original answer post)

lua - invalid argument type

I am a newbie to Lua. Currently getting the following error message:
invalid argument type for argument -model (should be the model checkpoint
to use for sampling)
Usage: [options] <model>
I am sure it is something pretty easy to solve, but cannot manage to find the solution.
The 'model' is a file lm_checkpoint_epoch50.00_2.7196.t7, which is in the directory
/home/ubuntu/xxx/nn/cv
I am running the program from the parent directory (/home/ubuntu/xxx/nn)
I have tried out the following options to run the program (from one directory above the one the model is saved):
th sample.lua - model lm_chelm_checkpoint_epoch50.00_2.5344.t7
th sample.lua lm_chelm_checkpoint_epoch50.00_2.5344.t7
th sample.lua /cv/lm_chelm_checkpoint_epoch50.00_2.5344.t7
th sample.lua - /cv/model lm_chelm_checkpoint_epoch50.00_2.5344.t7
Also, the program has a torch.CmdLine() object where :argument equals '/cv/lm_checkpoint_epoch50.00_2.7196.t7'. The program prints the parameters, so that you see the following output on the screen:
Options
<model> /cv/lm_checkpoint_epoch50.00_2.7196.t7
so it finds a value for argument 'model', which is picked up from the .lua file, not the parameter in the command line. This file is a valid mode.
Pretty lost, hope someone relates to this issue. Thanks.
found the issue - it was a bug as smhx suggested. I inadvertently changed the source code from:
require 'torch'
cmd = torch.CmdLine()
cmd:argument('-model','model checkpoint to use for sampling')
Note that there is no argument in the source code. To:
cmd:argument('-model','/cv/model lm_chelm_checkpoint_epoch50.00_2.5344.t7'
'model checkpoint to use for sampling')
So the argument must be passed through the command line, not the source code. With parameters, it is different - you can include them in the source code.
So if I change back the source code and run the following from the command line:
th sample.lua cv/lm_chelm_checkpoint_epoch50.00_2.5344.t7
it works.

Idl readcol function, using delimeter without syntax error

Im trying to use idl to read a file, so im using the readcol command. However, in my file i use | as a delimiter, but continually get syntax errors. Heres my latest attempt:
readcol,'kcorrins.txt',uband, gband, rband, iband, zband, $
ubanderr, gbanerr, rbanderr, ibanderr, zbanderr, adjredshift, $
SKIPLINE=1, DELIMITER=|
could someone post an example of the proper syntax for using the delimiter in this way?
You need to quote the delimiter:
readcol,'kcorrins.txt',uband, gband, rband, iband, zband, $
ubanderr, gbanerr, rbanderr, ibanderr, zbanderr, adjredshift, $
SKIPLINE=1, DELIMITER='|'

Vim: How do I tell where a function is defined? (

I just installed macvim yesterday and I installed vim latex today.
One of the menu items is calling a broken function (TeX-Suite -> view).
When I click on the menu-time it makes this call:
:silent! call Tex_ViewLatex()
Question: Where can I find that function? Is there some way to figure out where it is defined?
Just for curiosity sake I removed the silent part and ran this:
:call Tex_ViewLatex()
Which produces:
Error detected while processing function Tex_ViewLaTeX:
line 34:
E121: Undefined variable: s:viewer
E116: Invalid arguments for function strlen(s:viewer)
E15: Invalid expression: strlen(s:viewer)
line 39:
E121: Undefined variable: appOpt
E15: Invalid expression: 'open '.appOpt.s:viewer.' $*.'.s:target
line 79:
E121: Undefined variable: execString
E116: Invalid arguments for function substitute(execString, '\V$*', mainfname, 'g'
)
E15: Invalid expression: substitute(execString, '\V$*', mainfname, 'g')
line 80:
E121: Undefined variable: execString
E116: Invalid arguments for function Tex_Debug
line 82:
E121: Undefined variable: execString
E15: Invalid expression: 'silent! !'.execString
Press ENTER or type command to continue
I suspect that if I could see the source function I could figure out what inputs are bad or what it is looking for.
Use the :verbose prefix command:
:verbose function Tex_ViewLaTeX
In the second line of output (just above the function's body) is the location of where the function was defined.
I installed gVim 7.2 on windows and latex-suite, and miktex too
I tried what you said, after compile and view, I can view the dvi files
The error message seemed like to indicate it's the view's problem
The document for latex-suite said the viewer for Macintosh is not set, maybe it's where the problem lies
I think you can try to set a few variables in your .vimrc file, to set up the proper viewing app for PDF files
And the source code for Tex_ViewLaTeX is here:
http://www.tedpavlic.com/research_related/tpavlic_masters_thesis/compiler.vim
By the way, I also installed MacVim on my Macbook Pro, however I never used vim for LaTeXing, because I find TextMate and its latex bundle is much superior than MacVim, you'll definately like it
One way to search would be to do a grep or vimgrep on directory tree where you thought the source file was located. Search for 'function Tex_ViewLatex' or 'function! Tex_ViewLatex'.
I believe in the usual install it would be in a .../ftplugin/latex-suite/compiler.vim file, as part of the latex-suite plugin. There are a couple ftplugin directories, so make sure you get right one (one is in tree of main vim install and other may be off your home .vim directory.
It seems there is a bug with the Tex_ViewLatex function on OS X. Check here for some info:
http://comments.gmane.org/gmane.comp.editors.vim.latex.devel/775
Put this in your .vimrc, solved the problem for me.
let g:Tex_ViewRule_pdf = 'open -a Preview.app'

Resources