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
4
votes
2 answers

Why Chunk files are generated ,when the "ng build --prod" command is isssued in angular 2 and above versions

Currently am implementing my User interface code using the advanced ui framework like an angular of version 2 and 4. When ever i want to deploy the code to the server i need to build the project by issuing the following command "ng build --prod" so…
4
votes
0 answers

How to read more chunks in a .wav file in R?

I am reading a .wav file that has been collected using an hydrophone (underwater acoustics instrument). So far I have downloaded the two packages: tuneR and Seewave. I use readWave in tuneR: > audio_file <-readWave("icListen_HF_test.wav") >…
Camille
  • 41
  • 2
4
votes
4 answers

Packing differently sized chunks of data into multiple bins

EDIT: It seems like this problem is called "Cutting stock problem" I need an algorithm that gives me the (space-)optimal arrangement of chunks in bins. One way would be put the bigger chunks in first. But see how that algorithm fails in this…
u149796
  • 1,788
  • 4
  • 14
  • 19
4
votes
2 answers

Java decompress GZIP stream sequentially

My Java program implements a server that should get a very large file, compressed using gzip, from a client over websockets and should check for some bytes pattern in the file content. The client sends the file chunks embedded inside a proprietary…
Eldad
  • 107
  • 1
  • 2
  • 9
4
votes
2 answers

RStudio: Disable output of a code in Source Window while writing RMarkdown Document

I recently updated my RStudio and while writing an R Markdown document in the Source Window, whenever I run a code in a chunk of the RMD, the output is shown in the source window itself in the following manner. It gets too messy when there are huge…
4
votes
1 answer

The best way to break generator into chunks

Can you help me to write this code that breaks generator yields into the chunks by 100 and save them into database more beautiful. $batchSize = 100; $batch = []; $i = 0; /** * @yield array $item */ foreach(itemsGenerator() as $item) { …
mikatakana
  • 503
  • 9
  • 22
4
votes
1 answer

Minecraft How are Chunk Sections stored

I am currently making a Minecraft chunk manipulation program, and I would like to know how Minecraft chunk sections are stored. From the Minecraft Wiki Article on how Minecraft Stores its chunks. Sections: List of Compound tags, each tag is a…
frogocomics
  • 41
  • 1
  • 5
4
votes
4 answers

Split flat array into chunks of n elements, then reverse the order within each chunk

I want to reverse an array by two elements in each step. If I have an array [11,12,13,14,15,16], I want to reverse first two elements [11,12] and then another two elements [13,14] etc. The final array should be [12,11,14,13,16,15]; My code is below:…
Roman
  • 1,118
  • 3
  • 15
  • 37
4
votes
1 answer

Laravel chunk() mistaken with array_chunk?

I'm working on a local project with Laravel 5. I'm trying to grab what could potentially be (or become) huge amounts of data. I'm doing so $tickets = Ticket::getResolvedTicketsBetween($start,$end)->chunk(200, function($chunkOfTickets){ …
Thaenor
  • 611
  • 1
  • 9
  • 28
4
votes
1 answer

What is the right way to invoke celery.task.chunks?

I am working on a parallel-able tasks with Python3 and celery. I like to divide it into several chunks, so those cost of communications over the network will be saved. However, the celery document does not reveal enough details on how to call the…
Hu Cao
  • 260
  • 4
  • 13
4
votes
3 answers

Return all possible combinations of a string when splitted into n strings

I made a search for stackoverflow about this but couldn't find a way to do it. It probably involves itertools. I want to find all the possible results of splitting a string, say the string thisisateststring into n (equal or unequal length, doesn't…
user3507230
  • 83
  • 2
  • 9
4
votes
2 answers

Writing memory to socket in chunks in C

I'm attempting to write memory contents to a socket in chunks. I can write files that are smaller than my buffer, but anything else and I'm in deep water. /* allocate memory for file contents */ char fileContents = malloc(sizeof(char)*filesize); /*…
Blair
  • 3,671
  • 4
  • 29
  • 40
4
votes
1 answer

How to flush chunks of arbitrary sizes in NodeJS

In a Node web server I want to flush HTML content at specific points as follows: 1st chunk: ... 2nd chunk: ... 3rd chunk: e.g.: var http = require('http'); http.createServer(function (req, res) { …
marcelduran
  • 251
  • 2
  • 8
4
votes
0 answers

Iphone: How to split NSData video file into chunks and upload the chunks one by one to the server?

I have been trying to split the video file into chunks and send the chunks to the server one by one. But i am not sure if the logic or the code i have written is right! If you could please help me with this. -(void)multipart:(NSData *)file…
Chiran
  • 183
  • 1
  • 5
  • 14
4
votes
1 answer

Python 3 and requests with a progressbar

I'm trying to download files using python requests. It worked in python 2.7, but not now. I'm really confused and there has to be a simpler answer. Since the files can be quite large, I really want a progressbar, and I'm using python procressbar to…
thabubble
  • 640
  • 1
  • 8
  • 17