teleren/devto huggingface dataset:
Day 527 : Work Out
Tags: hiphop, coding, code, lifelongdev
Published: 2022-02-09 22:42:30

_liner notes_:
- Professional : Pretty productive day. Submitted the promo video I made to get feedback from the team. Wanted to get some more eyes on it to see if there are any things I missed like misspellings or could be clearer. Got some good feedback and some stuff I didn't think about. Just had to update some text and add some more audio. Then I cleaned up and added a sample demo application I created to a repo. Met with my manager's manager. We got to somehow talking about planes. haha Then I started working on a plugin for a project.

- Personal : During my lunch break, I helped out a friend that's learning to code with an issue they ran into. We were able to work out the bug. Last night, I worked on my side project. Able to read data from the database, list the entries and select an entry. Then my internet started messing up so I decided to watch some anime and call it a night.

![A beach in  Kālepa Ridge, HI, USA with a large green covered rock formation made up of huge spikes just off the shore and a mountain range in the distance.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xb77rpv7m7w13ywijlat.jpg)

Going to see if I can get the edit portion of the side project working completely. Then I want to work on the launch part. Almost forgot that I'll need to install the countdown timer Web Component I made. I've gotten so much use out of it. Super happy I made it, otherwise I would have to keep recreating it. Also think I may have figured out a time that I can listen to tracks for the radio show during the week so it's not always a rush at the end of the week. Also want to watch another episode of "Demon Slayer" before heading to bed.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube H4HTtZppZr4 %}
CMS vs HTML: Why Use a Content Management System?
Tags: html, webdev, coredna, cloud
Published: 2022-02-09 22:39:26

The prospect of launching a website still feels incredibly exhilarating — even for those who have already launched numerous websites in the past.

But if you’re new to the game, you may have conducted some research and found that some web developers prefer to code websites in HTML, while others prefer to use something called a CMS (Content Management System).

**What is HTML?**
HTML stands for HyperText Markup Language. It is a markup language used by website creators to develop and design web pages. It is definitely not the only language used by webmasters. There is XML (Extensive Markup Language), GML (Generalized Markup Language) and LaTex, just to name a few — but HTML is the most common.

Without HTML, we would have web pages that would look no less interesting than a page of unformatted text. HTML allows us to add style to text, insert and format images, embed video, customize fonts, add color, and a whole lot more.

The example below shows you the HTML coding for Core dna’s homepage:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i1437it9zwsl3lv6arox.png)

**What is a Content Management System (CMS)?**
CMS stands for Content Management System, which is essentially software that helps you to build a website. It may provide you with templates, and it will definitely give you a way to create and manage digital content — most often through a user-friendly WYSWYG editor which is similar to using Microsoft Word.

Common CMS’ include Tumblr, WordPress, Joomla, Wix, and Drupal.

On the more advanced side of the spectrum, you’ll find ECM (Enterprise Content Management), which does everything a web CMS does, and then some. It supplements a typical web CMS features by facilitating collaboration in the workplace by integrating digital asset management, eCommerce, and document management into the mix. Going a step further, you’ll notice how most ECMs are becoming DXPs (Digital Experience Platforms), which help brands personalize content, deliver content to IoT devices, and much more.

**CMS vs HTML: What is the difference?**
It is important to note that almost every website is made with using HTML and CSS (Cascading Style Sheets) coding language. The question is, was it coded from scratch, or is the web page using a CMS to piece the page together more easily?

You see, with a CMS, you can often use pre-built templates to launch web pages more quickly. You can then customize those templates to make them your own. This is obviously a lot faster than coding something from scratch, and is especially useful if you have no coding knowledge.

But besides that, there are some significant differences between HTML-only websites and CMS-powered websites.

Find out more at Core dna's blog on [CMS vs HTML: Why Us a Content Management System?](https://www.coredna.com/blogs/cms-vs-html#:~:text=HTML%20allows%20us%20to%20add%20style%20to%20text%2C,software%20that%20helps%20you%20to%20build%20a%20website.)
Latex For Beginners Part 1
Tags: tex, texcreate, mkprojects, tutorial
Published: 2022-02-09 22:38:06

What is latex you may ask? LaTeX is like the HTML for academic documents, it's a scripted language used to define components for a document. If this makes absolutely no sense, trust me, keep reading and you'll understand. 

---

## Technical Requirements 
You need some sort of tex compiler, and a text editor, personally I use texlive and VSCode respectively. 
  
Debian:
```shell
$ sudo apt install texlive-full
``` 

Windows: 
[Install here](https://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe)

MacOS: 
[Install here](https://mirror.ctan.org/systems/mac/mactex/MacTeX.pkg)

---

## First Document 
Let's create a new file `FirstDoc.tex`, and let's add the following code: 

```tex
% This is a comment 
% This defines the font size, paper size, and document class
% Document classes may be articles, book, beamer(slides)
\documentclass[11pt, letterpaper]{article}

% Your metadata, define title, author, and date
% in the preamble
\title{First Document}
\author{Your Name}
\date{\today}

% start the document
\begin{document}
\maketitle % create title page 
\pagenumbering{arabic} % either arabic or roman page numbering
\newpage % Create a new  blank page 
\end{document}
```
Wow wow wow, that's a lot of mumbo jumbo, I think a lot of the comments explain the metadata quite well, so let's talk about the 
`\begin{}...\end{}`, what is this?

### Environments 
Environments are essentially blocks of code that have a defined behaviour where everything between it's `begin` and `end` are part of the environment. Let's look at a few more environments that you'll regularly use. 

#### Itemize: 
Created a dotted list using `itemize`, so let's define it: 
```tex
\begin{itemize}
   \item An item 
   \item Another item
\end{itemize}
```

Add this to your document, run `pdflatex FirstDoc` in your terminal and you'll see a `FirstDoc.pdf` you can open.

> If you do `enumerate` instead of `itemize`, the list will be numbered instead of dotted. 

#### Center: 
Have everything centered using the center environment, so if we 
have the following: 

```tex
\begin{center}
   This will all be centered
\end{center}
```

But this isn't very useful if we don't understand sections, paragraphs, etc. So let's talk about that in the next part.
Phalcon 5.0.0beta3 Released
Tags: phalcon, phalcon5, beta, release
Published: 2022-02-08 15:15:22

---
title: Phalcon 5.0.0beta3 Released
published: true
date: 2022-02-08 14:50:35 UTC
tags: phalcon,phalcon5,beta,release
canonical_url: 
---

Phalcon v5.0.0beta3 has been released, featuring mostly bug fixes!

This release fixes several bugs that the community has identified.

> A huge thank you to all of our contributors and the community!!

The release tag can be found here: [v5.0.0beta3](https://github.com/phalcon/cphalcon/releases/tag/5.0.0beta3).

This should be our last beta version. We have one feature request to address (from the list of tasks we have) and PHP 8.1 support. Both are underway. The project page that we keep the status of the work we have done and need to do can be found [here](https://github.com/phalcon/cphalcon/projects/3).

Finally, we are also working on the upgrade guide and documentation, and the community has been helping with upgrading incubator packages to v5

#### Changelog

## Changed

- Renamed `Phalcon\Db\Result\Pdo` to `Phalcon\Db\Result\PdoResult` to avoid collisions with `\PDO` [#15874](https://github.com/phalcon/cphalcon/issues/15854)

## Fixed

- Fixed `Phalcon\Logger\AbstractAdapter::getFormattedItem()` to not add `PHP_EOL` at the end of the message and added it to the `Phalcon\Logger\Adapter\Stream` [#14547](https://github.com/phalcon/cphalcon/issues/14547)
- Fixed `Phalcon\Html\Helper\Title:__invoke()` to not use the `$separator` as parameter - no need to redefine it in a view [#15866](https://github.com/phalcon/cphalcon/issues/15866)
- Fixed the delimiters for `Phalcon\Support\Helper\SnakeCase` and `Phalcon\Support\Helper\KamelCase` [#15850](https://github.com/phalcon/cphalcon/issues/15850)
- Fixed `Phalcon\Mvc\Router\Route::getName()` and `Phalcon\Mvc\Router\Route::getHostname()` to also return `null` [#15880](https://github.com/phalcon/cphalcon/issues/15880)
- Fixed `Phalcon\Mvc\Router\RouteInterface::getName()` and `Phalcon\Mvc\Router\RouteInterface::getHostname()` to also return `null` [#15880](https://github.com/phalcon/cphalcon/issues/15880)
- Fixed `Phalcon\Mvc\Model::findFirst()` to return `mixed` or `null` [#15883](https://github.com/phalcon/cphalcon/issues/15883)

## Added

- Added `Phalcon\Html\Helper\Title:setSeparator` to allow setting the separator independently [#15866](https://github.com/phalcon/cphalcon/issues/15866)
Are you confused about REM and EM?
Tags: css, rem, html, beginners
Published: 2022-02-09 21:59:50




REM can be confusing for most people at first, especially without a solid understanding of its close cousin EM and their counterpart, pixels. However, once we begin to understand when to use these different relative units, one realizes how much adaptability and flexibility we're allowed when trying to make a responsive website. 

When I first started learning CSS, like many people I stuck with my trusty px (pixel) for all my measurements whether it be font-size, padding, margins etc. so. when i first found a video discussing rem and em I had no idea what was happening. 

Both rem and em are relative units, meaning they're relative to their parent's property whereas px is not. Before even considering rem, it’s important to recognize the relationship between em, markup, and inheritance. 

## **Let me give you a quick breakdown of em:**


Em is relative to it's parent unit ...

Let's say for example that we have our base html has a 
font-size of 16px. Now if we were to edit a title in our 
css and give it a font-size of 1.6em, what this means is 
that it will have a font-size that is (1.6 * 16) = 25px; 
now let'a say that we also want to change the font-size of 
a paragraph that is the child element of the title, if we 
were to give that child element a font-size of .773em, 
this translate to a font-size of (.773 * 25) = 19px. It is 
now multiplied by 25 because the html is no longer the 
parent element, but rather the title element.


_Here is a visual example:_ 

{% codepen https://codepen.io/jeremychurch/pen/XWrzLJ %}

## **What is REM?**

Now that we've got em out of the way, it's time for the easier unit to understand which is rem. The rem unit, short for root em, will always be relative to the font-size of the root html element (default of 16px). So this means that if we use rem, the values of parent elements are ignored contrary to em, and only the value of the root is taken into consideration. So 2rem will equal 2 times whatever the root element's font size is, regardless of any other element's font size.

One reason i tend to use rem though is because if I'm trying to achieve consistent spacing without any extra markup, rem can be used to easily define the padding and margins without being affected by any parent element even if nested.

Hopefully this short blog was able to clear ay confusion you may have had, now go practice it on your own to get more comfortable!
Judging Valid Parentheses
Tags: leetcode, java, algorithms, hashmap
Published: 2022-02-09 21:57:24


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m183vcere1as0xu57ub.png)
#### Leetcode problem 20: Valid Parentheses
#### Question:
##### Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. 
##### An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order.

Below is one of the solutions:

```java
class Solution {
    
    // Initialize HashMap
    static final HashMap<Character, Character> hashMap = new HashMap<>();
    static {
        hashMap.put(')', '(');
        hashMap.put('}', '{');
        hashMap.put(']', '[');
    }
    
    public boolean isValid(String s) {
        // Initialize a stack to be used in the algorithm.
        Stack<Character> stack = new Stack<>();
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            // If the current character is a closing bracket
            if(hashMap.containsKey(c)){
                // Get the top element of the stack
                // If the stack is empty, set a dummy value of '#'
                char topElement = stack.empty() ? '#' : stack.pop();
                // If the mapping for this bracket doesn't match the stack's top element, return false;
                if(topElement != hashMap.get(c)){
                    return false;
                }
            }else{
                // If it was an opening bracket, push to the stack.
                stack.push(c);
            }
        }
        return stack.isEmpty();
    }
}
```

Let's do the test:

First test case:

Input:

```java
"(()){[()]}"
```

Output:
```java
true
```

And another test case:

Input:

```java
"](())"
```

Output:
```java
false
```

OK! Let's keep practising.
Welcome Thread - v163
Tags: welcome
Published: 2022-02-09 21:38:34

---
title: Welcome Thread - v163
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Bob Ross saying "I'm So Glad You Could Join Me Today"](https://media.giphy.com/media/13j8f255dPErew/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Get hourly data from Coingecko API
Tags: typescript, javascript, web3, blockchain
Published: 2022-02-09 21:17:27

## 📋 Task
Get hourly price data on an arbitrary time period from Coingecko API

---

## 🤯 Problem
Hourly granularity is available only in 1-90 days span

---

## 💡 Solution 
Cut bigger time frames on multiple 90-day calls

---

## ❓ How 

- await Promise.all() [decent blog post about it](https://www.aleksandrhovhannisyan.com/blog/javascript-promise-all/)

---


### Create a method to call an API | [docs](https://www.coingecko.com/en/api/documentation)
![create a method to call an API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opfcb17pwhue3r8ma42z.png)



---

 
### Generate suitable time ranges

![generate suitable time ranges](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ht5p9nms3590mh7xutlk.png)

---


### Make multiple calls to an API
![make multiple calls to an API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jrt2jycq5xenesuyxi32.png)

---

 

## **_Have a nice day!_** 🤓
Micro-frontends .
Tags: webdev, database, programming, tutorial
Published: 2022-02-09 21:06:34

**

## Monolithic to micro-frontend migration.
**

_I have been indulging in micro-frontends these last few days and here is what I would share. Make sure you read through chronologically to get the gist of it._

Ecommerce and online transactions for businesses have recently mushroomed. In 2020 alone, there was a 16 - 19% increase in online retail sales' share of total retail sales (according to estimates in an UNCTAD report , 3 May).

So suppose you are starting out your ecommerce store, all you require is a small scale website and it will suffice your needs. You have very few orders and you require only a handful of staff members. This website consists of the front-end and a business logic part that handles all your functionality. i.e the backend.

With not so involving apps on your site, like about us, blog section, manageable cart checkouts etcetera , a monolithic architecture will most likely cut it for you.

Over time, the ecommerce site grows and becomes a multinational business, and you process very many orders at a go, you are recruiting staff members, you are stocking up on goods etc, you are maintaining the inventory etcetera - This means that you have to beef up your site (more sections, more content, bigger capacity databases etc). There has to be accuracy in database queries lest 
it breaks your application, or give erring reports.

You can solve this baggage by considering migration from monolithic to a micro-frontend architecture.

**

## Micro-frontends
**
Micro-frontends refer to a sub-division of a front-end application into multiple independent sections which are a part of a whole.

For the approximately 260 islands of Japan to be still considered part of this state they communicate with each other. Verily, the constructs of micro-frontends have to be in consistent communication with each other.

---
Web Cache Deception
Tags: security
Published: 2022-02-09 21:06:07


Websites often tend to use web caching functionality to improve user experience and enable better performance standards for the users.

Web caching reduces the load on the web server by caching frequently requested contents. Generally, static and public files are cached such as Style sheets (css), Scripts (js), Text Files (txt), Images (bmp,gif,png etc.),etc.,User specific data or private and sensitive information are not cached. 

However, some misconfigurations may result in deceiving the caching servers to store local copies of sensitive data and serve them to other users. This kind of attack is known as Web Cache Deception. 

The attacker adds a suffix to the path of a page containing sensitive data to make it look like a static, public asset so that the cached copy of the page is stored by the caching server.

Caches can impact the application architecture in unpredictable ways if a deficient caching architecture is implemented. Web cache deception vulnerabilities might cause the websites to be exposed to other damaging attacks other than data leaks. Operators should ensure that the caching functionalities are properly configured and the application is not affected by them. 

[_Click here to learn more about Web Cache Deception_](https://beaglesecurity.com/blog/article/web-cache-deception.html)
Python loops
Tags: beginners, tutorial, python, programming
Published: 2022-02-09 20:56:11

> [Sign up to my newsletter!](https://baransel.dev/newsletter/).

If we want to print "Python Lessons" on the screen ten times, we need to use the `print()` function ten times.

That's what we're going to do with Python loops. There are two different types of loops; `while` and `for`, I will also touch on the `range()` and `len()` functions and `break`, `continue` and in statements that we need in these loops.

## `while` loop

It is a type of loop that allows us to rerun the code we wrote in Python. The working logic is that the `while` loop is repeated every time, if it satisfies the condition, it enters the loop again, if it does not, the loop ends, let's show it with an example; Let's print the numbers between 0 and 10 on the screen.

```python
number = 0
while number <= 10:
    print(number)
    number = number + 1
```

Let's examine the codes in order. In the first line, we created a variable called `number` and set its value to zero. In the second line, the loop repeats as long as the value of the number variable is less than and equal to 10.

In the third line, we printed the `number` variable on the screen, and in the fourth line, we increased the number variable by one.

How the program will work;

First, the value of the `number` variable is zero, it will compare it with ten, if it is small and equal, it will enter the loop, first print the zero value on the screen, then increase the `number` variable by one, the new value of the `number` variable will be one, and it will come to the beginning of the loop again. In the same way, it will compare with the value of ten, print the new value on the screen and increase the value by one, until the value of the `number` variable is greater than ten, and it will end the loop.

## `for` loop

Another loop in Python Loops is the `for` loop. Functioning the same as the `while` loop, the usage of this loop is slightly different, but the functions are the same. Let's print the numbers up to 10, which we did with the `while` loop, with the `for` loop;

```python
for number in range(0, 11):
    print(number)
```

Here, too, the variable is a `number`, and the condition is that the number variable is between 0 and 10. Let's show it with another example.

```python
for letter in "Python":
    print(letter)
```

Now that we've seen both types of loops in the Python Loops topic. If you ask which one is better to use, the two do not have an advantage over each other. While the `while` loop is better in one application, the `for` loop may be more advantageous in another application.

## `range` function
Continue this post on my blog! [Python loops](https://baransel.dev/post/python-loops/).


[Sign up to my newsletter!](https://baransel.dev/newsletter/).
ZeroTier Technical Talks at Networking Field Day 27
Tags: networking, vpn, p2p, iot
Published: 2022-02-09 20:50:32

On January 27, 2022, Founder Adam Ierymenko gave a technical talk about the high-level concepts behind [ZeroTier networking](https://www.zerotier.com) at NFD27. Here are the official videos from the three-part presentation.

...


### ⏁ Part I: ZeroTier The Planetary Data Center
	
What is a planetary data center? Is ZeroTier a VPN, an SD-WAN, or a network overlay? What are ZT’s main features, integrations, and use cases? Is ZeroTier Zero Trust?
[https://www.youtube.com/watch?v=T2BbrqpnMAE](https://www.youtube.com/watch?v=T2BbrqpnMAE)

{% youtube T2BbrqpnMAE %}




### ⏁ Part II: ZeroTier Networking Demo
Telnet, ping, network traffic sniffing, using mDNS/Avahi, accessing a Cockroach DB cluster, playing Hunt the Wumpus. Yes, these are all things you can do with ZeroTier.
[https://www.youtube.com/watch?v=iAITDB24KKg](https://www.youtube.com/watch?v=iAITDB24KKg)

{% youtube iAITDB24KKg %}



### ⏁ Part III: ZeroTier Technical Deep Dive
Learn how ZeroTier’s layered architecture approach enables both a “Planetary Wire Closet” and “Secure Wide Area VLANs” all in one robust networking service.
[https://www.youtube.com/watch?v=VhQ30bVF3_s](https://www.youtube.com/watch?v=VhQ30bVF3_s)

{% youtube VhQ30bVF3_s %}



......