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
3 answers

How to load/Unload tile chunks faster(C#)

Ok So basically in my game, The world is made out of tiles and the tiles are split into chunks(50x50 tiles and the tiles are 16x16) so the whole world isn't loaded in memory. The chunks are saved to files and only ones that are needed are…
Brassx
  • 31
  • 1
  • 4
3
votes
1 answer

Concurrent and In Order Downloading chunks from 2 servers - Android

I am working on an Android app which purpose is to download chunks(parts of a video file) from 2 servers, append them in order(into a main video file) after each one is downloaded and finally play this video file while downloading continues.. This…
sami
  • 33
  • 1
  • 5
3
votes
1 answer

Copy a file in little chunks

I want to copy a file in little chunks (to cancel the copy operation if needed). I'm trying to follow the unmarked solution here: How to copy a file with the ability to cancel the copy? But I'm getting a 0 byte file What I'm doing wrong? Public…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
3
votes
1 answer

How do I set the chunkname of a Lua chunk?

I'm currently using the C API call luaL_loadstring() to load a chunk, but this call doesn't have a way of naming the chunk. Is there a way of naming a chunk after it's loaded? Alternatively, I see the lua_load() function takes a chunkname parameter,…
Roddy
  • 66,617
  • 42
  • 165
  • 277
2
votes
1 answer

I'm stuck with converting a very large binary file to PNG in Java

Context I'm trying to converting a binary file (this is a raw memory file, dumped from pmemsave instruction of QEmu monitor) to PNG file with RGB color. That's mean each 3 bytes equal Red-Green-Blue color in 1 pixel of PNG file. My idea is…
2
votes
1 answer

How do I read the "data" section in chunk data (minecraft)?

Problem I have a pretty technical question about Minecraft, So I'm building a Minecraft server wrapper, and want to add an option to edit the world when the server is offline. That means messing with the save file. I have managed to make it work for…
Ilai K
  • 61
  • 7
2
votes
1 answer

Aligning audio for smooth playing with the web audio api

I am currently trying to figure how to play chunked audio with the web audio API, right off the bat everything does work.. however most transitions between chunks aren't as smooth as I want them to be, there's a very very brief moment of silence…
2
votes
1 answer

Large Json file send batches wise to HubSpot API

I tried many ways and tested many scenarios I did R&D a lot but unable to found issue/solution I have a requirement, The HubSpot API accepts only 15k rec every time so we have large json file so we need to split/divide like batches wise 15k rec need…
2
votes
0 answers

Inside-chunk Quarto codes (#|) not working properly

None of the inside-chunk Quarto codes (#|) are working properly. I have a document with the following header. title: "Title" subtitle: "Subtitle" author: - "Author 1" - "Author 2" date: "November 8, 2022" date-format: long format: html: …
FPM
  • 21
  • 1
2
votes
2 answers

Swift split array into chunks based on total value

I am looking for a way to split an array into chunks with a max value, but can't seem to find a solution. Lets say we have the following code: struct FooBar { let value: Int } let array: [FooBar] = [ FooBar(value: 1), FooBar(value: 2), …
Paul Peelen
  • 10,073
  • 15
  • 85
  • 168
2
votes
1 answer

Rmarkdown backticks inside inline code / inconsistent behavior with usual code chunks

This works in a usual code chunk in R markdown: m1_aov <- anova(m1) m1_aov$`Sum Sq`[2] %>% round(3) Unfortunately, using the latter in inline code breaks the knitr parser down `r m1_aov$`Sum Sq`[2] %>% round(3)` Indeed, it also breaks…
green diod
  • 1,399
  • 3
  • 14
  • 29
2
votes
2 answers

Processing dataframe in chunks

I need to process a large dataframe in chunks and I applied this function: def chunker(seq, size): return (seq[pos:pos + size] for pos in range(0, len(seq), size)) for i in chunker(df,chunk_size): .... However, when I run this, I get…
Nic_bar
  • 21
  • 3
2
votes
3 answers

How to split a text file into chunks?

I have tried many methods but it hasn't worked for me. I want to split a text files lines into multiple chunks. Specifically 50 lines per chunk. Like this [['Line1', 'Line2' -- up to 50] and so on.
sim
  • 31
  • 3
2
votes
1 answer

Direct access to chunk with code of restricted page in NextJS

Is it safe that the NextJs server returns chunks via a direct link, even when the user is not logged in? For example, I deployed the application with iron session like this, logged in and received a direct link to the chunk with restricted page…
ytkopobot
  • 177
  • 1
  • 10
2
votes
6 answers

Most elegant way to split a sequence into individual steps in Python

Say I have a list from 0 to 9: lst = list(range(10)) I want to split it into individual steps of 2. I managed to write the following working code: res = [[] for _ in range(len(lst) - 1)] for i, x in enumerate(lst): if i < len(lst) - 1: …
Shaun Han
  • 2,676
  • 2
  • 9
  • 29