teleren/devto huggingface dataset:
Simplified Fractions
Tags: leetcode, dsa, theabbie
Published: 2022-06-08 21:00:48

Given an integer `n`, return _a list of all **simplified** fractions between_ `0` _and_ `1` _(exclusive) such that the denominator is less-than-or-equal-to_ `n`. You can return the answer in **any order**.

**Example 1:**

**Input:** n = 2
**Output:** \["1/2"\]
**Explanation:** "1/2" is the only unique fraction with a denominator less-than-or-equal-to 2.

**Example 2:**

**Input:** n = 3
**Output:** \["1/2","1/3","2/3"\]

**Example 3:**

**Input:** n = 4
**Output:** \["1/2","1/3","1/4","2/3","3/4"\]
**Explanation:** "2/4" is not a simplified fraction because it can be simplified to "1/2".

**Constraints:**

*   `1 <= n <= 100`

**SOLUTION:**

    class Solution:
        def gcd(self, a, b):
            while b:
                a, b = b, a % b
            return a
        
        def simplifiedFractions(self, n: int) -> List[str]:
            op = set()
            for j in range(1, n + 1):
                for i in range(1, j):
                    mul = self.gcd(i, j)
                    op.add("{}/{}".format(i // mul, j // mul))
            return op
Java runtime management automation with SDKMAN! .sdkmanrc
Tags: java, maven, programming, productivity
Published: 2022-06-08 20:54:07

## 👉 Intro

Recently I had to onboard a new programmer in our Team. His first programming experience is to add a feature to an existing Java based SDK Project.

Our culture in the team is to use Open JDK flavors of Java,...

> still that was not mentionned in any `README.md`.

And once I asked him if he had installed his java runtime he answered me : 

> _"Yes, take a look, I've just installed the AWS's one."_

At this moment I told my self and to the team that we should enhance this part of the onboarding process...

> **so people would know on which distribution and version of our Java runtime we should work, as part of project's source code itself.**

The same week, I saw the following tweet : 

{% tweet 1525439674939998209 %}

That was showing how to achieve this without having to write any documentation and by **providing the desired target runtime... next to source code** ❣️

👉 The purpose of this post is to show how to achieve this within a live demo.

## 🍿 Demo

{% youtube nPg5d1YOKjk %}

## 🔖 Killercoda

You can play by yourself with the demo with the dedicated Killercoda scenario : 

{% embed https://killercoda.com/opt-labs/course/sdkman/sdkmanrc %}
Configurando Visual Studio Code para desenvolvimento Java.
Tags: java, springboot, vscode
Published: 2022-06-08 20:49:38

Partindo do ponto que já há Java (JDK) e Maven configurados na sua máquina de desenvolvimento, estas são as extensões que precisam ser adicionadas no VS Code:

- https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
![Extension Pack for Java](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtouwvyv311soxgk37jo.PNG)


- https://marketplace.visualstudio.com/items?itemName=Pivotal.vscode-boot-dev-pack
![Spring Boot Extension Pack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j7azw6s8oi8xtwvl4rvq.PNG)


- https://marketplace.visualstudio.com/items?itemName=GabrielBB.vscode-lombok
![Lombok Annotations Support](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvk23oicef7e4mpnsu40.PNG)


> Caso queira, podes reiniciar o VS Code (para descargo de consciência).

Assim que abrir o diretório da sua API pelo VS Code, no menu lateral irá aparecer uma Seção do **Spring**, entrando nela você vai notar o tópico **Spring boot dashboard**, ali estará o “_Run_” e o “_Debug_”.

Após o primeiro start da API, será criado o diretório “_.vscode_” na estrutura do projeto, dentro dele estará o arquivo “_launch.json_”, este arquivo podemos utilizar para informar as **VM Arguments**.

---

Caso sua aplicação utilize **Vm Args** para definir o profile quando subir, você terá que editar o arquivo “_launch.json_”, alterando a propriedade “_args_” (que estará vazia) e colocando nela a string do profile:

```
“args”: “--spring.profiles.active=local”
```

---

Fazendo isso, o VS Code estará pronto para utilizar nas APIs Spring Boot. ;)

---

**Bônus**:
As vezes precisamos sobrescrever os métodos Equals e HashCode (entre outros) para atender nossas necessidades, aqui está a extensão para gerá-los.

- https://marketplace.visualstudio.com/items?itemName=sohibe.java-generate-setters-getters
![Java Code Generators](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgyviih3syvufcl9fue4.PNG)
Find N Unique Integers Sum up to Zero
Tags: leetcode, dsa, theabbie
Published: 2022-06-08 20:30:37

Given an integer `n`, return **any** array containing `n` **unique** integers such that they add up to `0`.

**Example 1:**

**Input:** n = 5
**Output:** \[-7,-1,1,3,4\]
**Explanation:** These arrays also are accepted \[-5,-1,1,2,3\] , \[-3,-1,2,-2,4\].

**Example 2:**

**Input:** n = 3
**Output:** \[-1,0,1\]

**Example 3:**

**Input:** n = 1
**Output:** \[0\]

**Constraints:**

*   `1 <= n <= 1000`

**SOLUTION:**

    class Solution:
        def sumZero(self, n: int) -> List[int]:
            if n == 1:
                return [0]
            if n == 2:
                return [-1, 1]
            prev = self.sumZero(n - 2)
            return [prev[0] - 1] + prev + [prev[-1] + 1]
Recent Files
Tags: programming
Published: 2022-06-08 20:23:59

Recently, when I was developing with Houdini, Unreal Engine, Blender, VLC, and Chrome at the same time, downloading, saving, and opening files at different directories can be very cognitively tiring.


So many windows. So many files. So many versions. So many tabs. So many folders.

Where did I just save? How can I get to that folder?

I wonder if there is a more cognitively friendly tool to help with navigating these. I should use RECENT FILES function of the file explorer more.
How do you work on projects you don't like? [Need mental support :(]
Tags: productivity, motivation, help, management
Published: 2022-06-08 20:10:18

As a developer, I have to work on variety of projects for my company and my clients. If I find a project interesting, I make progress on light-speed. My coding becomes productive; my mood stays happy. This also happens when I work on my own ideas, side projects, etc.
But I find it extremely difficult to work on projects I don't like! I cannot make any progress even for months in such cases. During such a period, I can't even work on any other projects as well. E.g., projects I like working on, my side projects, or some interesting ideas I have in todos. That only increase the number of pending tasks. Because when I sit at my desk and start writing codes, the unfinished tasks on the projects I don't like becomes a burden. And I have that urge to finish it first and then start working on other projects. But again, I cannot make any progress there. After opening the project files, I start browsing the internet mindlessly. My mind feels like avoiding starting working on the project at any cost. And at the end of the day, I feel depressed because there is no progress. I'm stressed about the jammed tasks.
I'm trapped, frustrated, and depressed; Please help me out of this. 
Please advise what can I do in such case.
N-th Tribonacci Number
Tags: leetcode, dsa, theabbie
Published: 2022-06-08 20:00:48

The Tribonacci sequence Tn is defined as follows: 

T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0.

Given `n`, return the value of Tn.

**Example 1:**

**Input:** n = 4
**Output:** 4
**Explanation:**
T\_3 = 0 + 1 + 1 = 2
T\_4 = 1 + 1 + 2 = 4

**Example 2:**

**Input:** n = 25
**Output:** 1389537

**Constraints:**

*   `0 <= n <= 37`
*   The answer is guaranteed to fit within a 32-bit integer, ie. `answer <= 2^31 - 1`.

**SOLUTION:**

    class Solution:
        def tribonacci(self, n: int) -> int:
            if n <= 2:
                return [0, 1, 1][n]
            a, b, c = 0, 1, 1
            for _ in range(n - 2):
                a, b, c = b, c, a + b + c
            return c
The latest 2022 standards and trends in web development
Tags: bootstrap, webdev, javascript, programming
Published: 2022-06-08 19:41:04

We are aware that sometimes it's hard to keep up with the changes that have happened in web development in 2022 😰

That is why we made a [tutorial](https://www.youtube.com/watch?v=TbzQR7oE5xc) in which we will show you how to create a responsive website according to the latest standards & trends ▶️

**Learn more [here](https://www.youtube.com/watch?v=TbzQR7oE5xc)**
Two Sum
Tags: leetcode, dsa, theabbie
Published: 2022-06-08 19:30:40

Given an array of integers `nums` and an integer `target`, return _indices of the two numbers such that they add up to `target`_.

You may assume that each input would have **_exactly_ one solution**, and you may not use the _same_ element twice.

You can return the answer in any order.

**Example 1:**

**Input:** nums = \[2,7,11,15\], target = 9
**Output:** \[0,1\]
**Explanation:** Because nums\[0\] + nums\[1\] == 9, we return \[0, 1\].

**Example 2:**

**Input:** nums = \[3,2,4\], target = 6
**Output:** \[1,2\]

**Example 3:**

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

**Constraints:**

*   `2 <= nums.length <= 104`
*   `-109 <= nums[i] <= 109`
*   `-109 <= target <= 109`
*   **Only one valid answer exists.**

**Follow-up:** Can you come up with an algorithm that is less than `O(n2)` time complexity?**SOLUTION:**

    class Solution:
        def twoSum(self, nums: List[int], target: int) -> List[int]:
            exists = {}
            op = []
            for i in range(len(nums)):
                compliment = target - nums[i]
                if compliment in exists:
                    op += [i, exists[compliment]]
                    break
                exists[nums[i]] = i
            return op
Die Besten WordPress Backup Plugins
Tags: wordpress, backup, besten, wordpressplugins
Published: 2022-06-09 14:25:08

---
title: Die Besten WordPress Backup Plugins
published: true
date: 2022-06-08 19:13:41 UTC
tags: WordPress,backup,besten,WordPressPlugins
canonical_url: https://bloggerpilot.com/wordpress-backup-plugins/
---

![Die Besten WordPress Backup Plugins](https://bloggerpilot.com/wp-content/uploads/2022/06/besten-backup-plugins.png)

Du suchst noch nach dem richtigen WordPress Backup Plugin, um...

Der Original-Artikel erschien auf [Die Besten WordPress Backup Plugins](https://bloggerpilot.com/wordpress-backup-plugins/).
Ever donate to a developer who created something you like?
Tags: discuss
Published: 2022-06-08 19:08:00

I think it's easy to take for granted that the web and all of its wonderful applications are built by people and a lot of is accessible for free. 🙌

Often, the folks that develop apps and publish websites on the internet aren't asking for any money from the folks using their creations. And frequently, devs that create this stuff aren't obviously attached to their creation. Yet they work away in the background adding new features, keeping things up-to-date, and making sure everything works smoothly for the rest of us.

So, my question to you all is **have you ever donated to a developer who created something you like?** Who are they? What is it that you like that they created? 

Alternatively, have you ever gone with the donation model for any of your creations? Did you receive any donations?
Minimum Add to Make Parentheses Valid
Tags: leetcode, dsa, theabbie
Published: 2022-06-08 19:00:45

A parentheses string is valid if and only if:

*   It is the empty string,
*   It can be written as `AB` (`A` concatenated with `B`), where `A` and `B` are valid strings, or
*   It can be written as `(A)`, where `A` is a valid string.

You are given a parentheses string `s`. In one move, you can insert a parenthesis at any position of the string.

*   For example, if `s = "()))"`, you can insert an opening parenthesis to be `"(**(**)))"` or a closing parenthesis to be `"())**)**)"`.

Return _the minimum number of moves required to make_ `s` _valid_.

**Example 1:**

**Input:** s = "())"
**Output:** 1

**Example 2:**

**Input:** s = "((("
**Output:** 3

**Constraints:**

*   `1 <= s.length <= 1000`
*   `s[i]` is either `'('` or `')'`.

**SOLUTION:**

    class Solution:
        def minAddToMakeValid(self, s: str) -> int:
            stack = []
            ctr = 0
            for c in s:
                if c == '(':
                    stack.append('(')
                else:
                    if len(stack) == 0 or stack[-1] != '(':
                        ctr += 1
                    else:
                        stack.pop()
            ctr += len(stack)
            return ctr
What is Cloud Computing and its certifications
Tags: cloud, cloudskills, tutorial, career
Published: 2022-06-08 17:24:11



**What is cloud computing ?**

Cloud computing is a network of servers connected using the Internet. Its main function is to share information, resources, and software. The Internet acts as the invisible cable that connects everything. This includes all physical and virtual servers all over the globe.


**Types of cloud computing :**

- The 3 main types of cloud computing services: Infrastructure-as-a-Service (IaaS), Platforms-as-a-Service (PaaS), and Software-as-a-Service (SaaS).

**The list of my top cloud service providers:**

1. Amazon Web Services (AWS)
2. Microsoft Azure
3. Google Cloud Platform
4. Alibaba Cloud
5. IBM Cloud
6. Oracle
7. Salesforce
8. SAP

**Roadmap to learn the Cloud Computing :**

1. Read about the basics of cloud computing.
2. Understand the basic cloud terminology.
3. Try to know and understand the different types of cloud computing.
4. Know and understand the different cloud deployment models.
5. Learn the basic concepts of severs networking and storage.
6. Try to complete a free course of cloud computing in udemy or others.
7. Pick one cloud provider and start preparing for beginner level of certification. 


<u>**Most valuable cloud certifications**</u>

<u>**Beginner Level :**</u>

- Microsoft Azure Fundamentals
- AWS cloud practitioner
- CompTIA Cloud+ Essentials

<u>**Intermediate Level :** </u>

- Google Associate Cloud Engineer
- Azure Administrator Associate
- AWS Architect Associate

<u>**Advanced Level :** </u>

- Azure Solutions Architect Expert
- Google Cloud Architect
- AWS Architect Professional
Handel repeatedly triggered events with Javascript
Tags: javascript, html, webdev, programming
Published: 2022-06-08 18:40:49

Hey DEV community !

If you are someone who handles repeated button clicks by just disabling the button, or if you are someone who makes an API request for every character input on a search field, then this is definitely for you.

The blog is about using [De-bounce and Throttle to handle events in JavaScript (events like clicks, scroll, input, resize etc.)](https://www.inkoop.io/blog/debounce-and-throttle-javascript-edition/).
You can read it 👉👉👉 [here](https://www.inkoop.io/blog/debounce-and-throttle-javascript-edition/).

I know it's quite a hassle 😅😅 to be redirected to someplace else to read the blog, but since I already posted [here](https://www.inkoop.io/blog/debounce-and-throttle-javascript-edition/), I thought why not share this on DEV too.🥹🥹

Have a read through if you are interested in the topic, and comment your recommendations on how I can Improve my writing.
✌️✌️✌️✌️✌️
Why Learn Markdown ☣
Tags: beginners, markdown
Published: 2022-06-08 18:37:48



Maybe all of the writing should be done with Markdown. Everything would be saved as plain text, so you cold open them with any program.

*Obsidian.md* is based on this idea, but I wonder if it is too steep of a learning curve for most users. 

I myself am undecided so far. I am looking into two different programs to use as my notes app. *Obsidian* and *Notion**. 

I do like the pure idea and 'simplicity' behind *Obsidian*, but I have to say there are some ease of use in *Notion*, that are hard to ignore. Just trying to make a table with markdown is a bit of a hassle.

Notion also has databases, that help in aggregating lists and such.

Have a look at both and let us know what yo think.

Obsidian [obsidian.md](https://obsidian.md)
Notion [notion.so](https://notion.so)

:cold_sweat:
JS Refactoring Combo: Introduce Object Destructuring
Tags: javascript, beginners, vscode, webdev
Published: 2022-06-08 18:33:23


[Destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) is a way to access array values or object properties. It can be used in variable declarations, parameters, and catch clauses. 

You can use destructuring to access several properties at once, making it possible to concisely unpack an object into local variables. These local variables can replace redundant property access chains and make the code easier to read.

### Before (Example)
```javascript
for (const item of items) {
  totalAmount += item.price.amount - item.price.discount;
  totalDiscount += item.price.discount;

  logPurchase(
    item.customer.country, 
    item.customer.zipCode, 
    item.price.amount
  );
}

```

### Refactoring Steps
![Introduce object destructuring](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hh1kvw9hgclq4b8h8jx6.gif)

> 💡&nbsp;&nbsp;The refactoring steps are using [P42 JavaScript Assistant](https://marketplace.visualstudio.com/items?itemName=p42ai.refactor) v1.113

1. [Extract all occurrences](https://p42.ai/documentation/code-assist/extract-variable) of the object properties into a variable for each property. The name of the variables should match the property names.
1. [Convert the variables to destructuring expressions](https://p42.ai/documentation/code-assist/convert-to-destructuring-assignment).
1. Move up the variables so that they are next to each other.
1. [Merge the destructuring expressions](https://p42.ai/documentation/code-assist/merge-into-preceding-destructuring-assignment).
1. [Push the combined destructuring expression into the destructured variable](https://p42.ai/documentation/code-assist/push-into-initial-value-declaration) (optional).

### After (Example)
```javascript
for (const { price, customer } of items) {
  totalAmount += price.amount - price.discount;
  totalDiscount += price.discount;

  logPurchase(
    customer.country, 
    customer.zipCode, 
    price.amount
  );
}
```
AWS User Group Ukraine is running a virtual AWS Tech Conference #StandWithUkraine!
Tags: aws, devops, conference
Published: 2022-06-08 18:16:55

AWS User Group Ukraine is running a virtual AWS Tech Conference #StandWithUkraine!
 
Join us to discuss Digital Transformation with AWS and meet peers from the global AWS community.
 
Speakers from AWS, AWS heroes and Ukrainian AWS fans who will share knowledge and experience.

Check out AWS & DevOps topics:
- Maciej Lelusz, AWS User Group Poland Leader, AWS Hero, Founder & CEO of Inleo will give a talk “IT transformation in multi-cloud era”
- László Bodor, Romania AWS User Group Leader, Cloud Architect at IBM will tell us about “AWS WAF & Firewall Manager”
- Stanislav Grichkosey, Platform Software Engineer at Grammarly will share “Grammarly’s Experience in Scaling AWS Infrastructure”
 
When? June 30
Where? Online
 
👉 How to join?
1. Register for free and get full access to the event.
2. You can support freedom in Ukraine by buying a ticket of any type. 
All profit will go to Ukrainian charity funds.
 
Register for free here: https://bit.ly/3aTobOZ
 
It’s going to be AWSome!
 
Follow us to be kept in the loop: https://twitter.com/aws_ug_ua
A new community space for open source maintainers and contributors! 🚀
Tags: tidelift, forem, opensource
Published: 2022-06-08 18:05:17

Today I am highlighting a new Forem dedicated to the success of contributors, maintainers and OSS supply chain professionals of all kinds.

https://community.tidelift.com/

If you want to better understand how the world of open source comes together today and how it's evolving, I suggest getting involved in this space. As your career grows, you might find yourself thinking about the nuance of open source more and more, and this is a specialized space to keep up.

After a soft launch a few days ago, the feed is already full of some really good stuff. I recommend this post on the [people that make open source happen, often behind the scenes](https://community.tidelift.com/sethmlarson/people-in-your-software-supply-chain-218h)

**Happy open-sourcery! 🪄**

***

_One last thing. You’ll notice **"Sign up with Forem"** as an option on these Forems. This is a service we now offer to most seamlessly navigate the ecosystem and manage your identity. We want you to be able to **bring your full self without having to bring your full data**, so making this distributed ecosystem as straightforward as possible in the long run is really important. Create a [Forem account](https://account.forem.com/) and connect it with your DEV account [via your settings](https://dev.to/settings)._ 🙂
Truncate Sentence
Tags: leetcode, dsa, theabbie
Published: 2022-06-08 18:00:46

A **sentence** is a list of words that are separated by a single space with no leading or trailing spaces. Each of the words consists of **only** uppercase and lowercase English letters (no punctuation).

*   For example, `"Hello World"`, `"HELLO"`, and `"hello world hello world"` are all sentences.

You are given a sentence `s`​​​​​​ and an integer `k`​​​​​​. You want to **truncate** `s`​​​​​​ such that it contains only the **first** `k`​​​​​​ words. Return `s`​​​​_​​ after **truncating** it._

**Example 1:**

**Input:** s = "Hello how are you Contestant", k = 4
**Output:** "Hello how are you"
**Explanation:**
The words in s are \["Hello", "how" "are", "you", "Contestant"\].
The first 4 words are \["Hello", "how", "are", "you"\].
Hence, you should return "Hello how are you".

**Example 2:**

**Input:** s = "What is the solution to this problem", k = 4
**Output:** "What is the solution"
**Explanation:**
The words in s are \["What", "is" "the", "solution", "to", "this", "problem"\].
The first 4 words are \["What", "is", "the", "solution"\].
Hence, you should return "What is the solution".

**Example 3:**

**Input:** s = "chopper is not a tanuki", k = 5
**Output:** "chopper is not a tanuki"

**Constraints:**

*   `1 <= s.length <= 500`
*   `k` is in the range `[1, the number of words in s]`.
*   `s` consist of only lowercase and uppercase English letters and spaces.
*   The words in `s` are separated by a single space.
*   There are no leading or trailing spaces.

**SOLUTION:**

    class Solution:
        def truncateSentence(self, s: str, k: int) -> str:
            n = len(s)
            i = 0
            ctr = 0
            for i in range(n):
                if s[i] == " ":
                    ctr += 1
                    if ctr == k:
                        return s[:i]
            return s
Web3 Solidity + JavaScript 32 hour course recap #11
Published: 2022-06-08 17:55:01

timestamps: 3:57:00 - 4:11:11

This is a recap of me making my way through the 32 hour course by Patrick Collins posted on [FreeCodeCamp](https://www.youtube.com/watch?v=gyMwXuJrbJQ).

The first thing that we talked about is the fact that Oracle networks take ERC-20.

I then took it up on myself to look up the different Ethereum protocols (the gemini resource)[https://www.gemini.com/cryptopedia/ethereum-token-standards-erc777-erc1155-erc223-erc1337#section-what-is-erc-1155]

I'm pretty sure that ERC-20, ERC-721, and ERC-1155 are the only ones that I need to be aware of for now.

Chainlink is a technology for getting external data in a decentralized manner.

When interacting with another contract; you need both the address and the ABI. The address can be found in the chainlink documentation, but the ABI is found as an interface in the chainlink npm package. Solidity apparently is "smart enough" to be able to make calls to npm the find files.

`import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";`

and

`address ethToUsdAddress = 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e;`
        `AggregatorV3Interface(ethToUsdAddress).version();`

are both pretty much what I would expect this to look like.

One side note: I was in Kovan when running the test, but we had copied the Rinkeby wallet address. So make sure that your metamask token selection matches what you're wanting to use.