teleren/devto huggingface dataset:
Концепции APTOS | Топология сети нод
Tags: blockchain, aptos, webdev, tutorial
Published: 2022-08-30 14:26:47

Ноды валидатора и полные ноды образуют иерархическую структуру, в корне которой находятся ноды валидатора, а во всех остальных - полные ноды. Блокчейн Aptos различает два типа Полных Нод: полные ноды валидиатора и публичные полные ноды. Полные ноды валидиатора подключаются непосредственно к нодам валидатора и обеспечивают масштабируемость наряду с защитой от DDoS. Публичные полные ноды подключаются к Полным нодам валидиатора (или другим публичным полным нодам) для получения доступа к сети Aptos с низкой задержкой.

## Различные сетевые стеки
Блокчейн Aptos поддерживает различные сетевые стеки для различных топологий сети. Например, сеть валидаторов не зависит от сети полных нод. Преимущества наличия отдельных сетевых стеков включают в себя:

- Чистое разделение между различными сетями.
- Лучшая поддержка предпочтений безопасности (например, двунаправленная аутентификация против аутентификации на сервере).
- Возможность использования изолированных протоколов обнаружения (например, обнаружение на сети для публичных конечных точек нод валидатора против ручной настройки для частных организаций).

## Синхронизация Нод

Ноды Aptos синхронизируются с последним состоянием блокчейна Aptos с помощью двух механизмов: консенсуса или синхронизации состояния. Ноды-валидаторы используют как консенсус, так и синхронизацию состояния для поддержания актуального состояния, в то время как полные ноды используют только синхронизацию состояния.

Например, нода-валидатор будет вызывать синхронизацию состояния, когда он впервые выходит в сеть или перезагружается (например, после того, как некоторое время находился в автономном режиме). Как только валидатор получит актуальную информацию о состоянии блокчейна, он начнет участвовать в консенсусе и будет полагаться исключительно на консенсус для поддержания актуальности. Полные ноды, однако, постоянно полагаются на синхронизацию состояния, чтобы получать и поддерживать актуальную информацию по мере роста блокчейна.

## Синхронизатор состояния

Каждая нода Aptos содержит компонент Синхронизатора состояния, который используется для синхронизации состояния ноды с ее аналогами. Этот компонент имеет одинаковую функциональность для всех типов нод Aptos: он использует выделенную одноранговую сеть для постоянного запроса и распространения данных блокчейна. Ноды-валидаторы распространяют данные блокчейна внутри сети нод-валидаторов, в то время как полные ноды полагаются на другие полные ноды (т.е. валидаторные или публичные полные ноды).
How to handle dart application exceptions ?
Tags: dart, monitoring, opensource, testing
Published: 2022-08-30 13:59:39

**[Talker](https://github.com/Frezyx/talker)** - package to handle dart application exceptions.

<p align="center">
    <a href="https://github.com/Frezyx/talker/blob/master/docs/assets/gifs/talker_big.gif?raw=true" align="center">
        <img src="https://github.com/Frezyx/talker/blob/master/docs/assets/gifs/talker_big.gif?raw=true">
    </a>
</p>

🚀  The main goal of the project provide ability to understand where the error occurs in a short time
✅  Can work with different state managements
✅  Can work with any crash reporting tool (Firebase Crashlytics, Sentry, Your own, etc)
✅  Flutter app logs UI output at screen
✅  Integrated logs and exceptions history
✅  Showing UI exception alerts

### Easy to use
You can use Talker instance everywhere in your app
Simple and concise syntax will help you with this

```dart
final talker = Talker();
// Handle exceptions and errors
try {
  // your code...
} on Exception catch (e, st) {
    talker.handle(e, st, 'Exception with');
}

// Log your app info
talker.info('App is started');
talker.critical('❌ Houston, we have a problem!');
talker.error('🚨 The service is not available');
```
More examples you can get [here](https://github.com/Frezyx/talker/blob/master/packages/talker/example/talker_example.dart)

## Customization

Talker package has a lot of customizations like:
✅  Custom logs with any color and message 
✅  Logs history (contains all application info)
✅  Custom Filters, Formatters, outputs
✅  Observers for making custom logic
✅  Data stream to handle logs in any point of code

I am launching a series of articles about this technology.
In each new article I will talk about a certain feature of this approach to error handling in the Flutter/dart application

😎 Go to the [GitHub repository page](https://github.com/Frezyx/talker)! 
🥵 Here you can see beautiful examples of usage and code snippets. 

Show some ❤️ and star the repo to support the project!
About Me
Tags: webdev, profile, about, design
Published: 2022-08-30 13:58:19

Hello everyone, I am Mohammad, I'm 20 years old, and I have been working in the field of front-end development for 3 years, since 2019. 👨‍💻
Before entering this field, I worked in graphic design including logo design for 1 year. ✒️
 I'm also a teacher of Persian literature. 🧑🏻‍🏫😅🤦🏻  
  



### My Services  
- Web development 🌐  
- UI/UX design 👨‍💻  
- Education in social media  
  



### My Languages  
- Persian (native)  
- English (almost 60 percent)  
  

<br/>  


## My Skill Set

- HTML

- CSS

- JS

- Bootstrap

- SASS

- ReactJS

- Animate.css

- ChartJS

- Wordpress

- Figma

- Adobe Illustrator

- Adobe Photoshop

- Adobe Xdesign

- Adobe After Effects

- Adobe Premiere Pro

- Blender

<br/>  


## Connect with me  
[GitHub](https://github.com/mohammadSahragard)
[Instagram](https://instagram.com/mammad.sahragard)
[LinkedIn](https://www.linkedin.com/in/mohammadsahragard/)
[Twitter](www.twitter.com/MammadSahragard)
[YouTube](https://www.youtube.com/user/https://www.youtube.com/channel/UCmlrWX41qiXEv6QNMzivxIw)
Should I share my current salary with recruiters?
Tags: anonymous, discuss, career, help
Published: 2022-08-30 13:50:50

_This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment or if you want to ask your own anonymous question._ 

***


I'm currently on the job hunt. Have been for about 2 months or so. I've started to get some questions from recruiters about my current salary, and I just don't know if it's smart to tell them or keep that close to my chest. Any guidance would be greatly appreciated. I'd love to know the pros/cons of this.
Say hello to Steampunk Spotter: Assisted Automation Writing Tool for your Playbooks
Tags: trustableautomation, ansible, automation, ansibleplaybooks
Published: 2022-08-30 13:41:51

There hasn’t been much buzz around our Ansible Playbook Quality Scanner lately. But with a good reason. Our team has been putting blood, sweat, and tears (of joy 😉) into shaping the Scanner into what it was meant to be all along - the ultimate helper for your automation.

With a bunch of new checks and features added, Scanner actually grew so much, it outgrew its name. It evolved into **[Steampunk Spotter](https://steampunk.si/spotter/)**, indispensable tool that analyzes and enhances your Ansible Playbooks to help you reduce risks and speed up your automation.

Steampunk Spotter scans the quality of your content, provides recommendations on how to improve your playbooks and helps you understand what will happen when you run them. It helps you simplify and accelerate your automation with improved playbooks that guarantee reliable execution.

[![asciicast](https://asciinema.org/a/XZ7Kso0KEU81KmvkWBuh6rQiW.svg)](https://asciinema.org/a/XZ7Kso0KEU81KmvkWBuh6rQiW)

Development, Quality Assurance and Operations teams will find Steampunk Spotter as an invaluable tool for assisted playbook writing, simplified Ansible upgrades, and achieving reliable, secure, and trustworthy automation. It helps you:

✔️ Enhance Playbook Writing
️✔️ Easily upgrade to the latest Ansible version
✔️ Reduce risks and speed up automation
✔️ Optimize your automation
✔️ Achieve Secure Playbook Execution

And what sets our Spotter apart from other tools is the fact that it goes beyond simple syntax checks and understands the context of Ansible Playbooks and Collections, so it knows what you want to achieve with your playbook and helps you get there faster and safer.

We hope you’re as excited as we are about this tool that will help you optimize your automation. [Start Spotting!](https://spotter.steampunk.si/register/team-plan)

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znit278ouezaval2dr6q.png)](https://steampunk.si/spotter/)
Third Maximum Number
Tags: python, leetcode, problemsolving
Published: 2022-08-30 13:40:30

Given an integer array nums, return the third distinct maximum number in this array. If the third maximum does not exist, return the maximum number.



```py

class Solution:
    def thirdMax(self, nums: List[int]) -> int:
        n = list(set(nums))
        
        if len(n) < 3:
            return max(n)
        
        return sorted(n)[-3]
        
        
        

```
Responsive Furniture eCommerce Website Using HTML CSS JavaScript
Tags: css, javascript, beginners, tutorial
Published: 2022-08-30 13:26:19

{% youtube NK8Cif0dAoM %}

Responsive Furniture eCommerce Website Using HTML CSS JavaScript

This video will show you how to build a responsive furniture ecommerce website using html css javascript

[Github Repo](https://github.com/codewithsadee/woodex)

---

HI 👋
I'm Sadee (webdev)
In this channel I make videos about Complete Responsive website.
You can checkout my channel 👇

📺 My Channel : [codewithsadee](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g)
🔔 Subscribe : [subscribe now](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g?sub_confirmation=1)

---

🔗 Essential links
-----------------------------
[Download the starter file to practice](https://drive.google.com/file/d/118MEPa5UWW_XoFN81AaHxjfKuZKlrtYv/view?usp=sharing)

---

⏱️ Timestamps
-----------------------------
0:00 - Demo
5:31 - File structure
5:59 - Project initial
12:21 - Header
37:28 - Hero section
44:38 - About section
49:51 - Product section
1:18:13 - Blog section
1:27:48 - Newsletter section
1:32:22 - Footer
1:43:32 - Media queries

---

[![Become a patreon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnjl14kdm5qf08hu5lop.png)](https://www.patreon.com/bePatron?u=62535867)
Концепции APTOS | Полные ноды
Tags: blockchain, aptos, tutorial, webdev
Published: 2022-08-30 13:25:46

Нода Aptos - это объект экосистемы Aptos, который отслеживает состояние блокчейна Aptos. Пользователи взаимодействуют с блокчейном через ноды Aptos. Существует два типа нод:

- Ноды Валидатора 
- Полные ноды
Каждая нода Aptos состоит из нескольких логических компонентов:

- REST-сервис
- Mempool
- Execution
- Виртуальная машина
- Хранилище
- Синхронизатор состояния

Программное обеспечение Aptos-core может быть настроено для работы в качестве ноды валидатора или полного ноды.

## Обзор

Полная нода может быть запущена любым человеком. Полная нода повторно выполняют все транзакции в истории блокчейна Aptos. Полная нода воспроизводит все состояние блокчейна путем синхронизации с вышестоящими участниками, например, другими Полными нодами или нодами-валидаторами. Чтобы проверить состояние блокчейна, Полный ноды получают набор транзакций и накопительный хэш-корень реестра, подписанный валидаторами. Кроме того, Полный ноды принимают транзакции, представленные клиентами Aptos, и направляют их напрямую (или индирективно) на ноды валидаторов. Хотя Полные ноды и валидаторы используют один и тот же код, Полные ноды не участвуют в консенсусе.

Сторонние исследователи блокчейна, кошельки, биржи и DApps могут запускать локальную полную ноду для:

- Используйте REST-интерфейс для взаимодействия с блокчейном.
- Получите согласованное представление реестра  Aptos.
- Избегайте ограничений на скорость чтения трафика.
- Выполняйте пользовательскую аналитику на исторических данных.
- Получайте уведомления об определенных событиях на сети.
Day 1: Not Quite Lisp (Part 2)
Tags: go, adventofcode, tdd, challenge
Published: 2022-08-30 13:09:53

We are back and today we are going to be solving part 2 of day 1: "Not Quite Lisp" from Advent of Code 2015.

Lets take a look at the problem.

```
--- Part Two ---

Now, given the same instructions, find the position of the
first character that causes him to enter the basement 
(floor -1).

The first character in the instructions has position 1,
the second character has position 2, and so on.

For example:

) causes him to enter the basement at character position 1.
()()) causes him to enter the basement at character position 5.

What is the position of the character that causes Santa to
first enter the basement?
```
So this is going to be quite straight forward. We already have all of the pieces we need to be able to complete this challenge.

All we need to do whilst iterating over our string slice of characters, is check whether or not the floor value is `-1` and if so, return the index for the character.

Now we only want to do this in the first instance so we probably want to check whether or not the basement floor has already been visited.

Lets modify our existing code so that our main function now looks like this.

```go
func main() {
	var result = 0
	var basementHit = false

	input := LoadInput("./input.txt")
	slice := strings.Split(input, "")

	for i, v := range slice {
		switch v {
		case "(":
			result = IncrementByOne(result)
		case ")":
			result = DecrementByOne(result)
		}

		if result == -1 && basementHit == false {
			basementHit = true
			// we `+1` because the problem states that
			// the first char is at index 1
			fmt.Println(i + 1)
		}
	}

	fmt.Println(result)
}
```
So for this particular problem and input data, my console tells me that the first time Santa enters the basement is on character 1797.

If we punch that in to the answer box we get a success message!

```
That's the right answer! You are one gold star
closer to powering the weather machine.
```
So that is the first day for Advent of Code 2015 completed. Usually as the days go on, the problems get more difficult but we will do our best to continue through them and answer as many of them as possible.
CSS-Flexbox
Tags: webdev, css
Published: 2022-08-30 13:05:10

## What is Flexbox?

Flexible Box Layout (Flexbox) is a CSS3 web layout model. The flex layout allows responsive elements within a container to be automatically arranged depending upon screen size.Flexbox consists of Flexbox Container and Flex items

## Flex-Container
The outer box, which contains flex-items, is created using display: flex;

```
.flexbox {
display: flex
}
```
This defines a flex container; inline or block depending on the given value. It enables a flex context for all its direct children.

### Flex-Items
Direct children of the flex container

## Flex-Direction
#### Column

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hkimbemicf7y4laj0xxw.png)
```
.flexbox {
 flex-direction: column;
}
```
#### Row

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/277savq0lst53c74fjwj.png)
```
.flexbox {
 flex-direction: row;
}
```
#### Column-reverse

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixoqlyauv19x50bqr4ki.png)
```
.flexbox {
 flex-direction: column-reverse;
}
```
#### Row-reverse

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wx6navws71hbhog0nxul.png)
```
.flexbox {
 flex-direction: row-reverse;
}
```

## Justify-Content

#### Space-between
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spbv92yulpc78aembyc8.png)
```
.flexbox {
 justify-content: space-between;
}
```
####Space-Evenly
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9q0ew2bq6u3js59m4cuj.png)
```
.flexbox {
 justify-content: space-evenly;
}
```
####Space-around
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkvwiw6i21hdvvx5t6a0.png)
```
.flexbox {
 justify-content: space-around;
}
```
## Align Items
####Center
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zne92dturzbukrvbqt5a.png)
```
.flexbox {
 align-items: center;
}
```
####Flex-start
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvgk1lugxf53o85gqnr2.png)
```
.flexbox {
 align-items: flex-start;
}
```
####Flex-end
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r97h39uqcns6o8mvtobm.png)
```
.flexbox {
 align-items: flex-end;
}
```

## Flex-Wrap Properties

####Nowrap
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fsma1yl4g750nf803fr2.png)
```
.flexbox {
  flex-wrap: nowrap;
}
```
####Wrap
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2lmai2qfrekncob9s8b.png)
```
.flexbox {
 flex-wrap: wrap;
}
```
####Wrap-reverse
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/903jh40wiwobzv5z3ueu.png)
```
.flexbox {
  flex-wrap: wrap-reverse;
}
```
Exploring Data Store — A New Way of Storing Data in Android.
Tags: database, datascience, programming
Published: 2022-08-30 13:01:09



Learn how to use DataStore instead of SharedPreferences in Android.

]Jetpack DataStore is a data storage solution that allows you to store key-value pairs or typed objects with protocol buffers.

DataStore uses Kotlin coroutines and Flow to store data asynchronously, consistently, and transactionally.

We hope that you have sufficient knowledge regarding when, why, and how to store data in Android applications using SharedPreferences and Room Database.In this blog post, we will cover DataStore, and its two types (Preferences DataStore, Proto DataStore).

The complete class details for creating the proto-type database instance and reading/writing data are available on Github.For detailed implementation, [visit our blog](https://blog.canopas.com/exploring-data-store-a-new-way-of-storing-data-in-android-fb97c2ae298).
Exclude Pages From WordPress Search Results
Tags: webdev, beginners, wordpress, tutorial
Published: 2022-08-30 12:55:24


![Exclude Pages From WordPress Search Results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n0zglv7nc0482i32u0ql.jpg)


How to Exclude Pages from WordPress Search Results. By default, the internal search on your WordPress website will cover all posts and pages in the WordPress search results. To address it more relaxed for your site users to find what they’re looking for, you may require to exclude certain Pages or Posts, so it nevermore appears in those results.

In this article, you will learn how to exclude Pages or Posts from the WordPress search results. Let’s div.

Here we will see two different methods to do this.

1. Using PHP Code in a template.
2. Using a specific Plugin


## Why Need to Exclude Pages from WordPress Search Results?

By default WordPress, site search covers all of your content in the search results. This works well full for various WordPress website owners. However, if you are managing an online store, then you may desire to hide pages like your account page, Welcome Page, checkout page, thank you page, etc. Also you may require to hide subscriber-only content from appearing in search.

**Note:** This guide meets on-site search results when a user uses your website search box to search through your website content. 

Read More: [Exclude Pages From WordPress Search Results](https://softcodeon.com/wordpress/exclude-pages-from-wordpress-search-results.htm)
Code Smell 160 - Invalid Id = 9999
Published: 2022-08-30 12:52:43

*Maxint is a very good number for an invalid ID. We will never reach it.*

> TL;DR: Don't couple real IDs with invalid ones. In fact: Avoid IDs.

# Problems

- [Bijection](https://dev.to/mcsee/the-one-and-only-software-design-principle-3086) violation

- You might reach the invalid ID sooner than your think

- Don't use [nulls](https://dev.to/mcsee/null-the-billion-dollar-mistake-1h1c) for invalid IDs either

- Coupling flags from caller to functions

# Solutions

1.  Model special cases with special objects.

2. Avoid 9999, -1, and 0 since they are valid domain objects and implementation coupling.

3. Introduce Null Object

# Context

In the early days of computing, data types were strict. 

Then we invented [The billion-dollar mistake](https://dev.to/mcsee/null-the-billion-dollar-mistake-1h1c).

Then we grew up and model special scenarios with polymorphic special values.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/342599869ca032390b55d4cc76c49548)
```c
#include "stdio.h"
#include "stdlib.h"
#include "stdbool.h"
#define INVALID_VALUE 999

int main(void)
{    
    int id = get_value();
    if (id==INVALID_VALUE)
    { 
        return EXIT_FAILURE;  
        // id is a flag and also a valid domain value        
    }
    return id;
}

int get_value() 
{
  // something bad happened
  return INVALID_VALUE;
}

// returns EXIT_FAILURE (1)
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/40fb4a5238c9d6fbf5ad0f0aefa7fd07)
```c
#include "stdio.h"
#include "stdlib.h"
#include "stdbool.h"
// No INVALID_VALUE defined

int main(void)
{    
    int id;
    id = get_value();
    if (!id) 
    { 
        return EXIT_FAILURE;
        // Sadly, C Programming Language has no exceptions
    }  
    return id;
}  

get_value() 
{
  // something bad happened
  return false;
}

// returns EXIT_FAILURE (1)
```

# Detection

[X] Semi-Automatic 

We can check for special constants and special values on the code.

# Tags

- Null

# Conclusion

We should use numbers to relate to the external identifiers. 

If no external identifier exists, then it is not a number.

# Relations

{% post https://dev.to/mcsee/code-smell-120-sequential-ids-egm %}

{% post https://dev.to/mcsee/code-smell-12-null-la4 %}

# More Info

{% post https://dev.to/mcsee/null-the-billion-dollar-mistake-1h1c %}

{% post https://dev.to/mcsee/y2k22-the-mistake-that-embarrasses-us-5873 %}

# Disclaimer

Code Smells are just my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Markus Spiske](https://unsplash.com/@markusspiske) on [Unsplash](https://unsplash.com/s/photos/flag-number)  

* * *

> Bugs lurk in corners and congregate at boundaries.

_Boris Beizer_
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
Official HIGE DANdism Biography
Tags: music, jpop
Published: 2022-08-30 12:50:41

On this occasion we will share information about a band that is booming, namely a band that
named Official HIGE DANdism or (Official髭男dism) they are also popular with their short name, Higedan (ヒゲダン)
they are a Japanese band. His agency is Lastrum Music Entertainment, while his official fan is
BROTHERS and Stand By You. The band was founded in 2012, by 4 personnel namely Satoshi Fujihara (Vocal/Piano),
Daisuke Ozasa (Guitar), Makoto Narazaki (Bass/Sax), & Masaki Matsuura (Drums). In 2014, they won
music tournament “V-air Amaban Grand Prix Tournament 2014” and in April 2015, they worked through
debut CD with his first mini album, "Love to Peace wa Kimi no Naka". Selected “No Doubt” song
as the theme song for the Fuji drama The Confidence Man JP and was released as the debut single
major in April 2015.

**Advanced Information**

Name: Official HIGE DANdism (Official髭男dism)
Other names: Higedan, Japanese script (ヒゲダン)
Origin: Shimane, Japan
Active year: 2012 until now
Genre: J-pop & Pop Rock
Label: PONY CANYON & IRORI Records

**Personnel**

Satoshi Fujihara (Vocals & Piano)
Daisuke Ozasa (Lead Guitar)
Makoto Narazaki (Bass & Saxophone)
Masaki Matsuura (Drums)
Masaki Matsuura (Drums)
Source : [Informasi Musik & Tutorial](https://rikytone.ink/)