teleren/devto huggingface dataset:
How To Send Email In Laravel Example
Tags: laravel, email, beginners, php
Published: 2021-12-13 03:12:57

In this tutorial I will give you example of how to send email in laravel 6/7/8, in this post we will show how to send email using smtp in laravel, email is very basic and most important feature in web development field and it is neccesory for all client. also we are see example of send mail in laravel using mailtrap account.

Laravel provide mail class to send email. you can use several drivers for sending email in laravel. you can use Mailgun, Postmark, Mailtrap, SMTP, Amazon SES. Just you have to configure on config/mail.php or .env file as per your requirements.

So, let's start sending mail example in laravel 6/7/8 or send mail in laravel using mailtrap.

```
Step 1 - Configuration in .env file
Step 2 - Create mail using artisan command
Step 3 - Create blade file
Step 4 - Create route
Step 5 - Create controller
```

---

> **_[Read More : How To Send Email In Laravel Example](https://techsolutionstuff.com/post/how-to-send-email-in-laravel-example)_**
Mark The Words Project
Published: 2021-12-13 03:10:02

The final project in my series of projects this semester was to create an application called "Mark the Words". When using this application, users can select and check specific words in a body of text to see if they are one of the correct answers in the given list. The following image is the current state of our project. It is not finished, but the basic functionality is complete where users can select/unselect specific words and check if they are correct or not.
![Current State of Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huqc3sluei8y5g466ti9.png)


The code individually wraps words from the sample text so we are essentially able to have each word as an individual element that we can check later. 
![Ability to Click Specific Words](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9hv26prz3rln9uzg2io4.png)

One of the main issues that we came across (and still having a bit of difficulty with) is the accuracy of checking the specific words. To be more specific, when we selected words that may have additional characters attached in the span like a period or comma, it would mark the word as incorrect because the word in the correct answers did not include the character. We overcame the first issue by utilizing the '.replace' line of code shown in the following image. 
![Ability to Check Answer Without Unwanted Characters](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h82uif3oonlx9l8b0zcz.png)

#Looking Forward
While this project is not yet complete, I am personally very happy with the progress our group has made. What is left is working out some additional technical issues with checking the words, aesthetic tweaks, disabling the ability to check answers after the first attempt, scoring, etc. Overall, this project has been my favorite to work on so far!

#References
[Reference for removing unwanted characters while checking answers](https://thispointer.com/javascript-string-remove-special-characters/)
#GitHub Link
[Github Repo](https://github.com/IST402-Group-F/proj3-haxtheweb)
10 Best Forum to become a good Developer in 2022
Tags: programming, javascript, webdev, django
Published: 2021-12-13 02:47:35

This is the list of some top 5 growing programming related forums/communities you must join. These forums may help you to get your answers for bug fixes and related topics. Also, joining this forum may help you to be a good developer.

### Webmatrices Forum
   A lot of posts of this forum ranks on Google. Also, this forum is **nicely popular among new developers**. 

It has the highest **`Daily Pageviews per Visitor: 6.1`** and **`daily time on site: 5:52`**. It also has a decent amount of content in it. Users mostly talk about web/app development, game development and blogging/SEO related stuff here.

This forum is also growing really fast. Suggest you to join this forum if you wanna learn about web development frameworks (Django, vue), API security, web scraping, automation, gameDevelopment and blogging/SEO.
   Visit here: [https://webmatrices.com/](https://webmatrices.com/t/programming)

> Also, this forum has no ads.

### Codeproject
   This forum is somehow popular on the web. According to Alexa rank, it has 1.53 Daily Pageviews per Visitor and 1:50 daily time on site. It has slightly lesser ranks than Webmatrices. The number of content, questions and answers is also pretty good. People generally talk about Python, C++ and Ai related stuff here.
Visit here: <https://www.codeproject.com/>

### Codeguru
   This website is genuinely awesome for learning OS-related stuff. It has 1.3 Daily Pageviews per Visitor and 1:26 daily time on site. People discuss C programming, Onion architecture, .NET, vb.net and other OS-related stuff. Joining this forum would be great if you wanna about OS. Although there's a decrement rate in the Alexa rank of this forum website, I guess the rate will be changed soon.
   Visit here: <https://forums.codeguru.com/>

### DaniWeb
   This website is also somehow related to hardware and OS related stuff. Daily Pageviews per Visitor and daily time on site are 1.3 and 1:34 respectively. Members usually discuss VB.NET, Computer Hardware, Python and os related stuff.
   I suggest you join this forum if you really wanna dive more into OS, hardware development and C programming.
   Visit here: <https://www.daniweb.com/>

### thecodingforums
This forum is the smallest of all mentioned here, but growing really nice. 1.4 Daily Pageviews per Visitor and 0:57 Daily Time on Site is the Alexa report of this site. People here talk about Python GUI, Tkinter, HTML, CSS and Java. I suggest you join this forum if you're really new to the programming world.
   Visit here: <https://www.thecodingforums.com/>

> As I mentioned, these are growing forums, you are the one who gonna be another growth factor of these forums.

By the way, this is the repost of my last article.
20 Benefits of Badminton for the body and health
Published: 2021-12-13 02:12:57

[Badminton](https://www.bokis.my.id/2021/12/20%20Manfaat%20Olahraga%20Badminton%20.html) sport or it can also be called badminton is known as a sport that is healthy and easy to sweat. Therefore, the benefits of playing badminton are important for all ages. Because in badminton most of our body members move actively with fast. The sport whose news comes from this ancient egypt, there is even other news that says it comes from here as a sport that is quite popular in Indonesia. With badminton, the name Indonesia is carried with its achievements as well as in the world. For those of you who want a sport that makes your body move fully active, it is not wrong to choose Badminton as a sport to maintain your health. We watched several bodybuilders have good body shapes and attractive performances such as cheerful and soft skin.
Release 0.4: Planning
Tags: opensource, javascript, typescript, programming
Published: 2021-12-13 02:12:41

For the final submission I choose to continue contribute to telescope as I belive this would be a steepping stone for me to study OSD700. I choose to fix a bug in the project where we we try to improve [handling invalid feed] (https://github.com/Seneca-CDOT/telescope/issues/2569)    

## My plan and my goal

My goal for when working on this issue will be to understand more how the project work because as you know my precent contribution to Telescope would be mitigrate ESlint to the newest version which require not a lot of coding and debugging so I will choose to go with this issue which seem not be quite difficult to work on.


I got 3 goal that need to be fill for this issue:

1. Remove `\n` from the reason so that we can display it as a single line. We could replace them with `' '` (space)
2. Figure out why 304s are showing up as invalid.
3. Set a `ttl` for these `invalid` keys in Redis

My plan from the start would be fixing the first 2 where the first one seem to be solve using `regex` and since I know a bit about `response` I will try to investigate it and then solving the thrid one which I got no clue where to start.
Introducing Me
Published: 2021-12-13 02:11:47

Hello everyone!

My name is Christine Kinahan and I am a security risk and analysis major at Penn State University. I am also minoring in information science and technology. I currently work as a security analyst for a software company named Reltio. I am interested in web development because it teaches you a lot about how to use GitHub and terminal commands, which would be helpful to get better at for work. I also have to take and pass the web development class to graduate :)
Day 28 of #100daysofcode: Hands on with Redux
Tags: 100daysofcode, react, python, beginners
Published: 2021-12-13 01:52:59

Hey again everybody!

I want to start with a question: Do you know of a fairly complicated/extensive open source project which utilizes Redux? I would love to see some examples of Redux in bigger codebases!

Anyway, on to today's update.

As I expected, things with Redux started to feel a little weird when I started to get hands on with it. Now that I have started to work with Redux a bit, it feels like it would be very, very easy to write messy code with it. I feel like I need to spend some extra time really focusing on learning best practices with Redux. That said, the Redux toolkit is helping a ton with cleaning up potential mistakes. 

I really like the general feel of:
1) Create a store for the entire app
2) Create a slice for a feature
3) Create a reducer for a specific function

It feels very familiar (and clean) from an object-oriented point of view, which is nice in this functional programming landscape of Redux.

## Today
* A bit of Leetcode
* Hands on tutorial with Redux
  * Sandboxed a bit with the Counter app. Added some additional functions. 

## Tomorrow
Tomorrow I plan on doing two main things:
1) Learn more about Redux at a high level
  * Either by digging deeper on documentation or by finding an open source project which uses Redux fairly extensively
2) Try to recreate some of the more complicated state situations I ran into in a previous project. Depending on how this goes, I may share some code snippets.

## Upcoming
* Continued Leetcode practice and FreeCodeCamp progress
* ***CONTINUED* Sandboxing with Redux**
* Begin the Study Aid app! (soonTM)
* Might return to a little Functional Programming discussion
* Later in the challenge: AWS Deployment, AWS Certification, and Using Docker!?

### Resources
[JS Course - FreeCodeCamp](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/)
[Redux Essentials](https://redux.js.org/tutorials/essentials/part-1-overview-concepts)
[Redux Fundamentals](https://redux.js.org/tutorials/fundamentals/part-1-overview)
[Redux FAQ](https://redux.js.org/faq)
My React(ion)
Tags: react, javascript, ruby, programming
Published: 2021-12-13 01:45:43

For my final project for Flatiron I created a React app with a Rails backend. My project is my school portfolio that I hope to use in the future.

This time around I had a lot of fun creating my project as the initial phase of Javascript was a beast. As they say practice makes perfect and React was no different. So with that I knew that I wanted to create something based off my goals for enhancing my projects in the future. I will always think I could've done something better and I'm not ashamed to say that my CSS skills aren't the best.. so add that to the list!

To start off my backend I used postgresql and utilized the scaffold generator for easy setup to create my tables, Goals and Todos to complete that goal.
A goal has a project title, and description of what I would like to achieve to further enhance the quality and functionality. And Todo is a list of steps either completed or not to get to that goal.

Also the goal can be for anything I would like to do in the future as well, bigger projects, coding challenges, or whatever I'd like to set my sights on!


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

In the example above, My goal is to expand my Javascript project, as once again it lacked the CSS pizazz it need.

I went about this with a pretty standard React setup:
Actions || Components || Containers || & Reducers.

Actions used fetch to grab the localhost route for each table and their corresponding fetch, create, and delete paths.

Components for each table. To display and create.

Containers to wrap each component and their files to work as one.

And reducers that correspond with their actions.

The app also contains routes to my project repos, blog posts for each phase, and an introductory and about page!

My biggest struggle apart from debugging was actually figuring out how to default my node version to -v 16. I even created a new back and frontend. I spent more time than I'd like to admit on trying to figure it out, but alas theres always a very easy answer after hours of hard work.


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

As we're talking about goals, I hope to expand this project and be able to utilize it with future applications/interviews.

Cheers, React!
Máquinas de Estado
Tags: videogames, videogamedevelopment, statemachine
Published: 2021-12-13 01:34:25

---
title: Máquinas de Estado
published: true
description: Un enfoque práctico
tags: videogames, videogameDevelopment, stateMachine
//cover_image: https://www.yoshuadiaz.com/static/f1860ec52b662b2927fa7c855c87a515/bd27b/fetch-machine.png
---

Las máquinas de estados son una de las herramientas mas usadas en el desarrollo de videojuegos, básicamente, definen el comportamiento que especifica las secuencias de estádos por las que atraviesa un objeto durante su ciclo de ejecución en respuesta a una serie de eventos, junto con las respuestas a dichos eventos.
Estas máquinas permiten descomponer el comportamiento general de un [agente](https://es.wikipedia.org/wiki/Agente_(software)) en pedazos o subestados mas manejables.
Resumiendo tenemos dos conceptos importantes en una máquina de estados:
- Estádo
- Transición.

## Estádo
Define una condición o una situación en la vida del [agente](https://es.wikipedia.org/wiki/Agente_(software)) la cual satisface una condición o bien, está vinculada a la realización de una acción o la espera de un evento.

## Transición
Define una relación entre dos estados, indicando lo que ha de ocurrir para pasar de un estádo a otro. Los cambios de estádo se producen cuando la transición se *dispara*, o sea, cuando se cumple la condición para pasar de un estádo a otro.

## Ventajas de implementar las máquinas de estádo
- Son fáciles de implementar
- Son rápidas
- Su depuración es sencilla
- Tienen minima sobrecarga computacional
- Son intuitivas y se asemejan al modelo de racionamiento humano
- Son flexibles ya que permiten la integración de nuevos estados sin tener un impacto significativo en el resto y permite combinar otras técnicas como la lógica difusa y las redes neuronales.

![Máquina de estados que define el comportamiento de un NPC, Desarrollo de videojuegos Vol 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6wkygcv3iicm0wtrna3.png)

## Javascript y máquinas de estádo
Algúnos frameworks en Javascript para el manejo de máquinas de estádo son:
-[Machina](https://github.com/ifandelse/machina.js)
-[Javascript State Machine](https://github.com/jakesgordon/javascript-state-machine)
-[Xstate](https://xstate.js.org/docs/) Mi preferido.
Functions/Methods in Java
Tags: java, programming, opensource, tutorial
Published: 2021-12-13 01:31:41

###What are java functions/methods?
A function is a block of code which only runs when it is called.

To reuse code: *define the once and use it many times*

###General Syntax:
```
public class Main {
    static void nameOfMethod() {
    // code
  }
}
```

```
public class Main{
    access-modifier return-type method() {
     // code
     return statement;
  }
}
```

method() - name of calling function
return-type - A statement that causes the program control to transfer back to the caller of a method.
A return type may be a primitive type like int, flaot or void type(returns nothing)

####Note: These are the few important things to understand about returning the values;

The type of data returned by a method must be compatible with the return type specified by the method for example if return type of some method is boolean, we can not return an integer

The variable receiving the value returned by a method must also be compatible with the return type specified for the method.

=> Pass by value:
example 1:
```
main() {
   name = a 
   greet(name);
}
static void greet(naam) {
    print(naam);
}
```
#####primitive data type like int, short, char, byte etc.(just pass value)
#####object of reference: passing value of reference variable
example1:
```
psvm() {
    a = 10;
    b =20;
    swap(a, b);
}
swap(num1, num2) {
    temp = num1;
    num1 = num2;
    num2 = temp;
}
```

###Scopes:
* function scope: Variables declared inside a method/function scope(means inside the method) can't be accessed outside the method.


* block scope: Variables initialized outside the block can be updated inside the block


* loop scope: Variables declared inside loop are having loop scope.


* shadowing: Shadowing is the practice in Java is the practice of using variables in overlapping scopes with the same name where the variable in low-level scope overrides the variable of high-level scope. 


* Method/Function overloading: This happens when two functions have the same name.
This is allowed having different arguments with same method name.

For a more detailed introduction to java programming, I would surely encourage you to check out this wonderful toturial
[Functions/Methods in Java](https://www.youtube.com/watch?v=vvanI8NRlSI&list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ&index=7) by *Kunal Kushwaha*

Feel free to connect with me on [github](https://github.com/rukundob451) and [Linkedin](https://www.linkedin.com/in/benjamin-rukundo-539ab01a6/), thank you.
Make Riso Patterns in P5.js
Tags: tutorial, p5js
Published: 2021-12-12 21:46:20

I remember going to a workshop in Taipei last year where they introduced me to coordinating colors and prepping for riso printing, which is a type of digital screen printing method that involves vibrant colors. I wanted to replicate the look of riso using P5.js, a library for making generative art. 


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

The key to achieving the look is through the use of [blendMode](https://p5js.org/reference/#/p5/blendMode), specifically blendMode(MULTIPLY). This reduces the opacity of the colors and when overlapped, the colors becomes a darker version of the mix. 

Today, we'll make one pattern that looks like this:

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

Okay, first make sure you have your canvas set up. You can change the width and height to whatever you want it to be but for this example, let's just use 400 x 400. That's all you need in the setup function!
```javascript 
function setup() {
  createCanvas(400, 400);
}
```
Moving on to the draw function, you want to move the starting point to the middle of the page, so place this at the beginning. 
```javascript
translate(width/2, height/2)
```
Then, let's get on to making the circle pattern! Use a for loop to make the circles rotate around, as seen here. Here is where you can adjust the stroke weight as you'd like. 
```javascript
 for (let i = 0; i < 10; i++){
      blendMode(MULTIPLY);
      rotate(120)
      strokeWeight(30);
```
Then, use a if/else statement to assign 3 different colors to the circles, depending on if they're dividable by 2 or 3. I used the primary colors of red, yellow, and blue in this. 
```javascript
if (i % 2 === 0){
      stroke(80, 150, 255);
      ellipse(10, 70, 50, 50)
    } else if (i % 3 === 0) {
      stroke(255, 255, 0);
      ellipse(10, 70, 50, 50)
    } else {
      stroke(255, 0, 0);
      ellipse(10, 70, 50, 50)
    }
```
Wrap everything from the translate to the if/else in `push()` and `pop`. The final code in the draw function should look like this: 
```javascript
function draw() {
  background("FFF");
  push()
  // translate to middle of canvas
  translate(width/2, height/2)
  // use for loop to make the circles rotate around 
  for (let i = 0; i < 10; i++){
      blendMode(MULTIPLY);
      rotate(120)
      noStroke()
      strokeWeight(30);
  // use if/else to assign 3 different colors to the circles
    if (i % 2 === 0){
      stroke(80, 150, 255);
      ellipse(10, 70, 50, 50)
    } else if (i % 3 === 0) {
      stroke(255, 255, 0);
      ellipse(10, 70, 50, 50)
    } else {
      stroke(255, 0, 0);
      ellipse(10, 70, 50, 50)
    }
  }
  pop()
}

```
Personally, I really like the look of this and made some holiday cards based on this! Cheers to the 🎄 season!
Created a React Ecommerce App Check it out!!
Tags: javascript, react, beginners, programming
Published: 2021-12-13 01:30:28

Just created my first react app after about a week of learning react. It's still a working project (I'll be fixing somethings in the upcoming week). Ill also be creating a bug tracker. Please like and comment on what more I should change. I was very excited to get started and I can't wait to learn more. I also did my own CSS. The whole app is fully responsive. Enjoy!!!

https://www.linkedin.com/feed/update/urn:li:activity:6875672070508867584/?commentUrn=urn%3Ali%3Acomment%3A(ugcPost%3A6875655319960264704%2C6875672020508557312)
IST 402 - Final Project
Published: 2021-12-13 01:06:25

For our final project, our group chose to build an application that sorts information and tests users based upon their knowledge on a given topic. 


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

The standard template for the project is shown in the image above, where questions can be sorted using the arrows or by dragging the selection along the page. 

The application was created using arrays to store the order of the list, with a shuffle function and check answer function available for the user to test themselves on the given information. 

When the user choses to check their answers, incorrect choices are displayed in red, and the program lists a correct answer count and the ability to show the solutions. Our group felt that providing multiple forms of feedback for the user to engage with would be important features for a study app, these features are found throughout the program. 

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

The correct order for each question was stored based on the order in which the user entered them, making for an easy way to access the information.

When viewed from a code standpoint, the order of the array is shown below:

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

If one were to view the code while a user was interacting with the program, they would be able to observe live updates to the order in which questions are displayed. 

The order of questions was checked through the use of the method checkQuestions(), where a series of boolean expressions were ran to count and list the amount of correct answers.

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

After answers are checked, the user is given the ability to take another attempt.

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

Overall, the success of this project was largely due to the conceptualization that went into organizing and moving the date throughout the array.

GitHub Repo: {% github IST-402-Group-1/sorting-question no-readme %}