Questions tagged [random-access]

Random access is the possibility of accessing any given record in a collection in the same time in contrast to sequential access in which distant records take longer to access than nearby records. An array is an example of a random-access data structure which can be contrasted to a list which requires sequential access.

Random access is the possibility of accessing any given record in a collection in the same time in contrast to sequential access in which distant records take longer to access than nearby records. An array is an example of a random-access data structure which can be contrasted to a list which requires sequential access.

See also

345 questions
-1
votes
2 answers

How to effeciently read chunk of bytes of a given range from a large encrypted file in java?

I have a large encrypted file(10GB+) in server. I need to transfer the decrypted file to the client in small chunks. When a client make a request for a chunk of bytes (say 18 to 45) I have to random access the file, read the specific bytes, decrypt…
Burhan Uddin
  • 729
  • 2
  • 7
  • 20
-1
votes
1 answer

how to pick up value from array in java

i have an array it fill with some values(int).i want to pick one of this elements up randomly and use it value as a index of another array.what should i do? int value[] = {1,2,3,8,9,40,0,5,...}; int value-2[] = {0,1,2}; Random rand = new…
Blaster
  • 135
  • 3
  • 16
-1
votes
2 answers

Java 1.6 abstracted random access

As a java guru, what would you suggest to abstract random access so that a code can be agnostic to whether the data its accessing is in memory or in a file on the harddrive? (The files in question could be several gigabytes in size. Having random…
-1
votes
1 answer

RandomAccessFile seek exception

I want to seek in a file which is located on SDCARD (External Storage). I opened it in read-only mode. in = new RandomAccessFile(filePath, "r"); Everything for reading from this file stream is ok until i want to seek in file. long seekPosition =…
VSB
  • 9,825
  • 16
  • 72
  • 145
-1
votes
5 answers

STL random access iterator exceed array size and self implementation iterator

I got an assignment to implement a template array with an iterator and to overlad some operators of my iterator and I have a few questions. From what i understand the std random accessed iterator allows u to exceed the array. Does it allow to get…
Ravid Goldenberg
  • 2,119
  • 4
  • 39
  • 59
-1
votes
1 answer

Which is more efficient way in Java to read csv file CSVReader or RandomAccessFile?

I want to read a huge data file (csv format) containing rows and columns. I want to read and process individual columns in order. Which method is more efficient in terms of speed and memory utilization? Shall I use CSVReader or Random Access File…
Kaur
  • 279
  • 1
  • 6
  • 18
-1
votes
1 answer

Downloaded jpg , apk files never open up but mp3 files open

I am struck in this strange problem . I am using the following method to download files : public boolean downloadSection(String link,String fileLocation,long currentlyDownloadedBytes){ try { RandomAccessFile file = new…
Rahul Verma
  • 2,140
  • 3
  • 21
  • 31
-2
votes
1 answer

how to train,test and validate the feed forward neural network for 3 input nodes and 2 output nodes

i m having a data set as shown below, how to train,test and validate the feed forward neural network for same data. input data [ 0 0 0; 0 22.9183 0; 0 45.8366 0; 0 68.7549 …
JOLLY
  • 1
-2
votes
1 answer

How to implement a random iterator?

I am supposed to implement an iterator that returns an iterator over the items in random order. This is what I have tried to do for now: private class RandomQueueIterator implements Iterator { int i = -1; public boolean hasNext()…
rama96x
  • 9
  • 1
-2
votes
1 answer

C++ Access Violation Error

I wrote a simple program to learn how to use random access filling. It compliles fine but on runtime gives the access violation error. I am only writing and reading a single record. Header…
Muaaz
  • 3
  • 2
-2
votes
1 answer

Read/Write fixed length text records with carriage return row terminators

Example of C# that implements this pseudo code w/o becoming "unmanaged": dataRec = dataRec.Key [5] + dataRec.Ptr [5] + CrLf [2]; recSize = sizeof (dataRec); // recSize = 12 aCrLf = CarriageReturn (ASCII 13) + LineFeed (ASCII 10); // define CrLf…
-2
votes
1 answer

Random access file java

Im reading from a .csv file and I'm getting this weird numbers at the start of each line 12195820118109888100071.53 something like this, what do you think it could be my mistake while ((line = bufRdr.readLine()) != null) { input =…
user1212697
  • 619
  • 1
  • 6
  • 7
-3
votes
1 answer

Own simple load balancer for dynamic chances / probabilities (in C++ but language undependent)

H_ello lovely people, my program is written as a scalable network framework. It consists of several components that run as individual programs. Additional instances of the individual components can be added dynamically. The components initially…
-3
votes
2 answers

How to determine if a number has been used in a variable previously?

How would I go about not saving the record if the user tries to enter a previously used ID number? I have tried a while loop, tho it works for the second time asking the user, it wont work after that. I thought about using an array? import…
user1067332
  • 15
  • 2
  • 6
-4
votes
1 answer

What does this number do in finding out the number of registry in RandomAcessFile (java)

I was wondering if anyone What does this number do, I have heard that it has to do something with bytes?, I really don't know.. could anyone please enlighten me: public int total_reg() { try { int reg; RandomAccessFile file = new…
user1079801
  • 31
  • 1
  • 6
1 2 3
22
23