HTML projekt wie findet ihr die vorarbeit?

html:

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<Header>
</Header>
<div class="input">
<main>
<form action="" method="post">
<h2>Anmeldung</h2>
<input type="email" name="Email" placeholder="Email hier eingeben" required="@" id=""> <br>
<input type="text" name="Benutzer" placeholder="Benutzer hier eingeben" required="A-z" > <br>
<input type="password" name="passwort" placeholder="password hier eingeben " id=""> <br>
<input type="submit" value="Anmelden">
<input type="reset" value="reset">
</form>
</div>
<hr>
<a href="#">Impressum</a>
<a href="#">kontakt</a>
<a href="#">Über uns</a>
</main>
<footer>
</footer>
</body>
</html>

css

body {
font-family: Arial, Helvetica, sans-serif;
color: white;
}
body{
background-color: black;
}
.input {
display: flex;
margin: 700px;
margin-top: 300px;
flex-direction: column;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 3px 3px white;
border-radius: 30px;
height: 300px;
width: 300px;
}
a{
font-family: Arial, Helvetica, sans-serif;
display: flex;
justify-content: center;
align-items: center;
}
a:hover{
color: green;
text-decoration-line: none;
}
input{
padding: 5px;
border-radius: 10px;
}
input[type="submit"] {
font-size: 1.0em; padding: 1px 6px;
font-family: Roboto, sans-serif;
font-weight: 100;
color: teal;
border: 1px solid silver;
background-image: linear-gradient(to top, gainsboro 0%, white 90%);
border-radius: 20px;
}
input[type="reset"] {
font-size: 1.0em; padding: 1px 6px;
font-family: Roboto, sans-serif;
font-weight: 100;
color: teal;
border: 1px solid silver;
background-image: linear-gradient(to top, gainsboro 0%, white 90%);
border-radius: 20px;
}

Bild zum Beitrag
HTML, Webseite, CSS, HTML5, Programmiersprache, Webdesign, Webentwicklung
Hallo ich habe ein Code in Unity wo es eine Fehlermeldung gibt die ich nicht verstehe. Könnt ihr mir helfen?

Die Fehlermeldung lautet

Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand

Fehler CS1061 "Animation" enthält keine Definition für "SetBool", und es konnte keine zugängliche SetBool-Erweiterungsmethode gefunden werden, die ein erstes Argument vom Typ "Animation" akzeptiert (möglicherweise fehlt eine using-Direktive oder ein Assemblyverweis). Assembly-CSharp C:\Users\Me\2d platform\Assets\Player.cs 27 Aktiv

Der ganze Code ist

public class Player : MonoBehaviour

{

  public float speed = 5;

  private Rigidbody2D rb;

  public float jumph = 5;

  private bool ig =false;

  private Animation anim;

  // Start is called before the first frame update

  void Start()

  {

    rb = GetComponent<Rigidbody2D>();

    anim = GetComponent<Animation>();

  }

  // Update is called once per frame

  void Update()

  {

    float richtung = Input.GetAxis("Horizontal");

    if(richtung != 0)

    {

      anim.SetBool("IsRunning", true);

    }

    else

    {

      anim.SetBool("IsRunning", false);

    }

    transform.Translate(Vector2.right * speed * richtung * Time.deltaTime);

    if (Input.GetKeyDown(KeyCode.Space) && ig)

    {

      rb.AddForce(Vector2.up * jumph, ForceMode2D.Impulse);

      ig = false;

    }

  }

  private void OnCollisionEnter2D(Collision2D collision)

  {

    if(collision.gameObject.tag == "g")

    {

      ig = true;

    }

  }

}

C Sharp, Code, Programmiersprache, Visual Studio, Unity, unity 2d
Zugriff auf svg Element in HTML gibt immer "null" zurück?

Hallo zusammen,

folgendes Problem:

Ich möchte aus meinem javascript Code zu laufzeit auf meine sonarGrafik.svg zugreifen können um deren Elemente zu manipulieren (oder neue hinzufügen zu können).

So sieht erstmal der ganze HTML Code aus:

<!DOCTYPE html>
<html>
<head>
    <title>Arduino Daten</title>
    <link rel="icon" href="data:,">
    <script src="scripts/script.js"></script>
    <link rel="stylesheet" href="styles/style.css"> 
</head>
<body>
    <object id = "svgObject" data="styles/sonarGrafik.svg" type="image/svg+xml"></object>
</body>
</html>

Der betroffene Teil in meinem javascript Code:

function insertDots(cx, cy) {
    const svgObject = document.getElementById("svgObject");
    console.log(svgObject.contentDocument) // hier erhalte ich in der Console immer "null"


    svgObject.addEventListener("load", function() {
        if (svgObject && svgObject.contentDocument) {
            const sonarSVG = svgObject.contentDocument.getElementById("sonar");
            console.log(sonarSVG);
        }
    });
}

(Die funktion insertDots(cx, cy) wird alle paar sekunden aufgerufen und ich erhalte in der Browser Konsole immer nur null. Dementsprechend ist die if Bedienung darunter auch nie wahr)

In meiner .svg Datei gibt es definitv die id= "sonar":

<svg id="sonar" width="700" height="700" xmlns="http://www.w3.org/2000/svg">
  <rect x="0" y="0" width="100%" height="100%" fill="rgba(128, 128,   128, 0.25)" />
</svg>

So sieht meine Ordnerstruktur aus:

Website
│   SonarVisuallisierung.html
│
├── scripts
│       script.js
│
└── styles
        style.css
        sonarGrafik.svg


Gibt es irgendwo einen Fehler oder eine andere Möglichkeit auf die Elemente der .svg Datei über das script zuzugreifen? (Den Inhalt der .svg will ich ausgelagert lassen und nicht in das HTML einfügen wegen der Übersichtlichkeit)

Danke für alle Lösungsvorschläge.

HTML, Webseite, JavaScript, Code, Programmiersprache
Wieso funktioniert der Code nicht?

binärbaum:

wenn ich das in der main erstelle mit

Tree t1 = new Tree();
t1.add(9);
t1.add(1);
t1.add(23);
und dann t1.root ausprinte funktinoiert es, aber t1.root.left liefert null, also es gibt nen fehler, wieso aber?

hat es was damit zu tun " parent = new TNode(data);" ?ich übergeben den linken knoten der wurzel und das ist jetzt parent, und dann weise ich parent neu zu also ich weise den linken knoten der wurzel neu zu, wieso geht das aber nicht?


public class Tree {
    TNode root;


    Tree(){
        this.root = null;
    }


    public void add(int data){
        if(root == null){
            root = new TNode(data);
        }else{
            if(data < this.root.data){
                add(data, root.left);
                System.out.println("miosty");
            }else {
                add(data, root.right);
            }
        }
    }
     public void add(int data, TNode parent){
        if(parent == null){
            System.out.println("Zu");
           parent = new TNode(data);
        }else{
            if(data < parent.data){
                add(data, parent.left);
            } else {
                add(data, parent.right);
            }
        }
    }
}
HTML, Webseite, Java, JavaScript, Array, Code, PHP, Programmiersprache, Python, Webentwicklung, Algorithmus
Google Search Console einzelne Unterseiten entfernen lassen?
Bild zum Beitrag
PC, Computer, Marketing, Software, Windows, Browser, Google, Hardware, HTML, IT, Webseite, programmieren, CSS, WordPress, JavaScript, Mozilla Firefox, Suchmaschine, Google Chrome, Bing, CMS, Edge, Informatik, PHP, Programmiersprache, SEO, Webdesign, Webentwicklung, Indexierung, Laravel, google search console
Tradingview Pine Script Strategy tester funktioniert nicht?

Heyho,

Ich habe möglicherweise einen oder mehrere Fehler in meinem Code, ich verstehe aber nicht wo der Fehler liegt:

-------------------------------------+

// © Pumel

//@version=5

strategy("TEMA-DEMA Crossover Strategy", overlay=true)

// Benutzerdefinierte TEMA Funktion

tema(source, length) =>

ema1 = ta.ema(source, length)

ema2 = ta.ema(ema1, length)

3 * ema1 - 3 * ema2 + ta.ema(ema2, length)

// Benutzerdefinierte DEMA Funktion

dema(source, length) =>

ema1 = ta.ema(source, length)

ema2 = ta.ema(ema1, length)

2 * ema1 - ema2

// Eingabeparameter

tema_period = input(14, title="TEMA Period")

dema_period = input(14, title="DEMA Period")

lot_size = input(0.1, title="Lot Size")

// TEMA und DEMA Indikatoren berechnen

tema_value = tema(close, tema_period)

dema_value = dema(close, dema_period)

// Farben für die Long- und Short-Positionen

long_color = color.new(color.green, 50) // Grüne Farbe mit 50% Transparenz

short_color = color.new(color.red, 50) // Rote Farbe mit 50% Transparenz

// Hintergrundfarben basierend auf der Handelslogik ändern

bgcolor(ta.rising(tema_value, 1) and ta.falling(dema_value, 1) ? long_color : na)

bgcolor(ta.falling(tema_value, 1) and ta.rising(dema_value, 1) ? short_color : na)

// Handelslogik

if ta.rising(tema_value, 1) and ta.falling(dema_value, 1)

strategy.entry("Long", strategy.long, qty=lot_size)

strategy.close("Short")

if ta.falling(tema_value, 1) and ta.rising(dema_value, 1)

strategy.entry("Short", strategy.short, qty=lot_size)

strategy.close("Long")

-------------------------------------+

(beachtet die section mit den Farben nicht :D)

Aber wieso generiert das script jetzt keine orderes wenn ich sie teste? Und wieso zeigt der dude die Indikatoren nicht?

Vielen Dank schonmal im Vorraus und bleibt gesund!

Bild zum Beitrag
Programmiersprache, Trading, tradingview

Meistgelesene Fragen zum Thema Programmiersprache