teleren/devto huggingface dataset:
Answer.dev v0.3.0 released!
Tags: go, github, community, opensource
Published: 2022-11-17 06:00:54

Thanks to our contributors! **Answer.dev 0.3.0 has already been released, which contains some bug fixes, optimizations, and improvements.** Let's together see more details.


### New Features 
- Added timezone and locale support
- Added Administrator dashboard
- Added version check feature that keeps your Answer always updated
- Added installation guide; now you can install Answer with just one click!
Improved search support for the Administrator

### Bug Fixes
- User interface language does not meet expectations [#75](https://github.com/answerdev/answer/issues/75)
- Dashboard will remind you how to configure SMTP  [#64](https://github.com/answerdev/answer/issues/64) [#44](https://github.com/answerdev/answer/issues/44) 
- Fix bug for problem search [#71](https://github.com/answerdev/answer/issues/71) 
- Fix bug for delete problem [#68](https://github.com/answerdev/answer/issues/68) 

### Other Changes
Change upload directory
Combine client and server language files
Support linux/arm64 Docker image [#77](https://github.com/answerdev/answer/issues/77) 

**Answer is still under very active development. Watch on [GitHub](https://github.com/answerdev/answer) to receive updates.**

---

Being highly scalable and modern, **Answer.dev is an open-source knowledge-based community software with which you can efficiently build various Q&A communities,** ranging from customer support to user communication. 

For more information on past and future versions of Answer.dev, please see: https://github.com/answerdev/answer
A glance at Turbopack
Tags: webpack, nextjs, webdev
Published: 2022-11-17 05:58:40

Turbopack got announced with the release of Next 13, and is deemed to become the successor of Webpack.

If you're currently using Webpack for bundling, you might know the struggles of long first boots and generic slow bundling.
(I mean, slow is all relative)

But bundling certainly could happen faster, so the creators of Webpack, Vercel, and Next came together and introduced us to Turbpack.

At the time of writing, it's still in the alpha phase, so not ready for production, but a perfect time to explore it.

Turbopack can already be used with Next 13; in the future, you can also migrate your non-Next projects to it.

## Trying it out

To test out Turbopack, you can start an example code with the following command.

```bash
npx create-next-app --example with-turbopack
```

Now run the dev server by running:

```bash
npm run dev
```

Your startup and update time should be almost instant now!
They mention the bigger the application, the more you'll benefit from it.

## Background

So why is Turbopack so fast?

The first point is that it's built on Rust, which has proven to be a fast language.

For instance, you might have played around with Vite, which is already way faster than Webpack. However, Vite has one downside: it becomes slower for bigger applications.
This is due to how it bundles singular modules on a browser level.

With Turbopack, they choose to go for something called function-level caching. Which computes whether something called has to be refreshed or not.
Doing this and serving cache for partial functions that don't change your experience as a developer becomes way faster.

As a super high-level example, you change `file1` Turbopack receives the change file event and can compute the new combined files that use this file.

By doing this, it doesn't have to re-compute the entire application.

This all sounds very cool, but it's dependent on singular changes, so how do they get to start up time so fast?
And it's basically due to page-by-page rendering.
There's no point in bundling your entire application at run time as you only request one page at a time.
In Turbopack, they solved this by only rendering the pages when requested.

## What to expect

I hope they roll out the individual CLI soon, as allowing existing (non-Next) Webpack apps to migrate makes sense.

The benchmarks and initial feeling for it feels really good, and I have high hopes for Turbopack.

By the looks of their roadmap, they're taking a lot of inspiration from their SWC migration in how they will port essential Webpack plugins.

I'm pretty sure this will take a while to achieve.
The future of bundling does look promising 🙏.

How do you feel about Turbopack?

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Python os Module
Tags: python, beginners, tutorial
Published: 2022-11-17 05:56:01

It is possible to automatically perform many operating system tasks. The OS module in Python provides functions for creating and removing a directory (folder), fetching its contents, changing and identifying the current directory, etc.

You first need to import the os module to interact with the underlying operating system. So, import it using the import os statement before using its functions.

**Getting Current Working Directory**
The getcwd() function confirms returns the current working directory.

```
>>> import os
>>> os.getcwd()
'C:\\Python37'
```
**Creating a Directory**
We can create a new directory using the os.mkdir() function

```
>>> import os
>>> os.mkdir("C:\MyPythonProject")

```
**Changing the Current Working Directory**
We must first change the current working directory to a newly created one before doing any operations in it. This is done using the chdir() function.

```
>>> import os
>>> os.chdir("C:\MyPythonProject") # changing current workign directory
>>> os.getcwd()
'C:\MyPythonProject'
```
**Removing a Directory**
The rmdir() function in the OS module removes the specified directory either with an absolute or relative path.

```
>>> import os
>>> os.rmdir("C:\\MyPythonProject")
```

**List Files and Sub-directories**
The listdir() function returns the list of all files and directories in the specified directory.

```
>>> import os
>>> os.listdir("c:\python37")
['DLLs', 'Doc', 'fantasy-1.py', 'fantasy.db', 'fantasy.py', 'frame.py', 
'gridexample.py', 'include', 'Lib', 'libs', 'LICENSE.txt', 'listbox.py', 'NEWS.txt',
'place.py', 'players.db', 'python.exe', 'python3.dll', 'python36.dll', 'pythonw.exe', 
'sclst.py', 'Scripts', 'tcl', 'test.py', 'Tools', 'tooltip.py', 'vcruntime140.dll', 
'virat.jpg', 'virat.py']

```
How does SPVM work on IoT Device such as Raspberry Pi?
Tags: perl, spvm, iot, raspberrypi
Published: 2022-11-17 05:45:24

# Q. How does SPVM work on IoT Device such as Raspberry Pi?

A. Raspberry Pi is a Linux system. <a hreF="https://metacpan.org/pod/SPVM">SPVM</a> works well on Linux system. so SPVM work on IoT Device such as Raspberry Pi.

# Q. How Well SPVM works on IoT Device such as Raspberry Pi

A. SPVM creates an executable file by using <a href="https://metacpan.org/dist/SPVM/view/script/spvmcc">spvmcc</a> command. The executable file is deployed on IoT Device such as Raspberry Pi by copy.

# Q. How easy is it to get the sensor readings?

A. Sensor access uses C/C++/Assembler.SPVM provides ease of binding to C/C++ using <a href="https://metacpan.org/dist/SPVM/view/lib/SPVM/Document/NativeModule.pm">SPVM Native Module</a>.

# Q. How is data transferred to the Internet?

A. General ways using HTTP, TCP/IP, Linux, libraries of programing languages. <a href="https://metacpan.org/pod/SPVM::IO::Socket">SPVM::IO::Socket</a>, <a href="https://metacpan.org/pod/SPVM::Sys::Socket">SPVM::Sys::Socket</a> are currently being developed aiming to complete the implementation of libraries to transfer data to the internet in 2023,
Serverless Summit Day One
Tags: techlead, aws, serverless, solutionsarchitect
Published: 2022-11-17 05:43:10

---
title: Serverless Summit Day One
published: true
description: Brief summary of day one of Serverless Summit
tags: #techlead, #aws, #serverless, #solutionsarchitect
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7w8kppsn81r0tnormlli.png
---

Yesterday was day one of [Serverless Summit](https://www.serverless-summit.io/) - a community-driven virtual conference about modern application development using serverless on AWS. 

It was packed with Talks, Panel discussions and Lightning Talks from many AWS Community Builders, AWS Heroes, Solutions Architect or Cloud Engineers willing to share their experience. (like **Alex De Brie, Yan Cui, Matt Culter, Allen Helton**, and many others I didn't know - and I will start to follow on their blogs!)

Here are some screenshots and thoughts from yesterday talks:


### Key Architectural Decisions in Serverless
Alex DeBrie

![ideal serverless](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nprsblzka0tfyh4v0fn.png)

> Services that require a VPC are usually non-serverless services.  Try your best to avoid adding VPC ( and other non-serverless services to your application.

This statement hit me, VPC add complexity, costs, can impair development speed and testing capabilities.   I really need to dive deeper into this topic, because too often I see project with API Gateway and Lambda where a VPC is added by-default because of ... reasons!

--- 

Testing Serverless application was one of the main topic yesterday,  touched by many speakers - because it is not as easy as in _normal_ application.  Requires a shift in mindset and different tools.

The Testing Pyramid does not really apply anymore. What options do we have?

### The 1 Priority Change You Need to Make Your Serverless Tests More Effective - Marco Troisi

![Testing Honeycomb](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l17i3oii2657tuhpzax7.png)


## The Testing Pyramid in a Serverless world - Kristine Jetzke

![Testing Sparkling Diamond](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1nxxv7z4vfip43jgagrq.png)

Kristine also concluded her speech with a quote I love and we should all remember to us and to producers/project managers every time discussions about technical debt, time-to-market and crunch times start to happen - there is no trade-off, really!:

> High performers understand that they don’t have to trade speed for stability or vice versa, because by building quality in they get both. (Nicole Forsgren author of [Accelerate](https://www.amazon.de/Accelerate-Software-Performing-Technology-Organizations/dp/1942788339))


----


I really loved the Panel Discussions - really a friendly and informative chat about observability, tests, developer productivity and cool serverless solutions. But also the lighning talks were a packed of useful little _gems_ of serverless wisdom.

I am very looking forward to seeing today's talks.
Check out if you can still register, [tickets are limited, but free](https://www.serverless-summit.io/)!
Help please!!
Tags: android, kotlin, androiddeveloper, beginners
Published: 2022-11-17 05:40:52

Hello Everyone

Myself Aman , and I am new to android development in kotlin,
I need your help!!

is there any community on discord /telegram/ others where beginner like me can get some help

And is there any resources that will help me during my journey ?



Thankyou all for taking out time for helping me :;
My thoughts in reviewing pull requests
Tags: webdev, github, git, beginners
Published: 2022-11-17 05:38:35

I never thought Code Reviewing was ever that fun. Having to read other people's pull request seems tedious at the start. However, as you actually start it up, the conversation that you and the users have, can greatly increase the scope of the overall pull request.

> Review 1

I was waiting for any user to send a pull request so I can review them, and I saw one that is made by [mnosov622](https://github.com/mnosov622) from our [telescope](https://telescope.cdot.systems/) repository.
His [pull request](https://github.com/Seneca-CDOT/telescope/pull/3754#event-7789201439) was fairly simple. Change the font-style and sizes from the list provided. When I saw it at first, I suggested to use a square bracket as to a quatation, because it makes the line much neater, but then I was told that it might lead to a problem, and I completely agreed with them in that regard, but still stand with my opinion that the original way of doing it is not that great.

A few hours later I received a notification regarding other people contributing on the review that [manekenpix](https://github.com/manekenpix), and I made, and they went beyond what I imagine this tiny change can impact within the code. When the talks of the format not being great sprung up, a few people jumped into the conversation with suggestions of how we can implement this code much better. Of course, this is not what the purpose of the issue that was established at the beginning was, but it does allow us to realize the flaw of the current iteration, and how we can make it better in the future.

> Review 2

This second review is not as great in contrast to the first one, but it does show the importance of listening to other people's suggestion, can also help you branch out from your initial thoughts. 

Writing a review for this code, I simply noticed that the `VALIDATE` button did not look great being beside the text-field due to its sheer size. Therefore, I suggested to lower it by a little to help make sure that when a user take a first glance at this page, they won't think that it looks unappealing. After sending that review, a while later, another user commented that maybe it's better for the button to follow the same styling as the `next` and `previous` button. That's when I had a thought in my head, that what if instead of having a `VALIDATE` button be separated, why not make the `Next` button be only visible when the URL has been validated. This will help in terms of making the page look neater, because instead of having a button beside the text-field, you'll have directly underneat the page, and beside and already properly aligned button as shown by the image below.

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

> Conclusion

The importance of a review is not merely fixing the code that is done, or making sure it follows the standard. What I noticed is that it allows everyone who participates to come up with their thoughts to create ideas that will help the repository on its future development
How To Connect Multiple Database In Laravel 9
Tags: laravel, laravel9, database, mysql
Published: 2022-11-17 05:30:00

In this article, we will see how to connect multiple databases in laravel 9. we will learn how to use multiple database connections in laravel 9. 

Also, we will see laravel 9 multiple database connections with creating migration, model, and query examples.

Many times we have requirements in our project to use multiple database connections like MySQL, MongoDB, PostgreSQL, etc in laravel 9. 

When you work with large projects then you will need to manage multiple database connections. So, we will see one or more database connections in a single laravel 9 application.

So, let's see laravel 9 multiple database connections and how to connect databases in laravel 9.
Why I like React?
Tags: javascript, react, node, github
Published: 2022-11-17 05:22:45

## I like React Js;

I use React because I like React.
But some people use Vue because they like Vue, and some people use Angular because they like Angular.
What I like about React is that I can write JavaScript based UI.

## HTML base or JavaScript base;

The application code can be built and put together as a JavaScript bundle file.
Once put together, they are all pretty much the same.
However, there is a difference between Vue.js/Angular and React in terms of how the transpiler interprets the source code before it is put together. There are.
In Vue/Angular, HTML is written as Template and is separated from Script.
Because Template and Script are separated, the work of linking UI and processing is done by the transpiler.

Use hoge-key in HTML because the naming of attributes isn't case sensitive.
JavaScript is case sensitive and basically uses hogeKey.
The transpiler combines these.
In React, on the other hand, both the UI code and the processing code are written in the same JavaScript.
Since the JSX code is JavaScript, there is a direct connection between the declared processing and the UI.
The increase in React users at the same time that TypeScript became popular was probably due in part to the fact that the UI code can also be covered by TypeScript, making it easier to benefit from TypeScript.
But, I think that Angular/Vue are good, too.
The method of implementing Template and Script separately is similar to the traditional way of implementing an application with SSR.
I recognize that this was also the case with JSP.
Therefore, for those who have done a lot of SSR application development, Vue/Angular is easier to use.
So I don't think React is the only way to go.
I think everyone has their own ideas.

## Librarys or Frameworks;

React/Vue are UI librarys.
Angular, on the other hand, is a framework.
In React/Vue, the library itself consists of the minimum content to implement UI.
Therefore, it is necessary to install derived libraries according to the use.
Angular is a framework, so it is full of various libraries from the beginning.

## Summary

Reasons for liking
Can write JavaScript based UI
Make more use of TypeScript
Can be made in the smallest configuration.
AWS Devops Pro structures and methodologies
Published: 2022-11-17 05:11:08

[AWS Devops Pro ](https://dumpsarena.com/amazon-dumps/aws-devops-engineer-professional/)Domain SDLC Automation AWS CodeBuild A absolutely controlled construct provider: Build your utility from reassets like AWS Code Commit, S3, Bitbucket, and GitHub Build and check code: Debugging domestically with an AWS Code Build agent is viable To configure construct steps you create a buildspec withinside the supply code of your repository. This is what a regular AWS Code Build buildspec seems like: AWS Certifications are legitimate for three years. [AWS Devops Pro](https://dumpsarena.com/amazon-dumps/aws-devops-engineer-professional/) To hold your AWS Certified reputation, you're required to periodically reveal your persevered knowledge with the aid of using recertifying. Recertification facilitates make stronger the general fee of your AWS Certification and suggests people and employers that your credential covers the ultra-modern AWS understanding, capabilities, and first-class practices. Learn greater on the AWS internet site. Earners of this certification have an intensive knowledge of enforcing non-stop transport structures and methodologies at the AWS Cloud. 

Get 25% Special Discount ……..>>>>>>>>> https://dumpsarena.com/amazon-dumps/aws-devops-engineer-professional/
Release 0.3 - Working with external repository
Tags: webdev, javascript, beginners, github
Published: 2022-11-17 05:05:20

> Thought Process

Working with other people's repository is always going to be difficult. With how each individual contributor might always change a tiny bit of the code when they are working on it. For example,
one person will use a double quotation mark as to a single. Or how some people will use an "addition assignment operator" `+=` as to Template literals ` `` `

Therefore, I thought to myself, that won't it be better to add a `pretter` and `linter` for the current repository that I am working on? And when I add a `pre-commit hook`, it ensures that any future pull request will follow the same format preventing any bugs and inconsistencies from occuring.


> Working on the repository

Adding [Prettier](https://prettier.io/) is a bit difficult. Trying to figure out the format of how the author wrote his code has to be put into considerion, because changing everything drastically will cause a setback for when the author and those whom had worked for it touched the code. Once I finish adding the `prettier` I decided to add the [ESLint](https://eslint.org/), unlike the former that simply changes the style, this would basically remove any inconsistencies and repetition, and tell the user about any codes that does not follow a specific standard. This is important, because it can directly impact the amount of bugs that will occur in the future. Once I have added it, I had to individually check the files that it highlights and change their values to ensure that no possible bugs can occur in the future. Once this is done, I added a pre-commit hook to ensure that any commit that the user does gets checked before passing.

When I was testing the Linter, I noticed that every anime will display a "list" of episodes, even when they only have one currently, or when tehy are a movie. I decided to change this by hiding the `list` whenever the amount of episodes are equal or less than to one. I also, removed the button for `next` and `previous` episode.

> Difference from Release 0.2

Unlike my first time working with this repository during the hacktober fest, I focused more in ensuring the quality of the code as to the entire website itself. Having to have a prettier and linter available, ensures that any future code will follow the same format, thus leading to less errors.
How to Use Axios Interceptor in TypeScript
Tags: webdev, typescript, programming
Published: 2022-11-17 05:01:22

It's a common practice to retrieve res.data in an Axios response interceptor, but TypeScript knows nothing about it. How can we inform the type system?

## 🤔 Problem

If we don't add a response interceptor, Axios will return such an object rather than the actual data:

```json
{
  "data": {
    // Actual data
  },
  "status": 200,
  "statusText": "OK",
  "headers": {
    // Response headers
  },
  "config": {
    // Axios configuration
  },
  "request": {
    // Request details
  }
}
```

So it's a common practice to add a response interceptor:

```ts
const axiosInstance = axios.create();
axiosInstance.interceptors.response.use((res) => res.data);
const res = await axiosInstance.get("/api");
```

Thus, the `res` variable on the final line will be the actual data, saving the trouble of retrieving `res.data` every time.

But the problem is that TypeScript is not able to detect this interception. In the example above, although we actually get `res` of type `T`, TypeScript still assumes `res` to be of type `AxiosResponse<T, any>`.

## 💡 Solution

Coming from [Axios repository's issues #1510](https://github.com/axios/axios/issues/1510#issuecomment-525382535).

We can override Axios' native type declaration by manually creating a `.d.ts` file:

```ts
// src/types/index.d.ts
import axios from "axios";

declare module "axios" {
  export interface AxiosInstance {
    request<T = any>(config: AxiosRequestConfig): Promise<T>;
    get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
    delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
    head<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
    post<T = any>(
      url: string,
      data?: any,
      config?: AxiosRequestConfig
    ): Promise<T>;
    put<T = any>(
      url: string,
      data?: any,
      config?: AxiosRequestConfig
    ): Promise<T>;
    patch<T = any>(
      url: string,
      data?: any,
      config?: AxiosRequestConfig
    ): Promise<T>;
  }
}
```

And notify TypeScript of this change in `tsconfig.json`:

```json
// tsconfig.json
{
  // ...
  "typeRoots": ["node_modules/@types", "src/types"]
}
```

We can find [the definition of `typeRoots`](https://www.typescriptlang.org/tsconfig#typeRoots) on their official documentation, which is a list of the directories containing all type declarations. In this example, we specify two directories, so TypeScript will look for the definitions of unknown types under these two directories.

The first directory, `node_modules/@types` comes from [Definitely Typed](https://github.com/DefinitelyTyped/DefinitelyTyped), which contains common types like `@types/node`.

The second one is our custom type directory. So the next time TypeScript comes across Axios API, it will first find declarations here. Now, TypeScript knows `res` is of type `T`.