- เรียก API https://jsonplaceholder.typicode.com/posts ได้ array ของ JSON ประมาณนี้
[
{
"userId": 1,
[
{
"userId": 1,
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"slices" | |
"sync" | |
) | |
type TODO struct { |
เป็นเทคนิค ในการ optimize binary ที่ได้จาก compiler แบบใหม่ที่ทำให้ประสิทธิภาพเพิ่มขึ้น 2-7% โดยใช้ข้อมูลพฤติกรรมการใช้งาน ผ่านการทำ profiling แล้วเอาข้อมูลจาก profiling มาประกอบการ compile ในรอบถัดไป
จะใช้ GODEBUG กับ settings เพื่อ turn on / turn off ความสามารถของภาษาที่มีการ breaking change หรือมีพฤติกรรมที่เปลี่ยนไป ทำให้ยังสามารถ compile code ด้วยพฤติกรรมเดิมได้ถ้าต้องการ
using System; | |
using System.Text; | |
using RabbitMQ.Client; | |
using RabbitMQ.Client.Events; | |
using System.Threading.Channels; | |
using System.Threading.Tasks; | |
namespace Receive | |
{ | |
class Program |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Camera</title> | |
</head> | |
<body> | |
<video id="camera" autoplay playsinline></video> | |
<script> | |
const videoElement = document.getElementById("camera"); |
module Main where | |
import Database.Persist | |
import Database.Persist.TH | |
import Database.Persist.Sql | |
import Control.Monad.IO.Class | |
import Control.Monad.Reader | |
import Database.Persist.MySQL | |
import Control.Monad.Logger |