teleren/devto huggingface dataset:
Your next Mini Project using dev.to api
Tags: react, portfolio, javascript, html
Published: 2021-01-14 05:11:38


* I used dev.to api to display my blogs on my portfolio.
* Recently when I participated in a hackathon I used to to display the user's blogs along with search bar.
```
let btnDev=document.querySelector('#devbtn')

     fetch('https://dev.to/api/articles?username=powercoder')
    .then((response)=>
    
            response.json()
        )
    .then(data=>{
        let output='';
        data.forEach((element)=>
        {
            console.log(element)
           output+=
            `       <div id="grid-item">
                    <div>
                    <h4 class="titleblog">${element.title}    <i class="fas fa-heart text-danger"></i>${element.positive_reactions_count}</h4>
                    </div>
                    <div>
                    <a href=${element.canonical_url}><button class="btnc">Read more</button></a>
                    </div>
                    </div> 
            `
           

        }
    )
    document.querySelector('#grid-container').innerHTML=output;
    })
            .catch(err => console.log(err));
```
* The above code snippet is used to fetch your blogs whenever you click the link of a button.

 **Explanation** 

* So first use DOM manipulation to fetch the button whenever you click it you get blogs of yours. Then I used fetch api to fetch the blogs and it returns a promise which resolves to a response which is either successful or not.
* So after the response convert into json format and then it returns an array of blogs written by the user.
* I used grid and some HTML to display my blogs along with likes and heading.
* The below picture is reference from my portfolio where I used dev.to to fetch blogs.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fd83y5a7pxq4hub7i48a.JPG)

* You can do this in react also it is a very good project to understand basics of react where you can create a search box and you can search for blogs of different users.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/whmkznt84j6p382a39rq.JPG)

* You can check the below project for reference. https://github.com/tejaswini22199/DevFolio
栗原vs井上ライブ 放送 2021年1月14日
Published: 2021-01-14 04:46:24

Boxing News（ボクシングニュース） . あす井上拓真と対戦の栗原慶太 強
打炸裂に活路 ビッグネーム下して世界に近づけるか . 15時間前 日刊スポー
ツ . 栗原慶太「ＫＯ狙う」井上拓真とのＶ２防衛戦に自信 . 14時間前 スポ
ニチ . 井上拓真、1年2カ月ぶり再起戦で東洋太平洋王者に挑戦 前日計量ク
リア「早く試合がしたい」 .
ライブ: https://kuriharavsinoue.live/
What You Need to Know Before You Get Started
Tags: sharepoint, sharepointonline, productivity, microsoft365
Published: 2021-01-14 04:37:38

Hey guys,

I collected some of the most common basic questions I get about SharePoint Online that seems to confuse clients/customers and created a video for it. I don't dive in-depth about how to use SharePoint Online, but I'll be getting to that soon as well!

####Topics:

I've covered these topics:

1. What is SharePoint Online?

2. Team Site vs Communication Site

3. Permissions

4. Document Libraries vs Lists

5. SharePoint Online Limitations

6. How Storage Works in SharePoint Online

7. How Recycle Bin Works

8. Retention Policies to avoid accidental deletion

9. Sites vs Site Collections

10. Subsites

11. Pages

12. Hub Sites/Hubs

13. SharePoint Admin Center (very briefly)
{% youtube 8enjxKqgtJ0 %}

I would appreciate some honest feedback on the video, since this is the first ever video I'm putting up. I'm hoping to do much more related to Office365/Microsoft365.

This is also my first post on dev.to, I've only made the video for now, but I will be working on an article on the same topics to post on here.
Tic Tac Toe
Tags: mlh, majorleaguehacking, localhackday
Published: 2021-01-14 04:13:38

I am a first-year student who was introduced to programming just a month ago. I was learning basics and trying to ace it. Just after a month one of my friends told me about Major League Hacking (MLH). 
*** From official website ***

Major League Hacking's Local Hack Day is a series of simultaneous global events designed to spark a passion for technology in your local community. Spend the day getting hands-on experience and collaborating in an open and welcoming environment at a local event.* Whether you are learning to code or are an expert hacker, Local Hack Day is the perfect opportunity for you and your community. Learn new skills, build new projects, and share your creations at a Local Hack Day near you.

This year, they are doing things differently. You can now host a talk or workshop, a hack day, and a demo day for your community. We are focusing on the three important skills - Learning, Building, and Sharing.

*** From official website ***

I was not so confident about it but I thought it to give it a try and I'm glad that I tried. This is not about the competition only, It is more like fun. We played the chrome dino game, designed a mascot, build my first website, and deployed, learned to use git and Github, and a lot more. Meanwhile, I learned to program my favorite childhood game, Tic-Tac-Toe. You can try it here "https://github.com/pawanbgs0/MLH-local-hack-day/blob/main/TicTakToe.c" but never challenge me, you'll be disappointed.
How to Compare Decimals in JavaScript
Tags: challenge, tutorial, javascript, webdev
Published: 2021-01-14 03:50:57

Today we are doing a little debugging and dealing with decimals in JavaScript. 

**Disclaimer:** There are MANY ways to solve this problem this is an answer that I would see or use in a coding interview and would accept as a proper answer

**TLDR:** Solution is at the bottom of the post

## The Problem
Fix this function:
```javascript
function addAndCheckEqual(num1, num2, num3){
    return num1 + num2 === num3
}
```
Tests:
```javascript
      areEqual(1, 2, 3) //true
      areEqual(11, 12, 13) //false
      areEqual(10, 10, 20) //true
      areEqual(.1, .2, .3) //true
      areEqual(1.1, 1.2, 1.3) //false
      areEqual(1.1, 1.2, 2.3) //true
```
## Solution
We need to create a function that accepts 3 numbers.
```javascript
const addAndCheckEqual = (num1, num2, num3) => {

}
```
The answer you may find a lot will use [Math.abs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs) (to get the absolute value of the number) and [Number.EPSILON](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON). Number.EPSILON is just the, “smallest possible "increment" you can represent with that particular floating point type” ([from the article referenced below](https://dev.to/alldanielscott/how-to-compare-numbers-correctly-in-javascript-1l4i)). 
```javascript
const addAndCheckEqual = (num1, num2, num3) => {
    return Math.abs((num1 + num2) - num3) < Number.EPSILON;
}
```
The answer above will run into times that it will give the wrong results. For example: addAndCheckEqual(10000001.1, 0.2, 10000001.3) will return false when it should return true. 

The only way to really make sure you are getting the correct response you need to set your own tolerance. If you want to go to .001 and that is a close enough comparison for you then use that. There is a really great article that dives deeply into why Number.EPSILON doesn’t always work and what a good tolerance to set is, [here](https://dev.to/alldanielscott/how-to-compare-numbers-correctly-in-javascript-1l4i). But at the end of the day a good tolerance depends on how accurate your numbers have to be. An example of how to set your own tolerance would be this:
```javascript
const addAndCheckEqual = (num1, num2, num3) => {
    return Math.abs((num1 + num2) - num3) < .000000001
}
```
I hope you had fun with this one! Please leave your repo links to your form in the comments section. Also let me know if you like the multi day challenges or really hate them! If you have any challenge you would like to see done also leave that in the comments below you may see it come up! If you would like to get the challenge emailed to you every day in morning and a notification when the solution is posted subscribe [here](https://lp.constantcontactpages.com/su/p9lFW6y/ChallengeSignUp).
Interview question(s) about  concepts you don't interact with often, if at all
Tags: csharp, career, discuss
Published: 2021-01-14 03:11:41

![Technical Interviews](https://dev-to-uploads.s3.amazonaws.com/i/s57aj89c0nzli7zxpeqd.png)

<p>TLDR: How do you answer a question in the interview where you've never found a use for the thing being asked about, so you never learned it?</p>


<p>I'm interested how others have handled this situation in a technical interview.</p>


<p>What do you say when asked about a specific technology/concept/keyword during a technical interview that you have never used so therefore you can't speak on it?  Keep in mind, it probably wasn't listed in the job requirements either.</p>


<p>For example, I was asked</p> 


'**_What is the difference between var and dynamic?_**' (this is c# btw)


<p>Honestly I didn't know. I use var all the time, but not dynamic.  As I looked it up later, with the definition being</p>

> With var the type is set at compile time where as dynamic, type is set at run time.

<p>That lead me to think </p>

'**_Is dynamic something I'm missing out on?  How have I gotten so far without ever using it?_**'
 
<p>Further reading seems to indicate that</p>
> dynamic was primarily a way to allow C# to interop with languages such as Python, which is not statically typed

<p>Ok, so I personally haven't done this, but this lead me to wonder </p>

'**_Does this job do this often and that is why they asked?_**'.

<p>Now, when I get asked this type of question I tend to answer it to the best of my abilities, and I now reply with </p>

'**_Interesting question, I haven't found a use case for that.  Can you explain when and how you've used this here?_**'

<p>I'm not even being sarcastic, I honestly would like to know in what scenario they have used dynamic enough to warrant asking this. There is a limited amount of time in an interview to judge a candidate, why did you choose this concept? </p>

**_Is it that important_**?

<p>I've been asked the same question but with different technologies/concepts/keywords like 'Explain Delegates'.  I know that a delegate is passing a function as a parameter, but I don't think I've ever typed </p>
```c#
public delegate void MyDelegate(string msg);
```
<p>Does it have its uses, I think so but I've never used it and yet</p>

* my code compiles
* my unit tests run 
* my work items get closed


So, after my long ramble, I would like to ask you dear reader?  

**_How do you answer questions like this, when you haven't used the specific concept at all_**?
My First Ruby Gem
Published: 2021-01-13 16:50:42

Over the past week I built my first CLI application, Solar System Weather. Solar System Weather gives you the current weather data for a location on earth, and then compares that information to another planet in our solar system. I learned a few things building it, and some other things I already learned were reinforced.
What did I learn?
1.	Start out on your local environment
I ran into some minor problems by starting on GitHub. It seems that for a ruby gem like this I would have been better off starting by setting up the structure of my gem locally. Going back and forth from my local environment to git and reorganizing and deleting directories and files was a bit of a headache that would have been easy to avoid, especially if I had thought more about how my application would be structured.
2.	It’s usually a simple problem
A few times while building Solar System Weather I ran into errors I found difficult to fix. The issue that might have stumped me for the longest time was one where I was not getting any error. I had a line in one of my classes that was holding up the program, and not giving me any error message. `puts gets` I don’t know what I put that line in for but it was difficult to find. After some frustration I found the line by inserting some `binding.pry` lines in various spots to see if I would hit them. The lesson here is to look for the simple error first, and to have a methodology for fixing problems.
3.	Someone else might have done the work for you.
One of the biggest short comings of Solar System Weather is where the solar system information comes from. The first thing I would do to improve this program is use a scrapper to collect the facts from somewhere on the internet, instead of having them hardcoded into the program. This could add a lot of variety and depth to the application. The only downside of doing this would be the additional reliance on someone else’s site, but for something like this that isn’t a big issue.
ptp config
Published: 2021-01-14 03:10:12

```linux
systemctl stop libvirtd
systemctl disable libvirtd
cd /usr/share/doc/packages/sfptpd/
taskset -c 23 sfptpd -i p3p2 -f ./config/freerun.cfg

taskset -c 23 sfptpd -i p1p2 -f ./config/ptp_slave.cfg
taskset -c 23 sfptpd -i p1p2 -f ./config/ptp_master_ntp.cfg
taskset -c 23 sfptpd -i p1p2 -f ./config/ptp_slave_ntp_fallback.cfg

vim ptp_master_ntp.cfg
```
Leverage Renovate for Easy Dependency Updates
Tags: ci, automation, githubactions
Published: 2021-02-09 22:57:20

---
title: Leverage Renovate for Easy Dependency Updates
published: true
date: '2021-01-14 02:42:20 UTC'
tags:
- ci
- automation
- githubactions
canonical_url: https://www.sheldonhull.com/microblog/leverage-renovate-for-easy-dependency-updates/
---

Renovate is a great tool to know about. For Go, you can keep modules updated automatically, but still leverage a pull request review process to allow automated checks to run before allowing the update.

This is particularly useful with Terraform dependencies, which I consider notoriously difficult to keep updated. Instead of needing to use ranges for modules, you can start specifying exact versions and this GitHub app will automatically check for updates periodically and submit version bumps.

Why? You can have a Terraform plan previewed and checked for any errors on a new version update with no work. This means your blast radius on updates would be reduced as you are staying up to date and previewing each update as it's available.

No more 5 months of updates and figuring out what went wrong 😁

Here's an example json config that shows how to allow automerging, while respecting minor/major version updates not enabling automerge.

Note that you'd want to install the auto-approver app they document in the marketplace if you have pull request reviews required.

In addition, if you use `CODEOWNERS` file, this will still block automerge. Consider removing that if you aren't really leveraging it.

{% gist https://gist.github.com/sheldonhull/f36ea328a2167e93a7015906beb08bbe %}
AWS S3 Iterator in TypeScript
Tags: s3, aws, typescript, iterator
Published: 2021-01-14 02:32:26

Amazon Simple Storage Service (Amazon S3) is a very popular object storage service that offers industry-leading scalability, data availability, security, and performance. It allows you to virtually store unlimited number of files (objects). AWS provides [JavaScript SDK](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html) to interact with S3 APIs. You can use `aws-sdk` to do variety of things like getting the list of objects in an S3 bucket, upload an object, download the object etc.

While working with it recently, I figured it would be handy to use the Iterator pattern to fetch files from s3 in a loop using `for await...of`. So came up with a basic implementation below. Please provide your feedback

{% gist https://gist.github.com/dnafication/097dedf048abdc1c92a8c1f890ced2f7 %}

Downside of this pattern or the code above is that only 1 file is processed at a time as we are awaiting the download of the file and processing it before moving to the next iteration. We could use `Promise.all` with regular loops. Do you guys think its doable in this pattern?

One improvement I definitely want to see is to only load next set of keys when we are running out of objects in the `keysList` instead of loading all (currently using `loadKeys()` function). Can someone fork and build that out? 😉 ciao!!
RAIH PENGALAMAN BELAJAR YANG SERU DENGAN BEASISWA LUAR NEGERI
Published: 2021-01-14 01:54:10

Banyak orang yang mendambakan bisa menempuh pendidikan di luar negeri. Memang tantangannya sangat besar, namun berbanding lurus dengan pengalaman yang didapatkan. Tak jarang impian tersebut semakin menguat karena adanya beasiswa luar negeri yang mampu menyokong pendidikan serta kehidupan disana. 
Beasiswa Australia Awards
Beasiswa ini diberikan oleh Department of Foreign Affairs and Trade Australia. Tak sembarang negara mendapatkan tawaran ini. Hanya negara yang memiliki kerjasama regional dan bilateral saja yang berhak untuk penawaran tersebut. Lokasinya yang tak berjauhan dengan Indonesia menjadikan beasiswa ini banyak peminatnya. 
Russian Government Scholarship
Pemerintah Rusia termasuk salah satu pemberi beasiswa yang sangat beragam. Banyak beasiswa yang dibuka untuk lulusan SMA maupun SMK. Meski beasiswa diberikan oleh pememerintahan Rusia, namun sesi perkuliahan bagi mahasiswa internasional tersedia dalam bahasa Inggris. Meski begitu, sangat penting mempelajari bahasa Rusia untuk memudahkan komunikasi dengan banyak orang. 
Beasiswa Erasmus Mundus
Salah satu beasiswa yang banyak diincar adalah Erasmus Mundus. Beasiswa yang didanai secara penih oleh Uni Eropa ini diberikan khusus untuk mahasiswa dari negara Uni Eropa maupun non Uni Eropa. Yang menyenangkan dari beasiswa ini adalah adanya biaya kuliah penuh, biaya transportasi, asuransi perjalanan hingga uang saku bulanan. Tak heran jika banyak sekali yang ingin melanjutkan S2 dengan pembiayaan dari Erasmus Mundus. 
Holland Scholarship
Ingin melanjutkan kuliah di Belanda tanpa pusing memikirkan biaya? Coba saja manfaatkan beasiswa yang diberikan oleh Kementerian Pendidikan, Budaya dan Ilmu Pengetahuan. Kementerian ini bekerja sama dengan beberapa universitas, baik yang fokus mempelajari ilmu terapan maupun riset.
Beasiswa yang ditawarkan bisa digunakan untuk menempuh pendidikan S1 maupun S2. Biaya yang diberikan pun cukup besar. Holland Scholarship bisa diakses oleh pelajar yang ada di luar area Holland, termasuk oleh pelajar di Indonesia.   
Dana akan disalurkan sebanyak sekali saja, yakni pada tahun pertama menempuh studi. Beberapa universitas yang bekerja sama dalam program ini antara lain Utrecht University, University of Groningen, Universita of Twente, Leiden University dan Delft University of Technology. Pendaftaran beasiswa langsung dilakukan melalui universitas yang bekerja sama

Referensi : https://www.rifqifauzansholeh.com/
Tutorial: Sorting ~1761 subreddits to see which subreddits are popular
Tags: beginners, javascript, tutorial, programming
Published: 2021-01-14 01:40:48

Hi, I am researching of subreddits to make my next product. I want to get an overview of how I sort subreddits.

This will use vanilla JS.

## 1. grab the subreddits data from here https://pastebin.com/XVBDM4jn (copy the raw paste data)

Copy the json data to your html code like this (and don't forget to parse it)
```javascript
<script>
let json_subreddits = JSON.parse(`//the copy pasted json data`)
</script>
```

## 2. We need to sort the subreddits from most popular to least popular. We need to use sort() function.
But the problem is our data is an object, and not an array.
To convert it, we need to iterate the object
```javascript
let json_subreddits = JSON.parse(`the copy pasted json data`);

let sortable = [];
for (let subreddits in json_subreddits) {
sortable.push([subreddits, json[subreddits]]);
}
```
now we have an array

## 3. Use sort function
```javascript
let json_subreddits = JSON.parse(`the copy pasted json data`);

let sortable = [];
for (let subreddits in json_subreddits) {
sortable.push([subreddits, json[subreddits]]);
}

sortable.sort(function(a, b) {
    return b[1] - a[1];
// this will return from big to small. to inverse it, just switch the a and b
// return a[1] - b[1];
});
```

## 4. Console.log(sortable) to see the result
And you can view subreddits in your console. Enough to give you which subreddits are popular and which are least popular.

If you like this, you can follow my journey live on Twitter https://twitter.com/RicardoSawir
New Year: New Goals
Tags: career, webdev
Published: 2021-01-14 01:30:30

Last fall, I started blogging. However, I took a break and didn't get back to it. I plan to start again but will aim for two posts monthly. I believe more practice writing posts will result in better content.

Things I'm working on now:

1. I decided to do the devchallenges full-stack path. I'll be writing about my progress.

2. Made significant progress with Python. I hope to use Django as part of the devchallenges path.

3. I'm going to earn AWS certifications. The plan is first the cloud practitioner, and than solutions architect.

4. Learn more about Docker and Kubernetes. Currently, using Docksal for a volunteer work. I would like to know more about it.

5. I want to hone my SQL skills, so I plan to expand knowledge with PostgreSQL.

Resources:  
[devchallenges](https://devchallenges.io/)  
[PostgreSQL Tutorial](https://www.postgresqltutorial.com/)    
[Docker and Kubernetes - Full Course for Beginners](https://youtu.be/Wf2eSG3owoA)    
[AWS Certified Cloud Practitioner Training 2020 - Full Course](https://youtu.be/3hLmDS179YE)    
[AWS Certified Solutions Architect - Associate 2020 (PASS THE EXAM!)](https://youtu.be/Ia-UEYYR44s)  

_Photo by Matheus Bertelli from Pexels_