search for: nlines

Displaying 20 results from an estimated 119 matches for "nlines".

Did you mean: lines
2010 Jul 29
1
[PATCH] Reflow logic to make it easier to follow
...47; - if (!(action_flags & USE_OVERLAY)) { - ppix = NVGetDrawablePixmap(pDraw); + if (action_flags & USE_OVERLAY) { + if (pNv->Architecture == NV_ARCH_04) { + NV04PutOverlayImage(pScrn, pPriv->video_mem, offset, + id, dstPitch, &dstBox, 0, 0, + xb, yb, npixels, nlines, + src_w, src_h, drw_w, drw_h, + clipBoxes); + } else { + NV10PutOverlayImage(pScrn, pPriv->video_mem, offset, + uv_offset, id, dstPitch, &dstBox, + 0, 0, xb, yb, + npixels, nlines, src_w, src_h, + drw_w, drw_h, clipBoxes); + } + + pPriv-&...
2003 Nov 10
3
Reading an upper triangular matrix
...data file is delimited by white space. (Part of) script to read: myfile <- file("Paises.dat", open="r") # opens a connection which stays open until closed by close(myfile) name <- readLines(con=myfile, n=1) varnames <- scan( myfile, what=character(0), nlines=1 ) stopifnot( length(varnames) == 21 ) Paises <- matrix(0, 21, 21) colnames(Paises) <- varnames rownames(Paises) <- varnames for (i in 1:21) { temp <- scan(myfile, what=list("a", rep(0,22-i) ), nlines=1, sep="") Paises[i, i:21] <- temp[[2]] } I get...
2015 Jun 11
2
[PATCH] New API: btrfs_filesystem_show_all
...uot;); + ADD_ARG (argv, i, "show"); + ADD_ARG (argv, i, NULL); + + r = commandv (&out, &err, argv); + if (r == -1) { + reply_with_error ("%s", err); + free(out); + return NULL; + } + + lines = split_lines (out); + if (!lines) + return NULL; + + size_t nlines = count_strings (lines); + for (i = 0; i < nlines; i++) + if (strstr(lines[i], "\tdevid")) + nr_filesystem_show++; + + guestfs_int_btrfsfsshow_list *ret = NULL; + ret = malloc(sizeof *ret); + if (ret == NULL) { + reply_with_perror ("malloc"); + return NULL...
2013 May 03
0
[PATCH] nouveau_xv: Avoid reading off the end of the source image on NV50+
...7dc2bc..8eafcf0 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -1095,7 +1095,7 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, NVCopyNV12ColorPlanes(buf + s2offset, buf + s3offset, dst, line_len, srcPitch2, - nlines, line_len); + nlines, npixels); } } else { for (i = 0; i < nlines; i++) { @@ -1161,7 +1161,7 @@ CPU_copy: NVCopyNV12ColorPlanes(buf + s2offset, buf + s3offset, map, dstPitch, srcPitch2, - nlines, line_len); + nlines, npix...
1999 Nov 10
1
read.table problems
Yesterday I asked for help about read.table with a CSV file. I received the following help. As always many thanks for the prompt responses. Now I load my csv file in a text editor ( pfe) and delete all spaces. My original mail is at the end. From: Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> Do you have spaces before the commas in your file? > Yes, number , space,
1999 Nov 10
1
read.table problems
Yesterday I asked for help about read.table with a CSV file. I received the following help. As always many thanks for the prompt responses. Now I load my csv file in a text editor ( pfe) and delete all spaces. My original mail is at the end. From: Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> Do you have spaces before the commas in your file? > Yes, number , space,
2014 Mar 12
3
Lectura de texto
..., Me gustaria leer el texto que se encuentra en http://dl.dropboxusercontent.com/u/9601860/txt.txt He intentado txt <- 'http://dl.dropboxusercontent.com/u/9601860/txt.txt' r <- scan(txt) #Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : # invalid multibyte string at '<ff><fe>M' r <- read.table(txt, header = FALSE) #Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = # character(0L)) : invalid multibyte string at '<ff><fe>M' Esta es mi sessionInf...
2007 Jul 20
1
Column-mean-values for targeted rows
Hi all, I'm handling massive data.frames and matrices in R (30000 x 400). In the 1st column, say, I have 0s and 1s indicating rows that matter; other columns have probability values. One simple task I would like to do would be to get the column mean values for signaled rows (the ones with 1) As a very fresh "programmer" I have build a simple function in R which should not be very
2014 Mar 12
2
Lectura de texto
Hola Jorge, Algo pasa con el fichero... He abierto el link de Dropbox, y he salvado el texto como "txt.txt" en local. Pruebo a abrirlo en R y...: > scan(file="txt.txt")Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got 'ÿþM'> getwd()[1] "C:/Users/xIs12136/Downloads" Pruebo a abrirlo con "vi"... y: El 12 de marzo de 2014, 9:58, Jorge I Velez <jorgeivanvelez@gmail.com>escribió: > Gracias, Miguel. &g...
2014 Mar 12
2
Lectura de texto
...aunque el resultado es muy extraño... Aunque puede ser también debido al tipo de conexión que estoy usando en este momento... > txt <- 'http://dl.dropboxusercontent.com/u/9601860/txt.txt'> r <- scan(txt)Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got 'ÿþM'> rr <- readLines(txt, n=-1, encoding="UTF-8")There were 50 or more warnings (use warnings() to see the first 50)> head(rr,30) [1] "\xff\xfeM" "" "" ""...
2012 Oct 20
1
Error: not 'a real'?
..."numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric") # Error: Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, (from #2) : scan() expected 'a real', got '894.6' How is '894.6' not 'a real [number]'? Thanks for the ensuing enlightenment or punishment... Best, Brian
2015 Jun 11
0
Re: [PATCH] New API: btrfs_filesystem_show_all
...i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s", err); > + free(out); > + return NULL; > + } > + > + lines = split_lines (out); > + if (!lines) > + return NULL; > + > + size_t nlines = count_strings (lines); > + for (i = 0; i < nlines; i++) > + if (strstr(lines[i], "\tdevid")) > + nr_filesystem_show++; The logic here should match what is being done later, i.e. using STRPREFIX. > + guestfs_int_btrfsfsshow_list *ret = NULL; > + ret = mal...
2013 Jul 19
4
Error read.csv
...Tengo un archivo CSV con 1.200.000 registros separados por ";" y cuando quiero abrirlo me da el siguiente error: form<-read.csv("Usr1.csv" , sep=';' , na.strings = "NA", header=T) Mensajes de aviso perdidos In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : entrada inválida encontrada en la conexión de entrada 'Usr1.csv' Alguien me puede dar una pista? Saludos -- Eduardo [[alternative HTML version deleted]]
2015 Feb 13
3
[PATCH v4 0/2] add btrfs_balance_status and btrfs_scrub_status
v4: - add reply_with_error when nlines < 1 - remove `i == X' tests. v3: - rebase on upstream - fix some comments v2: - add check for the length of lines[] - the code parsing 'btrfs scrub -R status' output is changed into a loop Hu Tao (2): New API: btrfs_balance_status New API: btfs_scrub_status daemon...
2007 Dec 12
4
Importing Large Dataset into Excel
...lowing line of code: > newborn<-read.table("newborn edit.csv", header=T, sep=",") where "newborn edit.csv" is the name of the file. Unfortunately, I'm getting back the following error message: "Error in scan(file,, what, nmax, sep, dc, quote, skip, nlines, na.string, : line 528 did not have 44 elements" As far as I can tell, line 528 of the spreadsheet table does have the same number of elements as the other rows - by chance can this error message mean anything else? Also, is there an easier way to import data from R into Excel using a singl...
2015 Nov 10
3
Problema con la lectura de datos
...quot;character", rep("numeric",38)), strip.white=FALSE, dec = ",") Pero genera este error (y no se a que se deba, esto es, porque necesito calcular la matriz de correlaciones y me dice que los valores no son numericos): Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got 'ND' Gracias mil. [[alternative HTML version deleted]]
2015 Feb 11
0
[PATCH v3 1/2] New API: btrfs_balance_status
..._btrfsbalance * +do_btrfs_balance_status (const char *path) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *path_buf = NULL; + CLEANUP_FREE char *err = NULL; + char *out; + int r; + guestfs_int_btrfsbalance *ret; + char **lines; + size_t nlines; + const char *errptr; + int erroffset; +#define N_MATCH 2 + int ovector[N_MATCH * 3]; + pcre *re = NULL; + + path_buf = sysroot_path (path); + if (path_buf == NULL) { + reply_with_perror ("malloc"); + return NULL; + } + + ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, &...
2007 May 12
7
[Bug 10927] New: segmentation fault in NVUploadToScreen, called from exaPutImage
...in ProcShmDispatch (client=0x2b7f8c4c7bc0) at shm.c:1114 #6 0x0000000000449ffa in Dispatch () at dispatch.c:457 #7 0x000000000043320b in main (argc=7, argv=0x7fff2585fb88, envp=<value optimized out>) at main.c:445 The offending line nv_exa.c:351: memcpy(pNv->AGPScratch->map, src, nlines*src_pitch); Apparently this memcpy is inlined as: 0x00002b7f8689c237 <NVUploadToScreen+295>: rep movsb %ds:(%rsi),%es:(%rdi) %ds = 0x0 %es = 0x0 %rsi = 0x2b7f8e29a000 %rdi = 0x2b7f8c4c7bc0 src = 0x2b7f8e293440 pNv->AGPScratch->map = 0x2b7f8c4c1000 Computing from these, SEGV trig...
2015 Feb 13
0
[PATCH v4 1/2] New API: btrfs_balance_status
..._btrfsbalance * +do_btrfs_balance_status (const char *path) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *path_buf = NULL; + CLEANUP_FREE char *err = NULL; + char *out; + int r; + guestfs_int_btrfsbalance *ret; + char **lines; + size_t nlines; + const char *errptr; + int erroffset; +#define N_MATCH 2 + int ovector[N_MATCH * 3]; + pcre *re = NULL; + + path_buf = sysroot_path (path); + if (path_buf == NULL) { + reply_with_perror ("malloc"); + return NULL; + } + + ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, &...
2006 Apr 26
2
help in R
Hi, I cant understand where I am going wrong.Below is my code.I would really appreciate your help. Thanks. > genfile<-read.table("c:/tina/phd/bs871/hw/genfile.txt",skip=1) > > #read in SNP data > snp.dat <- as.matrix(genfile) > snp.name <-