Questions tagged [modifier]
347 questions
19
votes
2 answers
Add final modifier at runtime in Java
It might sound a bit strange, but is it possible to add the final modifier at runtime?
I have a variable which is marked as public static int/short. At certain point I want to prevent changing its value, and I want to keep its accessibility as a…

user2749903
- 1,275
- 1
- 10
- 20
16
votes
6 answers
php global variable modifier not working
I'm using the basic php example for the global modifier, and it doesn't work for me :-|
$a = 1;
$b = 2;
function Sum()
{
global $a, $b;
$b = $a + $b;
}
Sum();
echo "***: ".$b;
Here is the result...
$ ***: 2
Is there any parameter on the…
kanji
15
votes
4 answers
Why use the `transient` keyword in java?
I have an issue related to the transient keyword's use before the private modifier in java .
variable declaration:
transient private ResourceBundle pageResourceBundle;
My class looks like this :
public class LoginViewModel extends…

Sitansu
- 3,225
- 8
- 34
- 61
13
votes
3 answers
Use of Scala's private final modifier?
What can I use the private final modifier in Scala for?
Given the below code:
1| class A { def callFoo = foo; private final def foo = "bar of A" }
2| class B extends A { private final def foo = "bar of B"}
3| println((new A()).callFoo)
4|…

Tim Friske
- 2,012
- 1
- 18
- 28
12
votes
3 answers
What is the default value of the padding modifier in swift?
just a quick question. I couldn't find the default value of Swift's .padding() modifier.
ModelSelectorItem(variant: variant)
.padding()
I know that I can just omit the value and swift is providing the default value on its own.
Q: What is the…

colin
- 761
- 1
- 11
- 24
12
votes
7 answers
In SwiftUI, is it possible to use a modifier only for a certain os target?
Good day! In SwiftUI, is it possible to use a modifier only for a certain os target?
In the following code I would like to use the modifier .listStyle(SidebarListStyle()) only for the MacOS target because it does not exist for the iOS target. Thanks…

Wild8x
- 459
- 4
- 13
12
votes
1 answer
Why preg_replace throws me a "Unknown modifier" error?
I keep getting this error:
Warning: preg_match()
[function.preg-match]: Unknown
modifier 't' in
D:\xampp\htdocs\administrator\components\com_smms\functions\plugin.php
on line 235
on:
$PageContent = preg_replace($result->module_pregmatch,…

privateace
- 1,367
- 6
- 16
- 24
11
votes
1 answer
MaterialButtonToggleGroup in Jetpack Compose
I want to implement the MaterialButtonToggleGroup in Jetpack Compose. This component looks like this (image taken from here):
So far, I got the following result:
Note, that the vertical grey border next to the vertical blue border are present. In…

LN-12
- 792
- 8
- 19
10
votes
2 answers
Escaping metacharacters in a Raku regex (like Perl's quotemeta() or \Q...\E)?
How can I escape metacharacters in a Raku regex the way I would with Perl's quotemeta function (\Q..\E)?
That is, the Perl code
my $sentence = 'The quick brown fox jumped over the lazy dog';
my $substring = 'quick.*?fox';
$sentence =~…

codesections
- 8,900
- 16
- 50
10
votes
3 answers
How can I chain together filename modifiers in a bash shell?
I understand the modifiers # ## % %%, but I can't figure out if its possible to chain them together as you can in tcsh.
Example in tcsh
set f = /foo/bar/myfile.0076.jpg
echo $f:r:e
--> 0076
echo $f:h:t
--> bar
In bash, I'd like to know how to do…

Julian Mann
- 6,256
- 5
- 31
- 43
9
votes
2 answers
decrease size of icon in jetpack compose to match row height
I have the following composable.
@Composable
fun Temp() {
Row(
modifier = Modifier
.background(Color.Red)
.height(IntrinsicSize.Min)
.fillMaxWidth()
) {
Text(text = "Hello", fontSize =…

Diken Mhrz
- 327
- 2
- 14
9
votes
3 answers
__printflike__ modifier
what is "__printflike__ modifier" exactly? what does this term mean?

hari
- 9,439
- 27
- 76
- 110
9
votes
4 answers
How do I use a variable as a regex modifier in Perl?
I'm writing an abstraction function that will ask the user a given question and validate the answer based on a given regular expression. The question is repeated until the answer matches the validation regexp.
However, I also want the client to be…

livefree75
- 720
- 8
- 18
9
votes
3 answers
Why make class members private?
I've learn C++ for some time, however there is always this question which puzzles me (for years). In school, our lecturers like to declare class variables as private. In order to access it, we have to declare an accessor to access it.
Sometimes we…

user3437460
- 17,253
- 15
- 58
- 106
7
votes
0 answers
Fold in and Fold out in modifier
I have a question about jetpack compose modifier.
I can't understand foldin and foldout, what are them and when I can use them?
Thank you

melikaafrakhteh
- 305
- 1
- 2
- 8