search for: getlength

Displaying 16 results from an estimated 16 matches for "getlength".

Did you mean: setlength
2003 May 07
2
Extracting the longest entry
I have a matrix with NAs and want to extract the longest column. > is.matrix(foo) [1] TRUE > dim(foo) [1] 2000 75 > GetLength <- function(x) {length(na.omit(x))} > junk <- apply(foo, 2, GetLength) > junk [1] 1004 512 432 523 691 396 607 838 [9] 730 389 388 445 609 333 637 1024 [17] 1163 823 718 466 799 459 701 833 [25] 456 549 376 728 539 384 348 708 [33] 516 439 667 1115 711...
2017 Feb 19
5
RFC: Adding llvm::ThinStream
...e class that provides read-only access to data. The interface is: virtual Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef<uint8_t> &Buffer) const = 0; virtual Error readLongestContiguousChunk(uint32_t Offset, ArrayRef<uint8_t> &Buffer) const = 0; virtual uint32_t getLength() const = 0; An important distinction between `ThinStream` and existing stream implementations is that API encourages implementations to be *zero copy*. Instead of giving it a buffer to write into, it just returns you a slice of the existing buffer. This makes it *very efficient*. Similar to `Ar...
2004 Nov 04
0
Running an exe from within a wined exe
.../////////////// CString commandLine; commandLine = "\""+workingDirectory+"\\jpsec.exe\" -i "+textNameFolder+" -urng "+resultFile+""; // Converts CString to 'const char*' to further covert to LPSTR const char* comLine; int n = commandLine.GetLength(); comLine = commandLine.GetBuffer(n); // Start the child process. if( !CreateProcess(NULL, //Example "\"JPSecWin32\\jpsec.exe\" -i .\\..\\..\\JPSecWin32\\lenna_enc.jp2 -o .\\..\\..\\JPSecWin32\\temp5.jp2 -k .\\..\\..\\JPSecWin32\\keys.txt -dec", // No module name (use comma...
2010 Mar 08
0
Difficulties in add cover art to FLAC file
...AC__metadata_object_picture_set_mime_type( picture, "image/jpeg", true ); FLAC__metadata_object_picture_set_description( picture, (FLAC__byte*)"", true ); CFile picfile; picfile.Open( L"I:\\1.jpg", CFile::modeRead | CFile::shareDenyWrite); ULONGLONG dwLength = picfile.GetLength(); LPSTR pData = new char[static_cast<unsigned int>(dwLength+1)]; picfile.Read(pData, static_cast<UINT>(dwLength)); FLAC__metadata_object_picture_set_data( picture, (FLAC__byte*)pData, dwLength, true ); delete [] pData; I did some tests and it seemed that the error was caused by the F...
2019 Aug 12
1
ALTREP package interaction with testthat
...n is called even when I'm trying to serialize a non-ALTREP object. Here is an example ``` context("altrep") length_func<-function(x){ return(length(x)) } setAltClass(className = "test", classType = "real") setAltMethod(className = "test", getLength = length_func) testData = runif(10) myAltrep = makeAltrep("test", testData) test_that("Auto serialize", { browser() A = 10 A_serialized=serialize(A,NULL) B = new.env() B_serialized=serialize(B,NULL) }) ``` There is nothing but two variables A and...
2004 Oct 24
2
[LLVMdev] Some question on LLVM design
...sing/lowering pass, you would say > if (MallocInst *MI = dyn_cast<MallocInst>(I)) { Not true at all. Consider the "llvm/IntrinsicInst.h" header, which lets us write stuff like this, today: if (MemCpyInst *MCI = dyn_cast<MemCpyInst>(I)) MCI->getSource() MCI->getLength() ... The one advantage that mallocinst has over using an intrnisic is that instructions can have different return values in various parts of the program (e.g., you can write 'malloc int' instead of '(int*)malloc(4)'). -Chris -- http://llvm.org/ http://nondot.org/sabre/
2007 Dec 12
0
New version of seqinR released
...the socket connection are taken automatically when necessary from the last opened bank. The size of local lists of sequences is reduced by about a third now as compared to the previous version. o New dataset m16j and waterabs added. o Generic functions getAnnot(), getFrag(), getKeyword(), getLength(), getLocation(), getName(), getSequence() and getTrans() have gained methods to handle objects from class list and class qaw. o Functions getAttributsocket() and getNumber.socket() are now deprecated, a warning is issued. o There is a new appendix in which all the examples protected by a...
2007 Dec 12
0
New version of seqinR released
...the socket connection are taken automatically when necessary from the last opened bank. The size of local lists of sequences is reduced by about a third now as compared to the previous version. o New dataset m16j and waterabs added. o Generic functions getAnnot(), getFrag(), getKeyword(), getLength(), getLocation(), getName(), getSequence() and getTrans() have gained methods to handle objects from class list and class qaw. o Functions getAttributsocket() and getNumber.socket() are now deprecated, a warning is issued. o There is a new appendix in which all the examples protected by a...
2019 Jul 18
0
ALTREP wrappers and factors
...trep object\n") lengthFunc <- function(x) return(length(x)) getPtrFunc <- function(x, writeable) return(x) setAltClass(className = "test", classType = "real") setAltMethod(className = "test", inspect = inspectFunc) setAltMethod(className = "test", getLength = lengthFunc) setAltMethod(className = "test", getDataptr = getPtrFunc) A = runif(6) A_alt = makeAltrep(className = "test", x = A, *attributes = list(dim = c(2, 3))*) ``` *RESULT* ``` > .Internal(inspect(A_alt)) @0x000000002385ac00 14 REALSXP g0c0 [NAM(1),ATT] Altrep object...
2008 Feb 04
5
WinXP/x64 - MFC CFile objects leak parent directory handles
...167 { if (mstrFilePath.IsEmpty()) 168 return ""; 169 _my_TRY 170 CFile file(mstrFilePath, CFile::modeRead | CFile::shareDenyNone); 171 int size = (int)file.GetLength(); 172 CString text; 173 file.Close(); 174 text.Format("%d", size); 175 return text; 176 _my_REPORT_EXCEPTION_ALL 177 return "ERROR!!!!!"; 178 } When the programm using this method is run on...
2004 Oct 23
0
[LLVMdev] Some question on LLVM design
On Fri, Oct 22, 2004 at 03:18:00PM +0200, Marc Ordinas i Llopis wrote: > I'm currently looking at LLVM as a possible back-end to a dynamic > programming system (in the tradition of Smalltalk) we are developing. Neat! > I have read most of the llvmdev archives, and I'm aware that some > things are 'planned' but not implemented yet. We are willing to > contribute
2017 Feb 22
2
RFC: Adding llvm::ThinStream
...y access to > data. The interface is: > virtual Error readBytes(uint32_t Offset, uint32_t Size, > ArrayRef<uint8_t> &Buffer) const = 0; > virtual Error readLongestContiguousChunk(uint32_t Offset, > ArrayRef<uint8_t> &Buffer) const = 0; > virtual uint32_t getLength() const = 0; > > An important distinction between `ThinStream` and existing stream > implementations is that API encourages implementations to be *zero copy*. > Instead of giving it a buffer to write into, it just returns you a slice of > the existing buffer. This makes it *very eff...
2019 Jul 17
2
ALTREP wrappers and factors
Hello, I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function. I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the
2012 Mar 16
0
Wine release 1.5.0
...s in predicate expressions for XSLPattern queries. comctl32: Update thumb position on WM_MOUSEMOVE instead of deferring it. comctl32: Update thumb position on autopage instead of deferring it. msxml3: Implement IMXAttributes::addAttribute(). msxml3: Implement ISAXAttributes::getLength() for MXAttributes. msxml3: Implement ISAXAttributes_getQName() for MXAttributes. msxml3: Implement getValue() for MXAttributes. msxml3: Implement getType() for MXAttributes. msxml3: Implement getIndexFromQName() for MXAttributes. po: Update Russian translation....
2020 Feb 16
0
Wine release 5.2
...e: Add some E_* defines. crypt32: Implement CryptBinaryToStringW(HEXRAW). tzres: Add Haiti Time Zone. Derek Lesho (5): mfplat: Make functionality of GetMediaTypeHandler more clear. msctf: Always provide a context when from GetBase/Top. mfplat: Implement IMFByteStream::GetLength() for file streams. mfplat: Implement IMFByteStream::SetCurrentPosition() for file streams. mfplat/tests: Add more comprehensive media source tests. Dirk Niggemann (1): krnl386.exe: Make CallProcEx32W16 clear CPEX_DEST_CDECL flag before looping over arguments. Dmitry Timoshkov (...
2004 Oct 22
6
[LLVMdev] Some question on LLVM design
Hi everybody, I'm currently looking at LLVM as a possible back-end to a dynamic programming system (in the tradition of Smalltalk) we are developing. I have read most of the llvmdev archives, and I'm aware that some things are 'planned' but not implemented yet. We are willing to contribute the code we'll need for our project, but before I can start coding I'll have to