Questions tagged [class-names]
69 questions
3
votes
1 answer
Why is collections.Counter uppercase and collections.defaultdict is not?
Some of the elements in the collections module seem to be uppercase, some other not. Is there a specific rationale behind it?
![](../../users/profiles/2397318.webp)
meto
- 2,479
- 5
- 28
- 41
2
votes
2 answers
What's the name for a class that simply contains mixins?
Is there a name for a class that simply acts as a holder for mixins?
A simple example in C++ would look like this:
template
class WhatsMyName : Mixins... {
};
WhatsMyName doesn't have any functionality of its own, and is just a…
![](../../users/profiles/66450.webp)
Casey Rodarmor
- 12,867
- 5
- 28
- 31
2
votes
0 answers
Browser javascript output doesn't show classname (unlike Node)
Нello! I have the following short bit of javascript:
let DynamicallyNamedClass = className => {
let F = function() {
this.v = 'hi';
};
Object.defineProperty(F, 'name', { value: className });
return F;
};
let AmazingClass =…
![](../../users/profiles/830905.webp)
Gershy
- 5,378
- 1
- 27
- 38
2
votes
1 answer
Use class name to access static variables
Is there a way to access a class variable without explicitly using the class name, in case I decided to change the name of the class later on?
Something like this
static_variable = 'stuff'
className = CLASS
def method (self):
…
![](../../users/profiles/4403387.webp)
Rethipher
- 338
- 1
- 13
2
votes
1 answer
How to handle acronyms in class names?
Instead of explaning I'll provide a simple and short example:
I would call a class that parses XMLs XMLParser. Sometime I run into problems,
e.g. I want to create a class that labels XMLs, but XMLLabeler seems kind of odd, because of the two same…
![](../../users/profiles/1809463.webp)
mike
- 4,509
- 4
- 33
- 72
2
votes
1 answer
How to get class name from package name in android?
I want to make a list of both installed and system applications separately.Below is my code
List appList = packageManager.getInstalledApplications(0);
if(appList != null && !appList.isEmpty()){
for (ApplicationInfo appInfo :…
![](../../users/profiles/1770401.webp)
Devu Soman
- 2,138
- 12
- 32
- 55
1
vote
1 answer
Sonar and Flex plugin - Dollars ($) are not accepted in java class names
In reference to this bug from Sonar:
http://jira.codehaus.org/browse/SONAR-1865
and this one (which cross references the one above):
http://jira.codehaus.org/browse/SONAR-1637
I am still seeing this issue.
I am using Sonar server version 2.12.
I am…
![](../../users/profiles/733389.webp)
742626
- 23
- 3
1
vote
1 answer
How to type check if object keys conform a conditional recursive template type?
The question is easy to understand with an example. I'd want to achieve a strictly type guarded wrapper for https://npmjs.com/package/classnames, to type check the Tailwind class names that our app uses.
So far the closest solution is this…
![](../../users/profiles/1446092.webp)
Kimmo
- 1,638
- 1
- 19
- 27
1
vote
1 answer
How do I use the npm classnames library in next.js to optionally apply styles from a css file?
In the html below, I am optionally applying the bootstrap classes, alert-danger or alert-primary depending on message.error or message.info. The target classes are bootstrap classes and it works as expected.
![](../../users/profiles/5618611.webp)
koque
- 1,182
- 2
- 15
- 35
1
vote
1 answer
Using classnames with purgecss
I am using classnames with purgeCSS and Webpack.
Apparently PurgeCSS can't handle those classnames itself.
How can I implement an extractor that filters classnames defined in the classnames() function?
my webpack.config.js is in the answers as I…
![](../../users/profiles/4445399.webp)
Bastian Fießinger
- 195
- 1
- 10
1
vote
0 answers
Material UI: Conditional class names not having any effect using classnames library
I am trying to conditionally render class names using classnames npm library and in the DOM it seems they are getting added but I am unable to see the CSS effects behind those classes. I am mainly trying to change the border conditonally.
Below are…
![](../../users/profiles/4622643.webp)
Rajat Bansal
- 215
- 1
- 9
1
vote
1 answer
Multiple Ui_Dialog definitions due to multiple *.ui files?
I'm working on a RaspberryPi with a 3.5 inch LCD screen. I have a Qt 5 based application that operates in kiosk mode without a title bar. The app uses the entire 320x480 screen. I am trying to add a second dialog that is displayed when the user…
![](../../users/profiles/608639.webp)
jww
- 83,594
- 69
- 338
- 732
1
vote
2 answers
ClassName is not being passed to Objects
Code is below. I'm trying to pass an active state to a slide in a carousel for React. But in the inspector, all I get is class name [object. object] instead of the correct class name. Is there a particular reason why the className is not being…
![](../../users/profiles/12081152.webp)
timidwood16
- 49
- 3
1
vote
2 answers
Should or Must in Java file name
I'm learning about Java and have just encountered 2 instructions:
A class must have a matching filename
Remember that the name of the java file should match the class name
Ask:
Should in (2) LIKE or DIFFERENT Must in (1) ?? -> (1), (2).
What is…
![](../../users/profiles/10721258.webp)
Puskin
- 94
- 1
- 8
1
vote
1 answer
TypeScript with classnames: No index signature
I'm writing a React app and I'm using classnames to help with my styling.
I join my classnames like this:
const appBarClasses = classNames({
[classes.appBar]: true,
[classes[color]]: color,
[classes.fixed]: fixed
});
In the line where I set…
![](../../users/profiles/8331756.webp)
J. Hesters
- 8,261
- 15
- 78
- 164