random-access Questions
7
Solved
I've never had close experiences with Java IO API before and I'm really frustrated now. I find it hard to believe how strange and complex it is and how hard it could be to do a simple task.
My tas...
Trismus asked 29/11, 2010 at 15:19
3
Solved
So I am curious to know, what is random access?
I searched a little bit, and couldn't find much. The understanding I have now is that the "blocks" in the container are placed randomly (as seen he...
Nonchalant asked 10/6, 2014 at 17:44
2
Solved
I want to copy the last 10MB of a possibly large file into another file. Ideally I would use FileInputStream, skip() and then read(). However I'm unsure if the performance of skip() will be bad. Is...
Culminant asked 8/9, 2010 at 15:56
2
I was wondering how I could delete a record from my random access file.
Here's how I add to my RAF, not sure how to delete it though :X
public void addNewStudent(String name, String formClass, St...
Thaumaturge asked 13/3, 2011 at 18:21
4
Solved
Or in other words, why does accessing an arbitrary element in an array take constant time (instead of O(n) or some other time)?
I googled my heart out looking for an answer to this and did not fin...
Rascon asked 10/9, 2013 at 1:59
7
Solved
I'm looking for a general compression library that supports random access during decompression. I want to compress wikipedia into a single compressed format and at the same time I want to decompres...
Cleanup asked 12/1, 2010 at 3:39
2
It was mentioned in the kjellkod's article that if we pass ArrayList in the method which receives List as an argument, then we lose in performance because ArrayList implements additional RandomAcce...
Tingley asked 11/6, 2013 at 11:18
1
Solved
As AES in CTR mode is great for random access, lets say I have a data source created with a CipherOutputStream in AES-CTR mode. The library underneath—which is not mine—uses a RandomAccessFile that...
Sharla asked 16/5, 2013 at 8:13
2
Solved
I am looking for a data structure in which I can efficiently remove items and also supports random access.
I also need efficient insertion but as the ordering of elements is not important, I thou...
Cramp asked 7/3, 2013 at 13:32
3
Solved
I'm encountering a FileNotFoundException when I try to make a file using RandomAccessFile:
RandomAccessFile file = new RandomAccessFile("/test.jpg", "rw");
I don't now how to get around this. It...
Xyloid asked 30/8, 2010 at 3:37
3
Solved
This is essentially a more constrained version of this question.
Suppose we have a very large text file, containing a large number of lines.
We need to choose a line at random from the file, wit...
Braces asked 20/11, 2012 at 17:0
4
Solved
Is it possible to position cursor to the start of a specific line in a file through RandomAccessFile?
For e.g. I want to change String starting at char 10 till 20 in line 111 in a file. The file h...
Halo asked 19/3, 2012 at 12:7
2
I'd like to perform a number (MAX_OPERATIONS) of money transfers from one account to another. The accounts are stored as refs in a hash-map caller my-map (int account-id, double balance).
The mone...
Nietzsche asked 5/3, 2012 at 14:16
2
Solved
What is the best pattern to get a GPU efficiently calculate 'anti-functional' routines, that usually depend on positioned memory writes instead of reads?
Eg. like calculating a histogram, sorting,...
Cavern asked 25/2, 2012 at 2:42
1
Solved
I'm trying to convert an old Quick BASIC program to VB.Net. There doesn't appear to be any direct replacement for the old file statements. Building a database seems like overkill for my simple need...
Economy asked 16/1, 2012 at 20:50
8
I'm implementing a sliding window over a stream of events, in Java.
So I want a data structure which allows me to do the following:
add to the end of the data structure when new events occur;
rem...
Vitale asked 5/11, 2009 at 18:26
3
Solved
I need to sample uniformly at random a number from a set with fixed size, do some calculation, and put the new number back into the set. (The number samples needed is very large)
I've tried to sto...
Leatheroid asked 19/10, 2011 at 0:21
2
Solved
Edit: The code below has been modified to work as the problem has been solved.
Specifically, (*hardwareList.next_item)->next was originally written without brackets (e.g. as *hardwareList.next_...
Mariannamarianne asked 12/9, 2011 at 7:28
6
Solved
I have a 10GB CSV file which is essentially a huge square matrix. I am trying to write a function that can access a single cell of the matrix as efficiently as possible, ie matrix[12345,20000].
G...
Crowd asked 27/1, 2011 at 23:45
2
Solved
In my program, closing a java.util.RandomAccessFile sometimes takes exactly 45 seconds (well, almost exactly: between 44.998 and 45.003 seconds). The program creates and closes lots of small files....
Olethea asked 21/1, 2011 at 15:54
3
Solved
I'm currently developing 3D graphics application using JOGL (Java OpenGL binding). In brief, I have a huge landscape binary file. Due to its size, I have to stream terrain chunks in the run-time. T...
Osterhus asked 18/1, 2011 at 20:11
1
I'm running a program which needs random access to a very large file (approximately 151 gigabytes). I've found that whenever it runs on one of the MacPro machines in the Orchard lab ( details at ht...
Timbal asked 5/12, 2010 at 20:2
2
Solved
Continuing List to priority queue
I'm implementing a improved priority_queue with random access.
template <class T, class Container = std::vector<T> >
class Heap {
public:
Heap() {}
...
Disputatious asked 12/12, 2010 at 17:32
4
Solved
Why does my code not work?
package generatingInitialPopulation;
import java.util.Arrays;
import java.util.Collections;
public class TestShuffle {
public static void main(String[] args) {
int[]...
Olgaolguin asked 20/10, 2010 at 19:9
1
Solved
does J2ME have something similar to RandomAccessFile class, or is there any way to emulate this particular (random access) functionality?
The problem is this: I have a rather large binary data fil...
Transistorize asked 25/9, 2010 at 19:57
© 2022 - 2024 — McMap. All rights reserved.