teleren/devto huggingface dataset:
Laravel 10 Custom Login and Registration Tutorial
Published: 2023-09-10 12:31:05

Throughout this tutorial, You can create custom login and registration authentication system in laravel 10 apps.

## Laravel 10 Custom Login and Registration Authentication Tutorial

To create a custom login and registration authentication in Laravel 10, you can follow these steps:

-  Step 1 - Create New Laravel 10 Project
-  Step 2 - Setup Database with Laravel Project
-  Step 3 - Define Routes
-  Step 4 - Create Controller & Methods
-  Step 5 - Create Blade Views
-  Step 6 - Start Development Server

Read More [Laravel 10 Custom Login and Registration Tutorial](https://www.tutsmake.com/laravel-custom-authentication-login-and-registration-2)
Function - JavaScript
Tags: javascript, functions, developers, fullstakc
Published: 2023-09-10 12:19:33

Functions are one of the fundamental building blocks in JavaScript.
In JavaScript we have three type of function:
**function declaration**, **function expression**, **arrow function**

<br />

## Function Declaration:
**function declaration** (also called a **function definition**, or **function statement**) consists of the function keyword:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3b1cs0r7amdcdq4oo2zj.png)With **function declaration**, I **can** call the function before I define it in the code
<br />
## Function Expression:
**function expression**(anonymous function) || remember expression produce a value, that's why we did store in a variable.
With **function expression** I can **NOT** call the function **before** I define it in the code.
Internally this happens because of a process called **Hoisting**.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gh23iv4091eb5vbkyxj7.png)
<br />
## Arrow Function
**arrow function** (just added to JavaScript in ES6).
In one line, without explicitly write the "return"
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u64809tfwzmfynibg03m.png)
<br />

## What type of function should I use?
Arrow functions, since they are easy to write, the answer is **NO**.
Because there is a fundamental difference, between the arrow function and more traditional functions (function declaration).
In fact the arrow function do **NOT** get so called `this` keyword
<br />

## Function Calling other function
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oy5w8nxnnveq3t7nzrp2.png)
<br /><br />
**Summary**
Most of the time you are gonna use **function expression** a lot, in JavaScript functions are actually just **values**.
So just as a number or a string or a boolean **value**.
Function is **NOT** a type:
It's not like a string or number type, **it's a value**
And because it's a value, that's why we can store it in a variable as we did above, the whole function get store it in a variable `calcAge2`.


I hope that helps I tried my best to explain the main different there's actually more that I did not cover.
And thank you if you read till here really appreciate it.
Laravel 10 Bootstrap Authentication Tutorial
Published: 2023-09-10 12:18:49

Laravel 10 Bootstrap Authentication Tutorial is a tutorial that shows how to create a Laravel 10 application with Bootstrap authentication.

You can use the Laravel UI package to add Bootstrap npm to your Laravel application. You can also use a Laravel application starter kit to scaffold your entire authentication system.

## Laravel 10 Bootstrap Authentication Tutorial

To install Bootstrap authentication in Laravel, you can follow these steps:

- Install the Laravel application.
- Configure the database.
- Install Laravel UI.
- Install Bootstrap in Laravel.
- Install Bootstrap Auth Scaffolding.
- Install Bootstrap Packages.
- Bootstrap Compile Assets.
- Test This App.

Read More [Laravel 10 Bootstrap Authentication Tutorial](https://www.tutsmake.com/laravel-10-bootstrap-auth-scaffolding-example)
Laravel 10 Breeze Authentication Tutorial
Published: 2023-09-10 12:12:00

Laravel 10 Breeze is a simple implementation of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. You can use it to implement authentication in your new Laravel 10 application.

## Laravel 10 Breeze Authentication Tutorial

Here are some steps to set up Laravel 10 Breeze auth systematic:

- Install Laravel 10 App.
- Connect the app to the database.
- Install Breeze Auth Scaffolding.
- Run PHP artisan Migrate.
- Install Npm Packages.
- Run Development Server.
- Open a terminal window and navigate to your Laravel application directory.
- Install Laravel Breeze as a dev dependency in your application.
- Create the authentication views, routes, and controllers in your application.
- Install the necessary dependencies, including Tailwind CSS.

Read More = [Laravel 10 Breeze Authentication Tutorial](https://www.tutsmake.com/laravel-10-authentication-with-breeze-tutorial-example)
Laravel 10 Authentication using Jetstream Tutorial
Published: 2023-09-10 12:05:52

Laravel 10 Jetstream is a package that provides a pre-built authentication system for Laravel web applications. It includes features like login, registration, email verification, two-factor authentication, and team management.

Laravel 10 Jetstream automatically scaffolds these features for your project: Login, Two-factor login, Registration, Password reset, Email verification.

## Laravel 10 Authentication using Jetstream Tutorial

Here are some steps to set up Laravel 10 with Jetstream authentication:

- Install Laravel 10 App.
- Configure the database.
- Install Auth Scaffolding Jetstream.
- Install the Livewire Package.
- Configure Jetstream.
- Run php artisan Migrate.
- Install Npm Packages.
- Run the Development Server.

Read More = [Laravel 10 Authentication using Jetstream Tutorial](https://www.tutsmake.com/laravel-10-auth-scaffolding-using-jetstream)
Scrollable pagination, neon theme
Tags: codepen, webdev, css, html
Published: 2023-09-10 11:58:16

<p>Hi, I tried to make this pagination system as easy to use as possible and to make it intuitive.</p>

<p>You can click on the page button, on the left and right button to get to the left-most or right-most page and you can also scroll with your mousewheel inside the container.</p>

<p>All that with a neon theme as bonus with some animations :)</p>

{% codepen https://codepen.io/pnpicot/pen/PoXpYWp %}
Day 1 of 10, "Introduction to Node.js."
Published: 2023-09-10 11:46:59

### Learning Resources:

1. **Official Node.js Website:**
   - [Node.js Official Website](https://nodejs.org/)
   - The official website provides installation instructions, documentation, and a wealth of resources for getting started with Node.js.

2. **Node.js Beginner's Guide:**
   - [The Definitive Node.js Handbook](https://www.freecodecamp.org/news/the-definitive-node-js-handbook-6912378afc6e/)
   - This comprehensive guide covers the basics of Node.js, its architecture, and how to set up your development environment.

3. **Node.js Wikipedia Page:**
   - [Node.js Wikipedia Page](https://en.wikipedia.org/wiki/Node.js)
   - Wikipedia provides a historical overview and key concepts related to Node.js.

### Sample Code:

Here's a simple "Hello World" program in Node.js to get you started:

```javascript
// hello.js

// Load the 'http' module to create an HTTP server.
const http = require('http');

// Configure the HTTP server to respond with "Hello, World!" to all requests.
const server = http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('Hello, World!\n');
});

// Listen on port 3000, and IP address defaults to 127.0.0.1 (localhost).
const port = 3000;
server.listen(port, () => {
  console.log(`Server running at http://127.0.0.1:${port}/`);
});
```

To run this code:

1. Save it to a file named `hello.js`.
2. Open your terminal or command prompt.
3. Navigate to the directory where `hello.js` is located.
4. Run the following command:

```bash
node hello.js
```

You should see the message "Server running at http://127.0.0.1:3000/" in your terminal. This means your Node.js server is up and running. You can access it by opening a web browser and visiting http://127.0.0.1:3000/ or http://localhost:3000/.

Feel free to modify the code and experiment with different responses to learn more about Node.js's capabilities.

Remember, this is just a starting point. As you progress through these series, you'll explore more complex Node.js applications and gain a deeper understanding of its features.
10 Days of Nodejs
Tags: node, learning, 10days, code
Published: 2023-09-10 11:44:29

"10 days of Node.js" is a concept where you spend 10 days learning and exploring Node.js, a popular JavaScript runtime used for building server-side applications. Node.js is known for its speed and efficiency, making it a popular choice for developing web servers, APIs, and various other types of applications. Here's a general outline of what you can learn and do over these 10 days to get started with Node.js:

**Day 1: Introduction to Node.js**
- What is Node.js and why is it popular?
- Installing Node.js and npm (Node Package Manager).
- Writing your first "Hello World" application in Node.js.

**Day 2: Understanding Asynchronous Programming**
- Learn about the event loop and non-blocking I/O.
- Explore callbacks, promises, and async/await for handling asynchronous operations.

**Day 3: Working with Modules**
- Understanding the CommonJS module system in Node.js.
- Creating and using custom modules.
- Exploring built-in modules like `fs` (File System) and `http` (HTTP server).

**Day 4: Building a Web Server**
- Creating a simple HTTP server using Node.js's `http` module.
- Handling HTTP requests and responses.
- Serving static files and creating basic routes.

**Day 5: Using Express.js**
- Introduction to Express.js, a popular web application framework for Node.js.
- Setting up an Express.js application.
- Creating routes and handling HTTP requests with Express.js.

**Day 6: Data Storage with MongoDB**
- Setting up and connecting to a MongoDB database.
- Creating, reading, updating, and deleting data from a MongoDB database using Node.js.

**Day 7: Authentication and Authorization**
- Implementing user authentication using libraries like Passport.js.
- Adding authorization and protecting routes.

**Day 8: Real-time Applications with Socket.io**
- Introduction to real-time web applications.
- Setting up Socket.io for real-time communication.
- Building a simple chat application with Socket.io.

**Day 9: Error Handling and Debugging**
- Learning about error handling in Node.js.
- Using debugging tools like `console.log`, `debugger`, and third-party tools.
- Best practices for error handling in Node.js applications.

**Day 10: Deploying and Scaling Node.js Apps**
- Preparing your Node.js application for production.
- Deploying your application to a hosting service (e.g., Heroku, AWS, or Azure).
- Scaling your Node.js app horizontally to handle increased traffic.

Throughout these 10 days, it's important to practice what you learn by working on small projects or exercises. Node.js has a vibrant community, and there are plenty of online resources, tutorials, and documentation to help you along the way. Keep in mind that Node.js is a versatile platform with various use cases, so feel free to explore areas that align with your interests and project goals.
kaiyun168115
Published: 2023-09-10 11:31:23

开云体育已成为华人市场最大的在线综合娱乐平台。带来体育赛事、电子竞技、奥运会比赛、开云体育娱乐、传统娱乐玩法、开云博彩、开云电竞电子游戏等服务。开云在赞助和服务覆盖方面遥遥领先于其他同行。
[开云彩票](https://kaiyun-168.com)
Create a URL shortener API using FastAPI and Python.
Tags: python, fastapi, api, programming
Published: 2023-09-10 11:23:32

Hi 🙂🖐

Today i will share with you how to Create a URL shortener API using FastAPI and Python.

I will use simple ways as much as I can.

I will use JSON as a database file; you can use anything else if you want; it's up to you. I prefer using JSON because it's very easy to use and setup.

Now lit's create a JOSN file

```json
{
    "urls" : [
        
    ]
}
```



We didn't add the number of clicks because I wanted to make it simple and easy, and counting the number of clicks requires more advanced things, like adding admins, users, and API keys.

Now i will create the API 😎

```python

from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from secrets import token_urlsafe
from pydantic import BaseModel


import json
import validators

app = FastAPI()

database = json.load(open('database.json', 'r'))

class Url(BaseModel):
    url : str

@app.get('/')
def home():
    return {'msg': 'Welcome in My API :)'}


@app.post('/short_url')
def short_url(url : Url):
    if validators.url(url.url):
        url_id = token_urlsafe(5)
        shorted_url = f'http://127.0.0.1:8000/{url_id}'
        database['urls'].append({
            'url_id': url_id,
            'short_url': shorted_url,
            'target_url': url.url
        })
        
        
        json.dump(database, open('database.json', 'w'), indent = 4)
        
            
        return {'msg': 'done', 'url': shorted_url}
    
    return {'msg': 'Invalled url'}


@app.get('/{_id}')
def get_target_url(_id: str):
    for url in database['urls']:
        if url['url_id'] == _id:
            return RedirectResponse(url['target_url'])
    
    return {'msg': 'Url not found :('}
```

## Test the API
```python
import requests

data = {
    'url': 'https://dev.to/amr2018/create-quotes-api-using-fastapi-and-python-f12'
}

res = requests.post('http://127.0.0.1:8000/short_url', json=data)

print(res.json())
```

## result
```
{'msg': 'done', 'url': 'http://127.0.0.1:8000/z4aKmMU'}
```

## Open this url : http://127.0.0.1:8000/z4aKmMU

## result

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




**Now we're done 🤗**

**Don't forget to like and follow 🙂**

**Support me on PayPal 🤗**
https://www.paypal.com/paypalme/amr396
Mojo cheat sheet
Tags: mojo, python
Published: 2023-09-10 10:49:21

Today, Mojo SDK is officially launched by Modular Team. So, Today I going to make a cheat sheet for you!

## Declaring a Mutable Variable
```mojo
var x = 1
```

## Explicitly Typed Variable

```mojo
var x: Int = 1
```

## Declaring an Immutable Variable
```mojo
let x = 1
```

## Functions
```mojo
fn greet():
    print("🔥🔥")
```


## Structs

```mojo
struct MyPair:
    var first: Int
    var second: Int

    fn __init__(inout self, first: Int, second: Int):
        self.first = first
        self.second = second
    
    fn dump(self):
        print(self.first, self.second)
```


## Integrate with Python

```mojo
from python import Python

let np = Python.import_module("numpy")

ar = np.arange(15).reshape(3, 5)
print(ar)
print(ar.shape)
```

This cheat sheet covers the basics of Mojo and I do know this is short but Mojo has a lot of complex concepts related to memory management, __copyinit__, ownership and borrow checking. As of today, Mojo is early in development and released recently. So, I like this Mutli-threaded language and its memory management is similar to Rust. It does not many features of Python like anynomynous functions with `lambda`.
How is Reliant Energy with customer support by phone?
Published: 2023-09-10 10:49:12


Hello! Guys, there are problems with the power supply from Reliant Energy. Now I need to contact their customer support for help. Do you have detailed information about the various contact methods available? How is their customer support by phone, email capabilities and do they have a chat feature? Can you share your personal experience on getting a fast and efficient response from their customer service team?
Networking Hardware - Summary
Tags: internet, beginners, webdev, scor32k
Published: 2023-09-10 10:48:34

Hello everyone, I hope you are having a good day.

In this blog, we are going to cover different types of Network Hardware Devices.

> The basic imp devices are written pointwise, and only imp points are written, which helps in understanding the device in simple terms.

### Hubs
- Hubs are layer 1 devices (physical layer).
- Data is flooded, meaning it sends data to every connected computer, whether they require it or not.
- A central hub is often used in a ring LAN, transferring data to every connected computer.

### Switch
- Switches are like intelligent hubs.
- They only send data to the required devices.
- Switches have memory elements.
- They operate at the layer 2 level.

### Repeater
- Repeaters are commonly used in wireless and wired communication.
- They regenerate signals at the same frequency, preventing signal degradation.

### Modem
- A modem converts digital data into analog form so it can travel through telephone lines.

### NIC (Network Interface Card)
- NICs are connected to PCs.
- They provide PCs with a MAC address, which cannot be changed.
- The MAC address is a hardware or physical address.
- MAC addresses are required to transfer data from one node to another.

### Bridge
- Bridges are layer 2 devices.
- They have RAM memory elements that store MAC addresses from both sides of the network.

### Router
- Routers are network layer devices.
- They operate at OSI model level 3.
- Routers connect different networks.
- They have LAN ports for internal network connections.
- They also have WAN ports for connecting internet devices to external networks.

---


If the article helps you, leave a like, follow, or anything 🙂.  
You can follow me on [LinkedIn](https://www.linkedin.com/in/abhishekpathak32/), [GitHub](https://github.com/scorcism), [Dev.to](https://dev.to/scorcism) and [hashnode](https://scorcism.hashnode.dev/).

**Bye**
How To Use JQuery In Angular CLI Project
Published: 2023-09-10 10:35:23

In this article, I will explain to you about including jQuery in Angular application. We can achieve it by following very simple steps.

### Install jQuery with npm command
At first install  jQuery with below command:

``````npm install jquery — save``````

Now, we will add the url of its files in angular.json file at the root of the Angular CLI project. Find the script tag and include the path to jQuery as follows:

``````"scripts": [ "../node_modules/jquery/dist/jquery.min.js" ]``````

If you have already included other libraries then add jquery library url at the top to avoid any unwanted errors.

 

After including jQuery in the Angular CLI application, start the app with npm start or ng serve. We will start to use it in our component file, for that we need to import it as normal module we do in our application. So for that we need to add below line of code at the top part of the file:

 ``````import * from 'jquery';``````

Have a look at the below code that uses jQuery to animate div on click, especially in second line below, we are importing everything as $ from jQuery.

``````import { Component, OnInit } from '@angular/core';
import * as $ from 'jquery';
 
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'Including jQuery in angular!';
 
public ngOnInit()
{
$(document).ready(function(){
$("btn").click(function(){
  // write your jquery code here....
});
});
}
}``````

### Conclusion

So in this article, We learn to include jQuery in Angular CLI project.

 

That’s all for now. Thank you for reading and I hope this article be very helpful to understand how to use jQuery in angular CLI project.

Let me know your thoughts over the email **demo.jsonworld@gmail.com.** I would love to hear them and If you like this article, share with your friends.

This article is originally posted over [jsonworld](jsonworld.com)
Why Large Language Models Hallucinate and How to Reduce it?
Tags: llm, ai
Published: 2023-09-10 10:31:12

In summary, AI is still extremely early when it comes to reasoning and we may need a another significant breakthrough before LLMs can really measure up to humans.👈
[(https://medium.com/@fleszarjacek/why-large-language-models-hallucinate-and-how-to-reduce-it-1003c4a7c6f3)
Monthly Amazon Location Service Updates - 2023.08
Tags: amazonlocationservice, amplifygeo, amplify, amazonlocationserviceupdates
Published: 2023-09-10 10:22:15

![img](https://day-journal.com/memo/images/logo/aws/location-service.png)

### Monthly Amazon Location Service Updates - 2023.08

<br>

This is a summary of the August updates for Amazon Location Service.

<br>

## 2023.08 Updates

[The Japanese version of the official demo site of Amazon Location Service is now available](https://location.aws.com)
The Japanese version of the official demo site is now available.

<br>

## Other Info

[Amazon Location Service Demo](https://location.aws.com)
Official Amazon Location Service demo.

[Amazon Location Service Developer Guide](https://docs.aws.amazon.com/location/latest/developerguide)
Official Amazon Location Service Documentation.

[AWS Geospatial](https://github.com/aws-geospatial)
Official AWS Geospatial samples.

[Amazon Location Service Samples](https://github.com/aws-samples/amazon-location-samples)
Official Amazon Location Service samples.

[Amplify Geo Docs](https://docs.amplify.aws/lib/geo/getting-started/q/platform/js)
Official Amplify Geo Docs.

[amazon-location-service-starter](https://github.com/dayjournal/amazon-location-service-starter)
Build environment to get started with Amazon Location Service.

[A Summary of How to Build Amplify Geo and Amazon Location Service](https://dev.to/aws-builders/a-summary-of-how-to-build-amplify-geo-and-amazon-location-service-5hal)
Summary of Amazon Location Service and Amplify Geo. (as of December 2021)  

[dev.to](https://dev.to/dayjournal)
Articles on Amazon Location Service.

[tags - Amazon Location Service](https://day-journal.com/memo/tags/Amazon-Location-Service)
[tags - Try](https://day-journal.com/memo/tags/Try)
Notes on Amazon Location Service. (Japanese)

<br>

## Related Articles

{% link https://dev.to/aws-heroes/monthly-amazon-location-service-updates-202307-nh %}
Weekly reading digest #4
Tags: symfony, php, backend, softwareengineering
Published: 2023-09-10 09:53:31

**2023/09/04-2023/09/10**

[Unlock the Power of DTO in Symfony with This One Library!](https://medium.com/@skowron.dev/unlock-the-power-of-dto-in-symfony-with-this-one-library-b00db41e0e66)

[Symfony/Doctrine’s Docs has caused more bugs than anything else.](https://withinboredom.info/2023/08/11/symfony-doctrines-docs-has-caused-more-bugs-than-anything-else/)

[What's new in PHP 8.3](https://stitcher.io/blog/new-in-php-83)

[Understanding Serialisation in PHP](https://ryangjchandler.co.uk/posts/understanding-serialisation-in-php)

[Pagination in MySQL](https://youtu.be/zwDIN04lIpc) (video)

[The Worst Programmer I Know](https://dannorth.net/2023/09/02/the-worst-programmer/)
NHÀ KHO THÔNG MINH
Published: 2023-09-10 09:39:01

Nhà kho thông minh (smart warehouse)  
là hệ thống kho sử dụng các khung kệ có khả năng nâng cấp và chứa hàng
 trên nhiều tầng khác nhau.
Địa chỉ: 86 Nguyễn Phúc Lai – Phường Ô chợ Dừa – Quận Đống Đa – TP Hà Nội.
SĐT:0903 418 369 
Website https://vnatech.com.vn/smart-warehouse-kho-thong-minh/
https://www.youtube.com/@nhakhothongminh
https://twitter.com/nhakhothongminh
Custom Workflow for Editing Notion with Slack Platform
Tags: slack, slackplatform, automation
Published: 2023-09-10 09:33:38

## TLDR;
I created a custom workflow specialized for Notion because the new Slack Workflow is too basic.


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



https://github.com/nakamuloud/enhanced-slack-platform

## What it can do
- Create a new Notion page
  - Output the page ID
- Edit the title
- Update status properties
- Update select/multi-select properties (Add/Remove/Set/Clear)
- Update user properties (Add/Remove/Set/Clear)
  - Slack users and Notion users are linked by email addresses
- Add comments to a page
  - Mentionable
- Randomly select a user (bonus)


I developed it in an environment with a small number of Notion/Slack users, so there may be issues with API pagination, etc.