Questions tagged [chunks]

A chunk is a fragment of information which is used in many multimedia formats

A chunk is a fragment of information which is used in many multimedia formats, such as PNG, IFF, MP3 and AVI.

Each chunk contains a header which indicates some parameters (e.g. the type of chunk, comments, size etc.) In the middle there is a variable area containing data which are decoded by the program from the parameters in the header. Chunks may also be fragments of information which are downloaded or managed by P2P programs. In distributed computing, a chunk is a set of data which are sent to a processor or one of the parts of a computer for processing. For example a sub-set of rows of a matrix.

901 questions
3
votes
4 answers

R reshape, restructure dataframe by chunks

I am trying to reshape a dataframe: Currently it looks like this: ID | Gender |A1 | A2 | A3 | B1 | B2 | B3 ID_1 | m | 3 | 3 | 3 | 2 | 3 | 2 ID_2 | f | 1 | 1 | 1 | 4 | 4 | 4 I want to have something like: ID | Gender | A1 |…
Elisa
  • 215
  • 1
  • 3
  • 11
3
votes
2 answers

What does `load` do with chunk as function in Lua

There is load function that compiles chunk if chunk is string. But i don't understand, what does it do with function. They said: If chunk is a function, load calls it repeatedly to get the chunk pieces. Each call to function must return a string…
DarkKill
  • 31
  • 1
3
votes
0 answers

Stream Chunks data to Rtmp server using ffmpeg with nodejs?

const ondata = (chunk) => { console.log(chunk) //Giving - Buffer 00 00 00 1c 66 74 79 70 64 61.......... Streaming(chunk,"rtmps://live-api-s.facebook.com:443/rtmp/FB-108963845678778") //Streaming function is given below in the next…
3
votes
2 answers

Scrollbar for output chunk in Quarto

I would like to plot multiple plots from a chunk and add a scrollbar to the output of that chunk. I see here that this could be done for Code Overflow, but I am not sure how to scroll the output instead of adding all the plots below each other like…
Quinten
  • 35,235
  • 5
  • 20
  • 53
3
votes
1 answer

Do we have ChunkExecutionContext similar to StepExecutionContext in Spring Batch?

Spring Batch Version: 2.1.8 We want to do something after each chunk is written, and set some data inside a context which is valid only for the chunk. This data is then used inside ChunkListener's afterChunk method. We can use StepExecutionContext…
Ramesh
  • 3,841
  • 5
  • 22
  • 28
3
votes
2 answers

Is there a way to get progress information whan a chunk is running in Rmarkdown?

I have a Rmarkdown document with a number of chunks. Each of them is doing a simulation inside a loop. A simulation can take anywhere from a few minutes to 20 minutes or so. I would like to keep track of when a loop is finished. However, the usual…
Wolfgang Rolke
  • 795
  • 4
  • 16
3
votes
1 answer

Divide too long text in similar chunks considering punctuation

I have a list of strings that have to be not more than X characters. Each string can contain many sentences (separated by punctuation like dots). I need to separate longer sentences than X characters with this logic: I have to divide them into the…
Paolo Magnani
  • 549
  • 4
  • 14
3
votes
1 answer

How to clone a NodeJS stream?

I need to somehow clone a readstream in nodeJS. That is if I have a readStream I need two copies of it stream1, stream2. Where I can read both the streams stream1 and stream2 individually. How can I do that cause as far as I know you cant readily…
Mayank Patel
  • 346
  • 3
  • 18
3
votes
0 answers

Webpack 5 SplitChunksPlugin not generating chunk files

I am currently updating an Angular 2 project written in Typescript with ES5 and Webpack 1 to utilize Webpack 5. To solve problems with cachebusting, in the original instance the project has a webpack.config shown below to generate a json file that…
Ron B.
  • 73
  • 6
3
votes
1 answer

Entry point in a webpack common chunk

My webpack configuration has a "common" chunk that's used by multiple entry points. In addition to containing code used by multiple entry points, I'd like this to also call a function on load. I tried making a "common" entry point with the same name…
FTWinston
  • 1,019
  • 10
  • 16
3
votes
1 answer

How to handle stream in Angular HTTPClient

I have a backend (Spring Boot) API that writes data chunks to the response. I am trying to read that from my Angular code. What I expected was to receive chunks of data from the server. However the get method of httpClient does not return anything…
user1223879
  • 123
  • 3
  • 13
3
votes
3 answers

Splitting a string into chunks by numeric or alpha character with JavaScript

I have this: var str = A123B234C456; I need to split it into comma-separated chunks to return something like this: A,123,B,234,c,456 I thought a regular expression would be best for this, but I keep getting stuck. Essentially, I tried to do a…
Paul
  • 1,527
  • 2
  • 16
  • 24
3
votes
1 answer

How to split joined array with delimiter into chunks

I have array of strings const arr = ['some', 'word', 'anotherverylongword', 'word', 'yyy', 'u'] const joined = arr.join(';') I want to get array of chunks where joined string length is not greater than 10 for example output would be: [ …
user3075373
  • 44
  • 1
  • 4
  • 19
3
votes
1 answer

Webpack: split some entries to chunks, but others - don't

Is it possible to have one webpack dev server that's configured with multiple entry points (there are multiple pages on the site), each with a different configuration? Specifically, I want one entry (the page's JS code) to be split into chunks, but…
Barak
  • 2,416
  • 2
  • 15
  • 10
3
votes
1 answer

R Notebook/Markdown does not save chunk plots using "fig.path = " chunk option

I'm running an analysis in an R Notebook and I would like all plots created in R chunks to be saved as individual PDF files in addition to appearing in the .nb.html notebook output. The problem The problem I'm having is that, when the notebook is…
Leo
  • 187
  • 1
  • 9