teleren/devto huggingface dataset:
Fish Shell & Alacritty
Published: 2022-06-18 13:06:36

Recently, I've been using the fish shell (not sure why it took me so long) but I've always used zsh.
I do not script or anything like that so I do not have a "real" reason why I choose my shell.

I always use zsh because I just like the syntax, highlighting, autocomplete and powerline plugins.

I stumbled upon fish because I decided to install Garuda Dr46onized and love the fish shell because it has all those things built in. But configuring took some time to get used to even though it is supposed to be easier.
It is like pre-calculus is zsh and calculus is fish.
You learn all the hardwork first and then you use a different type of method that simplifies everything.

What shells do you guys use?

Edit:

I am used to binding keys with bindkeys command but fish is a bit different.
You would need to go to the file

/usr/share/fish/functions/fish_vi_key_bindings.fish to create your custom keys

two custom bindkeys I use often is to open up ncmpcpcc with the visualier and also neomutt

for the neomutt I use the Ctrl+e keys
to do this
I just input 
`bind -s --preset -M insert \ce 'neomutt'`

for the ncmpcpp I use the Ctrl+n
`bind -s --preset -M insert \cn 'ncmpcpp -S visualizer'`

If you also want to have your own personal greeting whenever fish is executed.

I would create a fish_greeting.fish in ~/.config/fish/functions/

enter the following code
`function fish_greeting
     echo "Hello World"
neofetch # to execute the command
mpc # to see the current song

end`
Introduction to Data Structures and Algorithms
Published: 2022-06-18 13:04:46

For some of us, especially those new to programming,hearing algorithms and data structures seems like a complex thing. Well, the good news is that this article will break it down in the simplest way possible.

To elaborate on what **data structures** are, they are containers for storing data to allow easy manipulation. Think of them as a way of organizing data so that one is able to operate. There are different types of data structures. One type is primitive data structures.These are inbuilt data structures such as _int,boolean, arrays, and objects_. There are also abstract data structures are defined by a set of operations and values. They include _links, trees, graphs and stacks_.  
 
To define **algorithms**, they are a set of instructions to help you perform an operation. An example of where one would apply algorithms is in _baking a cake. You prepare the ingredients and follow a step by step process to achieve a result._ 

There are different properties that an algorithm possesses. 

- They include having an **input**. _In the cake example, the input is the ingredients used to bake the cake._

- An algorithm must also have an **output**. _In our example, the output is the baked cake_.

- An algorithm must have every step clearly defined. _For example, define all the steps involved in baking the cake_.

-  Every algorithm should have a defined number of steps from beginning to the end. _At some point, we have to finish baking the cake._
 
- For an algorithm to be considered effective, every step should produce a correct output. _For example, we cannot follow the steps of baking a cake then produce pizza, it has to be cake._

View data structures as applicable in every area of our lives and as being used to enhance our effectiveness in performing tasks.
Dual Boot Grub-Customizer
Published: 2022-06-18 13:01:43

It took me a while to figure this out. I always had Windows Boot Manager on my grub menu, but when I added a theme. It disappeared.

To fix this:

In the terminal

sudo os-prober #if it detects it then run

update-grub

if update-grub isn't found. Just install it

sudo pacman -S update-grub
yay -S update-grub

I got a warning that os-prober won't detect it when I ran the command.
I would go to 

/etc/default/grub (this is a file) you need to edit it
Rotate List
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 13:00:43

Given the `head` of a linked list, rotate the list to the right by `k` places.

**Example 1:**

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

**Input:** head = \[1,2,3,4,5\], k = 2
**Output:** \[4,5,1,2,3\]

**Example 2:**

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

**Input:** head = \[0,1,2\], k = 4
**Output:** \[2,0,1\]

**Constraints:**

*   The number of nodes in the list is in the range `[0, 500]`.
*   `-100 <= Node.val <= 100`
*   `0 <= k <= 2 * 109`

**SOLUTION:**

    # Definition for singly-linked list.
    # class ListNode:
    #     def __init__(self, val=0, next=None):
    #         self.val = val
    #         self.next = next
    class Solution:
        def rotateRight(self, head: Optional[ListNode], k: int) -> Optional[ListNode]:
            if not head:
                return head
            curr = head
            n = 1
            while curr and curr.next:
                curr = curr.next
                n += 1
            k = k % n
            curr.next = head
            curr = head
            for i in range(n - k - 1):
                curr = curr.next
            head = curr.next
            curr.next = None
            return head
How to contribute to Angular - encouraging resources 🔗
Tags: angular, opensource
Published: 2022-06-18 12:39:22

**Many of us think about contributing to Angular (or to any open source), but don't know how to start or are too afraid. The following resources will tell you how and encourage you to start:**

### Success stories of becoming an Angular contributor
- [How I Became an Angular Contributor 🙃 (blogpost by me, Krzysztof Platis)] (https://dev.to/krisplatis/how-i-became-the-angular-contributor-2066) 
- [How I Fixed a Bug in Angular (blogpost by Dmitry Drobyshev)](https://javascript.plainenglish.io/how-i-fixed-a-bug-in-angular-1140b62e0194)

### Tutorials how to start
- [How to Contribute to Angular (webinar with Mark Thompson and Tracy Lee)](https://www.youtube.com/watch?&v=JszhalPlcAA)  
- [Become an Angular contributor: Where to Start (blogpost by Michael Prentice)](https://medium.com/ngconf/become-an-angular-contributor-where-to-start-c93dfa16dfc0) 

### Official Angular documentation how to contribute
- [Angular Contributing Guidelines](https://angular.io/contribute)
Flatten Nested List Iterator
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 12:30:41

You are given a nested list of integers `nestedList`. Each element is either an integer or a list whose elements may also be integers or other lists. Implement an iterator to flatten it.

Implement the `NestedIterator` class:

*   `NestedIterator(List<NestedInteger> nestedList)` Initializes the iterator with the nested list `nestedList`.
*   `int next()` Returns the next integer in the nested list.
*   `boolean hasNext()` Returns `true` if there are still some integers in the nested list and `false` otherwise.

Your code will be tested with the following pseudocode:

initialize iterator with nestedList
res = \[\]
while iterator.hasNext()
    append iterator.next() to the end of res
return res

If `res` matches the expected flattened list, then your code will be judged as correct.

**Example 1:**

**Input:** nestedList = \[\[1,1\],2,\[1,1\]\]
**Output:** \[1,1,2,1,1\]
**Explanation:** By calling next repeatedly until hasNext returns false, the order of elements returned by next should be: \[1,1,2,1,1\].

**Example 2:**

**Input:** nestedList = \[1,\[4,\[6\]\]\]
**Output:** \[1,4,6\]
**Explanation:** By calling next repeatedly until hasNext returns false, the order of elements returned by next should be: \[1,4,6\].

**Constraints:**

*   `1 <= nestedList.length <= 500`
*   The values of the integers in the nested list is in the range `[-106, 106]`.

**SOLUTION:**

    # """
    # This is the interface that allows for creating nested lists.
    # You should not implement it, or speculate about its implementation
    # """
    #class NestedInteger:
    #    def isInteger(self) -> bool:
    #        """
    #        @return True if this NestedInteger holds a single integer, rather than a nested list.
    #        """
    #
    #    def getInteger(self) -> int:
    #        """
    #        @return the single integer that this NestedInteger holds, if it holds a single integer
    #        Return None if this NestedInteger holds a nested list
    #        """
    #
    #    def getList(self) -> [NestedInteger]:
    #        """
    #        @return the nested list that this NestedInteger holds, if it holds a nested list
    #        Return None if this NestedInteger holds a single integer
    #        """
    
    class NestedIterator:
        def __init__(self, nestedList: [NestedInteger]):
            self.arr = []
            self.expand(nestedList)
            self.i = 0
            
        def expand(self, nestedList):
            for nl in nestedList:
                if nl.isInteger():
                    self.arr += [nl.getInteger()]
                else:
                    self.expand(nl.getList())
        
        def next(self) -> int:
            self.i += 1
            return self.arr[self.i - 1]
        
        def hasNext(self) -> bool:
            return self.i < len(self.arr)
    
    # Your NestedIterator object will be instantiated and called as such:
    # i, v = NestedIterator(nestedList), []
    # while i.hasNext(): v.append(i.next())
Procurar emprego é um trabalho.
Tags: github, rh, career
Published: 2022-06-18 12:25:41


Pessoas desenvolvedoras precisam entender que procurar trabalho é um trabalho.

Nos dedicamos tanto para ter habilidades técnicas e não nos dedicamos em analisar as empresas.

Assim como elas tem o interesse em saber cada detalhe nosso, temos que ter o mesmo interesse por elas.

Tente pedir para falar com o time que vai trabalhar, não se limite a conversar apenas com RH ou gerência de engenharia, tem que falar com seus pares, com quem serão seu ponto de contato diariamente e que são a cultura da empresa.

Já no processo seletivo você precisa conhecer a faixa salarial, os passos do processo seletivo, isso é todas as etapas possíveis que por ventura terá que percorrer.

Se você está em migração de carreira, lembre-se de ressaltar seus conhecimentos prévios, em especial os que não são relacionados a tecnologia, pois essas habilidades são bem importantes em times multidisciplinares.

Se você procura uma vaga junior, possivelmente não possui trabalhos ou portifólio no github, mas procure ter um resumo sobre os conhecimentos teóricos e desafios que já teve em seus exercícios com as ferramentas que usou.

Participar de eventos e discussões técnicas é importante.

Eu, antes de vir trabalhar na empresa que estou, já aprendia sobre a empresa, sobre as pessoas que aqui trabalhavam, eu stalkeava mesmo na cara dura, o interessado sou eu.

E ai me conta quais foram suas experiências na procura de um emprego ou o emprego te achou?

 #github #tecnologia #engenharia #trabalho #vaga #carreira #rh #empresas
GSoC 2022 CircuitVerse | Week 1 Report
Tags: webdev, javascript, opensource, programming
Published: 2022-06-18 12:08:37

Google Summer of Code 2022 Coding period start on 13 June. The previous week, I started working on gitlab and SSO integration in the CircuitVerse main platform.

Check out my previous blog: [here](https://medium.com/p/78cf1265b74f).

## Week 1 (13 June — 18 June)
I was facing some issues in gitlab integration, after the mentor meet we concluded that it was the version of omniauth-gitlab gem that was causing an error. It was v2.0.0 and should be v4.0.0 but the gem is dependent on the omniauth gem that was also not updated due to which gitlab-omniauth gem was not getting updated. So we concluded to update the omniauth gem first along with smoothing the initial 3rd-Party Authentication.

I updated the omniauth and got it merged. [PR](https://github.com/CircuitVerse/CircuitVerse/pull/3071)

After updating my gitlab branch with master, I was able to update the gitlab gem without any error and commit the changes according to the new version of the omniauth gem. After the review of the PR and changing some bot suggestions. The [PR](https://github.com/CircuitVerse/CircuitVerse/pull/3154) got finally merged.

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

After getting it merged, I started working on SSO PR. I update it with the master branch and mark the PR from WIP as ready for review.

## Next Week Plan
- I will be completing the SSO + Keycloack integration in the next week.
- I will start with the new feature in CircuitVerse: Weekly Contest.

## Conclusion
This week was one of my best productive weeks ever. I learned a lot and was able to fulfill my first week's deliverable as mentioned in the Proposal.
IntelliJ で Kotlin を実行する
Tags: kotlin, intellij
Published: 2022-06-18 12:03:53


## why

Kotlin で API サーバーを立てて、ピンポン開発をしたかった

---

## 統合開発環境 InteliJ のインストール

VSCode と違って実行ボタンや言語本体もついてくる
高機能なエディタ。

https://qiita.com/okmt_okmt_/items/b1cd1cd3084cfbfc4ca6

有料版のイメージが強かったが、無料でもコミュニティ版は使える。

Java に近い言語は VSCode より InteliJ の方が補完が聞くらしい。

https://www.jetbrains.com/idea/download/#section=linux

ここからコミュニティバージョンをインストールする。

---

## Plugins/Kotlin をインストール

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

Kotlin の補完のためにインストールする 

## Kotlin Project を作成する

Kotlin のプラグインを導入

## Projects/NewProject を作成

https://pleiades.io/help/idea/get-started-with-kotlin.html#new-kotlin-project-no-frameworks

この IntelliJ 公式のガイドをみる。

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2azwozrczoxquoq4r4ki.png)
 
* プロジェクト名を kotlin1
* location を root/ のソースコードの場所
* 言語を Kotlin 選択
* ビルドシステムは IntelliJ を選択
* JDK はサンプルに沿って Amazon Corretto 18 を選択
* サンプルコードの生成を ON にする

ここで言語に Kotlin を選択することで
IntelliJ 内部の Kotlin が使えるようになると解釈する。

---

## 生成されたサンプルコードをみる

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

kotlin1/src/main/kotlin/

ここの

Main.kt

このファイルを編集する

```kotlin
fun main(args: Array<String>) {
    println("Hello World!")

    // Try adding program arguments via Run/Debug configuration.
    // Learn more about running applications: https://www.jetbrains.com/help/idea/running-applications.html.
    println("Program arguments: ${args.joinToString()}")
}
```

中身には 配列を受け取って Hello World とその配列を出力する
そんなコードが書かれているようだ。

しかし main への引数の渡し方はわからない。そもそも渡せるのか？
形式的なものかもしれない

---

## run して出力をみる

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

左上の run のタブから
run Main.kt を選んで実行する。

下の統合ターミナル？に出力された。

```php
Hello World!
Program arguments: 

Process finished with exit code 0
```

引数の渡し方はわからないが、実行はできた。
Splitting a 3x3 matrix into all possible 2x2 matrices using PHP
Tags: php, beginners
Published: 2022-06-18 12:01:08

## <u>Creating the 3x3 matrix</u>
To create a 3x3 matrix, begin with an array

```
$a = array(array(1,5,7),array(7,3,5),array(2,6,9));
$rows = count($a);
$cols = count($a[0]);

for ($k = 0; $k < $rows; $k++){
    for ($j = 0; $j < $cols; $j++){
        echo ($a[$k][$j]."  ");
    }
    echo ("<br>");
}
```
This will result in

```
1 5 7
7 3 5
2 6 9
```


## **<u>Getting 2x2 matrices</u>**
There are 4 possible 2x2 matrices that could be derived from the 3x3 matrix above. 

- Begin with row index zero and column index zero and reduce the number of rows and columns by one. (since its a 3x3 matrix we wish to reduce to a 2x2, the row and column both reduce by one)

- To create another matrix, Increment either the row by one. Repeat this step with the column, this time holding the row constant.

The first 2x2 matrix is begins at k = 0 and j = 0. However, the arrays are reduced by one from both ends like seen in the code:

```
for ($k = 0; $k < $rows-1; $k++){
    for ($j = 0; $j < $cols-1; $j++){
        echo ($a[$k][$j]." ");
    }
    echo ("<br>");
}
```
The output of this is:

```
1 5
7 3
```
The maximum and minimum values of this matrix are 7 and 1 respectively.

The second 2x2 matrix has the row starting at k=0 and ending at k < row-1 but the column starts at j =1 and ends at j < cols as shown below:
```
for ($k = 0; $k < $rows-1; $k++){
    for ($j = 1; $j < $cols; $j++){
        echo ($a[$k][$j]." ");
    }
    echo ("<br>");
}
```
The output of this is:

```
5 7
3 5
```
The maximum and minimum values of this matrix are 7 and 3 respectively.

Here, the rows start at k =1 while the columns start at j =0. 
```
for ($k = 1; $k < $rows; $k++){
    for ($j = 0; $j < $cols-1; $j++){
        echo ($a[$k][$j]." ");
    }
    echo ("<br>");
}
```
The output of this is:
```
7 3
2 6
```
The maximum and minimum values of this matrix are 7 and 2 respectively.

Now, both rows and columns start at 1.
```
for ($k = 1; $k < $rows; $k++){
    for ($j = 1; $j < $cols; $j++){
        echo ($a[$k][$j]." ");
    }
    echo ("<br>");
}

```
The output of this is:
```
3 5
6 9

```
The maximum and minimum values of this matrix are 9 and 3 respectively.


**<u>The Minimum and Maximum values Matrices</u>**

To merging the minimum values to form other matrix of minimum values using arrays, use

```
#minimum value
echo "<br>";
$b =array(array(1,3),array(2,3));
$rows_b = count($b);
$cols_b = count($b[0]);
for ($i = 0; $i < $rows_b; $i++){
    for ($l = 0; $l < $cols_b; $l++){
        echo ($b[$i][$l]."  ");
    }
    echo ("<br>");
}
```
This results to a matrix of the form

```
1 3
2 3

```
The same concept is applied to maximum values using

```
$c =array(array(7,7),array(7,9));
$rows_c = count($c);
$cols_c = count($c[0]);
for ($m = 0; $m < $rows_c; $m++){
    for ($n = 0; $n < $cols_c; $n++){
        echo ($c[$m][$n]."  ");
    }
    echo ("<br>");
}
```
resulting in the 2x2 matrix below.
```
7 7
7 9

```
Number of Good Pairs
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 12:00:55

Given an array of integers `nums`, return _the number of **good pairs**_.

A pair `(i, j)` is called _good_ if `nums[i] == nums[j]` and `i` < `j`.

**Example 1:**

**Input:** nums = \[1,2,3,1,1,3\]
**Output:** 4
**Explanation:** There are 4 good pairs (0,3), (0,4), (3,4), (2,5) 0-indexed.

**Example 2:**

**Input:** nums = \[1,1,1,1\]
**Output:** 6
**Explanation:** Each pair in the array are _good_.

**Example 3:**

**Input:** nums = \[1,2,3\]
**Output:** 0

**Constraints:**

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

**SOLUTION:**

    class Solution:
        def numIdenticalPairs(self, nums: List[int]) -> int:
            n = len(nums)
            valIndexes = {}
            total = 0
            for i in range(n):
                valIndexes[nums[i]] = valIndexes.get(nums[i], 0) + 1
            for val in valIndexes:
                freq = valIndexes[val]
                total += freq * (freq - 1) // 2
            return total
List of Work Samples related to the Position you Apply...
Published: 2022-06-18 11:54:05

Hi guys, it's always important to be ready with a work sample related to the position you applying for in the tech field.

Here is the list I have curated for you 😇: 

1. Graphics Design - your portfolio of past creative pieces 
2. Data Science - your best research paper and analysis
3. Blog Writer - your best blog or written piece
4. Mechanical Engineer - your best drawing and CAD model
5. Electrical Engineering - your best PCB schematic and circuit designs
6. Web Developer - links of your past live website or screen shots of past work
7. Business Development - Set of Example outreach emails
8. Sales - example workflow chart for your B2B/B2C outreach strategy or email template or cold call script sample
9. Marketing Strategist - your best marketing research and implementation plan
10. Social Media - a social media audit/plan
11. Human Resources - your example job listing template, workshop presentation, interview questions and/or plan, outreach email
etc

NOTE: I know that not everyone may have past work to present, thus this is a time to take the first step in creating something thoughtful. This will demonstrate your WILLINGNESS to take the extra step and INITIATIVE to demonstrating your POTENTIAL 😊

Follow me on Social Medias : [Linktree](https://linktr.ee/keshavgbpecdel)
Edit and synchronize subtitles in react.
Tags: javascript, subtitle, transcript, react
Published: 2022-06-18 11:53:30

Hello.

Today I want to introduce you to a very practical react library.
[react-subtitle-editor](https://www.npmjs.com/package/react-subtitle-editor)

If you want an interface that can easily modify and sync subtitles, install [this package](https://www.npmjs.com/package/react-subtitle-editor).

Enjoy!
Html lists
Published: 2022-06-18 11:41:26

**HTML lists** are used to group together related pieces of information. All lists may contain one or more list elements. There are three different types of HTML lists:

1. - Unordered List - bulleted List `<ul>`
2. - Ordered List - numbered List `<ol>`
3. - Description List - definition List `<dl>`

**HTML Unordered Lists** - An unordered list is a collection of related items that have no special order. The Unordered list starts with `<ul>` tag and list items start with the`<li>` tag. Each item in the list is marked with a bullet.

```html
<ul>  
 <li>Michael</li>  
 <li>Pamela</li>  
 <li>Dwight</li>  
</ul>
```
 

**HTML Ordered Lists** - In the ordered HTML lists, all the list items are marked with numbers by default. It is known as numbered list also. The ordered list starts with `<ol>` tag. The numbering starts at one and is incremented by one for each list element tagged with `<li>`.

```html
<ol>  
 <li>Angela</li>  
 <li>Oscar</li>  
 <li>Kevin</li>  
</ol>
```

The type attribute for `<ol>` tag is used to specify the type of numbering you want to use:

`<ol type = "1">` - Default-Case Numerals.
`<ol type = "I">` - Upper-Case Numerals.
`<ol type = "i">` - Lower-Case Numerals.
`<ol type = "A">` - Upper-Case Letters.
`<ol type = "a">` - Lower-Case Letters.

**HTML Description Lists** - A description list is a list of terms, with a description of each term.
 
`<dl>` - defines a description list
`<dt>` - defines a term in a description list
`<dd>` - describes the term in a description list

Example:

```html
<dl>
  <dt>Michael</dt>
  <dd>- world's best boss</dd>
  <dt>Pam</dt>
  <dd>- the office receptionist</dd>
</dl>
```
GitHub Login Page
Tags: webdev, discuss, tutorial, productivity
Published: 2022-06-18 11:37:29

🌍Live Preview [Click here](https://deepakydv9315.github.io/github-login-page/#)
🎥 YouTube video:[Watch Now](https://www.youtube.com/watch?v=sgHiz51uCgI&ab_channel=sycocoders)
🤝 Follow me on [Instagram](https://www.instagram.com/syco_coders/) || [GitHub](https://github.com/deepakydv9315)

GitHub login page using HTML and CSS. 

{% youtube https://www.youtube.com/watch?v=sgHiz51uCgI&ab_channel=sycocoders %}


Hope you enjoy ;)
Happy coding.
Valid Anagram
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 11:30:38

Given two strings `s` and `t`, return `true` _if_ `t` _is an anagram of_ `s`_, and_ `false` _otherwise_.

An **Anagram** is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.

**Example 1:**

**Input:** s = "anagram", t = "nagaram"
**Output:** true

**Example 2:**

**Input:** s = "rat", t = "car"
**Output:** false

**Constraints:**

*   `1 <= s.length, t.length <= 5 * 104`
*   `s` and `t` consist of lowercase English letters.

**Follow up:** What if the inputs contain Unicode characters? How would you adapt your solution to such a case?

**SOLUTION:**

    class Solution:
        def isAnagram(self, s: str, t: str) -> bool:
            ctr = {}
            for c in s:
                ctr[c] = ctr.get(c, 0) + 1
            for c in t:
                if c in ctr:
                    ctr[c] -= 1
                else:
                    return False
            for val in ctr.values():
                if val != 0:
                    return False
            return True