Code editor: multi-language
7 นาที
ตัวแก้ไขโค้ดของเราเป็นพื้นที่ที่คุณสามารถแสดงตัวอย่างโค้ดที่สามารถคัดลอกได้อย่างง่ายดาย คุณสามารถเพิ่มแท็บหลายอันโดยใช้ภาษาเดียวกัน และใช้การลากแล้วปล่อยเพื่อจัดระเบียบแท็บใหม่ เมื่อคุณเพิ่มแท็บใหม่ คุณยังสามารถเปลี่ยนชื่อให้เป็นเหมือนชื่อไฟล์ได้ เช่น main js ดูตัวอย่างของเรา 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 มาร์กดาวน์ บล็อกโค้ดที่มีแท็บเดียว var http = require('http'); http createserver(function (req, res) { res writehead(200, {'content type' 'text/plain'}); res end('hello world!'); }) listen(8080); ใช้มาร์กดาวน์ต่อไปนี้เพื่อสร้างบล็อกโค้ดที่มีตัวอย่างโค้ดเดียว \## 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); ``` code blocks without language // code block not specified// code block not specified// code block not specified use the following markdown to generate a code block without specifying the language \## code blocks \ codeblocktabs ``` // code block not specified ``` ``` // code block not specified ``` ``` // code block not specified ``` \ code editor with multiple tabs // php is the best // and java too// demo go// demo js ใช้ markdown ต่อไปนี้เพื่อสร้างโค้ดบล็อกที่มีหลายแท็บ \## demo code blocks \ codeblocktabs ```php // php is the best ``` ```java // and java too ``` ```go // demo go ``` ```javascript // demo js ``` \ ค้นหาบล็อกอื่น ๆ ค้นพบวิธีใหม่ ๆ และบล็อกต่าง ๆ เพื่อสร้างหน้าคู่มือที่สวยงามและใช้งานได้จริง ดูบล็อกทั้งหมด docid\ fvbccw7nlvgjbchvbvbg9 ต้องการความช่วยเหลือ? ⬇️ ใช้ สีฟ้า ช่องแชท จากมุมล่างขวา หรือทดลองใช้ ai chat เพื่อคำตอบอย่างรวดเร็ว ความคิดเห็นของคุณมีความสำคัญ ใช้แบบฟอร์มข้อเสนอแนะด้านล่างโดยไม่ระบุชื่อ หรือถามคำถามใน ส่วน q\&a และทีมงานหรือ ai ของเราจะให้คำตอบแก่คุณ
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.