teleren/devto huggingface dataset:
Too Much Of A Good Thing ?
Published: 2022-06-13 04:08:42



I recently attend an online tech conference. Surprisingly the biggest takeaway wasn't how to be a better programmer or what would make me a better engineer. It was the path I would take in order to achieve these goals. 🤯🤯🤯

##To Many Resources 
In our modern world we have access to information at the click of a button. We can learn and explore just about anything, for most of us it's goole or stack overflow or something along those lines. But the big question that was given to us was. 

**Are we using the right resources for the task at hand?** 
The answer for most of us was **NO**.

Solution: The speaker gave us some insight into some popular books and resources most of us would turn to two. He encouraged us to pick 3. 
1) To learn and study from. 
Focus on one learning platform really take our time and master what we are studying and then go from there.  
2) Find two place to look for answers when you get stuck.
3) Find a systems that works for you in multiple situation. 
Practice not just what your good at but also were you know you struggle.

#Organize Your Notes 
😯 Yes I used the N-word.(Notes) 
This has been an interesting topic within the coding community on note taking.(Save that for another day).

But we were encouraged to break things down into categories and to write out the problem steps used to solve them and why they work or don't work. 
If you are a note taker have a section for Algorithms another section for Data Structure, a section for Big O etc....

This way when your preparing for an interview you can go back and review and prepare for what you are doing and be ready to go. 

## Understand Yourself. 
The last thing he share was to understand how you learn best. Know when is the best time for you to study. Understanding what to study.

The comes the fun part applying everything you have learned. To your own projects. 

I hope these tips help you as much as they have help me gain perspective in moving forward. It's incredible what we learn from the people who have been down the road were own now. 

Hopefully these help and as always 

Happy Coding 👨🏿‍💻👨🏻‍💻👩🏾‍💻👩‍💻
Greatest Sum Divisible by Three
Tags: leetcode, dsa, theabbie
Published: 2022-06-13 06:00:46

Given an array `nums` of integers, we need to find the maximum possible sum of elements of the array such that it is divisible by three.

**Example 1:**

**Input:** nums = \[3,6,5,1,8\]
**Output:** 18
**Explanation:** Pick numbers 3, 6, 1 and 8 their sum is 18 (maximum sum divisible by 3).

**Example 2:**

**Input:** nums = \[4\]
**Output:** 0
**Explanation:** Since 4 is not divisible by 3, do not pick any number.

**Example 3:**

**Input:** nums = \[1,2,3,4,4\]
**Output:** 12
**Explanation:** Pick numbers 1, 3, 4 and 4 their sum is 12 (maximum sum divisible by 3).

**Constraints:**

*   `1 <= nums.length <= 4 * 10^4`
*   `1 <= nums[i] <= 10^4`

**SOLUTION:**

    import bisect
    
    class Solution:
        def maxSumDivThree(self, nums: List[int]) -> int:
            msum = 0
            n = len(nums)
            total = sum(nums)
            if total % 3 == 0:
                return total
            nums.sort()
            paths = [(nums[i], i) for i in range(n)]
            i = 0
            while i < len(paths):
                currsum, curr = paths[i]
                if (total - currsum) % 3 == 0:
                    return total - currsum
                for j in range(curr + 1, n):
                    bisect.insort(paths, (currsum + nums[j], j))
                i += 1
            return 0
بازار کریپتو و ریزش ادامه دار
Tags: news, blockchain
Published: 2022-06-13 05:55:46

تحولات اخیر در بازار، نگرانی سرمایه‌گذاران ارزهای دیجیتال را که از سقوط ماه می متضرر بودند، افزایش داده است. اکنون که شاخص های جهانی شروع به لرزیدن بیشتر کرده اند، آینده دارایی های کریپتو چگونه خواهد بود؟
یک کابوس زنده
بازار کریپتو از 11 ژوئن ضربه بزرگی خورده است. بیت کوین در حال حاضر 6 درصد کاهش یافته و زیر 27500 دلار است، اتریوم با 12 درصد کاهش و رفتن به زیر 1500 دلار، وضعیت بدتری دارد. اما این همه چیز نیست، زیرا اکثر آلتکوین های اصلی نیز امروزه جایگاه خود را از دست می دهند.
طبق مطالعه اخیر سینتمنت، میانگین بازدهی معامله گران پس از سقوط ماه می دوباره در محدوده منفی قرار گرفته است. سینتمنت از متریک ام آر وی آر-30 روز روی ارزهای دیجیتال اصلی استفاده کرد و نتایج وحشتناک بود و تنها رمز ارز آدا بازدهی خنثی داشت. بیت کوین و بایننس کوین منفی هستند و در منطقه نیمه فرصت گیر کرده اند. از سوی دیگر، اتریوم پس از افت قیمت به اندازه فوریه 2021، دوباره به منطقه فرصت بازگشت.

ریزش اخیر در بازار سهام ناشی از داده های اخیر سی پی آی منتشر شده توسط ایالات متحده است. بر اساس داده های منتشر شده توسط اداره آمار کار ایالات متحده، شاخص قیمت مصرف کننده در ماه می 1 درصد افزایش یافته است. این امر نرخ تورم سالانه در ایالات متحده را به بالاترین میزان در 41 سال گذشته یعنی 8.6 درصد می رساند.

گزارش تورم تأثیر زیادی بر صنایع دارای ریسک داشت و در نهایت صنعت کریپتو را اصلاح کرد. بر اساس توئیت دیگری از سینتمنت، نگرانی‌های مربوط به تورم و بدهی در رسانه‌های اجتماعی رو به افزایش بود، زیرا آلت‌کوین‌های اصلی به پایین‌ترین سطح محلی رسیدند. 

واکنش توکن ها
بیت کوین چند روز گذشته از سقوط کریپتو در ماه می بهبود یافته و از 32000 دلار عبور کرده بود. اما پس از آخرین به روز رسانی تورم، بیش از 6.5 درصد کاهش یافت و به زیر 27500 دلار رسید. سقف تحقق یافته بیت کوین به تازگی به پایین ترین سطح هفت ماهه 447.6 میلیارد دلاری رسیده است که یک چنین پایین ترین سطحی قبلا در 10 ژوئن مشاهده شده است. این یک سیگنال نگران کننده دیگر برای جامعه کریپتو است که بیت کوین در تلاش برای حفظ موقعیت خود در صدر است.

با وجود ادغام اخیر راپستن با زنجیره بیکون، این وضعیت برای اتریوم بسیار بحرانی تر است. دومین ارز دیجیتال بزرگ از نظر ارزش بازار 12.8 درصد کاهش یافت و به پایین ترین حد خود از فوریه 2021 رسید. اتر در حال حاضر با قیمت 1372 دلار معامله می شود و در طول هفته حدود 27 درصد کاهش یافته است.
بر اساس توئیت گلس‌نود، درصد آدرس‌های سود در اتریوم به 55.6 درصد یعنی پایین‌ترین حد در 22 ماه گذشته رسیده است. ام آر وی آر درون روزی معیار دیگری است که شکاف‌های شبکه را پس از رسیدن به 0.894 و پایین‌ترین حد دو سال اخیر نشان می‌دهد. این یک ضربه بزرگ به جامعه اتریوم است.

این شرایط، وضعیت بازار ارزهای دیجیتال امروز را خلاصه می کند که در 24 ساعت گذشته به 1.10 تریلیون دلار سقوط کرده و 8 درصد کاهش یافته است. کارشناسان بر این باورند که بدترین اتفاقات با شک و تردید در میان دارایی‌های ریسکی در راه است. پیتر شیف به سرمایه گذاران هشدار داد که در افت، خرید نکنند زیرا به نظر می رسد [قیمت ارزهای دیجیتال](https://bit.ly/3aR8JCS) بیت کوین و اتریوم به ترتیب تا 20 هزار دلار و هزار دلار سقوط کند.
Free Resources for Devs
Tags: resources
Published: 2022-06-13 05:54:39

Here are some of my most amazing dev resources. 

I frequently use these resources for a design inspirations for my apps.

[Free for Dev](https://free-for.dev/)
[Dev Resource](https://devresourc.es/)

Do you know some other resources like this? Post it in the comment so others can know as well 😀
Access JavaScript variable from a URL using php and regex
Tags: javascript, php, regex, beginners
Published: 2022-06-13 05:52:08


I have a link say `https://example.com`

and the link contents html
```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">

</head>
<body>
  <br><hr><br>
  <header>
    <h1>Title</h1>
  </header>
<script>
var abc = "https://example2.com/sample.mp4";
</script>

<script>
var poster = "https://example2.com/sample.png";
</script>

</body>
</html>
```

and I want the value of variable abc. That will give me "https://example2.com/sample.mp4" this value.
By grabbing it using `file_get_contents('https://example.com')` **php** and getting script data using **regex**...


---

And then I will redirect My php page to the variable abc value URL 'https://example2.com/sample.mp4' (here)

How could I do this ?

[Stack Overflow](https://stackoverflow.com/questions/72597301/access-javascript-variable-from-a-url-using-php-and-regex
)
## How if anyone knows discuss below !
What is Getters and Setters in JavaScript
Tags: webdev, javascript, react, functional
Published: 2022-06-13 05:49:04

**Before go the Getters and Setters, you must learn about JS Objects.**

Getters and Setters allow you to define Object Accessors. 

In JavaScript, Accessor properties are methods that get or set the value of an object.

get  - to define a getter method to get the property value.
set -  to define a setter method to set the property value.

```
let person ={
    firstName:"Title", // Data Properties
    lastName: "Card",
   /* fullName: () => {
        return `${person.firstName} ${person.lastName}`;
    }*/

   fullName(){ // ES6 Features
    return `${person.firstName} ${person.lastName}`; // Template literals
} 

};
console.log(person.fullName());
//console.log(person.firstName + ' ' + person.lastName);
```
Getters is used to get the data(Keyword-get)
Setters is used to set the data(Keyword-set)

```
let person ={
    firstName:"Title", // Data Properties
    lastName: "Card",
   /* fullName: () => {
        return `${person.firstName} ${person.lastName}`;
    }*/

    // Getters is used to get the data

   get fullName(){ 
    return `${person.firstName} ${person.lastName}`; 
}, 

// Setters is used to set the data


set fullName(value){
   let values = value.split(" ");
   //console.log(values)
   this.firstName = values[0];
   this.lastName = values[1];
   // If the name is single word (only firstName)
   //this.lastName = values[1] ?? "";

}
};
person.fullName = "Name Tag"
console.log(person.fullName);
```
**Why Using Getters and Setters?**

1. It gives simpler syntax
2. It allows equal syntax for properties and methods
3. It can secure better data quality
4. It is useful for doing things behind-the-scenes
FoalTS 2022 survey is open!
Tags: foalts, node, javascript, typescript
Published: 2022-06-13 05:31:38

---
title: FoalTS 2022 survey is open!
published: true
description: FoalTS framework 2022 survey is open!
tags: FoalTS, NodeJS, Node, JavaScript, TypeScript
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

[FoalTS](https://foalts.org) 2022 survey is now open (yes, a few months late 🙃)!

Your responses to these questions are really valuable as they help me better understand what you need and how to improve the framework going forward 👌.

I read every response carefully so feel free to say anything you have to say!

👉 [The link to the survey](https://forms.gle/3HAzQboxSBXvpJbB6).

The survey closes on June 31.
Kth Largest Element in an Array
Tags: leetcode, dsa, theabbie
Published: 2022-06-13 05:30:37

Given an integer array `nums` and an integer `k`, return _the_ `kth` _largest element in the array_.

Note that it is the `kth` largest element in the sorted order, not the `kth` distinct element.

**Example 1:**

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

**Example 2:**

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

**Constraints:**

*   `1 <= k <= nums.length <= 104`
*   `-104 <= nums[i] <= 104`

**SOLUTION:**

    import heapq
    
    class Solution:
        def findKthLargest(self, nums: List[int], k: int) -> int:
            heap = []
            for num in nums:
                heapq.heappush(heap, num)
                if len(heap) > k:
                    heapq.heappop(heap)
            return heap[0]
Digital Concrete Compression Machine Print Out 3000 kN Capacity
Tags: alatsipil, alattekniksipil
Published: 2022-06-13 05:14:57

• Digital Concrete Compression Machine 3000 kN cap, 10 kN readability
• Dimensi 80 x 45 x 120 cm
• Diameter Copel Atas 30 cm
• Diameter Meja Piston 29 cm
• Diameter RAM 250 mm
• Tinggi Piston 20 cm
• Dimensi Bantalan Kubus 20 x 20 x15 cm
• Pompa Hydraulic: kapasitas 800 Bar
• Power 220 volt Ac - 50 Hz - 1000 Watt
• Print Out:
o AC DC 5V 3A
o 15 Watt
o Satuan kN
o Manual Print
o Manual Cutter Paper
o Ukuran Kertas 37 x 58 mm
o Kode print out: MBTES kN 2020321501
• Display Manometer Digital 3000 kN:
o Display indicator 6 digit
o Power Supply 6 Volt DC. Pressure
o Tranducer 700 Bar
o Battery Output 6 Volt DC
o Speed control

Source: https://www.nurjamansurvey.com/
Beginner Guitar Advice
Tags: music, guitar, musiclessons
Published: 2022-06-13 05:07:22

Millions of people play guitar all over the world, and when you have such a popular instrument, you may pick from a number of guitar tips to help you along your way.

The best beginner recommendations are provided below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0erffd16sqfxpchd25bz.jpg)

1. Begin slowly.

Most beginners will try to play chords as rapidly as they can. Do not give in to the pressure.


Rather, take your time and learn each chord individually. Once you've mastered a few chord shapes, try switching between them more quickly. This keeps you from forming bad habits as a result of trying to run before you can walk.

2. Make an effort not to stare at your hands.

For beginners, the need to look at your hands while playing is almost tempting. When changing chords, it's important to look at your hands at first, but don't do so all the time.

Looking away from your hands will help you connect to the feeling as well as the visual representation of good chord placement. Consider looking away or closing your eyes while playing to improve this, and merely checking your hands every now and then to make sure you're in the right place.

3. Make an effort to master difficult chords.

If you only play the chords you already know, you can become stuck. Rather than sticking to the easier chords, never be hesitant to explore new ones and spend time learning them.

Remember that many of the all-time greats (such as The Beatles) created their unique sounds by using chord variants rather than their basic counterparts.

4. Standing is an excellent approach to practice.

Wha!? Without a sure, this is one of the best guitar tips.

Standing up while practicing helps you break the habit of staring at your hands while playing since staring at your hands while standing is more difficult.

You'll also need to be able to play standing up if you wish to perform in bands in the future, so get this one under your belt.

5. Employ a metronome.

Train your rhythm and timing with a metronome so you can practice with the right timing. If you want to perform with other musicians, you'll need to be able to keep time; if you want to be in a band, you'll need to be able to maintain time. Our free online metronome is one of the most popular online metronomes.

Final thoughts on guitar fundamentals

This article has a lot to teach you, and even if you simply remember one or two of the tips, you'll be well on your way.

[Beau Monde Guitars](https://beaumondeguitars.com/) is based in Northvale, New Jersey, and services the communities of Norwood, Old Tappan, Blauvelt, Nanuet, Orangeburg, Pearl River, Tappan, West Nyack, and others in Bergen and Rockland counties. Our expert instructors have the knowledge and experience to help you become the player you've always wanted to be.
Total StationTOPCON GM-55
Tags: alat, alatsurvey, alatukur, totalstation
Published: 2022-06-13 05:04:59

Standard Package Components :

Main unit • Battery (BDC46C)
Battery charger (CDC68A)
Power Cable • Lens cap • Lens hood
Tool pouch • Precision Screwdriver
Lens brush • Hexagonal wrench ×2
Cleaning cloth • Quick Manual
Laser caution sign-board
Carrying case • Carrying strap
Available Accessories:

2 x Aluminum Tripod
1 x Prisma Polygon
1 x Range Pole
1 x Single Prism
1 x Cable Data
1 x Software Data

Source: https://www.nurjamansurvey.com/
Count Nodes Equal to Average of Subtree
Tags: leetcode, dsa, theabbie
Published: 2022-06-13 05:00:46

Given the `root` of a binary tree, return _the number of nodes where the value of the node is equal to the **average** of the values in its **subtree**_.

**Note:**

*   The **average** of `n` elements is the **sum** of the `n` elements divided by `n` and **rounded down** to the nearest integer.
*   A **subtree** of `root` is a tree consisting of `root` and all of its descendants.

**Example 1:**

![](https://assets.leetcode.com/uploads/2022/03/15/image-20220315203925-1.png)

**Input:** root = \[4,8,5,0,1,null,6\]
**Output:** 5
**Explanation:** 
For the node with value 4: The average of its subtree is (4 + 8 + 5 + 0 + 1 + 6) / 6 = 24 / 6 = 4.
For the node with value 5: The average of its subtree is (5 + 6) / 2 = 11 / 2 = 5.
For the node with value 0: The average of its subtree is 0 / 1 = 0.
For the node with value 1: The average of its subtree is 1 / 1 = 1.
For the node with value 6: The average of its subtree is 6 / 1 = 6.

**Example 2:**

![](https://assets.leetcode.com/uploads/2022/03/26/image-20220326133920-1.png)

**Input:** root = \[1\]
**Output:** 1
**Explanation:** For the node with value 1: The average of its subtree is 1 / 1 = 1.

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 1000]`.
*   `0 <= 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 sumcount(self, root):
            total = 0
            n = 0
            if root:
                ltotal, ln = self.sumcount(root.left)
                rtotal, rn = self.sumcount(root.right)
                total = ltotal + rtotal + root.val
                n = ln + rn + 1
                if root.val == total // n:
                    self.ctr += 1
            return (total, n)
        
        def averageOfSubtree(self, root: Optional[TreeNode]) -> int:
            self.ctr = 0
            self.sumcount(root)
            return self.ctr
Use of setInterval method in Javascript
Tags: javascript, beginners, programming, tutorial
Published: 2022-06-13 04:51:46

The setInterval() method is used to call a function or evaluate an expression at specified intervals (in milliseconds). For example, let’s log a message after 2 seconds using the setInterval method,

An example of code below will log a message after 2 seconds using the setTimeInterval method:

`setInterval(function () {
  console.log("The Coding dev");
}, 2000); `
Strong Password Checker II
Tags: leetcode, dsa, theabbie
Published: 2022-06-13 04:30:41

A password is said to be **strong** if it satisfies all the following criteria:

*   It has at least `8` characters.
*   It contains at least **one lowercase** letter.
*   It contains at least **one uppercase** letter.
*   It contains at least **one digit**.
*   It contains at least **one special character**. The special characters are the characters in the following string: `"!@#$%^&*()-+"`.
*   It does **not** contain `2` of the same character in adjacent positions (i.e., `"aab"` violates this condition, but `"aba"` does not).

Given a string `password`, return `true` _if it is a **strong** password_. Otherwise, return `false`.

**Example 1:**

**Input:** password = "IloveLe3tcode!"
**Output:** true
**Explanation:** The password meets all the requirements. Therefore, we return true.

**Example 2:**

**Input:** password = "Me+You--IsMyDream"
**Output:** false
**Explanation:** The password does not contain a digit and also contains 2 of the same character in adjacent positions. Therefore, we return false.

**Example 3:**

**Input:** password = "1aB!"
**Output:** false
**Explanation:** The password does not meet the length requirement. Therefore, we return false.

**Constraints:**

*   `1 <= password.length <= 100`
*   `password` consists of letters, digits, and special characters: `"!@#$%^&*()-+"`.

**SOLUTION:**

    class Solution:
        def strongPasswordCheckerII(self, p: str) -> bool:
            n = len(p)
            if len(p) < 8:
                return False
            lc = 0
            uc = 0
            dg = 0
            sc = 0
            for i in range(n):
                if p[i].islower():
                    lc += 1
                if p[i].isupper():
                    uc += 1
                if p[i].isdigit():
                    dg += 1
                if p[i] in "!@#$%^&*()-+":
                    sc += 1
                if i < n - 1 and p[i] == p[i + 1]:
                    return False
            return lc >= 1 and uc >= 1 and dg >= 1 and sc >= 1
async and await in javascript
Tags: javascript, programming
Published: 2022-06-13 04:19:45

ES2017 introduces two new keywords—async and await—that represent a paradigm shift in asynchronous JavaScript programming. These new keywords dramatically simplify the use of Promises and allow us to write Promise-based, asynchronous code that looks like synchronous code that blocks while waiting for network responses or other asynchronous events.

**await Expressions**

The await keyword takes a Promise and turns it back into a return value or a thrown exception. Given a Promise object p, the expression await p waits until p settles. If p fulfills, then the value of await p is the fulfillment value of p. On the other hand, if p is rejected, then the await p expression throws the rejection value of p. We don’t usually use await with a variable that holds a Promise; instead, we use it before the invocation of a function that returns a Promise.

```
let response = await fetch("/api/user/profile");
let profile = await response.json();

```

**async Functions**

Because any code that uses await is asynchronous, there is one critical rule: you can only use the await keyword within functions that have been declared with the async keyword.

```
async function getHighScore() {
    let response = await fetch("/api/user/profile");
    let profile = await response.json();
    return profile.highScore;
}

```

Declaring a function async means that the return value of the function will be a Promise even if no Promise-related code appears in the body of the function. If an async function appears to return normally, then the Promise object that is the real return value of the function will resolve to that apparent return value. And if an async function appears to throw an exception, then the Promise object that it returns will be rejected with that exception.

The getHighScore() function is declared async, so it returns a Promise. And because it returns a Promise, we can use the await keyword with it.


```
displayHighScore(await getHighScore());

```

**Awaiting Multiple Promises**

Suppose that we’ve written our getJSON() function using async.

```
async function getJSON(url) {
    let response = await fetch(url);
    let body = await response.json();
    return body;
}

```

And now suppose that we want to fetch two JSON values with this function.

```
let value1 = await getJSON(url1);
let value2 = await getJSON(url2);

```

The problem with this code is that it is unnecessarily sequential: the fetch of the second URL will not begin until the first fetch is complete. If the second URL does not depend on the value obtained from the first URL, then we should probably try to fetch the two values at the same time. This is a case where the Promise-based nature of async functions shows. In order to await a set of concurrently executing async functions, we use Promise.all() just as we would if working with Promises directly

```
let [value1, value2] = await Promise.all([getJSON(url1), getJSON(url2)]);

```