Is there a way to add a second class to an HTML tag using javascript? For example, say you had the element &lt;p class="a"&gt; and you wanted to add class="b". If you used document.getElementByClassName("a").class = "b" that would remove class "a". Is there a way to have both in the same element?
I have an element that already has a class: &lt;div class=&quot;someclass&quot;&gt;     &lt;img ... id=&quot;image1&quot; name=&quot;image1&quot; /&gt; &lt;/div&gt;  Now, I want to create a JavaScript function that will add a class to the div (not replace, but add). How can I do that?
Choice of ECC curve on USB token I would like to get a USB token to secure my keys. My use case is protection of 3 GnuPG keys that I will be using 10 times per day at least. I plan to create a new key ring from scratch. Because ECC seems more future-oriented than RSA, this is what I chose to use. I'm wondering which USB token to choose as well as which curve.  On  it is said that many people think curves recommended by the NIST or defined by Brainpool have a doubtful origin; therefore, they recommend the non-standardized Bernstein’s Curve 25519. On  one poster says that    He is not aware of any profound criticism of Brainpool curves, and Bernstein’s Curve 25519 is hard to protect against side-channel attacks when implemented in embedded devices.   As a result, I'm a bit lost as to which key/curve to choose. Smoke Generator does not work When I try to run the smoke simulator in Blender 2.62 I get no smoke at all. When I attempt to render, the only output is a black screen. What am I doing wrong here that is making the smoke simulation not render?  Is it a mistake I made, or a problem with Blender version 2.62? When should we use "and" and/or "and/or"? What's the difference between "and" and "and/or"?  How do we decide whether to use one or the other?  Note: Also it would be great if someone could explain how do we actually pronounce "and/or" verbally in a sentence... Transformer VA Ratings, Power factor, and Pulsed current What exactly goes into a transformer's VA rating? At a fundamental level it seems that there has to be a limit to what the VA rating can represent.  For example if I draw 2 Amps-RMS from the secondary of a 30VA rated transformer at 15 Vrms this makes sense as the maximum Complex Power I can draw. Still, at a power factor of 1 my maximum current in the transformer would be sqrt(2) * 2 Amps.   But what if my power factor is abysmally low (ie in a DC rectifier) due to harmonic distortion and while I still draw 2A-RMS I have brief current spikes of 15 Amps? Surely the transformer's magnetics couldn't handle these spikes as I'd expect the core would saturate.  My question is what is the practical limit for VA ratings of transformers? Would brief current spikes that reduce to only 2A-RMS in this case be fine? Obviously the secondary/primary copper losses play a part in the rating but how do the magnetics factor in?  I ask this because I am designing a simple bench power supply using a 125VA transformer with a 24Vrms secondary and am trying to figure out how much power I can draw before the current spikes into the inductor are too much for the transformer. I also don't want to have to resort to active PFC as I don't want to risk messing up any HVAC PCB design.  Thank you sir, problem about a host file sir, over department created a host file to run over office program in windows, but they give us dell system having operating system ubuntu 16.4 now my question is that how this add file in ubuntu to run the program. the windows command is given below  TO ACCESS FIORI - Please Follow the Instructions in this Video  Path:- C:\Windows\System32\drivers\etc  Copy attached Hosts File in the above path.  Fiori Link to access SAP in Google Chrome: What is the regular expression to match strings (in this case, file names) that start with 'Run' and have a filename extension of '.py'?  The regular expression should match any of the following:  RunFoo.py RunBar.py Run42.py   It should not match:  myRunFoo.py RunBar.py1 Run42.txt   The SQL equivalent of what I am looking for is ... LIKE 'Run%.py' .... Abnormal behavior with iwlwifi driver: the device is shown as not working Recently I've installed Kubuntu in a newly bought laptop with an Intel WiFi 6 AX200 network card, I can connect to the wifi without apparent problems but when I open the driver manager in the settings I face this weird situation:  Intel Corporation: Wi-Fi 6 AX200 This device is not working.  [ ] Using iwlwifi driver backport in DKMS format from backport-iwlwifi-dkms (open source)  [ ] Continue using a manually installed driver  [x] Do not use the device   Note that "Continue using a manually installed driver" is the only voice selectable in the list.  Here is some additional information:  $ lspci -nnk | grep 0280 -A3 02:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)         Subsystem: Intel Corporation Wi-Fi 6 AX200 [8086:0084]         Kernel driver in use: iwlwifi         Kernel modules: iwlwifi  $ rfkill list all 0: hci0: Bluetooth         Soft blocked: yes         Hard blocked: no 1: phy0: Wireless LAN         Soft blocked: no         Hard blocked: no  $ dmesg | grep iwl [    2.888227] iwlwifi 0000:02:00.0: enabling device (0000 -&gt; 0002) [    2.945179] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-50.ucode failed with error -2 [    2.945217] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-49.ucode failed with error -2 [    2.947244] iwlwifi 0000:02:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 43.2.23.17 [    2.947250] iwlwifi 0000:02:00.0: Found debug destination: EXTERNAL_DRAM [    2.947252] iwlwifi 0000:02:00.0: Found debug configuration: 0 [    2.947697] iwlwifi 0000:02:00.0: loaded firmware version 48.4fa0041f.0 op_mode iwlmvm [    3.145585] iwlwifi 0000:02:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340 [    3.159226] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM [    3.160060] iwlwifi 0000:02:00.0: Allocated 0x00400000 bytes for firmware monitor. [    3.336456] iwlwifi 0000:02:00.0: base HW address: 50:eb:71:d7:0b:40 [    3.353553] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0 [    4.457920] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM [    4.621843] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring [    4.629999] iwlwifi 0000:02:00.0: BIOS contains WGDS but no WRDS   Someone have idea why this happened? Unable to locate package Save an entire webpage, with all images and css, into just one folder and one file, with wget? How do ${0##*/} and ${0%/*} work? Is it possible to add non-number characters on the left of a code block?  Specifically, I want to add ... to correspond with some source code (see image).    I am currently using commands to stop / start the line numbers. Here is the code:  \documentclass[12pt]{article}  \usepackage[a4paper, margin = 20mm, top = 30mm, bottom = 25mm]{geometry} \usepackage{xcolor, soul} \usepackage{listings}  \definecolor{codebackground}{rgb}{0.95, 0.95, 0.92}  \lstset {     frame            = tb, % hrule above and below     keepspaces       = true,     columns          = flexible,     basicstyle       = {\normalsize\ttfamily},     escapeinside     = {(*@}{@*)}, % for escaping     backgroundcolor  = \color{codebackground},     showstringspaces = false,     language         = C,     keywordstyle     = \color{blue},     stringstyle      = \color{red},     commentstyle     = \color{teal},     numbers          = left, % {none, left, right}     firstnumber      = 1,     numberstyle      = \scriptsize\color{black},     numbersep        = 5pt }  \let\origthelstnumber\thelstnumber \makeatletter % for stopping line numbers \newcommand*\stopnumber {     \lst@AddToHook{OnNewLine}     {         \let\thelstnumber\relax         \advance\c@lstnumber-\@ne\relax     } } % for starting line numbers \newcommand*\startnumber[1] {     \setcounter{lstnumber}{\numexpr#1-1\relax}     \lst@AddToHook{OnNewLine}     {         \let\thelstnumber\origthelstnumber         \refstepcounter{lstnumber}     } } \makeatother  \begin{document} \begin{lstlisting}[firstnumber = 456] int third_function(const int c) {     /* error checking */     if(c &lt; 0)     {         return;     } (*@ \stopnumber @*)      ...     (*@ \startnumber{512} @*)     /* other stuff */     int d = 4;     char* word = "third function"; (*@ \stopnumber @*)      ...     (*@ \startnumber{678} @*)     return (c * d); } \end{lstlisting} \end{document} Is a constant condition more costly than switching shaders? How to re-enable tray icons for applications in Ubuntu? How to add thickness to a curve? How can I add thickness to a curve? I already tried with the extrude and depth options in the curve settings, but it doesn't work properly. My bibliography (made with biblatex) has all items close to each other. I would like to introduce some space between them, e.g. half a line.  How can I do this? Spy from Earth studies Galactic Empire nobility and prevents plot to depose Emperor Convert DOS line endings to Linux line endings in Vim If I open files I created in Windows, the lines all end with ^M. How do I delete these characters all at once? Eliminating non-integer solutions to $ab / (2\sqrt{ab} + a + b)$ How do I answer "Where do you work?" What are the main purposes to ask someone 'Where do you work?' apart from to find out the type of place he or she works in?  I can answer:     I work in a shop.   I work in a hospital.   I work in an office.   But what other things can (or should) I use as a reply to this question?    Extra question:  sometimes I see     I work at a shop.    I work at a hospital.    I work at an office.   What's the difference between 'at' and 'in' in this case? ''will'' or ''going to''