1,206 questions
0
votes
1
answer
160
views
Some container adaptors have protected members, so why don't they also have virtual destructors?
Several container adaptors--specifically, std::priority_queue, std::stack, and std::queue--provide protected access to an underlying first-order container like std::vector or std::deque. That seems ...
1
vote
1
answer
100
views
Subclassing and overriding Java class with protected field access
The scala project is depending on the Java lib that I cannot modify. I need to extend one of the Java classes and override method, however I have issues with protected visibility:
package com.a;
...
2
votes
1
answer
148
views
How to check if a class has a protected member function?
Consider this simple piece of C++ code:
class Foo
{
public:
Foo() = default;
};
int main() {
static_assert(std::is_default_constructible_v<Foo>);
return 0;
}
Foo has public ...
0
votes
0
answers
141
views
Decrypting v20 cookies [duplicate]
I am trying to decrypt v20 cookies in C#. Like it is done here
And I am stuck on the 1st step already, on decrypting the app bound key.
var appBoundEncKeyB64 = JObject.Parse(localState)["os_crypt&...
0
votes
1
answer
126
views
Ghostscript is returning exit code 0 if password is not set to decode encrypted PDF file
We are trying to transform password protected PDF file using Ghostscript without setting password.
We are seeing the below error.
**** Error: Couldn't initialise file.
Output may be incorrect.
No ...
0
votes
0
answers
52
views
I want to save file that contains shapes without the shapes. My code is alright but when I make it protected it shows error in. what can I do?
Sub SR_SaveAsExcel()
Dim invno As Long
Dim fname As String
invno = Range("C9")
fname = "Sales Records of "
Worksheets("Sales Records").Copy
Application.DisplayAlerts =...
-4
votes
2
answers
120
views
Why can I not update the default values of a derived class through a constructor? [closed]
I am trying to wrap my head around inheritance.
I've created a BasePerson class that has some protected elements, and those elements have default values. I'm trying to "update" those default ...
4
votes
2
answers
108
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
61
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
306
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
147
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
62
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
169
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
631
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 ...
-1
votes
1
answer
78
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:
...