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

Some array elements missing from newly chunked, different string length element array

I am trying to convert a string array into new string array, changing the word count of each elements by appending sibling items accordingly. But the problem I am having is some part of previous array is not converting as required. Here is my code…
Madushan Perera
  • 2,568
  • 2
  • 17
  • 36
-2
votes
3 answers

Merge, chunk, then transpose and flatten data from multiple indexed arrays

I have three arrays: $a = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'a10']; $b = ['b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'b10']; $c = ['c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10']; I want to combine these…
-2
votes
1 answer

File upload in chunks using Angular 4

Is there any directive available in Angular4/Angular2, which supports file upload in chunks?
-2
votes
1 answer

How to add a Chunk at an absolute position

I am creating PdfPTable, PdfPCell and a Paragraph consisting of Chunks. I want to add the chunks to a page at a specific coordinate (absolute position).
vijay
  • 15
  • 6
-3
votes
2 answers

Split 1d array into chunks so that row counts never deviate by more than 1

I want to split an array into rows as evenly as possible, obeying a minimum count per row constraint so that row counts are as close as possible to the minimum and the difference between different row counts is never more than 1. In other words, the…
Aditya Pratama
  • 657
  • 1
  • 8
  • 21
-3
votes
2 answers

How would I split a list of tuples into chunks

I have a list that looks something like this: weather_history=((year,month,day),precip,tmin,tmax) I need to split it into one-year chunks where each chunk is a list with one years worth of data please help! all_years_data: List[Weather_List] =…
-3
votes
2 answers

Counting occurrences of a word in chunks in python (list comprehension)

I am very very new to programming so my apologies if this is going to be too dumb. I am trying to count all the occurrences of a word by chunks and then I need to plot those results. My text is Pride and Prejudice and I am trying to find how…
Lexi20
  • 1
-3
votes
2 answers

split array of objects into three seperate array based on a property

I have a array of objects with property of id and size. Sum of objects size equals to 78 and I want to split this objects by three array. But I want to split possibly equal sum of size (~ 78/3 +-). I have a this array of objects, [ {'id': '1',…
-3
votes
3 answers

Merge random elements of array/split into chunks

How can I split array into chunks with some special algorithm? E.g. I need to shorten array to the size of 10 elements. If I have array of 11 elements, I want two next standing elements get merged. If I have array of 13 elements, I want three…
Alex F
  • 183
  • 2
  • 14
-3
votes
5 answers

How should one loop over two elements of a Python list at a time while building a new list?

Let's say I have a list of numbers and that I want to "extend" that list to beyond a certain number of elements. How should I extend the list by adding elements that are respectively the mean of the preceding and following element? numbers = [1, 2,…
d3pd
  • 7,935
  • 24
  • 76
  • 127
-3
votes
1 answer

java code to split text file into chunks based on chunk size

i need to split the given text file into equally sized chunks and store them into an array. The input is a set of many text files in same folder. Im using the following code for this: int inc = 0; File dir = new File("C:\\Folder"); File[] files…
Mano Prathibhan C
  • 488
  • 1
  • 11
  • 38
-3
votes
1 answer

Frame range into chunks

How to make certain frame range (ie. 1-100) break into 4 equal frame ranges (like 1-25, 26-50, 51-75, 75-100 or anything similiar). I need first and last digit from every chunked frame range.
Mateusz Wójt
  • 109
  • 2
  • 15
-4
votes
2 answers

What can I do using Python built-ins to successfully process a massive .txt file?

I have a project where I need to read data from a relatively large .txt file that contains 5 columns and about 25 million rows of comma-separted-data, process the data, and then write the processed data to a new .txt file. My computer freezes when I…
TJE
  • 570
  • 1
  • 5
  • 20
-4
votes
1 answer

How to store chunks in a procedural world?

I am making a game like Minecraft and I have already chunks, but I currently store those chunks in a two-dimensional array. So chunks that I loaded stay loaded and when I go on a border I can't generate more chunks because I use an array. So my…
Nanored
  • 31
  • 7
-5
votes
1 answer

Parse comma separated string, split array into chunks, then transpose

What is the best way to echo out an array where the values are grouped: Array ( [0] => Service, Service, Service [1] => 27 february, 2017, 27 march, 2017, 27 april, 2017 [2] => 08:00, 08:00, 08:00 ) If I want the result to be: Service, 27 february,…
David
  • 11
  • 5
1 2 3
60
61