Questions tagged [modifier]
347 questions
3
votes
4 answers
Visibility modifier with abstract method signatures in Java
Quick question:
Is the proper syntax:
public abstract void myMethod();
OR
abstract public void myMethod();
... The difference being the order of the keywords public and abstract.
Both compile without warnings, but which is the proper syntax?

coder5
- 67
- 2
- 7
3
votes
2 answers
How to determine the modifiers for a method or field in Eclipse JDT?
I am writing some simple AST visitors for the Eclipse JDT. I have a MethodVisitor and FieldVisitor class which each extend the ASTVisitor. Take the MethodVisitor for instance. In that class' Visit method (which is an override), I am able to find…

jbranchaud
- 5,909
- 9
- 45
- 70
3
votes
1 answer
Use xkbdmap (setxkbmap) to map rwin to altgr?
Normally, I can find solutions by just googling around, but I can't find any decent documentation for xkbdmap except for the grossly inadequate man page.
Perhaps I'm going about this the wrong way. I have a US 105 plain old keyboard that does not…

Mike
- 2,393
- 3
- 25
- 37
3
votes
1 answer
SwiftUI apply view modifier to specific subviews in view hierarchy
I'm curious on how does SwiftUI applies some of the available view modifiers like keyboardShortcut, which can be applied to any View but it will only work on the first Button child it finds down the view hierarchy:
The target of a keyboard shortcut…

Daniel Illescas
- 5,346
- 3
- 17
- 23
3
votes
1 answer
How to create custom Modifier to manipulate custom View in SwiftUI?
Context
Hi, I am currently working a lot with SwiftUI and encountered a problem while working with Modifiers. I have this basic setup:
Code
// This TitleView Protocol should be adapted by all SwiftUI Views containing a Title.
protocol TitleView:…

christophriepe
- 1,157
- 12
- 47
3
votes
2 answers
SwiftUI - Ternary operator on padding modifier crashes program
I've got a ZStack in SwiftUI filled with some components delivered by a ForEach, as follows:
ForEach(0..

Nicolas Gimelli
- 695
- 7
- 19
3
votes
1 answer
Jetpack Compose function with lambda () -> Unit
I'm trying to extract a method applied on a modifier into a Composable function
TopAppBar(
modifier = Modifier
.align(Alignment.TopCenter)
.height(56.dp)
.background(
…

Saul
- 91
- 2
- 14
3
votes
2 answers
perl regex unexpected behaviour of /m modifier
I want to remove leading and trailing spaces from a multi-line string with this regular expression:
s/^\s*|\s*$//mg
It seems to work more or less fine in this example:
perl -e '$_=" a \n \n b\n"; s/^\s*|\s*$//mg; print "$_\n";'
which gives the…

Kris Van Bruwaene
- 47
- 2
3
votes
3 answers
Objective-C Modifers for static?
How do I create a static variable in my Objective-C class? I'm familiar with using @private in my header files for private variables, but I am trying to create a static method which accesses a static variable. How should I declare this static…

StanLe
- 5,037
- 9
- 38
- 41
3
votes
3 answers
How to use same set of modifiers for various shapes
As a part of my learning SwiftUI project I do some shape rotations and I have code below. I'm wondering how to avoid of same three lines of modifiers for each shape.
func getShape(shape: Int, i: Int) -> AnyView {
switch shape {
case 0:
…

Dawy
- 770
- 6
- 23
3
votes
3 answers
C# Why does the argument array has to be passed with the modifier ref if arrays are passed by reference?
I do not understand why this function was written like that:
System.Array.Resize(ref int[], int)
If arrays are passed by reference by default
why wasn't it written like that:
System.Array.Resize(int[], int)

Algo
- 178
- 7
3
votes
3 answers
Printing static variable without class name leads to an error
public class ClearingDoubtsAboutStatic {
static
{
System.out.println("Static Block1 Output: "+ClearingDoubtsAboutStatic.statVar); //------Line 5
statVar=20; //-----Line 6
System.out.println("Static Block1 Output:…

SanQA
- 233
- 3
- 9
3
votes
2 answers
x:FieldModifier is not valid for the language C#?
When I apply x:FieldModifier to my WPF control, eg:
visual studio (tried on 2008 and 2010) gives me the following error:
x:FieldModifier is not valid for the
language C#
How can I solve this…

Bolu
- 8,696
- 4
- 38
- 70
3
votes
1 answer
Any way to remove a modifier from multiple objects in Blender?
So, I'm doing a 5,000 frame animation for school (high school film making project, and I just want to look cool) and I just realized, while looking at the final render, that I have a subsurf modifier on some of my grass.
Horrible mistake, made by…

ABuzzedWhaler
- 33
- 2
- 6
3
votes
1 answer
AltGr vs LeftCtrl
German keyboards have a Key called "Alt Gr". Its seems like windows treats it like pressing alt+ctrl.
But I have to find out (in c#) if the user pressed the key together with left ctrl.
Is there a way to distinguish between
User presses: "Alt Gr"…

Generator
- 41
- 2