teleren/devto huggingface dataset:
How to make money with your content?
Tags: devlive, blogging
Published: 2020-11-17 04:36:44

If you are spending so much time writing your articles and helping people solve problems, then what's wrong with getting paid for it?

Nothing right!

So today I'll show you how to make money with your content if you are on either one of these websites:

- Hashnode
- Dev.to
- Hackernoon

We will be using Coil to get paid, which is an amazing system, you buy a subscription and every hour you spend on one specific content page you'll get $0,36.

As you can imagine it won't make you rich, but this is all early days.

To give you an overview, these are my earning till this day:

![Uphold earnings](https://cdn.hashnode.com/res/hashnode/image/upload/v1605245440749/s7aZz-Wyz.png)

## How does it work

So to understand how this all works, there are two main systems.

- [Uphold](https://uphold.com/)
- [Coil](https://coil.com/)

If you're in the game to earn money, all you need is an Uphold account.

If you're also in it to give back to awesome writers, you can get a subscription at Coil and start paying other writers for the articles you read.

Once you've set up your Uphold account and created your default payment method, you'll be able to visit the "Add Funds" button on top and click "From Interledger Payment Pointer".

![Uphold payment pointer](https://cdn.hashnode.com/res/hashnode/image/upload/v1605246049010/8Tjw8pEJy.png)

You will need the link that it shows and starts with:

```html
$ilp.uphold.com/
```

## Getting paid on Hashnode

If you're on Hashnode you can easily add your payment pointer to your profile by visiting your dashboard.

Next click on "Integrations", at the bottom you will see:
Web Monetization Payment Pointer.

Paste your uphold link here.

![Hashnode uphold integration](https://cdn.hashnode.com/res/hashnode/image/upload/v1605246309811/kRaCJLdXh.png)

## Getting paid on dev.to

Next, up dev.to just as easily allows payouts.

We can go to our settings > Misc > Web Monetization.

There we can add our payment pointer link. 

![Dev.to uphold integration](https://cdn.hashnode.com/res/hashnode/image/upload/v1605246532263/mjb4v-UWO.png)

## Getting paid on Hackernoon

Hackernoon is another blogging platform, and it too can allow payments through uphold.

Once you are logged in on Hackernoon you'll be able to go to Rewards and add your payment link here.

![Hackernoon uphold integration](https://cdn.hashnode.com/res/hashnode/image/upload/v1605246812959/jIx_zKOpz.png)

There you go, three platforms where we can add our uphold payment link!

### 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)
Regex - Character Ranges
Tags: regex, webdev, codenewbie, beginners
Published: 2020-11-17 04:24:18

Ranges help in matching characters by specifying start and end characters.
```js
// Ranges are specified in [].
// Range specifies to match numbers & alphabets only from a to f
const colorRegex = /[0-9a-f]{6}/gi;

const colorCode1 = "#abc324";
console.log(colorCode1.match(colorRegex)); // ['abc324']

const colorCode2 = "#asc324";
console.log(colorCode2.match(colorRegex)); // null
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
On .NET Episode: GraphQL Schema Stitching
Tags: dotnet, graphql, webdev, aspnet
Published: 2020-11-17 04:14:37

With Schema stitching,  developers can create a unified GraphQL schema from multiple underlying GraphQL APIs. This gives us the benefit of reducing multiple data queries for our data in a single request from one schema.

In this episode,  Jeremy chats with the author of Hot Chocolate, Michael Staib, about how .NET developers can implement GraphQL schema stitching with Hot Chocolate.

{% youtube ODBR7kZHp-s %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).

#### Useful Links

<ul>
<li><a href="https://github.com/ChilliCream/hotchocolate-examples/tree/master/misc/Stitching" target="_blank">Schema Stitching Examples</a></li>
<li><a href="https://channel9.msdn.com/Shows/On-NET/Getting-started-with-HotChocolate" target="_blank">Getting started with GraphQL and&nbsp;HotChocolate</a></li>
<li><a href="https://docs.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-5.0" target="_blank">Create web APIs with ASP.NET Core</a></li>
</ul>
Understanding to Hoisting
Tags: javascript
Published: 2020-11-17 04:11:46

## What is Hoisting?

Hoisting is JavaScript's default behavior of moving all declarations to the top of the current scope (to the top of the current script or the current function).

## Variable
####Example of hoisting 
```
console.log(A); // Returns undefined, as the only declaration was hoisted, no initialization has happened at this stage 

var A = 'edward';
```
Explain for this one, the declare of `A` will push to the top of the current scope. But the value of `A` does not assign for now. See the code below.

```
var A; // Declaration
console.log(A); //Returns undefined, as only declaration was hoisted, no initialization has happened at this stage 
A = 'edward'; // Initialization
```
#### The let and const Keywords

* Variables defined with `let` and `const` are hoisted to the top of the block, but not initialized.

* Meaning: The block of code is aware of the variable, but it cannot be used until it has been declared.

* Using a let or const variable before it is declared will result in a `ReferenceError`.

```
console.log(A); // Uncaught ReferenceError: Cannot access 'A' before initialization

let A = 'edward';

//const similar to let.
```


## Function

One of the advantages of JavaScript putting function declarations into memory before it executes any code segment is that it allows you to use a function before you declare it in your code. For example:

```
displayName('Edward'); // My name is Edward 

function displayName(name) {
  console.log(`My name is ${name}`);
}

let displayName1 = displayName('Edward');
let displayName2 = new displayName('Edward');

console.log(displayName1) //underfined
console.log(displayName2) // {}
```

Even though we call the function in our code first, before the function is written, the code still works. This is because of how context execution works in JavaScript.

Reference :
https://www.w3schools.com/js/js_hoisting.asp
https://developer.mozilla.org/en-US/docs/Glossary/Hoisting
Displaying SharePoint Documents in a D365 CE Form
Tags: dynamics365, powerplatform, sharepoint
Published: 2020-11-17 03:52:45

Displaying SharePoint documents for an entity in Dynamics 365 CRM/CE has been a common requirement for a long time. For many years, the go-to fix was using an embedded IFrame on the form, pointed at the document relationship. However, this was always unsupported and was sure to break at some point...

It turns out it finally did. If you follow along with the original approach, seen [here](https://jlattimer.blogspot.com/2017/01/show-sharepoint-documents-on-main-form.html) on Jason Lattimer's blog, you'll find that the 'Upload' functionality now breaks if your organization has transitioned to the Unified Interface.

## The New Approach

It turns out, Microsoft has finally introduced a way to add this functionality out of the box. However, unless I've missed something, they haven't really talked about it anywhere. Hopefully, that's where this blog post comes in.

## Steps

Before starting, it is important to note that this only works on D365 CE online instances that have transitioned to the Unified Interface.

I also assume that you have already set up Sharepoint Document management for the entity in question.

1. Navigate to https://make.powerapps.com, and open the entity form that you want to add documents to.
2. Add a subgrid of 'related records' only, pointing at entity type 'Documents (Regarding)'
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/y1tl8oeugte7enyp7fcd.png)

- Important note: this subgrid can only be added using the **new** form editor. The 'Documents' entity will not be available in the legacy version.

After adding the subgrid, save and publish your form, and open it in the Unified Interface.

You should now see a new Documents sub-grid, with the same contents as under the --> Regarding --> Documents tab.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/msstfoh20bu4xhi28l6c.png)

Happy documenting! ✍
How to write to a CSV file in C
Tags: cpp
Published: 2020-11-17 03:33:26

## Writing to a CSV using C code
A basic CSV file relies on a comma-separated data format, which makes it straightforward to write to this file type from a c program.

First you will want to create a file pointer, which will be used to access and write to a file. Then we call `fopen` on this file pointer, passing in the name of the file we want to write to. In this scenario, I don't yet have a file called "MyFile.csv". A file with that name will automatically be created.

```
FILE *fpt;

fpt = fopen("MyFile.csv", "w+");
```
Next I will show how to use `fprintf` to write data to the file pointer. The line below shows how a row of column headers can first be written to the file. Notice how the values are comma-separated, and there is a "\n" at the end, indicating that it should go to the next row.

```
fprintf(fpt,"ID, Name, Email, Phone Number\n");
```

Once the header row is written, we can loop through our data, and write each index (in this case a person) to a row in the CSV file. The following would be placed in a loop, with each index being a different person.

```
fprintf(fpt,"%d, %s, %s, %s\n", id, name, email, phone);
```
After writing each row, we can close the file pointer.

```
fclose(fpt);
```

That's it! Your file will now contain however many rows of data have been written to it.
First Win - CloudKasthiram
Tags: googlecloud, cloud
Published: 2020-11-17 03:30:28

The first win as an ameture developer! The #cloudkasthiram is a competition organized by GDG Sri Lanka. The participants have to do selected labs in qwiklabs and complete the competitions. The winners will be getting a swag kit from GDG Sri Lanka!
![Confirmation Email](https://dev-to-uploads.s3.amazonaws.com/i/s9dxm4l8hb6uskt46pv6.jpg)
How did you get your first software developer job?
Tags: discuss, career, webdev, beginners
Published: 2020-11-17 03:10:30

I would love to hear how you got your first developer job.

What set you apart?

Did you have a Bachelors degree? Boot camp?

What advice would you give me? A developer that has been self employed for 3 years, now looking for a developer position.

In school, should I finish before trying?
Concrete Self-Documenting Code Strategies
Tags: codequality
Published: 2020-11-17 02:47:00

# Step 1: name things well. 

I have three posts on [Variables](https://winstonpuckett.com/posts/naming-variables-effectively/), [Functions](https://winstonpuckett.com/posts/naming-functions-effectively/), and [Classes](https://winstonpuckett.com/posts/naming-classes-effectively/) if it interests you. In these posts, I talk about **using the context and content** of the code to create solid names. Going through the exercise of naming and re-naming code as it evolves is the foundation of self documenting code.

# Step 2: Know what to document

Docunent anything that you would need to retain if you were to attempt a rewrite. That is, if the structure of the code changes, **what would need to stay the same for the application to be successful?** 

For a CRUD application, this means documenting individual validation and transformation rules. For a game, this might mean the list of actions a player can make.

Let namespacing take care of the fact that a module is a sub-module of a parent. Dependencies should not have to be explicitly called out to achieve self documenting code.

# Use comments when necessary

Complex operations are better documented and reimagined than not documented and rediscovered. Deadlines and incomplete domain understanding sometimes means that it's better to write a comment about what the code is supposed to represent, rather than leaving the comment off and letting the code misrepresent itself.

Don't be scared of writing comments. Be aware that when you run across a comment, it may be a candidate for refactoring.

# In Summary

- Name code appropriately
- Document the right stuff
- Use comments when the circumstance calls for it
New Youtube channel and  Free t-shirts Giveaway
Published: 2020-11-17 02:41:32

Hey Developer,
I just started a new youtube channel called Codeconia, 
I wish it could help someone to learn and sort out their problems.

https://www.youtube.com/channel/UC_klOvl59ySlBnXH4tKr5Og?sub_confirmation=1

I would also like to let you know about a giveaway, which we are conducting on this channel. we will be giving free T-shirts, to 5 people every month. To participate in the give away subscribe to the channel and comment. winners will be announced every month end.
Clear your local storage for consistent results
Tags: webdev
Published: 2020-11-17 02:24:26

Your test results may be affected by the state kept in your browser. It is recommended to clear your history and application storage to get consistent results.

There are several ways to accomplish this.

Open your site in Incognito or Private mode.

Another is to clean your history.

I also often end up creating a separate browser profile or Person in Google Chrome parlance for different applications.

Chrome DevTools also allows you to remove local storage for your site.
![](https://dev-to-uploads.s3.amazonaws.com/i/a9odgl42g3pbpda5iafj.png)

The fundamental reason to follow these practices is simple: you want consistent test results on all subsequent test runs whether they are automated or manual. You don't want previous tests or visits to your application to alter the results that you see.
Project 12 of 100 - Personnel Database with fetch()
Published: 2020-11-17 02:14:15

*Hey! I'm on a mission to make 100 React.js projects in 100 days starting October 31, 2020 and ending February 7th, 2021. Please follow my dev.to profile or my twitter for updates and feel free to reach out if you have questions. Thanks for your support!*

Link to today's deployed app: [link](https://100-react-projects-day-12-personnel-database.netlify.app/)
Link to the repo: [github](https://github.com/jwhubert91/100daysofreact/tree/master/day-12-fetch-personnel)

You don't have to tell me. Today's project is ugly. I mean U-G-L-Y. It has a tan background and minimal styling, and does almost nothing. However, after yesterday's Weather App project I wanted to practice using the fetch() API and handling promises in React. That means practice with conditional rendering. Today I followed the first part of [this](https://css-tricks.com/using-data-in-react-with-the-fetch-api-and-axios/) tutorial from CSS-Tricks.

##The App
In the tutorial, the author recommends using the JSONPlaceholder API in the first part to grab an array of user data. 

I usually like to switch things up just a little bit when I'm following a tutorial so I make sure I'm engaging with the material and really understand what I'm doing, so I used the Random User Generator API instead. It's also nice that their random users come with an image URL to easily give them a profile picture.

To create this application we use a single `App` component. The tutorial actually recommended something I never do which is write state as just a class object called state instead of using the constructor() method. I actually haven't done this before. Is that to avoid all of that `this` nonsense and not have to make any getters and setters?

```
class App extends React.Component {
  state = {
    isLoading: true,
    users: [],
    error: null
  }
  ...
}
```

##The fetchUsers() function
The core of this application is the fetchUsers() function which is a class method we call within componentDidMount(). It's actually the only line in componentDidMount(), which is nice.

The component starts with an `isLoading` state set equal to `true`. When and only when the fetchUser() method's fetch call to the API returns data we load the response data into the state `users` property as an array and set `isLoading` to false. This state change triggers the conditional render of user data.

And if there's an error we catch it with fetch's `catch(err)` built-in error handling and pass the error message to state. We render an error message if `state.error` is anything other than `null`.

##Takeaways
The way my rudimentary, dilettante self tried doing conditional rendering while waiting for an API response yesterday was basically a series of different, bespoke checks for data in state. That was dumb.

The CSS Tricks tutorial presents a demonstrably better, intuitive, more robust way of doing this by simply having a property in state that tells the rest of the application whether or not the API call is done.

5/5 stars - would code again. Next time I'll populate a nice table and have bootstrap in there so it looks better.
Automatically change your Twitter background every 5 minutes
Tags: beginners, php, bash, systems
Published: 2020-11-17 01:40:31

**Why?** I couldn't decide on what Twitter banner to use after cleaning up all my angry political tweets.

I eventually started to look at my generic wallpapers and thought, "Which one of these many landscapes represents me as a person?" All of them, obviously.

It seemed like the only logical solution would be to create a script to cycle backgrounds like you can on your desktop. 

**Github:** https://github.com/mattkenefick/twitter-backgrounds

Here are the basic instructions, assuming you're on a server of some type with PHP.

```
git clone https://github.com/mattkenefick/twitter-backgrounds
cd twitter-backgrounds
composer install

# Follow the instructions for ENV variables and crontab
```

After you're all setup, you should find your Twitter background changing every X often.

Here are some cron examples for you:

```
# Every five minutes
*/5 * * * * php /path/to/twitter-backgrounds/index.php

# Every thirty minutes
*/30 * * * * php /path/to/twitter-backgrounds/index.php

# Every day at 8am 
0 8 * * * php /path/to/twitter-backgrounds/index.php
```

Have fun.
My First Hacktoberfest
Tags: hacktoberfest, obsidian, markdown
Published: 2020-11-17 01:40:28

# My First Hacktoberfest

I have been on Github for a few years. Though I rarely had any projects or repositories to show for it. In the past year or so after starting my Tech oriented [YouTube channel](https://www.youtube.com/c/BryanJenksTech?sub_confirmation=1) I finally started putting out real projects and code people could make use of.

---

Some of my other interests include productivity apps, tools, and workflows. Academia is a strong interest of mine, and with that learning methods and note-taking.

A really great personal knowledge management application that is Free to use but not yet Open Source is the [Obsidian](www.obsidian.md) Application. 

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

It's an electron-based application that looks at a directory fill with markdown notes and provides networked linking of notes, searching, and tagging capabilities, and far far more.

I make a lot of videos about Obsidian on my channel as well as how to mix code-based approaches to knowledge management:

{% youtube Ewhfok91AdE %}  

---

For this Hacktoberfest, I really didn't attempt to participate more than I normally do on Github as I'm always actively contributing to FOSS. I didn't even really hear about Hacktoberfest very much until I saw videos by 

{% user eddie jaoude %}

There was a repository where a lot of the CSS customizations the Obsidian users created were being aggregated. This was a great project as it made finding a lot of the commonly seen features in other people's custom themes available to others. I had a lot of these pieces collected as well as links to the original posts and messages they came from and started adding multiple pull requests to add my collection to the repo:

{% github kmaasrud/awesome-obsidian %}

---

Ultimately all I did for Hacktoberfest was request the owner of the repo tag their repo with `#hacktoberfest` so that all the pull requests I had already merged would be counted.

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

Next year I plan to be a bit more targeted in my approach to contribute and will try to be even more active!
Linted and made it Prettier. Rebased again. Final weeks very near
Tags: opensource
Published: 2020-11-17 01:35:07

Hello alllllll. It's me again back with a new update on my journey. This week was pretty heavy as I am reaching towards the end of my junior year 1st semester. It's always heavy during the last days of a semester, so it was no surprise. So, got busy dealing with all types of assignments, tests, and labs. That's why a bit late with my update on the journey. Anyway, let's get back into the topic at hand.

I started working on my CLI app by adding a Source Code Formatter to my program. I added something called "Prettier", it is something we developers call a "miracle" level program. This literally fixes anything related to syntax, whitespaces, snake-type code writing, etc. After implementing Prettier to my CLI, ity literally changed the face of my program and made it more mature and beautiful. Like wow, literally no more extra whitespace, all perfectly aligned, etc. It's like someone worked on my code for 2 days just fixing up whitespace and changing the code style to make it better. Expected something similar but never this much, very glad that I added prettier to my app.

The second thing I want to talk about is I also added a linter soon after Prettier called "eslint" to my CLI. what a linter does is, fixes silly mistakes which don't usually get caught often, and gives warnings if something is going wrong (by giving future updates to avoid leading to a bug). This is what you will call is a 2nd brother. 1st place is taken by Prettier, so it is the 2nd family member you can have on your program. It fixed bad code for you. Sounds cool, eh? Yep, it is very cool.

The 3rd thing I want to all about is did a rebasing again. I know it is not a big deal, but it excites me very much lol, cause I never did anything git before I started working with my CLI app. Learning lots of new things every day. So, doing a rebase for the 2nd time made me happy. Anyways, want to give you guys an update on what I am doing with my days as final weekdays are approaching. I talked to myself and decided that I will cut down my time a lot, and make sure I keep up to date with the works I will be receiving in the coming days. That way, I won't get fall behind. I'll post the link to the git commit I just made below this blog post.

I would like to thank you for reading this lot and will be making sure to update every time I do something related to programming. Thank you for your time and I will see you guys in my next blog post.

LINK - 

[Rebased Commit](https://github.com/Niaz-Ul-Haque/nlinks/commit/381f0a53aaab2117b6583d27c3217d50513ea4d1)