search for: paren

Displaying 20 results from an estimated 360 matches for "paren".

Did you mean: parent
2001 Aug 02
1
gsub() and parenthesis symbols
...;)","q","w","e") ## Use gsub to replace `q' with `A' > gsub("q","A",string) [1] "A" "w" "e" "(" ")" "A" "w" "e" # Works fine ## Replace `(' [open-parenthesis symbol] with `A' > gsub("(","A",string) Error in gsub(pattern, replacement, x, ignore.case, extended) : invalid regular expression ## But NB! -- Replace `)' [close parenthesis symbol] with `A' > gsub(")","A",string) [1] "q&qu...
2006 May 31
1
trouble with boot ()
Dear members, I am trying to use boot () to compute the distributions of a statistic of a data set. The statistic is defined in the following code: eds<-function(x) { r<-cor(x) paren<-1-abs(r)/2 denom<-sum(sum(paren)+0.5) desvio<-sd(x) media<-mean(x) a<-desvio/media nom<-sum(a*(sum(paren)+0.5)) eds_abs<-nom/denom print(eds_abs) } I need to calculate the nonp...
2007 Jun 18
1
Automatic paren/bracket closing in 2.5.0?
Hello, Just upgraded to 2.5.0, and found that R now includes an rparen (right parentheses) or rbracket whenever I enter in an lparen. While I can see the use of this function, it doesn't mesh well with my personal style of using R (e.g., using the up arrow, adding an rparen, jumping to the beginning of the line, and then wrapping a summary, for instance). Some 10...
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
...ub user 1 (String.length user - 1)) >>>> + else >>>> + (Unix.getpwnam user).pw_uid in >>>> + debug "setting owner of %s to %d:root" file uid; >>>> + Unix.chown file uid 0 >>> >>> Hmm, doesn't this need parens around the 'then' clause? >> >> Ding ding ding, it does not :) >> >> I'm happy you asked. (I was so frustrated to discover this *once again* >> that I almost sent a separate tirade about it to the list! So I guess >> now I'll use the opportunity....
2020 Sep 08
2
Re: [libnbd PATCH 1/2] generator: Refactor handling of closures in unlocked functions
...t; > diff --git a/generator/C.ml b/generator/C.ml > index deb77fa..280b319 100644 > --- a/generator/C.ml > +++ b/generator/C.ml > @@ -99,16 +99,17 @@ let rec name_of_arg = function > | UInt64 n -> [n] > > let rec print_arg_list ?(wrap = false) ?maxcol ?handle ?types ?(parens = true) > + ?(closure_mark) args optargs = You don't need parens around here, you can just write ?closure_mark > + if parens then pr "("; > + if wrap then > + pr_wrap ?maxcol ',' > + (fun () -> print_arg_list' ?handle ?types ?closure...
2018 Mar 17
1
Inappropriate parens fix for Logic.Rd
...peof() and "class" refers to what is returned by class() in R. When typeof(x) is "double", class(x) is "numeric". When typeof(x) is "integer", class(x) is "integer". -------------------------------------------- > wrote: Subject: Inappropriate parens fix for Logic.Rd To: r-devel at r-project.org Date: Saturday, 10 March, 2018, 8:23 AM Logic.Rd is one of the files changed in r74363. Before change: ? \item{x, y}{raw or logical or \sQuote{number-like} vectors (i.e., of types ? ? \code{\link{double}} (class \code{\link{numeric}}), \code{\link{...
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
..._string (String.sub user 1 (String.length user - 1)) > >> + else > >> + (Unix.getpwnam user).pw_uid in > >> + debug "setting owner of %s to %d:root" file uid; > >> + Unix.chown file uid 0 > > > > Hmm, doesn't this need parens around the 'then' clause? > > Ding ding ding, it does not :) > > I'm happy you asked. (I was so frustrated to discover this *once again* > that I almost sent a separate tirade about it to the list! So I guess > now I'll use the opportunity...) > > The sho...
2007 Feb 02
7
Coming Soon...
...actual.should_not equal(expected) #equal, in this example, is a method that returns an expectation matcher, which Ruby passes to #should, which then interacts with the matcher to evaluate whether or not the expectation is met and report accordingly. All args to expectation matchers will require parens, and blocks must be expressed using curly braces. This has to do with ambiguity of arguments and operator precedence. Don''t worry, if you do the wrong thing you''ll get a warning. More on this below. == Why this change? The current syntax is supported by some very clever use of...
2010 Jul 30
4
Ferret installation
...nstalling ./ferret-0.11.6.gem: ERROR: Failed to build gem native extension. C:/Ruby191/bin/ruby.exe extconf.rb creating Makefile make gcc -I. -IC:/Ruby191/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby191/include/ruby-1 .9.1/ruby/backward -I/C/Ruby191/include/ruby-1.9.1 -I. -O2 -g -Wall -Wno-paren theses -D_FILE_OFFSET_BITS=64 -o analysis.o -c analysis.c gcc -I. -IC:/Ruby191/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby191/include/ruby-1 .9.1/ruby/backward -I/C/Ruby191/include/ruby-1.9.1 -I. -O2 -g -Wall -Wno-paren theses -D_FILE_OFFSET_BITS=64 -o api.o -c api.c gcc -I. -IC:/Ruby191/includ...
2006 Jun 26
4
why can''t I call this without parentheses?
...:prefix = "post_", :author, :title or even this: legacy_fields {:prefix = "post_"}, :author, :title but this works fine: legacy fields({:prefix = "post_"}, :author, :title) The signature looks similar to things like link_to and url_for, which can be called without parentheses. Any idea of what I''m missing? thanks, Rob -- http://www.robsanheim.com
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
...then >> + int_of_string (String.sub user 1 (String.length user - 1)) >> + else >> + (Unix.getpwnam user).pw_uid in >> + debug "setting owner of %s to %d:root" file uid; >> + Unix.chown file uid 0 > > Hmm, doesn't this need parens around the 'then' clause? Ding ding ding, it does not :) I'm happy you asked. (I was so frustrated to discover this *once again* that I almost sent a separate tirade about it to the list! So I guess now I'll use the opportunity...) The short answer is that, if "Unix.chown&q...
2006 Aug 25
2
rakefile DEBUG changes
We use an environment variable to control whether or not to enable a debug build of wxRuby. This was called simply DEBUG but I have renamed it to WXRUBY_DEBUG. I also added a second environment variable, WXRUBY_VERBOSE, which turns on extensive console output that can help debug memory problems. It prints a message any time an object is created, destroyed, etc. This used to only be an option in
2016 Jan 28
1
[PATCH] python: stop using parens-less print in tests
print "" is no more available in Python 3, and print(...) is available since Python 2.7; as one of the tests was using print(), use this form everywhere so the tests can run fine with Python 3. --- python/t/820-rhbz912499.py | 18 +++++++++--------- python/t/910-libvirt.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/t/820-rhbz912499.py
2002 Jul 19
3
Automatic adjustment of axis ranges
...aven't been able to figure out, however. 1) Getting the last N lines of the command history into a vector of strings. I thought something like: last.commands<-history(N) would work, but no go. There doesn't seem to be a file that I can tail, either. 2) Finding continuation lines by parenthesis matching. I thought this would be easy, but split() doesn't seem to do what the help file says, viz. "...in particular if split has length 0, x is split into single characters." Trying the following: split("abc","") I get: [[1]] [1] "abc" not:...
2016 Jan 05
0
deparse with parentheses for SUBSET
...versions through at least R-3.2.2. o Fixed a number of bugs in the deparser that are illustrated by the following, which produce incorrect output as noted, in R Core versions through at least R-3.2.2: deparse(parse(text="`+`(a,b)[1]")[[1]])# Omits necessary parens deparse(quote(`[<-`(x,1)),control="S_compatible") # unmatched " and ' deparse(parse(text="a = b <- c")[[1]]) # Puts in unnecessary parens deparse(parse(text="a+!b")[[1]]) # Puts in unnecessary parens deparse(parse(...
2011 Dec 11
2
ToDo List Notation
I just joined this mail-list, so I apologize if this has been discussed before, but: Has anyone suggested adding a "todo list notation" to Markdown? Specifically, I'd like to see an open paren, brace or bracket, at the start of a line, followed by a space, a "/", or a "X", followed by a matching closing paren, brace, or bracket, followed by a space and more text recognized as a "todo" list item where the space means it's an open item (not started), where...
2009 Nov 06
2
mini_magick - 2 clarifications
...to the following: image = MiniMagick::Image.from_file("input.jpg") image.resize "100x100" image.write("output.jpg") I''m assuming that image.resize is a method. Is there any significance to the fact that the argument for that method is not enclosed in parenthesis while the other are? Examples seem to be consistent -- way too consistent for coincidence. 2. When I resize an image, is there a way to do that operation in place so that I don''t have to write it out to a different file, conceptually like: image.resize! "100x100"...
2014 Oct 29
2
Unexpected behavior of identical() with language objects
I ran into this and found the result very surprising: identical( quote({ a }), quote({ a }) ) # FALSE It seems related to curly braces. For example, parens work fine: identical( quote(( a )), quote(( a )) ) # TRUE Is this expected behavior? I can't seem to find anything in the help for identical that relates to this. -Winston
2016 Jan 04
1
deparse with parentheses for SUBSET
...or me: diff -u -r A/src/main/deparse.c B/src/main/deparse.c --- R-devel 2/src/main/deparse.c 2015-08-09 18:09:04.000000000 +0200 +++ R-devel/src/main/deparse.c 2016-01-04 16:15:09.000000000 +0100 @@ -971,7 +971,11 @@ print2buff(")", d); break; case PP_SUBSET: + if ((parens = needsparens(fop, CAR(s), 1))) + print2buff("(", d); deparse2buff(CAR(s), d); + if (parens) + print2buff(")", d); if (PRIMVAL(SYMVALUE(op)) == 1) print2buff("[", d); else With this applied, the output is more consistent: > substi...
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
...g.is_prefix user "+" then > + int_of_string (String.sub user 1 (String.length user - 1)) > + else > + (Unix.getpwnam user).pw_uid in > + debug "setting owner of %s to %d:root" file uid; > + Unix.chown file uid 0 Hmm, doesn't this need parens around the 'then' clause? > (* Get the local user that libvirt uses to run qemu when we are > * running as root. This is returned as an optional string > @@ -205,8 +199,8 @@ let error_if_no_ssh_agent () = > (* Create the directory containing inX and outX sockets. *) >...