Snippets Collections
const [checkedInput, setCheckedInput] = useState({ currentChekcedInput: [] });

 const handleCheckboxOnchange = (e) => {
    const { value, checked } = e.target;
    const { currentChekcedInput } = checkedInput;

   // Case 1  : The user checks the box
    if (checked) {
      setCheckedInput({ currentChekcedInput: [...currentChekcedInput, value] });
    }

    // Case 2  : The user unchecks the box
    else {
      setCheckedInput({
        currentChekcedInput: currentChekcedInput.filter((e) => e !== value)
      });
    }
  };
function secure_input($data) {
  $data = trim($data);
  $data = stripslashes($data);
  $data = htmlspecialchars($data);
  return $data;
}
star

Mon Sep 26 2022 15:58:12 GMT+0000 (UTC) https://discuss.codechef.com/t/how-to-take-input-of-an-array-in-1-line-in-c/2810

#c++ #input
star

Mon Apr 25 2022 09:32:06 GMT+0000 (UTC)

#input

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension