teleren/devto huggingface dataset:
Tackling AuthToken Challenges, Embracing Simplicity, and Venturing into Web3
Published: 2023-04-26 01:12:11

Introduction

On day 85 of my #100DaysOfCode journey, I faced the challenges of debugging an issue related to authentication tokens and CORS middleware, while also exploring the world of web3. In this blog post, I'll share my experience with resolving the AuthToken bug, discuss the importance of keeping code simple, and delve into my progress with the web3 module.

The AuthToken Bug and CORS Middleware

The bug that initially set me back was an issue with the server not sending the authentication token to the frontend, causing it not to be stored in the browser. I couldn't see it in the Chrome Developer Tools' Application panel. Despite having implemented CORS middleware to allow cross-origin resource sharing (since the frontend and backend are on different domains), the issue persisted. It was time to dive into debugging and figure out the root cause of the problem.

Debugging and Resolving the AuthToken Issue

After some investigation, I managed to fix the AuthToken issue by adjusting the server-side code to correctly send the token to the frontend. This allowed the token to be stored in the browser as expected, and I could finally see it in the Chrome Developer Tools.

Reevaluating and Simplifying Code

In the process of fixing the AuthToken issue, I had to delete some code I had written previously. This prompted me to reevaluate my approach and consider the importance of keeping code simple. Overcomplicating things can lead to more bugs and maintenance issues, so I decided to focus on a more straightforward solution that would still meet my objectives.

Progress with the Web3 Module

I also spent time diving into the web3 module, the last module in Angela Yu's full stack web dev bootcamp course on Udemy. It covers topics like blockchain, the internet computer, and building decentralized applications.

Conclusion

Day 85 of my #100DaysOfCode journey taught me valuable lessons about debugging, simplifying code, and exploring new technologies. Resolving the AuthToken bug reinforced the importance of keeping code as simple as possible, while diving into the web3 module expanded my skillset and understanding of the blockchain ecosystem. As I continue my coding journey, I'm eager to apply these lessons and further develop my skills.
JavaScript: Function Types You Should Know!
Tags: javascript, beginners, frontend, learning
Published: 2023-04-26 01:03:36


Heyy, how are you?!

Have you ever had to deal with some JavaScript functions just... they weren't exactly the way you expected? Maybe it looked like the functions were written in a different way than what you've seen and I don't mean "logically" speaking... 😅

If yes, I would like to introduce you to some possibilities of types of functions that we can find!

So, let's start it and see some basic types!

___
### 🎯 Named Function (Traditional way):
The traditional way of creating a function and it's a set of statements that performs a task or calculates a value!

```javascript
function sayHello() {
  console.log('Hey everyone!');
}

sayHello();

// Output
'Hey everyone!'
```
___

### 🎯 Arrow Function:
**Arrow Functions** are simpler, are always unnamed and compact than traditional function expression!

```javascript
const sayHello = () => console.log('Hey everyone!');

sayHello();

// Output
'Hey everyone!'
```
___
### 🎯 Anonymous Function:

**Anonymous Functions** don't have a name specified after the **function** declaration, so we declare it with a variável to call this function at a some point and the function is anonymous but assigned to a variable!

```javascript
const sayHello = function () {
  console.log('Hey everyone!');
}

sayHello();

// Output
'Hey everyone!'
```
___
### 🎯 Higher Order Function:
**Higher Order Functions** in a nutshell words is a function that can take one or more functions as arguments or return a **function** as output. Some of **Higher order** types is like: **reduce**, **filter**, **map** and others.

```javascript
// A simple function to print a console.log
function sayHello(){
  console.log('Hey everyone!');
}

// Higher Order Function Example:
function higherOrderFnExample(functionToExecute){

  console.log('I can do anything!');

  functionToExecute()
}

higherOrderFnExample(sayHello);
```
___
### 🎯 Constructor Function:
It's is used to create **Function objects** and we need to use the **new** keyword to create a new **Function** instance!

```javascript
// Creating the Constructor Function
function Car () {
  this.name = 'Ford',
  this.color = 'Black'
}

// Creating the Object
const myCar = new Car();

console.log(myCar.name);
// Output
'Ford'

console.log(myCar.color);
// Output
'Black'
```
___

Hope this makes you feel a bit more comfortable with **functions** and their possibilities!

Feel free to reach out to me if you have any questions!

and obviously I hope you enjoyed it 🤟💪🤟💪
Using ChatGPT to learn anything
Tags: chatgpt
Published: 2023-04-26 00:30:35

Hi everybody! This is my first post here at Dev.to!
I can see how useful the new technologies in the IA field are. I really believe that we’re living a time where a lot of things will change. And, it 's awesome!
Today, I’m here to talk about one impressive thing the chatGPT can do: to teach! Some weeks ago, my friend and I were wanting to learn new frameworks. We choose react. Well, looking for a course or tutorials, I had one idea: if chatGPT is able to teach us? It was, more than surprisingly, very able to. 

With a command, it gave us all the step-to-step, study list, timeline, and a complete study plan to learn anything. I’ve been using it to learn frameworks, and… french!

A command like:

**ChatGPT, give me a complete study list, with timelines and steps, for learning French. Focusing on conversation and vocabulary**

With this command I get study steps based on weeks, what I should study in each week, and more additional tips. And ChatGPT can teach me grammar and vocabulary! 

But, aways remember: read the official documentation and check the informations are aways necessary.
SPVM::MIME::QuotedPrint - Quoted-Printable encoding/decoding
Tags: perl, spvm
Published: 2023-04-26 00:26:42

The MIME::QuotedPrint  class of <a href="https://metacpan.org/pod/SPVM">SPVM</a> has methods for Quoted-Printable encoding/decoding.

## Document

<a href="https://metacpan.org/pod/SPVM::MIME::QuotedPrint">SPVM::MIME::QuotedPrint - CPAN</a>

## Repository

<a href="https://github.com/yuki-kimoto/SPVM-MIME-Base64">SPVM::MIME::Base64 - Github</a>
SPVM::MIME::Base64 - Base64 Encoding/Decoding
Tags: perl, spvm
Published: 2023-04-26 00:24:23

The MIME::Base64 class of <a href="https://metacpan.org/pod/SPVM">SPVM</a> has methods for Base64 encoding/decoding.

## Document

<a href="https://metacpan.org/pod/SPVM::MIME::Base64">SPVM::MIME::Base64 - CPAN</a>

## Repository

<a href="https://github.com/yuki-kimoto/SPVM-MIME-Base64">SPVM::MIME::Base64 - Github</a>
Releasing PencilBible 2.0
Tags: reactnative, skia, bible, drawing
Published: 2023-04-26 00:21:23

## What is Pencil Bible (PB)?
[Pencil Bible's](https://pencilbible.com/) vision is to the be number on Bible app for tablets.

Since launching in March 2022, PB has been downloaded 50,000 times! A few weeks ago, when you searched _Bible_ on the iPad App Store, PB was ranked #2 with near-zero marketing. Crazy.

We've since dropped a few spots due to a 3.3 rating. V1 was tough to use for many people. It was buggy, slow, and the code was so messy. V2 also seemed like it an empty promise due to delay after delay (sorry [Erin](https://twitter.com/ErinChampWalker)) folks weren't happy about that.

Instead of sending through any bug fixes for V1, we decided to focus solely on V2 and a bug-freeish app.

## What was wrong with V1?

**Losing Annotations**
Annotations are the drawings Users make in PB. 
![Users can Annotate their Bibles and save to the cloud](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rj03p3rp1rp5u73es37v.png)

Annotations are what make PB unique. Users were drawing their hearts out only to find their Annotations missing. What good is note taking if the notes won't show up next Sunday?

**Pencil vs Touch**
<u>_Palm Rejections_</u>
When you're writing on a piece of paper your palm is typically touching the paper/screen at all times.

You adjust your hand while writing and your palm is lifted and shifted as you go. Sometimes you pick up the pencil/pen when you hand moves and sometimes you don't. V1 was not really good at determining when to draw and when not to draw. 

This caused Annotations to stop mid-stroke or not draw at all. No bueno.

<u>_Scrolling vs Drawing_</u>
Typical drawing/note-taking apps scroll when you use your finger and draw when you touch the screen with a stylus.

Our Annotation logic was created in React Native. My knowledge of the native ScrollView was limited/non-existent. This made is difficult to achieve this _simple_ feature that 100% of our Users expected. So, we settled for a hacky band-aid.

We'll stop there as those were the two main issues. The list of bugs was much longer

## V2 is finally here!
Since launching V1 in March 2022, V2 has been the top priority. This week, we finally released a new and much improved update to PB.

Instead of creating and managing our own Annotation system like we did in V1, we were graced with the release of [React Native Skia](https://github.com/Shopify/react-native-skia). This library has been a life saver in so many ways.

- Simplified SVGs
- A more intuitive drawing and Canvas system 
- The enabling of Pencil vs Touch which allows us to support [palm rejection](https://enticio.com/blogs/studio-and-office/a-beginner-s-guide-to-palm-rejection)
- Android tablet support (coming soon)
- Easier Shapes
- Easier to Erase your Annotations

Skia has transformed Pencil Bible into a professional and user-friendly piece of software.

There is still plenty of work to do in PB's mission **_To help people discover God's word in creative, new, and wonderful ways_**.

TTP
What are your biggest tips for beginners to open-source and/or Github?
Tags: beginners, codenewbie
Published: 2023-04-26 00:15:41

This week we are going to switch it up a bit! If you are new here, I normally use this “What I Learned This Week” segment to discuss relevant posts on [#codenewbie](https://dev.to/t/codenewbie) and/or [#beginners](https://dev.to/t/beginners) that relate to things I have been interested in this week.

If you haven't peeped the CodeNewbie tag or CodeNewbie Team Page, here are those things!

{% embed https://dev.to/t/codenewbie %}

{% embed https://dev.to/codenewbieteam %}

However, this week, with our [Github + DEV Hackathon](https://dev.to/devteam/announcing-the-github-dev-2023-hackathon-4ocn) that was just announced, I am here to post a couple of Github-related articles that I found interesting/potentially helpful for y’all who maybe want to enter the Hackathon!

Here is the info for the Hackathon if you missed it:

{% embed https://dev.to/devteam/announcing-the-github-dev-2023-hackathon-4ocn %}

Also (side note) for y’all who are beginners who are maybe feeling the whole “why would I enter, I am not good enough to win” imposter syndrome-vibe,  this is also a friendly reminder that if you participate by sending in a valid project, you get a free DEV Sticker Pack + a badge for your profile STILL! So, if you are looking to explore new things, but only have the time/capacity for a small project, go for it anyways!

## Here we go! Here are my biggest tips and resources for Github + open-source.

**If you need a general introduction to Github and/or Git, look no further!**

{% embed https://dev.to/mohsenkamrani/getting-started-with-git-and-github-a-beginners-guide-1aek %}

**If you want an introduction to open-source projects, here is your pick:**

{% embed 
https://dev.to/surajondev/beginners-guide-to-starting-your-open-source-journey-1bgb %}

**Our very own @jess made a open-source guide for beginners YEARS ago that still holds up great! Find that here!**

{% embed https://dev.to/jess/open-source-resources-for-beginners %}

**If you are looking for a tutorial on Github in quite literally anything (well, not anything but a lot of things), here are some great repositories!**

{% embed https://dev.to/aatmaj/cool-github-repositories-for-everyone-b8p %}

{% embed https://dev.to/johongirr/100-most-useful-github-repositories-every-programmer-needs-32cg %}

Okay y'all, that is about it for this week! I hope everyone has a great week, **let me know what you are learning OR let me know what your biggest tips for beginners to open-source and/or Github are below!!!**
Tech Talks with Tomer: The Challenges of Smart Contracts and Interoperability with Axelar Co-founder Sergey Gorbunov
Tags: blockchain, interoperability, crypto, opensource
Published: 2023-06-23 15:33:38

---
title: Tech Talks with Tomer: The Challenges of Smart Contracts and Interoperability with Axelar Co-founder Sergey Gorbunov
published: true
date: 2023-04-26 00:00:00 UTC
tags: blockchain, interoperability, crypto, opensource
canonical_url: https://stellar.org/blog/tech-talks-with-tomer-smart-contracts-and-interoperability-with-axelar-co-founder-sergey-gorbunov
---
![Tech Talks with Tomer S2 E1 Interoperability](https://assets-global.website-files.com/5dee83171c0040227763490c/645bfdaf4145444fe831c9ab_Thumbnail%20(2).png)
Tech Talks with Tomer is a video and podcast series with Stellar Development Foundation VP of Product Tomer Weller. In this episode he chats with the co-founder of Axelar, Sergey Gorbunov.

{% cta https://stellar.org/blog/tech-talks-with-tomer-smart-contracts-and-interoperability-with-axelar-co-founder-sergey-gorbunov?utm_source=devto&utm_medium=organic&utm_campaign=ttwt %} Listen to Podcast {% endcta %}
SPVM::Math - Mathematical Functions
Tags: perl, spvm
Published: 2023-04-25 23:37:35

The Math class of <a href="https://metacpan.org/pod/SPVM">SPVM</a> has methods for mathematical functions.

## Document

<a href="https://metacpan.org/pod/SPVM::Math">SPVM::Math - CPAN</a>

## Repository

<a href="https://github.com/yuki-kimoto/SPVM-Math">SPVM::Math - Github</a>
Need Help
Tags: javascript
Published: 2023-04-25 23:34:34

I want to catch socket message of current page in chrome extension.
The high lighted part of image.

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

So I write code like bellow.
`window.addEventListener('message', (event) => {
    console.log(event)
}, false);`
Now I get some result.

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

But I can get what I want.
So It means what I want is not message?
How can I catch it?
Please help me.
How to fix An error occured when accessing the keychain when authenticating with firebase_auth
Tags: flutter, dart, firebase, macos
Published: 2023-04-25 23:20:28

## Introduction

In this article we'll discuss the fix for `An error occured when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the above error`

You might see this error when trying to sign in to your flutter app using `firebase_auth`

## Solution 

1. Open your macOs folder in Xcode
2. In runner, under targets select `+ capability` tab
3. select `keychain sharing` complete the instructions given in Xcode
4. restart your project and you will be prompted to enter your keychain password

That's it, You should now be able to authenticate with firebase_auth in your flutter app.


## Connect with me
Thank you for reading my post. Feel free to subscribe below or connect with me on [LinkedIn](https://www.linkedin.com/in/curtlycritchlow/) and [Twitter](https://twitter.com/CritchlowCurtly). You can also [buy me a book](https://www.buymeacoffee.com/curtlycritchlow) to show your support.
How to fix network error (such as timeout, interrupted connection or unreachable host) has occured.
Tags: flutter, macos
Published: 2023-04-25 22:53:02

## Introduction

In this article we will show how to fix the `network error (such as timeout, interrupted connection or unreachable host) has occured`

## Solution

In Xcode, check Incoming connections and outgoing connections in debug, release and profile mode as shown below.



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

## Connect with me
Thank you for reading my post. Feel free to subscribe below or connect with me on [LinkedIn](https://www.linkedin.com/in/curtlycritchlow/) and [Twitter](https://twitter.com/CritchlowCurtly). You can also [buy me a book](https://www.buymeacoffee.com/curtlycritchlow) to show your support.
Create a Virtual Machine in Less Than a Minute with ARM Template and Azure Quick Start
Tags: azure, devops, cloud, beginners
Published: 2023-04-25 22:47:20

Welcome to the thrilling world of cloud computing! Today, we'll look at how to use an ARM Template with an Azure Quick Start template to create a virtual machine in under a minute.

Before we go into the specifics, let's define an ARM Template and an Azure Quick Start template.

Azure Resource Manager (ARM) template is a JSON file that describes the infrastructure and configuration of an Azure resource. It enables you to automate Azure resource deployment and manage them as a single entity. When you need to deploy several Azure resources with a single command, ARM templates are incredibly beneficial since they reduce time and maintain consistency.

Azure Quick Start templates are pre-built templates that enable you to establish a wide range of Azure resources rapidly. These pre-built templates are optimised to help you get started with Azure fast and effortlessly.

Now that we've covered the basics of ARM Templates and Azure Quick Start templates, let's get started on creating a virtual machine in under a minute.

## Step 1:
Log in to the Azure Portal using this [link](https://azure.microsoft.com/en-gb/free/) 


## Step 2: 
Type "Deploy a custom template" into the search box and choose the Linux Virtual Machine option from the list of common template.


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

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


## Step 3:
 Fill in the blanks with the virtual machine's name, username, and password.

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


## Step 4: 
Click on "_**Review + Create**_" and wait a few seconds for the validation to completed. 


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


Then, for the virtual machine to be created, click "**_Create_**".

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


Click on "**_Go to resources_**" and choose the virtual machine you named in Step 3

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


Prefect! Your virtual machine is now ready to use. It's that easy!

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


To summarise, creating a virtual machine in less than a minute utilising an ARM Template with an Azure Quick Start template is really simple and saves you a significant amount of time. It's an excellent approach to deploy many Azure resources with a single command. So go ahead and give it a go now!
Samdock - The most modern CRM system for small businesses
Tags: crm, customers, software
Published: 2023-04-25 22:35:50

Samdock is a modern, easy-to-use CRM system for small and medium-sized sales teams. Our solution actively supports the entire process, from prospect acquisition to closing and beyond. 

With Samdock, customer management, marketing, and sales are digitized and automated in such an intelligent way that companies can work much more efficiently and successfully.

[https://samdock.com](https://samdock.com)
Installing Postgres Extensions with Django Migrations.
Tags: django, postgres, database
Published: 2023-04-25 22:26:36



![Photo by [Tai Bui](https://unsplash.com/@agforlclassic?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)](https://cdn-images-1.medium.com/max/12000/0*xumi7xxQ__-UJJPn)

It’s absolutely possible to create Postgres extensions without having to log into your database and run it manually. The same task can even be more daunting if you have to do it the Docker way. Django makes it way easier with [database migration operations](https://docs.djangoproject.com/en/3.2/ref/contrib/postgres/operations/). This way, you and your team members wouldn’t have to worry about extra DevOps work.

In this example, we will learn how to create a **pg_trgm** (or any other Postgres extension) by just creating a migration file.

 1. Add `django.contrib.postgres` in `INSTALLED_APPS` in your project settings.

 2. Create a new migration file in your app’s migration folder. It’s conventional to follow the index of your last migration file. Say, your last migration file is `0012_last_migration_file.py`, the new migration file could then be named, `0013_name_of_extension.py`.

 3. For installing, `pg_trgm`, add the following code to the migration file you just created:

```python
from django.contrib.postgres.operations import TrigramExtension
from django.db import migrations

class Migration(migrations.Migration):
    dependencies = [
        ('app_name', '0012_last_migration_file'),
    ]

    operations = [
        TrigramExtension(),
    ]
```

Replace `TrigramExtension` in lines 1 and 9 with any of the available Postgres operations subclasses. As at the time of writing these common extension subclasses are available:

`BloomExtension`, `BtreeGinExtension`, `BtreeGistExtension`, `CITextExtension`, `CryptoExtension`, `HStoreExtension`, `TrigramExtension`, `UnaccentExtension`

For extensions that are not listed above, use the `CreateExtension` subclass:

```python
from django.contrib.postgres.operations import CreateExtension
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ('app_name', 'last_migration_file'),
    ]

    operations = [
        CreateExtension('postgis'),
    ]
```

replace postgis in line 11 with the name of the extension to be installed.

4. Run migration, `python manage.py migrate`

### Happy coding!