Cách xóa phần tử trùng lặp trong Javascript

Lập trình viên

Giả sử ta có một mảng và có nhiều phần tử trùng lặp, yêu cầu đầu ra là chỉ lấy các phần từ không trùng lặp. Với mong muốn như vậy ta chỉ cần dùng Set trong Javascript. const arrDuplicate = ["ngovang.com", "google.com", "ngovang.com", "youtube.com", "facebook.com", "google.com"] console.log(arrDuplicate) const newArrayWithoutDuplicate …

Xem chi tiết »

Share image files with other apps (Android programming)

We will develop a feature for sharing images to another application (such as Telegram and Facebook). The instructions will be provided in the Java programming language for Android. Method 1: Use base64 image string: private void shareImageBase64(Context context, String base64Image) { try { // Decode the Base64 string into a …

Xem chi tiết »