teleren/devto huggingface dataset:
Create a simple paint app using react-canvas-draw
Tags: react, beginners
Published: 2021-03-08 13:05:45

Create a react app and install react-canvas-draw dependency
`npm install react-canvas-draw --save`

We shall use a functional component to include the CanvasDraw component
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fcluiu8sc41il9zsod5y.png)

This a basic setup where only few props are used. We now have a canvas component where the brush colour ,width has been set.The grid lines have been hidden.

For more props refer [https://www.npmjs.com/package/react-canvas-draw](https://www.npmjs.com/package/react-canvas-draw) 

Undo and clear features can be included using reference to the component
Read more about it here [Refs and the DOM](https://reactjs.org/docs/refs-and-the-dom.html)

` ref={(canvasDraw) => (this.modify = canvasDraw)}`

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7q4yav0k53d4l10v36ht.png)

 
Next let's accept user brush size and colour selections.We shall be building a palette from scratch.
You can also try [react-colour-palette] (https://www.npmjs.com/package/react-color-palette). A color picker component for React.

Since we are using react hooks in this app we shall begin by importing *`useState`* hook from react
`import {useState} from 'react'`
Read more about hooks [What is ReactHooks](https://reactjs.org/docs/hooks-intro.html)

First we shall set the initial state of the colour and width of the brush.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ey1wxjf7apqky3rjhqib.png)
 
* canvas is initialized to the value given as an argument to the useState 
* setBrush is the function used to modify the value of canvas
* brush is initialized to value 50
* setThick is used to modify the value of brush thickness

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qo91v4lm4qru4bb6ol5x.png)
The modified ReactCanvas component

So we shall use input element of type *color*
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e75h7o8xmzi8vlxj07yy.png)
Whenever the input element changes our brush colour variable *canvas* changes.As stated earlier we shall be making use of setBrush function to change the colour.

To change the brush thickness 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vckgjjimoyukdjshm9d.png)
 
The thickness here shall vary between 2 and 50.
One can further add more features.
The complete code can be found [here](https://codesandbox.io/s/reverent-grass-0sh2f?file=/src/Diagram.js)
電子メール、連絡先、カレンダーでNSFをPSTに変換するOutlook用LotusNotesツール
Published: 2021-03-08 11:30:44

Lotus NotesからOutlookへのコンバーターは、LotusNotesメールボックスエンベロープをOutlookに送信するための信頼性が高く安全な電子メール再配置アプリケーションです。ユーティリティライセンスリリースを購入する前に、<b>GainTools <a href="https://www.gaintools.com/nsf/pst/">NSFからPSTへのコンバー</a></b>タソフトウェアを選択して、アプリケーションの動作とハイライトを理解してください。

Lotus Notes for Outlookは、今日の典型的なシフトタスクになっています。どちらも、ある場所から次の場所へと情報を交換するための、よく知られていて広く使用されている電子メールアプリケーションです。

さらに、Lotus Notesは、さまざまなDomino情報ベースおよびアプリケーションで使用できます。すべてのメッセージ、連絡先、その他のデータを.nsfレコードに保存します。

反対側の視点は、個人情報マネージャーとしても話しました。これは、Microsoft OfficeSuiteの側面です。人口のほとんど1,000,000人が、Outlookアプリケーションを使用して、ある時点から次の時点で情報を送信/取得します。ハードドライブ上のメッセージ、名簿、カレンダー、割り当て、記録、ファイル、カレンダー、その他のものを監視するのに役立ちます。同様に、連絡先、メッセージ、時間など、接続された情報ベースを保存するための唯一のPSTオーガナイザーを作成します

終わり：

Lotus Notesオーガナイザーをメッセージ、連絡先、およびカレンダーとともにOutlookに送信するための2つの手法。手動戦略は実行に受け入れられますが、多くの欠点がそれに関連しています。 Lotus NotesをOutlookに変換する手動の戦略と比較した場合、外部配置は即時かつ安全な方法です。 10個の初期NSFをPSTと無料で交換できる機器の無料デモをダウンロードして、製品の動作を体験してください。
Are SEO Ranking Factors important for an eCommerce business
Published: 2021-03-08 13:05:00

Top-rated eCommerce website development company to help you boost online store engagement and increase brand exposure. We take pride in building a powerful eCommerce solution that is search engine friendly, increases your conversion rate, and grow your online sales by more than 70%.

https://www.zinavo.com/blog/are-seo-ranking-factors-important-for-an-ecommerce-business.html
Daily Developer Jokes - Monday, Mar 8, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-03-08 13:00:05

---
title: "Daily Developer Jokes - Monday, Mar 8, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20Mar%208%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125994c8f5a.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*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___: Did you hear what the clumsy cryptographer did to their password?

___A___: Made a hash of it.
 -->
Nevertheless, she coded: Hannah Masila
Tags: wecoded
Published: 2021-03-08 12:23:51

Happy International Women's Day!✨💖👯



### My name is just Hannah, but my friends call me Maslah.

## Where do you work?
I am currently a freelance developer

## Who or what inspired you to pursue the career you have today?

Love. I studied computer science in pursuit of love, and when love didn't work out, I started programming to spend time with my best friend who was a geek

##  What is your favourite music genre?

I enjoy Reggae and Bongo Flavour

##  What is your secret talent that no one knows about?

I can code in Perl

##  My advice for allies to support underrepresented folks who code is...

Practice. Join a community, learn. Get an accountability partner and practice some more

##  How do you keep yourself up to date in your field?

By Working. Freelancing keeps me on toes because I'm competing with thousands of talented individuals from all over the world

##  How would you describe your job to a bunch of 5 year olds

I tell computers what to do. 

##  What cool thing are you working on right now?

I am currently web scrapping for UK project planning

##  What was your first job?

Software Developer at Andela

##  What are the toughest challenges you've had at work?

Context switching between languages or technologies

##  What upcoming technological innovation will dramatically impact the industry in the next five years?

It's already impacting .. blockchain, smart contracts etc

##  What skill do you think everyone should learn?

Skill - Programming
Language - Python

##  Have you taken a huge leap of faith at work? Did it pay off?

Yes. I had a Perl web scraper that I needed to update. It was old, ugly, messy. It used xml and wsdl, which I hadn't worked with before. But it really helped me understand a lot and learn a new language

##  How can we follow you? 

On instagram, my handle is [hanmaslah.](https://www.instagram.com/hanmaslah/)
mac homebrew "VSM: Could not get hold of varnishd, is it running?" solved
Published: 2021-03-08 12:22:27

## The Problem
When you install varnish natively on your macOS you might run into issues when using tools like `varnishlog`, `varnishtop`, ...

You will get an error-message like:

```bash
$ varnishlog
.....
VSM: Could not get hold of varnishd, is it running?
```

## The Solution 
To solve the issue, simply add the working directory to the commands:

```bash
varnishlog -n /usr/local/var/varnish
```

This should fix the problem.
Super useful JavaScript tips
Tags: javascript, webdev, codenewbie
Published: 2021-03-08 12:22:06

Here is a list of useful tricks for JavaScript developers that will definitely help you one day.

### Removing Falsy Values From Arrays
Falsy values are values in JavaScript which evaluate to FALSE. There are only six falsy values in JavaScript and they are: 
* undefined
* null
* NaN
* '' (empty string)
* 0
* false
The easiest way to filter out these falsy values is to use the below function.
```javascript
array.filter(Boolean);
```
Keep in mind that filter returns new array and does not modify the original array.  


### The difference between target and currentTarget in the event context.  

`target` refers to the DOM element that triggers an event. Otherwise, `currentTarget` refers to the DOM element that the event listener is listening on.

```html
<ul class="list">
  <li class="list__item">Study JavaScript</li>
</ul>
```

```javascript
const list = document.querySelector('.list');

list.addEventListener('click', (e) => {
	console.log(e.target); 
        // Output: "<li class='list__item'>Study JavaScript</li>"
	console.log(e.currentTarget); 
       // Output: "<ul class="list"><li class="list__item">Study JavaScript</li></ul>
});
```

### Copy to Clipboard
It’s easy, the bad thing is that we must add an <input/> with the text to be copied to the DOM. Then, we selected the content and execute the copy command with execCommand. execCommand('copy') will copy the actual selected content.

```html
<input type="text">
<button>Copy to Clipboard</button>
```

```javascript
button.addEventListener('click', () => {
	input.select();
	document.execCommand('copy');
});
```

Or if you don't want to use input, there's a way to copy content from `div, span, p`.  

```html
<p>Some text to copy</p>
<button>Copy to Clipboard</button>
```

```javascript
function copyToClipboard (el) {
	const r = document.createRange();
	r.selectNode(el);
	window.getSelection().removeAllRanges();
	window.getSelection().addRange(r);
	document.execCommand('copy');
	window.getSelection().removeAllRanges();
}

button.addEventListener('click', () => {
	copyToClipboard(paragraph);
});
```  

### Truncate an Array
```javascript
let array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
array.length = 4;
console.log(array); // Result: [0, 1, 2, 3]
```

That's it for today. Hope you learned something new:)
Sandbox for Datorama: New way of deploy work
Published: 2021-03-08 12:21:37

WHAT IS SANDBOX?

Sandbox for Datorama offers an isolated environment to address data updates and understand their impact before making them live.
The challenges with using a sandbox lie in the synchronization of data between the live production environment and the sandbox. Manually copying data from one environment to another often results in irrelevant or out-of-date datasets being used for testing.

ADVANTAGES OF SANDBOX

1. Always in sync: Datorama’s Sandbox is always in sync with production, meaning you always have the latest data to act nimbly with your marketing strategy. Furthermore, you do not have to worry about data discrepancies as the information in your sandbox is a direct reflection of the data in production.
2. Eliminates manual setup: Traditionally, an administrator is required to copy data by hand to set up separate sandbox environments. Copying data from one environment to another, along with the entire configuration, is a time-consuming process. As soon as Datorama’s Sandbox is enabled, it is ready to use, with Sandbox and production operating on the same platform.
3. Control the changes you deploy:  With Datorama’s Sandbox and production working together, you can implement changes to a singular entity or apply those changes to thousands of entities. This allows a precise approach to testing and learning that reduces operational risk.
4. Testing: We can test any changes in the sandbox without changing the actual working workspaces.
5. Isolated Workspace: It is a mode within client workspace rather than an isolated workspace environment.
Nevertheless, she coded: Joan Nabusoba
Tags: wecoded
Published: 2021-03-08 12:18:20

Happy International Women's Day!✨💖👯



#### My name is Joan, but since I was named after my grandmother, my nickname is nyanya which means grandmother.

## Where do you work?

I am a trainer on various Pwani Teknowgalz initiatives. I also work as a software dev on a couple of mobile app projects, through SuluhuTex

## What do you do?

I code

## Who or what inspired you to pursue the career you have today?

My awesome dad

##  What is your favourite music genre?

Kora, African blues, but I am always open to any

##  what is your secret talent that no one knows about?

I am good at video games.

##  My advice for allies to support underrepresented folks who code is...

Learn by doing and not just reading tutorials. 

##  How do you keep yourself up to date in your field?

I create projects a lot, join communities, follow techies who inspire me. Whoa, there's a lot to learn

##  How would you describe your job to a bunch of 5 year olds

I work with computers

##  What cool thing are you working on right now?

A service mobile app that will involve asset tracking

##  What was your first job?

I was a primary school teacher after form 4

##  What are the toughest challenges you've had at work?

I am constantly overwhelmed with loads of work, but I am finding workarounds :)

##  What upcoming technological innovation will dramatically impact the industry in the next five years?

I don't know. Things change within seconds. Just ready for anything

##  What skill do you think everyone should learn?

How to treat people well. Hehe, on a serious note, Python

##  Have you taken a huge leap of faith at work? Did it pay off?

I took a project that I had no idea of the best backend. I was using Java for Android. With a hell lot of time learning and doing, I managed

##  How can we follow you? 
Insta: joannabusoba, 
Fb: @joannabusoba, 
Twitter: @joannabusoba
Nevertheless, you should code too!
Tags: beginners, wecoded, codenewbie, discuss
Published: 2021-03-08 12:11:52

According to the [2020 StackOverflow survey](https://insights.stackoverflow.com/survey/2020), almost 92% of all professional software developers are men. Don't get me wrong, but it's quite sad.

Women are different from men, there's no doubt about it. For example, there's only 1% of women in the US military and I don't think that many people argue against it.

But programming is different. The one with more muscle doesn't get any preference here.

I'm not saying that the split should be exactly 50/50. And I don't think that there's even such a thing as a `fair` proportion here. The thing we should focus on is equality of opportunity.

If you want to code, there's nothing that should stop you from doing that.

When you're just starting out, it will be tough anyway. Regardless of your gender.

I have a son and a daughter. I'm going to make sure both of them learn to code as soon as they can type. If they won't like it and decide to do something else, it's their choice. I'll respect it. But I'll never say "you shouldn't do it because you were not born for it".

You may be young, you may be old, but nevertheless, you should code too.
Week 2 - Summary
Tags: diary, learning
Published: 2021-03-08 11:47:13

Two weeks completed. Another long week of learning, but again I’m surprised by just how much ground I have covered. Whilst it has been a bit of a strain trying to cram so much new knowledge into my mind, it hasn’t been too difficult to comprehend the information itself – even managed to wrap my head around some JavaScript code (more below!).
Rounding off my learning from the first week, I finished working my way through some intermediate and advanced HTML guides whilst continuing to add to my GitHub files on HTML and tweaking the formatting.

Whilst thinking about ways in which to apply my skills I stumbled across a ‘Periodic Table of Elements’ example, using CSS and some basic JavaScript. I spent some time examining the code and was successful in deciphering how the SASS and JavaScript code functions. I also realized that the JavaScript can overrule the CSS; the main table flexbox was only set to 5 rows, half of what was displayed on screen, and this was because the JavaScript was inserting new ‘elements’ into rows beyond 5.

I continued to apply my knowledge learned so far, of HTML and CSS, by completing two practical tutorials on how to build responsive websites using CSS and Flexbox. It was really useful to follow these through to completion to see the methodology involved. I continued to learn more CSS throughout the week too, covering a range of sub-topics: SASS and pre-processors, Variables and Custom Properties, the Box Model, Positioning, Units, and Psuedo-Elements.

Presentation is always important. Whilst my GitHub page may seem trivial in comparison to actual coding documentation, I think it is important to demonstrate good presentation even in the small things. So, I created a ReadME.md file to act as a presentational landing page for my GitHub. Using a tutorial, I also successfully added in an ‘action’ so that it dynamically updates the .md to show all my recent blog posts.

I watched a few interesting videos this week, such as how to get involved in open-source work and a ‘CSS Battle’. Both were insightful, giving me the opportunity to see how others in the community get involved and also how they think when coding. The CSS battle was particularly interesting, seeing how two different individuals attempt to reach the same conclusion through code and how their methodology differed.

Continuing with my book, ‘Pragmatic Programmer’, I finished Chapter 2. The concept of ‘Orthogonality’ was interesting, and reflecting on my VBA-AutoCAD programming in my previous job I realized immediately where improvements to the spaghetti code could be made!
Will I be Able To?
Published: 2021-03-08 11:38:54

Hi everyone,

Am a student currently studying Architecture. Over the last couple of months, I've been learning how to code on my own using some documents from the web and also YouTube tutorials. I can say I've gotten much knowledge from these and I am confident that I can continue learning and get to do better in the coming days.

The main problem is that we are resuming studies and Architecture is a very demanding course. I am just in doubt if I will be able to balance the studies and my part-time coding studies. If anyone can advise on how to go about this. I would gladly appreciate it!
Lotus Notes-verktøy for Outlook for å konvertere NSF til PST med e-post, kontakter, kalender
Published: 2021-03-08 11:36:25

Lotus Notes to Outlook-omformeren er et pålitelig og sikkert program for flytting av e-post for å sende Lotus Notes-postkassekonvolutter til Outlook. Velg <b>GainTools <a herf="https://www.gaintools.com/nsf/pst/">NSF til PST omformer programvare</b></a> for å forstå driften av applikasjonen og høydepunktene før du kjøper utgivelsen av verktøylisensen.

Lotus Notes for Outlook har blitt en typisk skiftende oppgave i dag. Begge er velkjente og mye brukte e-postprogrammer for utveksling av informasjon, startende på ett sted og deretter det neste.

I tillegg kan Lotus Notes brukes med forskjellige Domino-informasjonsbaser og applikasjoner. Den lagrer alle meldinger, kontakter og andre data i en .nsf-post.

Synspunkt til den andre siden snakket også som Personal Information Manager. Det er et aspekt av Microsoft Office Suite. De fleste 1 000 000 av befolkningen bruker Outlook-applikasjonen til å sende / hente informasjon fra det ene punktet og deretter til det neste. Hjelper med å overvåke meldinger, adressebok, kalendere, oppgaver, poster, filer, kalendere og andre ting på harddisken. På samme måte lager det en ensom PST-arrangør for å lagre den tilkoblede informasjonsbasen, for eksempel kontakter, meldinger, tider og så videre.

Slutt:

To teknikker for å sende Lotus Notes-arrangører til Outlook med meldinger, kontakter og kalendere. Den manuelle strategien er akseptabel for utførelse, men mange ulemper er knyttet til den. Den eksterne ordningen er en umiddelbar og sikker metode sammenlignet med den manuelle strategien for å transformere Lotus Notes til Outlook. Opplev hvordan produktet fungerer ved å laste ned gratis demo av instrumentet som lar deg handle 10 første NSF for PST uten kostnad.
Consistency As a Moat
Tags: productivity, startup, programming, growth
Published: 2021-03-08 11:34:32

I have a theory, the most sure-fire way to be good at something is to be consistent at it. And the more you are consistent with something the larger gap that you create between you and your competitors. Everyone who you know is good at something(X) as probably been doing X, or a version of X for more than a while now.

But, you may ask, how to be consistent when the end goal is large or the task itself is large? The solution is to break down your goal into clearly defined & atomic tasks, and repeating an even more reduced version of that task for everyday, till you make progress on your goal. Mike Critter explains it on his blog here, "Tiny habits. No, like TINY tiny."

And, which set of tasks from these should you be practicing at a time? The ones you're bad (relatively worse) at. Taking this from the essay on deliberate practise, the best way to optimise consistency is to prioritize the things which you're worse at, or where you can have improvement.

Breaking this down for myself, let's take the example of the act of writing itself. I started writing by publishing larger articles to publications. These used to be code-heavy articles and so used to take 1-2 months to write, edit and publish. However, I figured out rather than writing for someone else I wanted to write to grow my own audience.

The first problem was that writing articles weekly was difficult for me. So, I initially started with writing an article every 2 weeks, I could pick up ideas throughout the week, experiment with them a bit and then write at the end of 2 weeks.

However, for a newsletter (which is what I'm aiming at growing), a weekly model makes more sense to keep your readers engaged, and also keep your writing muscles trained. My problem with writing weekly was that I couldn't find the words to think about at the end of the week, when you are generally in a relaxed mood and might only be in the mood of chilling. (There are benefits of not ending your week with "nothing", as explained by patio11 here.)

So, to break this habit down, I currently write only 200 words everyday. This is a tiny enough habit that by the time I'm done with 200 words, I already have the next 200 words thought of, and they just flow onto the page.

I also automatically stopped procrastinating when I tried to achieve only the bare minimum everyday. (The other way to stop procrastinating is turning off the internet, which no-one tells you about. - @hipreetam93)

And so, that's how I'm applying consistency for writing.

How is it a moat? Just look at everyone you admire, or look at the people who're good in a field, and research their history :)

Anyways, go out there, make mistakes of ambitions not of sloth, and finish your damn business EVERY SINGLE DAY.

If you liked this post, why not [follow me on Twitter](https://twitter.com/thewritingdev)?