The magic of fractal snowflakes
I have been wishing snow for a long time and the winter has finally come. That made me have the idea of generating fractal snowflakes using the JavaScript.
I have been wishing snow for a long time and the winter has finally come. That made me have the idea of generating fractal snowflakes using the JavaScript.
Just fixed the flickering issue by inlining the required JavaScript, which is a really small snippet. If you’re curious about the code I’m using to toggle between the dark and light themes, following the user’s choice and falling back to the OS settings, here it is:
const mql = window.matchMedia('(prefers-color-scheme: dark)');
function toggleT (to) {
localStorage.setItem('t', to);
theme(mql);
}
function theme (query) {
const userOption = localStorage.getItem('t');
document.body.id = userOption === null
? (query.matches ? 'dark' : '')
: (userOption === 'd' ? 'dark' : '');
}
mql.addListener(theme);
theme(mql);
Node.js is one of the trends in the programming world. Let's learn how to create node.js command-line applications.
Os operadores '==' e '===' por vezes podem confundir-nos um pouco em relação ao seu uso e para que servem. Fica aqui a explicação de cada um."
Efetuar pedidos POST e GET utilizando a função ajax do jQuery e responder utilizando a linguagem de servidor PHP.
in 🍿 Watches