Categories for Uncategorized
Responsive CSS counter without Javascript
CSS counters let you adjust the appearance of content based on...
@media (max-width: 319px) {
.small-card__item:nth-child(1)~.small-card__item {
counter-increment: item-count;
}
}
Bulker – Face recognition script
Imagine that we have thousands of images inside of a...
def get_ref_face(self, ref_image_path):
try:
Short-circuits conditionals
If you have to execute a function only if condition...
// You can use short-circuit
condition && doSomething();
Croatia recession prediction
This LSTM recurrent neural network learns to predict Croatia economic...
pred.train_LSTM()
pred.evaluate_LSTM()
pred.display_results(
Simple Nodejs watcher
I built a simple Nodejs watcher that is syncing changes...
const dataCsv = './sample_data.csv';
const mongodb = require("mongodb").MongoClient;
const csvtojson = require("csvtojson");
const fs = require('fs');
let url = "mongodb://yoururl";
Svelte is really cool
Svelte is a radical new approach to building user interfaces....
let count = 0;
$: if (count >= 10) {
alert(`count is dangerously high!`);
count = 9;
}
Center div vertically and horizontally with CSS
Let’s say that we want to center a div inside...
body {
display: grid;
place-items:center;
}
The :valid CSS pseudo-class
The :valid CSS pseudo-class represents any <input> or other <form> element whose...
input:valid {
background-color: powderblue;
}
Target pseudo-class
This pseudo-class is called target pseudo-class and represents an element...
:target {
outline: red dotted;
}
How to create a unique list of elements using the Set object
Creating unique lists in javascript is a common task, this...
const list = [1, 2, 3, 5, 2, 5, 7];