ÉDITEUR
Blocs d'édition
Éditeur de code : multi-langue
7 min
notre éditeur de code est l'endroit où vous pouvez montrer des exemples de code qui peuvent être facilement copiés vous pouvez ajouter plusieurs onglets en utilisant le même langage et utiliser le glisser déposer pour réorganiser les onglets lorsque vous ajoutez un nouvel onglet, vous pouvez également changer le nom en quelque chose comme un fichier, par exemple, main js voir notre exemple 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)) macos \<?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(); } } }hello world! this is text markdown bloc de code avec un seul onglet var http = require('http'); http createserver(function (req, res) { res writehead(200, {'content type' 'text/plain'}); res end('hello world!'); }) listen(8080); utilisez le markdown suivant pour générer un bloc de code avec un seul exemple de code \## 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); ``` blocs de code sans langage // code block not specified// code block not specified// code block not specified utilisez le markdown suivant pour générer un bloc de code sans spécifier le langage \## code blocks \ codeblocktabs ``` // code block not specified ``` ``` // code block not specified ``` ``` // code block not specified ``` \ éditeur de code avec plusieurs onglets // php is the best // and java too// demo go// demo js utilisez le markdown suivant pour générer un bloc de code avec plusieurs onglets \## demo code blocks \ codeblocktabs ```php // php is the best ``` ```java // and java too ``` ```go // demo go ``` ```javascript // demo js ``` \ trouvez d'autres blocs découvrez de nouvelles façons et blocs pour créer des pages de documentation époustouflantes et fonctionnelles docid\ y67fwv0aelfno1p2x7nmj besoin d'aide ? ⬇️ utilisez le bleu bulle de chat dans le coin inférieur droit ou essayez ai chat (à partir de la barre de recherche) pour des réponses rapides votre opinion compte utilisez le formulaire de feedback ci dessous, anonymement ou posez une question dans la section q\&a et notre équipe ou l'ia vous donnera une solution
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.