teleren/devto huggingface dataset:
Startchart: Prisma Schema
Tags: webdev, javascript, opensource, prisma
Published: 2023-02-04 02:40:41

## Background
This week, I focus on creating an initial schema for the [project](https://github.com/Seneca-CDOT/starchart) through using [Prisma](https://www.prisma.io/). This is for a MySQL database, and the PR for the initial schema is [here](https://github.com/Seneca-CDOT/starchart/pull/79). 

This is an example of a model:
![Prisma model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cbn8yhxqpgdy7kpojqzb.png)
A model describes how a table would look like on a database.

## Basics
- Record would be the table name.
- Green texts are the value types for the columns.
- The blue texts are the names of the columns.
- `@id` marks the primary key.
- `?` marks a column as nullable. 
- `@default` sets the default value as what's in the parameter.
- `now()` returns the current time.
- `@updatedAt` would provide the value that's the time a row is updated.
- Foreign key:
In the example, the line with `user` is used to record a relationship between this and the other table, for the purpose of marking a foreign key. `fields`'s value is the foreign key, while `references`'s value points to a column on another table.
On the other table, it need to have another corresponding line to fully establish the relationship, like:
![The other table's line](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hudeiq1ll95wc4haquwj.png)`[]` means it's a to-many relationship. You don't have that if it's to-one relationship.

- You might notice some odd type like `RecordType`. That's **enumeration**, and you can declare that in the same file:
![enumeration example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uz4ojud4ct6g2x35nrac.png) As you can see, the green text is the name of the type, and the blue texts are the possible values for such type.


## Experience
As far as creating schema goes, Prisma is very friendly and easy to use, once you learn the basic, such as how to mark primary key or make values in a column unique. Establishing foreign key and the relationship between tables take a bit more work to understand. It helps if you already know how a database works.

Because I need to create the database to serve the need of other parts of the project, such as what user information people who handle login want to store, I ask around the team. I sort of feel like someone who goes around with a clip board and ask what they would like to order for lunch. I ask them what they would like to include and why...to have better comprehension of the project and for my own learning, and it's always interesting to learn more.
YOLOv8 Already? How is it better than v5, try it to see!
Tags: yolo, computervision, yolov8, deeplearning
Published: 2023-02-04 10:40:51


YOLO (You Only Look Once) is a popular object detection algorithm used for computer vision applications. The latest version of YOLO, YOLOv8, was released in 2021 and it represents a major upgrade over its predecessor, YOLOv5. In this blog post, we will compare the performance and upgrades of YOLOv8 over YOLOv5.

Performance:
YOLOv8 provides improved performance compared to YOLOv5. This is due to several factors, including the use of a more efficient architecture, the addition of extra convolutional layers, and the use of anchor-based object detection. YOLOv8 also provides faster processing speeds, making it more suitable for real-time object detection applications.

Upgrades:

1. Improved Architecture: YOLOv8 introduces an updated architecture that is more efficient and accurate compared to YOLOv5. This new architecture uses a combination of residual blocks, bottleneck blocks, and inverted residual blocks to improve the accuracy and efficiency of the model.

2. Anchor-based Object Detection: YOLOv8 introduces anchor-based object detection, which provides more accurate and precise object detection compared to YOLOv5. Anchor-based object detection uses anchor boxes to predict the location and size of objects in the image.

3. More Convolutional Layers: YOLOv8 introduces extra convolutional layers, which provide the model with more capacity to learn and improve accuracy.

4. Improved Training: YOLOv8 introduces a new training regime that allows the model to learn more efficiently and achieve higher accuracy. This includes the use of a larger dataset and the use of transfer learning to fine-tune the model.

In short, YOLOv8 represents a major upgrade over YOLOv5 in terms of performance and accuracy. The improved architecture, anchor-based object detection, extra convolutional layers, and improved training regime all contribute to the improved performance of YOLOv8. If you are looking for a powerful and efficient object.
Looking for an open source project to contribute?
Tags: webdev, javascript, opensource, typescript
Published: 2023-02-04 11:11:17

Hello, I hope the above title excited you. I believe you are eager and enthusiast to contribute.

![Homepage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lup2sx4g45piw1bv4gee.png)


I have created a fullstack web application which is a blogging application. You can even use this application to blog as you want. I learnt a lot building this application. Hope you too while contributing, I will be looking forward there. Following are the features:-
-  Proper user authentication and authorization along with token verification
- Write in markdown format
-     blogging analytics
-     like/unlike comments and blogs
-     comment and reply
-     bookmark intriguing and needed blogs
-     view user's profile
-     follow/unfollow user

#### Technologies Used
- Frontend: React, Redux-toolkit, TailwindCSS, React-Router, Typescript
- Backend: NodeJS/Express, Cloudinary, JWT, Bcrypt
- Database: MongoDB, Mongoose

That's it for now. I hope you all the best.
Nuxt-content with Nuxt 3
Tags: webdev, javascript, beginners, programming
Published: 2023-02-04 15:43:06

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

Nuxt-Content is a module for the Nuxt.js framework that allows you to manage content in a headless CMS manner. It provides an easy way to work with dynamic content in a Nuxt.js application. The module integrates with a variety of headless CMS solutions, such as Strapi, Directus, and Sanity.io, making it flexible and adaptable to a wide range of use cases.

With Nuxt-Content, you can create, manage, and retrieve your content using simple APIs and templates, allowing you to build a fully dynamic website with ease. The module abstracts away the complexities of working with a headless CMS, allowing you to focus on building your application. It automatically generates a GraphQL API for you, so you don't have to worry about setting up a separate server or writing custom code to interact with your content.

One of the key features of Nuxt-Content is its ability to handle relationships between different pieces of content, such as author-to-post relationships, for example. This allows you to build complex and dynamic applications, where the content is central to the user experience.

In conclusion, Nuxt-Content is a powerful tool for building dynamic websites and applications, making it easy to work with headless CMSs. With its simple APIs and automated GraphQL setup, you can quickly and easily create, manage, and retrieve content, making it an ideal solution for a wide range of use cases.

Guillaume Duhan
AWS GuardDuty
Tags: aws, security, cloudcomputing
Published: 2023-02-04 15:55:31

- Amazon GuardDuty is a continuous security monitoring service that analyzes and processes from different data sources.
- Data source Including: CloudTrail (Event Logs, Management events, Data event for S3), VPC Flow logs, DNS logs, EBS Volume, Kubernetes audit logs. 
- You don’t have to enable logging at each of those Data sources as GuardDuty will pull all required logs independently without assigning or changing any permissions. 
- It uses threat intelligence feeds, machine learning anomaly detection, and malware scanning.
- It monitors AWS account access behavior for signs of compromise.
- Regional Service.
- Practical examples GuardDuty can detect: Reconnaissance (Gathering information about network), Instance compromise (Cryptocurrency mining), Account compromise, Bucket compromise, Malware detection, Container compromise.
- This service cost is calculated by the Volume of analyzed service logs and the volume of data scanned for malware.
- Every account has 30 days trail cost “you have access to You have access to the full feature set and detections during the free trial”, and after 7 days you will have a cost estimation to help you predicate the actual cost after trial period ends.

References: 
https://docs.aws.amazon.com/guardduty/latest/ug/what-is-guardduty.html
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ia74801a8gezgumfrec.png)
AWS Certified Professional Challenge 2023
Tags: aws, awscertifications, devops, professional
Published: 2023-02-04 18:16:59

## Are you ready?

A new challenge for those interested in AWS certification has already been announced. This time it's the Professional Challenge. A certification exam preparation program with advanced training including live and on-demand Twitch sessions with AWS experts.

If you join the [Get AWS Certified: Professional Challenge](https://pages.awscloud.com/GLOBAL-ln-GC-TrainCert-Professional-Certification-Challenge-Registration-2023.html) before April 28, they will send you a 50% discount coupon for the professional level certification exam. The options are:

- AWS Certified Solutions Architect - Professional
- AWS Certified DevOps Engineer - Professional
 

For this challenge, the exam must be taken no later than May 31, 2023.
[See program conditions](https://pages.awscloud.com/GLOBAL-ln-GC-TrainCert-Professional-Certification-Challenge-Terms-and-Conditions-2023-learn.html)
RPA IN Finance
Published: 2023-02-05 04:47:10

Robotic Process Automation (RPA) is increasingly being adopted by financial institutions to automate manual and repetitive tasks, such as data entry, account reconciliation, and payment processing. In the finance industry, where accuracy and efficiency are critical, RPA has the potential to bring significant benefits, including improved productivity and cost savings.

One of the key benefits of RPA in finance is increased accuracy and speed. By automating routine processes, such as data entry and reconciliation, RPA can help to reduce the risk of human error, which is especially important in the finance industry where errors can have significant financial consequences. In addition, RPA can process transactions and complete tasks much faster than a human worker, which can result in reduced processing times and improved customer experience.

Another advantage of RPA in finance is that it can reduce the need for manual intervention, freeing up employees to focus on more strategic tasks. For example, RPA can be used to automate repetitive back-office tasks such as invoice processing, allowing finance staff to focus on more value-added activities such as analysis and decision-making. This can result in increased productivity, improved job satisfaction, and reduced staff turnover.

RPA is also highly scalable and flexible, which makes it well-suited to the fast-paced and constantly evolving financial services sector. Robots can be easily added or removed as business needs change, and they can be programmed to work with a wide range of financial systems and applications, making it easy to integrate RPA into existing technology infrastructure.

However, it is important to note that RPA is not a standalone solution and should be used as part of a broader digital transformation strategy. For example, while robots can automate routine tasks, they are not designed to make decisions or solve complex problems. Financial institutions should therefore focus on identifying the most suitable processes for automation and ensuring that they have the right mix of people and technology to meet their business goals.

In conclusion, RPA is becoming an increasingly important tool for financial institutions, offering the potential to improve accuracy, speed, and efficiency, while freeing up employees to focus on more strategic tasks. By leveraging RPA, financial institutions can reduce costs, improve customer experience, and remain competitive in an ever-evolving market.
Fighting with motivation
Tags: codenewbie, webdev, devjournal, discuss
Published: 2023-02-05 05:16:51

I haven't posted in a while or really done anything tech related in a few....months? Weeks? Honestly, it's been so long that I have no idea how long it's been.

Here lately, I have been struggling with motivation issues. I haven't felt like doing anything productive. I haven't been studying web development, or trying to get any certs or any of the many other things I have set out to learn about. Not even just tech related things. I haven't tinkered with my Linux coding environment, created any graphics, edited a video, or really anything creative. 

Here lately, I have just been struggling with motivation to do anything. I work 40 hours a week and when I get home I wind up just goofing off or just going straight to bed.

Last year I wrote an article about [how I wanted to increase my productivity](https://dev.to/kurtissfrost/how-i-want-to-increase-my-productivity-59p0) in that article, I vaguely mention that I hadn't felt like marking things off of my to do list. This is a little more serious than that. Here recently, I haven't felt like doing anything related to tech.

I'm not 100% sure why either. Part of it could be my ADHD. Part of it could be that maybe I am just burnt out and need a break? There are a multitude of things that it could be. I'm just not really sure how I should tackle this. On the one hand, I could just bite the bullet and just do it, regardless of how I feel about it but, I feel like that would yield negative results in the long run.

I feel like taking a break could be good for me to recharge my batteries and help me get re-motivated when I finally pick up where I left off in my studies. My only thing is, sometimes when I take breaks from doing things like that, sometimes it takes me a long time to get back on topic, if I ever do, and I don't want that to happen with web development. 

# How do you handle lack of motivation?

Like the title says, how do you handle it when you find yourself lacking motivation to do something? Do you take a break? Power through?

Do you have any tips or advice? Struggling with your own lack of motivation? I wanted to open this topic for discussion and pick the community's brain a little and see what your thoughts on this were.
How to Concatenate Strings in Java like a Pro
Tags: java, programming, tutorial
Published: 2023-02-18 18:43:16

String concatenation in Java can be initially tricky, especially if you come from other programming languages. When Java was first implemented, the decision was made to render the `String` class immutable. So what if you have to concatenate two or more strings? I remember being instructed to rely on the `StringBuilder` class like so: 

```java
StringBuilder sb = new StringBuilder();
sb.append("Gandalf");
sb.append(" ");
sb.append("The");
sb.append(" ");
sb.append("Grey");

String gandalf = sb.toString();
```

Prior to Java 8, this was more efficient. However, now the compiler handles that for you by making + operations into StringBuilder operations at compile time.

However, this implementation is very naïve.

If this code
```java
String firstName = "Frodo";
String lastName = "Baggins";
String fullName = firstName + " " + lastName;
```
translates to this equivalent at compile time...
```java
String firstName = "Frodo";
String lastName = "Baggins";
StringBuilder sb = new StringBuilder();
sb.append(firstName);
sb.append(" ");
sb.append(lastName);
String fullName = sb.toString();
```
...what happens during a loop?

Unfortunately, this code
```java
List<String> hobbits = List.of("Frodo", "Samwise", "Merry", "Pippin");
String greetAllHobbits = "";
for (String hobbit : hobbits) {
  greetAllHobbits += "Greetings, " + hobbit + "!\n";
}
```
translates to roughly this equivalent at compile time
```java
List<String> hobbits = List.of("Frodo", "Samwise", "Merry", "Pippin");
String greetAllHobbits = "";
for (String hobbit : hobbits) {
  StringBuilder sb = new StringBuilder(greetAllHobbits);
  sb.append("Greetings, ");
  sb.append(hobbit);
  sb.append("!\n");
  greetAllHobbits = sb.toString();
}
```
A separate `StringBuilder` instance is created during each iteration, which can defeat the purpose of being efficient!

In the above case, you'll need to create a `StringBuilder` outside the loop so you aren't creating an unnecessary new object for each iteration.

```java
List<String> hobbits = List.of("Frodo", "Samwise", "Merry", "Pippin");
StringBuilder sb = new StringBuilder();
for (String hobbit : hobbits) {
  sb.append("Greetings, ");
  sb.append(hobbit);
  sb.append("!\n");
}
String greetAllHobbits = sb.toString();
```

In conclusion:
- Use `+` when concatenating ad hoc
- Use `StringBuilder` when concatenating with a loop
100 Days of Code: The Complete Python Pro Bootcamp for 2022 - Day 28 - Pomodoro GUI Application
Published: 2023-02-05 11:30:06

Main.py
````python
from tkinter import *
import math

# ---------------------------- CONSTANTS ------------------------------- #
PINK = "#e2979c"
RED = "#e7305b"
GREEN = "#9bdeac"
YELLOW = "#f7f5dd"
FONT_NAME = "Courier"
WORK_MIN = 25
SHORT_BREAK_MIN = 5
LONG_BREAK_MIN = 20
reps = 0
timer = NONE

# ---------------------------- TIMER RESET ------------------------------- #

def reset_timer():
    window.after_cancel(timer)
    canvas.itemconfig(timer_text, text="00:00")
    title_label.config(text="Timer")
    check_marks.config(text="")
    global reps
    reps = 0

# ---------------------------- TIMER MECHANISM ------------------------------- #

def start_timer():
    global reps
    reps += 1

    work_sec = WORK_MIN * 60
    short_break_sec = SHORT_BREAK_MIN * 60
    long_break_sec = LONG_BREAK_MIN * 60

    if reps % 8 == 0:
        count_down(long_break_sec)
        title_label.config(text="Break", fg=RED)
    elif reps % 2 == 0:
        count_down(short_break_sec)
        title_label.config(text="Break", fg=PINK)
    else:
        count_down(work_sec)
        title_label.config(text="Work", fg=GREEN)

# ---------------------------- COUNTDOWN MECHANISM ------------------------------- #
def count_down(count):

    count_min = math.floor(count / 60)
    count_sec = count % 60
    if count_sec < 10:
        count_sec = f"0{count_sec}"

    canvas.itemconfig(timer_text, text=f"{count_min}:{count_sec}")
    if count > 0:
        global timer
        timer = window.after(1000, count_down, count - 1)
    else:
        start_timer()
        marks = ""
        work_sessions = math.floor(reps/2)
        for _ in range(work_sessions):
            marks += "✔"
        check_marks.config(text=marks)

# ---------------------------- UI SETUP ------------------------------- #
window = Tk()
window.title("Pomodoro")
window.config(padx=100, pady=50, bg=YELLOW)


title_label = Label(text="Timer", fg=GREEN, bg=YELLOW, font=(FONT_NAME, 50))
title_label.grid(column=1, row=0)

canvas = Canvas(width=200, height=224, bg=YELLOW, highlightthickness=0)
tomato_img = PhotoImage(file="tomato.png")
canvas.create_image(100, 112, image=tomato_img)
timer_text = canvas.create_text(100, 130, text="00:00", fill="white", font=(FONT_NAME, 35, "bold"))
canvas.grid(column=1, row=1)

start_button = Button(text="Start", highlightthickness=0, command=start_timer)
start_button.grid(column=0, row=2)

reset_button = Button(text="Reset", highlightthickness=0, command=reset_timer)
reset_button.grid(column=2, row=2)

check_marks = Label(fg=GREEN, bg=YELLOW)
check_marks.grid(column=1, row=3)
window.mainloop()

```
tomato.png

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xyh6hisbweojfh2kd02i.png)
Introducing Escape the Wave. My Exciting New Game!
Tags: programming, gamedev, opensource, showdev
Published: 2023-02-09 14:00:00

Last week, I officially released my first game, [Falling Square](https://github.com/EmilienLeroy/FallingSquare/), which marked a great milestone for me. However, the serious work now begins. This week, I'm starting development on my second game, [Escape the Wave](https://github.com/EmilienLeroy/EscapeTheWave). It will be a simple shooting game with some surprises (which I'll keep secret for now). The game will be available on Android and iOS, like my first game, and may also be available on Windows, Linux, and macOS.

## Virtual Joysticks for Player Movement

I've made my first addition to the game by incorporating the player and their movements. To cater to mobile devices, I've added a virtual joystick that enables users to move the player. I've also added another virtual joystick for rotation. Both virtual joysticks were developed by MarcoFazioRandom and can be found under the name "Virtual-Joystick-Godot" on GitHub at this link: [https://github.com/MarcoFazioRandom/Virtual-Joystick-Godot](https://github.com/MarcoFazioRandom/Virtual-Joystick-Godot)."

![move](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nq0c7mdnves05m6m6glm.gif)

## Implementation of Player Shooting Mechanism

Next, I added the bullet and player shooting functionality. Currently, it's just a simple white ball without any textures, but there will likely be various types of bullets with unique effects in the future. To shoot, use the rotation joystick. Rotating the joystick will automatically trigger a shot.

![fire](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mrkloxd975ayosup3929.gif)

## Addition of First Wall and Camera Implementation

Finally, I've added the first wall using a simple tileset, as well as a camera that follows the player. When a bullet hits a wall, it is automatically destroyed. The camera and wall serve as the first elements in creating a visually appealing and functional environment for the game.


![walls](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2bs50ovhko6up55osgm2.gif)


## What's next

In the first week of development, I successfully laid the foundation for my new game. Building upon this solid foundation, I plan to add the first enemy in the upcoming week. This will bring the game one step closer to completion and provide players with a new challenge to overcome. I am eager to continue working on this project and can't wait to see how it evolves in the coming weeks.
Top 5 Featured DEV Tag(#algorithms) Posts from the Past Week
Tags: algorithms, c4r4x35
Published: 2023-02-06 06:23:42

##The 4 Essential Skills of the Software Developers
There are 4 main skill groups where all programmers must have. Most of these skills are resistant in time and are not influenced by the development in specific technologies (that are changing...
{% link https://dev.to/noriookawa/the-4-essential-skills-of-the-software-developers-43p3 %}
##Linked List
Hey, let´s talk about linked Lists and what are the differences between an array and a linked list.

Linked List
A linked list is structured by objects, each object have a head and a next value.

*A...
{% link https://dev.to/lausuarez02/linked-list-5bih %}
##It's the Most Wonderful Time of the Year - Dynamic PageRank and a Twitter Network
Introduction

"Merry Christmas!" Words that we read countless times on social networks at the most wonderful time of the year. Christmas brings with it an unprecedented madness of social networks with...
{% link https://dev.to/memgraph/its-the-most-wonderful-time-of-the-year-dynamic-pagerank-and-a-twitter-network-lo1 %}
###01 Benchmark of four JIT Backends
Related GitHub Repo

https://github.com/ssghost/JITS_tests

Abstract

just-in-time (JIT) compilation is a way of executing computer code that involves compilation during execution of a program (at run...
{% link https://dev.to/ssghost/01-benchmark-of-four-jit-backends-51i3 %}
##PageRank Algorithm for Graph Databases
The most interesting and famous application of PageRank is certainly the one that actually sparked its creation. Google founders Larry Page and Sergey Brin needed an algorithm to rank pages and...
{% link https://dev.to/memgraph/pagerank-algorithm-for-graph-databases-39kk %}