teleren/devto huggingface dataset:
Moving our Website to a new Domain!
Published: 2021-12-06 18:18:55

Quite a few months back we created the Electron App Store. In that time we chose **Freenom** for our free Domain name. Since then the project became much popular. Just a month back we had applied for sponsorship from Fosshost.org. **Fosshost.org** is a non-profit company who provides free cloud services and domain names to Open-Source projects. Proudly we got approved by them. We had applied for electron-store.org domain name and now we have it. Just a few weeks ago we had moved the main website to electron-store.org and now we had moved the API to api.electron-store.org! There's much more planned for the v0.0.5 update which is delayed because of new features.

The new features includes (but not limited to):
* Developer Portal to submit apps
* Faster Loading time (thanks to the new API)
* Account Login and Rating functionality
* Metrics/Statistics for Apps
* Claiming of existing apps in the Developer Portal
* New Terms & Conditions and a dedicated App Listing Agreement

That's not all and the exact features would be announced 2 days before the Official Update! Also stay in loop by following our [Twitter Account](https://twitter.com/ElectronStore_) and Dev.to page!

**Writer**: Rajdeep Malakar ( @rajdeep )
**Domain Provided By**: Fosshost.org ( @fosshostorg )
**Twitter**: [@ElectronStore_](https://twitter.com/ElectronStore_)
**GitHub**: [Electron-Store](https://github.com/Electron-Store)

Get your OSS Apps ready for the new **Electron Store**!
How To Fix Laravel SQLite "Database does not exist" error?
Tags: laravel, sqlite, database, fix
Published: 2021-12-06 18:18:42

First, check whether that you made necessary environment variable changes in `.env` file as described in the [How To Use SQLite Database In Laravel](http://laravel.test/questions/how-to-use-sqlite-database-in-laravel) question. If you have already tried it but not working, comment all the database related lines in the .env file like this.

```
#DB_CONNECTION=mysql
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=laravel
#DB_USERNAME=root
#DB_PASSWORD=
```

This will completely prevent loading the database configuration from the `.env` file. Then open the `database.php` file in the `config` directory to mention the configuration directly.

But before continuing, it should not be encouraged to hard-code environment variables directly into the code. But in this scenario, the SQLite connection does not require any username or password as MySQL does.

So, change the default database connection to SQLite.

```
'default' => env('DB_CONNECTION', 'sqlite'),
```

In the `connections` array, only change the `database` line as following and leave other lines as they are,

```
'sqlite' => [
    'database' => database_path('database.sqlite'),
],
```

After that, try to run the `migration:status` command.

```
php artisan migrate:status
```
create a Mock API using graphQl and Apollo
Tags: react, javascript, node, beginners
Published: 2021-12-06 18:15:35

install these packages
```
    "cors": "^2.8.5",
    "express": "^4.17.1",
    "express-graphql": "^0.12.0",
    "graphql": "^15.4.0"
```
```
UserType.js

const graphql = require("graphql");
const { GraphQLObjectType, GraphQLInt, GraphQLString } = graphql;

const UserType = new GraphQLObjectType({
  name: "User",
  fields: () => ({
   //any fields
      Name: { type: GraphQLString  },
      age: { type: GraphQLString  },
  }),
});

module.exports = UserType;

```
```
Schema.js

const graphql = require("graphql");
const {
  GraphQLObjectType,
  GraphQLSchema,
  GraphQLInt,
  GraphQLString,
  GraphQLList,
} = graphql;

//import mock data here
const UserType = require("./UserType");

const RootQuery = new GraphQLObjectType({
  name: "RootQueryType",
  fields: {
    getAllUsers: {
      type: new GraphQLList(UserType),
      args: { Name: { type: GraphQLString } },
      resolve(parent, args) {
       //return mock data
        return data;
      },
    },
  },
});

module.exports = new GraphQLSchema({ query: RootQuery });
```

```
index.js 

const express = require("express");
const app = express();
const PORT = 6969;
const { graphqlHTTP } = require("express-graphql");
const schema = require("./Schemas/Schema");
const cors = require("cors");

app.use(cors());
app.use(express.json());
app.use(
  "/data",
  graphqlHTTP({
    schema,
    graphiql: true,
  })
);
```
Week 6 and Overall experience in Taskforce 4.0
Tags: awesomitylab, codeofafrica, taskforce
Published: 2021-12-06 18:15:20

Hello incredible folks, so far, we are covering everything in a project and trying to make it accessible everywhere.

In previous articles, we have seen many about the software development journey here at @Awesomity lab and @CodeofAfrica, which were soft skills and technical skills. We have challenged to complete a whole project in one week even if all of us were learning a new stack which was very interesting to learn; thanks to my teammates, we managed the time we had and came up with working endpoints in 3 days and loved by the audience we have presented on. Let's jump to the final week.

The sixth week in taskforce 4.0 Bootcamp was very incredible. It's all about containerizing our project and implementing feedback given by our facilitators, automatic deployment of a project from GitLab to the digital ocean. Before that, we learnt a lot about docker I had no idea about it; thank you @Regis, for helping me to know more about docker and automatic deployment from GitLab registry to digital ocean, and thank you, my teammates, for your collaboration and helping each other as our culture in the software development industry. ## "WE DID IT" Kudos to all of you!


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcu3su5krxuxdp7n6tbn.jpeg)
Eventually, we graduated and were certified. Thank you again Awesomity Lab and Code of Africa team members and everyone involved behind the scenes made us complete this program successfully and peacefully. cheers 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4htjdlx2ubixrl9e54a.jpg)
CI-CD pipeline with discord issue notification
Tags: actionshackathon21, node, devops, discordbot
Published: 2021-12-06 18:08:30


### My Workflow
A very simple pipeline. First have your project setup with scripts `test` to test app, `build` to build app. the action test on node `v16`. 
Create a `HEROKU_API_KEY` and `HEROKU_EMAIL`( your heroku mail id) secret in your repository.

![Screenshot of setting secret](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gm9eev7qhteog35vh8l7.png)
that's set now for the Issue message.
Create a discord web hook for your server then create 2 more secrets `WEBHOOK_ID` the number part after `https://discord.com/api/webhooks/` and `WEBHOOK_TOKEN` the text blob after the `id`



### Submission Category: 
DIY Deployments
[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)


### Yaml File or Link to Code
{% github Ayan-web/ci-cd-issuetracker-action%}



### Additional Resources / Info

here is my demo [Git repo](https://github.com/Ayan-web/demo)
5 Books That Can Completely Change Your Life
Published: 2021-12-06 17:50:55

Sometimes I wonder how my life would be if it were not for reading books.

This is because books have taught me more than 20 years of schooling ever did.

Below are five books that can completely change your life. 

## [1. Think and Grow Rich by Napoleon Hill](https://amzn.to/3IpZp55) 

This is the book that changed my life, made me fall in love with reading, and it's the greatest personal development book ever published.

This book can help you:

- To find your purpose in life.
- To become successful in anything you do.
- To believe in yourself and your abilities.
- To take risks and make bold bets on yourself.

## [2. 7 Habits of Highly Effective People by Stephen R. Covey](https://amzn.to/3dnlh2M) 

This is the book that changed my mindset and how I see the world.

It presents an approach to being effective in attaining your goals by aligning yourself to true north principles that are universal and timeless based on a character ethic.

In short, this book teaches you how to live life effectively.

## [3. Crush It by Gary Vaynerchuk](https://amzn.to/3Gh6V0i) 

This is the book that helped me with building my personal brand on social platforms like Twitter.

It teaches you how to use the power of the internet to turn your real interests into real businesses.

It shows you how to make a living doing what you love doing.

## [4. The 5 AM Club by Robin Sharma](https://amzn.to/3EulywF) 

This is the book that helped me reinvent my life by letting go of weakness and mediocrity.

It teaches you various productivity and tactics built on research and brain science to help you transform your results, health, and happiness.

By reading this book, you will discover the early-rising habit that has helped so many accomplish epic results.

## [5. The Power of Positive Thinking by Norman Vincent Peale](https://amzn.to/3lEt6FZ) 

This is the book that used to lift me up at the worst moment of my life.

It teaches you how to have a mental and emotional attitude that focuses on optimistic and positive thoughts while expecting positive results.

It shows you how to have a positive mentality that looks at the bright side of life and anticipates happiness, health, and success.
Selenium Tests using GitHub action
Tags: actionshackathon21, productivity, devops, testing
Published: 2021-12-06 17:37:42

### My Workflow

This flow is created, to setup github action for running selenium Tests using headless chrome browser.

### GitHub action steps:

I. Install dependencies-

```
name: Run Python Test
on:
  push:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Python 3
        uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - name: Install dependencies
        run: |
          set -ex
          wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
          sudo apt install ./google-chrome-stable_current_amd64.deb
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install msedge-selenium-tools
 ```
 
II. Run Tests

```
# Execute Test
      - name: Run test 
        run: python -m pytest tests/test_form.py 
```

### Submission Category: 

DIY Deployments

### Yaml File:

```
name: Run Python Test
on:
  push:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Python 3
        uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - name: Install dependencies
        run: |
          set -ex
          wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
          sudo apt install ./google-chrome-stable_current_amd64.deb
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install msedge-selenium-tools
      # Execute Test
      - name: Run test
        run: python -m pytest tests/test_form.py

```
[Video] Checking out NDepend
Tags: csharp, dotnet
Published: 2021-12-06 17:28:50

---
title: [Video] Checking out NDepend
published: true
date: 2021-12-06 17:15:00 UTC
tags: csharp,dotnet
canonical_url: https://blog.codingmilitia.com/2021/12/06/checking-out-ndepend/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xd5z0w5lww7f78aje8b6.jpg
---

Hey folks!

Let’s take a look at something that’s been around for years, but maybe flew under the radar: NDepend, a static code analysis tool tailored for .NET.

It’s not free, but it might be worth checking out, to see if your project would benefit from it. You can try it with the available 14-day trial (which was what I used to test it and record this video).

{% youtube iKyoR_qEsKM %}

A couple of related links:

- [NDepend](https://www.ndepend.com/)
- [eShopOnWeb](https://github.com/dotnet-architecture/eShopOnWeb/)

Thanks for stopping by, cyaz!
Deploying to Heroku with SvelteKit
Tags: svelte, sveltekit, heroku, webdev
Published: 2021-12-06 17:02:34

If you're trying to deploy with the built-in `adapter-auto`, you will probably encounter an `E10 error` and/or a `R10 error` with `svelte-kit not found`. [This post](https://bight.dev/log/deploying-a-sveltekit-application-to-heroku/) details how to correct them. 

The other option is to use the `adapter-node` which is what we'll do here; you can read about adapters in the [SvelteKit docs](https://kit.svelte.dev/docs#adapters)

**You may also be interested in**
[SvelteKit + .env](https://dev.to/nostro/using-environment-variables-with-sveltekit-544b)
[SvelteKit + TailwindCSS](https://dev.to/nostro/using-tailwindcss-with-sveltekit-25i6)

###Create a svelte app

```powershell
npm init svelte@next my-awesome-app
cd my-awesome-app
npm i @sveltejs/adapter-node@next
```

### Modify the config file to use the right adapter

`svelte.config.js`
```js
// Change
- import adapter from '@sveltejs/adapter-auto';
+ import adapter from '@sveltejs/adapter-node';

// Make sure this is present
const config = {
    kit: {
        adapter: adapter(),
    },
};
```

### Add a start script and specify the `node` version required 

SvelteKit template does not have a `start` script, which will be looked for by Heroku. 

Also, at time of writing Heroku defaults to `node 14.1` if there is no indication otherwise, and the build may fail if your version is different.

`package.json`
```js
    "engines": {    
        "node": "16.x",
        "npm": "8.x"
    },
    "scripts": {
        "start": "node build/index.js",
    },
```
Depending on your case, the `npm` version may not be strictly necessary for the build to succeed.

### Create the Heroku app

You should have the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) installed and be logged in; otherwise install it and run  `heroku login`

This creates the app at `my-awesome-app.herokuapp.com` - if the name isn't available the command will fail. If you omit the name you will get assigned a random poetic name by Heroku.

```powershell
heroku create my-awesome-app
git add . && git commit -m "My commit message"
git push heroku main
```

By default this create the app in the US region; to do it in the EU run `heroku create my-awesome-app --region eu`

Once the build finishes, your app will be deployed at `my-awesome-app.herokuapp.com` or `random-poetic-name.herokuapp.com`
How to hide password value in inspect using React and Formik
Tags: react, javascript, webdev, programming
Published: 2021-12-06 16:56:04

**Hello Developers 🤩🤩**

Have you ever logged in to Facebook?
Have you ever inspected the Facebook login page?
If not go to [Facebook](https://www.facebook.com/) and try inspecting it, you will find the value of the password filed is not showing.

We will replicate that behavior using React and Formik.

### Creating Project

```npm
npx create-react-app my-app
```

After project setup, install formik.

```npm
npm install formik --save
```

### Basic setup
Setup a basic template for email and password input with submit button.

```jsx
import { useFormik } from "formik";

function App() {
    return (
        <form>
            <input name="email" type="email" placeholder="email" />
            <input 
                name="password"
                type="password"
                placeholder="password"
            />
            <button type="submit">Submit</button>
        </form>
    );
}

export default App;
```

### Implementing Formik

```jsx
import { useFormik } from "formik";

function App() {
    const handleSubmit = (values) => {
        console.log(values);
    };

    const formik = useFormik({
        initialValues: {
            email: "",
            password: "",
        },
    });

    return (
        <form
            onSubmit={(e) => {
                e.preventDefault();
                handleSubmit(formik.values);
            }}
        >
            <input
                name="email"
                type="email"
                placeholder="email"
                {...formik.getFieldProps("email")}
            />
            <input
                name="password"
                type="password"
                placeholder="password"
                onChange={formik.handleChange}
                onBlur={formik.handleBlur}
            />
            <button type="submit">Submit</button>
        </form>
    );
}

export default App;
```

Now check the value in Inspect.
**Kaboom 🔥🔥🔥**
No value in Inspect.

[Live Preview](https://39ph6.csb.app)

Closing here 👋👋👋
> [Github Code Repo](https://github.com/shareef99/blogs/tree/master/hide-password-value)
> This is **Shareef**.
> My recent project [yourounotes](https://yourounotes.vercel.app/)
> My [Portfolio](https://portfolio.shareef.vercel.app/)
> Twitter [ShareefBhai99](https://twitter.com/shareefBhai99)
> [Linkedin](https://www.linkedin.com/in/nadeem-shareef-7a8394182/)
> My [other Blogs](https://dev.to/shareef)
Django - For The-Last-Minute-Perfectionist Developer!
Published: 2021-12-06 16:49:29

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17qzyysbeoa4kmhfjkcn.png)
#### 1\. Django Tutorial for Beginners

This tutorial will take you on a journey under the hood of web technologies, offering you a glimpse of all the bits and pieces that need to come together to make the web work as we know it. This YouTube Crash Course of Django discusses all the major related things to Django until building an eCommerce data model and organizing models in apps in just 1 hour.

[More info](https://www.youtube.com/watch?v=rHux0gMZ3Eg)

#### 2\. Writing your first Django app

Django was developed in a fast-paced newsroom environment, and it was designed to make everyday Web-development tasks fast and easy. Here's an informal overview of how to write a database-driven Web app with Django.

The goal of this document is to give you enough technical specifics to understand how Django works, but this isn't intended to be a tutorial or reference --- but we've got both! When you're ready to start a project, you can [start with the tutorial](https://docs.djangoproject.com/en/3.0/intro/tutorial01/) or [dive right into more detailed documentation](https://docs.djangoproject.com/en/3.0/topics/).

[More info](https://docs.djangoproject.com/en/3.0/intro/)

#### 3\. Intro to Django

This tutorial will introduce you to the basics of Django 1.10.

[More info](https://overiq.com/django-1-10/intro-to-django/)

#### 4\. Python Django Web Framework --- Full Course for Beginners

This is a 3.75 hours YouTube Full Course on Python Django Web Framework. You can refer to the GitHub code, which is given in the description box of the video. It discusses from built-in components to custom mixin for class-based views.

[More info](https://www.youtube.com/watch?v=F5mRW0jo-U4)

#### 5\. Introduction --- Django Web Development with Python

This is Django web development with Python tutorial series. Django is a Python web development framework aimed at rapid development and deployment.

[More info](https://www.youtube.com/watch?v=FNQxxpM1yOs&list=PLQVvvaa0QuDeA05ZouE4OzDYLHY-XH-Nd)

‍

*Originally posted at* [*raftlabs.co*](https://raftlabs.co/development/top-free-resources-to-learn-django?utm_source=devto&utm_campaign=crosspost)
[Binary Search]Hoppable
Tags: algorithms, javascript, 100daysofcode, programming
Published: 2021-12-06 16:08:07

https://binarysearch.com/problems/Hoppable

Medium

Given an integer list nums where each number represents the maximum number of hops you can make, determine whether you can reach to the last index starting at index 0.

Constraints: n ≤ 100,000 where n is the length of nums.

# Example 1
## Input: nums = [1, 0, 0, 0]
## Output: false

# Example 2
## Input: nums = [2, 4, 0, 1, 0]
## Output: true
## Explanation: We can jump from index 0 to 1, and then jump to the end.

# Example 3
## Input: nums = [1, 1, 0, 1]
## Output: false
## Explanation: We can't go past index 2 of the array.

-----

# dp[]

```java
import java.util.*;

class Solution {
    public boolean solve(int[] nums) {
        int length = nums.length;
        if (length <= 1) {
            return true;
        }
        if (nums[0] == 0) {
            return false;
        }
        boolean[] ans = new boolean[length];
        ans[0] = true;
        for (int i = 0; i < length; i++) {
            if (ans[i]) {
                int steps = nums[i];
                for (int j = 1; j <= steps; j++) {
                    if (i + j < length) {
                        ans[i + j] = true;
                    }
                }
            }
        }

        return ans[nums.length - 1];
    }
}

```

---
```java
import java.util.*;

class Solution {
    public boolean solve(int[] nums) {
        int reach = 0;
        for (int i = 0; i < nums.length; i++) {
            if (i > reach) {
                return false;
            }
            reach = Math.max(reach, i + nums[i]);
        }

        return true;
    }
}

```
Monster 1.27 released
Tags: javascript, dom, node
Published: 2021-12-06 16:08:05

---
title: Monster 1.27 released
published: true
description: Monsterjs Release  
tags: javascript, dom, nodejs
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lpvmggbn7v91vnklktqm.png
series: Monster-Release
---

Today we released the latest edition of our Monster project. Monster is a collection of javascript classes that we need for daily work in [our](https://www.schukai.com/en/) web projects.

Besides small helper functions and classes, it also provides useful functions to enable reactive programming.

Monster is available via jsdelivr and npm.

Only the changes are described here. The full functionality can be found in the [documentation](https://monsterjs.org/en/doc/1.27.0/).

## Updater

Until now the binding `data-monster-bind` of input controls worked via various events. With this release, the updater can now also perform updates manually.

```html
<input id="id1" data-monster-bind="path:my.key">
```

```javascript
const obj = document.getElementById('id1');
obj.value="hello";

const updater = new Updater(document.querySelector('body'));
const subject = updater.getSubject();
// ↦ {}

updater.retrieve();
// ↦ {my: {key: "hello"}}
       
```

## findClosestByClass

The new helper function `findClosestByClass` summarizes the check to a class selector. The small helper function is used within monster to find elements.


## Fixes

* template: find themed templates 


_hope you enjoy it!_



## References

- [Updater.retrieve()](https://monsterjs.org/en/doc/1.27.0/Monster.DOM.Updater.html#retrieve)
- [npm](https://www.npmjs.com/package/@schukai/monster) 
- [jsdelivr](https://www.jsdelivr.com/package/npm/@schukai/monster)
- [we are hiring](https://about.schukai.com/de/jobs/)
Help needed with some vulnerability issues
Published: 2021-12-06 15:53:34

Hi everybody. I'm new. I don't know if this is the rigth place to ask for help. I'm practising with REACt. I have updated node in my machine and I executed the code "npx create-react-app my-app" to start working with react. The app was installed but, in the process there was a messagge about vulnerabilities found. I don't know if this has to do with the package or what. What can I do? Thanks in advance.



Regards :)

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