const words = ['designed', 'deployed', 'delivered'];
const wordElement = document.getElementById('word');
let wordIndex = 0;
let charIndex = 0;
let isTyping = false;
let blinkCount = 0;
let blinkPause = 0;
let isPreTypingBlink = true;
function typeWriter() {
const currentWord = words[wordIndex % words.length];
if (isPreTypingBlink) {
// Blink twice before typing
if (blinkCount < 3) {
wordElement.textContent = (blinkPause % 2 === 0 ? '_' : '');
blinkCount++;
blin
/**
* @param {string} s
* @param {number} k
* @return {number}
*/
var takeCharacters = function(s, k) {
// Initialize total counts for 'a', 'b', and 'c'
const count = [0, 0, 0];
for (let c of s) {
// Increment the count for each character
count[c.charCodeAt(0) - 'a'.charCodeAt(0)]++;
}
// Check if it's impossible to collect k of each character
if (Math.min(...count) < k) {
return -1; // Return -1 if it's impossible
}
// Slidin
except Exception as e:
error_message = f"Failed to fetch BetAccepted date: {e}"
raise type(e)(error_message) from e
### Notes
- This will only show items from the user Personal folder that utilize **Web Password**.
- If the Installation folder is missing browser subfolders, use the __--register__ command.
- If the Extension is not registered in Microsoft Edge, make sure the processes are running as a local administrator (as it has the rights).
### **1. Improve Error Messages**
- **Current Issue**: Some error messages like `"An internal error occurred"` are generic and may not provide enough debugging context.
- **Improvement**: Add more descriptive logging (but still avoid exposing sensitive details to users).
- **Example**:
```python
logging.error(f"Unexpected error in register_user: {e}")
return {
"success": False,
"message": "Failed to register the user due to an internal error.",
"status_code": 500,
}
`
body:not(.logged-in) li#menu-item-22595 {
display: none;
}
/*change "menu-item-22595" to the menu item ref you want to hide*/
tmux new -s 2023
php artisan task_7398 2023-01-01 2023-12-31
tmux new -s 2024
php artisan task_7398 2024-01-01 2024-12-31
Отсоединитесь от сессии:
Ctrl+B, затем D
tmux list-sessions
tmux attach -t session_name
.gallery {
.uk-grid {
.uk-button {
@include button;
}
// Basis-Layout
> div {
width: 100%;
}
// 2 Bilder
&:has(> div:nth-child(2):last-child) {
> div {
width: 50%;
}
}
// 3 Bilder
&:has(> div:nth-child(3):last-child) {
> div:first-child {
width: 100%;
}
> div:not(:first-child) {
width: 50%;
}
}
// 4+ Bilder
&:has(> div:nth-child(4)) {
> div:first-child {
.uk-grid.uk-child-width-1-3.uk-grid-small {
display: flex;
flex-wrap: wrap;
.uk-first-column {
flex: 1 1 100%;
order: -1;
.el-item {
width: 100%;
img {
width: 100%;
height: auto;
}
}
}
.uk-first-column + div {
flex: 1 1 calc(33.333% - 10px);
}
}
import { useRef } from "react"
import useHover from "./useHover"
export default function HoverComponent() {
const elementRef = useRef()
const hovered = useHover(elementRef)
return (
<div
ref={elementRef}
style={{
backgroundColor: hovered ? "blue" : "red",
width: "100px",
height: "100px",
position: "absolute",
top: "calc(50% - 50px)",
left: "calc(50% - 50px)",
}}
/>
)
}
import useDarkMode from "./useDarkMode"
import "./body.css"
export default function DarkModeComponent() {
const [darkMode, setDarkMode] = useDarkMode()
return (
<button
onClick={() => setDarkMode(prevDarkMode => !prevDarkMode)}
style={{
border: `1px solid ${darkMode ? "white" : "black"}`,
background: "none",
color: darkMode ? "white" : "black",
}}
>
Toggle Dark Mode
</button>
)
}
import useGeolocation from "./useGeolocation"
export default function GeolocationComponent() {
const {
loading,
error,
data: { latitude, longitude },
} = useGeolocation()
return (
<>
<div>Loading: {loading.toString()}</div>
<div>Error: {error?.message}</div>
<div>
{latitude} x {longitude}
</div>
</>
)
}
import useMediaQuery from "./useMediaQuery"
export default function MediaQueryComponent() {
const isLarge = useMediaQuery("(min-width: 200px)")
return <div>Large: {isLarge.toString()}</div>
}
import { useState } from "react"
import useEventListener from "./useEventListener"
export default function EventListenerComponent() {
const [key, setKey] = useState("")
useEventListener("keydown", e => {
setKey(e.key)
})
return <div>Last Key: {key}</div>
}
import { useState } from "react"
import useFetch from "./useFetch"
export default function FetchComponent() {
const [id, setId] = useState(1)
const { loading, error, value } = useFetch(
`https://jsonplaceholder.typicode.com/todos/${id}`,
{},
[id]
)
return (
<div>
<div>{id}</div>
<button onClick={() => setId(currentId => currentId + 1)}>
Increment ID
</button>
<div>Loading: {loading.toString()}</div>
<div>{JSON.stringify(error, null,