Questions tagged [class-names]
86 questions
104
votes
3 answers
Clsx - What is and how to use it
I am trying to understand some uses of clsx in assigning classnames to a component in React.
The construct
className={clsx(classes.menuButton, open && classes.hide)}
is clear enough. It applies classes.menuButton, and also applies classes.hide if…

millport
- 2,411
- 5
- 23
- 19
35
votes
5 answers
Selenium Compound class names not permitted
I have the below code that clicks on an element to pop up a screen and copy the text in it
el1 = driver.find_element_by_id("keyDev-A")
el1.click()
el2 = driver.find_element_by_class_name("content")
print(el2.text)
However, when I tried to get…

jake wong
- 4,909
- 12
- 42
- 85
19
votes
3 answers
Is it possible use a class name in java switch/case statement?
I would like to use a java switch statement, which uses class names as case constants. Is it possible somehow? Or do I have to duplicate the class names?
Following code does not work because of compiler error:
case expressions must be constant…

dedek
- 7,981
- 3
- 38
- 68
12
votes
1 answer
Prefixing JAXB generated classes
I have this Maven "task" to generate Java classes from an XSD file using JAXB.
com.sun.tools.xjc.maven2
maven-jaxb-plugin
…

Bart van Heukelom
- 43,244
- 59
- 186
- 301
11
votes
5 answers
Selenium python find_element_by_class_name() stopped working from v 2.2 to 2.21 -- cannot use 'Compound Class Name'
I am using Selenium's python library to scrape data from a html page in Firefox.
I have had to update from Selenium 2.0 to 2.21 because the server has updated Firefox.
In v 2.21 calls to find_element_by_class_name("grid-cell-inner grid-col-name")…

Robert Hector
- 119
- 1
- 1
- 3
10
votes
7 answers
Is it possible to have two classes with the same name if they're in different folders?
I was wondering if there is anything wrong with having two classes with the same name in PHP if they're in different sub folders, other than the obvious "human factor" of editing the wrong file by mistake?
I have looked for other posts relating to…

Chris
- 882
- 1
- 10
- 22
9
votes
2 answers
How to combine multiple classNames in React?
I'm writing a small React app with Create-React-App. For simple styling tweaks I use tachyons-css. Due to frequent reappearing CSS styling issues I recently switched from classic CSS styling to CSS modules (also valid question for SCSS). Now I…

ft-be
- 103
- 1
- 1
- 7
7
votes
13 answers
Really long class/variable/property/method names
Some friends and colleagues of mine have a little running contest to find or write the longest class/variable/property/method names possible. Keep in mind, we try to be good boys and girls and keep the naming intelligible and concise, while still…

Zachary Yates
- 12,966
- 7
- 55
- 87
7
votes
3 answers
Is there an elegant way to add multiple HTML classes with XSLT?
Let's say I'm transforming a multiple-choice quiz from an arbitrary XML format to HTML. Each choice will be represented as an HTML tag in the result document. For each choice, I want to add an HTML class of correct to the if that choice…

Jakob
- 2,588
- 5
- 27
- 34
6
votes
3 answers
Does Symbol table for C++ code contain function names along with class names?
I have been searching through various posts regarding whether symbol table for a C++ code contains functions' name along with the class name. Something which i could find on a post is that it depends on the type of compiler,
if it compiles code in…

user2181750
- 241
- 5
- 15
5
votes
2 answers
Can class name be referenced implicitly at compile-time?
Is there a way to implicitly reference a class' name at compile-time?
Specifically, if I want to declare an instance of template class A using class B from within the scope of class B, is there a way to avoid explicit reference to "B" in the syntax…

StoneThrow
- 5,314
- 4
- 44
- 86
5
votes
2 answers
Change paper color Material-UI
I'm developing a React project using the material-ui library. I'm currently trying to add a drawer which is working fine for me. However, I'm trying to change the background color of this drawer. I've heard that the way to do this is by changing the…

Sean
- 592
- 4
- 9
- 19
5
votes
1 answer
classnames_1.default is not a function when testing with Jest
I am facing issue with running test cases on Jest when classnames ( https://www.npmjs.com/package/classnames ) library is being used :
It throws error : classnames_1.default is not a function
It is working with webpack on website itself.. so i don't…

Anil Sharma
- 275
- 1
- 6
- 16
5
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
- 3,425
- 10
- 37
- 49
4
votes
6 answers
Is "World" reserved Class name in AS3?
Does anyone knows something about "World" being reserved or built in class with that name?
when I try to construct the World class I've created it throws compile error:
1136: Incorrect number of arguments. Expected 2.
But I've million times…

Rihards
- 10,241
- 14
- 58
- 78