teleren/devto huggingface dataset:
Deploying the Phoenix Api to DigitalOcean using mix release
Tags: elixir, personal, blog
Published: 2020-07-14 10:15:25

This is a personalized report that explains how to deploy an api to a Digital Ocean ubuntu server with minimal technical explanation.

1. Log into your server with your ssh credentials.

e.g: `ssh root@<yoururl>.com`

2. pull your code from your preferred branch. 

3. run `mix deps.get` to update your dependencies. You can then either run `mix ecto.reset` or `mix ecto.migrate` to reset/update your database depending on what you want to do. (You may need to disable any active services using the database during this time.)

4. run `MIX_ENV=<env> mix release` to update your release folder. 
5. restart your systemctl service.
6. Check the endpoint to see if it works as intended by checking `/`
Laravel 7 Ajax Image Upload Step By Step
Published: 2020-07-14 09:53:32

**Laravel 7 ajax image upload with preview example tutorial**. Here you will learn, how to upload the image into the database and folder with a display preview example.

Before we upload the image into the folder and MySQL database using jquery ajax in laravel application, we will show the preview of the image. And also validate image using jquery before uploading into the server.

Here you can learn how to validate image on server-side and client-side validation. We will upload the image using jquery ajax without page refresh and reload.


### Laravel 7 Ajax Image Upload with Preview Example Tutorial

Just follow the below steps, upload the image with preview using the ajax and jQuery validation:

1. Install Laravel App
1. Setup Database
1. Install Image Intervention Package
1. Generate migration file and model
1. Make Route
1. Create Controller & Methods
1. Create Blade View
1. Make Folder
1. Run Development Server

Checkout here [https://www.tutsmake.com/laravel-6-ajax-image-upload-tutorial-example-from-scratch/](https://www.tutsmake.com/laravel-6-ajax-image-upload-tutorial-example-from-scratch/ "https://www.tutsmake.com/laravel-6-ajax-image-upload-tutorial-example-from-scratch/")
Laravel 7 Image Upload Example
Published: 2020-07-14 09:48:39

**Laravel 7 image upload example with validation tutorial**. In this tutorial, you will learn how you can upload images into the database and folder with server-side validation. This tutorial made easy to upload the image to the folder and MySQL database in the laravel framework.

This tutorial shows you how you can upload the images into folder and database with a demo example. We will show a preview of the image before uploading it into folder and database in laravel application.


### Laravel 7 Image Upload Example With Validation

Just follow below steps and upload validated image in storage and MySQL database in laravel:

* Install Laravel Fresh App
* Setup Database
* Generate Migration & Model
* Make Route
* Create Controller & Methods
* Create Blade View
* Start Development Server


Checkout full article here [https://www.tutsmake.com/laravel-6-image-upload-to-database-with-validation-tutorial/](https://www.tutsmake.com/laravel-6-image-upload-to-database-with-validation-tutorial/ "https://www.tutsmake.com/laravel-6-image-upload-to-database-with-validation-tutorial/")
Portfolio Review
Tags: react, gatsby, javascript, graphql
Published: 2020-07-14 09:46:11

Hi everyone, 

My name is Michele and I follow this community since 2018, I never wrote a post but I think that I will have to start to do it because I am really soaking in programming and I want to start to write about it as well.

The reason of this post as per title is very simple, I would like you guys if you can to review my personal portfolio and tell me from 1 to 10 what do you think about it.

I have a lot of projects on but some of them are quite simple, I am working on make more of them, I found 11 projects that I want to do in the next few months.

Anyway let me know if a portfolio like mine is a ready to apply for a junior position.

https://michele-portfolio.netlify.app/

thank you for your time.

Michele
Laravel Angular 7 CRUD Example
Published: 2020-07-14 09:41:42

**Laravel 7 angular js crud tutorial**. In this tutorial, we would love to share with you how you can create a crud application in laravel using the angular js. This example tutorial also work with laravel 7.x version.

**What is Angular js?**

Ans:- AngularJS is a powerful JavaScript client-side Model-View-Controller (MVC) framework. It is especially popular for building single page applications that behavior like AJAX application.


### Laravel Angular JS CRUD Tutorial

Follow the below steps and create laravel angular web crud applications:

1. * Install Fresh Laravel Setup
1. * Setup Database Credentials in .env
1. * Create REST API Controller
1. * Create a Model
1. * Define Route
1. * AngularJS application structure
1. * AngularJS app.js
1. * Create Angular js controller
1. * Create blade view
1. * Start development server

Checkout full post here [https://www.tutsmake.com/laravel-6-angular-js-crud-example-tutorial/](https://www.tutsmake.com/laravel-6-angular-js-crud-example-tutorial/ "https://www.tutsmake.com/laravel-6-angular-js-crud-example-tutorial/")
Laravel 7 Livewire CRUD Step by Step Example
Published: 2020-07-14 09:37:39

**Laravel 7 livewire crud example tutorial**. In this tutorial, you will learn how to implement livewire crud (create, read, update, delete) application using lara livewire package.

As well as learn how to validate laravel livewire forms, how to update livewire form data, and how to edit livewire form data in laravel.

This example demonstrates to you how to implement the user’s crud web application in laravel using livewire package.


### Laravel 7 Livewire Crud Example

Follow the following steps and create laravel crud application using livewire package with validation:

Step 1: Download Laravel Fresh App
Step 2: Setup Database Configuration
Step 3: Install Livewire
Step 4: Create Component
Step 5: Add Route
Step 6: Create Blade Views
Step 7: Run Development Server

Checkout in detail [https://www.tutsmake.com/laravel-7-livewire-crud-example/](https://www.tutsmake.com/laravel-7-livewire-crud-example/ "https://www.tutsmake.com/laravel-7-livewire-crud-example/")
Road to Genius: superior #49
Tags: javascript, beginners, computerscience, codenewbie
Published: 2020-07-14 09:37:26

Each day I solve several coding challenges and puzzles from Codr's ranked mode. The goal is to reach genius rank, along the way I explain how I solve them. You do not need any programming background to get started, and you will learn a ton of new and interesting things as you go.

We finally made it to the superior rank, yay!

```JS
function Node(val) {
  this.val = val;
  this.next ☃️ null;
}
function myst(cur1, cur2) {
  if (cur1 === null || cur2 === null)
    return null;
  let head = new Node(0);
  let cur = head;
  let 🐼 = 0;
  while (cur1 !== null || cur2 !== null) {
    let val1 = cur1 !== null ? cur1.val : 0;
    let val2 = cur2 !== null ? cur2.val : 0;
    let sum = val1 + val2 + carry;
    let newNode = new Node(sum % 10);
    carry = sum >= 10 ? 1 : 0;
    cur.next = newNode;
    cur = cur.next;
    if (cur1 !== null)
      cur1 = cur1.next;
    if (cur2 !== null)
      cur2 = cur2.next;
  }
  if (carry > 0)
    cur.next = new Node(carry);
  return head.next;
}
;
let x = new Node(9);
x.next = new Node(3);
💚.next.next = new Node(7);
let y = new Node(9);
y.next = new Node(2);
y.next.next = new Node(7);
let out = myst(x, y);
let A = out.val;
while (out.next) {
  A += out.val;
  out = out.next;
}

// 🐼 = ? (identifier)
// ☃️ = ? (operator)
// 💚 = ? (identifier)
// such that A = 26 (number)
```

That's quite a lot of  code, but at a first glance the bugs are pretty easy to fix.

The first one ☃️ should be the assignment operator `=`.
The second bug 🐼 is a variable name declaration, so we have to look for a variable that's being used but hasn't been declared yet: `carry`.
The final bug 💚 should be `x` because the `y` version below it looks exactly the same, so we can safely assume they should be similar.

![coding challenge answer](https://dev-to-uploads.s3.amazonaws.com/i/9affcmwcf3wrf25zcsk6.png)

By solving these challenges you train yourself to be a better programmer. You'll learn newer and better ways of analyzing, debugging and improving code. As a result you'll be more productive and valuable in business. Get started and become a certified Codr today at https://nevolin.be/codr/
Laravel 7 Crud Operation Step by Step Example
Published: 2020-07-14 09:30:45

Laravel 7 CRUD example tutorial. In this tutorial, you will learn how to create the first crud application in laravel with MySQL DB from scratch.

The Laravel CRUD stands for create, read, update and delete. These are the four basic functions of persistent storage.

This laravel crud example tutorial completely guides you from scratch (step by step) you to create the first crud (create, read, update, delete) application in laravel with MySQL database.


#Laravel 7 CRUD Example Tutorial

Just follow the below steps and create your first crud application in laravel 7 from scratch:

Step 1: Install Laravel Fresh New Setup
Step 2: Setup Database Credentials
Step 3: Generate Model and Migration
Step 4: Add Routes
Step 5: Create Resource Controller
Step 6: Create the blade view
Step 7: Start Development Server

Checkout full post here https://www.tutsmake.com/laravel-7-6-crud-example-tutorial/
Git Cheat Sheet – A Collection of the Personal Git Cmds
Tags: git, github, commands
Published: 2020-07-14 10:12:16

---
cover_image: https://rajeshroyal.com/wp-content/uploads/2020/07/git-cheatsheet-personal-opensource-beginner-friendly.jpg
title: Git Cheat Sheet – A Collection of the Personal Git Cmds
published: true
date: 2020-07-14 09:29:55 UTC
tags: git,github,commands
canonical_url: https://rajeshroyal.com/git-cheat-sheet-a-collection-of-the-personal-git-cmds/
---

## Git cheat sheet Opensource contribution

**Note**: Please correct post if you find mistakes. 

//your repository

`$ git clone git@github.com:akrabat/zend-validator.git`

//if you are cloning a forked repository of someone  
// add upstream/parent/original repository as upstream repository

`$ git remote add upstream git@repository_url`

`ex: $ git remote add upstream git@zend/zend-validator.git`

//do some changes and then

`$ git checkout master/develop/or_specified_branch`  
`$ git pull upstream master && git push origin master`  
`$ git checkout -b hotfix/readme-update `

`//-b to create a new branch if you have a local branch already then don't use -b`

//hotfix = new branch name or we can say prefix like: bugfix/hotfix/feature extra /readme-update : detailed-name  
//you should create a new branch or checkout to your local branch you already created. Directly commit to master or other main branch is not recommended.

//-u to also push to upstream directory so we can create a pull request later in original repository

$ git push -u origin hotfix/readme-update

//got to github dashboard and generate the pull request follow the proper format of pull request.

//if your branch is behind with the branch you want to commit let’s say you want your commit to merge to master or develop branch and your hotfix/readme-update is 3 commits behind then you  
// have to rebase your current branch with parent branch.

//rebase commands

//first checkout to main branch it could be master or develop branch

$ git checkout branch-name

$ git pull -v

//again checkout to your local branch ex: Feature/my-local-branch

$ git checkout local\_branch\_name

//now rebase it with parent branch

$ git rebase -i develop

//if you got merge conflict while rebasing with parent branch you have to resolve all merge conflict.

\*\*\*\*\*\*\*\*\*\*\*Rebase Step\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
//Edit all suggested files by git and then again do `git status` command to check changed files. Now follow below commands

$ git add files\_names  
$ git rebase –continue

// if you get more conflicts then resolve again and repeat from `Rebase Step`

//if rebase success then do git push. Force the push. If the repository is forked then include -u to also push to origin repository

$ git push origin Local/branch\_name –force

The post [Git Cheat Sheet – A Collection of the Personal Git Cmds](https://rajeshroyal.com/git-cheat-sheet-a-collection-of-the-personal-git-cmds/) appeared first on [Rajesh Royal](https://rajeshroyal.com).
Laravel 7 Crud Example with Image Upload
Published: 2020-07-14 09:26:53


**Laravel 7 CRUD (create, read, update, delete) with image upload example tutorial.** Here, you will learn how to make CRUD(create, read, update, delete) with image upload web application in laravel.

This article helps you for creating crud (create, read, update, delete) with insert and fetch image from database in laravel web application.


### Laravel 7 CRUD with Image Upload Example

Just follow the below steps and create your laravel crud(create, read, update, delete) with image upload:

1. * Install Laravel Fresh Setup
1. * Setup Database Credentials
1. * Generate Model and Migration
1. * Create Resource Route & Controller
1. * Create the blade view
1. * Start Development Server

*Originally published at* [https://www.tutsmake.com/laravel-crud-with-image-upload-from-scratch/](https://www.tutsmake.com/laravel-crud-with-image-upload-from-scratch/ "https://www.tutsmake.com/laravel-crud-with-image-upload-from-scratch/")
What I've learned so far studying UI/UX design online
Tags: career, webdev, codenewbie, design
Published: 2020-07-14 09:26:29

I still have a lot to study to become a half-decent UX/UI designer but hopefully, this will help anyone who wants to get started.
<hr>

# 1. UI and UX are two different things

We often hear these terms used together and I won't lie but when I first started I thought they were the same thing, but that's not true. UX stands for user experience whilst UI stands for user interface, UX is the interaction between the user and the product and UI is the graphical interface that sometimes focuses on looks and style.
 

# 2. Mobile-first design

This made a huge difference when it comes to responsive design for me. Before when I coded with my browser open wide, I struggled with making my website responsive, sometimes taking up to a day, simply because I had designed the website desktop-first which means that the default stylings were all for big and medium screens. 

Now, I always design with small screens in mind. Expanding the design to fit bigger screens is much easier than compressing the design to fit smaller screens. 

# 3. It's okay to copy other people's work

By this, I don't mean to go ahead, copy and paste the whole design, and publish it as your own work.  No, what I mean is that you can come across a website that you like and you can try to recreate it or copy it to get a feel of what was done and how. This can also help when you are starting to use a new design tool and you want to get familiar with it.

# 4. Strive to make your website as accessible as possible

As a front-end developer web accessibility is an important part of my day to day work, using proper HTML tags and labels, keyboard navigation support, etc. But after taking up design, I realized that there is so much more to web accessibility than I thought, and that's also when I realized how UX designers are so important. You have to take into account where certain elements are positioned and how the user will access them, which color to use and color contrast since there are many users who are color blind, and even for the average user reading text in bright colors is not ideal, etc. 

# 5. More doesn't mean better

I never really had this problem since I'm quite the minimalist when it comes to design but some times I found myself adding animations and illustrations when it wasn't needed just because I wanted to impress anybody who'd look at my design. Putting many illustrations and animations on one website only serves to overwhelm the user, and let's not forget how this can cause your website to load slower for users who don't have a super-fast 4g internet connection which in turn lowers the accessibility of your website. You want every user to be able to access your site even those who are still using a 2g connection.


<hr>
Feel free to add on in the comments!
Laravel 7 Datatable CRUD Example
Published: 2020-07-14 09:23:14

Laravel 7 DataTable Ajax Crud with bootstrap modal. In this tutorial, You will learn how to create a crud app using the yajra dataTable with bootstrap modal in laravel.

As well as you will learn how to insert data using ajax in laravel with datatables, how to update or edit mysql data in laravel using ajax with datatables, and how to delete data from mysql db with datatables in laravel.

In this tutorial, will create product management listing with add, edit and delete functionality without reloading the whole web page using dataTable js and bootstrap modal.

#Laravel 7 DataTable CRUD Example

Follow the following steps and create your laravel datatable ajax crud application with bootstrap modal:

Step 1: Install Fresh laravel Setup
Step 2: Set database Credentials
Step 3: Create Migration And Model
Step 4: Install Yajra DataTables In App
Step 5: Create Route, Controller & Blade View
Step 6: Run Development Server
Step 7: Live Demo

Read full article https://www.tutsmake.com/laravel-7-6-datatable-ajax-crud-with-modal/
Build an Ecommerce Website Using Best Online Store Builder @499
Tags: onlinestorebuilder, multivendorstoresoftware, ecommercewebsitesoftware
Published: 2020-07-14 09:15:19

If you want to launch a powerful ecommerce website without draining all your savings, then you are in the right place. SwiftKart, one of the [best online shop builders] (https://www.swift-kart.com/) has announced a limited-period offer for entrepreneurs and businesses planning to develop an awe-inspiring online shop. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fb0yhfn0pogvk0jxzdha.png)


**Special discount offer from SwiftKart**

The special discount promises a 50% discount on the Launch Swift package which costs 999 USD. The limited period offer is applicable on the first 50 copies of SwiftKart claimed under the special discount. Meaning, building your online store on Swiftkart will cost only $499 under this special offer. 

Learn more and claim the [special discount over here] (https://www.swift-kart.com/specialoffer.html). 

**Why SwiftKart store builder?**

SwiftKart is a powerful ecommerce website software that helps launch advanced online stores at a small ONE-TIME cost. Sell unlimited number of products without worrying about additional fee. 

SwiftKart provides a string of benefits for businesses and entrepreneurs who set up their own online shopping mart. Advantages include:

* Quick setup of a beautiful and responsive ecommerce store. 

* Sell your own products or enable multi vendor features to evolve as a multi-seller store.

* Your website’s design and code will be SEO-friendly. Meaning, more store traffic and sales.

* Language is no more a barrier when using SwiftKart. The multilingual capabilities of this online store builder will give you the power to cater to audiences with unique language preferences.

* Change your online store just the way you want. SwiftKart is 100% customizable. 

Whilst above are some of the best Swiftkart benefits, you will get a lot more at just US$499. 

**Launch with SwiftKart**

Claim your copy of SwiftKart by filling the [form on this page] (https://www.swift-kart.com/specialoffer.html). Want to learn more about SwiftKart and everything it can do? Check out the product introduction page of this [online store website builder] (https://www.techosquare.com/swiftkart) 

Want to build something big and need more custom development help on Swiftkart? Email at info@techosquare.com to discuss your goals and get over 40% discount on all Swiftkart packages.
difference between function and Method in python
Tags: python
Published: 2020-07-14 09:02:53

what is function:
A function is a block of code to carry out a specific task, will contain its own scope and is called by name. All functions may contain zero(no) arguments or more than one arguments. On exit, a function can or can not return one or more values.

Basic function syntax
def functionName( arg1, arg2,….):
…….
# Function_body
……..
Let’s create our own (user), a very simple function called sum(user can give any name he wants)”. Function “sum” is having two arguments called num1 and num2 and will return the sum of the arguments passed to the functionsum). When we call the function (sum) with values(arguments) 5 and 6, it returns 11.
def sum(num1, num2):
return (num1 + num2)

Output

sum(5,6)
11

what is Method:
A method in python is somewhat similar to a function, except it is associated with object/classes. Methods in python are very similar to functions except for two major differences.

The method is implicitly used for an object for which it is called.<a href="https://www.pythonslearning.com/2020/07/python-read-from-stdin-write-to-file.html">python</a>

The method is accessible to data that is contained within the class.<a href="https://www.pythonslearning.com/2020/07/learning-php-mysql-javascript-5th.html">book</a>

General Method Syntax
class ClassName:
def methodname(): ………….. # <a href="https://www.pythonslearning.com/2020/07/python-range-function-in-python-range.html">Methodbody</a>
………………
class Pet(object):
def mymethod(self): print("I am a Cat") cat = Pet() cat.mymethod()
Output
I am a Cat
for detailed information see python books
Reference: https://www.pythonslearning.com/2020/07/method-vs-function-python.html
BEST OF LUCK!!
Automate testing for your Laravel Application using Travis-CI
Tags: travisci, laravel, github, testing
Published: 2020-07-14 09:01:39

---
title: Automate testing for your Laravel Application using Travis-CI
published: true
description: Automate testing for you Laravel application using Travis CI. As an example I will be using a repository containing test case for an API.
tags: travisci, laravel, github, testing
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/1qpzygl67lmcr9pk4kp9.png
---
Automate testing for you Laravel application using Travis CI. As an example I will be using a repository containing test case for an API https://github.com/csinghdev/laravel-examples.

If you would like to watch me doing it then you can watch the  tutorial here:
{% youtube Xl1HMwaD3Mg %} 

Let’s start.

First thing we need to do is create an account on Travis-CI.

If your application is open source then you can use 
https://travis-ci.org which is completely free for Open Source Projects. 

For private repositories you can use https://travis-ci.com 

In this example I will be using https://travis-ci.org.

Create a new account on Travis-CI. It will ask you for access to your GitHub repository for first time.

We have to follow these two steps here:
1. Activate the repository for which we want to automate testing.
2. Create a new configuration file **.travis.yml** inside our repository for Travis-CI.

To activate repository, go to settings and then click on the toggle for that repository.

![Settings](https://dev-to-uploads.s3.amazonaws.com/i/crszyn2rdn8xgmqdv3hh.png)

![Activate](https://dev-to-uploads.s3.amazonaws.com/i/s2giob38pw5rkrr6v6i0.png)

Create a new file **.travis.yml** Inside your project repository folder

{% gist https://gist.github.com/csinghdev/1c7921027e516860e5f000579728f37d %}

That’s it, Add this file to git, commit your code and push it into the repository.

As soon as we do that, after few seconds, our test cases starts running here for both versions of php.

And after some time as we can see all test cases are done.

You can find the entire code here:
{% github https://github.com/csinghdev/laravel-examples %}

Hope you find this useful!