我正在用 R 语言学习一门统计学课程,虽然它在很多方面都非常出色,但在某一方面却非常烦人。也就是说,如果我有嵌套括号,并且我想将函数包裹在某个东西周围,则右括号会被覆盖,除非我不只是在它之外。
bla(xxx) # start here
blu(bla(xxx*) # Type blu, move with Ctrl+> to the star and type ')'
blu(bla(xxx)) # What I expect
blu(bla(xxx) # What I get
Run Code Online (Sandbox Code Playgroud)
有办法关掉它吗?我在设置中找不到选项,只有其他页面上的一些正则表达式黑客想法。
提前致谢!
为了解决我的(有点特定的)问题,我发现我必须使用 Django ArrayField:https ://docs.djangoproject.com/en/2.1/ref/contrib/postgres/fields/#arrayfield
我已经在我的models.py文件中将它定义为
Bla = ArrayField(
models.IntegerField(),
size=4
null=True
)
Run Code Online (Sandbox Code Playgroud)
但是我如何真正将信息放入其中?理想情况下,一个完整的 python 列表,以及一个地方。
一旦它在那里,我该如何取回它?都在 python 端,也在.html文件中?
PS:我不认为问题的整个背景是相关的,所以我现在省略了它,但如果有人感兴趣,我当然会提供所有必要的细节。
我正在研究一个项目(明天到期:/),当我尝试在我自己编写的函数上使用单纯形算法时遇到问题.它没有用,经过5个小时的搜索和实验,我发现了以下内容:
当我将函数传递给子例程时,此函数不能包含任何数组参数.这是真的?因为在我应该使用它的代码中,它显然应该工作.
我正在使用ifort编译器.请参阅下面的最小示例,我基本上从http://malayamaarutham.blogspot.de/2006/02/passing-function-names-as-arguments-in.html获取.
! Author : Kamaraju S Kusumanchi
! Email : kamaraju@gmail.com
! Last edited : Sun Feb 5 2006
!
! Sample program demonstrating the use of external attribute. This program
! shows how to pass function names as arguments in Fortran 90 programs.
!
! Compilation and execution steps
! $gfortran passing_functions.f90 -o passing_functions
! $./passing_functions
! beta = 5.500000
! beta = 1.500000
!
! I would appreciate any comments, feedback, criticism, mistakes, errors etc., …Run Code Online (Sandbox Code Playgroud) arrays ×2
django ×1
fortran ×1
function ×1
parentheses ×1
postgresql ×1
python ×1
r ×1
rstudio ×1
subroutine ×1