teleren/devto huggingface dataset:
Maximal Square
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 10:00:44

Given an `m x n` binary `matrix` filled with `0`'s and `1`'s, _find the largest square containing only_ `1`'s _and return its area_.

**Example 1:**

![](https://assets.leetcode.com/uploads/2020/11/26/max1grid.jpg)

**Input:** matrix = \[\["1","0","1","0","0"\],\["1","0","1","1","1"\],\["1","1","1","1","1"\],\["1","0","0","1","0"\]\]
**Output:** 4

**Example 2:**

![](https://assets.leetcode.com/uploads/2020/11/26/max2grid.jpg)

**Input:** matrix = \[\["0","1"\],\["1","0"\]\]
**Output:** 1

**Example 3:**

**Input:** matrix = \[\["0"\]\]
**Output:** 0

**Constraints:**

*   `m == matrix.length`
*   `n == matrix[i].length`
*   `1 <= m, n <= 300`
*   `matrix[i][j]` is `'0'` or `'1'`.

**SOLUTION:**

    class Solution:
        def maximalSquare(self, matrix: List[List[str]]) -> int:
            m = len(matrix)
            n = len(matrix[0])
            biggest = 0
            for i in range(m):
                for j in range(n):
                    for w in range(biggest, min(m - i, n - j) + 1):
                        valid = True
                        for p in range(w):
                            for q in range(w):
                                if matrix[i + p][j + q] != "1":
                                    valid = False
                                    break
                            if not valid:
                                break
                        if valid:
                            biggest = max(biggest, w)
                        else:
                            break
            return biggest * biggest
How NDepend Improves Your C# Code Quality?
Tags: beginners, codequality, dotnet, programming
Published: 2022-06-12 09:57:13

## Preparation

You will need to download NDepend before we are getting started. You may download [here](https://www.ndepend.com/download). You can choose the trial version or Pro (if you have bought the license).

![NDepend Download](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubmp6llf73l5oxkdrd00.png)

NDepend has many documentations on how to setup, also use cases that might fit with your use case.

* For Windows, please visit [this page](https://www.ndepend.com/docs/getting-started-with-ndepend).
* For Linux and MacOS, please visit [this page](https://www.ndepend.com/docs/getting-started-with-ndepend-linux-macos).

## Let's Get Started

Anyway, I will use the Linux version. Don't forget to install .NET 5, but I hope they will support .NET 6. :) Why? Since .NET 5 it's already [end of support](https://dotnet.microsoft.com/en-us/download/dotnet/5.0) and may risk us because don't have security updates, etc. Because I use Manjaro, I decide to use snap, you can visit how to setup the .NET 5 [here](https://docs.microsoft.com/en-us/dotnet/core/install/linux-snap). Anyway, don't forget to register your license!

Now, I will try to generate NDepend project for my old project.

{% github bervProject/NETCoreAPIBoilerplate %}

I use this command `dotnet ~/ndepend/net5.0/NDepend.Console.MultiOS.dll -cp BervProject.WebApi.Boilerplate.ndproj BervProject.WebApi.Boilerplate.sln`. Please update the name with your own project and make sure you've moved to your project directory.

I know if I want to run the NDepend, I will need .NET 5. The wonderful thing, I still can generate the report for my .NET 6 project.

![Result 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ag60es0sx9hqhb13csp.png)

![Result 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tn0xbazg84hyu72wlgx3.png)

![Result 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o746dicdr2hh4oadz3qy.png)
 
I can see my bad code from my old project. But, not only that, you can see the rule, customize the rule, and why that rule is important. Is that all? No, I will continue in another part. So stay tuned!

![Dance](https://media.giphy.com/media/jUHNphLYWIghVmRBnx/giphy.gif)
Genesis: The Next Gen Rental Listing app using ReactJS and Frappe/ERPNext
Published: 2022-06-12 09:45:23

ReactJS is a frontend framework(or is it a library?) created and maintained by Facebook. To avoid much debate on whether it is a framework or a library, I will call it a `tool` used to create and render UI components on a browser - The Frontend.

Frappe Framework is a batteries included web framework written in Python, JavaScript and a MariaDB database. It is used to build and deploy database driven apps.[More about them here](https://frappeframework.com/docs/v13/user/en/introduction)

Let's be honest, all apps are database driven.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ayx3esvjnhwseyxcipo.png)

![Uploading image](...) 

There is lots and lots that needs to be said about those two software stacks but for now, I will narrow my focus on the Rental Listing app: its scope, set up, and the design inspiration. 

**<u>Scope</u>**
Rental listings have been built before, and you probably have seen or have used one before so let me dive into its scope.

- A React based frontend UI with a Search engine (with filter options) landlord/tenant portal, maps integration, and easy navigation.
- A backend (Frappe/ERPNext instance) with a repository of all properties in an organized structure.
- REST API of Frappe! (Frappe rocks!)
- Batteries of Frappe!(SMS, Email, Admin UI, WebHooks)

**<u>Setup</u>**
This is going to be a high level demonstration.

- Frappe instance setup hosted on a VPS: [](https://www.digitalocean.com/community/tutorials/how-to-install-an-erpnext-stack-on-ubuntu-20-04[](url))
- Frappe apps to install: 
facility_management [](https://gitlab.com/dsmwaura/facility_management_website.git) and facility_management_website [](https://gitlab.com/dsmwaura/facility_management.git)

In your frappe bench directory run the following command.
```
bench --site yoursite.com install-app appname git-repo
```
- A React App created using `create-react-app`

**<u>Design Inspiration
</u>**
Zumper: https://www.zumper.com/

I will make more articles detailing each of the steps in the setup!
💎 `eval` in Crystal language! Anyolite 🟢🔴 is amazing...
Tags: crystal, ruby, anyolite, mruby
Published: 2022-06-12 09:28:53

There is no `eval` in the Crystal language.

If you had to use eval in the Crystal language, you would have to embed Crystal itself in your executable.

Eval is often regarded as a bad practice in Ruby language. But sometimes, I want to use eval in Crystal language. At that time, I found a great project that makes it possible to execute eval even in the Crystal language by including mruby (or CRuby) into the Crystal executable.

## Anyolite

https://github.com/Anyolite/anyolite

Have you ever heard of anyolite? It is a ruby embedded in a crystal. I think it is a perfect name for this library.

## I tried it

shards.yml

```
dependencies:
  anyolite:
    github: Anyolite/anyolite
```

When you run shards install, Anyolite automatically prepares mruby for you.

kitty.cr 

```crystal
require "anyolite"

code = ARGV[0]

class Kitty
  def initialize(@n : Int32)
  end

  def mew
    puts "mew " * @n
  end
end

Anyolite::RbInterpreter.create do |rb|
  Anyolite.wrap(rb, Kitty)
  Anyolite.eval(code)
  p Anyolite.cast_to_crystal(rv, Int32)
end
```

build:

```
crystal build kitty.cr
```

run:

```
./kitty "Kitty.new(n: 3).mew; 6"
```

output:

```
mew mew mew 
6
```

You can see that the Ruby code is being evaluated at run time. Finally, I found a way to run eval in the Crystal language!

The size of the generated executable is about 7 Mb, which is a bit large because of the mruby integration. However, running eval with Crystal is exciting and well worth it.

## Reference

https://anyolite.github.io/anyolite/Anyolite.html

https://github.com/Anyolite/anyolite/wiki
Sort Array By Parity
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 09:00:48

Given an integer array `nums`, move all the even integers at the beginning of the array followed by all the odd integers.

Return _**any array** that satisfies this condition_.

**Example 1:**

**Input:** nums = \[3,1,2,4\]
**Output:** \[2,4,3,1\]
**Explanation:** The outputs \[4,2,3,1\], \[2,4,1,3\], and \[4,2,1,3\] would also be accepted.

**Example 2:**

**Input:** nums = \[0\]
**Output:** \[0\]

**Constraints:**

*   `1 <= nums.length <= 5000`
*   `0 <= nums[i] <= 5000`

**SOLUTION:**

    class Solution:
        def sortArrayByParity(self, nums: List[int]) -> List[int]:
            return sorted(nums, key = lambda x: x & 1)
Find Target Indices After Sorting Array
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 08:30:43

You are given a **0-indexed** integer array `nums` and a target element `target`.

A **target index** is an index `i` such that `nums[i] == target`.

Return _a list of the target indices of_ `nums` after _sorting_ `nums` _in **non-decreasing** order_. If there are no target indices, return _an **empty** list_. The returned list must be sorted in **increasing** order.

**Example 1:**

**Input:** nums = \[1,2,5,2,3\], target = 2
**Output:** \[1,2\]
**Explanation:** After sorting, nums is \[1,**2**,**2**,3,5\].
The indices where nums\[i\] == 2 are 1 and 2.

**Example 2:**

**Input:** nums = \[1,2,5,2,3\], target = 3
**Output:** \[3\]
**Explanation:** After sorting, nums is \[1,2,2,**3**,5\].
The index where nums\[i\] == 3 is 3.

**Example 3:**

**Input:** nums = \[1,2,5,2,3\], target = 5
**Output:** \[4\]
**Explanation:** After sorting, nums is \[1,2,2,3,**5**\].
The index where nums\[i\] == 5 is 4.

**Constraints:**

*   `1 <= nums.length <= 100`
*   `1 <= nums[i], target <= 100`

**SOLUTION:**

    class Solution:
        def targetIndices(self, nums: List[int], target: int) -> List[int]:
            nums.sort()
            return [i for i, v in enumerate(nums) if v == target]
Open Source Website to Contribute as a Beginner🐱
Tags: css, opensource, beginners, frontend
Published: 2022-06-12 08:17:23

Firstly I would like to thanks @isabelcmdcosta for the post idea.

As a beginner we all want to contribute to open-source projects. and as a beginner myself I know how hard it's to find one to contribute especially to frontend projects.
One day while completing my first freecodecamp project, I thought to myself why shouldn't I create one, so after sometime I finally able to create one[Repo link](https://github.com/Coditdoc/Palindrome-Checker).

**Website🔥**
Here is the [Deployed website](Coditdoc.github.io/Palindrome-Checker). This project need lot of improvement. 

**Who can contribute✍️**
This project is created for Beginners only. 

**Don't want to contribute but have suggestions💕-**
You see something which can be improved or have a suggestion. Please do suggest how this website can be improved. I would love to hear from you guys.
Go easy on me guys, this is me first time posting 🙌.

Thank you.

<a href="https://www.buymeacoffee.com/codeitdoc7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-red.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Minimum Number of Swaps to Make the String Balanced
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 08:00:42

You are given a **0-indexed** string `s` of **even** length `n`. The string consists of **exactly** `n / 2` opening brackets `'['` and `n / 2` closing brackets `']'`.

A string is called **balanced** if and only if:

*   It is the empty string, or
*   It can be written as `AB`, where both `A` and `B` are **balanced** strings, or
*   It can be written as `[C]`, where `C` is a **balanced** string.

You may swap the brackets at **any** two indices **any** number of times.

Return _the **minimum** number of swaps to make_ `s` _**balanced**_.

**Example 1:**

**Input:** s = "\]\[\]\["
**Output:** 1
**Explanation:** You can make the string balanced by swapping index 0 with index 3.
The resulting string is "\[\[\]\]".

**Example 2:**

**Input:** s = "\]\]\]\[\[\["
**Output:** 2
**Explanation:** You can do the following to make the string balanced:
- Swap index 0 with index 4. s = "\[\]\]\[\]\[".
- Swap index 1 with index 5. s = "\[\[\]\[\]\]".
The resulting string is "\[\[\]\[\]\]".

**Example 3:**

**Input:** s = "\[\]"
**Output:** 0
**Explanation:** The string is already balanced.

**Constraints:**

*   `n == s.length`
*   `2 <= n <= 106`
*   `n` is even.
*   `s[i]` is either `'['` or `']'`.
*   The number of opening brackets `'['` equals `n / 2`, and the number of closing brackets `']'` equals `n / 2`.

**SOLUTION:**

    class Solution:
        def minSwaps(self, s: str) -> int:
            stack = []
            err = 0
            for c in s:
                if c == '[':
                    stack.append(c)
                elif c == ']':
                    if len(stack) > 0:
                        stack.pop()
                    else:
                        err += 1
            return (err + 1) // 2
Today's Daily Dose of Programming Humor
Tags: jokes, dailydeveloperjokes
Published: 2022-06-12 08:00:18

---
title: "Today's Daily Dose of Programming Humor"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258836687f.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ How did the developer announce their engagement?

___A:___ They `return`ed `true`!
 -->
Horror movie recommendation software
Tags: beginners, python, github, computerscience
Published: 2022-06-12 07:59:14

So, I've been working my way through Codecademy's Computer Science course and have just finished the portion about data structures and algorithms. To end this portion, I must complete a portfolio project using what I've learned to create a recommendation software.

The objectives of this project were:
- Store data in a data structure
- Use an algorithm to sort or search for data within a data structure
- Use Git version control
- Use the command line and file navigation
- Write a technical blog post on the project

For this project, I decided to go with something I love: horror! I decided I would write a program that would recommend a horror movie based on tags chosen by the user.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iz22y4cc3nv355c6n2kj.png)
 
 I decided to use a MaxHeap data structure and heapsort algorithm to keep track of movies that satisfy the user's chosen tags. The movie data was stored in a dictionary with the movie name as the key and the corresponding tags in a list stored as the value. All the tags the user could choose from were also stored as strings in a list. I decided to use an altered implementation of the MaxHeap data structure and heapsort algorithm supplied by Codecademy to better suit the program's needs.

After using a while loop to get the user-supplied tags, I went and linked all the movies that satisfy those tags in a dictionary object, making sure to only include those movies that satisfy multiple user-selected tags.

I then changed that dictionary to a list of tuples with the name of the movie as the first index and the number of tags the movie satisfies as the second. After sorting through the list with a heapsort algorithm, I then returned the top three movies that satisfy the most tags to the user.

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

One problem I ran into was altering the heapsort algorithm and the MaxHeap data structure to suit my needs. Especially since there were no errors detected by my IDE, I needed to go back through and debug only to find out it was a logic error!

All in all, this was a fun project to work on and I learned a lot! Especially when it came to list comprehensions, which I did not know could also be used with a dictionary. I also worked with the `.join()` string method more than I ever had before in order to properly display all the lists and dictionaries I was using.

Surprisingly, the most time-consuming feature of this project was the creation of the movie data because I had to decide what kinds of tags to use and what would be most relevant to the user.

Go ahead and give it a try and see if there is anything that I could improve upon! Feedback is very appreciated!

Github: https://github.com/MozzarellaMonster/Recommendation-Software

Replit: https://replit.com/@MozzarellaMonst/Horror-Movie-Recommendation-Software?v=1
Google Drive Proxy Video Player - Bypass Limits - JW Player - Embed drive videos
Tags: tutorial, discuss, productivity, opensource
Published: 2022-06-12 07:34:21

{% youtube https://youtu.be/0aaybML77r4 %}

---

> GooDrive :- https://goodrive.stream/


---

Google Drive Proxy Player #1 :- https://youtu.be/9VQK8W2iUkg

{% youtube https://youtu.be/9VQK8W2iUkg %}

---
Merge Two Binary Trees
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 07:30:38

You are given two binary trees `root1` and `root2`.

Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge the two trees into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of the new tree.

Return _the merged tree_.

**Note:** The merging process must start from the root nodes of both trees.

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/02/05/merge.jpg)

**Input:** root1 = \[1,3,2,5\], root2 = \[2,1,3,null,4,null,7\]
**Output:** \[3,4,5,5,4,null,7\]

**Example 2:**

**Input:** root1 = \[1\], root2 = \[1,2\]
**Output:** \[2,2\]

**Constraints:**

*   The number of nodes in both trees is in the range `[0, 2000]`.
*   `-104 <= Node.val <= 104`

**SOLUTION:**

    # Definition for a binary tree node.
    # class TreeNode:
    #     def __init__(self, val=0, left=None, right=None):
    #         self.val = val
    #         self.left = left
    #         self.right = right
    class Solution:
        def mergeTrees(self, root1: Optional[TreeNode], root2: Optional[TreeNode]) -> Optional[TreeNode]:
            if not root1 and not root2:
                return None
            mroot = TreeNode()
            nodes = [(mroot, root1, root2)]
            while len(nodes) > 0:
                mcurr, curr1, curr2 = nodes.pop()
                if mcurr:
                    mcurr.val = (curr1.val if curr1 else 0) + (curr2.val if curr2 else 0)
                    if (curr1 and curr1.left) or (curr2 and curr2.left):
                        mcurr.left = TreeNode()
                    if (curr1 and curr1.right) or (curr2 and curr2.right):
                        mcurr.right = TreeNode()
                    nodes.append((mcurr.left, curr1.left if curr1 else None, curr2.left if curr2 else None))
                    nodes.append((mcurr.right, curr1.right if curr1 else None, curr2.right if curr2 else None))
            return mroot
Ubuntu Chrome の ctrl + h 問題と スクロール速度を改善する
Tags: ubuntu, chrome
Published: 2022-06-12 07:21:27



## マウスホイールを高速化する

Ubuntu では Chrome のマウスホイールがすごく遅い。

しかし、Gnome で動いている？ OS の設定などでは
快適な速度で動いてくれる。

なので、Chrome の Extension で
Chrome のみのマウスホイールを早くする。

https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp?hl=en

Linux Scroll Speed Fix をインストールする

Linux って書いてあるから、Mac や Win で読み込まれても
動かないでくれると予想する。

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

右上に固定して、メニューを開くと、
スクロール速度を変えられる。

Scroll Factor 3.0 が一番 Mac の最速に近い。

---

## Ctrl h などを使えるようにする

https://dev.to/kaede_io/ubuntu-2004-us-kide-ctrl-space-noying-kanaqie-riti-egadekiruyounisuru-3g2p

この記事のように、Emacs Theme を入れれば
Chrome で dev.to などで記事を書くときに
ctrl h など MacOS のようなキーバインドが使える。

しかし 
Dev.to で ctrl {b,k,}
Notion.so で ctrl {n,p}

これらの移動コマンドが使えない。

これらはアプリのキーバインドとコンフリクトして
アプリ側が優先されてしまうからだ。
HTML | UI Developer JOB Vacancies
Tags: javascript, html, css, beginners
Published: 2022-06-12 07:13:21

HTML / UI Developer | Remote 
Links are given in comment.

SR NO - 0014 HTML Developer
Skill : HTML 5 and CSS3 skills , Strong knowledge of Knowledge Sass and Less
Location : Noida
Experience : 3 Year

SR NO - 0015 HTML Developer
Skill : Proficient understanding of web markup, including HTML,HTML5, CSS and CSS3
Experience : 3 Year
Location : Remote

SR NO - 0016 frontend Html developer
Skill : HTML5 { 1 year (Preferred) }
Location : Kerala
Experience : 1 to 4 Year

SR NO - 0017 Web Developers(HTML/CSS)
Skill :  Understanding of HTML5/CSS3, Wordpress,Angualr,Javascript is a must.
Location : Pune
Experience : 2.5 Year

SR NO - 0018 HTML Developer
Skill :  HTML, CSS, BASIC PHP, BOOTSTRAP,
Experience : 1 Year
Location : Maharashtra

SR NO - 0019 HTML Developer
Skill :  Proficient understanding of web markup, including HTML5 and CSS3
Experience : 1 Year
Location : Noida, Uttar Pradesh

SR NO - 0020 Front End Developer
Skill :  Proven work experience as a Front-end developer, Hands on experience with markup languages
Experience : 1 Year
Location : Pune, Maharashtra

SR NO - 0021 HTML Developer
Skill :  Proficient understanding of web markup, including HTML5 and CSS3
Experience : 1 Year
Location : Delhi

SR NO - 0022 HTML Developer
Skill :  Proficient understanding of web markup, including HTML5 and CSS3
Experience : 1 Year
Location : Delhi

SR NO - 0023 UI Developer
Skill :  Proficiency in HTML, CSS, JavaScript, Understanding of server-side CSS and PHP.
Experience : 0-1 years
Location : Remote


Note : 
1. We are not associated with any company , consultancy , recruitment firm. Just sharing vacancies to help to get job for Web Developers.
2. Check comments for details.