1,645 questions
1
vote
0
answers
287
views
CKEditor5: enabling source view in read-only mode
I'm trying to create a CKEditor that is read-only but allows source view.
When I use CKEditor's read-only mode, the source editing plugin gets disabled.
I'm looking for an easy way to do this, I don't ...
0
votes
1
answer
529
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 ...
-4
votes
2
answers
285
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 << "...
0
votes
0
answers
74
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 ...
9
votes
1
answer
9k
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
1
answer
471
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 ...
1
vote
0
answers
115
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 ...
0
votes
1
answer
1k
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 here:
...
0
votes
1
answer
632
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()
...
0
votes
0
answers
44
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&...
0
votes
3
answers
865
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 ...
0
votes
1
answer
355
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 ...
1
vote
1
answer
203
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 ...
0
votes
1
answer
2k
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 ...
2
votes
1
answer
510
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
votes
1
answer
589
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 ...
6
votes
0
answers
2k
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. ...
1
vote
0
answers
30
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 '&...
1
vote
1
answer
64
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:
...
0
votes
2
answers
750
views
on change in jquery doesnt work with readonly input field
i have some fields in my form, which are like below:
$(document).on("change", ".qty2", function() {
var sum1 = 0;
$(".qty2").each(function() {
sum1 += +$(this).val();
});
$("#subtotal")...
1
vote
1
answer
434
views
Django Read Only Fields ,if there is any value
I wrote this code to make read only field, but i want to make an exception that if there is value then that row will only readonly , and if there is not any value the it will be editable,
model.py
...
1
vote
1
answer
1k
views
How to override readonly property in Swift subclass, make it read-write, and assign to superclass?
How can I override readonly property of a Swift superclass, from a subclass, to make the property read-write?
I want to do that, because that is what the iOS UIResponder documentation says is required....
0
votes
0
answers
65
views
How to Scan ID number on a Read-Only property in Richedit
I am going to change the property of Richedit into "read-only" property. And no user will be able to type in the Richedit. Unless they scan their ID. My question is how am I going to scan an ...
-1
votes
1
answer
71
views
Need help understanding "readonly" in C#
I'm trying to get my head around this. What's the difference between these 4?
1. private ObservableCollection<T> _myObservableCollestionOfTs
2. private readonly ObservableCollection<T> ...
1
vote
1
answer
157
views
How to test code path for read-only file access with PHPunit
I have a PHP application with a code path which is only triggered if a specified file is read-only. If the file is readable and writeable another code path is taken. In particular, I am struggling ...