[Solved] element di...
 
Notifications
Clear all

[Solved] element disappears when appended to other element

0 Posts
1 Users
0 Likes
0 Views
0
Topic starter
Edga Asks: element disappears when appended to other element

Code:
document.querySelectorAll('.image').forEach(el => {
 el.querySelector('span').addEventListener('click', (e) => {
   const clickedElement = e.target;
   document.querySelector('.append').append(clickedElement);
 });
});

Code:
.image {
 background: red;
 cursor: pointer;
}

.append {
 margin-top: 20px;
 background: yellow;
}

Code:
<div class="image">
  <span>image1</span>
</div>
<div class="image">
 <span>image2</span>
</div>

<div class="append"></div>

So I am trying to figure it out why when I click image1 or image2 text in red background it appends to yellow background but it disappears from red background? How to stop it from disappearing from red background?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Unreplied Posts

[Solved] How to know the minimum LED current of an optocoupler?

DrakeJest Asks: How to know the minimum LED current of an optocoupler?
I am going to need to use an optocoupler to isolate two circuits in two situations. In both situations, a MCU GPIO will be driving the LED of the optocoupler to send a signal on the other end.

I am planning to use this optocoupler as its was the cheapest I could find that has the shorted rise/fall time. Since an MCU will be driving the LEDs, I would like very little current to be drawn on the GPIO; how do I know what is the smallest current I can drive the LED of the optocoupler?

The first circuit fastest switch frequency is 250ms the second circuit though is a bit more sensitive as it will pull low for 2ms and can have an interval as low as 0.5ms. Will this optocoupler be able to switch that fast at low LED currents?

enter image description here

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.
 
 
 

[Solved] How much dvb-t2 tranmitter power i need to cover 70km area

Medow Asks: How much dvb-t2 tranmitter power i need to cover 70km area
As the title say, which transmitter power i need to broadcast 1 dvb-t 8mhz channels to cover 70km circle space.

And i join multi dvb-t2 TS files in one big tranmittet to cover same space , how much power i need.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Ambiguity of the “intrinsic” layer in a PIN diode

thegreatemu Asks: Ambiguity of the “intrinsic” layer in a PIN diode
I’m having trouble understanding the fundamental makeup of large PIN diodes, specifically those used in radiation detection devices. For example, high purity germanium (HPGe) detectors are often referred to as large PIN diodes, where the intrinsic, depleted region is sensitive. However, in diagrams, the bulk material is usually labeled N-type or P-type. For example, in this description from Mirion:

{
“lightbox_close”: “Close”,
“lightbox_next”: “Next”,
“lightbox_previous”: “Previous”,
“lightbox_error”: “The requested content cannot be loaded. Please try again later.”,
“lightbox_start_slideshow”: “Start slideshow”,
“lightbox_stop_slideshow”: “Stop slideshow”,
“lightbox_full_screen”: “Full screen”,
“lightbox_thumbnails”: “Thumbnails”,
“lightbox_download”: “Download”,
“lightbox_share”: “Share”,
“lightbox_zoom”: “Zoom”,
“lightbox_new_window”: “New window”,
“lightbox_toggle_sidebar”: “Toggle sidebar”
}

Image of Mirion HPGe detector
Figure 7-2: A typical p-i-n junction detector (left) with reverse bias. A cross section of an n-type coaxial detector perpendicular to the cylindrical axis (right).

The detector is called a p-i-n junction detector, but clearly labeled N-type Ge. I chose this example because it’s an obvious juxtaposition, but I find similar terminology in many places.

How can I understand this discrepancy in terminology? Is the “intrinsic” region just very lightly doped? Or is it not intentionally doped at all, but the native crystal growth results in a net excess of N-type donors? Or …?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How to Modify Matched Cells Across Multiple Sheets with Google Script

Mattoverton20 Asks: How to Modify Matched Cells Across Multiple Sheets with Google Script
My question is a fairly complex one, but I’ll do my best to clarify exactly what I’d like to do and this requires some background:

I have a Google Spreadsheet used for user administration in my company with a main sheet containing a long list of users, sorted by their user ID. The user IDs are permanent and a user is assigned an ID which they relinquish when they leave. The first few columns are filled in manually and include Employee Number, First Name, Surname, Section and Role. The remaining columns relate to the various company systems a person may or may not have access to and can be set to either Y or N:

UserID | Employee Number | First Name | Surname | Section | Role | System1 | System2 | System3 | System4 | System5

The system columns are automatically set using the MATCH formula which checks another sheet containing IDs of all users with access to that system.
If the userID is found on the other sheet, it sets that column to Y on the main sheet. So here’s an example row on the main sheet:

2365 | 76438467 | Matt | Overton | Admin | Assistant | Y | Y | N | Y | N

My question:
Is it possible, if I was to add an extra column at the end called Delete? with all rows set to N?

Could a script be run when the user sets the delete column to Y where the script does the following:

  1. Copies the entire row and pastes the values and formatting (I.e. not any of the MATCH formulas themselves) into a new row on another sheet called Deleted Users with an additional column where the current date is filled in (to show when the deletion took place).
  2. Clears the Employee Number, First Name, Surname, Section and Role information from the row, but leaves the userID intact.
  3. Where an access column shows Y – locates the ID on the relevant sheet and clears the cell containing the ID from the sheet. (So the match formula on the main sheet would automatically take care of the rest and set itself back to N on its own.)
  4. Set the Delete? cell back to N again.

I’m sorry, but I have zero knowledge of Google Script and what I’d like to do may be a little complex.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How to insert Mathematical Equations in Google Sheets?

EtoG Asks: How to insert Mathematical Equations in Google Sheets?
I have been searching for a while now and all searches lead to Google Docs, not Google Sheets. So basically what I’m looking for is similar to the insert equation function as in Excel where you can insert Mathematical Equations and symbols etc… I have an excel file that I opened using the Google Sheets but when I did, the cells where the equations were placed are left blank. All the other things are as it was like the original except the mathematical equations. I’m thinking of just turning them to images then add them as an image but I’m, wondering if there’s a way I would be able to include them like in Excel.

This is what I meant by insert mathematical equation.
enter image description here

This should be what is displayed in a cell
enter image description here

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Have a new Google form be started linked to an existing spreadsheet

josinalvo Asks: Have a new Google form be started linked to an existing spreadsheet
My problem:

I want to create a new form and have it automatically linked to an existing spreadsheet.

It can create a new sheet on the existing spreadsheet, but the linking step should be automatic.

Unfortunately, it seems that a copy of a form does not auto-link to the same spreadsheet as the original form, but if there is a solution based on copying forms rather than creating, that works as well.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Change aggregation type for Grand Total in pivot table (ie, to SUM)

Drewdavid Asks: Change aggregation type for Grand Total in pivot table (ie, to SUM)
I have a pivot table based on the MIN value.

That is fine. But now, the so-called “Grand Total” is also just showing the MIN of the columns. It seems it just sticks with the aggregation type selected for the Value(?)…

This isn’t much of a Grand Total, however. What I really want is the SUM of the columns (what I would expect).

I don’t see any immediate way to specify the aggregation type for the total; just a checkbox labelled “Show totals” (which I have employed).

That said: Is there some way to get a SUM as the “Grand Total”?

Here is my PT*:


enter image description here

And here are the current settings:


enter image description here

*I hope you enjoyed my mouse-writing; for some reason Windows Snip & Sketch has elected to omit text in it’s editing tools. The unhappy face was my own touch.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Why does GTmetrix give me the “serve images that are appropriately sized” error?

alancc Asks: Why does GTmetrix give me the “serve images that are appropriately sized” error?
I’ve run a GTmetrix test on my website.

I get one issue in its audit report:
audit report

I check the image with Chrome DevTools, as below:


chrome devtools

Since the test is for Desktop, the image size is 649 x 508 and it is served as 649 x 508.

Also I found that there is a srcset tag in the code for the different resolutions, which is also recommended in How to properly size images. So I cannot find the problem with the image, why does GTmetrix report it as an issue?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Why the object is not rotating slowly?

Haim Hadad Asks: Why the object is not rotating slowly?
At the top

Code:
public float secondsToRotate;
private float secondsSoFar = 0.0f;

Then in the Update

Code:
private Update()
{
  secondsSoFar += Time.deltaTime;
  float t = secondsSoFar / secondsToRotate;
  Vector3 lerpPoint = Vector3.Lerp(transform.position, -transform.position, t);
  transform.rotation = Quaternion.LookRotation(lerpPoint);
}

but instead of slowly smooth rotating it’s just waiting X seconds then rotate too fast like rotating at once. I wanted it to rotate slowly smooth. for example, if I set the secondsToRotate to 5 so the rotation will take 5 seconds.

The full script :

Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerSpaceshipAreaColliding : MonoBehaviour
{
    public float rotationSpeed;
    public float movingSpeed;
    public float secondsToRotate;

    private float timeElapsed = 0;
    private float lerpDuration = 3;
    private float startValue = 1;
    private float endValue = 0;
    private float valueToLerp = 0;
    private Animator playerAnimator;
    private bool exitSpaceShipSurroundingArea = false;
    private bool slowd = true;
    private float secondsSoFar = 0.0f;

    // Start is called before the first frame update
    void Start()
    {
        playerAnimator = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        if (exitSpaceShipSurroundingArea)
        {
            if (slowd)
                SlowDown();

            if (playerAnimator.GetFloat("Forward") == 0)
            {
                slowd = false;
            }

            if (slowd == false)
            {
                secondsSoFar += Time.deltaTime;
                float t = secondsSoFar / secondsToRotate;
                Vector3 lerpPoint = Vector3.Lerp(transform.position, -transform.position, t);
                transform.rotation = Quaternion.LookRotation(lerpPoint);
            }
        }
    }

    private void OnTriggerEnter(Collider other)
    {
        if (other.name == "CrashLandedShipUpDown")
        {
            exitSpaceShipSurroundingArea = false;
            Debug.Log("Entered Spaceship Area !");
        }
    }

    private void OnTriggerExit(Collider other)
    {
        if (other.name == "CrashLandedShipUpDown")
        {
            exitSpaceShipSurroundingArea = true;
            Debug.Log("Exited Spaceship Area !");
        }
    }

    private void SlowDown()
    {
        if (timeElapsed < lerpDuration)
        {
            valueToLerp = Mathf.Lerp(startValue, endValue, timeElapsed / lerpDuration);
            playerAnimator.SetFloat("Forward", valueToLerp);
            timeElapsed += Time.deltaTime;
        }

        playerAnimator.SetFloat("Forward", valueToLerp);
        valueToLerp = 0;
    }
}

In that place in the script, I’m trying to rotate the player smooth slowly to the opposite direction. I want also to increase the “Forward” speed when it’s rotating while it’s rotating but for now the rotation itself is not working at all the player is not rotating.

Code:
if (slowd == false)
                {
                    secondsSoFar += Time.deltaTime;
                    float t = secondsSoFar / secondsToRotate;
                    Vector3 lerpPoint = Vector3.Lerp(transform.position, -transform.position, t);
                    transform.rotation = Quaternion.LookRotation(lerpPoint);
                }

The main goal is to create some realistic effect when the player is leaving the colliding area the player will slow down then when the player has stopped to start rotating slowly to the opposite direction and start moving by increasing the “Forward” value while rotating.

Some realistic preventing from the player to leave the colliding area. when he try to leave the area he should move back in the colliding area.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Multiple glossaries on a single page with a chapter-title

max Asks: Multiple glossaries on a single page with a chapter-title
The setting is that I need to have two glossaries. They should be separated just by a medskip and not by a newpage-break. To stow them properly, I thought of putting them in a single chapter List of symbols.

The manual raises a warning when using the long-table style (e.g. long3col), but only for entries with long descriptions as there won’t be a page-break within a cell of a table. However, this does not apply here …

To suppress the page-break, I followed a comment of this post of nullifying the newpage-command temporarily (the accepted answer suggested to redefine glsclearpage, which didn’t work in my case and apparently for others neither)

Code:
begingroupletnewpagerelax
    printglossary
    printglossary
endgroup

The odd thing is that this seems to suppress the appearing of the chapter-title: The first chapter/glossaries produces six pages with a double page-break between the chapter title, the first glossary and the second glossary.

The second chapter/glossary attempt resulted in a page with both glossaries on but without any chapter-title (left); only if text is added, the chapter-title is printed (right):


tightGlossaryWithWithoutText

Code:
documentclass{scrbook}

usepackage{glossaries}
% define alternative glossaries
newglossary[ulg]{UppercaseCharacter}{uld}{udn}{List of uppercase characters}
newglossary[llg]{LowercaseCharacter}{lld}{ldn}{List of lowercase characters}

% Term definitions
newglossaryentry{A}{name=A, description={This is an uppercase character}, type=UppercaseCharacter}
newglossaryentry{a}{name=a, description={This is a lowercase character}, type=LowercaseCharacter}

% activateglossaries
makeglossaries
setglossarystyle{long3col}


begin{document} 
    chapter*{List of symbols}
     % Print the glossaries
    printglossary[type=UppercaseCharacter] % domain glossary
    printglossary[type=LowercaseCharacter] % domain glossary

    chapter*{Tight list of symbols}
    begingroupletnewpagerelax
        printglossary[type=UppercaseCharacter] % domain glossary
        bigskip
        printglossary[type=LowercaseCharacter] % domain glossary
    endgroup
    
    chapter*{Tight list of symbols + Text}
    dfgfgjfghj
    begingroupletnewpagerelax
    printglossary[type=UppercaseCharacter] % domain glossary
    printglossary[type=LowercaseCharacter] % domain glossary
    endgroup%clearpage


    chapter{Content}
    UPPERCASE: gls{A} and lowercase: gls{a}

end{document}

It further seems to be impossible to control the vertical spacing within the Tex-primitive group or is this rather because the glossaries are not supposed to be on a single page?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Share: