teleren/devto huggingface dataset:
Don't Ask for Help!
Tags: programming, selflearning, howtolearn
Published: 2020-07-11 04:46:38

>" I'm sure that a single error can give you a headache for days (even weeks) but if you fix it by yourself, then you'll never face the same problem again. "

## **1. You'll get Errors!**
It doesn't matter whether you're learning or working, beginner or a Pro, following a lecturer or an Online Course, Sooner or Later you'll face this monster of Programming World - **Error!**

And as a normal human being, we'll be panicked and sometimes get demotivated to continue learning when we can't fix it within minutes.

So, we start to look for a help (quick fix). We call or meet our friends whom we think is better than us, show errors to lecturers (online or offline) and ask them to fix it.

But Stop 🛑 doing this. Instead you should...👇


## **2. Don't be Afraid of Bugs and Errors**
Instead of taking Errors/Bugs as a Monster, you should take it as an Opportunity to learn something new.

Debugging (Fixing Errors) is the must have skill for any developers and I think this is the one that separates Senior Developers from Freshers.

I think, **"One who completes the programming course without any Errors, Learns Nothing"**.

They're just following the steps not learning.

So, if you want to learn then don't be afraid of getting  errors. Instead try to understand it. 


## **3. How to Tackle Errors?**

So, you got an Error and panicking or frustrated.

First thing you should do is **calm down**.

And then read the error message carefully. In every programming language when you encounter an error there will be some error message.

It will have some error code or error message and the line number where you have problem.

**Read the error message** slowly, carefully and multiple times if needed. And try to understand it.

If you couldn't understand it, then just copy the error code or error message and paste it in Google search bar.

Here you'll get thousands of results because the error you're facing was faced by other developers as well.

Now open each links (which seems legit) in new tab and read it.
I recommend opening links from **Stackoverflow** or some programming forums.

Once you start reading these articles, you'll get to know more about the errors like

a. What is causing this error?
b. Why did you get the error?
c. When do you get such error?
d. And ways to fix it. There'll be lots of fixes to a problem. And you can also learn why some fixes are better than other.

So, in my opinion this is what you should do when you get an Error instead of a quick fix from a friend or a lecturer.

When you start researching and understand the error, you'll remember it forever because you fixed it yourself.

And no matter how many times you get such error it'll be a piece of a Pie 🥧 for you to fix it.

*It's just my personal opinion. Please feel free to comment yours 😊*

>I also share my Personal Learning Experience on 	**[YouTube](https://https://www.youtube.com/vijaythapa?sub_confirmation=1)**.

###React ❤ and Follow me 🙏 for more Programming Articles, Tips and Tricks
การเข้าถึงคอมพิวเตอร์จากระยะไกล ด้วย Google Chrome
Published: 2020-07-11 04:38:46

---
title:การเข้าถึงคอมพิวเตอร์จากระยะไกล ด้วย Google Chrome
published: true
description: 
tags: 
---
ท่านผู้อ่านคงเคยประสบเหตุการณ์เวลาออกไปข้างนอกบ้าน แล้วต้องการใช้คอมพิวเตอร์เครื่องที่อยู่ที่บ้านกันบ้างนะครับ วันนี้ผมมีวิธีการเข้าถึงคอมพิวเตอร์ที่บ้านได้ ไม่ว่าเราอยู่ที่ใดในโลกเลยครับ ของแค่มีมือถือกับสัญญาณอินเตอร์เนทเท่านั้น เรามาเริ่มวิธีทำกันเลยนะครับ

อันดับแรกให้ตั้งค่าเครื่องคอมที่ต้องการเข้าถึงก่อน ดังนี้
1. เปิด Chrome ในคอมพิวเตอร์
2. sing in google account
3. ในช่องที่ให้ใส่ที่อยู่เวปไซด์หรือURL ให้พิมพ์ remotedesktop.google.com/access
4. จะเห็นส่วนที่เป็น "ตั้งค่าการเข้าถึงระยะไกล" หรือ " Set up remote access" ให้คลิก ดาวน์โหลดที่ปุ่มสีน้ำเงิน
5. จากนั้นจะมีหน้าต่างใหม่ขึ้นมา ให้คลิก เพิ่มในChrome หรือ Add to Chrome
6. ตั้งชื่อคอมพิวเตอร์ตามต้องการ แล้วกด ต่อไป หรือ Next
7. ใส่รหัสที่มีความยาวอย่างน้อย 6 ตัว ให้ตรงกันทั้งสองช่อง แล้วกด เริ่ม หรือ Start
8. จะมีหน้าต่าง popup ขึ้นมาให้กด yes

เป็นอันเรียบร้อยครับ ต่อไปก็ไปติดค่าที่มือถือครับ ดังนี้
1. sing in google account เดียวกันกับ คอมพิวเตอร์
2. ติดตั้ง แอป Chrome Remote Desktop จาก Google Play หรือกดที่ link นี้ได้เลย https://play.google.com/store/apps/details?id=com.google.chromeremotedesktop
3. เปิดแอป Chrome Remote Desktop
4. แตะชื่อคอมพิวเตอร์ที่ต้องการใช้งาน

เพียงเท่านี้ก็เข้าใช้งานคอมพิวเตอร์ที่บ้านจะระยะไกลได้แล้วครับ

ข้อแนะนำเพิ่มเติม

ในส่วนการใช้งานในมือถือ ถ้าจะให้สะดวก ผมแนะนำให้เลือกการดำเนินการด้วยการแตะจะสะดวกกว่า โดยให้แตะ "โหมดสัมผัส" 
แตะหนึ่งนิ้ว แทน คลิกซ้าย
แตะสองนิ้วพร้อมกัน แทน ตลิกขวานะครับ

ในส่วนคอมพิวเตอร์ที่บ้าน

ถ้าเป็น PC ผมแนะนำให้ปิดสวิทช์มอนิเตอร์ไปเลยครับ ประหยัดไฟ และติดตั้ง UPS เพื่อสำรองไฟ
หากเป็นโน๊ตบุ๊คแนะนำให้ตั้งค่า Screen ให้ปิดเองใน 1 นาที เพื่อประหยัดไฟ เสียบปลั๊กช๊าตไฟไว้ตลอด  และไม่แนะนำให้ปิดฝาโน๊ตบุ๊คนะครับแม้จะตั้งค่าไม่ให้คอมหยุดทำงานเวลาปิดฝาแล้วก็ตาม เนื่องจากการระบายความร้อนจะไม่สะดวกครับ
และที่สำคัญตั้งค่า sleep เป็น never เพื่อให้คอมพิวเตอร์ไม่หลับไปครับ
Spacexopedia | Built with Flutter
Tags: flutter, spacex, opensource, functional
Published: 2020-07-11 04:16:58

###Introduction
Hello guys, From the past 4 weeks I was working on a flutter project not dedicatedly but in my free time. The purpose of this project is to develop the ultimate SpaceX experience in a variety of platforms. A single experience, from a single codebase.

### About Spacexopedia
Spacexopedia has been developed to provide information about space projects of giant space company SpaceX. App is a light-weight, fast and easy to use. It fetches the data from the open-source r/SpaceX REST API, which can be found [here](https://github.com/r-spacex/SpaceX-API).

This Spacexopedia has been built using the Flutter framework, which allows to build an app for mobile, desktop & web, from a single codebase.

###App features:-
* Past & upcoming launches: flight no., launch date, location, vehicle type,rocket used etc.
* Tesla Roadster : orbit, speed & distance of the Elon Musk's Tesla Roadster.
* Rockets catalog: read about all rockets, capsules & ships SpaceX has developed over the years.
* Dragon capsule catalog: type, diameter, height, weight, capacity, payload.
* Core & capsules details: more information about each core & capsules launched

After the completion of the first phase, it seemed to be in a stable state so I have decided to publish it on the play store. 

###Links
* App link:- [Play Store](https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_spacexopedia)

* Project source code:- [Github](https://github.com/TheAlphamerc/flutter_spacexopedia)

* App preview:- [Youtube](https://www.youtube.com/watch?v=RdNilu8mNPI&t)

###Wrapping it up
This application is not affiliated with, funded or in any other way associated with SpaceX company.

If this project inspires you to build anything interesting let me know in comments. If you have any ideas for new features or wants to contribute in project be sure to send a [pull request](https://github.com/TheAlphamerc/flutter_spacexopedia/pulls).
If you found a bug or want to suggest a feature report it [here](https://github.com/TheAlphamerc/flutter_spacexopedia/issues). If you like the project then show your love by giving star the repo.
I Created An Application That Saved Me 2.6 Hours Each Year
Tags: python, automation, savingtime, automate
Published: 2020-07-11 03:36:42

---
title: I Created An Application That Saved Me 2.6 Hours Each Year
published: true
description: Using Python, I was able to automate the way I make invoices.
tags: Python,Automation,SavingTime,Automate
canonical_url: https://www.linkedin.com/posts/dennis-pilat_python-automation-activity-6683502137336569856-aRcx
---

Do you use automation in your day-to-day work life? Now I'm no Python developer, but I thought of developing a small application which automated a manual and repetitive task. I quickly created a small Python script which automatically fills out an online form which generates an invoices for me on submission.

Manually creating an invoice would take me around three minutes every time I do this. But with the script, all I have to do is provide the invoice number and invoice amount... and it fills out and submits the form for me. Leaving me with reviewing the .PDF invoice to make sure everything is correct. All of this done in less than five seconds.

What sort of things have you automated? Big or small?

52 Sundays in a year (the day I typically create and send my invoices...) * 3 minutes / 60 minutes = roughly 2.6 hours saved per year.

![Here's a .gif that shows me running the Python console application, entering in the invoice number and amount to be paid... resulting in a invoice .pdf to review and download.](https://i.imgur.com/ZT92S4y.gif)
*Here's a .gif that shows me running the Python console application, entering in the invoice number and amount to be paid... resulting in a invoice .pdf to review and download.*
Best platforms to start your blogging
Published: 2020-07-11 02:47:08

Blogging can be a great option for those who need a passive income. I use blogging to earn a little. And for that, I need to take care of my blog on a platform.

What is Blogging?

Blogging is a way of writing informative and valuable materials online so that your readers can read it.

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

There are several platforms available for you to start your blogging carrier.

The list includes Blogger from Google, WordPress, Ghost. These platforms can really help you manage your blog.

Want to find more about these platforms. I have explained in detail about the <a href="https://www.nets4.com/2020/07/blogging-platforms.html" rel="dofollow">best blogging platforms for beginners</a> to start.

And I believe this will be helpful for you.
Looking into the gaps♣️
Tags: writing
Published: 2020-07-11 02:46:59

The simplest way I can describe the intersection between having an inclination to write [poetry and code] is that each way of creating is a an attempt to bridge the gaps in the inconsistencies that present themselves in the world that we exist in today. By acknowledging the brokenness in systems, recognizing how fragmented and diverse human desire is – then I find the courage to begin to look into the gaps, plough through my own apathy and cynicism.

[Read more here](https://laudebugs.me/laudebugs.me/#/writing/crwr-minorr-cs-major)👣
A lesson in line endings
Tags: unix, windows, javascript, data
Published: 2020-07-11 01:49:33

How many folks out there have installed git on a windows machine and seen this prompt:

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

I have come across this before and just clicked next with the default *Checkout Windows-style, commit Unix-style line endings* selection without thinking about it. Well, I _had_ to think about line endings yesterday - a lot. 

It started out when I had to parse some comma separated values data, something that looked like this:

```
""First Name","Last Name","Age""
""Michael","Mizanin","39""
""Stephanie","Garcia","36""
""Bryan","Danielson","39""
```
☝️ I assumed each line was terminated with a new line or `\n` character (more on that soon).

I had to process the data - specifically remove the leading and trailing quotes from each row that would result when I split the data on the commas. For example, I wanted to avoid having `""First Name"` in column 1 or `"Age""` in column 3 of the header row and instead have `"First Name"` and `"Age"` respectively. So I went right to work:

```javascript
const tableData = wweSuperstars.split('\n')
  .map(rowText => { 
    return rowText.split(',')
      .map(cellText => cellText.replace(/^"|"$/g, '')) // 👈replace leading and trailing quotes (from first and last columns)
      .join(',');
})
```

Here is what I ended up with:

```javascript
[
  ['First Name', 'Last Name', 'Age"'],
  ['Michael', 'Mizanin', '39"'],
  ['Stephanie', 'Garcia', '36"'],
  ['Bryan', 'Danielson', '39"']
]
```
Notice the last _cell_ in each row still ends with the quote. What made this more puzzling was that when running the project locally, the data would get cleaned correctly but once deployed, the anomaly would surface.

After spending longer than I would like to admit trying to figure out why it behaved differently locally versus once deployed and what the root cause was, a colleague of mine came to my rescue and suggested it _could_ be because of a carriage return being present at the end of each row. Armed with this new knowledge, I modified the code a little bit:

```javascript
...
return rowText.split(',')
      .map(cellText => cellText.replace(/^"|"\r*$/g, ''))
...
```
☝️ added `\r*` to the regex to say _remove trailing `"` and trailing carriage return (`\r`) if present_

And that did it! 

Basically, what I was missing was that on my machine, each row was terminated solely by a line feed (`\n`) while when deployed to the remote server, it was terminated by a carriage return followed by a line feed (`\r\n`) - explained by the fact that my machine was a mac (UNIX) while the remote server was Windows. This led to the `\r` sticking around at the end of each row (even though it was not visible to the naked eye). Aren't computers fun?!

The git installer tried to warn me about line endings - I should have listened.
Day 40 : #100DaysofCode - I need project ideas
Tags: codenewbie, 100daysofcode, beginners
Published: 2020-07-11 01:42:58

Oh how I wish I had something to write about. . . you know, some amazing summary on everything I did and learned today -- but I do not. So what did I do today you ask?

![Alt text of image](https://media.giphy.com/media/igslNNHcChrxngXR0E/giphy.gif) 

Well besides relax for a moment, I focused on my bootcamp labs and checked out <a href="https://www.freecodecamp.org/">freecodecamps</a> new <a href="https://www.freecodecamp.org/learn/scientific-computing-with-python/python-for-everybody/"> Scientific Computing with Python Certification (300 hours) </a> and <a href="https://www.freecodecamp.org/learn/data-analysis-with-python/data-analysis-with-python-course/"> Data Analysis with Python Certification (300 hours)</a>. 

I am so excited for these courses because I was just stating the <a href="https://dev.to/sincerelybrittany/day-37-100daysofcode-30-seconds-of-code-3kng"> other day</a> that Python is definitely a language that I plan to learn very very soon and then I saw this <a href="https://www.freecodecamp.org/news/python-curriculum-is-live/"> article </a> and it was like an angel answered my prayers.

![Alt text of image](https://media.giphy.com/media/3ohhwjrt6CQrBYm5Ec/giphy.gif) 

Besides that, I am trying to come up with ideas for my next project. Although it is still relatively early, it is important to begin the planning process as soon as possible. I have no idea what I want to build using Ruby on Rails and would love any input or ideas from anyone at this point. Feel free to comment below any ideas you may have for me.

Thanks for reading. 

Sincerely,
Brittany
Cloud Run Monolith - TerminusDB Discussion #16
Tags: devops, cloud, deployment, database
Published: 2020-07-11 01:40:58

---
title: Cloud Run Monolith - TerminusDB Discussion #16
published: true
description: Every week the TerminusDB core team get together to hear a talk led by one of our members. The discussions are always very interesting, so we thought we'd share. This week we have our Engineer talking about Cloud Run Monolith.
tags: devops, cloud, deployment, database
---
Every week the TerminusDB core team get together to hear a talk led by one of our members. The discussions are always very interesting, so we thought we'd share. This week we have our Engineer talking about Cloud Run Monolith.
Criando um Serviço Linux com systemd
Tags: dev, debian, linux, services
Published: 2020-07-11 03:20:26

---
title: Criando um Serviço Linux com systemd
published: true
date: 2020-07-11 01:36:14 UTC
tags: Dev,debian,linux,services
canonical_url: https://marquesfernandes.com/criando-um-servico-linux-com-systemd/
---

Frequentemente vejo a necessidade de criar algum programa ou script que precisa estar sempre rodando na máquina, e também quando o computador é reiniciado.

Existem algumas ferramentas para resolver esse trabalho, mas sempre considere usar soluções embutidas em seu sistema operacional primeiro.

É muito fácil criar um serviço Linux, você pode criar um serviço que rode qualquer script ou programa em qualquer linguagem de programação, e tornar esse sistema persistente e resiliente como um serviço em sua máquina.

Nesse artigo vamos usar o [systemd](https://pt.wikipedia.org/wiki/Systemd) para gerenciar nosso serviço, ele está presente na maioria das distribuições linux como Ubuntu, Debian, OpenSuse…

## Criando o Programa

Vamos criar uma aplicação web simples em [NodeJs](https://marquesfernandes.com/afinal-o-que-e-nodejs/) de exemplo. Ele vai escutar na porta `9999` e retornar a data atual.

```
const http = require('http');http.createServer(function (req, res) { res.write(new Date().toString()); res.end();}).listen(9999);
```

Vamos testar, no navegador entre em `http://localhost:9999`.

![](https://marquesfernandes.com/wp-content/uploads/2020/07/image-2.png)

Agora que validamos que nosso programa funciona, vamos fazer com que ele rode sempre, se por algum motivo ele parar de funcionar deve ser restartado e caso a máquina seja reiniciada o serviço precisa iniciar também.

## Criando o Serviço

Chamerei nosso serviço de `webdate`, com o seu editor de terminal preferido cria um arquivo no caminho `/etc/systemd/system/webdate.service`.

```
[Unit]Description=WebDate - Serviço Web de DataAfter=network.targetStartLimitIntervalSec=0[Service]Type=simpleRestart=alwaysRestartSec=1User=centosExecStart=/usr/bin/node /caminho/arquivo.js[Install]WantedBy=multi-user.target
```

Você precisará alterar as seguintes variáveis:

- `User=` : Coloquei o seu usuário atual, ele será o usuário que executará o serviço
- `ExecStart=` : Esse é o caminho para o script que será executado, você precisa fornecer primeiro o caminho completo para a linha de comando no, normalmente, `/usr/bin/node` e em seguida o caminho completo para o seu arquivo.

Agora para iniciar o nosso serviço basta executar o seguinte comando:

```
systemctl start webdate
```

Para habilitar a inicialização automática quando o sistema é ligado:

```
systemctl enable webdate
```

Pronto, agora seu serviço já está executando e configurado para reiniciar em caso de falha e iniciar automaticamente junto com o sistema. Para parar o serviço basta executar o seguinte comando:

```
systemctl stop webdate
```

O post [Criando um Serviço Linux com systemd](https://marquesfernandes.com/criando-um-servico-linux-com-systemd/) apareceu primeiro em [Henrique Marques Fernandes](https://marquesfernandes.com).
AC slayers part 3 - Transition to UserInfoPage and display name
Tags: javascript, react, nextjs, webdev
Published: 2020-07-11 00:28:02

Alright, so where did we leave off last time? I just finished up some very rudimentary data fetching with the new client-side fetching hook `useSWR`.

Part 3 will involve:
* Creating the route from `HomePage` to the `UserInfoPage` and passing data from the `HomePage` to the `UserInfoPage`. 
* Displaying Summoner Name on UserInfoPage

Ok, so to do this I am going to have to transfer some of the data fetching logic from the home page into the newly created UserInfoPage(summoner). 

Now, I need to think about how I am going to send the summoner name to the UserInfoPage. Initially, I was going to do this by passing props, but for now, I think that tapping into the router object is a better solution.

Next has a hook that allows you to tap into the [router object](https://nextjs.org/docs/api-reference/next/router) easily.

On the `HomePage` I created a `handleSubmit` function that will push `pathname` and the `query` to the URL. Looks like this:
```
  const handleSubmit = () => {
    Router.push({
      pathname: "/summoner",
      query: { name: input }
    })
  }
```

Pass a reference of `handleSubmit` to the `onClick` in my button.

`<button type="submit" onClick={handleSubmit}>Submit</button>`

My HomePage looks like:
![HomePage](https://dev-to-uploads.s3.amazonaws.com/i/bxda61nk0voti2tk5kzt.png)

And my UserInfoPage looks like:
![UserInfoPage](https://dev-to-uploads.s3.amazonaws.com/i/ib8lsjj3godjfbcj1wbu.png)


In action
![summoner page](https://dev-to-uploads.s3.amazonaws.com/i/r2505xymjrki9m0mdajx.gif)

Cool! So now we can type in the name of the summoner and when we submit we are routed to URL: `http://localhost:3000/summoner?name=Rjeezy`. Using the `useRouter` hook I can grab the name query param and pass that into my data fetching `queryString` which in the end displays summoner Rjeezy (which is my summoner name in League of Legends).

Check out parts [1](https://dev.to/rembrandtreyes/creating-an-auto-chess-stats-site-tft-focused-part-1-3d3c) & [2](https://dev.to/rembrandtreyes/getting-the-api-to-return-something-anything-ac-slayers-part-2-5c51) if you haven't yet.
Andrew Schonfeld: FlaskCon Impressions
Tags: flask, flaskcon, python
Published: 2020-07-03 18:46:44

---
title: Andrew Schonfeld: FlaskCon Impressions
published: true
description: FlaskCon feels
tags: flask, flaskcon, python
//cover_image: https://direct_url_to_image.jpg
---

Well Mr Andrew, thanks for accepting the FlaskCon interview which
shall be up on [our youtube channel](https://www.youtube.com/channel/UC3QC5pASs8v5YVxKwJDtZeQ) soon.

## Tell us a bit about yourself

My name is Andrew Schonfeld, I've been a software engineer in the finance industry for over 14 years in Boston. The first 8 writing Java spring applications for big banks and then next 7 developing Python Flask applications for a small quant shop. More recently, in the midst of a pandemic, I moved to Pittsburgh to start a new job at Argo AI (a software company specializing in autonomous vehicles) mainly working on Typescript applications.  I currently live in Pittsburgh, PA with my wife, 2 kids & our dog, Zoe.

## How was your experience with Flask during all this time?

Flask has been a great & powerful tool.  As I mentioned in the interview I can't believe the simplicity of it compared to developing web applications in Java.  So You can start with as little Flask infrastructure as you want and as time goes on slowly make use of a lot of the great plugins people have added to Flask.  Like Flask-Compress, Flask-Cache, Flask-ngrok.

## What is your feel about FlaskCon?

It's tough to totally get the feel of FlaskCon right now because the major days are Saturday and Sunday.  That being said, there was still a lot of feedback on Discord which was great.  I hope that this conference continues in the future because Flask is very widely used and there's plenty of people just like who have had great experiences with it they'd like to share.  All in all FlaskCon was great.  Everyone seemed very engaged and happy to have me there.  I think the technical hurdles of doing a conference remotely were handled very well TBH.  I think it will open the doors to having a wider range of speakers in the future because sometimes it's not possible to be there in person.

## How can we improve the Flask community?

I think you chose the right avenues to advertise this thing like r/flask.  I think in the future you can look at posting on r/python, Hackernews and maybe having links to it directly in the Flask documentation will help.  Hopefully some of the other speakers have some good ideas on this as well.

## How can we find you?

@aschonfeld5 (twitter)
@aschonfe (discord)
u/aschonfe (reddit)
https://www.facebook.com/andy.schonfeld.12 (facebook)

I'm also on LinkedIn as "Andrew Schonfeld"

_Thank You Mr Andrew_