Skip to main content

Questions tagged [attr]

This tag should be used for attribute related issues.

0 votes
1 answer
68 views

Removing an attribute on keydown jQuery [duplicate]

Update: I've heavily edited this question because no one seemed to be grasping what I'm trying to accomplish. When a user is focused on a heading in the example below and presses the down arrow key, I ...
DeanH's user avatar
  • 497
-3 votes
2 answers
48 views

Unbind class selector jquery after changing class of a div [closed]

I am dynamically altering the class of a div when ajax request completes. <div id="MyDiv1" class="oldclass">Age</div> Inside the success function of ajax request : $(...
sqlchild's user avatar
  • 8,968
0 votes
1 answer
133 views

How do I use Rust to read a HDF5 string attribute of a dataset using the hdf5-rust crate?

I've got a HDF5 file with the following structure viewed with h5dump: ❯ h5dump -n GMTCO_npp_d20181005_t2022358_e2024003_b35959_c20181008035331888329_cspp_dev.h5 HDF5 "...
geoff.cureton's user avatar
1 vote
3 answers
59 views

how to assign an attribute to some variables using another data frame?

I have a data frame with 20 variables. I need to assign a description to some of the variables using the attr() function. The descriptions and the name of the desired variables form two columns in ...
Rara's user avatar
  • 193
0 votes
1 answer
129 views

Using class methods to return instances and simply defining __init__(self, **kwargs):

One pattern I recently started using is writing class methods to return instances. In particular, I've been using it for dataclasses (with or without the @dataclass decorator). But it has also led me ...
shridhar singh's user avatar
1 vote
2 answers
74 views

extracting column attribute inside a function

Say I have the following tibble: df1 <- structure(list(var1 = structure(c("Didn't do a thing", "Almost did a thing", "Once did a thing", "Have never done a thing&...
C.Robin's user avatar
  • 1,179
2 votes
1 answer
66 views

How to html text show as par this attribute in jQuery?

The problem is not shown in each tag. I face some issues like this: attr is not a function. $('document').ready(function() { jQuery('.custom-size .size .text').each(function() { var ...
Rubel Parvaz's user avatar
2 votes
1 answer
288 views

What is difference between binding to attribute and binding to property in Angular?

I understand that when we bind to data attributes, we need to use the syntax [attr.data-something]="expression" But why do we need to bind to, for example, id, title, name in the same way? ...
Vladislav's user avatar
1 vote
2 answers
367 views

How to mypy typehint an attrs validator attribute

Given the following: from pathlib import Path import attr @attr.define(frozen=False) class ExampleAtt: x: str = attr.field() @x.validator def check(self, attribute: attr.Attribute, ...
baxx's user avatar
  • 4,338
1 vote
1 answer
59 views

Undefined 'href' attribute/jQuery

So I recently found out about webscraping using axios and cheerio. I thought it would be cool if I wrote a program in javascript that would get the download links of all the episodes of a series ...
overErrored's user avatar
0 votes
1 answer
66 views

How to remove HTML attribute starting with letter + number?

I want to remove attribute tags that start with a letter "z" followed by any digits ("z#"). But I have errors as you can see when running this snippet: $("#main article").each(...
Renato Ramos's user avatar
0 votes
1 answer
145 views

How to remove the "locked" flag (programmatically)

(MacOS Monterey): I have external hard disks with files written under Windows, using Cygwin rsync. The files are perfectly readable under MacOS, but when I want to delete/overwrite them, quite some ...
user1934428's user avatar
  • 21.6k
0 votes
2 answers
31 views

How to get a css property using css?

What I want is when an element has the class hover_effect, there will be a two pixel outline with the same color as the border whenever you hover over it. As you can see in the code below. The problem ...
Sten's user avatar
  • 37
0 votes
0 answers
87 views

Obtain drawable from ?android:attr programatically

I want to create RadioButton programatically and set drawable End using resource from ?android:attr. The equivalent in xml is this: android:drawableEnd="?android:attr/listChoiceIndicatorSingle&...
wiryadev's user avatar
  • 1,361
0 votes
1 answer
181 views

Applying attrs.frozen in metaclass removes Python type annotations

I try to apply attrs.frozen to all inheriting classes. To do that I used a metaclass: class MetaKlass(type): def __new__(mcs, name: str, bases: tuple[type, ...], attrs: dict[str, Any]): ...
Daniel Konopka's user avatar

15 30 50 per page
1
2 3 4 5
84