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?
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…
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 =…
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): …
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…
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 :…
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…
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…
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.
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…
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…
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…
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…
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…
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…
J. Hesters
  • 8,261
  • 15
  • 78
  • 164