teleren/devto huggingface dataset:
What I Learnt Deploying My Next.js App
Tags: nextjs, react, deployment, javascript
Published: 2023-07-18 09:43:00

If you don't have the necessary budget to deploy your application, it's advisable to avoid creating a Next.js app. Deploying a Next.js app requires a significant amount of effort and can be more complex compared to deploying a regular React app.

Moreover, when it comes to search engine optimization (SEO), there are other options available. Opting for Next.js solely for SEO purposes can introduce additional complexities and complications that could have been simpler with a regular React app.

Please note that this advice specifically applies to individuals without a team. However, if you have a team, it is recommended to engage in a discussion with them before making a decision.


**Baggage**

![Image by tookapic from Pixabay](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okaebg489rge2ra2ekgn.jpg)
_[Image by tookapic from Pixabay](https://pixabay.com/photos/luggage-suitcases-baggage-bags-933487/)_

As your Next.js project grows with more pages, it's essential to be aware that the amount of resources required and the build time will increase. This is because Next.js, being a framework that provides server-side rendering (SSR) and other advanced features, has additional overhead compared to a simple React app without SSR.

Deploying a Next.js app requires consideration of the increased resource usage, especially if your project has numerous pages. The server-side rendering process can consume more server resources during the build and initial rendering, potentially impacting the scalability of your application.

On the other hand, deploying a simple React app without SSR is usually more straightforward. Since there is no server-side rendering involved, the build process is generally faster, and the initial resource requirements are typically lower. This simplicity can make the deployment process more manageable, especially for smaller projects or when you have limited resources.

As your project evolves, it's crucial to strike a balance between the benefits of server-side rendering, improved SEO, and the trade-off of increased resource usage and build time. Consider your specific project requirements, budget, and team resources to make an informed decision about whether Next.js with SSR or a simple React app without SSR is the right fit for your application.
Testing AWS Lambda Recursive Loop Detection
Tags: aws, serverless, showdev, lambda
Published: 2023-07-18 09:40:30

Recently, AWS Lambda has introduced a new feature to detect and stop recursive loops in Lambda functions most probably due to mis-configuration. This is definitely a great feature to save some thousands of dollars.

I created a simple Serverless application that you can deploy into your AWS environment and test this new feature. This is built in CDK and Python.

### Architecture

![Recursion between SQS and Lambda](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/burnn5khr0n69nwnx8j1.png)

### Set up

This is a CDK project implemented with Python. So, you need CDK and Python installed in your local environment.

1. Clone the repository: https://github.com/pubudusj/lambda-recursion-test
2. Go into the cloned directory.
3. To manually create a virtualenv on MacOS and Linux:
    ```
      $ python3 -m venv .venv
    ```
4. After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv.
    ```
      $ source .venv/bin/activate
    ```
5. If you are a Windows platform, you would activate the virtualenv using:
    ```
      % .venv\Scripts\activate.bat
    ```
6. Once the virtualenv is activated, you can install the required dependencies.
    ```
      $ pip install -r requirements.txt
    ```
7. Then, deploy the application:
    ```
      $ cdk deploy
    ```
8. Once the stack is created, note the `SQSQueue` and `LambdaFunction` values.

### How to Test

1. Add any message into the SQS queue.
2. This will trigger the Lambda function.
3. Within the Lambda execution, it sends the same message into the same SQS queue. This creates an endless loop.

### Result
1. Before this new feature, this loop will continue as much as possible and will cost you a lot.
2. Now, this loop will end after 16 Lambda executions.

    ![Lambda function invoked only 16 times](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7mc6c7yc0ccvjmm7q3ew.png)

3. Then, you can see the message was sent to the DLQ.
4. You also receive the below email from AWS notifying the loop detection. Please note that this email will be sent once per 24 hours per function.

    ![Email from AWS notifying the loop detected](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zd1z04aop082521kwqpj.png)

### Please Note
1. As at now, only SQS and SNS support this loop detection.
2. To support this feature, your SDK must be in a certain version or higher. Refer the documentation here for more information
3. You can turn off this feature if you want (but why?) by contacting AWS support.

#### Read more about this in documentation:
https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html
Khải Tín Group - Bất động sản Khải Tín
Tags: batdongsan, khaitingroup, batdongsankhaitin, batdongsantuyenquang
Published: 2023-07-18 09:27:53

Khải Tín Group - Bất động sản Khải Tín
Email: khaitingroup1@gmail.com
189 Bình Ca, Nông Tiến, Tuyên Quang
Số điện thoại: 0914.296.000
Website: [](https://khaitingroup.vn)
Perl v5.36, Debian, and Ubuntu
Tags: perl, debian, ubuntu
Published: 2023-07-18 09:24:17

I normally only write about the Perl Weekly Challenge/The Weekly Challenge, but today I have a couple things to say about recent Perl versions. I've been watching the videos from TPRC2023, and loving the talk by Paul Evans [_What's New in Perl v5.38_](https://www.youtube.com/watch?v=nkKuA0UMdEw). I like to have a minimum version in my code generally that I can rely on having all the features from. I think I previously ignored v5.36 because it wasn't in Debian yet (and I typically only use packaged Perl), but thanks to Paul's talk I've really enjoyed looking at the [perldelta](https://perldoc.perl.org/5.36.0/perldelta), where some really groundbreaking Modern Perl changes were made just in the use v5.36 syntax.

Well, now two things have happened. v5.36 is the oldest release still officially supported by the Perl team, and it's in Debian stable. This makes it a great candidate to be my new target version for most code!

Unfortunately, Ubuntu 22.04 (one of my servers) is still stuck on v5.34, and this makes me sad. 😥

In related news, the new object system in v5.38 and beyond looks pretty sweet! I'm excited. Can't wait to see what else gets implemented in the next couple versions.
Ultimate Guide to Open Source Contribution (Part 1)
Tags: opensource, apacheage, postgres
Published: 2023-07-18 09:15:04

**Introduction**
<p>
Contributing to Open Source projects is one of the best platforms to gain experience in the software engineering space. It also makes a prospective employer see how diligent an applicant is as an aspiring or experienced Software Engineer and makes the applicant standout in the recruitment stages of a job opportunity.
</p>
<p>
In this article, we would be looking at how to contribute to Apache AGE by creating a function. Unlike adding or editing a README, this gives you an edge.
</p>
**Steps to Contribution**
Creating a function in Open source projects like AGE is quite daunting for a newbie and that's why I suggest you follow the steps below for an easy process.

1. Check for Functions not implemented that would be a great addition - This particular step is the foundation for any contribution. You sure do not want to add a function that already exists because that makes you seem lazy and a copy, so do a deep research of the project.

2. Look at similar functions and the syntax - This will give you and idea on how to implement your supposed function.
For example, if there's a function in the project that returns the max of 2 numbers and there's no min function present, then the syntax of the max function should be a reference for the min() function you are to create. This step also is important for contributing to other Open Source projects.

3. Write code in associated files - Still citing the max() function for the min() function to be created, You should also take note of the files in which the max() function was implemented and follow suit for the min() function.

4. Test the function - This is the most important step because you don't want to push an erroneous code to an open source codebase (it's a red flag). Test the code on your local system and ensure it works properly. If the function gives an error, debug and test again till it gives no errors.

5. Make a PR - This is equivalent to submitting a solution and expecting feedback for the solution. Do not feel bad if your PR does not get merged as there might be many reasons such as:
a. The solution might not in the current scope of projects.
b. It might not be according to their contribution standards. Hence, you should always align your PRs accordingly.

**Optional**: Add more cases to the function. If the max() function takes only int values, you can add more functionalities in the min() function to consider float values.

**Conclusion**
This is an ideal template to start contributing to Open Source projects. In the next blog post, we would make practical examples on how to contribute to Apache AGE.

**References**
[Apache AGE website](https://age.apache.org)
[Apache AGE project](https://github.com/apache/age)
Serverless Time-Tracking App in AWS
Tags: aws, serverless
Published: 2023-07-18 09:14:23

My wife owns a tea shop, and I hated watching her painstakingly manually enter her employee's paper time cards into a Numbers template I made for her to calculate their salaries every month. To solve this, I made a website with a simple serverless backend in AWS for her to put on the tablet in her store that employees can use to punch in and out.  Here's how I did it:

The static site (HTML, CSS, Javascript) is hosted using AWS Amplify, which also handles CI/CD. When code is pushed to the main branch of the GitHub repo, it's built and deployed by Amplify.

![Simple time-tracking site UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gp22zhl7g8zc7hs4w2ay.png)

Users select their name from the list, then click 上班/下班 (clock in/clock out), which sends the timestamp, employee name, and punch type as a JSON object to an HTTP API Gateway. The API Gateway is integrated with a Lambda function (written in Python) which parses the JSON and adds a new item to a DynamoDB table.

I use Amazon EventBridge Scheduler to call another Lambda (also written in python) on a monthly basis, called `SalaryCalculator`. This function grabs the items from the DynamoDB table within a time range and performs salary calculations for a given employee. Finally, it exports the data to an S3 bucket.

I've subscribed my wife's email to an SNS topic that waits for an object creation event in the S3 bucket. When the function exports a file to the S3 bucket, she gets notified.

![Architecture Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f90wxbpllu9nf1qzyien.png)

The UI itself is pretty bare, so I'll be using feedback from my wife and her employees to evolve the site.
Understanding the Drupal 7 Security Support Extension: Key Considerations and Implications
Tags: drupal7, drupal
Published: 2023-07-18 09:10:04

We recently published an informative blog post titled "[Drupal 7 Security Support Extension: What You Need to Know.](https://www.zyxware.com/article/6578/drupal-7-security-support-extension-what-you-need-to-know?utm_source=dev.to&utm_medium=referral&utm_campaign=content_syndication)" The blog discusses the latest announcement by the Drupal Security Team regarding the extension of security support for Drupal 7. It provides key takeaways, including the final extension date, the recommended migration to the latest version of Drupal, and the implications for website owners who continue to use Drupal 7. If you're interested in learning more about this important topic, we invite you to read the full blog post
caheotv trực tiếp bóng đá full HD
Tags: sport, webdev, javascript, beginners
Published: 2023-07-18 09:01:16

caheotv-cá heo tv website ra đời nhằm cung cấp dịch vụ mang đến cho những anh em có niềm đam mê mãnh liệt bộ môn bóng đá những trận cầu chất lượng cao nhất thời điểm hiện tại.
#caheotv, #caheotructiep, #caheo
Caheotv là gì?
Được biết thì có nhiều trang web chuyên mang đến cho anh em về mặt trực tiếp bóng đá. Thế nhưng những website này lại không hề chất lượng cùng với đó là mang đến cho anh em những trải nghiệm không được như ý, khiến cho nhiều anh em không thể thành công theo dõi những trận đấu yêu thích.
Thời điểm hiện tại có rất nhiều giải bóng đá lớn nhỏ trên thế giới đang được diễn ra. Chính vì thế việc tìm kiếm một trang web chất lượng về dịch vụ trực tiếp bóng đá là điều được nhiều anh em vô cùng quan tâm. Chính vì thế, chúng tôi cung cấp cho anh em trang web caheotv với chất lượng hình ảnh cũng như âm thanh chất lượng tốt nhất cùng với đó là những trải nghiệm có 1-0-2 mà ít website nào sánh bằng.
Những giải đấu Caheotv trực tiếp
Được biết thì hầu hết tất cả các trận đấu lớn nhỏ trên thế giới đều được caheotv cập nhật đồng thời phát trực tiếp  cho anh em, điển hình có thể kể đến là: Ngoại hạng Anh, La Liga, cúp C1 châu  u, giải thi đấu bóng đá lớn nhất hành tinh World Cup,…
Chưa dừng lại ở đó, những  trận đấu có sự tham gia của đội tuyển Việt Nam cũng được sự quan tâm lớn của anh em nước ta, tại caheotv chúng tôi có phát trực tiếp các giải đấu tiêu biểu có thể kể đến là: AFF Cup, Seagame,…


Web chính: 
https://tinsoikeo88.com/caheotv/
Web 2.0:
https://caheo.weebly.com/
https://caheo6.blogspot.com/
Socal:
https://www.pinterest.ca/caheotv10/
https://twitter.com/Caheotv11
https://trello.com/w/caheotv4
Your Ultimate AI-Powered Platform for Creative Expression
Tags: ai
Published: 2023-07-18 08:59:33

Are you ready to embark on an extraordinary journey of artistic exploration? Look no further than AIMOM, the groundbreaking AI website I am developing. Powered by state-of-the-art language models including midjourney and Stable Diffusion, AIMOM is set to revolutionize the way you unleash your creativity.

AIMOM is not just another AI-generated content platform. It is a comprehensive AIGC integration platform that combines the power of multiple language models with a user-friendly AI painting interface. With its lightning-fast and highly effective prompt suggestions, AIMOM will help you bring your artistic visions to life like never before.

But that's not all. AIMOM is not just for personal use. If you're interested in selling this cutting-edge program, we have got you covered. Our platform offers seamless integration with various e-commerce features, making it effortless for you to showcase and monetize your AI-generated artwork.

Developed using Python and Vue, this website is built to provide a seamless user experience. So, whether you're an aspiring artist looking to explore new horizons or an entrepreneur ready to tap into the AI art market, AIMOM has something for everyone.

Don't miss out on this extraordinary opportunity to unlock your creative potential. Join AIMOM today and redefine the boundaries of art with the power of AI.
Facebook Login on iOS: Using social login, to save time and effort by eliminating the need for backend authentication.
Published: 2023-07-18 08:58:39

**Introduction:**

Adding Facebook Login to your iOS app can increase signup conversion rates. It allows users to log in using their existing Facebook accounts, saving time and effort. However, there are issues with the Facebook SDK, such as increased app size, privacy concerns, SDK bugs, and GDPR compliance.

**How to Implement Facebook Login without the SDK:**

1. Use Web APIs: Instead of the Facebook SDK, you can utilize Facebook's web APIs for login functionality.
2. Initiate an Authentication Session: Use ASWebAuthenticationSession, a secure web view, to authenticate users within your app.
3. Get Authentication Token: After the user logs in via the web view, extract the authentication token from the redirect URL.
4. Verify and Exchange Token: Send the token to your backend service for verification and exchange it for authorized request credentials.
5. Store and Handle Tokens: Store the received token securely using KeychainAccess and implement functions for storing, logging out, and checking token validity.

**Benefits of avoiding the Facebook SDK:**

- Reduced app size and improved performance.
- Enhanced user privacy without Facebook's data collection.
- Avoiding SDK bugs and issues.
- Ensuring GDPR compliance.

**Conclusion:**

Implementing Facebook Login without the Facebook SDK on iOS can provide a more streamlined and secure experience for users. By utilizing web APIs and handling authentication through secure web views, you can enhance user privacy, reduce app size, and avoid SDK-related complications. Storing and managing tokens securely ensures a smooth login process for your app's users.


Facebook security best practices:
https://developers.facebook.com/docs/facebook-login/security
Introducing ZLY: A Simple and Open-Source URL Shortener
Tags: urlshortener, mongodb, flask, python
Published: 2023-07-18 08:55:19

Introduction:
Hey dev.to community! I'm thrilled to announce the launch of ZLY, a free and open-source URL shortener. I've put a lot of effort into creating a simple and user-friendly solution for shortening long URLs, and I'm excited to share it with all of you.

Key Features:
- Easy URL Shortening: With ZLY, you can shorten your URLs in just one click. Simply enter your long URL, and ZLY will generate a unique and short 4-character code for you.
- Open-Source and Customizable: ZLY is fully open-source, allowing you to modify and customize it to suit your needs. You can find the complete source code on GitHub: [Link to GitHub Repository].
- Error Checking: ZLY ensures that your original URL is valid before shortening it, reducing the chances of broken links.
- MongoDB Backend: ZLY uses MongoDB as the backend database, making it efficient and reliable for storing and retrieving shortened URLs.

Technologies Used:
- Python: ZLY is built using Python, a versatile and powerful programming language.
- Flask: The web application framework Flask is used to handle routing and requests.
- MongoDB: ZLY utilizes MongoDB as the backend database for storing URLs and their corresponding codes.

Why You'll Love It:
ZLY is designed to simplify URL shortening for everyone. Whether you want to share a long URL on social media or make it easier to remember, ZLY has got you covered. Its intuitive interface and error checking ensure that your URLs are valid and shortened efficiently. Plus, being open-source, you have the freedom to customize and enhance ZLY as you see fit.

How to Get Started:
1. Visit [ZLY Website](https://zly.us.to) to access the URL shortener.
2. Enter your long URL in the provided input field.
3. Click the "Shorten" button, and ZLY will generate a short and unique URL for you.
4. Copy the shortened URL and share it with others.

Feedback and Contributions:
I'm excited to hear your feedback and suggestions to further improve ZLY. If you have any ideas or would like to contribute, please visit the [GitHub repository](https://github.com/PythonPlumber/zly). Your contributions are highly appreciated!

Conclusion:
Thank you for checking out ZLY, the simple and open-source URL shortener. I hope you find it useful and enjoy using it. Feel free to share your thoughts and suggestions. Happy URL shortening!

Remember to personalize the post by adding your own unique details and adjusting the content to match your website's specific features and benefits. Additionally, include relevant tags and categories when publishing your post on dev.to to increase its visibility within the community. Best of luck with sharing ZLY!
Launching Dyte’s Live streaming SDK on Product Hunt
Tags: javascript, webdev, programming, showdev
Published: 2023-07-18 08:51:43

## What is Dyte?

For those of you who are hearing about Dyte for the first time, here’s some quick context - 

We started building Dyte back in 2020 in the middle of the pandemic. Having started initially as yet another video calling platform we soon transitioned to offering video and voice SDKs after receiving several requests for the same. And it has been quite a journey ever since 🚀

We’re super excited to announce the launch of “Dyte’s live streaming SDK”, newest addition to the suite of solutions we provide 🎉

## Dyte’s Live streaming SDK:

Dyte's Live-streaming SDK is designed to enhance your audio and video capabilities by providing a comprehensive range of features. As a versatile SDK provider, expanding our offerings to include live-streaming was a natural progression. Live-streaming caters to a variety of use-cases, particularly for companies already leveraging our video services. We recognized this and made it a priority to expand our offerings to meet the demands of our valued users. Needless to say, many of them have already successfully incorporated our live-streaming SDK, benefiting from its exceptional performance. After months of meticulous testing and optimization, we are thrilled to announce that our live-streaming SDK is out of beta and available to the public for seamless integration and utilisation!

Let's delve into some of the features that our Live-streaming SDK offers:

### Key Features:

1. Low latency streaming: Experience lightning-fast streams with latency as low as 2 seconds, ensuring your audience enjoys real-time content from anywhere.
2. Custom layouts: Craft a visually captivating video feed with Dyte's UI Kits, allowing you to create a tailored and engaging user experience for your audience.
3. Live analytics: Gain comprehensive insights into your live stream's health, user activity, and user behaviour, empowering you with valuable data for optimization.
4. Adaptive bitrate: Enjoy smooth and uninterrupted live streams, regardless of network conditions, without requiring any manual intervention.
5. Built-in interactivity: Foster engagement and collaboration with features like whiteboard, chat, reactions, screenshare, polls, and quizzes, making your live streams interactive and captivating.
6. Seamless host addition: Enable viewers to effortlessly join the livestream and participate in games or activities with the streamer, enhancing the overall experience.
7. Scalability: With Dyte's robust infrastructure, effortlessly scale your streams to support over 10,000 viewers while maintaining exceptional video quality.
8. Platform agnostic: Stream live content from any device and browser, ensuring compatibility across a wide range of video codecs. Get started without a hitch!


We are live on Product Hunt today! Check us out right now: https://www.producthunt.com/posts/live-streaming-sdk-by-dyte

Thank you and I look forward to your comments and feedback! 🙇
#LearnedToday: Named Capture Group
Tags: javascript, regex, learnedtoday, webdev
Published: 2023-07-18 08:23:00

Yesterday I worked on a task for which the **regular expressions** were perfect.

Today I would like to share a feature that is supported since 2018 but that I have seen used very little: **Named Capturing Group**.

I really love this feature because it allows for neater and more readable regex.

```javascript
const regex = /(?<day>\d+)\/(?<month>\d+)\/(?<year>\d+)/;

const { day, month, year } = regex.exec("16/04/1987").groups;

console.log({ day, month, year});
// {day: '16', month: '04', year: '1987'}
```

I have created a simple [example on stackblitz](https://stackblitz.com/edit/named-capturing-group?file=index.js) to hopefully make their use understood.

I also created an [example on Regex101](https://regex101.com/r/ORM6ja/1), a tool I always use to test regular expressions.

🔗 Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Named_capturing_group

ℹ Browser support: https://caniuse.com/mdn-javascript_regular_expressions_named_capturing_group