teleren/devto huggingface dataset:
938. Leetcode Solution in python3
Tags: python
Published: 2022-12-07 05:52:44

```python3
# 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 rangeSumBST(self, root: Optional[TreeNode], low: int, high: int) -> int:
        # if low <= root val <= high, add to res
        if not root:
            return 0
        if low <= root.val <= high:
            return root.val + self.rangeSumBST(root.left, low, high) + self.rangeSumBST(root.right, low, high)
        elif root.val > high:
            return self.rangeSumBST(root.left, low, high)
        elif root.val < low:
            return self.rangeSumBST(root.right, low, high)
```
#leetcode
#challenge
Here is the link for the problem:https://leetcode.com/problems/range-sum-of-bst/description/
What is Rust?
Tags: rust, beginners, programming, tutorial
Published: 2022-12-07 05:52:15

## What is Rust? 🦀

Rust is a programming language (developed by Mozilla) that is designed to be:
- fast
- concurrent
- safe

Rust helps write faster, more reliable software. 

High-level ergonomics and low-level control are often at odds in programming language design.

Rust challenges that conflict, by balancing powerful technical capacity and a great developer experience: it gives you an easy option to control low-level details, such as memory usage.

Rust is known for its strong emphasis on memory safety and security, making it a good choice for writing programs that NEED to be reliable and efficient. 

It has a growing community of users and is becoming increasingly popular for developing a wide range of applications, such as:
- systems programming
- web assembly
- machine learning.

## Rust for Web3

Rust is also used in many Blockchains:
- Solana
- Polkadot
- Ethereum
- Hypereldger Sawtooth
- Near Protocol

##  Online book

There is an online version of the Rust Programming language:
https://doc.rust-lang.org/stable/book

## Learn in public

I am starting a new YouTube series to learn it in public, check it here https://youtu.be/w5LvdWq2R6I:

[![Rust from Zero](https://user-images.githubusercontent.com/18360871/206097613-b1d0e14c-9370-429d-a9ed-7d57503748c9.png)](https://youtu.be/w5LvdWq2R6I)

## Conclusion

I want to learn Rust from Zero, and I will do it publicly.

If you are interested, let me know 🦀

Thanks for reading, I am Francesco and you can find me here: [Francesco](https://francescociulla.com)
Overview of Python Programming....
Tags: python
Published: 2022-12-07 05:51:52

Python is an object-oriented, all-purpose programming language with high-level features. Its obvious and simple syntax, portability, and ease of learning have helped it become well-known.
Python is a computer language with elements of both Java and C. Object-oriented programming, offers classes and objects similar to Java, and it offers the approach of producing elegant code similar to C.
In another word, Python is interpreted, interactive, objected oriented, and a beginner's language. Python includes features easy to learn, easy to read, easy to maintain, a broad standard library, interactive mode, portable, extendable, database, GUI Programming, and scalable. There are various courses done in Python Programming Language for new beginners and also experts which are as bellows:-

1. Python for everybody
2. Google IT Automation with Python
3. Crash course on Python
4. Python 3 Programming
5. Advanced Programming in Swift
6. Data Science Fundamentals with Python and SQL
7. Data Science
8. Applied Data Science with Python
9. Python for Data Science, AI & Development

Software development, data analysis, and back-end web applications are some frequent employment possibilities for someone who is proficient in Python. You can write, edit, or manage software with Python if you work in these sectors. You can create webpages, link applications, and test and debug code. After learning Python, some people might decide to work in the fields of education, finance, computation, or project management. They might utilize their [Python training](https://www.igmguru.com/data-science-bi/python-training/) expertise to compute and analyze huge data sets or instruct others in the use of the programming language.
Best Realtor in Brampton
Tags: realtor, brampton, mississauga
Published: 2022-12-07 05:44:10

Hi, I am Gazal Bansal and I've been serving the community with independent brokerage for many years and been a top selling and rated [The Best Realtor in Brampton](https://www.gazalbansal.ca/best-realtor-in-brampton.html). I have successfully completed the designated curriculum and have satisfied the practical experience requirements with ABR Designation with the official credential of the national association of Realtors (NAR).
NodeJS request
Tags: node
Published: 2022-12-07 05:42:21

# Request - Simplified HTTP client

[Request](https://www.npmjs.com/package/request) is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.

## request

```javascript
// https://www.npmjs.com/package/request
const request = require('request')

/* --- */

request( 'https://example.com', function ( error, response, body ) {

	/*
		Print the error if one occurred
	*/
	console.error( `error: ${error}` )

	/*
		Print the response status code if a response was received
	*/
	console.log( 'statusCode:', response && response.statusCode)

	/*
		Print the HTML for the example homepage
	*/
	console.log( `body: ${body}` )
	
} )

```

---

### Example request

{% embed https://replit.com/@antelove19/NodeJS-request#index.js %}

---

### Example request callback

{% embed https://replit.com/@antelove19/NodeJS-request-10-callback#index.js %}

---

### Example request promise

{% embed https://replit.com/@antelove19/NodeJS-request-20-promise#index.js %}

---

### Example request promise return
 
{% embed https://replit.com/@antelove19/NodeJS-request-21-promise-return#index.js %}

---

### Example request async/await
 
{% embed https://replit.com/@antelove19/NodeJS-request-30-asyncawait#index.js %}
Laravel 9 Dynamic Bar Chart Example
Tags: laravel9, barchart, chart, php
Published: 2022-12-07 05:30:00

In this article, we will see the laravel 9 dynamic bar chart example. 

Bar charts are used to represent data in graphics view. For the creation of a dynamic bar chart example, we will create a route, controller, blade file, and database. 

So, we will learn how to create a dynamic bar chart in laravel 9. Also, we will use echart js for the bar chart example.

So, let's see dynamic bar chart in laravel 9, bar chart in laravel 9, and bar chart in PHP.

```
Step 1: Install Laravel 9  For Dynamic Bar Chart

Step 2: Create Migration Table

Step 3: Add Route

Step 4: Create Controller And Model

Step 5: Add Code In Controller

Step 6: Create Blade File For Dynamic Bar Chart
```
Too much, and yet not enough
Tags: watercooler, webdev
Published: 2022-12-07 05:15:21

If you have been an avid reader of this blog, you might have noticed I like exploring different aspects of web development.

I don't like to niche down or restrict myself to one specific topic.
This might be because of my ADD nature or simply because I enjoy exploring all the different topics.

But today, I was deciding on what to write about. And from my list of open topics, I felt like there was too much to pick from.
Did I want to pick yet another completely new topic?

But then again, the topics I already wrote about seemed worn out. I touched on all the most important topics. Going into detail would mean writing long-form articles.

(This is something I'd love to do, but I don't have the energy for now)

## The power of broadcasting

I'm a big believer in broadcasting. It's something I've enjoyed throughout my life.

When I was young, I couldn't stick to one sport, I wanted to try them all out, and my parent was happy enough to let me.

Sometimes I would stick to a sport for a year or longer, but often I didn't enjoy them as much as hoped.

I think this was the nature of my personality. Just not someone who can do things for an extended period with no genuine interest in that particular thing.

And for me, this came with a fast amount of power. By always broadcasting my interest, I got to experience things I loved, but maybe more importantly, find the things I didn't like.

## How this can apply to you

So you might be wondering, ok, incredible life story, but what is it to me?

And as mentioned, I'm a firm believer in finding one's passion and genuinely experiencing what you enjoy most, so if you are reading this and unsure if you are doing the thing you love the most. Perhaps you should try to experience some other aspects of that thing.

Don't drop everything at once, but on the weekend, try out an alternative language, try out accessibility if you never did, try out data-science, or even backend development.

You might enjoy that even more than what you're doing now.

I hope this article will inspire some people to at least give it a think and perhaps experience to find the thing they love the most.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Revision on JavaScript arrays and it's operations.
Tags: javascript, array, beginners, webdev
Published: 2022-12-07 05:10:03


so, I was just thinking of writing something and then this came in my mind about revise the array of javascript and it's operations.
let's start with what is array in javascript and if I put it very simple array is just rack where we store same or distinct things in order, so basically, this is array.

Now let's see declaration of arrays :-

```
let ourArray = [ "a", "b", "c" ];
```

Note :- array have index value which help to access the element of array and the start value is always 0(zero).

For Example :-

```
let ourVariable = ourArray[0];

console.log(ourVariable);
```

Now, ourVariable have value of "a", which is same that we have at index[0] in ourArray array.

One more thing we can also change value at different index.
Example :-

```
ourArray[1] = "not b anymore";

console.log(ourArray);

// Expected Output
// [ "a", "not b anymore", "c" ]
```

Above code show how we can change values at different index locations in Arrays.


### Operation on Array

There are mainly four types of operations anyone can do on Arrays which are push(), unshift(), pop() and shift().

let's discuss all of them in detail now firstly we will see push() method.

### push() :-

this method adds elements to the end of an array.

Example :-

```
let ourArray = [ "a", "b", "c" ];

ourArray.push("d");

console.log(ourArray); // output => [ "a", "b", "c", "d" ]
```

Now, we can see "d" at the end of array list at index[3] and it is because push() method adds element at the end of array.

### unshift() :-

It adds elements at the front of array.

Example :-

```
let ourArray = [ "a", "b", "c" ];

ourArray.unshift("d");

console.log(ourArray); // output => [ "d", "a", "b", "c" ]
```

Here, in this case, element will get added at the start of array because of unshift() method as it adds element at the start of array and we can see "d" here at the beginning.

### pop() :-

as you know by name it help to remove an element from the array but remember it specifically remove element from end of array (or from index[n] ) and if I have to put it simple, you can say that it is totally opposite of push() method.

Example :-

```
let ourArray = [ "a", "b", "c" ];

let popped = ourArray.pop();

console.log(ourArray);   // output => [ "a", "b"];
console.log(popped);    // output => "c" ;
```

and the variable "popped" will have value that has be popped from "ourArray".

### shift() :-

just like pop() opposite of push() method, here you can assume by name that it might be opposite of unshift() method and you are absolute right.
basically shift() method remove element from the start of an array or can say from zeroth index "index[0]".

Example :-

```
let ourArray = [ "a", "b", "c" ];

let shifted= ourArray.shift();

console.log(ourArray);   // output => [ "b", "c"];
console.log(shifted);    // output => "a" ;
```

There are more oprations that someone can perform on array and we will discuss those later in the line of next post.

### So, see ya fellas have a nice day : )
Gatsby site SEO action list
Tags: seo, gatsby, webdev, react
Published: 2022-12-07 05:07:04


![gatsby-se](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zulilh8gwf3fjz0jc42h.jpg)

## Background
Search Engine Optimisation is critical for new start up business site to rank themselves up on search engine(or google) search result list. Even for well established business brand, it is still handy for their help/FAQ pages to be top listed on relevant search so people won't call support centre to increase operation cost. And usually, SEO work is more of development practice improvement. After process is set up, unlike accessibility or security features, those SEO improvements are easy to maintain. Development team can also set up a coding SEO guide wiki page or even custom eslint rules to share knowledge and maintain standard for new joiners. 

Gatsby js, as a static site generating tool, is known for its friendly SEO, scalability, security and Content Management System (CMS) support through Multipage Page Application (MPA) architecture. Gatsby gradually gains popularity among react frameworks that usually build app into Single Page Application(SPA). For google bots, executing javascript to get html content is always second choice. [More about javascript SEO](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)
## Problem
Gatsby js framework has extensive support for SEO. However **serious set up is needed to ensure the SEO optimisation** is baked in your site starter. 
## Action list

![SEO impact effort chart](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l54q52c8oj9qdqmgheq.jpeg)
Based on Gatsby site, attached a chart with effort and impact. [Gatsby's starter](https://www.gatsbyjs.com/starters/) gives you plenty of options, but none of them are fully or even partially SEO optimised.  Rated with impact and effort, actions are classified with three layers:
  * Golden(low effort high impact) 🥇 :
   * Robot.txt control
   * Page metadata
   * Sitemap generation
   * URL structure
   * Navigation links
  * Silver 🥈 :
   * SPA/MPA optimisation
   * SEO Monitoring
   * Site Moves
   * Canonical urls
  * Bronze 🥉
    * Site speed
   
 
## Next
This is an overview of the action list, I will write a serious of articles to elaborate tech details of items on the chart. I will also be using most starred Gatsby starter - forked [blog starter](https://github.com/hurricanew/gatsby-starter-blog) to demo the SEO credits you can claim with Gatsby site. Happy SEO!
### Ref links
1. [Why Gatsby](https://www.gatsbyjs.com/why-gatsby)
2. [SPA vs MPA](https://www.tekrevol.com/blogs/spa-vs-mpa/)
3. [Javascript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)
4. https://github.com/hurricanew/gatsby-starter-blog
Excel interview Questions
Published: 2022-12-07 04:37:00

Microsoft Excel is a go-to tool if you’re working with data. Starting from simple calculations to building reports, Excel has it all covered. Knowing Excel has become a necessity in today’s times. Organizations rely on Excel for storing and analyzing their data. So get ready with these interview questions to get hired in dream organizations 

{% embed https://www.youtube.com/watch?v=8rh2RpAjenQ %}
Bun.js
Tags: javascript, node, webdev, discuss
Published: 2022-12-07 04:10:46

## I love it, what do you think?
Bun.js is an incredibly useful and efficient Javascript package manager that has revolutionized the way developers access and manage their libraries. It is a powerful tool that allows for quick and easy installation of packages, as well as the ability to keep them updated and organized. Bun.js is a highly recommended package manager that is sure to make any developer's life easier and more efficient. It is an invaluable asset to any Javascript developer, and I highly approve of its use.
Open the React Native debugger on Android without shaking.
Tags: reactnative, bash, beginners
Published: 2022-12-07 04:07:14

So, I am sitting in a class with a bunch of students and I wanna try to code my app. However, every time I want to debug I have to shake the phone which is weird during class time so I had to research how to open the debugger without shaking. 

Here is how:

1. First, make sure you have the adb tool installed on your computer. If you don't have it, you can download and install it as part of the Android SDK (see https://developer.android.com/studio/command-line/adb for more information).

2. Connect your Android device to your computer using a USB cable.

3. Open a terminal or command prompt on your computer, and navigate to the directory where the adb tool is installed (usually something like C:\Users\username\AppData\Local\Android\Sdk\platform-tools on Windows, or ~/Library/Android/sdk/platform-tools on macOS).

4. In the terminal or command prompt, run the following command to list the connected devices:


```
adb devices

```
This command should output a list of the connected devices, including your Android device. The output should look something like this:

```
List of devices attached
emulator-5554	device
5e51b22d	device

```
5. In the terminal or command prompt, run the following command to open the debugger on your device:

```
adb -s 5e51b22d shell input keyevent 82

```

Replace `5e51b22d` with the actual device ID of your Android device from the output of the `adb devices` command. This command will send a key event to the device with the code `82`, which is the code for the "menu" key. On most Android devices, this will open the debugger tool.

Alternatively, instead of using the `adb` tool, you can also use the React Native Debugger app (https://github.com/jhen0409/react-native-debugger) to open the debugger on your device. This app provides a button that you can press to open the debugger, so you don't have to use the adb tool or shake the phone.

I hope this helps! Thanks!
C Programming Interview Questions
Published: 2022-12-07 04:04:45

C programming language was created by Dennis Ritchie for writing operating systems. It is one of the most popular programming languages because of its structure, high-level abstraction, machine-independent features, etc. C is also used a lot in low-level system programming, embedded systems, and hardware.

{% embed https://www.youtube.com/watch?v=MJ2N2CjHb4U
 %}
Road Blocks on top of Road Blocks
Published: 2022-12-07 03:48:21

Continuing from my previous Post I'm still working on the DSP 909 major Project which is a big contribution to any open source Project.

## What am I working on

I'm working on this [issue](https://github.com/cuttle-cards/cuttle/issues/237) from the [cuttle](https://github.com/cuttle-cards/cuttle) repository. It is essentially making an account settings page. Their isn't much design put into it from any one else so I need to make a design on my own.

## What have I been doing

Before starting my major contribution I wanted to learn more about cuttle and how it is built. I needed to learn about it's front end vue.js and the back end which is Sail.js. 

The other Part of it though is adding to the backed which is where most of my difficulty lies in. I need to learn more about the architecture of the back end to properly create a way of saving emails to user names.

## What Does my contribution mean

After talking to other members of the cuttle development team. I can see that my issue allows them to create extra things like email notifications, account recovery, etc.

## My Goals

from last time my goals were

1. I want to Learn how to Create A Vue.js Page

2. I want to Learn how to Style A Vue.js Page 

3. I want to Practice writing more tests

## Goal 1

### I want to Learn how to Create A Vue.js Page

I have partially completed this my PR isn't done yet but I have it in a working state where I'm almost ready to make a Pull request\

## Goal 2

### I want to Learn how to Style A Vue.js Page 

This task is almost complete as well. interesting note though I'm using scss which is interesting because my first PR in hacktober fest was about using it to style a project.

## Goal 3

### I want to Practice writing more tests

I think I want to change this goal to 

### I want to Learn how to work with Sail.js

This is turning out to be one of my more difficult tasks and I hope that I can complete it by the end of the week. But I think this is a goal that I can work on.
how to programming code-folding (maybe open source) like in Visual Studio Code
Published: 2022-12-07 03:40:29


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0t4rcl6vniimob147g99.png)how to programming code-folding (maybe open source) like in Visual Studio Code - where are the standard programming tool s  for that folding , we have jear 2022 , every university  have to have, 

!! Very nice example, which software/function/METHODE I would like to learn explained: code folding in Visual Studio Code. yeahhh . I copy a file in Visual Studio Code, AND THEN software has to run that goes through the file and notes the BEGINNING and END points of all hierarchical collapsible positions. AND if I CHANGE a few lines, the correct hierarchical folding and indenting is immediately recalculated - where the heck can I find this algorithm in many variants - I'm sure there are variant methods - and where is the algorithm explained line by line of code? where is a tutorial on principle, certainly with recursion


searching google for source-code-tutorial-VisualStudioCode-hiarchical-indent-clickable-fold-collapsible  --can t speak english--

found nothing useful


I programmed html-js-click-folding +with+complete+example+ , how do you do implement folding  today? how to programming collapse done egantly with a standard tool?

what is the exact name to search ?