Skip to main content

Posts

Showing posts from March, 2015

Health: Stomach Ulcer and Food Poisoning Quick Treatment

Hi! 👋 First of all, I'm not a medical doctor. I have an engineering degree in low power electrical field and I am a software developer. Mm. But I do have lots of experiences handling these: stomach ulcer and food poisoning — for myself, especially, and for other people around me. And, of course, I have friends, colleagues, and family who are medical professionals. Mostly medical doctors. Let me share some of quick treatments for stomach ulcer and food poisoning . This is the list of the subsections 📋 Stomach Ulcer: Habit Stomach Ulcer: Quick Treatment Stomach Ulcer Treatment Summary Old Time Remedy Before Antacid Food Poisoning: Habit Food Poisoning: Quick Treatment Food Poisoning Treatment Summary Activated Charcoal Is Not for Alcohol Poisoning Stomach Ulcer and Food Poisoning: Maintenance The Knowledge Drink Water Exercise ...

JavaScript: Shuffling Array Elements

Shuffle is different than random in term. But indeed randomness is applied in shuffling . As in shuffling cards and giving out one random card, those are different. Algorithmically , we can loop through the reference array, generate random index based on the reference array length, then put that item (with that random index) to a new array. But since random can generate similar number (being floored or rounded down) as the previous one, that can lead to duplicates . For Example We Have Input Array: ["a", "b", "c", "d"] ⚠️ If we simply loop through the array while creating a random index then blindly 🙈 copy the randomly chosen item to a new array, surely there will be duplicates . ❌ Unwanted Output: ["c", "a", "a", "d"] ["d", "b", "b", "b"] ["a", "a", "c", "a"] 🚮 Deletion Technique We need to t...
Monkey Raptor uses cookies for analytics, advertisements, and functionality. More info on Privacy Policy