teleren/devto huggingface dataset:
Our self-developed alternative service for self-developed alternative services, free to use Github
Published: 2022-02-11 09:30:02

The code hosting service CodeFever developed by the Dandelion team is used to replace Github internally. After nearly two years of polishing and stability verification, it is officially free and open source for everyone to use today. You are welcome to search for CodeFever on Github​​​​​​​​to visit us If you have any ideas or suggestions, you are welcome to submit them to us and participate in the open source co-construction of CodeFever.

CodeFever：https://codefever.pgyer.com/community

Open source project entry：https://github.com/PGYER/codefever

technology stack used： PHP 、Go 、Nodejs 、React

Installation method: Support manual installation, and also support docker one-line command installation. Everyone is welcome to fork/star/follow, and more welcome to submit PR.

The main function:

🆓 Free forever: Free for everyone to use forever, you don't need to worry about paying

❤️ Complete Open Source: Complete open source without reservation, without any compiled or encrypted code

🥬 Lightweight installation: minimalist design style, excluding redundant functions that are heavily redundant

⚡️ Efficient performance: extremely fast speed, extremely low server resource requirements, 1 core CPU/1G memory can run

♾️ Unlimited warehouses: There is no limit on the number of warehouses and the number of warehouses used 

⌨️ Code comparison: Support for different versions of submitted code supports highlighting and comparison

🛤️ Branches and tags: Full support for native Git features to help manage code more clearly

🙋‍♂️ Merge Request: Support multi-person collaboration, making code version control smoother

🙅🏻‍♀️ Branch protection: The branch protection function makes code submission safe and controllable, and code review is easier and clearer

👥 Multi-person collaboration: support multi-person team collaboration, and can set the roles and permissions of each member

🖥️ Management background: support the super administrator background, allowing the team leader to manage all projects and user information
Node Congress 2022
Tags: nodecongress, node, engineers, events
Published: 2022-02-11 11:33:56

---
title: Node Congress 2022
published: true
date: 2022-02-11 09:17:33 UTC
tags: nodecongress,node,engineers,events
canonical_url: 
---

 ![Node Congress 2022](https://www.panayiotisgeorgiou.net/wp-content/uploads/2022/02/georgioupanayiotis.png)

[Node Congress 2022](https://nodecongress.com/) is a two-day conference on all things Node.js, Edge-native workers (Cloudflare & others), Serverless, Deno & other JavaScript backend runtimes, gathering Back-end and Full-stack engineers across the globe in the cloud.

To help you stay up-to-date on the latest backend tech, we’re coming back with a new remote gig on February 17-18, 2022. Mark your calendars for the biggest virtual event for the Node.js community.

[Check Schedule](https://nodecongress.com/#schedule)

[Buy Tickets](https://nodecongress.com/#tickets)

[Follow me on Instagram](https://www.instagram.com/panayiotisgeorgiou)


The post [Node Congress 2022](https://www.panayiotisgeorgiou.net/node-congress-2022/) appeared first on [Panayiotis Georgiou](https://www.panayiotisgeorgiou.net).
Date.toLocaleDateString() is wrong! ...how to fix it?
Published: 2022-02-11 09:07:49

Let's cut to the chase with an example:

```
new Date('2022-02-09').toLocaleDateString('de-DE')
```

This outputs `9.2.2022` ...which is the wrong format!

The common expected format would be `09.02.2022`!

> The first one is not 100% wrong though, it's more like an unusual but tolerated format in Germany. However, what shows in the windows task bar, in apps, in official documents, and so on, is always `09.02.2022` here in Germany. The other just shows sometimes up in handwritten letters.

There are countless related bug reports complaining about this on the web, in all kind of unrelated projects, since ages. Still, it doesn't seem to budge.

So I tried to dig up the "official" format:

- https://en.wikipedia.org/wiki/Date_format_by_country => `dd.mm.yyyy` => OK
- https://gist.github.com/mlconnor/1887156 => `dd.mm.yyyy` => OK


I must confess that despite searching for quite some time, I failed too to discover **where** this "wrong" `d.m.yyyy` comes from. Despite every browser seem to implement it, I haven't found the official reference regarding these date format patterns.
Cannot find module 'error/typed'
Tags: javascript
Published: 2022-02-11 09:06:23

Recently I ran into following cryptic error:

```sh
❯ yarn start
yarn run v1.22.17
$ ember serve
Cannot find module 'error/typed'
Require stack:
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/body/any.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/tiny-lr/src/server.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/tiny-lr/src/index.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/ember-cli/lib/tasks/server/livereload-server.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/ember-cli/lib/tasks/server/express-server.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/ember-cli/lib/tasks/serve.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/ember-cli/lib/utilities/require-as-hash.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/ember-cli/lib/cli/index.js
- /Users/michal/ember/ember-intl-changeset-validations/node_modules/ember-cli/bin/ember

Stack Trace and Error Report: /var/folders/8q/yrjx_8s115q43r8w5qd90_m00000gn/T/error.dump.05e840f2a302d50fe17fbb9a71055219.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

No [good results on Google](https://www.google.com/search?q=%22Cannot+find+module+%27error%2Ftyped%27%22&sxsrf=APq-WBs0YpF7gS-9xIP0tFPJsrK6ZiXOyw%3A1644569940572&ei=VCUGYouZIo6r9u8P_66WsAI&ved=0ahUKEwiLk_a4pPf1AhWOlf0HHX-XBSYQ4dUDCA4&uact=5&oq=%22Cannot+find+module+%27error%2Ftyped%27%22&gs_lcp=Cgdnd3Mtd2l6EAMyBggAEAgQHjoHCAAQRxCwAzoGCAAQFhAeSgQIQRgASgQIRhgAUOYBWMYGYNIJaAFwAXgAgAFyiAHPAZIBAzEuMZgBAKABAcgBCMABAQ&sclient=gws-wiz) and weird behaviour when even rolling back to previous (working) commit did not help made me experiment and conclude that there are only two things that could help.

## How to fix

### Using yarn-deduplicate

Often times the cruft accumulated in `yarn.lock` makes the whole project go boom. [yarn-deduplicate](https://github.com/atlassian/yarn-deduplicate) can potentially help with this. Seen this in few instances, but(!) this **did not fix** the problem in my case.

```sh
❯ trash node_modules
❯ yarn global add yarn-deduplicate
❯ yarn-deduplicate
❯ yarn
❯ yarn start
yarn run v1.22.17
$ ember serve

Build successful (19933ms) – Serving on http://localhost:4200/
```

### Regenerate yarn.lock

This method worked for me.

```sh
❯ trash node_modules
❯ trash yarn.lock
❯ yarn
❯ yarn start
yarn run v1.22.17
$ ember serve

Build successful (19933ms) – Serving on http://localhost:4200/
```

## Notes

The [trash](https://formulae.brew.sh/formula/trash) command is an OSX utility for moving files or folder to the trash and you can replace it by calling `rm -rf`.

-----

Photo by Andrea Piacquadio from Pexels
Python 101: Ultimate Python Guide
Tags: python, beginners, tutorial, programming
Published: 2022-02-11 09:02:03

__

### Introduction

Python is a high level programming language that was developed by **Guido van Rossum**.
It is also referred to as general purpose programming language due to its wide range of applications such as:

- Data Analytics

- Web Development

- Machine Learning & AI

- Wed Data Scraping

- Data Science 

- Desktop Applications

### Setting Up Python

Python comes with 2 main distributions ;

- Python Software Foundation (PSF)

- Anaconda Distribution

In this article, we'll only focus on the PSF.

### Install Python
Python installation for Windows does not need much othee than downloading the Python installer from [python.org](https://www.python.org/).

### Step 1: Downlaod the installer
Open your favorite browser window and navigate to the [python download page for Windows.](https://www.python.org/downloads/release/python-3102/)
Click on the link for the latest Python 3 Release. O went with Python 3.9.6 which is the most stable 3.9.x version for demonstration purposes.

### Step 2: Run the installer
Double-click on the downloaded .exe file and you should see the following window pop up;

![Python installer window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9pjlum8pvhbhwc7035na.jpeg)
**Important:** Make sure to check the box that says _add python 3 x to path_ to ensure that the install places the interpretor into your execution path.
Click on **Install now** to install Python 3 and wait for the installation to finish.

### First python program
Now that we are done with python 3 installation, it's time time to write our first program.
There are numerous IDE's and text editors to write Python code but in this tutorial we'll use Python's built'in IDLE.
To open IDLE, type the following command in youe command prompt.
`$ idle-python3.9`
IDLE opens a **Python shell** in a new window.
The Python shell is an interactive environment that allows you to write python code and execute it imediately.
This is we write our "Hello, world" program.
To print out something in Python, we use the `print()` function.
Type the code below in your interactive python shell.
`print("Hello, World")`

### Running our first code
Before running our code, we need to save it. Click on File then Save As and save your code as _"hello.py"_.
Notice the _.py_ extension; that tells our intepretor that it is running a python code.
After saving your code, click **f5** to run. 
If all went well, the following window should appear;
![Hello world](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0b253b6r35fhntva4puz.jpeg)

### Conclusion
This was a tutorial on getting started with Python programming. We have gone through the installation provess and written our hello, world program.
But there is more to Python programming than that.
In the next article, we'll be looking at Strings and Methods.
Thanks for reading.
Add and Remove Items Dynamically in an Angular Dropdown List
Tags: angular, webdev, programming
Published: 2022-02-11 08:53:18

See how easily you can add and remove items dynamically from the Angular Dropdown List of Syncfusion. In this video, you will learn how to add new items to the Angular Dropdown List pop-up with and without an index. You will also see how to reset a selected item programmatically in the component and how to remove items from the pop-up. 

Product Overview: https://www.syncfusion.com/angular-ui-components/angular-dropdown-list

Download a getting started example from GitHub: https://github.com/SyncfusionExamples... 

{% youtube tEuTP0SYxn4 %}
How to Read a CSV in C#
Published: 2022-02-11 08:19:20

---
canonical_url: https://ironsoftware.com/csharp/excel/docs/questions/csharp-read-csv-file
---

When you need to read CSV files in C#, IronXL is an easy answer. You can read a CSV file with commas, or any other delimiter, as seen in the code segments below.

## Steps to Read a CSV File in C#

1. Download and install Read CSV in C# Library
2. Add code to read a CSV file programmatically
3. Specify the name of the CSV file to be read
4. File saved as a new name and format

**C#:**
```
private void button2_Click(object sender, EventArgs e)
{
    WorkBook workbook = WorkBook.LoadCSV("Read_CSV_Ex.csv", fileFormat: ExcelFileFormat.XLSX, ListDelimiter: ",");
    WorkSheet ws = workbook.DefaultWorkSheet;
    workbook.SaveAs("Csv_To_Excel.xlsx");
}
```

**VB:**
```
Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
	Dim workbook As WorkBook = WorkBook.LoadCSV("Read_CSV_Ex.csv", fileFormat:= ExcelFileFormat.XLSX, ListDelimiter:= ",")
	Dim ws As WorkSheet = workbook.DefaultWorkSheet
	workbook.SaveAs("Csv_To_Excel.xlsx")
End Sub
```

---

## 1. Install the IronXL Library

Before you can make use of IronXL to read CSV files in MVC or ASP or dotnet core, you need to install it first. Here is a quick walk-through.

- In Visual Studio, select the Project menu
- Manage NuGet Packages
- Search for IronXL.Excel
- Install

![Image 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zr0a60xmsb5hk5f0xt1o.png)
**Figure 1** - _IronXL.Excel NuGet Package_

Or Download from the Iron Software website, [here](https://ironsoftware.com/csharp/excel/packages/IronXL.zip): 

---

**How to Tutorial**

## 2. Read CSV Files Programmatically

Now for the project!

Add the IronXL Namespace

**C#:**
```
using IronXL;
```

**VB:**
```
Imports IronXL
```

Add code to read a CSV file programmatically with IronXL and C#

**C#:**
```
private void button2_Click(object sender, EventArgs e)
{
    WorkBook workbook = WorkBook.LoadCSV("Read_CSV_Ex.csv", fileFormat: ExcelFileFormat.XLSX, ListDelimiter: ",");
    WorkSheet ws = workbook.DefaultWorkSheet;
    workbook.SaveAs("Csv_To_Excel.xlsx");
}
```

**VB:**
```
Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
	Dim workbook As WorkBook = WorkBook.LoadCSV("Read_CSV_Ex.csv", fileFormat:= ExcelFileFormat.XLSX, ListDelimiter:= ",")
	Dim ws As WorkSheet = workbook.DefaultWorkSheet
	workbook.SaveAs("Csv_To_Excel.xlsx")
End Sub
```

![Image 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/siew2tdxtuilmx2o5s0a.png)
**Figure 2** - _A CSV file opened in Notepad_

A Workbook object is created. The `LoadCSV` method of the Workbook object is then used to specify the name of the CSV file to be read, in format to read it into, and what the delimiter is for the file. In this case, a comma is used as a separator.

A Worksheet object is then created. This is where the contents of the CSV file will be placed. Then the file is saved under a new name and format.

![Image 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5rf9rm7yqi388hyzp1jl.png)
**Figure 3** - _The CSV file opened in Excel_

---
How to serve sitemap.xml file in the build folder after building react & webpack application 
Tags: react, webpack, sitemap
Published: 2022-02-11 08:11:20

I have a sitemap.xml file in the public folder of my react application. **I can view the sitemap during development in localhost, but when deployed to aws amplify it is not available. So I tried to build it locally and the sitemap was not served in build/dist folder.** Can someone please help me with the webpack configuration to make the sitemap available in dist/build folder.

![Before building](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2r1q0im9ziwixn20icfr.png)

![After running npm build](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zz9nh1g32ilc7uus28ai.png)
Convert XLS to XLSX in C#
Published: 2022-02-11 08:05:33

---
canonical_url: https://ironsoftware.com/csharp/excel/examples/convert-xls-to-xlsx-in-csharp
---

To convert XLS to XLSX in C# - simply load an XLS Excel workbook with IronXL, and then save with the ".xlsx" file extension.

Note that images, charts, split panes, freezing panes will not always be copied between XLS and XLSX formats.

IronXL can convert between XLS, XLSX, XLSM, CSV, TSV, JSON, XML files simply by loading and saving with the relevant file extensions.

You can download a file project from this [link](https://ironsoftware.com/csharp/excel/downloads/csharp-xls-xlsx.zip).

**C#:**
```
using IronXL;
 
WorkBook workbook = WorkBook.Load("Test.xls");
 
//This is how we can convert .xls workbook to xlsx workbook.  
//Just SaveAs with the .xlsx file extension!
workbook.SaveAs("Test.xlsx");
```

**VB:**
```
Imports IronXL
 
Private workbook As WorkBook = WorkBook.Load("Test.xls")
 
'This is how we can convert .xls workbook to xlsx workbook.  
'Just SaveAs with the .xlsx file extension!
workbook.SaveAs("Test.xlsx")
```
How to Write CSV in .NET
Published: 2022-02-11 07:56:36

---
canonical_url: https://ironsoftware.com/csharp/excel/docs/questions/csharp-write-to-csv-file
---

Ever wondered how to quickly use C# to write to CSV? Wonder no more! IronXL provides a very quick and easy way to write data into CSV files in .NET.

---

**Step 1**

## 1. Add IronXL to Your Project

Just in case you haven’t installed IronXL yet, here’s the quick steps you need to take

- Open Visual Studio and select the Project menu
- Click Manage NuGet Packages
- Search for IronXL.Excel
- Click Install

Or use the following command into the Developer Command Prompt:

`PM> Install-Package IronPdf`

If you would like further guidance from any of our tutorials please follow this link [https://ironsoftware.com/csharp/excel/docs/](https://ironsoftware.com/csharp/excel/docs/)

You can even download the file project [here](https://ironsoftware.com/csharp/excel/downloads/csharp-write-to-csv.zip).

---

**How to Tutorial**

## 2. Create an Excel Workbook

Let’s create a quick project!

First, create an Excel workbook containing the following information

![Image 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e5xerqkwegwwr1o2dos.png)
**Figure 1** - _Normal Excel data to be exported to CSV_
 
Then add the IronXL Namespace in order to be able to write to csv files in C# and IronXL

**C#:**
```
using IronXL;
```

**VB:**
```
Imports IronXL
```

---

## 3. Save Workbook to CSV

The following code makes use of the Workbook object’s Load method to load a file into Excel.

Then, it uses the SaveAs method to save the file in the desired format - in this case: CSV.

What’s interesting here is that it appends the name of the worksheet onto the filename, which is a quite nifty reminder on where the data is coming from.

**C#:**
```
private void button3_Click(object sender, EventArgs e)
{
    WorkBook wb = WorkBook.Load("Normal_Excel_File.xlsx"); //Import .xls, .csv, or .tsv file
    wb.SaveAs("Excel_To_CSV.csv"); //Exported as : Excel_To_CSV.Sheet1.csv
}
```

**VB:**
```
Private Sub button3_Click(ByVal sender As Object, ByVal e As EventArgs)
	Dim wb As WorkBook = WorkBook.Load("Normal_Excel_File.xlsx") 'Import .xls, .csv, or .tsv file
	wb.SaveAs("Excel_To_CSV.csv") 'Exported as : Excel_To_CSV.Sheet1.csv
End Sub
```
 
The output CSV file looks like the following when opened in a normal Text Editor such as Notepad.

![Image 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rniqjpjp4fev1r8yt9tx.png)
**Figure 2** - _Output CSV file_

---
Difference Between Class Based and Function Based Components in React!
Published: 2022-02-11 07:50:40

Class Based Components were used in react before the release of hooks which supports state changing mechanism etc in function based component. 
We also use Class Based Components nowadays but function based component is more reliable with the release of react hooks. Again it depends upon on the user which one to use.They can use both or any one.
In Class Based Components the state is managed only using objects whereas in function based we can have different values

**Function Based Component**

```
const [showUsers, setShowUsers] = useState(true);

//To Update this state
//we need to call setShowUsers() function and pass the value
```

In function based Component the new state will overwrite the previous state,but we can do merging by using our own logic


**Class Based Component**

```
 constructor(){
    super();
    this.state = {
      showUsers:true,
    };

  }

//To update this State
this.setState((prevState)=>{
        return {//Things to be returned}
    })

```
The New State will get merged with the previous state it won't get overwritten as in function based component.

**Class based component cannot use React Hooks!!**


Thanks for reading :)
I use function based component!!What about you?
Mistakes I made as a Codenewbie
Published: 2022-02-11 07:37:38

"Quality is not an act, its a habit." Aristotle

Today I'm sharing some of the mistakes I made when I started coding back in December 2020. I hope it helps you navigate the murky beginner waters especially as a self-taught dev.

**1. The social media lie we all fall for**
I used freecodecamp for my journey and I remember hurriedly going through tests without paying attention to what the code was all about. This was driven by the same speed I'd see on twitter. Totally forgetting that this person is possibly re-doing the tests or they maybe had previous background on the same. Pace yourself, do not for a moment think that your progress means any lesser just because you are taking long to understand. Remember that social media is all but a façade.

**2. Taking long before building projects**
I took so long before I started building projects. You will quickly realize that building as you learn will take you strides ahead. With HTML & CSS you can make a website and if you don't feel ready to build a website, try CSS animations or even a simple navbar. The goal here is to make something that is functional. Forget the aesthetics, you're learning.

**3. Taking long breaks**
At some point I decided to take a break and resume once I finished my undergraduate studies. Looking back now, that was detrimental since getting back felt like I was starting from scratch. Having to battle thinking that you know only to realize that you forgot!! Haha!

I had forgotten so much. Incase you have to juggle school or career and coding make sure you code at least 3 or 4 times a week instead of closing that whole book for a while. Whichever way works for you, make sure not to stop.

**4. Failure to read!!**
I don't thing I can overemphasize how this disadvantaged me. I was in my own bubble oblivious of all that's happening out there. There are so many books, articles and free materials online on tech that you can freely access. You want to be knowledgeable on other tech news, new inventions, trending topics, frameworks, basic facts, origin of programming languages and so much more. Do not overlook the value addition from reading! You really don't want to dwell on hearsay! Do you?

**5. Not asking questions and being too shy at it**
I was always hesitant to ask questions whenever I got stuck. I'd feel as if that was dumb or foolish. Come to think of it, why get stuck for days or hours on end when help is a call or text away? Every pro was once a beginner so, send that dm, reach out to people and by that it even gets more interesting and builds your confidence.

Probably as a codenewbie you're feeling that all this is tough, trust me, it gets better.
"All things excellent are as difficult as they are rare." Baruch Spinoza. Keep going!

What are some of the other dire mistakes you've made in your journey? Comment and let's keep learning from one another. Thank you for reading and I'll see you in my next article. Bye.
Tips To Generate A Strong Password
Tags: security, cybersecurity, privacy
Published: 2022-02-11 07:37:32

Numerous internet security firms have examined and analyzed the millions of passwords leaked in various data breaches. Almost everyone agrees that the most common password used by people is: 123456. The second most common password is usually either password or 123456789. We often overestimate our ability to make up good passwords. We often tell ourselves that coming up with secure passwords is easy. In fact, some websites on the internet also claim to provide useful techniques to generate secure-yet-memorable passwords, such as:

- Sentence abbreviation: I know what you did last summer!! can be written as!kWyDL5!! which is a somewhat strong password.

- The XKCD technique: First suggested by popular comic xkcd.com, it involves combining four common unrelated words such as CorrectHorseBatteryStaple to form one secure password.

- Mnemonic devices: For each account, imagine an unlikely scenario and
make a mnemonic device, for example, for your Gmail, think of a Shark riding a Pineapple on NH7, and combine them to create GmSh4rN3aPnh7!

- Language-mixing: This only works for non-English languages that use an alphabet/script different than the Roman alphabet. Writing native words in the Roman alphabet/script can qualify as a pretty secure password under most circumstances.

These best practices will help you create strong and easy-to-remember passwords everytime. 

Hope this was helpful.