This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useState, useCallback, useRef } from "react"; | |
| // Usage | |
| function App() { | |
| const [hoverRef, isHovered] = useHover(); | |
| return ( | |
| <div ref={hoverRef}> | |
| {isHovered ? '😁' : '☹️'} | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("") | |
| base = alphabet.length | |
| exports.encode = (i) -> | |
| return alphabet[0] if i is 0 | |
| s = "" | |
| while i > 0 | |
| s += alphabet[i % base] | |
| i = parseInt(i / base, 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to Completely Remove Android Studio | |
| Execute these commands from the terminal | |
| rm -Rf /Applications/Android\ Studio.app | |
| rm -Rf ~/Library/Preferences/AndroidStudio* | |
| rm ~/Library/Preferences/com.google.android.studio.plist | |
| rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
| rm -Rf ~/Library/Logs/AndroidStudio* |