teleren/devto huggingface dataset:
My MongoDB Atlas Hackathon Submission!
Tags: atlashackathon
Published: 2022-01-14 03:44:42

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)

The application I built is a YouTube Video Planner which loosely simulates a Notion template I use to track what YouTube videos I plan on creating. I thought it would be a better idea to have a dedicated location where I can track these videos and what better way than to do it for this hackathon as my project! 

As of right now, it is a very barebones application to where it essentially functions the same as a todo app but I do plan on working on this more. I built this with NextJS, Graphql, Apollo, Prisma and MongoDB as my stack of choice! 

### Submission Category: 

[Note]: # (E-Commerce Creation, Prime Time, Action Star, Automation Innovation, or Choose Your Own Adventure)
Choose Your Own Adventure

### Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)

[Github repo](https://github.com/chaucodes/youtube-video-planner)
Cloud Compliances
Tags: azure, aws, cloud
Published: 2022-01-14 03:43:19

Imagine!

You are having time of your life one fine Sunday morning!

And suddenly you receive a call!

"We are not compliant!"

What do you do?

You look everywhere! But it is too late! You cannot do anything now!

Well that 90 seconds nightmare can be a reality in future!

Way too many #startups, #sysadmin, IT specialist are scared of compliances!

They assume if I'm using a #cloud vendor, I'm already compliant!

But cloud provider has 2 way of saying 

Security "OF" cloud
Security "IN" cloud

And these terms can often be confusing!

What is the solution?

If you #infrastructure is over cloud, #compliance and #security can become tricky!

Every major cloud provider has separate shared responsibility for them. 

And unfortunately there is no solution that fits all!

So next time if you are planning to use cloud.

Talk to experts about your compliance goal and security goals!
Leetcode 909 Snakes and Ladders
Tags: leetcode, algorithms
Published: 2022-01-14 02:51:22

```java
import java.util.Arrays;

class Solution {
    public boolean search(int[] nums, int target) {
        return search(nums, target, 0, nums.length-1);
    }
    private boolean search(int[] nums, int target, int l, int r){
        if( l <= r){
            // here we start as a regular binary search
            int mid = (r-l)/2 + l;
            //if target equals to mid/left/right, return true
            // to avoid collision (e.g. difference of target < nums and target <= nums)
            // we do it for l, mid, and r
            if(target == nums[mid] || target == nums[l] || target == nums[r]){
                return true;
            }
            //here is if there is a rotation in this array/subarray, we call it "twisted" 
            if(nums[r]>nums[l]){ // if nums[r] > nums[l], nums[l:r] is not a twisted array 
                if(nums[l] <= target && target <= nums[r]){ // if target in this array, do normal binary search
                    if(target == nums[mid]){
                        return true;
                    }else if(target < nums[mid]){ 
                        return search(nums, target, l, mid-1);
                    }else{
                        return search(nums, target, mid+1, r);
                    }
                }
            //here are cases for twisted array  
            }else if(nums[mid] == nums[l]){ // if mid and l are the same, we cannot know whether the left is twisted or the right is twisted
                                            // For example, [1,1,1,2,1] has a twisted array at right and [1,2,1,1,1] has a twisted array at left
                                            // But they all satisfy nums[mid] == nums[l]
                                            // Here we can only do O(n) search.
                return search(nums, target, l, mid-1)||search(nums, target, mid+1, r);
            }
            else if(nums[mid] > nums[l]){//if nums[mid] > nums[l], at least left subarray is not twisted array
                if(nums[l]<target && target<nums[mid]){ // if target is at left
                    return search(nums, target, l,mid-1);
                }else{  //else
                    return search(nums, target, mid+1,r);
                }
            }else{//if nums[mid] > nums[l], at least right subarray is not twisted array
                if(nums[mid] < target && target < nums[r]){//if target is at right
                    return search(nums, target, mid+1, r); 
                }else{//else
                    return search(nums, target, l, mid-1);
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        int[] nums = {1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1};
        System.out.println(new Solution().search(nums, 2));
    }
}
```
New Year's Resolution - Dev Log 3
Tags: webdev, beginners, programming, computerscience
Published: 2022-01-14 03:26:45

`const disclaimer = () => {
console.log("This is a quick dev log to get this blog caught up to my Reddit Posts")
}`

I am trying to catch this blog up all in one day to the posts I have made on Reddit. Honestly, this is taking a lot longer than I anticipated, but I was inspired when I woke up this morning to get this blog up and running so that every time I post on Reddit I can post here in a more detailed way. So here is the post from Reddit which would be dev log 3:

![Reddit post this blog is based on](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oq2nm5frnnuav1cwzl5m.PNG)
For screen readers:

> Idea 1 - Job Board: Another day another coding session. I started by fixing some design errors with my additional filters area. Now instead of hitting a button to see the filters available, they are always visible and can be cleared easily. Also got cracking on the post a job screen. Most of the fields are basically how I want them. Ran into an issue where I need to provide a box to let companies post job descriptions. I just defaulted to a textarea tag but realized that I could run into issues with bullet points, italics, and other text decorations. So I am gonna go with something like Reddit, a markdown box. But I need to research how to make that later tonight. I saw something called SimpleMDE, which I will look into later. Besides that, hopefully, will have the UI done tomorrow and will post pics for people to see.

> Idea 2 - Paid Plugins: Scratched

> Idea 3 - SaaS: I have a solid idea for a SaaS I believe, but will not start on this till my job board is out and functional.

> Personal notes: Still feeling good about the resolution. It is nice to code consistently every day again. Sometimes I have the fire, sometimes I don't. I am excited about finishing the UI because that means I will get to make a YouTube video on the job board so far, that will be fun. I have also started thinking about deployment options, evens though that won't be an issue for a little while. I need to find a deployment method that auto-scales since I intend to be the only developer on the project/projects. I know a bit about AWS but am used to deploying via Heroku. I usually just bundle my front end and web server and host through Heroku and let Mongo Atlas deal with the database. I have a funny feeling that, while that method is easy, it probably scales poorly. So I will be looking into other solutions.

After reading through this post again, I really thought I would have the UI done by the next day. That was some serious optimism right there. I have to post dev log 7 today and I still do not have the UI finished. At this point the project's additional filters section was essentially radio buttons, I decided later on that this was not great looking and changed them over to dropdowns. I have not yet posted any pictures of the UI that I have been working on, but plan on doing so in today's dev log.
Link Building Services at WebSuit
Published: 2022-01-14 03:22:50

Have you recently gone through your site's performance and found that your page views are trailing behind your competition? If so, then you may want to check on your link-building practices.
To get more leads and prospects, you also need to build a reputable site. Fortunately, you can do this by finding a top referral source.

What are the benefits of a good backlink?
 Increases organic search and rankings
 Increases referral traffic
 Increases page views 

Learn more about our digital marketing services at [WebSuit](https://www.websuitsolutions.com/)
To-Do List using HTML, CSS and JavaScript
Tags: webdev, html, css, javascript
Published: 2022-01-14 03:17:52

Hello Developers 👩‍💻👩‍💻👩‍💻

Creating a To-Do List is a basic Application for a beginner . Today in this post we will be creating a basic To-Do List using HTML , CSS and JavaScript. 

HTML will contain only certain Elements . Like input box to take user input , a button to add item. Codepen will be given below.

The Important part here is JavaScript. We will be using the concept of <b>createElement()</b> and <b>appendChild()</b> . <b>createElement()</b> is used to create a new HTML elements like "li", "p" and many more.<b> appendChild()</b>is used to append the created element as a child of specified HTML Element. 

So the logic here is to create an new "li" (list item) HTML element and a "delete button" onclick of "ADD" button. 

I've styled my To-Do List according to my own styling and code will be provided to you but it is more preferable to add your own styling . 

You can see the Codepen below : 

{% codepen https://codepen.io/hrushikesh41/pen/OJxrWMY %}

Hope You like the post and gained some knowledge. 

You can Add more to this like giving an error message if user clicks on add button without entering any item in input box. 

If you have any doubts you can ask in comment section. 

Suggestions are always welcomed. 

Meet You in Next Post
Till Then Happy Coding 👩‍💻👩‍💻👩‍💻
Use Tin to quickly set up WordPress
Tags: programming, tutorial, productivity, opensource
Published: 2022-01-14 03:15:43

WordPress is open source software you can use to create a beautiful website, blog, or app. https://github.com/WordPress/WordPress
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l4b2cmhz5hy4cxba2kpo.png)

Tin is a product of TeamCode that can generate executable applications instantly without manual environment configuration. Users can click to run project directly in the cloud. 

The guide below shows how to quickly install WordPress through Tin.
**Login to Tin and clone WordPress**
1. Click the Tin URL of WordPress.
https://www.teamcode.com/tin/clone?applicationId=273461926832795648
Users who have not logged in should sign up first.
2. Log in to Tin with your email, Github account, or phone number.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qf7at6frhcfzzwmxm3bh.png)
3. (Optional) After logging in, you can change the “Application Name” or “Tag”。
4. Click "Clone" button to clone the Tin app to your workspace.
Note: Tin will give new users a free trial for a certain length of time, which is determined by the instance size. After the free trial time, the Tin app will automatically stop working. You will not be charged for the whole process. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wse5k419dt1mjmlupsr.png)
5. Click "RUN NOW" to initiate the application.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jep44v4yru8gti55sws.png)
6. Click the "Endpoint List" button to go to the Endpoint list, with the entry points for all apps displayed. Click the URL of entry point. And you will visit WordPress immediately.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofmjoz4aitkktb14cy3f.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5zw3rq3tu0knmnuie4m.png)
**You can try WordPress now. **
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrgybiyvw7gu43al55uy.png)

You can also use the Tin to quickly set up other open source projects, see the guide: https://www.teamcode.com/docs/en-US/tin/create-tin
Installing Redis 6 on Ubuntu 20.10
Published: 2022-01-14 03:13:59

---
title: Installing Redis 6 on Ubuntu 20.10
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

Redis is an open source, in-memory,  data structure store that can be used as a cache, primary database and message broker. It is a multi-model database that supports search, graph, real-time streaming, analytics and many other use cases beyond that of a simple data store. With over 52,000+ GitHub stars, 20,000+ forks and over 500+ contributors,  Redis  is quite popular among the developers. Redis gives developers building applications the tools and information they need in a very efficient manner. Redis today can be deployed on-premises, across clouds, hybrid environments as well as over the Edge devices flawlessly. 

Installing Redis on Linux is super easy. The easiest way to install Redis from source follow the below process:

```
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
```

But if you try to install Redis Server on Ubuntu 20.10, you will face the below error message:

```
cd src && make all

make[1]: Entering directory '/home/kev/redis/redis-4.0.11/src'

    CC Makefile.dep

    CC adlist.o

In file included from adlist.c:34:0:

zmalloc.h:50:10: fatal error: jemalloc/jemalloc.h: No such file or directory

 #include <jemalloc/jemalloc.h>

          ^~~~~~~~~~~~~~~~~~~~~

compilation terminated.
```

To fix this issue, make sure that you follow the below steps:




```
cd deps
make hiredis jemalloc linenoise lua geohash-int
cd ..
make
sudo make install
```

References:
- [Install Redis from source](https://developer.redis.com/create/from-source/)
- [Install Redis on Windows](https://developer.redis.com/create/windows)
- [Install Redis on MacOS](https://developer.redis.com/create/homebrew/)
Use Tin to quickly set up SuiteCRM
Tags: programming, tutorial, productivity, opensource
Published: 2022-01-14 03:12:59

SuiteCRM is the award-winning open-source, enterprise-ready Customer Relationship Management (CRM) software application. https://github.com/salesagility/SuiteCRM
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8netktvhz2q3vnhmtjq.png)

Tin is a product of TeamCode that can generate executable applications instantly without manual environment configuration. Users can click to run project directly in the cloud. 

The guide below shows how to quickly install SuiteCRM through Tin.

Login to Tin and clone SuiteCRM

1. Click the Tin URL of SuiteCRM.
https://www.teamcode.com/tin/clone?applicationId=273461926832795648
Users who have not logged in should sign up first.

2. Log in to Tin with your email, Github account, or phone number.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayuj1cck248scazc9uzw.png)

3. (Optional) After logging in, you can change the “Application Name” or “Tag”.

4. Click "Clone" button to clone the Tin app to your workspace.
Note: Tin will give new users a free trial for a certain length of time, which is determined by the instance size. After the free trial time, the Tin app will automatically stop working. You will not be charged for the whole process. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wg0fcbiambuvddbu8veb.png)

5. Click "RUN NOW" to initiate the application.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2uwx7xdvafuavk8lrfjo.png)

6. Click the "Primary Endpoint" button and you will visit SuiteCRM immediately.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j4vg6eexnqljse6og8pk.png)

Now you can log in to SuiteCRM to use it.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9xpj0cz9ys285ky1d4t.png)
You can also use the Tin to quickly set up other open source projects, see the guide: https://www.teamcode.com/docs/en-US/tin/create-tin
SEO Services at WebSuit
Published: 2022-01-14 03:04:40

Creating a lucrative online business may take up a significant portion of your time. In addition, the technicality of the work and the effort that needs to be considered may be overwhelming. Luckily, Websuit Solutions offers an expanded digital marketing service package that explicitly addresses some issues relating to [Local SEO management](https://www.websuitsolutions.com/search-engine-optimization/), link building, and Technical SEO.

In this industry, we understand the complexity of the need to innovate. That is why we do our services by incorporating strategic SEO management, and web design.

We understand that you have an individually unique set of requirements for your site, and we strive to match your specifications by improvising on the details. So let us keep in touch and work on your next project!
New Year's Resolution - Dev Log 2
Tags: webdev, beginners, programming, computerscience
Published: 2022-01-14 03:04:18

`const disclaimer = () => {
console.log("This is a quick dev log to get this blog caught up to my Reddit Posts")
}`

If this is somehow the first part of this series that you are reading, here is the skinny. My new year's resolution is to create one or multiple websites that give me enough income per month to not need a job. I have been posting on Reddit regularly as a dev log. Due to people in the comment section of my 6th dev log on Reddit, I am now converting the posts into a more formal blog.

Here is the post from Reddit:

![picture of Reddit post this blog is based on](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1ic9fl67osxn838ccln.PNG)

As per usual, here is what it says for those using screen readers, and honestly those who don't want to read all the text in a screenshot:

> Idea 1 - Job Board: Had a nice coding session on working on this today. Ran into a logical bug that took about an hour to solve, killed my drive to get more done. I decided that the post a job section will not be in modal form and am using conditional rendering to place it where the main feed of job posts would be. I was able to get the basic layout of the post a job section finished today.

> Idea 2 - Paid Plugins: I have decided to scratch this idea entirely, due to unfamiliarity with the ecosystems that I would be developing for and the overall saturation of competitors.

> Idea 3 - SaaS: I am still excited to create a SaaS later in the year, I have an idea which I think might be a winner. Still, I do not want to spread myself thin and work on multiple projects at once, since I am far too inexperienced to work on too large projects at once. Don't want to half-ass two things at once, would rather whole ass one thing.

> Personal notes: I am excited to be making a dev log on Reddit because I feel like this will make me more accountable. I have also decided to make another form of dev log on YouTube, but those will be more for large updates. The first YouTube post I will make is when I have finished the entire frontend for the MVP, then again after I complete the backend. I think that it would be wise to join a discord or something later on and talk to developers who are better than myself, that way when I have the MVP done I can get advice from others. Still excited about the resolution and am still hoping to be successful.
Leetcode 124 Binary Tree Maximum Path Sum

Published: 2022-01-14 02:58:25

```java

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution {

    public int maxPathSum(TreeNode root){
        if(root.left == null && root.right == null){
            return root.val;
        }
        return maxPathSum2(root).maxV;
    }

    private ReturnWrapper maxPathSum2(TreeNode root) {
        if(root == null){
            return new ReturnWrapper(-2000, -2000, -2000);
        }
        ReturnWrapper rightMaxPath = maxPathSum2(root.right);
        ReturnWrapper leftMaxPath = maxPathSum2(root.left);
        int rootVal = root.val;
        int newEdgeV = Math.max(root.val, root.val + Math.max(rightMaxPath.edgeV, leftMaxPath.edgeV));
        int newSumV = Math.max(Math.max(root.val, root.val + rightMaxPath.edgeV + leftMaxPath.edgeV), root.val + Math.max(rightMaxPath.edgeV, leftMaxPath.edgeV));
        int newMaxV = Math.max(Math.max(newSumV, leftMaxPath.maxV), rightMaxPath.maxV);
        return new ReturnWrapper(newMaxV, newSumV, newEdgeV);
    }

    class ReturnWrapper{
        private int maxV;
        private int sumV;
        private int edgeV;
        public ReturnWrapper(int maxV, int sumV, int edgeV){
            this.maxV = maxV;
            this.sumV = sumV;
            this.edgeV = edgeV;
        }
        public ReturnWrapper(){

        }
        private boolean optimalIncludesRoot(){
            return maxV == sumV;
        }
        private boolean isAnEdge(){
            return sumV == edgeV;
        }
    }
}
```
Leetcode 403 Frog Jump

Published: 2022-01-14 02:56:32

```python
from typing import List


class Solution:
    def canCross(self, stones: List[int]) -> bool:
        N = len(stones)
        d = {}
        if stones[1] != 1: # if we cannot jump at initial place, it definitely False
            return False
        # build value-index mapping
        for i, stone in enumerate(stones):
            d[stone] = i
        # dp is the number of jumps to location i
        # for example, we can only jump to pos 1 with 1 units
        # if we can jump to pos X for {a, b, c} units, it means that we can jump to X for a, b, c units
        # it also means that from pos X, we can jump for <a-1, a, a+1, b-1, b, b+1, c-1, c, c+1> units. 
        dp = [{0}, {1}]
        for i in range(2, N):
            dp.append(set())
        for i in range(1, N):
            s = stones[i]
            for k in dp[i]:
                # do jump
                # if k-1 is ok for position stones[i], jump and add to dp
                if s + k - 1 in d and k - 1 != 0:
                    dp[d[s + k - 1]].add(k - 1)
                # if k is ok for position stones[i], jump and add to dp
                if s + k in d and k != 0:
                    dp[d[s + k]].add(k)
                # if k+1 is ok for position stones[i], jump and add to dp
                if s + k + 1 in d and k + 1 != 0:
                    dp[d[s + k + 1]].add(k + 1)
        return len(dp[-1]) != 0
```