search for: liner

Displaying 20 results from an estimated 713 matches for "liner".

Did you mean: line
2011 Mar 16
3
perl one-liner issue
I am trying to deduce the one liner for an rpm I am packaging to edit a php configuration file from within my spec. The line I am editing looks like: $conf['nagios_base'] = "/nagios/cgi-bin"; What are the escape requirements Perl needs from within the shell to search for this? As I have seen, the syntax is a mess...
2012 Apr 25
5
exec's onlyif parameter fails for a bash one-liner
I would like to ''exec'' an installation script ''onlyif'' an installation directory is empty. I tried using following bash one-liner however it didn''t work: <code> exec{$one_install_script: require => File[$one_install_script], onlyif => "[ \"$(/bin/ls -A $one_location)\" ] && exit 1 || exit 0" } </code> It failed with following error: <error> err: Fail...
2005 Nov 16
4
[OT] Witty one liners or computer related proverbs
Dear All, I need some witty computer related proverbs or one liners that some of have used in the past as footers for your emails for example. I particularly remember a PERL based transliteration joke/footer that when run in PERL produces a witty output.... This is to fix a problem internally created by an over zealous salesman at my company pinning up A4 she...
2010 Jul 03
5
text to html
input: http://pastebin.com/raw.php?i=MqPXZwc3 output: http://pastebin.com/raw.php?i=8QCkp4yv it will be a long day.. :D could someone please help with it? i have to make a "one liner" that get's the input, and gives the mentioned output.
2010 Apr 13
2
liner regression for multiple keys
...hat How could I manage multiple keys in input. Thanx in advance input a1 1 2.5 x a1 2 3.5 x a1 3 4.5 x a1 1 2.6 x a1 2 3.8 x b1 1 4.6 y b1 2 5 y b1 3 6 y b1 6 7 y desiredoutput a1 pvalue(LR) x b1 pvalue(LR) y -- View this message in context: http://n4.nabble.com/liner-regression-for-multiple-keys-tp1839105p1839105.html Sent from the R help mailing list archive at Nabble.com.
2005 Jul 25
2
A one-liner to create a 3-dim array
Hi, I would like to write a one-line R code to create a 3-dim array, B, of dimension (n,n,m) from a matrix, A, of dimension (m,n) such that the i-th element of the 3-dim array, B[, , i] is the outer product of the i-th row of A. Thanks for any help, Ravi. [[alternative HTML version deleted]]
2010 Mar 26
3
awk global replacement only after keyword
Trying to avoid a perl script which wouldn't be hard, but I am looking for an awk one liner that does a replacement, but only after it sees a key word on some line. Anyone know of that's easy to do? Thanks! jlc
2013 Apr 04
6
categorized complete list of R commands?
...ons that I had forgotten about and many functions that I never knew existed to begin with. (who knew there were bibtex facilities in R? obviously, everyone except me.) I wonder whether there is a complete list of all R commands (incl the standard packages) somewhere, preferably each with its one-liner AND categorization(s). the one-liner can be generated from the documentation. I am thinking one categorization for function area (e.g., "programming related" for, say, deparse; and "statistical model related" for lm; and another categorization for importance (e.g., like "...
2006 Feb 16
2
fitting non-liner curves
Dear Sir/Madam, I have two vectors say x<-c(0,0,2.73,3.42,3.95,4.26) and y<-c(0.0,0.5,1.20,1.90,2.6,3.3). I want to fit y as a function of x and get the equation.Do I have to use glm() ? Rangesh [[alternative HTML version deleted]]
2009 Apr 12
1
looking for one-liner for strsplit and regex
Hi, I have a line such as: myline <- " 0.100000 1.5000 0.6000 538 0.369404" and I would like to put the numbers into a vector. Some combination of tabs and spaces occur between the numbers. I tried: try1 <- strsplit(myline,"[[:blank:]]+") > try1 [[1]] [1] "" "0.100000" "1.5000"
2008 Jul 09
1
Need help with awk one-liner
This awk command pulls URLs from an apache config file, where $x is the config filename. awk '/:8008\/root/ {printf $3 "\t"}' $x The URL that is output by the script looks something like this: ajpv12://hostname.network.company.com:8008/root Is there a way to alter the output so it only shows "hostname" by itself? Do I need to pipe this through awk again to clean it
2017 Jun 16
2
"reverse" quantile function
Peter, thanks, very nice, this will work for me... could you also help with setting up the code to run the on liner "approx(sort(x), seq(0,1,,length(x)), q)$y" on the rows of a data frame using my example above? So if I cbind z and res,? df<-cbind(z,res) the "x" in your one liner would be the first 4 column values of each row and "q" is the last (5fth) column value of each row.....
2005 Aug 23
10
Creating a simple sum (or: I suck at blocks!)
...lose. Consider the following... results = Sample.find(:all) total_counter = results.each{|result| #Add together result.counter} I just want to simply iterate through the list and sum the counter field for each row into an aggregation. I could do it in a full for loop, but is there a nice one liner I''m missing? Thanks, Jeff
2006 Jan 24
7
formatting numbers with commas
...ot;).inject(c) do |t, e| iv, il = t[:value], t[:length] iv += '','' if il % 3 == 0 && il != 0 { :value => iv + e, :length => il + 1 } end r[:value].reverse! end Am interested in how many better ways there are to do it. Maybe even a one liner ... -- G. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/911fe8f8/attachment.html
2006 Sep 06
3
Dtrace Snooping
Dear dtrace Experts, I have seen some dtrace utilities like opensnoop and execsnoop etc. My interest is to write a simple script that can snoop the files which uses the 3 syscalls like open,create,unlink. I have gone through dtrace oneliners that can do the same : dtrace -n ''syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0));}'' dtrace -n ''syscall::creat*:entry { printf("%s %s",execname,copyinstr(arg0));}'' dtrace -n ''syscall::unlink*:entry { printf(&qu...
2002 Nov 16
1
shelling out to R for one command
I am developing a PHP script and want to use R to get the probability of a t-value. This just requires that I issue one R statement and output the result. The problem I am having is that R will accept batch input but I am not sure that it will accept a "one-liner" (i.e., "/usr/local/bin/R qt(.975, 20)" does not work but you get the idea). Is there a way to pass R a one-liner without having to put it into a batch file and submit it to R as a batch job. Regards, Paul Meagher -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2017 Jun 16
0
"reverse" quantile function
Peter, thanks, very nice, this will work for me... could you also help with setting up the code to run the on liner "approx(sort(x), seq(0,1,,length(x)), q)$y" on the rows of a data frame using my example above? So if I cbind z and res, df<-cbind(z,res) the "x" in your one liner would be the first 4 column values of each row and "q" is the last (5fth) column value of each row...
2023 Oct 12
4
if-else that returns vector
Hi, Following expression returns only the first element ifelse(T, c(1,2,3), c(5,6)) However I am looking for some one-liner expression like above which will return the entire vector. Is there any way to achieve this?
2007 Aug 24
4
Turning a logical vector into its indices without losing its length
I have the code below which gives me what I want for temp based on logvec but I was wondering if there was a shorter way ( i.e : a one liner ) without having to initialize temp to zeros. This is purely for learning purposes. Thanks. logvec <- c(TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,FALSE) temp<-numeric(length(invec)) temp[invec]<-which(invec) temp [1] 1 0 0 4 0 0 7 0 obviously, the code below doesn't work. temp <-...
2011 Mar 04
3
S. function calculating x +- y
Hello, I am looking for an elegant one-liner for the following operation: x <- rnorm(10) y <- runif(10) c(mean(x)-mean(y), mean(x)+mean(y)) I thought about apply(data.frame(x, y), 2, mean) but I don't know how to apply the +- operation on the result of apply. Thanks, *S* -- Sascha Vieweg, saschaview at gmail.com