Skip to main content
2 votes
3 answers
168 views

I am representing a collection of turtles, each with a moment when hatched. I want to randomly choose any mature turtle. I pretend that minutes are years, in this aquarium simulation. record Turtle( ...
Basil Bourque's user avatar
1 vote
1 answer
59 views

Context I have implemented a broad phase collision detection algorithm that returns a nested vector (Vec<Vec<usize>>) of indices. I can guarantee that each index appears at most once ...
Adam Olsson's user avatar
0 votes
1 answer
568 views

I'm looking for a means to access, say, a filtered view element by index. Here is a snippet of code for context: std::vector<int> v = {1, 2, 3, 4, 5}; auto v_view = v | ranges::views::filter([](...
Kaiyakha's user avatar
  • 2,075
1 vote
0 answers
182 views

There are more than 10 thousand documents in my index, but I cannot access all documents with search. I may also have performance problems with the scroll API. I found a method on how to overcome this ...
Ceren AKTAŞ's user avatar
0 votes
1 answer
539 views

In short, my question is: Should Sysbench eliminate the effect of cache when measuring the memory read/write performance, similar to how the effect of memory is eliminated when measuring the disk ...
ada liu's user avatar
  • 32
0 votes
2 answers
100 views

If I have a list of 10K elements, and I want to randomly iterate through all of them, is there an algorithm that lets me access each element randomly, without just sorting them randomly first? In ...
Alexander Mills's user avatar
-1 votes
1 answer
1k views

I am trying to make a view that updates based on if the user toggles the favorite button or not. I want the entire view to reconstruct in order to display an array of values whenever that array of ...
Linda Xue's user avatar
3 votes
2 answers
1k views

My goal is to be able to reduce time needed to look at specific sections from the middle of very large log files compressed to .xz format. If the .xz files are for example 6GB compressed and 60GB ...
abcd efg's user avatar
3 votes
1 answer
626 views

I have a 100 GB text file in a 7z archive. I can find a pattern 'hello' in it by reading it by 1 MB block (7z outputs the data to stdout): Popen("7z e -so archive.7z big100gb_file.txt", ...
Basj's user avatar
  • 47.6k
1 vote
1 answer
83 views

Re: Swift 5 let str = "my string" let slice: ArraySlice<Character> = ArraySlice(str) Is the ArraySlice created in O(1) time? I'm curious because complexities pertaining to extended ...
xct789's user avatar
  • 56
0 votes
2 answers
197 views

in java I would like to be able to maintain my Collection of fishes sorted by species at all time (hence the use of a HashMap) while being able to pick a random element from all species except one ...
Guillaume Valhall'art Roussel's user avatar
1 vote
1 answer
1k views

In theory AES encryption in CTR mode allows for decrypting at any block index (that is you don't have to decrypt the whole encrypted data from the begining if you want to decrypt only from a certain ...
user2960174's user avatar
1 vote
1 answer
129 views

The input to my Perl program is a text file that contains one 'item' per line. For example, a file with below contents: item1 abc yyy anything blabla whatever item2 efg dod whatever blabla mmm item3 ...
hw_engineer_trying_to_write_sw's user avatar
1 vote
0 answers
95 views

Here is the main code: import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { RandomAccessFile raf = new RandomAccessFile(&...
MrJ_'s user avatar
  • 55
1 vote
1 answer
256 views

I'm working on a project in text compression and I need to design an efficient algorithm in a LZ77 compressed sequences. Specially, Given a LZ77 compressed sequence and an index i, we can recover a ...
Tina's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
24