teleren/devto huggingface dataset:
How to disable prettier in VSCode for a specific project?
Tags: prettier, vscode
Published: 2020-06-19 16:54:26

> [Post source](https://tutorial.tips/how-to-disable-prettier-in-vscode-for-specific-project)

Prettier is an opinionated code formatter and ensures that code follows consistent style. It can automatically fix formatting related issues for HTML, CSS and JavaScript - for complete list of supported languages, please look at the official [docs](https://prettier.io/docs/en/index.html). 

> If you are working in a big team and want consistent code formatting without manual intervention(code reviews), I highly recommend Prettier. 

Prettier is available as [VSCode extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) which can be enabled and it automatically take cares of formatting. You could even set preference when to format the file i.e. on file save or when you paste text etc.

I love Prettier and use it daily for personal and organization projects. There could be a case where you do not want Prettier to automatically format files. 

Now the first option is to disable the VSCode extension. I am sure this is not what you are looking for as it is pain to enable and disable the extensions every time you switch projects.

Other option is to enable Prettier only when a configuration file is present in the project. To enable this option open VSCode settings

- On Windows/Linux - File > Preferences > Settings
- On macOS - Code > Preferences > Settings

Search for __Prettier:Require Config__ and make sure it is checked

![Prettier:Require Config](https://dev-to-uploads.s3.amazonaws.com/i/qu9bg4vqlxw05m6vhi4w.png)
[WellHealthOrganic Vitamin B12](https://bilkultaaza.com/5-reasons-to-choose-wellhealthorganic-vitamin-b12/)

#### So how does this work?

By turning on this option, Prettier will only work for the projects having valid `.prettierrc` file. A valid `.prettierrc` could be as simple as having just opening and closing curly braces as follows

```javascript
{}
```

Originally posted at [tutorial.tips](https://tutorial.tips/how-to-disable-prettier-in-vscode-for-specific-project)
How To Add env files To Quasar Easily
Published: 2020-06-19 16:30:22

Image By [Singkham](https://www.pexels.com/@singkham-178541?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels) From [Pexels](https://www.pexels.com)

So, Today, I will talk about the easy steps to add and use environment variables to Quasar applications. 
As usual, my post is written as Learn new things, so it  won't be pretty and formatted. So I will explain with a screen shot, and Line-Numbers...Let's GOOOOO!!.

## Table Of Contents
 * [Installing dotenv from npm](#chapter-1)
 * [Creating a .env file](#chapter-2)
 * [Creating an envParser.js file](#chapter-3)
 * [Configuring your quasar.config.js file](#chapter-4)
 * [Console.info(process.env)](#chapter-5)

### Installing dotenv Package <a name="chapter-1"></a>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2txw93tt1b6azwuka6lv.PNG)

    Firstly: On your terminal, 'npm install dotenv' to install the package in your root 
    directory.

### Creating a .env File <a name="chapter-2"></a>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j03e6dbas5h8i4rjqqtw.PNG)

    Secondly: At the root directory of your project, create a .env file, then there you 
    specify your key-value pairs of what you wish to hide when uploading your project on a 
    version control system (Github etc...). Also, remember to add .env in your .gitignore 
    file.
 
### Creating an envParser.js File <a name="chapter-3"></a>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fh2jt30grpbmyitd1ykm.PNG)

    Thirdly: Create a file called envParser.js at the root directory too. This file will be 
    used to call and configure you quasar.config.js file to see our own env file and inputs, 
    then add it to the process.env . Type all you see there, as we require or installed 
    package 'dotenv', the export the module.

### Configuring your quasar.config.js File <a name="chapter-4"></a>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9wzbg43q0n4rtmds7ro4.PNG)

    Fourthly: In your quasar.config.js file, at the beginning part, add the above lines of 
    code.. Sorry, i duplicated the last requiring of the envParser..not necessary .

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

    Also, at the Build section of the quasar.config.js, include env: envParser(), to Inject 
    our own env file we created.

### Console.info(process.env) <a name="chapter-5"></a>
OK... That's a Wrap, just write 'console.info(process.env)', on any of your vue files to see what we have done... 
Also, Remember to restart your server when you make changes to the .env file so the system catches it.
Thanks..
TIL: How to create a transcript file for video
Tags: todayilearned, transcript, audio, video
Published: 2020-06-19 16:29:36

I'm currently making a podcast, and also have a teaser for it. The latter was made with headliner.app. I noticed that I can add a transcript file (if I didn't want it to do it automatically). It mentioned something called VTT or SRT file. So I looked up how to create a SRT file. This [page](https://www.makeuseof.com/tag/subtitles-text-editor-aegisub/) answered my questions and it's pretty straight forward.

Each section is proceeded with a number followed by start and end section followed by the caption you want shown.

For example:
``` 
1
00:00:03,000 --> 00:00:05,000
Hello, everyone!

2
00:00:05,000 --> 00:00:10,000
More stuff, talking about something, foo bar and so on.
```
I opened up Quicktime player at the time, and just looked up the times for each section.

Saved it with `.srt` and to test it, I opened up VLC, added the video and SRT file and played it, it picked it up! 🙌
What is Server Sent Event
Tags: javascript
Published: 2020-06-19 14:54:50

---
title: What is Server Sent Event
published: true
description: 
tags: Javascript
---

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

The Server Sent Events specification describes a built-in class `EventSource`, that keeps connection with the server and allows to receive events from it. similar to `WebSocket` it’s simpler. In many applications, the power of `WebSocket` is a little bit too much.

What difference:

* One-directional: only server sends data

*  Only text

* Regular HTTP


### Getting messages

1. To start receiving messages, we just need to create `new EventSource(url)`.
2. The browser will connect to `url` and keep the connection open, waiting for events.
3. The server should respond with status 200 and the header `Content-Type: text/event-stream`

```javascript
let eventSource = new EventSource("/events/channel");
eventSource.onmessage = function(event) {
  console.log("New message", event.data);
};
```

### Reconnection

Upon creation, `new EventSource` connects to the server, and if the connection is broken – reconnects. that’s very convenient, as we don’t have to care about it.



### Close

```javascript
let eventSource = new EventSource(...);
eventSource.close();
```



### Event types

By default `EventSource` object generates three events:

- `message` – a message received, available as `event.data`.
- `open` – the connection is open.
- `error` – the connection could not be established, e.g. the server returned HTTP 500 status.



Hope it can help you :)
Cannot call a child component's function from the parent component. Error: “…is not a function”
Tags: react
Published: 2020-06-19 16:25:34

Hi,

For my website I want to include a feature that helps users randomly click a link programatically. The event happens in the parent component called StreamingPlaza, and its has a list of children components called StreamingCard, each containing a streaming link. The attached screenshots are my code. I got the error "this.roomclicks.current[0].handleClick is not a function." I tried console.log(this.roomclicks.current[0]), and it did print out the StreamingCard child component. I looked through many relevant stackoverflow posts, and the answers suggested that this code was supposed to work. I would appreciate a lot if someone can tell me where I get it wrong. Thanks!

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

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5aaz71zl20hgmqftxip7.png)
🎥 Using Protobuf with Kafka Streams
Tags: kafkastreams, protobuf, apachekafka, streamprocessing
Published: 2020-06-19 16:04:06

In case you missed (you should subscribe https://gamov.dev/youtube so you won't miss it in future) #LiveStreams episode this week I posted the recording with updated timecodes. 

In this video, you will get an idea of how to use #protobuf with Kafka Streams(+ tests with TopologyTestDriver).

Also, I'm showing a new `kafka-protobuf-console-consumer` command-line tool that ships with Confluent Platform 5.5.

<a href="http://www.youtube.com/watch?feature=player_embedded&v=YN1fdymEH14" target="_blank"><img src="http://img.youtube.com/vi/YN1fdymEH14/0.jpg" alt="Protobuf with Kafka Streams" width="560" height="315" border="10" /></a>
Do we still need Server Side Rendering with React?
Tags: react, javascript
Published: 2020-06-19 15:58:56

If we want to talk about Server Side Rendering with React, we should speak of Next.js. Here's my analysis of whether SSR is still relevant in 2020 or not?

{% youtube le37L8zo450 %}

You can also read my blog post: [Hey Next.js, Is Server Side Rendering Dead?](https://arunoda.me/blog/hey-nextjs-is-server-side-rendering-dead)
Proper Folder Structure with Dynamic Methods?
Tags: help, csharp, net, core
Published: 2020-06-19 15:28:29

If I have dynamic methods that could be used on several Controllers, where should those go?

Is this a possibility?  Is it the wrong way to go about folder/file structure?

Ex:
```
-ParkController
--with FetchParkApiMethod() inside file

-TrailController
--with FetchTrailApiMethod() inside file

--OR--

-ParkController
-TrailController

-HelperFolder
--FetchDynamicApiMethod() which could be referenced in the Park or Trail Controllers.
Supervised, Unsupervised and Reinforcement Learning
Published: 2020-06-19 15:21:00

###When I started with Machine Learning I was confused between which ML Algorithm to use for different types of problem statements. Supervised, Unsupervised, and Reinforcement Learning plays an important role in selecting a suitable algorithm. After completing this course by Datacamp I was able to clearly understand the difference between them. <q><i>Their(Datacamp) main goal is to focus much on the practical side of the topic rather than the theoretical side, that is why it has been my first preference every time I wanted to learn something related to Data Science.</i></q>

[Supervised Learning](https://www.datacamp.com/courses/supervised-learning-with-scikit-learn?tap_a=5644-dce66f&tap_s=841152-474aa4)
[Unsupervised Learning](https://www.datacamp.com/courses/unsupervised-learning-in-python?tap_a=5644-dce66f&tap_s=841152-474aa4)

##You can also check out the article written by me on the related topics, see if it could be helpful for you:

[Supervised, Unsupervised and Reinforcement Learning](https://www.linkedin.com/pulse/what-difference-between-supervised-unsupervised-learning-mrinal-walia/?trackingId=54l9N3hxQbSY%2FP3c1yVvBA%3D%3D)

##<i>If you are looking for hiring professional ML/AI Developers for your project Fiverr is there for you. Fiverr is an online marketplace for freelance services. The company provides a platform for freelancers to offer services to customers worldwide for a very cheap price. Do check it out:</i>

[Machine Learning Fiverr](https://track.fiverr.com/visit/?bta=116189&brand=fiverrhybrid&landingPage=https%3A%2F%2Fwww.fiverr.com%2Fsearch%2Fgigs%3Fquery%3Dmachine%2520learning%26source%3Dtop-bar%26search_in%3Deverywhere%26search-autocomplete-original-term%3Dmachine%2520learning)
Technology as a means and not the end for the productivity of companies
Tags: intelvue, webandappdevelopmentcompany, webdev, mobileappdevelopmentcompany
Published: 2020-06-19 15:14:23

One of [Intelvue](https://www.intelvue.com/)'s primary objectives is to be able to participate in the digital transformation processes of companies and improve their productivity through the latest technological innovations in the market based on their particular needs.

However, when we meet with our clients, we do not stop insisting on the same premise: we consider technology as the tool that will help us achieve it, but not the end. We tell you why.

A few days ago we talked about how to achieve process optimization. The most important thing to keep in mind is that technology is the means by which these processes are streamlined in any project, errors are minimized and the use of resources is maximized.

##Increase productivity in a company How?#

Of course, increasing productivity depends on numerous factors, but it is important to admit from the beginning that technology and those tools that we are going to equip ourselves to achieve are a means and not the end. 

At this point, we want to clarify several concepts for which we believe this idea will become clearer. 

##1. Agile methodology to adapt work management to the project#

The agile methodology we have spoken on other occasions. Adapting working conditions to a certain project and your particular circumstances will help us reduce costs and increase productivity.  

 ##2. Motivation, training and direct involvement#

It is true that the staff must be trained to meet the needs of a certain project. However, if the team is taught to get the most out of the technology used to carry it out, it will help to make better decisions at all times. 

 

##3. Business management software and global solutions, a key medium#

[Good work software](https://www.intelvue.com/) will help achieve the desired productivity in the company.

Management, communication, a collaborative and operational suite that helps and optimizes at all levels within the organization, specially adapted to meet the needs of any project, is key.  

Ultimately, increasing productivity depends largely on how to take advantage of the [technology] (https://techdesign360.wordpress.com/) at our fingertips. If in addition to this model there is participation from all parties involved in the project, the results will be seen in the short term reflected in our objective and profitability.
Git and words...
Tags: git, github
Published: 2020-06-15 00:09:44

So, as many of you know there are some articles about "master" in git being "racist." Obviously master in the case of git, and github is not racist if you look at the connotation of the word.

### What is Connotation?
Conotation is the most important thing in language. A single word can have many different definitions that depend on how the word is used in a sentence.

The dictionary definition: "an idea or feeling that a word invokes in addition to its literal or primary meaning."

### Example of Connotation
- "The man is very blue"

This statement would literally mean that the man is colored blue. However, if you use the connotation with how it is used, you would know this means "the man is very sad"

### The Word Master
The word master does have connection to the fact the slavery happened and people were in fact "masters" to slaves. I am not denying that. However, if you look into the connotation of how "master" is used in github, it refers to the "master copy." The word "master" in the case of git has nothing to do with people owning slaves.

### My thoughts
Going down this road of people getting offended over every single word because it has any ties to slavery is a very bad road to go down.

If that is the way we go down we would have to stop using literally every word in the dictionary, because at one point our world was not the best. We stemmed all of our words with some sort of relation to how our world was back then. Rather than getting offended we need to understand the actual meaning of the word in the sentence it is used.

### Going Down This Path
If we go down this path we would have to stop using words such as, main, control, git. Here's why:

Main comes from the "power" or "military control." If we look at whats happening in the world right now there is use of military control in the riots for police brutatility against people of color. Therefor main is a poor word since it has to do with the militaries control and power of the people.

Control literally means "the power to influence or direct people's behavior" which is what slave owners did to their slaves. They held power over everything they did. Therefor control is a bad word to use to define how git is a version control system.

Git literally means "an unpleasant or contemptible person." That is a pretty rude thing to use. Therefor git should not be used, and it should not be a version control system!

We could go on for days about every single word used for almost anything in the world. It is just not a good idea, and we instead need to understand that words have a connotation!
DL with PyTorch (Week 2)
Tags: linear, regression, pytorch, loss
Published: 2020-06-19 15:02:52

### Done with Assignment 2 🤩🎉😎🎊
Although I am running a bit late but still I will try to complete the assignments and respective blogs ASAP. 

This assignment was a part of the 6 week-long free course named, **Deep Learning with PyTorch: Zero to GANs** provided by [Jovian.ml](https://www.jovian.ml/) in collaboration with [FreeCodeCamp](https://www.freecodecamp.org/).

Learned about *linear regression*, *loss functions* and we trained a model using linear regression to do **insurance cost prediction**.

My key ***observations***🧐 during this assignment were:
- It's better to choose loss function from below list if you are working on linear regression
  - [torch.nn.functional.l1_loss](https://pytorch.org/docs/stable/nn.functional.html#l1-loss)
  - [torch.nn.functional.mse_loss](https://pytorch.org/docs/stable/nn.functional.html#mse-loss)
  - [torch.nn.functional.smooth_l1_loss](https://pytorch.org/docs/stable/nn.functional.html#smooth-l1-loss)
- Larger the value of no. of epochs and learning rate , the more rapid changes can be seen in the loss_value

You can find a detailed explanation [here](https://jovian.ml/hiteshkumar-1mv17cs042/02-insurance-linear-regression) Have a look at it.
To find out what I have been doing in this Lock-down period, click [here](https://technolgee.blogspot.com)
YAML Tutorial for Beginners
Tags: devops, tutorial, programming, yaml
Published: 2020-06-19 14:58:49


YAML stands for **Y**AML **A**in't **M**arkup **L**anguage and is a data serialization language.

> Fun Fact: YAML originally meant **Y**et **A**nother **M**arkup **L**anguage 😉
> ([If YAML ain't markup language, what is it?](https://stackoverflow.com/questions/6968366/if-yaml-aint-markup-language-what-is-it))

> *"After a few months of us working together, I pointed out that YAML (which most definitely stood for Yet Another Markup Language at that time) was not really a markup language (marking up various elements of a text document) but a serialization language (textual representation of typed/cyclical data graphs). We all liked the name YAML, so we backronymed it to mean YAML Ain't Markup Language."*

---
###What is YAML used for###
In all my tutorial videos for Docker, Kubernetes, Ansible etc. I've used YAML for the example configuration files, because YAML has actually become a **widely used format for writing configurations files**.

One of the reasons for its popularity is that the language is **human-readable, intuitive and flexible**. 💪🏼  In fact, it can be used with nearly any application that needs to store or transmit data.

###YAML compared to other JSON and XML###
![YAML compared to JSON and XML](https://dev-to-uploads.s3.amazonaws.com/i/joswj9d3m6nop93htla8.png)

YAML is a superset of JSON, which means any valid JSON file is also a valid YAML file 💡


###YAML Syntax###
► The basic building block of YAML documents are key-value pairs
► **Indentation** is used to denote structure
► Tabs are not allowed

In the below YAML tutorial I demonstrate the basic syntax:
- key-value pairs
- comments
- objects
- lists
- boolean
- more about lists
- Multi-line strings
- environment variables
- placeholders
- multiple yaml documents

I demonstrate the language syntax with real Kubernetes configuration files.

Check it out here 🤓
{% youtube 1uFVr15xDGg %}

-----------------
**Like, share and follow me** 🙂 for more content:
- [Private FB group](https://www.facebook.com/groups/techworldwithnana)
- [Twitter](https://twitter.com/Njuchi_)
- [YouTube](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA?sub_confirmation=1)
- [Instagram](https://www.instagram.com/techworld_with_nana/)
- [LinkedIn](linkedin.com/in/nana-janashia)
Help: How to find the latest bookmarked post? 
Tags: help, discuss, webdev
Published: 2020-06-19 14:54:50

---
title: Help: How to find the latest bookmarked post? 
published: true
description: 
tags: help, discuss, webdev, explainlikeimfive
//cover_image: https://direct_url_to_image.jpg
---

Hi guys, I noticed that there is no search function on the saved posts. It keeps showing me random, shuffled post and nkt the latest bookmarked as it did earlier.
I know a lot of people where wondering about this. 
Does someone know an extension or some other workaround about this issue? 
Like this no point bookmarking posts if you're never gonna find them. (700+ saved posts).
Azure Cloud Shell: Use PowerShell in Bash
Tags: azure, powershell, bash, cloudshell
Published: 2020-06-19 14:50:30

---
title: Azure Cloud Shell: Use PowerShell in Bash
published: true
description: Yes, you can use PowerShell in bash.
tags: azure, powershell, bash, cloudshell  
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/mwlovlo2onsr9lrpxjxc.png
---

A quick one today...

I quite often hear this complaint: "I hate having to switch Cloud Shell from Bash to PowerShell to use cmdlets.". Well, you don't have to!

In fact, you can invoke the PowerShell Core interpreter right from within the Bash command-line in Cloud Shell. Simply type:
``` 
pwsh
``` 
And you'll fire off the PowerShell Core interpreter.
![start a powershell core session in bash](https://dev-to-uploads.s3.amazonaws.com/i/c9hx9w95ldx3h4x7cpku.png)

Once you're done and you want to go back to the Bash command-line, simply type:
``` 
exit
``` 
And you'll exit the PowerShell Core interpreter.
![exit the powershell core session and go back to bash](https://dev-to-uploads.s3.amazonaws.com/i/9jzgtwoex2u363u1c14h.png)

Simple, isn't it? ;)

# As a conclusion
Working with the command line is essential when it comes to automation. Knowing that you can combine the power of Bash and PowerShell together will help you do great things.

# Let's keep in touch
You can reach me on [Twitter](https://twitter.com/tidjani_b) or [LinkedIn](https://ca.linkedin.com/in/tidjani-belmansour-ph-d-98460912).

See you soon !