EDITORES
Bloques de Editor
Editor de código: multi-idioma
7 min
nuestro editor de código es donde puedes mostrar ejemplos de código que se pueden copiar fácilmente puedes agregar múltiples pestañas usando el mismo lenguaje y usar arrastrar y soltar para reorganizar las pestañas cuando agregas una nueva pestaña, también puedes cambiar el nombre a algo como un archivo, por ejemplo, main js mira nuestro ejemplo 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 bloque de código con una sola pestaña var http = require('http'); http createserver(function (req, res) { res writehead(200, {'content type' 'text/plain'}); res end('hello world!'); }) listen(8080); utiliza el siguiente markdown para generar un bloque de código con un solo ejemplo de código \## 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); ``` bloques de código sin lenguaje // code block not specified// code block not specified// code block not specified utiliza el siguiente markdown para generar un bloque de código sin especificar el lenguaje \## code blocks \ codeblocktabs ``` // code block not specified ``` ``` // code block not specified ``` ``` // code block not specified ``` \ editor de código con múltiples pestañas // php is the best // and java too// demo go// demo js utiliza el siguiente markdown para generar un bloque de código con múltiples pestañas \## demo code blocks \ codeblocktabs ```php // php is the best ``` ```java // and java too ``` ```go // demo go ``` ```javascript // demo js ``` \ encuentra otros bloques descubre nuevas formas y bloques para crear páginas de documentación impresionantes y funcionales docid\ j rf2bopwdceioskmtfyg ¿necesitas ayuda? ⬇️ usa el azul burbuja de chat desde la esquina inferior derecha o prueba chat de ia (desde el cuadro de búsqueda) para respuestas rápidas tu opinión importa usa el formulario de retroalimentación a continuación, de forma anónima o haz una pregunta en sección de preguntas y respuestas y nuestro equipo o ia te dará una solución
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.