Lang thang
Tôi lang thang
-
Javascript Date to ISO String +7
Javascript Date to ISO String +7 Mục đích để chuyển từ định dạng 2020-01-19 17:00:00 sang định dạng 2020-01-19T17:00:00.000Z var d = new Date('2020-01-19 17:00:00'); d.setHours(d.getHours() + 7); d.toISOString();
-
Download Sentinel-2 10-Meter Land Use – Land Cover
Download Sentinel-2 10-Meter Land Use - Land Cover Land use changes rapidly. So should our maps. Detailed. Timely. Accurate. An annual 10-meter resolution map of Earth's land surface from 2017-2021 High-resolution, open, accurate, comparable, and timely land use maps are critical for decision-makers in many industry sectors and developing nations. These maps improve understanding of important topics such as food security, land use planning, surface water, and resource management planning. In addition, national government resource agencies use land use/land cover as a basis for understanding trends in the country's natural capital, which helps define land planning priorities and is the basis of budget allocations. Mapping with AI Existing artificial intelligence…
-
Fix curl unable to establish ssl connection
Fix curl unable to establish ssl connection Sửa lỗi unable to establish ssl connection khi wget hay curl Fix unable to establish ssl connection Để sửa lỗi này thì chạy lệnh sau: /usr/sbin/update-ca-certificates --fresh Tham khảo https://www.linuxquestions.org/questions/slackware-14/wget-unable-to-establish-ssl-connection-while-downloading-libreoffice-from-slackbuild-4175642143/
-
[Easy way] Turn Your WordPress Site into a Progressive Web App (PWA)
[Easy way] Turn Your WordPress Site into a Progressive Web App (PWA) Chuyển website wordpress của bạn thành mobile app thông qua kỹ thuật Progressive Web App (PWA) Giới thiệu Super Progressive Web Apps https://wordpress.org/plugins/super-progressive-web-apps/ Progressive Web Apps (PWA) is a new technology that combines the best of mobile web and the best of mobile apps to create a superior mobile web experience. They are installed on the phone like a normal app (web app) and can be accessed from the home screen. Thực hiện
-
How to clear the contents of a file from the command line?
How to clear the contents of a file from the command line? You can use the user command : truncate truncate -s 0 test.txt ("-s 0" to specify the size) http://www.commandlinefu.com/commands/view/12/empty-a-file https://superuser.com/questions/90008/how-to-clear-the-contents-of-a-file-from-the-command-line
-
Các loại chuẩn hóa cơ sở dữ liệu quan hệ
Các loại chuẩn hóa cơ sở dữ liệu quan hệ Vừa rồi mình được một người bạn nhờ làm bài tập về thiết kế cơ sở dữ liệu theo chuẩn 3NF, thú thực đây là những kiến thức học hồi đại học và cho đến giờ mình đã quên sạch 😄. Bởi vậy mình quyết định viết một bài để note lại những gì mình đã đọc và để làm tài liệu tham khảo sau này. Mở đầu Hầu hết các ứng dụng web đều cần phải có cơ sở dữ liệu để lưu trữ dữ liệu, xử lý thông tin, kết xuất đưa ra báo cáo thống kê, hỗ trợ…
-
FastAPI (gunicorn) bị lỗi Mixed Content HTTPS vs HTTP
FastAPI (gunicorn) bị lỗi Mixed Content HTTPS vs HTTP Nhận dạng lỗi Mixed Content: The page at 'https://aaaa' was loaded over HTTPS, but requested an insecure stylesheet 'http://aaaa/static/dist/css/bootstrap.min.css'. This request has been blocked; the content must be served over HTTPS. Cách sửa FastAPI (gunicorn) bị lỗi Mixed Content HTTPS vs HTTP Bổ sung thẻ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> vào file template html của bạn Another workaround is to add: <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> to index.html file in frontend. It will upgrade all requests from http to https (also when run locally, so it may not be the best workaround) Tham khảo https://stackoverflow.com/questions/63511413/fastapi-redirection-for-trailing-slash-returns-non-ssl-link
-
Cloudflare bị lỗi Error 525 SSL handshake failed
Cloudflare bị lỗi Error 525 SSL handshake failed https://blog.hostvn.net/chia-se/huong-dan-sua-loi-ssl-handshake-failed-khi-dung-cloudflare.html Lỗi 525 chỉ ra rằng việc xác thực SSL giữa Cloudflare và máy chủ web của bạn không thành công. Lỗi này chỉ xảy ra khi bạn đang sử dụng chế độ SSL Cloudflare Full hoặc Full (Strict). Điều này thường xảy ra do cấu hình trong máy chủ web của bạn, khi lỗi xảy ra, bạn sẽ thấy thông báo Error 525: SSL handshake failed. Các nguyên nhân phổ biến nhất của lỗi này là: Chứng chỉ SSL hợp lệ được cài đặt trên trang web không hợp lệ Cổng 443 trên máy chủ web của bạn bị đóng. SNI không được trang web…
-
Fix The repository … no longer has a Release file
Fix The repository ... no longer has a Release file? Run follow command apt-get dist-upgrade
-
Quy tắc vẽ Sơ đồ khối
Quy tắc vẽ Sơ đồ khối https://thanhmo.com/flowchart-la-gi/
-
Fix PowerShell Installing NuGet, says unable to access internet
Fix PowerShell Installing NuGet, says unable to access internet About err PowerShell Installing NuGet, says unable to access internet Fix PowerShell Installing NuGet, says unable to access internet Chạy lệnh này trước [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 References https://stackoverflow.com/questions/55826791/powershell-installing-nuget-says-unable-to-access-internet-but-i-actually-can
-
Cài SSH Server và fix lỗi SSH Permission denied, please try again
Cài SSH Server và fix lỗi SSH Permission denied, please try again. Cài SSH Client và SSH Server Cài SSH Client sudo apt-get update sudo apt-get upgrade sudo apt-get install openssh-client Cài SSH Server sudo apt-get update sudo apt-get upgrade sudo apt install openssh-server Start SSH Server Theo hướng dẫn của người ta thì là vầy Open your terminal application Install the openssh-server package on Ubuntu, run: **sudo apt install openssh-server** Enable ssh server on Ubuntu, run: **sudo systemctl enable ssh** By default, firewall will block ssh access. Therefore, you must enable ufw and open ssh port Open ssh tcp port 22 using ufw firewall, run: **sudo ufw allow ssh** Congratulations. Now you have SSH…
-
[Sưu tầm] Auto Start LAMPP (XAMPP) at Startup in Ubuntu Linux
Hướng dẫn chỉnh tự động bật LAMPP khi khởi động Server Linux Creating a script to start XAMPP automatically in Ubuntu 18.04 or later Tạo file services để khởi động LAMPP, ở đây tui dùng vim để edit, bạn có thể dùng nano hay gì tùy sở thích của bạn =)) vim /etc/systemd/system/xampp.service Chép nội dung sau vào [Unit] Description=XAMPP [Service] ExecStart=/opt/lampp/lampp start ExecStop=/opt/lampp/lampp stop Type=forking [Install] WantedBy=multi-user.target Xong thì lưu lại và thoát thôi Instruct Ubuntu to execute LAMPP service at the startup systemctl enable xampp.service Sau khi xong thì khởi động lại máy thử, trong trường hợp của mình thì khởi động lại vẫn không được :') Mình…
-
Cấu hình Docker WSL2 – chuyển vị trí lưu docker sang ổ đĩa khác
Cấu hình Docker WSL2 - chuyển vị trí lưu docker sang ổ đĩa khác # Ngắt Docker với Data của nó wsl --unregister docker-desktop-data # Import Docker data qua trị trí mới wsl --import docker-desktop-data D:\docker_files\docker_desktop_data\wsl_data "C:\Program Files\Docker\Docker\resources\wsl\wsl-data.tar" --version=2 https://stackoverflow.com/questions/62441307/how-can-i-change-the-location-of-docker-images-when-using-docker-desktop-on-wsl2 Tham khảo thêm một số lệnh khác https://www.youtube.com/watch?v=AyEw7JsHt9I D:\docker_files\docker_desktop Xem danh sach WSL wsl -l -v Tat het WSL wsl --shutdown Export WSL (docker data) wsl --export docker-desktop-data D:\docker_files\docker_desktop\docker_desktop_backup.tar Remove docker data mac dinh wsl --unregister docker-desktop-data Import back docker data ở ổ đĩa khác wsl --import docker-desktop-data D:\docker_files\docker_desktop\ddesktop D:\docker_files\docker_desktop\docker_desktop_backup.tar
-
Bức ảnh 717 gigapixels hoặc 717,000,000,000 pixels
Bức ảnh 717 gigapixels hoặc 717,000,000,000 pixels ULTRA HIGH RESOLUTION PHOTO From the series Operation Night Watch Night Watch, Militia Company of District II under the Command of Captain Frans Banninck Cocq, Rembrandt van Rijn, 1642 This is the largest and most detailed photo ever taken of a work of art. It is 717 gigapixels, or 717,000,000,000 pixels, in size. The distance between two pixels is 5 micrometres (0.005 millimetre), which means that one pixel is smaller than a human red blood cell. The team used a 100-megapixel Hasselblad H6D 400 MS-camera to make 8439 individual photos measuring 5.5cm x 4.1cm. Artificial intelligence was used to stitch these smaller photographs together…