Questions tagged [readable]

65 questions
1
vote
0 answers

Multer - chunk argument not valid

I have a problem with stream.pipeline() await pipeline( req.file.buffer, fs.createWriteStream( `${__dirname}/../client/public/profil/${fileName}` ) ) I have this error TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must…
user10863293
  • 770
  • 4
  • 11
  • 32
1
vote
1 answer

UnhandledPromiseRejectionWarning: ReferenceError: ReadableStream is not defined

I'm trying to convert an arraybuffer of a file to a readable stream in Typescript but when i'm trying to create a new ReadableStream variable I obtain this error: UnhandledPromiseRejectionWarning: ReferenceError: ReadableStream is not defined What…
user16560224
1
vote
1 answer

"Failed to pipe. The response has been emitted already" when reading a stream (nodejs)

So my code is supposed to read some lines from a CSV file, convert them to an array of JSON objects, and return that array. To read the file as a stream, I am using got, and then using it in fast-csv. In order to return the resulting array, I put…
1
vote
1 answer

How to change a color of table's caption when knitting?

I was wondering whether there is an easy way to change the colour of the flextable table caption without the use of CSS? --- title: "Test" output: html_document: highlight: tango theme:…
yuliaUU
  • 1,581
  • 2
  • 12
  • 33
1
vote
1 answer

Mock ReadableStream

Consider following code: fetch("/").then(response => { const reader = response.body.getReader(); const decoder = new TextDecoder(); let res = 0; return reader.read().then(function processResult(result) { if (result.done) { return…
Qwertiy
  • 19,681
  • 15
  • 61
  • 128
1
vote
0 answers

Node.js: How to read data from stream using .read()

Model: The user selects a mp4 file from his mobile on a static page hosted by a node.js express server on the same network, the file stream is received by busboy in the same server. Now the file stream has to be read in parts/segments/buffers and…
1
vote
2 answers

readable stream on data event losing first/last character from chunk

I am using ssh2-sftp-client for nodeJS to connect to sftp server and get a file But I've meet a problem, when are more chunks than one, the data is not received correctly, it loses one character between chunks: ex.: file on sftp has 'some string…
1
vote
1 answer

why read(1) function call two times in readable event in node js?

There are one file 'foo.txt' where 'koushik' is written. code:- var fs = require('fs'); var rr = fs.createReadStream('foo.txt'); rr.on('readable', function() { console.log('readable:', rr.read(1)); }); rr.on('end', function() { …
Koushik Mondal
  • 865
  • 7
  • 15
1
vote
0 answers

How to read the google maps search result page

Is there a way or any google API to read the search result of google map from Java ? I want to read the markers on the google map page byt providing the search result url link to java ? Please let me know. Regards, Shridhar
1
vote
1 answer

Java NIO packet sticking

I have a server with NIO realization with selector. The realization is rather simple: selector.select(); Set keys = selector.selectedKeys(); for (SelectionKey key : keys) { if (!…
Luo
  • 445
  • 2
  • 10
1
vote
2 answers

Search only directories with permission -find (Bash 4.2)

I have a command on AIX that finds files containing a phrase and are older than a certain age. however my report is full of permission denied errors. I would like the find to only search files that it has permission for. I have command for linux…
Grushton94
  • 603
  • 1
  • 7
  • 17
1
vote
0 answers

Listening to Node.js stream 'readable' event causing source not to be read

var stream = require('stream'); var util = require('util'); function SourceReader(source){ stream.Readable.call(this); this._buffer = ''; this._source = source; source.on('readable', function(){ console.log('got here'); …
Josh Wang
  • 353
  • 3
  • 12
1
vote
1 answer

Find files in not readable directory LINUX

How to find all files in non readable directory For example directory /home is locked perm 40700 But I can read all files in this directory like /home/index.php and etc How to list all files in this directory? I tryed ls and find function do not…
Dmitrij Holkin
  • 1,995
  • 3
  • 39
  • 86
1
vote
1 answer

Nodejs Readable streams, parsing binary data, preserving order

Using latest nodejs... Got a binary coming from mongodb (field within a document). Means I will be processing multiple binary payloads concurrently. Data is a media file (h264) made up of slices (nal units). Each slice is delimited. Using a…
Matthew Campbell
  • 1,864
  • 3
  • 24
  • 51
0
votes
0 answers

Make an FloatReadable like 1,2K

So i want to get an readable Float like this: float_to_readable(1026.5632) The Output should be: 1,6K another example is: float_to_readable(1000026.5632) The Output should be: 1.6M I already have a function that converts 10.582 to 10.6: format(num,…
TRC Loop
  • 1
  • 2