teleren/devto huggingface dataset:
Performing Reverse Geocoding and Visualization of COVID-19 world cases using JavaScript
Tags: 100daysofcode, javascript, codenewbie, programming
Published: 2022-07-17 09:03:34

In this video, we will learn building COVID19 Tracker Application with Visualization using JavaScript and Mapbox. We will perform clustering of points based on the countries and each cluster will represent a set of locations within it that are prone to COVID19. 
Some of the features of the application are : 

1. Clustering of points to represent set of regions for all the countries on the Map. 

2. Reverse Geocoding using Latitude and Longitude to get the place name and getting the number of deaths and number of confirmed cases for each location that is present within the country. 

By the end of this video, you will learn a ton about the language to create your own projects.


{% youtube lX0vHaqtk6M %}

🐱‍💻 🐱‍💻 Course Links:
Complete Code - https://github.com/The-Nerdy-Dev
Visual Studio Code - https://code.visualstudio.com
Git - https://git-scm.com/downloads

--- 
Support my channel:
💜 Join the Discord community 👨‍👩‍👧‍👦: https://discord.gg/fgbtN2a 
💜 One time donations via PayPal
Thank you! 🙏

---
Follow me on:
👉 Twitter: https://twitter.com/The_Nerdy_Dev
👉 Instagram: https://instagram.com/thenerdydev
👉 My Blog: https://the-nerdy-dev.com
My Favorite Django 🦄 Template Filters
Tags: django, python, webdev, beginners
Published: 2022-07-17 08:46:54

🖐 Hello Guys!
In this tutorial you will become familiar my favorite django template filters.

## 1. Timesince
If you want to show the `date-time-field` of a django model in human familiar term you can use this filter like this:

```js
{{ field_date|timesince }}
```
and it will return you the time like `2 days ago` format

## 2. Linebreaks

If you want to show the text of a field of a django model as you write in the form (with spaces, and tabs) you could use this filter in template like this:

```js
{{ value|linebreaks }}
```

## 3. Truncatewords

If you want to display the first `n` words of a django model field in the template you can use this filter. For example if you want to show the first two words of the text you can use the filter like this:

```js
{{ text|truncatewords:2 }}
```
and the output will be like `Hello Python ...`

## 4. Urlize

If you want to make an url active of the text of a django model field you can use this template filter like this:

```js
{{ text|urlize }}
```

## 5. Wordcount

If you want to show the number of words of a django model field in the template you can use this filter like this:

```js
{{ text|wordcount }}
```
and it will return the number of the words in the template

## 6. Title 

If you want to show the text of a django model field in `Title Case` you can use this template filter like this:

```js
{{ text|title }}
```
You can use `|upper` and `|lower` for respectively `UPPER CASE` and `lower case`.

for a detail knowledge of django template filters and tags you can visit [djangotemplatetagsandfilters.com](https://www.djangotemplatetagsandfilters.com/)

👍Thank you for reading my post!
RTP LIVE
Tags: javascript, beginners, programming
Published: 2022-07-17 08:28:45

```
`var lastTime = localStorage.getItem(provider+"_lastTime");
  var currentTime = new Date().getTime();
  
  var time_rand = [300000, 360000, 420000, 480000, 540000, 600000, 660000, 720000, 780000, 840000, 900000];
  var random_time = (Math.floor(Math.random() * time_rand.length-1) + 1);
  
  var time_to_refresh = localStorage.getItem(provider+"_time_to_refresh") == null ? time_rand[random_time] : localStorage.getItem(provider+"_time_to_refresh");
  if (localStorage.getItem(provider+"_time_to_refresh") == null) {localStorage.setItem(provider+"_time_to_refresh", time_to_refresh);}
```
Make social solution network to solve big issues too
Tags: beginners, discuss, startup, webdev
Published: 2022-07-17 08:20:48

I want build a type of social network but less "social" only addressed network. You can post solutions to problem as member of group Java developers. Then your group can collaborate with others groups like "html coders" and "web dev team". When you post a programming issue the same problem can have others. If you want join a group you must accept some rules that verify that you are a skill person in java. The goal is earn some points.

What do you think of this project? could be interesting? Leave a comment after this one!
Add to the DOM with JavaScript
Tags: javascript
Published: 2022-07-17 08:17:48

I hate adding elements to the DOM using JavaScript. This is because it's really easy with jQuery, something I have to look up every time in JavaScript, and really easy in React. I pretty much learnt React to avoid doing it in JavaScript.

But I thought I'd post about it because then maybe I'll get it into my head. And if I don't, then I'll have this post to look it up on.

## appendChild
This appends to the end of the element. So this is how to add a paragraph to the end of a div with a class of .section.

```js
  const newElement = document.createElement('p');
  const newContent = document.createTextNode('This is a paragraph');
  newElement.appendChild(newContent);
  newElement.classList.add('paragraph');
  document.querySelector('.section').appendChild(newElement);
```
What each line here is doing:
1. Telling it we want to create a p element - giving it a name here means we can refer to it later by newElement. No need to pick it up using its class
2. Adding some content to the element - in this case it's some text
3. Adding the text to the element
4. Adding a class to the element so it can be referred to when styling
5. Adding this new element to the end of .section

## insertBefore
This inserts the element before another element.
```js
  const newElement2 = document.createElement('p');
  const newContent2 = document.createTextNode('This is another paragraph');
  newElement2.appendChild(newContent2);
  newElement2.classList.add('paragraph2');
  document.querySelector('.section').insertBefore(newElement2, newElement);
```
The main difference here is the last line. You give it the parent element, then in insertBefore the first bit is your new element to be inserted, then you tell it what to insert it before.

I find appendChild to be more intuitive than insertBefore.
Enjoy Programming-Themed Humor? Here's today's daily developer joke!
Tags: jokes, dailydeveloperjokes
Published: 2022-07-17 08:00:19

---
title: "Enjoy Programming-Themed Humor? Here's today's daily developer joke!"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12590a84b94.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What are computers' favorite snacks?

___A:___ Microchips, phish sticks, and cookies. But just a few bytes of each.
 -->
I am frusted, I yet to get an internship or a job. Please take a look
Tags: job, javascript, react
Published: 2022-07-17 07:37:24

```#frontEnd #reactJs #internship #jobs #hireMe #hiring```

## Hi everyone,
![Hire me please](https://thumbs.dreamstime.com/b/businessman-standing-holding-black-board-hiere-me-please-wording-72895608.jpg)

I am a Front-End Developer; I am looking for a job or an internship. Last, of the few weeks, I have applied for so many jobs but didn’t respond. As a skilled developer in your society doesn’t give us the opportunity for applying our knowledge. Everybody every time looking for an experienced person. But they didn’t try us as an internship to looking. Why is our society & world like this?

We are developers we are frustrated everywhere it has been more complicated & competition in the world. I haven’t thing about it that it will be more complex than getting a first job/internship.
So, please give us a low amount of salary as an employee or an internship. But at least give us an opportunity for apply our skills & give us an opportunity for gathering more experience. This speech everything from my mind emotional.
Last of the few months, the year I have learned it. But for once times give me/us opportunity.

My skills:
**Expertise**: HTML5, CSS3, Tailwind CSS, JavaScript ES6, React
**Comfortable**: ExpressJs, MongoDB
**Tools**: Git, Heroku, Netlify, Firebase, Vs Code, Figma, Postman, Vercel
**Familiar**-with: Redux, NextJs, Typescript, React Native, Stripe Payment, JWT

**Resume**: https://hr-meheraj.vercel.app/resume
**Portfolio**: https://hr-meheraj.vercel.app
HTML FOR BEGINNERS
Tags: webdev, html, javascript, css
Published: 2022-07-17 07:09:10

#### Here is a fast introduction to HTML, which is an excellent language to learn if you're new to web programming.


A Thread ↓ 🧵.

####WHAT IS HTML❓

<u>HTML</u> is a markup language that provides instructions to web browsers and informs them on how to display web pages for viewers.


> 
 The way fonts🔠, colors🌈, pictures🧸, and hyperlinks are presented on websites is defined by HTML and CSS.


HTML is also known as a language used to format webpages,it is required in order to construct a well-formatted web document, also known as a WEBPAGE.

**A WEB PAGE is what❓**

 

> 
A well-formatted document called a <u>Webpage</u> is used to share information online👨‍💻.

**Why are properly formatted documents on web pages necessary❓**

>
It  is necessary so that the layout of a websites can be good for reading

**👉Hypertext Markup Language** is what <u>HTML</u> stands for 🚹.


- 
<u>HYPER</u> is short for "hyperlink," which enables us to go across pages or within the same page. 

- 
<u>TEXT</u> is the information that will really appear on the website.

- 
<u>MARKUP LANGUAGE</u> is a set of tags used to format webpages so that they can be read by browsers like Firefox, Chrome, Safari, and others.

**How do Browsers work❓**

- 
Browsers are programs you install on your computer to read HTML files and displays it on the screen 🖥.

> 
Note that only the content enclosed within HTML tags is shown by browsers on Web pages.

```html 
<h1>HELLO WORLD </h1>
```
The Result of this code in the browser will be👇
          `HELLO WORLD `

- 
<u>HTML tag types</u>

**There are two different kinds of tags**

1️⃣  paired tags
2️⃣  unpaired tags.

- 
**Opening and Closing tags make up a Pair of tags**. example... 👇

```html
<h1>HELLO WORLD 🌎 </h1>
```
The first h1 that has less and greater than symbols indicates the opening tags,  While the second h1 indicates you are closing your tags by adding a forward slash.


**Unpaired tags/stand-alone tags as their name implies, these tags are single, unpaired, and stand-alone**. 
example... 👇

```html
 <img src="/picture.png">
```
 
This defines its open and closing tags.



### 
**What are the html features and restrictions?** 

👉<u>FEATURES</u>

1.  It is versatile.

2.  many different browsers support it

3.  highly effective language for webpage structuring. 

👉<u>RESTRICTIONS</u> 

1.  HTML's ability to design has limitations. So, we are unable to design websites that are appealing. So we use `html` and `css`.

2.  Does not support programming, Thus, we are unable to develop interactive web sites. As a result we use `javascript`.
How to Pitch an Article (and Get an Enthusiastic Response)
Published: 2022-07-17 07:01:54

**If you want to write about anything you’d like, as often as you’d like, there’s a place for that: Your own website. But sooner or later it will come time to learn how to pitch an article.**

Publishing posts on your own blog is a modern privilege that gives writers the freedom to digitally share their work publicly. And they can potentially reach any reader with an internet connection.

Can you imagine going back in history and telling that to professional writers who only wrote on paper? Scribes whose only readers were those in physical possession of their writing?

They’d surely be amazed.

But today we may miss out on ways to spread our writing, because we’re not as accustomed to the practices our writer predecessors had to use.

**Pitch an article like a pro**

I want to show you how to seize more contemporary opportunities with classic grit.

And the practice I’m going to talk about is pitching article ideas.

While you might be familiar with guest posting, I don’t think it’s often discussed as a practice.

A lot has to happen before more readers discover your writing, and one big obstacle blocks many internet-era writers …

**Our entitlement cup runneth over**

Since we’re so used to business blogging on our own sites, it’s natural to think our own style is acceptable on other sites.

The misconception is that once you find a site that has an audience you want to connect with, you can offer that site a typical article you’d write. You naturally expect to lock down a publishing spot on their editorial calendar.

While that experience is certainly possible, many publications aren’t interested in publishing a post that would appear on your blog.

Instead, they may be interested in your expertise and point of view, but they need you to craft an article that honors their [editorial standards](url). You need to craft content that would appear on their blog.

**In order to work, pre-internet writers had to follow a publication’s editorial standards.**

They didn’t have the luxury of publishing whatever they wanted, whenever they wanted. They had to learn to trust an editor’s vision. That was the only way to get their articles in front of new people and find loyal readers.
Sorting an array descendingly in C#
Tags: csharp, tutorial, beginners, dotnet
Published: 2022-07-17 06:58:37

Hey yo!
 

Wanna learn a couple of easy C# array methods ?


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

This will sort a given array in an ascending order
Array.Sort(example array);

This will reverse the order of a given array
Array.Reverse(example array);

Hopefully you learned something new :)
SSHFS device is busy
Tags: linux
Published: 2022-07-17 06:58:06

Sometimes I mount an SSHFS network share and when the connection with internet is lost I can not anything with this SSHFS device. I can't nor mount it again neither unmount it. This situation comes usually when I mount sshfs network share, forget about it and start VPN connection for a while. After disconnect VPN the SSHFS device is busy and all stuck...

 In this case I open terminal and paste these commands:

```shell
pkill -KILL sshfs
fusermount -u /mount/point
```

After running these commands I can mount again SSHFS network share.

You're welcome... :-)

If you want more tips follow me on Twitter: [@TexeChris](https://twitter.com/TexeChris):
1476. Leetcode Solution in java
Tags: java
Published: 2022-07-17 06:52:53

```
 
 class SubrectangleQueries {

    int[][] rectangle;
    
    public SubrectangleQueries(int[][] rectangle) {
        this.rectangle = rectangle;
    }
    
    public void updateSubrectangle(int row1, int col1, int row2, int col2, int newValue) {
        for(int i=row1; i<=row2; i++){
            for(int j=col1; j<=col2; j++){
                this.rectangle[i][j] = newValue;
            }
        }
    }
    
    public int getValue(int row, int col) {
        return this.rectangle[row][col];
    }
 }

```


#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/subrectangle-queries/
Dear Only Dark Mode Users ! FEAT : Light Mode 🔆
Tags: productivity, programming, webdev
Published: 2022-07-17 06:51:19

There ever been the time where you went deep in to the monitor screen just to concentrate on some code ?

There ever been the time where you minify your eyes because the text you are seeing is not clearly visible ?

I used only **dark mode** till today as I was struggling coding in my bright environment. I leaned in to the monitor eventhough the brightness was full. 

![Light Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bthquy3ngvs78iduuxde.png)

![Dark Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w328u01vvlzzgf3tfs3o.png)

If you're comfortable reading code in light mode in your current environment then thats light mode is for you.

As I always work in a well lit environment the light mode really helps see the code sharply. Just like 📝 paper and ink.

Its not just coding but on other places too! I felt more comfortable seeing in light mode in environment.

![Light Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpq2mgfwkc7mb3odmina.png)

![Dark Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/52io4c9mfxb25c7fd7d2.png)

**These preferences are going to change as the day progress.**
In the well lit environment seeing things in dark mode stresses eyes but goes oppositely in low light environment. 

## Take away !
So ultimately if you are doing a lot of coding in the low light, dark mode is best. If you are doing in day time I prefer light mode ( atleast for me ). 

I do both.

There never been one preference is better than other. Thats why its called preferences! 

Thanks & Cheers!
_Peace_ 🕊

---
## Try Our new product for free!
[DocsAI](https://docsai.app/) - Create AI support agents with your documents in the most affordable price, starts at **0$**. Don't need a bot , but need ai help on your docs just upload and start chating !

Using for a company ? [Check out our pricing](https://docsai.app/pricing) Just contact me for personalized pricing !

![docsAi](https://firebasestorage.googleapis.com/v0/b/shrihari-personal-storage.appspot.com/o/banner-docs-jpeg.jpeg?alt=media&token=45c47666-de2a-4e02-8881-beb6e43ce581)

---
1239. Leetcode Solution in Java
Tags: java
Published: 2022-07-17 06:46:52

```
class Solution {
    int ans = 0;

    public int maxLength(List<String> arr) {
        boolean[] flags = new boolean[26];
        dfs(0, arr, flags);
        return ans; 
    }

    void dfs(int p, List<String> arr, boolean[] flags) {
        for (int i = p; i < arr.size(); i++) {
            boolean[] prev_flags = flags.clone();
            boolean flag = true;
            for (int j = 0; j < arr.get(i).length(); j++) {
                if (flags[arr.get(i).charAt(j) - 'a'] == true) {
                    flag = false;
                    break;
                } else {
                    flags[arr.get(i).charAt(j) - 'a'] = true;
                }
            }
            if (flag == true) {
                int cur_ans = 0;
                for (int j = 0; j < flags.length; j++) {
                    if (flags[j] == true) {
                        cur_ans += 1;
                    }
                }
                ans = Math.max(ans, cur_ans);
                dfs(i + 1, arr, flags);
            }
            flags = prev_flags.clone();
        }
    }
}
```
#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters/
Reasons Why Python is Good for Beginners
Tags: python, programming, ai, machinelearning
Published: 2022-07-17 06:44:30

Everyone asks me which programming language should I learn first?. Which language do I choose, which one is beginner-friendly, how long will it take to learn the language, etc. are some of the questions that pop up.

In this blog, I will share some reasons why python is good for beginners!


![Reasons Why Python is Good for Beginners](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82oduv5a7ekdgsrx1v0p.png)

## Easy to Learn
The syntax of various other languages might seem very confusing to you when you have just started coding.

The syntax of this python is easy and this makes it easier to type and compile. For instance, if you want to build code that says “Hello World”, would require you to type around 4 lines in Java, wherein in Python, all you need to write is -print(“Hello World”)
`print("Hello World")`

## Readily Available Resources to Learn From
Python is an open-source language, which is free and can be used by anyone.

The internet is filled with Python programming courses and tutorials, which provide a broad scope of opportunities for beginners to actually hit and try to narrow down the niche in which they are better than others.

## The Extensibility Behavior of Python
Extensibility in software and languages refers to the ability of the software to extend to include new additions with minimal to no change in the existing code.

Simply put, it is the measure of how easily a new behavior can be added to its existing structure and code. Several programming languages like Tcl and Python, are highly extensible.

##Python is Best Known For Its Versatility
Python is a language that can be used in a range of different environments like web development, data science, game development, etc.

It has many applications. The vast versatility of this language allows developers to choose from a wide range of career options.


[View This on My Blog](https://jainil.dev/reasons-why-python-is-good-for-beginners/)
1310. Leetcode Solution in cpp
Tags: cpp
Published: 2022-07-17 06:42:43

```
class Solution {
 public:
  vector<int> xorQueries(vector<int>& arr, vector<vector<int>>& queries) {
    vector<int> ans;
    vector<int> xors(arr.size() + 1);

    for (int i = 0; i < arr.size(); ++i)
      xors[i + 1] ^= xors[i] ^ arr[i];

    for (const auto& q : queries)
      ans.push_back(xors[q[0]] ^ xors[q[1] + 1]);

    return ans;
  }
};

```

#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/xor-queries-of-a-subarray/
1996. Leetcode Solution in Python
Tags: python
Published: 2022-07-17 06:41:31

```
class Solution(object):
    def numberOfWeakCharacters(self, properties):
        """
        :type properties: List[List[int]]
        :rtype: int
        """
        properties.sort(key=lambda x:(-x[0], x[1]))
        ans = 0
        max_def = 0
        for _, cur_def in properties:
            if cur_def < max_def:
                ans += 1
            else:
                max_def = cur_def
        return ans
```
#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/the-number-of-weak-characters-in-the-game/
2001. Leetcode Solution in cpp
Tags: cpp
Published: 2022-07-17 06:40:10

```
class Solution {
 public:
  long long interchangeableRectangles(vector<vector<int>>& rectangles) {
    long long ans = 0;
    unordered_map<double, int> ratioCount;

    for (const auto& r : rectangles)
      ++ratioCount[(double)r[0] / r[1]];

    for (const auto& [_, count] : ratioCount)
      ans += static_cast<long>(count) * (count - 1) / 2;

    return ans;
  }
};

```

#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/number-of-pairs-of-interchangeable-rectangles/