Questions tagged [modifier]
347 questions
3
votes
1 answer
Add /*package*/ in package private class
Is there any java standards that states that a package private class should have a /package/ in the beginning of the class name?
/*package*/ class MyPackagePrivateClass {
private var1;
private var2;
}

whitefox
- 31
- 2
3
votes
1 answer
How to modify multiple elements of a block with BEM CSS
Let us say I have the following setup,
.block
.block__header
.block__content
.block__footer
Now I want to show an active state of this block. Let us say the block itself gets a green background and element 2 and 3 should get bold text. As I…

chris
- 113
- 1
- 6
3
votes
1 answer
Smarty modifier plugin with access to Smarty object
Can a modifier plugin for PHP Smarty access the Smarty object?
The block and function plugin types both take the current Smarty object as a parameter. i.e.
function smarty_function_NAME($params, Smarty_Internal_Template $Smarty) {...}
function…

Martijn
- 3,696
- 2
- 38
- 64
3
votes
3 answers
Protected method call from other package
I thought I understand protected modifier, but it looks like I don't.
The example is simple:
package com;
public class Main {
protected void method1() {
// some code
}
}
and:
package net;
import com.Main;
public class Out…

jarosik
- 4,136
- 10
- 36
- 53
3
votes
4 answers
make class only instantiable from specific class
Let's say I have 3 classes
class1, class2 and class3.
How can I have it that class1 can only get instantiated by class2 (class1 object = new class1()) but not by class3 or any other class?
I think it should work with modifiers but I am not sure.

maddo7
- 4,503
- 6
- 31
- 51
2
votes
1 answer
NCurses with Arrow Keys Plus Modifiers
I'm having trouble detecting arrow key presses with and without the SHIFT and CTRL modifiers pressed.
I have the following test code:
WINDOW * mainwin = initscr();
keypad(mainwin, TRUE);
int c = wgetch(mainwin);
This successfully returns different…

Nicholas
- 1,392
- 16
- 38
2
votes
3 answers
An interface in Java can have one and only one modifier which is public. Why are the rest not allowed?
Possible Duplicate:
Protected in Interfaces
The following code snippet shows that an interface in Java can have only one modifier which is public. No other modifiers (private and protected) are allowed within an interface neither with fields nor…

Bhavesh
- 4,607
- 13
- 43
- 70
2
votes
1 answer
Cant use combinedClickable and pointerInput on any component of Jetpack compose
Im trying to make a FLoatingActionButton that allows me to use onLongClick and gesture detection in case is draging up. Just creating the behavior of telegram or ws recording button.
Test 1 Using FloatingActionButton from Material3 dont work cause…
2
votes
1 answer
php RegExp: how to use newline in expression?
For example it works:
{}s
If I do this way, I get nothing:
{
}s
If I do this way, I get nothing:
{
}s
I suspect that I should use some modifier, but I know which one from here:…
Anthony
- 3,218
- 3
- 43
- 73
}s I suspect that I should use some modifier, but I know which one from here:…

Anthony
- 3,218
- 3
- 43
- 73
2
votes
2 answers
Modifiers fillMaxWidth() and wrapContentWidth() in Jetpack Compose
I am confused by what the modifiers fillMaxWidth() and wrapContentWidth() in Jetpack Compose do. I have read through the documentation and looked at their implementations, but I am still not exactly sure how they work (internally).
Here is my…

IT'S-ON
- 83
- 6
2
votes
1 answer
Using Perl/Moose, what happens to the value returned by modifiers?
Learning perl I just recently discovered the wonders of Moose!
I'm trying to wrap my head around modifiers -- or at least how the return values are handled... do they get stored someplace?
{package Util::Printable;
use Moose::Role;
requires…

qodeninja
- 10,946
- 30
- 98
- 152
2
votes
2 answers
What is the difference between sealed and internal in Kotlin?
What is the difference between sealed and internal in Kotlin? I have read Kotlin's documentation on sealed classes and visibility modifiers; however, it is still not clear to me when to use sealed vs. internal. Maybe someone could provide real-world…

papezjustin
- 2,223
- 6
- 24
- 31
2
votes
3 answers
Is there a way to specify function parameters and return value as const in dart?
I wrote an extension function to add SizedBox between every child in Column or Row to add space between child, instead of putting SizedBox between every child, for which I didn't find any other way around.
Column(
children: [
// widgets
…

Alraj
- 170
- 9
2
votes
0 answers
SwiftUI: Ternary Operator causing astronomical build times
I'm working with SwiftUI and simply want to change the frame of a VStack depending on a condition. When I write the code like this:
ForEach(0..

Nicolas Gimelli
- 695
- 7
- 19
2
votes
2 answers
perl regex to remove initial all-whitespace lines from a string: why does it work?
The regex s/\A\s*\n// removes every all-whitespace line from the beginning of a string.
It leaves everything else alone, including any whitespace that might begin the first visible line.
By "visible line," I mean a line that satisfies /\S/.
The code…

Jacob Wegelin
- 1,304
- 11
- 16