teleren/devto huggingface dataset:
Eloquent ORM relationship (part 1)
Tags: laravel, php
Published: 2022-12-28 06:50:25

## Relational database

A relational database is one that allows us to divide a record into several tables.

## One-to-one relationship

A one-to-one relationship in a database is a relationship between two tables where each record in one table is related to exactly one record in the other table.

_note: With the command 'php artisan make:model Profile -mf' the model and the factory are created and the migration is created. The first letter must be capitalized and the word singular._

An example of this is relating a user to a profile, a user has a profile and a profile belongs to a user.

For this we use the `hasOne` method.

```php
public function profile()
{
	return $this->hasOne(Profile::class);
}
```

## One-to-many relationship

A one-to-many relationship in a database refers to a relationship between two entities, in which an instance of one entity is associated with zero, one, or many instances of the other entity

For this we use the `hasMany` method.

```php
public function users()
{
	return $this->hasMany(User::class);
}
```

And the method we use at the model level is `belongsTo`.

```php
public function level()
{
	return $this->belongsTo(Level::class);
}
```

This way we will be able to see to which level the user belongs.

## Many-to-many relationship

A many-to-many relationship in a database refers to a relationship between two entities, in which an instance of one entity can be associated with zero, one, or many instances of the other entity, and vice versa.

To make a many-to-many relationship we need an intermediate table in which we have the foreign keys of each table, as in the following example in a relationship of the tables groups and users.

And the method we use is the `belongsToMany`

```php
public function groups()
{
	return $this->belongsToMany(Group::class);
}
```

```php
public function users()
{
	return $this->belongsToMany(Users::class);
}
```

To configure the date of creation and update, that appear in null, for it the following method is placed. Which what it does is to put the dates automatically, you can also remove the $table->timestamps(); so that it does not have those columns.

```php
public function users()
{
	return $this->belongsToMany(Users::class)->withTimestamps();
}
```

## One-to-one relationship through...

A one-to-one relationship through another table refers to a relationship between two tables in a database in which each row in one table has a relationship with a row in the other table, and this relationship is established through an intermediate table.

To do this we use the `hasOneThrough` method, that way we can query a field of the table without calling the one in between.

```php
public function location()
{
	return $this->hasOneThrough(Location::class, Profile::class);
}
```
That would translate as user has location through profile.

The profile model must have the `hasOne` method, for the method to work.

```php
public function location()
{
	return $this->hasOne(Location::class);
}
```
Finally Done With Challenge 1
Tags: html, css, devjournal, webdev
Published: 2022-12-29 05:44:06

I finished that challenge project I mentioned previously and it was harder than expected. I didn't have a lot of time to complete it so it is formatted for *most* mobile screens and *most* desktop views. Used 1440px and 375px for the styles. Check  out the design at https://better-dev-three.vercel.app/ to see it live. Repo at https://github.com/OpenWorldProjectOWP/BetterDev if you want to provide feedback. I have a lot to learn so I appreciate any feedback you take time to give me :).
Gaming the GitHub Contributions Stats
Published: 2022-12-29 05:35:49

I'm mainly writing this in order to hear y'all's thoughts and opinions (so please share in the comments below) regarding this idea of mine.

And that idea is to ```git commit``` and ```git push``` (to GitHub) every single little thing I can, every single day, in order to get my stats in the little green stats chart to shine. To look good for future prospective employers.

I want solid green across that thing for 2023! 😝

What do you all think about that? Anybody doing, or have done the same thing? Is it a dumb idea?
Many To Many Polymorphic Relationship In Laravel 9
Tags: laravel, php, mysql, codenewbie
Published: 2022-12-29 05:30:00

In this article, we will see many to many polymorphic relationship in laravel 9. 

many to many polymorphic relationship are more complicated compared to morph one and morph many relationships. 

To access many to many polymorphic relationship use morphToMany() and morphedByMany(). many to many polymorphic relationship can use in laravel 6, laravel 7, and laravel 8.

So, let's see laravel 9 many to many polymorphic, polymorphic relationship in laravel 9 example, morphToMany in laravel 9, morphedByMany in laravel 9.

In this example, we will create migration for the post, taggables, and videos and also create model Post, Taggable, and Video.


![Many To Many Polymorphic Relationship In Laravel 9](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofzb34lpr5x41m4tm05y.png)
India DevOps League 2023
Tags: devops, azure, kubernetes, aws
Published: 2022-12-29 05:01:27

The next edition of the annual corporate quiz contest [India DevOps League](https://www.unicomlearning.com/2023/india_devops_league_bengaluru/) is back!! Purpose of this contest is to identify India’s most knowledgeable DevOps Specialist. This is your chance to shine and win the Best DevOps Specialist Team Award!

List of Topics that will be covered:

Cloud /IAAS/ PAAS
Microservices and Containers
Infrastructure
Continuous integration / Continuous Deployment
Release Management
DevOps tools
Build and Test Automation
Project Management
Quality Assurance

QUALIFIER ROUND- FREE:
Date: – 19 January, 2023
Format: – Online, Quiz can be taken from anywhere – office/ home/ browsing centres, etc.

There will be 30 minutes provided to complete 40 Multiple Choice
Questions that have been designed to be cover all areas of DevOps.

the semi-finals. This fee includes a complimentary pass for Testing, Agile, DevOps and Low code Showcase: Methods and Tools
Clinical SAS Course in Chennai
Tags: clinicalsas, training, chennai
Published: 2022-12-29 04:42:13

Clinical SAS is the application of SAS technology and it is used for data analysis in pharmaceutical, biotech, and clinical research companies. Join IntelliMindz [Clinical SAS course in Chennai](https://intellimindz.com/clinical-sas-course-in-chennai/) to master analytical techniques using SAS Software and tool. Our training program helps you to understand and apply the principles of the SAS programming language in a real-time project. Our Clinical SAS course in Chennai provides insight on the practical aspects of clinical trials such as how to design, analyze, and generate reports in support of the live project. Our Clinical SAS training program combines coursework and hands-on learning for the learners to gain value Clinical research, theory, and data analysis skills. Enroll in our Clinical SAS training in Chennai and Step into the world of Pharmaceutical industry!
4 websites to easily get goerli ETH 🤠
Tags: beginners, web3, blockchain, goerli
Published: 2022-12-29 04:42:04

Tired of searching again and again for faucets . Here's the list that I have curated for you.

1> Quicknode  
https://faucet.quicknode.com/ethereum/goerli

2> Alchemy 
https://goerlifaucet.com/
This is the most reliable way to get goreli ETH.

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



3> Goerli faucet 
https://goerlifaucet.org/
This needs address verification through telegram first. The process is pretty simple 
*> You need to verify through an hcaptcha 

![Verify](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ag3wcsw7rudlbq9unq1.png)
 After that you will be added in a telegram grp where u can easily verify ur address by typing /verify 0xyouraddress

and then go to the site and claim gorelli ETH.

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



4> Mudit Blog
https://goerli-faucet.mudit.blog/
This works sometimes but not always. Verify through twitter or fb.

Some Webistes that don't work 
1> https://goerli-faucet.slock.it/
and many more out there.
5 SKILL WAJIB UNTUK MEMBUAT WEB/APP
Tags: webdev, programming, tutorial, html
Published: 2022-12-29 04:40:14



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7q7nmz1upp18yvd0irez.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfbf85j4g0hmeg2y3hxb.jpg)
5 Skill IT Dibutuhkan untuk membuat web/app😮 Kalo menurut kamu gimana? ada yg perlu ditambahin ga😛Yuk belajar bareng serta diskusi dikolom komentar, serta di save biar ga lupa💬😝

🌱Follow : @appardana
*Stay Young, Be Innovative and Keep Learning

#Content #Web #Skills #IT #programmer #Developer #SelfImprovement #Growth #Aditria #Pardana #AditriaPardana #appardana #iAppTech ⚛️💻
How to Integrate Spring security to react js.
Published: 2022-12-29 04:14:30

To integrate Spring Security with a React.js front-end, you will need to create a Spring Boot backend that handles the authentication and authorization of your users. Here is a high-level overview of the steps you can take:

Set up a Spring Boot project and include the Spring Security dependency. You can use the Spring Initializr tool to generate a starter project with the necessary dependencies.

Configure Spring Security to handle authentication and authorization for your application. This can be done using Java configuration or XML configuration, depending on your preference.

Create a login form in your React.js front-end and use Axios or another HTTP client library to send the login request to the Spring Boot backend.

In the backend, handle the login request by authenticating the user and returning a JSON Web Token (JWT) if the login is successful.

In the front-end, store the JWT in a secure way (such as in an HttpOnly cookie) and use it to authenticate subsequent requests to protected routes or endpoints.

Use Spring Security's built-in support for JWT authentication to verify the JWT and authorize the user's access to protected resources.
Visual Studio 2022 Add New Scaffold Item 'There was an error running the selected code generator'
Tags: webdev, programming, dotnet, tutorial
Published: 2022-12-29 04:06:45

In Visual Studio 2022, the following error message is sometimes generated when scaffolding a controller:

![Error Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mi9d5tega6ca2s67bldm.png)

If the **.NET Framework project and item templates** are not installed, the error mentioned earlier will occur. 

## How to address the problem:

- Run the **Visual Studio Installer**

- Select **Modify**

- In the right-side tab expand **ASP.NET and web development**

- Check **.Net Framework project and item templates**


![Where to find .Net Framework project and item templates](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54rvdls87o8qdb3y60yt.png)

**Note**: If the error reoccur, update the NuGet packages installed, then re-try the scaffolding.

Thanks for reading...
**Happy Coding!**
What Distinguishes Great Software Engineers?
Tags: career
Published: 2022-12-29 03:55:27

Recently I read the article "[What Distinguishes Great Software Engineers?](https://faculty.washington.edu/ajko/papers/Li2019WhatDistinguishesEngineers.pdf)" ([Springer link](https://doi.org/10.1007/s10664-019-09773-y)), published in 2019 by Paul Luo Li, Amy J. Ko, and Andrew Begel, which **synthesizes their findings of the key characteristics that distinguishes great software engineers**.

Their research covered 54 attributes of a [previous study](https://digital.lib.washington.edu/researchworks/handle/1773/37160) and concluded that:

> the top five distinguishing characteristics of great engineers are writing good code, adjusting behaviors to account for future value and costs, practicing informed decision-making, avoiding making others’ jobs harder, and learning continuously.

For a **software engineering manager**, I think that is also **a great reference of what skills to help teams develop**.

Let's jump to the must-have characteristics identified by their research, which surveyed 1926 expert engineers:

| <nobr>Rank #</nobr> | Attribute and description |
| --- | --- |
| 1 | Pays attention to coding details, such as error handling, memory, performance, style |
| 2 | Mentally capable of handling complexity; can comprehend multiple interacting software components |
| 3 | Continuously improving: improves themselves, their product, or their surroundings |
| 4 | Honest: provide credible information and feedback that others can act on |
| 5 | Open-minded: lets new information change their thinking |
| 6 | Executes: knows when to stop thinking and to start doing |
| 7 | Self-reliant: gets things done independently and does not get blocked easily |
| 8 | Self-reflecting: recognizes when things are going wrong with a plan and pivots |
| 9 | Persevering: not dissuaded by setbacks and failures |
| 10 | Fits together with other pieces around it: code accounts for surrounding constraints and products. |
| 11 | Knowledgeable about their technical domain, including product, platform, and competitors |
| 12 | Makes informed trade-offs: code is responsive to time to market goals, critical needs of the business |
| 13 | Updates their decision making knowledge: does not let their understanding stagnate |
| 14 | Curious: desires to know why things happen and how things work |
| 15 | Evolving: code is structured to be effectively built, delivered, and updated incrementally |

The attributes were ranked along a scale of *must have*, *should have*, *nice to have*, *irrelevant*, and *should not have*. If you want to check the complete list, check [the article](https://faculty.washington.edu/ajko/papers/Li2019WhatDistinguishesEngineers.pdf).
Understanding a download routing in Angular
Published: 2022-12-29 03:20:21

I'm starting to learn Angular and I have to discover within an application how an address is being routed to generate the download of a file that must be requested to the backend and that is in a database. After a window.open command, I have no idea what happens. The url does not point to any file. Can anyone give me a hint of what to look for to get to where the frontend asks the backend for the file? I've read a bit about routing, but there are so many files in the application related to routing that I'm quite confused. As I have little time to understand the paths that the program follows to make this download, I ask for some help here. Thanks for any tip.

I read about routing, but it wasn't enough to find out what happens when that url is used in the window.open method.
How to Crack QA Intern & QA Fresher Interview ? (Expectation from QA Interns/Fresher)
Tags: webdev, beginners, tutorial, programming
Published: 2022-12-29 03:14:22

Expectations from QA Intern & QA Fresher : In this video, we will learn How to crack a QA Internship interview or QA Fresher Interview. 

{% embed https://youtu.be/bRYccDFX1EQ %}

What are the different topics that you should know before QA Internship or QA Fresher Job.

✅ Download Notes -  https://sdet.live/notes


✅ Join Facebook Group :  http://bit.ly/learntesting2019

✅ Website:   https://scrolltest.com

✅ Website:   https://thetestingacademy.com

✅ Twitter: https://twitter.com/itstechmode

🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅API Testing - 
https://www.learnapitesting.com


✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com


#qafresher #qainternship #qainterns
The powerful yet dangerous .*
Published: 2022-12-29 03:02:11

## Learning a bit about . * ? in Regex

In a regular expression (regex), the `.` (dot) character is a wildcard that matches any single character, the `*` (star) character indicates that the preceding character or pattern should be matched zero or more times, and the `?` (question mark) character indicates that the preceding character or pattern is optional and should be matched zero or one time.

Here are some examples to illustrate the meaning of each of these characters:

- The . character is a wildcard that matches any single character. For example, the regex a.c would match the strings abc, a9c, a#c, and so on.

- The * character indicates that the preceding character or pattern should be matched zero or more times. For example, the regex a.*c would match the strings ac, abc, a9c9c, and so on.

- The ? character indicates that the preceding character or pattern is optional and should be matched zero or one time. For example, the regex colou?r would match the strings color and colour, but not the string colouur.

Here are some examples that combine these characters in different ways:

- The .* pattern is a wildcard that matches any character (.) zero or more times (*). This pattern is often used to match any characters that come before or after a specific pattern. For example, the regex abc.*def would match the strings abcdef, abc123def, and so on.

- The .*? pattern is a non-greedy version of the .\* pattern, which means that it will try to match as few characters as possible.

The a.*b? regex would match the strings a, ab, abc, and so on. The b? pattern is optional, so it will match either b or the empty string.
Understanding a download routing
Published: 2022-12-29 02:34:04

I'm starting to learn Angular and I have to discover within an application how an address is being routed to generate the download of a file that must be requested to the backend and that is in a database. After a window.open command, I have no idea what happens. The url does not point to any file. Can anyone give me a hint of what to look for to get to where the frontend asks the backend for the file. I've read a bit about routing, but there are so many files in the application related to routing that I'm quite confused. As I have little time to understand the paths that the program follows to make this download, I ask for some help here. Thanks for any tip.
Why I'm using git
Tags: git
Published: 2022-12-29 01:59:45

First of all, git is a great tech that has exceeded the limits of the organization of the daily work of each one of us who use it, I don't know the advantages of other CVS tools and I respect the opinion of each one. There is a lot of variety and for sure whoever takes advantage of it and benefits.
For me these are the main factors why I liked using git:
- Flexible for teamwork, since when sharing the project we do not run the risk of it collapsing by having the work divided into modules or, as git defines it, through branches.
- Widely used in agile software development and also for business.
- When we develop we have a local repository, with a history of all the changes in the code.
- With git we prevent the main code from being damaged, branching and cataloging it before merging.
- If your work team uses Git as a version control tool, it is likely that you do not have to make new employees aware of the tool because of its wide community.

[#Git](https://git-scm.com/) [#Github](https://github.com/) [#Gitlab](https://gitlab.com/)
Password Management and Data Storage
Tags: security, opensource
Published: 2022-12-29 01:40:24

Two key issues that present real challenges in the digital age of computers are 1) **Password Management**, and 2) **Data Storage Management**. 

For **Password Management**, the issue is that passwords are meant to protect from unauthorized access to private information, yet because so many websites have their own requirement of what is an acceptable and secure password criteria, one is forced to have different passwords for different sites, making it is hard to remember all of those passwords, so the temptation is to write down the passwords somewhere, which pose the risk of someone finding one’s password. There are many password management solutions being offered, both paid and free. I found Last Past (lastpast.com) which offers both paid and free services, as a good option to address this problem. Though there are other good password management services out there. Also, I have found that both Chrome and Microsoft Edge have a built-in password manager which if used wisely could save the headache of downloading a password manager from an external service provider. 

As for **Data Storage Management**, the issue is having backup for protection in case disaster strikes where a storage device with important information is damaged, making it hard to access critical information. I found cloud computing to be a very good solution. Currently I use drop box, for a monthly subscription. It is useful to know that important information is always safe and secure from the point of view of a risk of damage to storage location. 

I found these issues and solutions to be relevant for both personal and business, especially from the point the view of making someone more organized.
It takes time
Published: 2022-12-29 14:22:18

---
title: It takes time
published: true
date: 2022-12-29 00:00:00 UTC
tags: 
canonical_url: https://www.frontendundefined.com/posts/essays/it-takes-time/
---

It takes time to learn. It takes time to get good at what you learn.

It takes time to build. It takes time to make what you built great.

It takes time to setup processes. It takes time to setup standards.

You want it now. You feel like it should be now. You feel bad that it is not now. But it still takes time.

So give yourself some time.
Setting up TDM-GCC in Ubuntu
Published: 2022-12-28 23:11:09

- Installing GCC on Ubuntu
- Start by way of updating the programs list: sudo apt update.
- Install the build-essential bundle of [Climbing Shoes](https://perfectclimbing.com/the-best-climbing-shoes-for-beginners/) or [Magic Tiles 3 apk](https://riderapk.com/magic-tiles-3-apk/) with the aid of typing: sudo apt deploy build-essential. ...
- To validate that the GCC [Apartments for Rent in Lebanon](https://www.beiteck.com/rental) compiler is correctly installed, use the gcc for [2 seat slingshot](https://bigshotslingshotrentals.com/slingshot-rentals-sarasota/) --version command
 which prints the GCC version: gcc --version.
Why javascript for everything?
Tags: webdev, javascript, programming, react
Published: 2022-12-28 23:08:30

JavaScript is a programming language that is essential for modern web development. It is a versatile language that can be used to build a wide range of applications, from simple websites to complex web-based systems. Here are a few reasons why you should consider learning JavaScript:

1. Demand for JavaScript developers is high: JavaScript is one of the most popular programming languages in the world, and there is a high demand for developers who are proficient in it. According to a survey by the website Indeed, JavaScript is the most sought-after programming language by employers.

2. It's easy to learn: JavaScript is a relatively easy language to learn, especially for those who already have some programming experience. There are many resources available online, including tutorials, videos, and online courses, to help you get started.

3. It's versatile: JavaScript can be used for a wide range of applications, including web development, mobile app development, and even desktop applications. This versatility makes it a valuable skill to have in your toolkit.

4. It's constantly evolving: The JavaScript ecosystem is constantly evolving, with new libraries and frameworks being developed all the time. This means that there is always something new to learn, and you can stay up-to-date with the latest developments in the field.

5. It's fun: JavaScript is a fun language to work with, and it allows you to build interactive and engaging websites and applications. This can make learning and using it a rewarding and enjoyable experience.

In conclusion, learning JavaScript is a valuable skill that can open up a wide range of opportunities for you as a developer. It is a versatile language that is in high demand, easy to learn, and constantly evolving. Whether you are a beginner or an experienced developer, learning JavaScript is a great investment in your career.