Displaying 20 results from an estimated 708 matches for "arr".
2006 Aug 24
2
Passwordless SSH messes with escaped spaces
...#!/bin/sh
# v0.1 2006-08-17
# Only allows "rsync --server --sender" but retains any escaped spaces in
the arguments.
#
cmd="${SSH_ORIGINAL_COMMAND}"
[ ! "${cmd:0:24}" = "rsync --server --sender " ] && exit 127
myself=${0##*/}
set $cmd
declare -a arr
i=0
for a in $*; do
arr[$i]="${arr[$i]:+${arr[$i]} }$1"
if [ "${1%\\}" = "$1" ]; then
i=$(($i+1))
else
arr[$i]="${arr[$i]%\\}"
fi
shift 1
done
echo "$(date '+%F %T') ${arr[@]}" >> /var/log/${myself}.log
exec \
${ar...
2010 Jan 08
3
strange behavior of R
Hi
I observed an interesting behavior of R. Can you find where is the bug, or
it is not a bug but made deliberately.
- Hide quoted text -
> arr = c(); #defined the empty array
> a= c("x1", "x2");
> b = c("y1", "y2");
> arr = rbind(arr,a); #row bind the first character array -a
> arr = rbind(arr,b); # row bind the second character ar...
2016 Dec 06
2
2.2.27 panic file mail-index-map.c: line 549 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0)
Hi,
On 06-Dec-16 10:10, Aki Tuomi wrote:
> Alternatively if you could try and print the args array in cmd_search?
>
> f 14
> p args[0]
> p args[1]
> ...
> until NULL
My hand got sore at first 100 and they are below. I will mail you the
binary and core in seperate mail.
(gdb) f 14
#14 0x08058219 in cmd_search (cmd=0x85e1800) at cmd-search.c:42
42 ret = imap_sea...
2017 Jan 19
1
System Time Jumps During Boot on CentOS 7
Hi All,
Just noticed a funny time jump on a testing CentOS 7 VM. Specifically
the system time jumps around by a few hours during system boot. The
below is a selection from /var/log/messages during boot:
Jan 19 12:49:57 arr-data-dev chronyd[716]: Frequency -0.829 +/- 0.007
ppm read from /var/lib/chrony/drift
Jan 19 12:49:57 arr-data-dev polkitd[720]: Started polkitd version 0.112
Jan 19 12:49:57 arr-data-dev systemd: Starting D-Bus System Message Bus...
Jan 19 12:49:57 arr-data-dev systemd: Starting GSSAPI Proxy Daemo...
2016 Dec 06
2
2.2.27 panic file mail-index-map.c: line 549 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0)
On 06.12.2016 09:32, Toni Mattila wrote:
> Hi,
>
> On 05-Dec-16 20:28, Toni Mattila wrote:
>> Panicing stopped when all index files where deleted.
>
> It happens again in same user account, so rebuilding indexes didn't
> fix it.
>
> Here's bt full instead of just bt:
> #0 0x001d4402 in __kernel_vsyscall ()
> No symbol table info available.
> #1
2018 Jun 08
4
Subsetting the "ROW"s of an object
...t;>>> I suspect this will have suboptimal performance since the TRUEs will
>>>> get recycled. (Maybe there is, or could be, ALTREP, support for
>>>> recycling)
>>>> Hadley
>>
>>
>> AFAICS, it is not an issue. Taking
>>
>> arr <- array(rnorm(2^22),c(2^10,4,4,4))
>>
>> as a test case
>>
>> and using a function that will either use the literal code `x[i,,,,drop=FALSE]' or `eval(mc)':
>>
>> subset_ROW4 <-
>> function(x, i, useLiteral=FALSE)
>> {
>>...
2012 May 29
4
[LLVMdev] Aliasing Question
I just have two questions regarding the following small piece of code:
if (var > start*end) {
arr[var] = arr[var-1];
}
else {
arr[var] = arr[var+1];
}
1. Why does llvm put the address computation in the branched blocks instead
of the common dominator?
2. Why does the AliasAnalysis return MayAlias instead of MustAlias?
Thanks.
-------------- next part --------------...
2016 Apr 29
2
Semi-OT: awk
This is odd, and annoying. CentOS 6, current. Here's my awk script:
{
room = substr($0, 48, 10);
arr[$2,room,$1] = $0;
}
END {
for ( i in arr ) {
for ( j in arr[i] ) {
for ( k in arr[i][j] ) {
print arr[i][j][k];
}
}
}
}
And when I run it, it complains
awk -f awksort proplist7
awk: awksort:7: for ( j in arr[i] ) {
awk: awksort:7:...
2010 Jan 16
3
Comparing dates in dataframes
I have two data frames. One (arr) has all arrivals to an airport for a
year, and the other (gw) has the dates and quarter hour of the day when
the weather is good. arr has a Date and quarter hour column.
>names(arr)
[1] "Date" "weekday" "hour" "month" "minut...
2007 Aug 17
1
[BioC] function to find coodinates in an array
The arr.ind in the which function does the job very nicely!!!
Thank you everyone for the suggestions!
Ana
>
>
>---- Mensaje Original ----
>De: marc_schwartz at comcast.net
>Para: m_olshansky at yahoo.com
>Asunto: Re: [BioC] [R] function to find coodinates in an array
>Fecha: Thu, 16...
2018 Jun 08
0
Subsetting the "ROW"s of an object
Hmmm, yes, there must be some special case in the C code to avoid
recycling a length-1 logical vector:
dims <- c(4, 4, 4, 1e5)
arr <- array(rnorm(prod(dims)), dims)
dim(arr)
#> [1] 4 4 4 100000
i <- c(1, 3)
bench::mark(
arr[i, TRUE, TRUE, TRUE],
arr[i, , , ]
)[c("expression", "min", "mean", "max")]
#> # A tibble: 2 x 4
#> expression...
2011 Oct 20
0
Apply approx() to an array and eventually a list of arrays
Hello all,
I'm struggling to grasp how I might use lapply() instead of looping to
run approx() on a list consisting of multiple arrays - each of equal
dimension.
But simpler than that, I haven't been able to successfully apply
approx() to an array, unless I loop through the third dimension and
extract the matrix. See example code below...
Any suggestions will be gratefully received.
Thanks
Michael
################### COD...
2013 Nov 07
1
problem with interaction in lmer even after creating an "interaction variable"
Dear all,
I have a problem with interactions in lmer. I have 2 factors (garden and
gebiet) which interact, plus one other variable (home), dataframe arr. When
I put:
/
lmer (biomass ~ home + garden:gebiet + ( 1|Block), data = arr)/
it writes:
/Error in lme4::lFormula(formula = biomass ~ home + garden:gebiet + (1 | :
rank of X = 28 < ncol(X) = 30/
In the lmer help I found out that if not all combination of the interaction
are realized, lme...
2018 Jun 08
3
Subsetting the "ROW"s of an object
....
>
> H.
>
> On 06/08/2018 10:29 AM, Hadley Wickham wrote:
>> I suspect this will have suboptimal performance since the TRUEs will
>> get recycled. (Maybe there is, or could be, ALTREP, support for
>> recycling)
>> Hadley
AFAICS, it is not an issue. Taking
arr <- array(rnorm(2^22),c(2^10,4,4,4))
as a test case
and using a function that will either use the literal code `x[i,,,,drop=FALSE]' or `eval(mc)':
subset_ROW4 <-
function(x, i, useLiteral=FALSE)
{
literal <- quote(x[i,,,,drop=FALSE])
mc <- quote(x[i])
nd <...
2011 Mar 26
1
bwplot [lattice]: how to get different y-axis scales for each row?
...seq_len(100), sep=""),
groups=paste("group=", seq_len(6), sep=""),
methods=paste("method=", seq_len(2), sep=""),
attr=paste("attribute=", seq_len(3), sep=""))
set.seed(1)
data <- rexp(prod(dim))
arr <- array(data=data, dim=dim, dimnames=dimnames)
arr[,2,,] <- arr[,2,,]*10
arr[,4,2,2] <- arr[,4,2,2]*10
z <- abs(sweep(arr, 3, 1))
df <- as.data.frame.table(z, responseName="error")
## box plot
bwplot(error ~ methods | attr * groups, data=df,
as.table=TRUE, notch=T...
2020 Mar 22
2
Legalized selection DAG differs for the same code and flags
Hello, LLVM Devs.
I'm compiling following code using my own backend:
int foo() {
char arr[4];
arr[0] = 0xAA;
arr[1] = 0xBB;
arr[2] = 0xCC;
arr[3] = 0xDD;
return *(int*)&arr[0];
}
The memory operation in "return" statement ends up transformed into 4-byte
load in the initial DAG:
load<(dereferenceable load 4 from %ir.7, align 1, addrspace 1)> t31,...
2006 Aug 11
2
Array#chunk method, maybe someone will find this useful
class Array
# break an array up into <size> chunks
def chunk(size=1)
return self if self.empty?
raise ArgumentError if !size.kind_of? Integer
y = self.length.divmod(size)
rows = (y[1] > 0) ? y[0] + 1 : y[0]
arr = Array.new(rows)
(0...rows).each do |i|
arr[i] = self...
2006 Jun 15
1
Compact sums in functions definitions
I'm trying to make more compact the definition
of a function as for example:
f <- function(x) 2/x+3/x
by simply defining the array of coefficients
arr = c(2,3)
and setting:
g <- function(x) sum((arr/x))
Everything seems to work fine because the values returned
by f and g result coincident for different values of their
argument, but when I try to plot the function g using:
x = seq(-1,1,.01)
plot(x,g(x))
I receive th...
2008 Jun 12
1
Data.matrix fail to convert data.frame into matrix
...o work.
__ BEGIN__
dat <- read.table("mydata", comment.char = "!" , na.strings = "null");
# Select n-genes by random sample
# n = 1
nosamp <- 1
geneid <- sequence(nrow(dat))
geneid.samp <- sample(geneid,nosamp)
geneid.samp
gexp<- dat[geneid.samp,]
gexp.arr <- data.matrix(gexp, rownames.force = NA)
print(is.matrix(gexp.arr))
print(gexp.arr)
__END__
Yielding this output:
__BEGIN__
> print(is.matrix(gexp.arr))
[1] TRUE
> print(gexp.arr)
V1 V2 V3 V4 V5 V6 V7 V8
10354 803.1 1107.8 431.6 349.8 386.7 646.3 744...
2018 Feb 28
1
Missed opportunity in the midend, unsigned comparison
Hi everybody, I see a missed optimization opportunity in LLVM that GCC
catches and I'd love to hear community's input.
Here's the original C code:
1 char arr[2];
2 char *get(unsigned ind) {
3 if (ind >= 1) {
4 return 0;
5 }
6 return &(arr[ind]);
7 }
The variable `ind` is unsigned so, based on the comparison, if it is not
greater or equals to one, than it is must be equal to zero. GCC understands
that `ind` equals to zero at line...