1,211
questions
0
votes
0
answers
11
views
Protecting worksheet cells after data entry
I have been trying different approaches to protect a worksheet from being changed after data entry. The behavior I am trying to achieve is to allow users to make entries into a cell but then lock ...
4
votes
2
answers
84
views
What version of C# stopped requiring protected interface members to be implemented explicitly?
In C# 8, interfaces were upgraded to allow protected members, among other access modifiers. At the time, implementing classes were required to explicitly implement such protected interface members.
So,...
0
votes
1
answer
26
views
How to redirect to homepage after successful token validation
ProtectedRoute.js
import { Navigate } from 'react-router-dom';
import Cookies from 'js-cookie';
import { checkToken } from './auth';
import Admin from '../pages/Admin-page/Admin';
const ...
2
votes
2
answers
155
views
Protected and "package-private" visibility when inheriting from class in different package
I'm kind of new to visibility and want to really internilize these concepts.
I've learnt that "package-private", the default visibility in Java, allows us to see fields from classes in the ...
0
votes
1
answer
52
views
How to get values from all unprotected cells from a protected google sheet to another sheet?
I created a "form" in google sheets and I protected the sheet except for some editable ranges that require an answer. I need the values from those unprotected cells and copy them in a row to ...
0
votes
1
answer
38
views
accessing a method through subclass of a class in which the method is protected
STRUCTURE
src
├── pkg
│ ├── subpkg1
│ │ └── restaurant.java
│ ├── subpkg2
│ ├── H.java
│ └── test2.java
file name= restaurant.java
package pkg.subpkg1;
public class restaurant {
...
0
votes
1
answer
53
views
Why we don't use named local function to create "private function" in Lua? [closed]
Lua dosen't provide protection level keywords such as public / private / protected. If we want to create a field that only useable in current area, most of the time we use "local" keyword. ...
-1
votes
1
answer
167
views
Protect routes with user has roles
I want to protect my routes in reactjs and i have users with roles so please show me how to do it in home page i have login with checkbox for roles Student And Teacher and i have this routes please ...
0
votes
1
answer
40
views
How to write Mock Unit Test Code that will Test a class method that downcasts an input argument interface as a concrete class?
I'm writing mock unit test code that will Test a class method that downcasts an input argument interface as a concrete class.
Here is the “System Under Test(SUT)” class called CarWrapperFactory:
...
0
votes
0
answers
76
views
Running a pipeline on a protected branch in GitLab
We set up a containerized GitLab instance recently and we're trying to set up CI/CD pipelines to run on our repositories.
We have the runners set up and working, and as we created these repositories, ...
0
votes
0
answers
27
views
Generate protected zip file from local file and upload to server - Angular
I need to upload a file to a server from my Angular project, but I need this file to be protected (e.g. in a zip with a password).
I'm trying to use archiver-zip-encrypted, but being pure js I have ...
0
votes
0
answers
13
views
Chromecast not playing protected files
I have an HTML5 player with the chromecast streaming option in the controlbar. Some files it plays are on a different domain that has file protection enabled and permissions enabled for my domain so ...
0
votes
0
answers
22
views
How to reset field setProtection in Java
I cant reset protection to one field.
Hello,
screenControl is a class, which makes sense in connection with a screen.
setProtection is a method of the ScreenControl class. The setProtection method ...
0
votes
0
answers
246
views
How to detect password protected file in Angular 14+ without using Promise calls
`Have a requirement of identifying the uploaded file is a password protected file or not. Based in the response I have to block the file being uploaded to the server.
Html:
<input type="file&...
0
votes
0
answers
35
views
Is there a way to encapsulate certain properties in a Swift protocol so they aren't visible to users of the protocol?
I am looking for a way to encapsulate certain properties in a Swift protocol to hide them from users of the protocol while making them available to types implementing the protocol.
Here is a simple ...
0
votes
1
answer
97
views
Avalonia FuncUI PointerPressedEventArgs, how to access protected member without using reflection?
In my F# Avalonia FuncUI desktop app, I wanted a callback when the user presses the mouse 'Back' button in my FuncUI component. I eventually got it working using reflection, as below. I was wondering ...
0
votes
2
answers
212
views
How to create a private custom event or how to handle/apply event-dispatching in the most protected way possible?
I would like to create a private custom event, an event nobody else can dispatch or listen. I tried this, but it does not work:
new CustomEvent(Symbol("validate"));
Is it possible?
I know I ...
0
votes
0
answers
15
views
I would like to understand how the protected modifier works and how its access is restricted?
I'm looking for the solution of the protected modifier use. I've defined the simple implementation of a 'protected' method in a different package, and I'm trying to call that method from the child ...
1
vote
1
answer
145
views
Jasmine access protected property
I'm now to angular and have just completed my first implementation of angular inheritance.
I need to write a test case for the subclass where I cam assign value to protected variable (coming from base ...
-3
votes
1
answer
129
views
Restrict to modify the Terraform source code
How to encrypt or protect the terraform source tf. I dont want others to change or view the content inside terraform main.tf files.
Is there anyway to convert this main.tf as executable or encrypted ...
0
votes
0
answers
153
views
NextJS | Typescript issue when i import my protected auth to page
this my protected.tsx,when i one use this on page below,some error comes like
Server Error
Error: Attempted to call the default export of C:\Importir.id\NextJs\diecast-app\app\hoc\withProtected.tsx ...
0
votes
0
answers
71
views
Why is overriding necessary for the clone() method in the class if we are calling the clone() on the instance of the class in some other class? [duplicate]
class Cat {
int j;
Cat(int j) {
this.j = j;
}
}
class Dog implements Cloneable {
int i;
Cat c;
Dog(Cat c, int i) {
this.c = c;
this.i = i;
}
...
1
vote
2
answers
83
views
Inheritance of protected class
I have a doubt with this code ( it is a question into a test so I don't need to change ):
class X {
protected:
int v;
};
class Y : protected X {
public:
Y() : v(0) {}
};
int main()
{...
0
votes
0
answers
30
views
Copy Whole Spreadsheet and keep Custom Permissions
I have a budget spreadsheet for 2023. It has protected ranges. The permissions are set so that myself and my manager can make edits to all of the protected ranges (I did this through setting a custom ...
1
vote
2
answers
297
views
How can I Mock HttpResponseMessage SendAsync in VB.NET?
I have found literally a hundred posts on how to do this in C#, but not a one on how to do it in VB.Net. Every attempt to translate these methods into VB.NET has failed. It seems to boil down to the ...
0
votes
0
answers
10
views
AllowedRoles in react lead to unothorized page, though role is correct [duplicate]
The target is to implement protected routes using RTKQuery and React Router 6. The problem is that whenever i reload the page I get redirected to unouthorized component, not to the outlet
I am trying ...
1
vote
1
answer
132
views
What is the correct syntax for mock.Verify for a protected setup?
I have the following unit test:
[TestMethod]
public async Task ShouldGetExperimentalValuePost()
{
//arrange
var avd = ActualVesselData.Parser.ParseJson(File.ReadAllText(".\\TestFiles\\...
1
vote
1
answer
418
views
how to access protected method inside unit test on kotlin
is there a way to get inside protected value and access it on kotlin unit test, below are my doPost protected method, i tried with reflection but its not working, following this sample
https://...
-2
votes
1
answer
42
views
OOP in PHP - Inheritance - protected method error [closed]
//((inheritance))
class ParentClass
{
public function public_message()
{
echo "This is a Public message" . "<br>" . "from Parent class .";
}
...
-1
votes
2
answers
43
views
Why ant we have protected top level class in java? [closed]
If i have a top level class classA in packageA, and i want to make a classB extend classA, but i want to include classB in packageB, without any other class in packageB being able to have access to ...
1
vote
0
answers
129
views
Exception of type 'System.AccessViolationException' occurred in Unknown Module. Attempted to read or write protected memory
I have created a c++ dll and using in the Project using [DllImport("dll")] while i am using this dll after build it crashes at following function AES_init_ctx();
This is my DLL Code:
"...
1
vote
1
answer
73
views
Inheritance, child class changing a protected field from Parent Class in C#
I am currently picking up C# and I have issue on understanding inheritance.
Here's my Code:
Here's the Parent Class:
class Member
{
protected int annualFee; // protected field =only ...
0
votes
1
answer
18
views
Typescript protected object contains public members
Why there is no compiler error, when writing dataField of protected object within class Something that is not derived of class parent?
I expected that this.obj.data and all properties are read-only. ...
1
vote
1
answer
112
views
What is the equivalent of Java's protected attributes in Nim?
I was playing around with OOP in Nim and when I tried to implement inheritance between two Nim types in different files, I encounter the following problem, when importing a type from other file could ...
0
votes
1
answer
295
views
How to pass uninstallation password to remote system via powershell to uninstall an application which is password Protected
I can silently uninstall application which doesn't have password Protected using Powershell .
Start-Process -Wait -FilePath $uninstall32 /SILENT
For password protected application (Setup created ...
0
votes
0
answers
17
views
Getting solr index fields list from protected solr instance by query
I have solr instance which is protected with username and password. How can I get solr fields list from protected solr
solr query to get all field list from protected solr instance
I have using solr ...
0
votes
1
answer
120
views
Can someone help me on usb debugging on android 4.1.2
when im turning on usb debugging it has a password like this
im just want to install custom recovery
so because that i cant install custom recovery
enabling developer>enabling usb debugging>...
1
vote
2
answers
97
views
Is there a difference between protected class methods and private class methods in Ruby?
I'm trying to understand the difference between private class methods and protected class methods in Ruby in terms of accessibility. I've provided a code example that I am using to study the ...
0
votes
1
answer
73
views
c++ 14 (VS 2015) shared_ptr with protected inheritance - no suitable user defined conversion
I'm getting a strange compilation error when using shared pointer with protected inheritance. The below simple code doesn't compile and gives error "no suitable user defined conversion" but ...
1
vote
1
answer
123
views
Is there a need to provide a std::mutex for std::async?
As stuff I mentioned above, Should I prodive a std::mutex for std::async in the following section? :
#include <vector>
#include <future>
#include <mutex>
#include <ranges>
int ...
0
votes
2
answers
147
views
How can I update a protected variable on the abstract class by its derived classes?
I would like to define an abstract Menu class, from which all the derived classes can inherit the functions, but i want that all derived classes can update a single protected vector variable on the ...
1
vote
1
answer
2k
views
VBA code to protect worksheet but allow filtering
I have a worksheet where i want to limit changes made by users but also allow columns to be grouped so i used the following code. I then realised i can't filter on the protected sheet so amended the ...
1
vote
1
answer
66
views
Does 'friend' declaration affect the accessibility of members in the Base class?
I am confused on the effectiveness of a friend declaration.
In the first example, this friend declaration in Base caused me to not get an error on d.j and d.k in the main() function.
However, in the ...
0
votes
0
answers
84
views
"methodX() is a protected member of MyClass" error inside class that extends MyClass
In the following code:
struct A{
protected:
virtual void IAmProtected() = 0;
};
struct B: public A{
private:
A * a;
protected:
void IAmProtected() override;
public:
void ...
0
votes
1
answer
957
views
Accessing protected members from class implementation in TypeScript
I'm getting this error when trying to implement a protected member in TypeScript.
Is there a way to avoid it? Or am I doing something the wrong way here?
It seems that TypeScript does not recognize ...
0
votes
0
answers
83
views
Change Chart Axis in Protected Sheet via VBA
I am struggling to dynamically change the axis of a chart in a protected worksheet.
The code below works on an unprotected sheet.
Once I protect the sheet the code is not unprotecting the sheet and it ...
0
votes
1
answer
30
views
How can I access a protected variable in child class through an abstract class pointer?
I have an abstract class that I have derived from two child classes. One of them has a protected variable that the other one does not. To make the code more general, I have to use an smart pointer of ...
0
votes
1
answer
1k
views
multiple selection dropdown list not working on a protected excel sheet
The multiselect doesn't work if the worksheet is protected, even if the actual cell containing the dropdown list is unlocked. It just behaves like a normal data validation list, i.e. the code is ...
0
votes
1
answer
320
views
Best way to password-protect folders on IIS
What is the best way to password-protect a folder on IIS with a single set of credentials to be shared by a group of users?
Our hosting service offers Plesk, which in turn offers a "password-...
2
votes
0
answers
219
views
Why can't I access the protected function in the derived class
I have a Base class and derived another class from it. The derived class has a function which takes as an argument const Base& and calls its protected member function. I get an error saying that ...