Snippets Collections
const textAreaResized = () => {
  const handler = (e) => {
    const target = e.currentTarget;
    target.style.height = "auto";
    target.style.height = `${target.scrollHeight}px`;
  };

  return <textarea onChange={handler} />;
};
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

Sun Jan 08 2023 20:31:43 GMT+0000 (Coordinated Universal Time) https://codesandbox.io/s/textarea-resize-27kwsd?file=/src/App.js:84-94

#javascript #react.js #input #resized
star

Mon Sep 26 2022 15:58:12 GMT+0000 (Coordinated Universal Time) 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 (Coordinated Universal Time)

#input
star

Thu Mar 24 2022 18:14:58 GMT+0000 (Coordinated Universal Time)

#php #secure #input #forms

Save snippets that work with our extensions

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