Questions tagged [read-write]

Read/write is a mode of access designating the intent or ability to perform both read and write operations on a entity.

Read/write typically denotes the ability or desire to both view and alter the contents on a file or other writable object.

In many cases this would suggest full access to a resource expect possibly in terms of use (e.g. a user have read and write but not execute access to a binary).

633 questions
2
votes
1 answer

shared file synchronization (read/write)

I wrote in PHP code that it will "fopen" a file(lets call it TXT) and write there the chosen checkbox, then later another process(lets call it PROC1- in c code) needs to read the file(TXT). I need to synchronized it, I mean to block the…
azulay7
  • 305
  • 3
  • 16
2
votes
0 answers

Copy file in Python - Read-write vs Shutil.copy

I tried to copy file using the read and write function I just learnt, as below: from sys import argv script, from_file, to_file = argv a = open(from_file).read() a = open(to_file, 'w').write(a) Then, I googled a bit and found out there's shutil…
JeffCh
  • 79
  • 7
2
votes
1 answer

How do I replace line-by-line text of a file in C?

I have been researching this for a while and haven't been able to find anything that helps my specific case. I have a function in which I need to encrypt text in a file. What I want to do is to read a line from a text file and store it into a…
Jaffar Rizvi
  • 71
  • 1
  • 1
  • 8
2
votes
1 answer

How to read and write .img files using FileStream in c#?

I am trying to read an image file and write it into a new file. But the written image file is not a supported file. please tell me about what is the proper way to read/write image files. Help me!! Here is my full code. And I did not get any…
user12260778
2
votes
1 answer

Nodejs 'fs' methods running asynchronously

Using the fs package in Node.js, I am getting some unexpected results I am hoping to have some light shed on here. I have the following code: client.on('fileChannel', function(data){ console.log(data); …
Sterling Butters
  • 1,024
  • 3
  • 20
  • 41
2
votes
1 answer

Simultaneous accesses when using PropertyWrapper

I want to create a property wrapper, that would store a callback block, and execute it every time, when it's value changes. Something like simple KVO. It works fine, but there is one problem with it. If I use the property itself in this callback…
Damian Dudycz
  • 2,622
  • 19
  • 38
2
votes
2 answers

Primary Key Theory & I/O Efficiency

According to RSBMS theory, when choosing a primary key, we are supposed to choose amongst minimal superkeys, effectively optimizing our key choice w.r.t # of columns. Why are we interested in optimizing against # of columns instead of number of…
byrnesj1
  • 189
  • 1
  • 14
2
votes
0 answers

Excel Read/Write in Python without any external package

I am working on company server where Python has been installed for us. Now I want process the excel files but I can not install any external packages like Pandas or Xlrd. So is there any way to achieve this?
adesh
  • 832
  • 4
  • 14
  • 23
2
votes
1 answer

Read and Write from serial port gives "OUTPUT_BUFFER_EMPTY" (maybe crc calc and checksum is not correct)

I can not figure out where I may have been wrong and what to change to make this program able to communicate with the card both for reading and writing. This is the serial protocol, the general structure of the frame is as follows:…
Ale Last
  • 65
  • 7
2
votes
3 answers

Will PHP code of an app always have read/delete access to session files on the same server?

For my Joomla! 3.8+ extension I need to be able to find and delete (unlink) PHP session files (named 'sess_' + session id) which will be stored in the session_save_path, e.g. /tmp. I understand that it is PHP who is storing the session files, i.e.…
RobHU
  • 35
  • 6
2
votes
2 answers

module.exports is returning undefined

I am currently new to Node JS, and today I was trying to read data from a file data.json. Here is the JSON file: {"username":"rahul_v7","password":"9673"} {"username":"7vik","password":"3248"} {"username":"pradypot_2","password":"6824"}…
user9090230
2
votes
2 answers

File size changes after read/write txt file in python

After executing the following code to generate a copy of a text file with Python, the newfile.txt doesn't have the exact same file size as oldfile.txt. with open('oldfile.txt','r') as a, open('newfile.txt','w') as b: content = a.read() …
Matthias
  • 105
  • 10
2
votes
1 answer

working of read-write sets in hyperledger

Can anyone explain how read-write set and version numbers are used in hyperledger with respect to endorsement and validation with an use-case ?
Darshu Bc
  • 526
  • 5
  • 22
2
votes
3 answers

Recursively print a number c with write

I did a function who prints with write an unsigned int : ssize_t putc_fdr(char c, int fd) { return (write(fd, &c, sizeof(char))); } ssize_t putuint_fdr(uintmax_t i, int fd) { return (i != 0 ? putuint_fdr(i / 10, fd) + putc_fdr(i…
tfontain
  • 66
  • 12
2
votes
1 answer

What does "reads before reads" mean in memory ordering?

Let's consider this sentence (Total Store Ordering): reads are ordered before reads, writes before writes, and reads before writes, but not writes before reads. I think I almost get the basics: Each thread has its own program order (code as it is…
sevo
  • 4,559
  • 1
  • 15
  • 31