teleren/devto huggingface dataset:
Đá Gà 24H | Đá gà trực tiếp Hôm nay
Tags: daga, nuoiga, dagaonline, cuadao
Published: 2022-07-20 02:11:47

Welcom to https://daga24h.com. Đá Gà 24H là trang chuyên chia sẻ tất cả những thông tin về đá gà như Đá gà online, Đá gà truyền thống, Kiến thức nuôi gà đá, Kinh nghiệm chơi đá gà, Giống gà đá và tất cả những tin tức đá gà được cập nhật thường xuyên và chính xác. 

Website: [https://daga24h.com](https://daga24h.com)
Email: daga24hvn@gmail.com
Tags: Đá Gà 24H, Đá gà Online, Đá gà truyền thống, Kiến thức nuôi gà, Giống gà đá, Kinh nghiệm đá gà, Tin tức đá gà, Tin đá gà, Kiến thức đá gà, Trang tin tức đá gà, Daga24h.com.
Hashtag: #trangtintucdaga #daga24h #dagaonline #dagatruyenthong #kinhnghiemdaga #kienthucnuoiga #gionggada #gionggadanhapkhau #tindaga #daga24hcom #tindaga #tintucdaga #daga

Link:
[https://daga24h.com/da-ga-online/da-ga-cua-sat/
](https://daga24h.com/da-ga-online/da-ga-cua-sat/
)
[https://daga24h.com/da-ga-online/da-ga-cua-dao/
](https://daga24h.com/da-ga-online/da-ga-cua-dao/
)
[https://daga24h.com/kien-thuc-nuoi-ga/cach-cham-soc-ga-da/
](https://daga24h.com/kien-thuc-nuoi-ga/cach-cham-soc-ga-da/
)
[https://daga24h.com/giong-ga/giong-ga-da-viet-nam/](https://daga24h.com/giong-ga/giong-ga-da-viet-nam/)
A Voice Bot with Alan and Monaca
Tags: ai, javascript, tutorial, beginners
Published: 2022-07-20 02:08:12

A voice chatbot is a conversational AI communication tool that can capture, interpret, and analyze vocal input given by the speaker to respond in a similar natural language. Users can interact with a voice AI chatbot with voice commands and receive relevant responses. In this article, we will learn how to create a simple voice chatbot mobile application with the help of Alan.

https://medium.com/the-web-tub/a-voice-bot-with-alan-and-monaca-5846d98c2034
openGauss Supports SM3 and SM4 Algorithms
Tags: database, opensource
Published: 2022-07-20 01:35:13

Chinese cryptographic algorithms are Chinese algorithms issued by the State Cryptography Administration Office of Security Commercial Code Administration (OSCCA). Common algorithms include SM1, SM2, SM3, and SM4. The key length and block length are both 128 bits. To meet bank customers’ requirements for database security capabilities, openGauss 2.0.0 and later versions support Chinese cryptographic algorithms to enhance enterprise-level security capabilities of databases and improve product security competitiveness, including the SM3 algorithm  for user authentication, and the SM4 algorithm for data encryption and decryption.

learn more,Please click the word"[openGauss](https://blog.opengauss.org/en/post/2022/opengauss-supports-sm3-and-sm4-algorithms/)"
Java 🙌
Tags: java, programming
Published: 2022-07-20 01:18:23

Un lenguaje sencillo, orientado a objetos, interpretado, robusto, securizado, independiente de las arquitecturas, portable, eficaz, dinámico.
**-Fundamentos del lenguaje** 📖
_Las variables_
Las variables nos permiten almacenar en memoria diferentes valores útiles para el funcionamiento de nuestra aplicación durante su ejecución.
Java dispone de 2 categorías de tipos de variables:
🚩Los tipos por valor: la variable contiene realmente la información
🚩Los tipos por referencia: la variable contiene la dirección de memoria donde contiene la información
Document first
Tags: api, documentation
Published: 2022-07-20 00:29:13

---
title: Document first
published: true
description: 
tags: api, documentation
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

It is a consensus in the software development community that documentation is essential. But at the same time, it's not one of the most glamorous tasks, especially compared to writing code. So it's natural for us developers to think:

> What if I generate the documentation from the source code??

I've used this approach in a few projects, but in recent years I've taken a slightly different process, which I call "documentation first." I will illustrate with an example.

Imagine a team made up of a backend and a frontend developer. This team should implement the following task:

> Develop the product registration form

At the time of refinement, I always suggest that the team could break this task into sub-tasks, such as:

- Define the API contract
- Develop the API
- Develop the form
- etc.


For the context of this post, only the first task is essential. In it, the team works together to define the API contract. They discuss data format, whether the API will be Rest or RPC, authentication, data compression, and other vital issues. The delivery of this task is the documentation, preferably in a standard like [OpenAPI](https://spec.openapis.org/oas/latest.html) or [API Blueprint](https://apiblueprint.org) (my preferred format).

With this task completed, they can now work in parallel again. The backend development will focus on delivering the API defined, while the frontend will implement the form knowing what it will send and receive from the backend. In addition, generating mocks and stubs is possible if they write the documentation using one of the abovementioned standards, making development and testing easier.

Of course, during the development process, the team may encounter some edge cases they didn't see during the documentation phase. When this happens, a quick rework is needed to adjust the documentation, and the work goes on as expected.

With this approach, I found some advantages such as:

- the team spends more time thinking about the scenarios in which the API will be applied, generating greater understanding before any line of code is written;
- there is an improvement in the rapport between team members;
- The documentation keeps up to date and alive.

I used an example of API development here. Still, the same approach can be applied in other scenarios, especially where we have integration between parts of the system, such as in a microservices environment.

As I mentioned earlier, I've been using this approach for the last few years, and the result has been very worthwhile. I hope it makes sense for your team and if so, use the comments to share your experiences.
Basics of Custom Routes in Rails
Tags: react, beginners, rails, routes
Published: 2022-07-20 00:10:18

I am working on a project for my software engineering program. I was required to include a custom route to display some info on a profile page. So here is a little bit on how to build a custom route in a React/Rails Application.  

We don't need to do this in any particular order, but the bridge between the frontend and the backend are the routes so let's start there. So we define profile in our `routes.rb` file. 

```
Rails.application.routes.draw do
  namespace :api do
    get "/users", to: "users#index"
    post "/signup", to: "users#create"
    get "/me", to: "users#show"
    post "/login", to: "sessions#create"
    delete "/logout", to: "sessions#destroy"
    get "/profile", to: "users#profile"

    resources :breweries do
      resources :reviews, shallow: true
    end
  end
end
```
Next we will declare a has_many relationship through reviews so we can access our custom routes association. You will see here that the user `has_many :reviewed_breweries, through: :reviews, source: :brewery`. 

```
class User < ApplicationRecord

  has_many :breweries,  dependent: :destroy

  has_many :reviews 

  has_many :reviewed_breweries, through: :reviews, source: 
  :brewery
  
  has_secure_password

  validates :username, presence: true, uniqueness: true

end
```

We will define what data our custom route will give us back in the user controller. In this case, we define profile to display all the breweries the user left a review for.  

```
class Api::UsersController < ApplicationController
  skip_before_action :authorized!, only: :create
  
  def index
    render json: User.all
  end

  def create
    user = User.create!(user_params)
    session[:user_id] = user.id
    render json: user, status: :created
  end

  def show
    render json: @current_user
  end

  def profile
    reviewed = @current_user.reviewed_breweries
    render json: reviewed
  end

  private
  def serialized_user
    @user.to_json(include: :breweries)
  end

  def user_params
    params.permit(:username, :password, 
  :password_confirmation, :image_url, :bio)
  end
end
```

Next we will make a fetch request on the frontend in our Profile.js file we created and then render the data we want to the page for the user to see. Last, we will add a route to our App.js file to render our Profile.js file.

What we get back is a profile page for the current user logged in and displays a list of all the breweries the user has left a review for. I hope this helps you, as it did for me, retain some of the basics during your learning process. 

```Happy Coding!```
Day 77/#100DaysOfCode
Published: 2022-07-20 00:06:19

- Scanning through Python Crash Course and learning the fundamentals from different angles. After 2 course materials (Jose Portilla's Udemy course + Al Sweigart's Automating The Boring Stuff with Python + countless tutorials online), PCC was more comprehensible even when the author uses snakecase.
- PCC is great because the author makes you do simple exercises to understand the concepts. ATBS's programs were a bit harder (at least it felt hard for me at that point of time). Jose Portilla's course was just confusing for me. But I also learned that AV learning isn't the best way for me to learn. 
- But maybe things are starting to make more sense because I am 6 months into this. 
- I started doing Hackerrank problems to practice my problem-solving skills with Python. I still get frustrated but never blank. There is always systematic ways to find out things I haven't yet. I used to just go blank for a long time. 
- I am also a bit anxious that I haven't gone to more intermediate and advance Python stuff like classes, numpy, lambda, sets. But I am taking a deep breath and just trusting the process. 
- I am also working on the CS Timer Personal Project at the same time. I get restless if I feel like it's not moving as fast as I wanted but that's just my neuroticism. I fill up the anxiety with working on Hackerrank problems. 
- I have not written on my pen and paper journal for a week plus now. I miss it but I find that I can organise my thoughts better now and have less use for it. I still need it to jot down visuals in my head.
- I got defensive when Matt said I talk too much and should code more. LOL. But I have awareness that the discomfort resulting from that feedback is crucial and my defensiveness is just self-preservation.
- I honour the early part of my journey where I needed to engage with others on Twitter and talk a lot about programming to make sense of things. But as I move on, I don't need as much crutch anymore. I am kinda okay. 
- But writing is my catharsis. And this journey is an important one. I need to write about it or I'll go mad. I will forget the important lessons (especially in developing systematic problem-solving skills). 

**Achievements from yesterday:**
1. Understood functions with arguments and did some programs with that understanding.
2. Familiarised self with Hackerrank environment.
3. Solved the Hackerrank leap problem paired with Ammar.

**The plan for today:**
1. Finish PCC's chapter on function. 
2. Do 1 Hackerrank problem on List (2/5 for the week)
3. Edit CS Timer project based on discussion with The Codashians.
Group Anagrams
Tags: leetcode, algorithms, java
Published: 2022-07-19 22:37:44

**Leetcode Problem:** [Group Anagrams](https://leetcode.com/problems/group-anagrams/)

**Objective:**

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.

---
**Pattern: Arrays and Hashing**

---
**Approach:** 

1. Create a 2D list for the result. 
2. Create a HashMap: key = sorted word, value = list of anagrams.
3. Iterate through the input string array and sort the input.
4. If the sorted input is not in hashmap or edge case where the sorted input equals the non-sorted input then add the sorted input as the key and the non-sorted input as an anagram.
5. If the sorted input already exists as a key in the hashmap, then get the sorted key and add the non-sorted input into the anagram list.
6. Iterate through the hashmap and add each anagram list into the result list. Return result.

---
**Big-O Notation:** 

Time Complexity: O(m * nlog(n)) 
We have iterate n times for each string. 
We sort each string using Arrays.sort() which is O(n log(n)).

Space Complexity: O(n * m)
We use additional data structures for storage. 
We have a 2D list to store the result. 
We have a hashmap to store elements. 

---
**Code:**

```java
class Solution {
    public List<List<String>> groupAnagrams(String[] strs) {
        // input: string array 
        // output: 2D list 
        List<List<String>> result = new ArrayList<List<String>>();

        Map <String, List<String>> hashMap = new HashMap<>();

        for(String str : strs){
            char [] array = str.toCharArray();
            Arrays.sort(array);
            
            String sortStr = str.valueOf(array);
         
            // edge case if current == key then add to key. 
            if(sortStr == str || !hashMap.containsKey(sortStr)){
                List <String> anagram = new ArrayList<>();
                anagram.add(str);
                hashMap.put(sortStr, anagram);
            } else {
                hashMap.get(sortStr).add(str);
            }
        }
        
        // add anagram list into result 
        for(String s : hashMap.keySet()){
            result.add(hashMap.get(s));
        }
     
        return result;
    }
}
```
What kind of jobs should I apply with this portfolio?
Tags: discuss, help, career
Published: 2022-07-19 23:44:54

Since my last article was so successful, I would like to ask you what area would this project fall into?

For those who haven't seen the article, here's the link:

{% embed https://dev.to/joaomaranhao/how-i-used-python-to-automate-a-youtube-channel-ph0 %}

I'm looking for my first job as a software developer, I'm applying for front-end, back-end jobs, but this project specifically doesn't fit exactly into any of these areas.

I have a few other projects I've done, including my personal website.

{% embed https://www.joaomaranhao.com.br/ %}

I'm studying both front-end and back-end, I like both.

I would like your opinion about my portfolio, is it good for a first job?

I know I need to do more projects, and I'm already doing it, but I'd like feedback.
Day 101: back to demos
Published: 2022-07-19 23:32:26

Hi!
Today I was informed that there would be a demo (long time) I noticed that I'm a bit delayed so I expect to be stressed for the rest of the week. Today my time time management routine didn't go expected (it couldn't :) but at least it's a good start it will work with repetition
that's about it 
gotta run
Signing off...
Flexbox almanac
Published: 2022-07-19 23:16:15

> **NOTE:** The article is live & will be updated in the future !

---

Difference between the following two :

| **justify-self**         |   | **justify-content**           |
|--------------------------|---|-------------------------------|
| applied on parent        |   | applied on parent             |
| affects parent container |   | affects parent's strict child |

---
<u>Useful playground: </u>

> TIP : try to examine the code, pay attention at the comments :

{% codepen https://codepen.io/projektorius96/pen/YzQOwdg %}
Top 5 website to learn HTML for Free
Tags: html, beginners, webdev, programming
Published: 2022-07-19 22:59:37

**in this era , Any persen starting out in web programming have to learn HTML or Hyper Text Markup Language.
Understanding HTML  is essential if you want to learn programming.
In short, HTML is the framework or skeleton of any web page.**
In this article I will give you the best 5 websites to learn html for free :

1. Coursera:
Visit Website- [](https://www.coursera.org/courses?query=html) https://www.coursera.org/courses?query=html
2. W3schools:
Visit Website-  [](https://www.w3schools.com/html/default.asp) https://www.w3schools.com/html/default.asp

3. Codecademy:
Visit Website-  [](https://www.codecademy.com/learn/learn-html) https://www.codecademy.com/learn/learn-html

4. Openclassrooms:
Visit Website-  [](https://openclassrooms.com/fr/courses/1603881-apprenez-a-creer-votre-site-web-avec-html5-et-css3) https://openclassrooms.com/fr/courses/1603881-apprenez-a-creer-votre-site-web-avec-html5-et-css3

5. Learn-HTML.org:
Visit Website-  [](https://www.learn-html.org/) https://www.learn-html.org/
Unit testing isn't what you think
Tags: tdd, programming, testing, extremeprogramming
Published: 2022-07-19 22:30:13

Very interesting video with Ian Cooper explaining the big misunderstanding around the word "unit" in the term "unit test" 

{% embed https://www.youtube.com/watch?v=HNjlJpuA5kQ %}


He is saying that the word "unit" wasn't about the system under test (i.e., class, method, etc), but was about the test itself. "Unit test" is a test which doesn't depend on any other tests.

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

I think I was pondering the same idea when making the title picture regarding the test pyramid and it exactly the same reason why I was working on the Feature test model (https://aqaguy.uk/pages/ta/ftm/feature_tests/) which helps build effective test coverage disregarding of the approach you choose (test-first or test last).

What do you think? Do you agree with Ian's definition of unit testing?
addEventListener
Tags: javascript
Published: 2022-07-19 22:20:42

####HTML codes
```html
<div id='container'>
      container
</div>
```

#### addEventListener function
this function listens to the event which is passing through the first parameter
and calls a function which passes through the second parameter 

```js

const container = document.getElementById("container");
container.style.backgroundColor = "pink";


function backgroundToBlue(event) {
    event.target.style.backgroundColor = "blue";
}
    container.addEventListener("mouseover", backgroundToBlue);

```

#### addEvent "mouseleave"
```js

const container = document.getElementById("container");
container.style.backgroundColor = "pink";


function backgroundToBlue(event) {
    event.target.style.backgroundColor = "blue";
}

function backgroundToPink(event) {
    event.target.style.backgroundColor = "pink";
}

container.addEventListener("mouseover", backgroundToBlue);
container.addEventListener("mouseleave", backgroundToPink);

```

#### add randomColor to the target and body

```js

const container = document.getElementById("container");
container.style.backgroundColor = "pink";


function backgroundToNext(event) {
    const randomColor = Math.floor(Math.random()*16777215).toString(16);
    event.target.style.backgroundColor = "#" + randomColor;
}

const setBg = () => {
    const randomColor = Math.floor(Math.random()*16777215).toString(16);
    document.body.style.backgroundColor = "#" + randomColor;
    color.innerHTML = "#" + randomColor;
}

container.addEventListener("mouseover", setBg);
container.addEventListener("mouseover", backgroundToNext);

```
Editorial thinking
Published: 2022-07-19 22:17:02


Editorial thinking deals with making decisions where a data analyst chooses relevant charts in the whole set of visualizations, should be creative enough to know what #visualizations would be of interest to the views of the visualizations. Instances where a writer is trying to tell a story using #data. This can be done by the use of keen filtering skills and being able to discern what to display for viewers and what to leave out.
It relies based on the editor’s opinion, their point of view, and how they interpreted the data. This step is crucial as it comes before the design phase. The aspects that an editor may consider are such as the #colorchoices, and the types of #charts and #graphs concerning multiple data types available in their #dataset.
The three main perspectives of editorial thinking are 
angle –The approach that will be taken to answer the question at hand. i.e. where is Ebola mostly spread and fatal globally? This would need the use of a map feature. What other visualizations can help satisfy your curiosity. This can be characterized by the focus and trying as much as possible not to take many angles when analyzing data.
framing : In the large dataset with different datatypes. Having in mind what data to put and what to leave out on specific graphs and plots. Some visualizations work best with categorical data. In this stage, an editor should look at how complex the data is before visualizing it. From a picture perspective, there cannot be everything in a frame.
Focus: This now supersedes framing. After the data is selected, there should be a consideration of what data to emphasize. This is what catches the users' attention. It needs an editor to select features that they believe are more important than others. This may need an editor to use aspects such as color highlighting. #design
What libraries do you use with SvelteKit to make a full website?
Tags: svelte, icons, sveltekit, nextjs
Published: 2022-07-19 21:49:50

I am trying to find a couple of good strong libraries to assist me when making sveltekit websites. Mainly ones for image optimization(Nextjs Image Component), Icons(https://react-icons.netlify.app), and I know I might get cussed out for this but animation(Framer Motion). I really like svelte but these few things are a big deal and are just to damn easy to use with Nextjs. Here is what my package.json looks like for every Nextjs site I make.

```json
{
  "name": "my-project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "daisyui": "^2.17.0",
    "framer-motion": "^6.5.0",
    "globby": "^13.1.2",
    "next": "12.1.5",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-hook-form": "^7.30.0",
    "react-icons": "^4.3.1"
  },
  "devDependencies": {
    "autoprefixer": "^10.4.7",
    "eslint": "8.13.0",
    "eslint-config-next": "12.1.5",
    "postcss": "^8.4.14",
    "tailwindcss": "^3.1.3"
  }
}

```
Full-Stack Developer (ReactJS)
Tags: javascript, react, redux, fullstackdeveloper
Published: 2022-07-19 21:36:25

What are we looking for?
- We're looking for full stack React developers that need to do more. It should be built into your DNA. You should be proficient in building React applications and have a strong interest or experience in making those systems run better.
- Must be local to Houston, TX and open to working onsite.

What do we do?
- The work on our team is diverse. We not only build web applications. 
- We also build data instrumentation, transportation, analysis and alerting tools for our Observability stack. 
- We investigate, analyze and mitigate failures in critical pieces of infrastructure. 
- We design and implement systems to facilitate order of magnitude improvements in stability and performance, as well as build our next gen Identity and Low-Code SaaS products for our internal customers. 

What’s required?
- Strong proficiency with React, Redux, NodeJS and APIs
- Capable of working with REST APIs, Relation and Non-relational DBs.
- Be proficient with backend DBs such as Relational and NoSQL DBs.
- Must be open to a live technical coding interview.

It’s a plus if you have experience with some of these systems as well:
- Oracle and Elasticsearch
- Observability and Site Reliability Engineering
- Kafka or similar technology
- Kubernetes & Docker
- Python or C#
- OIDC
- ETL or Data Engineering