teleren/devto huggingface dataset:
Unity Surecim
Published: 2022-06-12 22:24:59


![unity-post](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alk5nv39bio2z67vderx.png)


![unity-hikaye](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6y3g2wads5lf499nsnfm.png)

Ayrıca Uzay günü etkinliğimiz için Unity ile basit bir uzay savaş oyunu kodladım





Kulübümüzde gönüllü olarak Unity ile Mühendislik öğrencilerine 6 hafta süren ve haftada 5 saat süren oyun geliştirme temelleri eğitimi verdim.

Bu arada 2022 Model Uydu Yarışması ile ilgili basit bir simülasyon oyunu geliştirdim.

https://www.youtube.com/playlist?list=PLQQB30fiyEnT1zOstzUzpxwfmjIDbGLfq
Project Four (Python): Restaurant Recommender
Tags: python, beginners, opensource, programming
Published: 2022-06-12 22:14:00

## Why?
Hello, this is my fourth posted project. This project was created with the intention of exposing myself to Python, Stack Overflow, GitHub BASH, and the quicksort algorithm. 


![Image of Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xbsblc03iwk5c5tg1imu.png)

## How
This project uses a dataset provided by Codecademy, the quicksort algorithm, and various while loops to gather user input.

## Conclusion
I hope you enjoy this part of my learning journey.
[GitHub](https://github.com/shiahalan/restaurant-recommendation)

## Advice?
Advice is greatly appreciated (post in comment section).
"matrico" 0.1 and "The Numerical Schemer"
Tags: scheme, chickenscheme, schemelang, scientificcomputing
Published: 2022-06-12 22:04:59

1. Are you using numerical software packages like:
_MATLAB_, _Octave_, _Scilab_, _NumPy_, _R_, or _Julia_?
2. Are you interested in scientific computing algorithms, like:
_Matrix Multiplication_, _QR decomposition_/_QR factorzation_, or _Runge-Kutta Methods_?
3. And do you enjoy Lisps like:
_Common Lisp_, _Scheme_, _Clojure_, or _Racket_?

Enter `matrico` - a numerical Scheme module for, and fully written in, [CHICKEN Scheme](https://call-cc.org) - which is an educational project on building a matrix-based numerical function library.

If you are already using CHICKEN Scheme, you can install the `matrico` egg from the official repository via `chicken-install` and read the user reference here:

http://wiki.call-cc.org/eggref/5/matrico

If you are interested in the `matrico` Scheme sources, check out the github repository:

https://git.io/matrico

And if you want to know the What, Why, and How of `matrico`, follow the development blog:

http://numerical-schemer.xyz

Happy (Numerical) Scheming
Minimum Path Sum
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 22:00:47

Given a `m x n` `grid` filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.

**Note:** You can only move either down or right at any point in time.

**Example 1:**

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

**Input:** grid = \[\[1,3,1\],\[1,5,1\],\[4,2,1\]\]
**Output:** 7
**Explanation:** Because the path 1 → 3 → 1 → 1 → 1 minimizes the sum.

**Example 2:**

**Input:** grid = \[\[1,2,3\],\[4,5,6\]\]
**Output:** 12

**Constraints:**

*   `m == grid.length`
*   `n == grid[i].length`
*   `1 <= m, n <= 200`
*   `0 <= grid[i][j] <= 100`

**SOLUTION:**

    class Solution:
        def calcMin(self, grid, x, y, m, n):
            if (x, y) in self.cache:
                return self.cache[(x, y)]
            if (x, y) == (m - 1, n - 1):
                self.cache[(x, y)] = grid[m - 1][n - 1]
                return self.cache[(x, y)]
            right = float('inf')
            bottom = float('inf')
            if y < n - 1:
                right = self.calcMin(grid, x, y + 1, m, n)
            if x < m - 1:
                bottom = self.calcMin(grid, x + 1, y, m, n)
            currMin = min(right, bottom)
            self.cache[(x, y)] = grid[x][y] + currMin
            return self.cache[(x, y)]
        
        def minPathSum(self, grid: List[List[int]]) -> int:
            self.cache = {}
            return self.calcMin(grid, 0, 0, len(grid), len(grid[0]))
Combination Sum III
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 21:30:36

Find all valid combinations of `k` numbers that sum up to `n` such that the following conditions are true:

*   Only numbers `1` through `9` are used.
*   Each number is used **at most once**.

Return _a list of all possible valid combinations_. The list must not contain the same combination twice, and the combinations may be returned in any order.

**Example 1:**

**Input:** k = 3, n = 7
**Output:** \[\[1,2,4\]\]
**Explanation:**
1 + 2 + 4 = 7
There are no other valid combinations.

**Example 2:**

**Input:** k = 3, n = 9
**Output:** \[\[1,2,6\],\[1,3,5\],\[2,3,4\]\]
**Explanation:**
1 + 2 + 6 = 9
1 + 3 + 5 = 9
2 + 3 + 4 = 9
There are no other valid combinations.

**Example 3:**

**Input:** k = 4, n = 1
**Output:** \[\]
**Explanation:** There are no valid combinations.
Using 4 different numbers in the range \[1,9\], the smallest sum we can get is 1+2+3+4 = 10 and since 10 > 1, there are no valid combination.

**Constraints:**

*   `2 <= k <= 9`
*   `1 <= n <= 60`

**SOLUTION:**

    class Solution:
        def getSums(self, comb, target, p, res):
            if target < 0:
                return
            if p == len(comb):
                if target == 0:
                    res.append(comb[1:])
                return
            for i in range(comb[p - 1] + 1, 10):
                comb[p] = i
                self.getSums(comb, target - i, p + 1, res)
    
        
        def combinationSum3(self, k: int, n: int) -> List[List[int]]:
            comb = [0] * (k + 1)
            res = []
            self.getSums(comb, n, 1, res)
            return res
Hacks do Github - Mantendo repositório forkado sincronizado com o original
Tags: braziliandevs, github, beginners, programming
Published: 2022-06-12 21:30:36

![GitHub fork](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gy7zt8ieqmoijdek0maw.png) 

O Github é cheio de funcionalidades e o mais utilizado isso vocês já sabem e vamos continuar a série de "hacks" da plataforma que vão otimizar e melhorar sua experiência.

⚠️ Importante: Os prints que serão exibidos para exemplificar podem estar diferentes da interface do seu GitHub, por que sou muito adepto a extensões que melhoram a usabilidade e que ajudam no meu dia a dia. Partindo desse ponto peço que dê uma olhada [nesse artigo](https://dev.to/jhonywalkeer/extensoes-para-navegador-turbinando-sua-experiencia-no-github-538) antes. 

Depois que você forka um projeto no Github, você faz as alterações necessárias e envia um **Pull Request** para o repositório original.

Se você precisa fazer mais alguma alteração no mesmo repositório no futuro, mas já tem outras colaborações no repositório original, como você procede para manter seu repositório atualizado? Copia as alterações manualmente para o seu repositório? Apaga e forka novamente?

O Git é uma ferramenta excepcional e, quando você passa a conhecê-lo mais a fundo, vai ver que não vai precisar fazer mais nada manualmente quando ele é usado no seu projeto. Existe uma forma muito prática de sincronizar os dois repos, e vou mostrá-la agora mesmo!

O seu repositório forkado normalmente é adicionado como **origin** quando você faz o clone. Para sincronizar com o repositório principal, adicione esse repositório com outro nome (no caso do exemplo, **upstream**), com o comando abaixo:

```
git remote add upstream [ENDEREÇO DO REPOSITÓRIO PRINCIPAL]
```

Substituindo [ENDEREÇO DO REPOSITÓRIO PRINCIPAL] pelo endereço do repositório.

Depois, para sincronizar os repositórios, execute o comando:

```
git fetch upstream
```
Finalmente, só dar merge na branch **master**:

```
git merge upstream/master
```

A sincronização do fork só atualiza a cópia local do repositório. Para atualizar a bifurcação no GitHub.com, você precisa fazer push das alterações.


Fontes onde pesquisei esse conteúdo:

- https://docs.github.com/pt/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork
I need help. TypeError: Cannot read properties of undefined (reading 'current')
Tags: help, react, nextjs, useref
Published: 2022-06-12 21:14:30

I need help.

TypeError: Cannot read properties of undefined (reading 'current').

This is code ⬇️⬇️
 

```
function QuizLogic(showScore, totalTime, fetchQuestions, loading, currentQuestion, questions, handleAnswerOptionClick, countDownBarWith) {
  const router = useRouter();


  if (loading.current && showScore) {
    return (
      <button
        onClick={() => router.push('/SaveComponent')}
        type="button"
      >
        See score
      </button>
    );
```



https://github.com/dragoslavIvkovic/Test-your-JS-skills---NEXT.JS-REDUX-MONGODB/blob/main/components/QuizLogic.js
Testing: Better Specs
Tags: javascript, beginners, programming, testing
Published: 2022-06-12 21:07:47

Even if you plan on never using Ruby, this is one website you have to visit:

[https://www.betterspecs.org/](https://www.betterspecs.org/)

And it just happens someone made one for Javascript:

[https://bettertests.js.org/](https://bettertests.js.org/)

For either one, the syntax might be of Ruby or Javascript, but the ideas are more about testing than about language.

Read them, bookmark them, and then come back after a while.
This is what I’ve done, and today I’ve already found things to change on my tests.

---

Today, from me, just that you should read and go to the discussions on each one you don’t agree with (and maybe check out even those you agree with!).

---

Cover Image by [Konstantin Kolosov](https://pixabay.com/users/kkolosov-2105326/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2030261) from [Pixabay](https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2030261)
Construct String from Binary Tree
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 21:00:48

Given the `root` of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with the preorder traversal way, and return it.

Omit all the empty parenthesis pairs that do not affect the one-to-one mapping relationship between the string and the original binary tree.

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/05/03/cons1-tree.jpg)

**Input:** root = \[1,2,3,4\]
**Output:** "1(2(4))(3)"
**Explanation:** Originally, it needs to be "1(2(4)())(3()())", but you need to omit all the unnecessary empty parenthesis pairs. And it will be "1(2(4))(3)"

**Example 2:**

![](https://assets.leetcode.com/uploads/2021/05/03/cons2-tree.jpg)

**Input:** root = \[1,2,3,null,4\]
**Output:** "1(2()(4))(3)"
**Explanation:** Almost the same as the first example, except we cannot omit the first parenthesis pair to break the one-to-one mapping relationship between the input and the output.

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 104]`.
*   `-1000 <= Node.val <= 1000`

**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 tree2str(self, root: Optional[TreeNode], isLeft = False, isRight = False) -> str:
            if root.left and root.right:
                return "{}({})({})".format(root.val, self.tree2str(root.left), self.tree2str(root.right))
            if root.left:
                return "{}({})".format(root.val, self.tree2str(root.left))
            if root.right:
                return "{}()({})".format(root.val, self.tree2str(root.right))
            return "{}".format(root.val)
Migrate your entire development pipeline to the cloud easily With AWS for games.
Tags: aws, games, cloud, studio
Published: 2022-06-12 20:57:30

Benefits of AWS for Games Tech Landing Zone
1. support packages that include AWS Partner consulting.
2. AWS Promotional Credits
3. Training Materials



Click the below link to get started today.

https://pages.awscloud.com/GLOBAL_IND_PA_landing-zone-announcement_01-Learn.html
Ng-News: Episode 22/23
Tags: webdev, javascript, angular, frontend
Published: 2022-06-12 20:57:02

As usual, the week after a new major release comes with many video session, discussing the new features.

{% embed https://youtu.be/cgmy1fBoWDg %}

## Angular Release Party

We had the official Angular release party with Angular core developers, where they spent quite some time explaining the reasoning behind the implementation of types in typed forms. For example, a `FormControl`'s value is a union type of `undefined`, `null`, and the actual value. Or you have to pass a `FormControl<string>` to a `FormGroup` and not just `string`.

{% embed https://youtu.be/DVo7xttP_gg %}

## ngGaming

Another video with Angular team members was #ngGaming, with Mark and Jeremy. A highlight was Jeremy mentioned that the idea of an automatic change detection with zone.js might be up for a review. There will be a talk at the upcoming ng-conf where we will get more information.

{% embed https://youtu.be/YYYNSjbe_xo %}

## The State of the Angular Ecosystem

And then, we had "The State of the Angular Ecosystem," with various panelists.

For example, Mike Ryan gave an outlook on NgRx, and Juri Strumpflohner announced the release of nx 14.2, including finally Angular 14. 

From Cypress, there was Jordan Powell, talking about their latest major relase 10. The Cypress UI comes with a new look and runs both E2E and component tests. Component tests for Angular are not available yet, but the Cypress team is working on that.

Ben Lesh, from RxJs, mentioned that everybody should make sure to update to version 7.5.4. It contains significant performance improvements and he also gave an outlook for the upcoming version 8. It will consist of multiple libraries, so that a project can only use the Observables but nothing else.

Other than, there was Eric Slack repesenting the "community" and Shmuela Jacobs and Lars Nielsen for learning aspects. Lars works on a free nx book, and he invites everybody to contribute various questions.

{% embed https://twitter.com/LayZeeDK/status/1533924429213876230 %}

{% embed https://youtu.be/W90EopFqUH4 %}
Day 65: The forced break
Published: 2022-06-12 20:38:44

Hi!
Yesterday I was talking about taking a break for refreshment but I but it was still plan I expected to cheat maybe get back to coding but instead I got a forced break where the internet was down for the whole day at home so I couldn't browse the web or use social media so I was left with just the PC with nothing to do. I had a copy of Clean code the Book by Robert C Martin so I started reading and it's a good one maybe I will continue looking into some tips mentioned there. Today I didn't do anything and I will go to sleep early as I expect tomorrow to be a long day of mockups designs in Figma. I plan to continue the series about Heroku and write an article or two if possible and find a project to add some feature to.

Signing off...
Maximum Binary Tree II
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 20:30:41

A **maximum tree** is a tree where every node has a value greater than any other value in its subtree.

You are given the `root` of a maximum binary tree and an integer `val`.

Just as in the [previous problem](https://leetcode.com/problems/maximum-binary-tree/), the given tree was constructed from a list `a` (`root = Construct(a)`) recursively with the following `Construct(a)` routine:

*   If `a` is empty, return `null`.
*   Otherwise, let `a[i]` be the largest element of `a`. Create a `root` node with the value `a[i]`.
*   The left child of `root` will be `Construct([a[0], a[1], ..., a[i - 1]])`.
*   The right child of `root` will be `Construct([a[i + 1], a[i + 2], ..., a[a.length - 1]])`.
*   Return `root`.

Note that we were not given `a` directly, only a root node `root = Construct(a)`.

Suppose `b` is a copy of `a` with the value `val` appended to it. It is guaranteed that `b` has unique values.

Return `Construct(b)`.

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/08/09/maxtree1.JPG)

**Input:** root = \[4,1,3,null,null,2\], val = 5
**Output:** \[5,4,null,1,3,null,null,2\]
**Explanation:** a = \[1,4,2,3\], b = \[1,4,2,3,5\]

**Example 2:**

![](https://assets.leetcode.com/uploads/2021/08/09/maxtree21.JPG)

**Input:** root = \[5,2,4,null,1\], val = 3
**Output:** \[5,2,4,null,1,null,3\]
**Explanation:** a = \[2,1,5,4\], b = \[2,1,5,4,3\]

**Example 3:**

![](https://assets.leetcode.com/uploads/2021/08/09/maxtree3.JPG)

**Input:** root = \[5,2,3,null,1\], val = 4
**Output:** \[5,2,4,null,1,3\]
**Explanation:** a = \[2,1,5,3\], b = \[2,1,5,3,4\]

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 100]`.
*   `1 <= Node.val <= 100`
*   All the values of the tree are **unique**.
*   `1 <= val <= 100`

**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 insertIntoMaxTree(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:
            curr = TreeNode(val = val)
            if not root or val > root.val:
                curr.left = root
                root = curr
            else:
                root.right = self.insertIntoMaxTree(root.right, val)
            return root
Univalued Binary Tree
Tags: leetcode, dsa, theabbie
Published: 2022-06-12 20:00:44

A binary tree is **uni-valued** if every node in the tree has the same value.

Given the `root` of a binary tree, return `true` _if the given tree is **uni-valued**, or_ `false` _otherwise._

**Example 1:**

![](https://assets.leetcode.com/uploads/2018/12/28/unival_bst_1.png)

**Input:** root = \[1,1,1,1,1,null,1\]
**Output:** true

**Example 2:**

![](https://assets.leetcode.com/uploads/2018/12/28/unival_bst_2.png)

**Input:** root = \[2,2,2,5,2\]
**Output:** false

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 100]`.
*   `0 <= Node.val < 100`

**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 isUnivalTree(self, root: Optional[TreeNode]) -> bool:
            l = True
            r = True
            if root:
                if root.left and (root.val != root.left.val or not self.isUnivalTree(root.left)):
                    l = False
                if root.right and (root.val != root.right.val or not self.isUnivalTree(root.right)):
                    r = False
            return l and r
rstfilter VSCode extension for your new Ruby development experience
Published: 2022-06-12 19:53:21

Today I released new VSCode extension [Ruby's rstfilter extension](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.ruby-rstfilter).

This extension provides new Ruby development experience:

* You can see the execution results line by line on the editor without launching a ruby command manually. You only need to *start* rstfilter command by `Ctrl+Alt+S`, and see the results of each lines and outputs on the bottom.

![editor demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wnfwrte0cix93nlgf8mx.png)
 
* You can see the expression results by hovering the mouse pointer on the expression.

![hover demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmx9fcntql9bjxbgb2j2.png)

You don't need to write `p`/`pp` methods.
You don't need to use irb/pry REPL tools.
You only need to save the file and see the results immediately.

I hope it is useful for:

* Ruby newbie who want to check the results frequently.
* Test developers
* Prototyping developers for apps/libs

For the libraries, the following traditional idiom can be used.

```ruby
class XXX
   ...
end

if $0 == __FILE__
  # Try with XXX.
  # This test code will be ignored when the file is required.
end
```

Enjoy your Ruby programming!

----

Similar projects:

* xmpfilter in [rcodetools](https://rubygems.org/gems/rcodetools/)
* [JoshCheek/seeing_is_believing: Displays the results of every line of code in your file](https://github.com/JoshCheek/seeing_is_believing)
* [Quokka - JavaScript and TypeScript playground in your editor](https://quokkajs.com/) 
* [Duroktar/Wolf: Wolf is a VsCode extension that enables live inspection of Python code in the editor.](https://github.com/Duroktar/Wolf) 

----

Update: v0.0.2 changes the interface. *Save* doesn't kick the rstfilter but you need to run rstfilter explicitly by `Ctrl+Alt+S`. Please add `Alt` to your `Ctrl-S` saving :)
How to Install and Use Curl on Ubuntu 22.04
Published: 2022-06-12 19:51:44

## What is cURL?
Curl is a command-line utility that allows users to create network requests. Curl is accessible on Windows, Linux, and Mac, making it the go-to choice for developers across all platforms.

A cURL is computer software and command-line tool used to make requests for different protocols. But the most popular usage with the curl command is making HTTP post requests. Even the curl command-line tool is created for the Linux operating systems it is cross-platform and can be used for Windows, MacOSX, BSD, etc. In this tutorial, we will learn how to make different HTTP POST requests by using curl.

## Installing Curl on Ubuntu
If you get an error message saying curl command not found when trying to download a file with curl, it means that the curl the package is not installed on your Ubuntu machine.

curl is included in the default Ubuntu 22.04 repositories. The installation is pretty straightforward:
```
sudo apt update
sudo apt install curl
```
Once the installation is complete, verify it by typing curl in your terminal:
```
curl
```
## Using curl
Once installed, you can test the curl command by sending requests to https://google.com using curl -I -L https://google.com command as shown below.
```
curl -I -L https://google.com
```
-I: Fetch the headers only. More on curl Main Page.

-L: If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request in the new place.

Another common use case of curl is to download files from password-protected FTP servers:
```
curl -u FTP_USERNAME:FTP_PASSWORD ftp://example.com/file.tar.gz
```
**Thank you** for reading this article.