Background image css not scaling down properly

Advertisements I’m trying to put an image as a background of my project insde the body component, but when I reduce the screen width the image doesn’t overflow correctly. This is what I have now: the css is: body { background-image: url("https://phoenix-engineering.be/wp-content/uploads/2019/07/shutterstock_1113165392.png"); background-size: cover; overflow: hidden; background-position: unset; background-repeat: no-repeat; text-align: center; font-family: "Roboto", sans-serif;… Read More Background image css not scaling down properly

AWS EC2 log userdata output to cloudwatch logs

Advertisements I’m doing pre-processing tasks using EC2. I execute shell commands using the userdata variable. The last line of my userdata has sudo shutdown now -h. So the instance gets terminated automatically once the pre-processing task completed. This is how my code looks like. import boto3 userdata = ”’#!/bin/bash pip3 install boto3 pandas scikit-learn aws… Read More AWS EC2 log userdata output to cloudwatch logs

How to associate label with checkbox but not using "for=id"

Advertisements i have this code: <li><input type="checkbox" id="checkboxThree" value="Alergia3" ><label for="checkboxThree">Alergia 1</label></li> <li><input type="checkbox" id="checkboxFour" value="Alergia4"><label for="checkboxFour">Alergia 1</label></li> <li><input type="checkbox" id="checkboxFive" value="Alergia5"><label for="checkboxFive">Alergia 1</label></li> <li><input type="checkbox" id="checkboxSix" value="Alergia6" ><label for="checkboxSix">Alergia 1</label></li> But I don’t want to use "id" and "for" because I have to do other thing later and I can’t use them. I have… Read More How to associate label with checkbox but not using "for=id"

how can I change json "dict" into a consumable format for aws boto3 tagset list of dicts

Advertisements I have a JSON file that contains a tagset (key, values) in the following format: {"Key1":"ValueA", "Key2":"ValueB"} The boto3 S3 put_bucket_tagging operation needs to get the tagset in the following format: ‘TagSet’: [ { ‘Key’: ‘Key1’, ‘Value’: ‘ValueA’, }, { ‘Key’: ‘Key2’, ‘Value’: ‘ValueB’, } ] It looks like a list of dicts, but… Read More how can I change json "dict" into a consumable format for aws boto3 tagset list of dicts

getting text block length with css (preferred) or javascript

Advertisements Is there a way to know the actual length of div below after filling with text? with css (preferred) or javascript. *{ margin:0; padding:0; } div{ display:inline-block; background-color:steelblue; font-family: roboto; } <div>what is my length?</div><br/> <div>what is my length then????</div> >Solution : In JS, you can use offsetWidth. You also have offsetHeight for the… Read More getting text block length with css (preferred) or javascript