การเก็บ JSON ใน MySQL ด้วย PHP
เดิมเคยเก็บโดยการแปลงด้วยคำสั่ง jsonencode แต่มักจะเกิดปัญหาเมื่อมีอักขระบางตัวหรือการขึ้นบรรทัดใหม่ ซึ่งจะทำให้ไม่สามารถแปลงกลับด้วยคำสั่ง jsondecode
แต่....
MySQL version 5.7.8 ได้เพิ่ม JSON data type ให้แล้ว (แม้ว่าเมื่อเลือกเป็น JSON data type แล้ว MySQL ก็จะเก็บเป็น longtext type ก็ตาม)
และมีคำสั่งเฉพาะในการจัดการกับข้อมูล เช่น
JSONOBJECT, JSONARRAY, JSONMERGEPRESERVE, JSONMERGEPATCH, JSONTYPE, JSONEXTRACT, JSONINSERT, JSONREPLACE, JSONSET, JSONREMOVE
ลองดูรายละเอียดได้จาก How To Work with JSON in MySQL
ที่มา
วันเวลา - พงษ์เทพ กระโดนชำนาญ
Intro: / A E / A D / A E / B A / A E F#m A วันเวลาหมุนเปลี่ยนเวียนไป สุขสดใสไม่เคยเดินตาม A E F#m A วันเวลาหมุนเปลี่ยนโมงยาม ต่างทับถมแต่ความทุกข์ทน A E F#m E ในเวลาหนาวเปลี่ยวกมล เอาความฝันของฉันต่อเติม A F#m D A E A ตามเวลาได้มาช่วยเสริม สานเป็นความสดใส ไม่มากมายให้แค่มี Instru / A E / B7 A / A E F#m A มีความหวังเป็นทางสร้างธรรม มีความช้ำเป็นกำลังใจ A E F#m A เอาความจริงที่แตกสลาย ใส่เบ้าหลอมรวมเป็นพลัง A E F#m E เอาความเลวที่เกาะเกรอะกรัง กลั่นมันทิ้งกินเป็นตะกอน A F#m D A E A เอาน้ำตาที่เคยเปียกหมอน ไปราดรดร่างคนรุ่มร้อน ให้ชุ่มเย็น ไม่ย่ำยี D E A F#m D E A F#m * ฝันนั้นล่องลอย ดุจหิ่งห้อยแสงริบหรี่ ฝันนั้นยังมีสิ่งสดใสในคืนเดือนดับ D E A F#m D E A F#m รอตะวันรุ่งราง จะลาลับไม่รบกวน ยามคุณร้าวรัญจวน ก็จะหวนแสงหิ่งห้อย D E A ร้อยเรื่องราวในคืนข้างแรม Instru / A E / F#m A / A E / F#m E / A F#m / D A / B7 A / ( * , * ) Outro / A E / A D / A E / B7 A /
ใกล้ตาไกลตีน - คาราวาน
[Intro] / G / G / Bm / G / A Bm / Bm / Bm / Bm D Bm ไกลโอ้ไกลจากโพ้นขอบฟ้า เราจากมาด้วยการก้าวย่าง D Bm G A7 จากกลิ่นฟางรอยยิ้มเจ้าเอย ใครเล่าเคย ใครเล่าเคย D Bm พี่น้องเอ๋ย จะเล่าให้ฟัง [Instru] / G / Bm / Bm / Bm / D / Bm / Bm / Bm ตามทิวเขาที่ยาวเหยียดฟ้า ตามหมู่ปลาลำธารใสสด D Bm G A7 ตามหมู่มดที่รังเลิศงาม ไปจากหลัง ใจฝากฝัง D ฝากเจ้าไว้ ในแผ่นดิน [Instru] / Bm / (6 Times) Bm D Bm ดินเคยนอนสะท้อนอุ่นกาย มองยอดไม้เมื่อยามแรกผลิ ผลิกิ่งรวงเป็นพวงพุ่มไม้ D Bm น้ำที่ไหลหลั่งลงจากดอย ใจเจ้าลอยไปสู่ท้องทุ่ง มุ่งสู่เมืองเฟื่องฟุ้งแปลกตา D Bm เจ้าเคยยิ้มเคยแย้มเบิกบาน สนุกสนานท่ามกลางผองเพื่อน เคยพูดเตือนและสนทนา D Bm เจ้าเคยฝันถึงวันที่ดี มาบัดนี้มิอาจพบหน้า ดูใกล้ตา แต่แล้วไกลตีน G A7 D Bm แผ่นดินที่หอม แผ่นดินที่ตรอม จะกอดเจ้าไว้ ยังไออุ่นกัน D Bm รักเจ้าไว้ยังไออุ่นกัน ฝันและฝันให้ไกลที่สุด เจ้ามนุษย์จะหวังสิ่งใด D Bm รักเจ้าไว้ยังไออุ่นกัน ฝันและฝันให้ไกลที่สุด เจ้ามนุษย์จะหวังสิ่งใด
James Taylor – You've Got A Friend chords
(capo 1ST FRET) Am E7 Am When you're down and troubled and you need a helping hand, Dm G7 C E7 Am and nothing, oh, nothing is going right, Am E7 Am close your eyes and think of me and soon I will be there Dm Em Dm G7 to brighten up even your darkest night. C F You just call out my name, and you know wherever I am, C G7 G I'll come running to see you again. C F Am Winter, spring, summer, or fall, all you got to do is call F Em Dm G7 and I'll be there, yeah, yeah, yeah.
C You've got a friend. Am E7 Am If the sky above you should turn dark and full of clouds, Dm G7 C E7 Am and that old north wind should begin to blow, Am E7 Am keep your head together and call my name out loud. Dm Em Dm G7 Soon I'll be knocking upon your door.
REPAEAT CHORUS : * Bb F Hey ain't it good to know that you've got a friend when
C F Fm7 people can be so cold. They'll hurt you and desert you. Am7 D7 Well, they'll take your soul if you let them. G7 Oh yeah, but don't you let them. C F You just call out my name, and you know wherever I am, C G7 G I'll come running to see you again. C F
Am Winter, spring, summer, or fall, all you got to do is call F Em Dm G7 and I'll be there, yes I will. C F C You've got a friend. You've got a friend. F C Ain't it good to know you've got a friend? C G F C Ain't it good to know you've got a friend? F C Oh, yeah, yeah. You've got a friend.
Burn ISO Image to USB on macOS
ใช้โปรแกรม diskutil และ dd
เปิด Terminal
เรียกดูรายชื่อ device
diskutil list
diskutil unmountDisk /dev/disk4
sudo dd if=/path/to/name.iso of=/dev/disk4 bs=1m
diskutil eject /dev/disk4
ใช้ hdiutil
hdiutil burn filename.iso
ที่มา - 4 Ways to Burn ISO to USB on macOS Catalina/Mojave/Sierra and Big Sur M1 - How to Burn ISO to USB on Mac (Support Big Sur/Catalina/Mojave/High Serria)
Updating your DirectAdmin License manually
cd /usr/local/directadmin/scripts ./getLicense.sh 123 1234 service directadmin restart
หากติดเรื่อง ssl
echo 1 > /root/.insecure_download
อีกวิธีคือ
cd /usr/local/directadmin/conf cp -f license.key license.key.old wget -O license.key --no-check-certificate 'https://license.directadmin.com/licenseupdate.php?uid=123&lid=1234' chown diradmin:diradmin license.key chmod 600 license.key
My First Angular App
ติดตั้ง DevExpress
Download และติดตั้ง Create a DevExtreme Application
npx -p devextreme-cli devextreme new angular-app app-name cd app-name npm run start
ติดตั้ง MSSQL Express ด้วย Docker บน macos M1
1.ติดตั้ง Docker
ปรับ config เพิ่ม ram เป็น 4GB
- ติดตั้ง SqlServer Express
ขั้นตอนตาม How to Install SQL Server on MacOS
Step 1: Pull the Docker Image Download the Azure SQL Edge image to your system:
docker pull mcr.microsoft.com/azure-sql-edge
Step 2: Run the Docker Container When the image successfully downloads to your machine, run the container using the following command:
docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Strong.Pwd-123' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge
docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Strong.Pwd-123' -p 1433:1433 --name sqlexpress03 -d mcr.microsoft.com/azure-sql-edge
Step 3: Check the Container Ensure that the Azure SQL Edge container is running properly:
docker ps
Step 4: Access the Container with Bash Shell With the container running, you can connect to Azure SQL Edge by using the docker exec command:
sudo docker exec -it sqledge "bash"
Step 5: Connect to the Database Once inside the container, connect to the database using the sqlcmd tool:
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA
อ้างอิง:
ลบข้อมูลบน Mac
https://www.iphonemod.net/erase-all-content-and-settings-on-mac.html