Questions tagged [readonly]

Read-only is a generic concept that means "not writeable" - Please DO NOT USE THIS TAG. This tag is ambiguous and needs to be broken up.

Filter by
Sorted by
Tagged with
-3 votes
0 answers
22 views

Fix permitions in intelliJ IDEA to change/work with "read only" files [duplicate]

A few days ago I`ve see the bug with IntelliJ IDEA, when I open someone's project - it can`t let me change anything whatever I would not to do. How to Change Read-Only Status of Files in intellij This ...
0 votes
0 answers
17 views

How can I print a pointer to a string after I have changed its value?

How can I print a pointer to a string after I have changed its value? I noticed that when I print the original string, Str1, and the pointer to the changed string, Str2, they do not have the same ...
0 votes
0 answers
18 views

Immutable<T> definition that allows primitive A to be assignable to Immutable<B> when A extends B

PROBLEM In the code below, Immutable<T> defines a object or array suitable for immutable state which shouldn't be manipulated, (recursively applies readonly to indexed objects). The use of this ...
  • 2,690
0 votes
0 answers
16 views

Docker readonly mount doesnt work for mounted drive in subfolder

I have docker script with following mount as readonly: --mount type=bind,source=/opt/files,readonly,target=/media \ this works, docker has readonly right to this folder, however I have another drive ...
  • 813
0 votes
0 answers
17 views

SQLite Read-Only DB on AWS EFS: slow concurrent reads

I got a read-only sqlite file on EFS that is accessed by Lambdas concurrently using the following config: final SQLiteConfig config = new SQLiteConfig(); config.setReadOnly(true); config....
  • 21
0 votes
1 answer
41 views

Azure DevOps Board Access

I have a request form my customer that they want access to my organization's DevOps board to monitor the progress of work items in each sprint. Is there an option to provide READ-ONLY access to ...
0 votes
0 answers
30 views

using robocopy to copy only files with a specific attribute

I am very new to using the command line and I am trying to write a batch file that, at one point, will robocopy only the files with a Read Only attribute from one directory to another. I see that ...
0 votes
0 answers
40 views

Python class function return super()

So I was messing around with a readonly-modifyable class pattern which is pretty common in java. It involves creating a base class containig readonly properties, and extending that class for a ...
  • 1,868
0 votes
0 answers
38 views

PostgreSQL transaction state is "OPEN" when set read-only "true" in Spring fw

I am setting up PostgreSQL DB in the Spring framework, but an error appears only when I run a method that is read only true. [setting.xml] <tx:advice id="txAdvice" transaction-manager=&...
-5 votes
2 answers
128 views

How to check if a read-only file exists

I'm looking for a way to check for a read-only file's existence without opening it. I've tried: if (std::filesystem::exists("C:\\Windows\\System32\\hal.dll")) { std::cout << "...
1 vote
1 answer
57 views

Aspect does not triggered

I am trying to implement read-only data source in my application. According to the following repo implementation, this aspect method should be called when a transaction happens but it never triggers ...
  • 13
0 votes
0 answers
38 views

C# - Is it possible to make excel files readonly / non-editable / password protected using Compact Framework 3.5?

So, I have this console (from Beijer - uses ixDeveloper) and it uses CF 3.5. It is somewhat limited, so I am trying to do what I can with scripts (in C#). Right now, I have an Excel file regarding an ...
2 votes
1 answer
58 views

Power BI + Postgres: Read Only User

I already posted a similar question to the Power Bi forum, but probably it's too short-sighted to search the solution on Power Bi side. We have a postgres schema and a postgres user that has the ...
0 votes
0 answers
39 views

Docker service update/create command has option to add the --read-only flag to make the root file system read-only. Is there any option to remove it?

I have created a docker swarm service with --read-only mode, which makes the container's root file system read-only. Now I just want to remove the read-only option of the running container. All the ...
0 votes
0 answers
8 views

How to make diagonal cells in datagridview disable(readonly)?

this is my code List drivers = CONTROLLER.GetSignalGroupsByType(E_SignalGroupType.DRIVER); foreach (SignalGroup s in drivers) { DataGridViewColumn dvc = new DataGridViewColumn(); dvc.HeaderText = s....
  • 1
-1 votes
1 answer
226 views

Troubles with mocking new PHP 8.2 readonly classes with PHPUnit test doubles

I try to mock readonly class from PHP 8.2 in PHPUnit and got next error: Symfony\Component\ErrorHandler\Error\FatalError^ {#7 #message: "Compile Error: Non-readonly class Mock_Provider_f80b7c4d ...
0 votes
0 answers
22 views

Create Read-Only MongoDB container read data of the existing MongoDB container

I have running MongoDB as Docker container. Now I want to create one more MongoDB container but read-only and read data from the existing one. What should I do? I don't use Docker Swarm mode! I want ...
0 votes
0 answers
39 views

Read only VirtualFileSystemFactory

I am trying to create a read only VirtualFileSystemFactory for a custom sftp server using Apache Mina SSHD library. I have searched a lot but it seems that I cant find the solution to this problem. IS ...
0 votes
0 answers
21 views

Woocommerce: Refund amount – set to “readonly”

I need to limit refunds to full refunds (= no partial refunds). How can I set the refund amount field to readonly and automatically set it to the order amount? I already modified public function ...
  • 1
0 votes
1 answer
82 views

Could I set a variable readonly in Python?

I want to set a object in module be readonly and shared in common. Like follow situation: # configure.py with open("config.yaml","r") as f: config = yaml.load(f) and configure....
1 vote
0 answers
15 views

shm_open failing on read only file system

I'm trying to define a shared memory for IPC across two processes on an embedded device where the root is readonly. It appears that this condition does not allow the creation. How can I create a ...
  • 2,227
0 votes
2 answers
312 views

How to declare a Typescript variable that is going to be set just once but later

With const the value should be set at the time of declaration, with let the variable could be changed, I need a Typescript (or javascript) variable that is undefined until is set, and once set, it ...
  • 1,294
0 votes
1 answer
62 views

How to define readonly object parameter for function in Typescript

Is there any way to enforce an object parameter cannot be changed in typescript, e.g. interface MyType { prop1: number } function myMethod(param: readonly MyType) { // I want TS complain ...
  • 1,294
0 votes
0 answers
28 views

Limit read-only access for Setup Tools in Salesforce

I need to limit the access of a profile either using Permission set or overriding a profile to Setup Tools(ADMINISTRATION, PLATFORM TOOLS and SETTINGS) in Salesforce. I tried checking for ...
2 votes
3 answers
183 views

Readonly in PHP 7.4

I have written a PHP library using the PHP 8.0 readonly keyword and then I realised that it would be good to support earlier versions of PHP such as 7.4. I could easily remove the readonly keywords ...
0 votes
1 answer
47 views

Php, can "readonly" replace protected get-ters?

before Php 8.1 we could wrote that: abstract class Base { private $thing; public function __construct($thing) { $this->thing = $thing; } protected function getThing() ...
  • 5,949
0 votes
0 answers
19 views

what are the full steps to considere in order to put the Raspberry pi SD card in read only reliably?

Intro I wanna give a last chance to this board before put it in a trash haha :). Right now I prefer use standard motherboards, Ubuntu server, automatic main power switch and perif. to have something ...
  • 11
0 votes
1 answer
25 views

react-native state is read-only

Following Component in react-native: import { useEffect, useState } from 'react' let startValue = null // only using this to restart the counter from resetTimer() (other better approaches?) export ...
0 votes
0 answers
27 views

C# - Is it possible to call any member functions of List through read-only wrapper?

I have the following function 'Foo': int Foo(List<int> list, int value) { int i1 = list.IndexOf(value); int i2 = list.LastIndexOf(value); return i2 - i1; } List<int> list = new List&...
  • 1
0 votes
0 answers
99 views

SD card is write protected, how to format it?

I have tried to format my micro-SD card without an adapter, but to no avail. Here is what I have done: Tried sudo lsblk -o model,name,fstype,label,hotplug,size,mountpoint and got: Flash_Rea sdb ...
  • 5
2 votes
1 answer
692 views

Aws ECS Fargate enforce readonlyfilesystem

I need to enforce on ECS Fargate services 'readonlyrootFileSystem' to reduce Security hub vulnerabilities. I thought it was an easy task by just setting it true in the task definition. But it ...
  • 761
0 votes
3 answers
117 views

How do sections of RAM get marked as read-only in Embedded Systems

When we build an executable, and it gets loaded into RAM, my understanding is that the .text and .ro setions should be loaded into read-only memory locations. With an operating system and a virtual ...
  • 3,603
0 votes
0 answers
23 views

How to prevent data tampering when form is set as readonly with Django? [duplicate]

INTRO: I have a Django web app which does the following: Allows the user to fill the form After the form is submitted, it shows the form with the previously filled values In step 2, the form fields ...
0 votes
1 answer
37 views

Python: remove read-only access Windows to copy and paste files

I have tried many methods, some from How to remove read-only attrib directory with Python in Windows? but none work. Still getting the WinError Access Denied message. Simply need to access a file ...
  • 11
0 votes
0 answers
98 views

CS 1612: The return value is not a variable and therefore cannot be changed

consider this cod here: public ref struct RefValue <T> where T : unmanaged { public ref readonly T Item1; public RefTuple(ref T item1) { Item1 = ref item1; } } //This ...
1 vote
1 answer
48 views

PyQt5: make QCompleter popup readonly

I have a QCompleter for a QLineEdit and it's working fine. All I want is for this completer to be only read-only. So the user can only see the matches but cannot select any one of them. No ...
  • 102
0 votes
1 answer
17 views

Copying read-only sections into RAM

In Linux for example, when the loader loads an application or library into RAM, doesn't this make everything writable then? For example, the .text area of an executable file should be read only. Will ...
  • 3,603
0 votes
1 answer
293 views

Pass readonly parameter to mutable function (which will not mutate)

I need to create a function batchUsers which takes a readonly string as a parameter to create a DataLoader. In my batchUsers function I need to call a function (User.findby) which has defined its ...
  • 1,331
0 votes
0 answers
62 views

Tabbing have issue if next field is readonly

I want to fill the fields using tab key and it is working fine in all cases but if next field is read-only then it doesn't work and even for the toggle buttons it doesn't make focus on toggle fields. ...
1 vote
0 answers
214 views

EF Core 6: Make navigation readonly

public class ParentClass { [Key] [StringLength(80)] public string ID { get; set; } = string.Empty; [StringLength(80)] public string ChildID { get; set; } = ...
  • 2,210
0 votes
0 answers
57 views

Foreign key constraint in read-only data

A developer I work with insists on maintaining a foreign key constraint in a database (MySQL) where the tables containing the related data are read only. How do I politely tell him this is unnecessary?...
0 votes
1 answer
69 views

How to make a word document readonly in runtime after opening without closing it before

Is it possible to make a word document ReadOnly in runtime after it has been opened in ReadWrite mode without closing it before? Here is an example what I try to do: Sub ProcessWordDoc() Dim WordApp ...
  • 35
0 votes
0 answers
437 views

ODBC DSN connection Error (SQL Server Native Client 11.0)

I am trying to create a 64 bit DSN connection to connect with SQL Server. Below are the configuration that I am making (Keeping rest of the settings to default): Server: a_sql_server Authentication: ...
1 vote
1 answer
92 views

readonly modifier doesn't propagate when extending classes? (TypeScript)

I'm trying to create read-only interfaces in TS, and here is an example I've tried with the readonly modifier propagating into subtypes: type JsonDatum = | string | boolean | number | readonly ...
0 votes
0 answers
172 views

TypeError: Attempted to assign to readonly property. reduxjs/toolkit

I am trying to use reduxjs/toolkit for to create reducer as the following. However, when I try to dispatch the removeFavorite I get the following error TypeError: Attempted to assign to readonly ...
  • 131
0 votes
0 answers
128 views

Is there a css equivalent of pointer-events but for keyboard events?

I am trying to make readonly, but not disable, all types of form element only using css and html (i.e. no javascript). Some things (like inputs) are easy - the readonly attribute on the input does it. ...
  • 2,371
0 votes
1 answer
867 views

V-Select Readonly Bug

I am using Vue.js as a frontend framework and Vuetify framework. I have a page where the users view the document. And all the fields are readonly. There's an "edit" button which upon ...
  • 31
1 vote
0 answers
26 views

Check if a string is included in a readonly string array in TypeScript [duplicate]

const ReadOnlyStrings = ['a', 'b', 'c'] as const; const fn = (key: string)=>{ ReadOnlyStrings.includes(key); } Errors in code: Argument of type 'string' is not assignable to parameter of type '&...
  • 11
0 votes
0 answers
85 views

How to open readonly markdown preview in vscode extension?

I'm making a vscode extension and when the user will click on a button, I need a markdown preview to open with specific content. Right now I'm using this : let moreInfo = vscode.commands....
  • 33
1 vote
1 answer
33 views

C# Collection for controls readonly

found the following code: Alle Controls einer Form auf Readonly setzen But how have my Control.ControlCollection look like that I can use this method? I tried the following but it is not working: ...
  • 123

1
2 3 4 5
33