Search

Nalezeno "Data X": 5660

Dealing With Stale Props and States in React’s Functional Components


There’s one aspect of JavaScript that always has me pulling my hair: closures. I work with React a lot, and the overlap there is that they can sometimes be the cause of stale props and state. We’ll get into exactly what that means, but the trouble is that the data we use to build our UI can...

How I Put the Scroll Percentage in the Browser Title Bar


Some nice trickery from Knut Melvær. Ultimately the trick boils down to figuring out how far you’ve scrolled on the page and changing the title to show it, like: document.title = `${percent}% ${post.title}` Knut’s trick assumes React and installing an additional library. I’m sure...

min(), max(), and clamp() are CSS magic!


Nice video from Kevin Powell. Here are some notes, thoughts, and stuff I learned while watching it. Right when they came out, I was mostly obsessed with font-size usage, but they are just functions, so they can be used anywhere you’d use a number, like a length. Sometimes pretty basic usage...

Bitcoin Transaction Costs Soar 400% Amid Halving Hyperbole


The average transaction cost for Bitcoin (BTC) soared 414% in the days before the halving, peaking at $3.19 on May 8, from as low as $0.62 on April 26. This is the highest price bitcoiners have paid for a transaction on the network in ten months, according to data from Bitinfocharts. Fees are paid...

Chromium lands Flexbox gap


I mentioned this the other day via Michelle Barker’s coverage, but here I’ll link to the official announcement. The main thing is that we’ll be getting gap with flexbox, which means: .flex-parent { display: flex; gap: 1rem; } .flex-child { flex: 1; } That’s excellent...

65% of Global Bitcoin Hashrate Concentrated in China


A new bitcoin mining map by the University of Cambridge shows that China accounts for 65% of the world’s hash power. About half of the country’s hash rate is produced in just one place, the autonomous Xinjiang region, which makes up 35.76% of the global total. Launched recently,...

Vědci dokážou získat data z hacknutého počítače i přes napájecí zdroj


Inženýři a vědci z oblasti kyberbezpečnosti zkoumají různé druhy útoků na počítače a servery a jedním novým se pochlubil tým vědců z Ben Girion University v Izraeli. Pomocí speciálně připraveného malwaru jsou schopni na menší vzdálenost maximálně asi 5 metrů bez přímé viditelnosti získat

`lh` and `rlh` units


There’s some new units I was totally unaware of from the Level 4 spec for CSS values! The lh unit is “equal to the computed value of line-height” and rlh is the same only of the root element (probably the <html> element) rather than the current element. Why would that...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace