Code-Editor: mehrsprachig
7 min
unser code editor ist der ort, an dem sie codebeispiele präsentieren können, die leicht kopiert werden können sie können mehrere tabs mit derselben sprache hinzufügen und drag and drop verwenden, um die tabs neu zu organisieren wenn du einen neuen tab hinzufügst, kannst du auch den namen zu etwas wie einer datei ändern, z b main js siehe unser beispiel main js fetch("https //api cakes com", { "method" "get", "headers" { "accept" "application/json" } }) then(response => { console log(response); }) catch(err => { console error(err); }); // we can use channels to synchronize execution // across goroutines here's an example of using a // blocking receive to wait for a goroutine to finish // when waiting for multiple goroutines to finish, // you may prefer to use a \[waitgroup]\(waitgroups) package main import "fmt" import "time" // this is the function we'll run in a goroutine the // `done` channel will be used to notify another // goroutine that this function's work is done func worker(done chan bool) { fmt print("working ") time sleep(time second) fmt println("done") // send a value to notify that we're done done < true } func main() { // start a worker goroutine, giving it the channel to // notify on done = make(chan bool, 1) go worker(done) // block until we receive a notification from the // worker on the channel < done } \# python3 program to demonstrate \# the use of sample() function \# import random import random \# prints list of random items of \# length 3 from the given list list1 = \[1, 2, 3, 4, 5, 6] print("with list ", random sample(list1, 3)) \# prints list of random items of \# length 4 from the given string string = "geeksforgeeks" print("with string ", random sample(string, 4)) \# prints list of random items of \# length 4 from the given tuple tuple1 = ("ankit", "geeks", "computer", "science", "portal", "scientist", "btech") print("with tuple ", random sample(tuple1, 4)) \# prints list of random items of \# length 3 from the given set set1 = {"a", "b", "c", "d", "e"} print("with set ", random sample(set1, 3)) \<?php $name = "quincy"; echo "hi! my name is " $name "\<br>"; echo "hi! my name is " $name "\<br>"; echo "hi! my name is " $name "\<br>"; ?>/ c# program to check whether the entered year is a leap year or not / using system; using system collections generic; using system linq; using system text; namespace program { class leapyear { static void main(string\[] args) { leapyear obj = new leapyear(); obj readdata(); obj leap(); } int y; public void readdata() { console writeline("enter the year in four digits "); y = convert toint32(console readline()); } public void leap() { if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) { console writeline("{0} is a leap year", y); } else { console writeline("{0} is not a leap year", y); } console readline(); } } } markdown codeblock mit einem einzelnen tab var http = require('http'); http createserver(function (req, res) { res writehead(200, {'content type' 'text/plain'}); res end('hello world!'); }) listen(8080); verwenden sie das folgende markdown, um einen codeblock mit einem einzelnen codebeispiel zu erzeugen \## code block ```nodejs var http = require('http'); http createserver(function (req, res) { res writehead(200, {'content type' 'text/plain'}); res end('hello world!'); }) listen(8080); ``` codeblöcke ohne sprache // code block not specified// code block not specified// code block not specified verwenden sie das folgende markdown, um einen codeblock ohne angabe der sprache zu erzeugen \## code blocks \ codeblocktabs ``` // code block not specified ``` ``` // code block not specified ``` ``` // code block not specified ``` \ code editor mit mehreren tabs // php is the best // and java too// demo go// demo js verwenden sie das folgende markdown, um einen codeblock mit mehreren tabs zu erzeugen \## demo code blocks \ codeblocktabs ```php // php is the best ``` ```java // and java too ``` ```go // demo go ``` ```javascript // demo js ``` \ andere blöcke finden entdecken sie neue wege und blöcke, um beeindruckende und funktionale dokumentationsseiten zu erstellen alle blöcke ansehen docid\ qr1fjhmpreujxqqndqr1 brauchen sie hilfe? ⬇️ verwenden sie die blaue chat bubble unten rechts oder probieren sie den ki chat (aus dem suchfeld) für schnelle antworten ihre meinung zählt nutzen sie das untenstehende feedback formular, anonym oder stellen sie eine frage im q\&a bereich und unser team oder die ki wird ihnen eine lösung geben
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.