teleren/devto huggingface dataset:
My first PR
Tags: opensource
Published: 2023-09-20 21:39:47

[**GitHub Repo** 
](https://github.com/pbelokon/BukuRain)


**Issue**
This week we're contributing to each other's project by adding a new feature that enables the tool to convert a Markdown file to a HTML file. [The issue](https://github.com/pbelokon/BukuRain/issues/4) I raised is to add a markdown functionality to the tool, and the tool has a few the Markdown syntax features such as Heading1(2,3) and Italics. Also, one of my goals was to add features without using the existing framework and library on the Internet. 

**The process of work**
While I was implementing the app I tried not to break the existing code, so at the beginning, I read all of the functions and files he created. After that, I slightly made a change to the main function to read the Markdown file and create the HTML file, specifically, I followed the way of reading .txt file and created the function to read .md file using else if statement underneath the existing code. After that, I narrowed down to the function that parsing to HTML file, he already got parseToHtml function but it was for .txt files and I newly created mdParseToHtml function underneath. I used if else statement to try to convert md file functionalities to html tags line by line.

**Problem**
After I created the [PR ](https://github.com/pbelokon/BukuRain/pull/5)and talked to the creator, and he reviewed my code and asked me to use `let` instead of `var` which is outdated and he doesn't like it. Also, at the first PR, my code doesn't read the line in Italics when the line in Italics is between strings, for example, `*Italics*` it's working whereas `string *Italics* string` it doesn't read the line and it wasn't able to convert the file into HTML file. Based on his comments, I used `regex` with `match` method to solve the issue. 

**Learn**
Reading other's code was really hard to understand at the beginning, but I found out that he implemented code in another way even though we complemented the same tool, so I would say it's a pretty good chance to learn another approach and the style of coding. Also, through his comments I could solve the issue in another way such as by using `regex`, `regex` is not really familiar with me, but now I know how to use it.
How to create Stored Procedures in MySQL
Tags: programming, backend, mysql, database
Published: 2023-09-20 21:26:11

in this post i'll give you the simple way to create Stored Procedures in MySQL :
click here => [**How to create Stored Procedures in MySQL**](https://thebestcoding.com/how-to-create-stored-procedures-in-mysql/)
visit our Website => [**The Best Coding**](https://thebestcoding.com/)
"Big Tech: What They Say vs. What They Mean": CodeNewbie Podcast S25E6
Tags: podcast, career
Published: 2023-09-20 21:24:51

---
title: "Big Tech: What They Say vs. What They Mean": CodeNewbie Podcast S25E6
published: true
description: 
tags: podcast, career
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zl690nfi8hjngq4d76yp.jpg
---

In S25E6 of the CodeNewbie Podcast, [Rachel](https://twitter.com/rachelnabors), a developer education leader on sabbatical from Big Tech met with @saronyitbarek to talk about what they have been up to since they were last on the show in 2017, the inside scoop on Big Tech, and Rachel’s experience working for organizations such as Meta, Amazon, and Microsoft.

{% embed https://www.codenewbie.org/podcast/big-tech-what-they-say-vs-what-they-mean %}

- [Listen on Apple Podcasts](https://podcasts.apple.com/us/podcast/s25-e6-big-tech-what-they-say-vs-what-they-mean-rachel/id919219256?i=1000628553572)

- [Listen on Spotify](https://open.spotify.com/episode/5Y674WhthqILpMPPXnSIUD)

Or, listen wherever you normally get your podcasts!

***

### We will see you next week, happy coding

PS: Make sure to subscribe to the CodeNewbie podcast if you haven't yet + review us on your chosen platform!
Building expo apk
Published: 2023-09-20 21:15:04

I have built apk successful but when i open the link for downloading apk, i get this error 'Hmmm… can't reach this pageThe connection was reset.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_RESET
' l tried several times but the error persisted please help me.
Taking Blockchain to the grassroots.
Published: 2023-09-20 21:01:31


🔷 Blockchain at the grassroots will only be interesting if it is introduced into what they love doing.

🔷 Imagine having a decentralized application where farmers can connect to wholesalers/retailers and consumers.

🔷 Imagine having a decentralized e-voting application where everyone can vote in the comfort of their homes and can monitor their votes.

🔷 Imagine having a decentralized health application where I can easily consult my doctor and can have a feasible consulting time to ease the long hours of queuing up in a health facility.


🔷 How about a decentralized transport application?

🔷 If blockchain will get to the grassroots, then Agriculture, Transportation, Health and Governance can not be ignored!
Object detection with ONNX, Pipeless and a YOLO model
Tags: computervision, machinelearning, python, tooling
Published: 2023-09-20 20:36:10

[ONNX](https://onnx.ai/) is an open format from the Linux Foundation to represent machine learning models. It is becoming extensively adopted by the Machine Learning community and is compatible with most of the machine learning frameworks like PyTorch, TensorFlow, etc. Converting a model between any of those formats and ONNX is really simple and can be done in most cases with a single command.

[Pipeless](https://www.pipeless.ai), on the other hand, is an **open-source computer vision framework** that allows you to **analyze and edit video streams in real-time** effortlessly. The experience is similar to when you create a serverless web application, you just worry about your specific function and leave the rest to the magic.

Until now, when you needed to execute inference in Pipeless, you needed to import the model framework, for example PyTorch, load the model on it and then call the appropriate run function on the model. That not only produced heavy applications, but you also required to implement the logic or configuration to run the inference on GPUs (If you have ever fought with that, you will probably agree that it is not a pleasant job).

Using ONNX as the standard model representation format for Pipeless seems really convenient, and thus, by embedding the ONNX Runtime within Pipeless, running inference becomes trivial.
With the latest release, **the Pipeless worker ships the ONNX runtime built-in**. This means you just need to provide a model file or a URL where the model file is hosted, and **Pipeless will automatically load** it into the ONNX runtime **and run inference for every frame of the video stream** out of the box. But there is more! Pipeless also **takes care of the most common pre-processing tasks automatically** by detecting the model input format, such as image reshaping, transposing image dimensions, etc. Thanks to that you can save time in writing pre-processing code, or even not write at all. Also, since it is an extended practice to use a second model to pre-process data and then chain that data with the actual model for inference, Pipeless also gives you the option to specify a second model for pre-processing, and it handles all the model chaining automatically, including the model versions migration if required. Finally, if all those options are not yet enough for your use case, you can still implement more logic for pre and post-processing in Python, or combine all the mentioned options.

I created an example application for object detection making use of all the described above that you can run in just a minute. To avoid making this post longer, you can find the [instructions to execute it here](https://www.pipeless.ai/docs/v0/examples/onnx-yolo). Hope you enjoy it!

{% cta https://github.com/miguelaeh/pipeless %} 
If you want to support what we are doing at Pipeless, you can help us by starring the GitHub repository or providing us with feedback via a GitHub issue or discussion. Don’t be shy!
{% endcta %}
Micro-Post: Tracking TMUX pane zoom-in status
Tags: tmux, beginners, shell, programming
Published: 2023-09-20 20:31:19

Something that I used to struggle with is remembering whether or not I'm currently zoomed into a particular pane on any particular TMUX window.

The following is what I implemented to resolve this problem for myself, and I thought this may be interesting to others.

In my `tmux.conf` file, I added the following zoom binding:
```
# automatically reload zoomed-in status
bind z {
  resize-pane -Z
  if-shell "tmux list-panes -F '#{?window_zoomed_flag,yes,no}' | grep yes" {
    set -g status-left "[#S | ZOOMED-IN ] " ## Print session label in the left side of the status bar
  } {
    set -g status-left "[#S] " ## Print session label in the left side of the status bar
  }
}
...
...
# simple pane rename binding
bind R command-prompt -p "(rename-pane)" -I "#T" { select-pane -T "%%" }
...
...
# setting the pane status bar how I like it
set -g pane-border-style fg=yellow
set -g pane-active-border-style "bg=default fg=yellow"
set -g pane-border-status top
set -g pane-border-format "[ ###P | #T | CMD: `#{pane_current_command}` ]"
```

The result is that when I'm "zoomed out" I see, the following in my window status bar:
```
[SESSION_NAME] (0: WINDOW_NAME)
──[ #0 | PANE_NAME | CMD: `zsh`]───────────
```

When I zoom into pane #0, my window status bar shows the following:
```
[SESSION_NAME | ZOOMED-IN ] (0: WINDOW_NAME)
──[ #0 | PANE_NAME | CMD: `zsh`]───────────
```

Zooming out will automatically return the window status bar back to what it originally was:
```
[SESSION_NAME] (0: WINDOW_NAME)
──[ #0 | PANE_NAME | CMD: `zsh`]───────────
```

I just so happened to prefer seeing the "ZOOMED-IN" statement at the very top of my TMUX session's status bar since it catches my attention more easily.

I also threw in here a simple binding for quickly changing pane titles since it's also useful.

Hope others find this info useful :-)
How are you prepping for Hacktoberfest?
Tags: opensource, discuss, community, hacktoberfest23
Published: 2023-09-20 20:15:38

---
title: How are you prepping for Hacktoberfest? 
published: true
description: Share your strategies for prepping for Hacktoberfest 
tags: #opensource #discuss #community #hacktoberfest23
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-09-20 19:58 +0000
---
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbxt2eiu9gmhvzqi3y3r.png)
If you're new to open source or like me, an avid open source contributor, and plan on participating in Hacktoberfest, share your tips on how you're preparing for this event in the comments.
I'm a beginner programmer pls i need help with this code
Tags: cpp
Published: 2023-09-20 20:07:41

//please why is the later part of my code not working. it is suppose to output to console the values of the elements in the vector "story_letters"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;

int main(){
  
     string story;
     vector<char>story_letters;
     cout<<"Enter your story to be encrypted"<<endl;
     getline(cin,story);
     for(int i=0;i<=story_letters.size();i++){
      story_letters[i]=story[i];
      
    }
    
    for(int j=0;j<=story.size();j++) {
    cout<<story_letters[j]<<endl;}

}
Rotating a vertical rectangle image using React-cropper
Tags: react, rotateimage, javascript, ui
Published: 2023-09-20 19:46:21

For those who are using react-cropper package (https://github.com/react-cropper/react-cropper/), and has issues with rotating images, you're reading the correct post.

react-cropper uses cropperjs under the hood. And cropperjs has multiple github issues regarding auto-fit issues when rotating.

Here's the modal we use with the image inside the Cropper

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xjkwmvxk4kqdothw51ba.png)


After rotating, the image goes out of bounds and looks cropped out. I played around with setCropBoxData and setCanvasData and nothing worked. Until I came to find out that this is more like a scaling problem. 

I created a helper function to handle scaling for these types of images. 
```javascript
/**
   * This function scales the image when a vertical rectangle image is being rotated.
   * The goal is to auto fit the image inside the container width.
   */
  const handleScaleVerticalImg = (cropperRef) => {
    const imgData = cropperRef.current.cropper.getImageData();
    const containerData = cropperRef.current.cropper.getContainerData();
    const isVertImg = imgData?.naturalWidth < imgData?.naturalHeight;

    if (isVertImg && [90, 270, -90, -270].includes(imgData?.rotate)) {
      const height =
        imgData?.height < imgData?.naturalHeight
          ? imgData?.height
          : imgData?.naturalHeight;

      // img height is it's width after rotating
      cropperRef.current.cropper.scale(containerData.width / height);
    } else {
      cropperRef.current.cropper.scale(1);
    }
  };
```

Breakdown of code:
```javascript
if (isVertImg && [90, 270, -90, -270].includes(imgData?.rotate)) {
```

This checks if the image is vertical and is rotated sideways.

```javascript
const height =
        imgData?.height < imgData?.naturalHeight
          ? imgData?.height
          : imgData?.naturalHeight;
```

imgData?.height is the container height, and we should get the smallest from these two. This is to ensure that when it rotates, the scale is calculated correctly.


```javascript
cropperRef.current.cropper.scale(containerData.width / height);
```

The image's width should scale down according to the container's width. In this case we are basing the image width from the height as when it rotates sideways, the height becomes the width.

After rotating, this is now what happens:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1w796pzpub26njyz4def.png)



That's it, if you have any questions feel free to comment below!

Cheers,
FM
Erlang, send file with httpc:request multipart/form-data
Published: 2023-09-20 19:27:25

Good afternoon, to everyone who reads my letter. I wish you a good day! 

 I am a beginner Erlang developer, and faced with a problem when sending a file, a picture using httpc:request, I have read a lot of things on the Internet, but did not find a concrete answer on the Internet.

My problem is that I do not quite understand what parameters I need to pass in the body of the request for the server to process my file. If you are reading this and have encountered this problem, but you know some article, please attach it in the comments. 

The second problem is that I send my file to the server, and when my file request arrives, its body is sent to the validator, which checks for the "inputfile" key with a value of type file, and also "inputfile_filename" with a value of type string. And I do not understand how to put in one request and sending a picture, and maps with inputfile and inputfile_filename to correctly process my request to the server.

I would be grateful for any help, advice or a link to an article about multipart/form-data.

Once again I wish you a good mood and a good day.
WakaTime: Uma Forma de Aumentar Sua Produtividade e Gerenciar Seu Tempo
Tags: braziliandevs, productivity, programming
Published: 2023-09-20 19:22:23

## Introdução:

No mundo do desenvolvimento de software, cada minuto gasto de forma eficiente faz a diferença. Por conta disso, apresento à vocês: **WakaTime**. Uma extensão que possibilita gerenciar seu tempo gasto em cada projeto, e além de tudo, aumentar sua produtividade.

## Tópicos abordados <a name="topicos-abordados"></a>

- [O que é o WakaTime](#oque)
- [Aumentando a Produtividade com o WakaTime](#prod)
- [Configurando o WakaTime](#config)

## O que é o WakaTime <a name="oque"></a>

O WakaTime é uma extensão que pode ser integrada facilmente em diferentes ambientes de desenvolvimento. A sua principal função é te auxiliar no gerenciamento de tempo em cada projeto, proporcionando uma dashboard com diversas informações como:

- Gráfico de linha demonstrando sua atividade semanal

- Comparação com a sua média diária

- Gráfico com horas totais de codificação em um dia

- Gráfico em pizza mostrando suas linguagens

- Gráfico em pizza mostrando seus editores

![dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vh5m4rgg25mek0w973ek.png)

Vale lembrar que a extensão está disponivéis em diversas IDE's e outros programas.

![programas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6vrrrhq5w8filrdlaan.png)

## Aumentando a Produtividade com o WakaTime <a name="prod"></a>

Com o WakaTime é possível definir metas para você cumprir durante o tempo que você desejar, essas metas podem variar de acordo com suas necessidades, tendo como opções:

- Horas gerais da sua semana

- Um projeto

- Uma linguagem

- Um editor

Com isso você pode gerenciar sua semana, seus estudos e seus projetos de uma forma fácil e prática e claro, gratuitamente.

## Configurando o WakaTime <a name="config"></a>

A configuração é a parte mais simples, vamos ao passo a passo:

1. Vá em https://wakatime.com/login

2. Crie sua conta

3. Após a criação você receberá a sua API KEY, que será utilizada na extensão

4. Abra seu editor de código

5. Procure a extensão WakaTime

6. Baixe a extensão e coloque a sua API key

7. Agora você tudo estará sendo guardado na sua Dashboard em https://wakatime.com/dashboard

## Conclusão 

Em resumo, o WakaTime é mais do que apenas uma extensão. Ele é uma ferramenta poderosa que pode ajudar você a melhorar sua produtividade, gerenciar seu tempo e suas metas. Comece a usar e veja a diferença!

- [Voltar ao inicio do artigo ↑](#topicos-abordados)

## Referências

- [Site oficial do WakaTime](https://wakatime.com/)

---


Muito obrigado por ler até aqui, não esqueça de curtir e compartilhar o artigo! 😁💙
My Git and VS Code Settings
Tags: beginners, git, vscode
Published: 2023-09-20 19:06:36

---
tags: 'beginner, git, vscode'
title: My Git and VS Code Settings
description: My Git and VS Code Settings
published: true
canonical_url: null
---

I work regularly with several different project types and languages across Windows, Mac, and Linux.

I find some basic settings for Git and VS Code smooth out some headaches.

My user settings include:

```
"files.eol": "\n", // Windows usually doesn't care, but Linux/Mac tooling is way more sensitive
"editor.trimAutoWhitespace": true,
"editor.fontSize": 16,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"window.zoomLevel": 0,
"[powershell]": {
    "editor.tabSize": 4
},
"[ruby]": {
    "editor.tabSize": 2
}
```

My git config consists of:

```
[credential]
	helper = wincred
[user]
	email = <my email here>
	name = Steven Murawski
	signingkey = <my gpg signing key here>
[diff]
	tool = default-difftool
[difftool "default-difftool"]
	cmd = code --wait --diff $LOCAL $REMOTE
[alias]
	commit = commit -S -s
[core]
	editor = code --wait
	eol = lf
	autocrlf = input
	excludesfile = ~/.gitignore
[difftool "winmerge"]
	cmd = /c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe
[gpg]
	program = c:/Program Files (x86)/GNU/GnuPG/gpg2.exe
```

Since I work on a number of projects that require a [DCO signoff](https://developercertificate.org/), I just default to signing off my commits (`alias.commit`) and I GPG sign them because I like how they look in the GitHub UI. ;)

I've set git to only use Linux line feeds for new clones/fetches (`core.eol`) and change anything with CRLFs on upload (`core.autocrlf`). To aid in this, my editor config has line endings set to `\n` as well.
How to Convert Binary to Octal
Tags: howto, convert, binary, octal
Published: 2023-09-20 18:32:18

---
image:
title: How to Convert Binary to Octal
description: Converting binary to octal is a common task in computer programming. Binary is a base-2 number system that uses only two digits, 0 and 1. Octal, on the other hand, is a base-8 number system that uses eight digits, 0 through 7. Converting binary to octal involves grouping the binary digits into groups of 3 and converting each group to its corresponding octal value.
tags:
  - howto
  - convert
  - binary
  - octal
author: ilihub
series: Number System Conversion
---

Converting [binary][Binary Number] to [octal][Octal Number] is a common task in computer programming. Binary is a `base-2` number system that uses only two digits, 0 and 1. Octal, on the other hand, is a `base-8` number system that uses eight digits, 0 through 7. Converting binary to octal involves grouping the binary digits into groups of 3 and converting each group to its corresponding octal value.

## Conversion

Here's a step-by-step guide on how to convert binary to octal:

1. Choose the binary number you want to convert to octal.
2. Group the binary digits into groups of 3, starting from the rightmost digit. If the leftmost group has less than 3 digits, pad it with leading zeros.
3. Convert each group of 3 binary digits to its corresponding octal value using the table below.

## Example

Let's walk through an example to illustrate the process. Suppose we want to convert the binary number 11011010 to octal.

1. The binary number we want to convert is `11011010`.
2. We group the binary digits into groups of 3: `011` and `011` and `010`.
3. We convert each group of 3 binary digits to its corresponding octal value using the table below. The octal value of `011` is `3`, and the octal value of `010` is `2`.
4. The octal representation of the binary number `11011010` is `332`.

## Binary-Octal Table

| Binary | Octal |
| ------ | ----- |
| 000    | 0     |
| 001    | 1     |
| 010    | 2     |
| 011    | 3     |
| 100    | 4     |
| 101    | 5     |
| 110    | 6     |
| 111    | 7     |

## Sample Code

This code **requires** [`@ilihub/code`](https://www.npmjs.com/package/@ilihub/code) npm package to run.

```javascript
import { BinaryToOctal } from "@ilihub/code";

const binary = "10000000";

const octal = BinaryToOctal(binary);
console.log(octal);

// Output
// 200
```

## References

- [Binary Number][Binary Number]
- [Octal Number][Octal Number]

---

[Binary Number]: https://ilihub.tech/blog/what-is/binary-number "What is a Binary Number?"
[Octal Number]: https://ilihub.tech/blog/what-is/octal-number "What is an Octal Number?"