teleren/devto huggingface dataset:
How did you learn data structures and algorithms?
Tags: algorithms, dsa, discuss, programming
Published: 2023-06-20 11:44:39

---
title: How did you learn data structures and algorithms?
published: true
description: "Image credit: https://dev.to/adavidoaiei"
tags: algorithms,,dsa,,discuss,,programming
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--gNp9r0Tx--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://res.cloudinary.com/dbvcampra/image/upload/v1588403699/Webp.net-resizeimage_5_beudao.jpg

---

Where and how did you learn data structures and algorithms (DSA)? What do or don't you like about learning DSA, and do you think that there's a better way to learn it?
Using GitHub & GitLab at the same Time
Tags: github, gitlab, repos, code
Published: 2023-06-20 11:23:51

Using GitHub & GitLab at the same Time
=======================================

To upload your code to both GitHub and GitLab simultaneously, you can configure multiple remotes in your Git repository. Here's how you can achieve this:

1. Navigate to your local repository: Open a terminal or command prompt and navigate to the directory of the Git repository that you want to configure for dual uploading.

2. Add remotes: Use the following commands to add the remotes for GitHub and GitLab:

   ```
      git remote add github <GitHub repository URL>
      git remote add gitlab <GitLab repository URL>

   ```


Replace `<GitHub repository URL>` and `<GitLab repository URL>` with the respective URLs of your GitHub and GitLab repositories.

3.Verify remotes: Run the following command to confirm that the remotes were added successfully:

   ```
                 git remote -v

   ```

This command will display the list of remote repositories associated with your local repository, including both GitHub and GitLab.

4.Push to multiple remotes: When you want to push your code to both GitHub and GitLab, you can use the following command:


This command will push all branches to all configured remotes, which in this case include GitHub and GitLab. The branches and their corresponding commits will be uploaded to both platforms simultaneously.

   
                  git push --all
    


By configuring multiple remotes and using the `git push --all` command, you can push your code to both GitHub and GitLab with a single command. Keep in mind that you will need appropriate access and permissions on both platforms to perform the push operation successfully.

Additionally, note that you can customize the remote names (e.g., `github` and `gitlab`) to your preference when adding the remotes.
Replicating google food order menu scroll on react website
Published: 2023-06-20 11:15:59

Hi Team
I am trying to replicate the google food menu scroll effect. So as in the video the menu categories horizontally auto scroll till the end as the user moves the mouse vertically over mobile view. 

Can anyone help with how to achieve this using react website.

We have already tried with no success using react-scroll library, JavaScript ScrollLeft. Suggesting a library will be a real help!! 

google food order link https://we.tl/t-x0dVYu9POz
Discovering Docker init
Tags: docker, learning, tutorial
Published: 2023-06-20 11:07:42

As you all know Docker is now no longer a DevOps tool. It is a developer tool which enables developers to do more.

Docker has revolutionised the way developers build, package, and deploy their applications.

And now, the Docker team has developed docker init, a new command-line interface (CLI) command introduced as a beta feature that simplifies the process of adding Docker to a project

To use docker init, developers need to upgrade to the version 4.19.0 or later of Docker Desktop and execute the command in the target project folder

Check out this video and learn about how it works! 
{% embed https://youtube.com/shorts/Vzv2scmGgQg %}
Al Haramain Oriental Forest
Published: 2023-06-20 10:48:53

Al Haramain Oriental Forest is a premium fragrance that offers a unique and captivating scent. Inspired by the beauty of nature, this fragrance brings together the richness of oriental spices and the freshness of forest scents to create a truly unforgettable experience.

The top notes of Al Haramain Oriental Forest are a blend of spicy cardamom, saffron and black pepper, which combine to create a warm and inviting aroma. At the heart of the fragrance, you'll find a unique blend of floral and woody notes, including rose, patchouli, and cedarwood. Finally, the base notes of the fragrance are a smooth combination of musk, amber, and vanilla, which give the fragrance a sweet and sensual finish.

This fragrance is perfect for those who appreciate the beauty of nature and the exotic scents of the orient. It is versatile enough to be worn on both formal and casual occasions, and its long-lasting scent ensures that you'll smell great all day long. The elegant and sophisticated bottle design also makes it a great gift option for that special someone in your life.
Number::Phone is now 64-bit only
Tags: perl, 32bit, deprecation, 64bit
Published: 2023-06-20 10:40:02

[A couple of years ago](https://dev.to/drhyde/deprecating-32-bit-perl-3512) I wrote that I would be dropping support for perls with 32-bit integers in Number::Phone. Well, that two year deprecation cycle is up, and last night I switched over to the [new database format](https://metacpan.org/dist/Data-CompactReadonly/view/lib/Data/CompactReadonly/V0/Format.pod), the software for which requires 64-bit integers. As of the next release it will use under 10MB of disk space instead of about 100. An order of magnitude improvement, and it was fun to write as well.

Perl has supported 64-bit integers on all reasonable platforms for the last 20 years, even on those platforms which still use 32-bit pointers, so I don't expect that anyone will notice any change at all except that their hosted Docker containers will now be [faster to deploy and cheaper to run](https://github.com/DrHyde/perl-modules-Number-Phone/issues/95).
How to write computer games in Python?
Tags: beginners, python, gamedev, tutorial
Published: 2023-06-20 10:37:09

I started programming when I was a kid and I knew that the was only one real purpose for programming - writing games! I think now is the right time to actually learn how to make games.

Let's create a real game! Today you will learn:


1) How to write draw a sprite
2) How to move a character on the screen using a keyboard
3) How to make "pseudoanimation" using sprites


My end goal is to make cross-platform minimalistic HOMM and X-COM remakes. If it sounds fun - please let me know. Meanwhile - enjoy the video!

{% embed https://www.youtube.com/watch?v=RqGWLwIgr9c %}
Typescript WTF Moment 12: Beware of Object Literal Unions
Tags: tutorial, programming, typescript, webdev
Published: 2023-06-20 10:31:31


---
series: Typescript WTF Moments 
---

```ts
type ABC = { A: number, B: number } | { C: number }

const abc: ABC = { A: 1, B: 2, C: 3 } // no error!
```

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

[playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAggQgYSgXigb1gLigOwK4C2ARhAE4A0Uc2+xZUAvlAD7pQI2EmmMCwAUAIDGAexwBnYFACGRIdnhJUGGNgCMlalABMlDlADMjKAHoTuEVDKkRpAIQDH-IA)

Typescript excess property check allow any property from unions of object literal

## Solutions:

Assign type `never` to excess properties and make them optional
```ts
type ABC = { A: number, B: number, C?: never } | { A?: never, B?: never, C: number }

const abc: ABC = { A: 1, B: 2, C: 3 } // error!

const ab: ABC = { A: 1, B: 2 } // ok!

const c: ABC = { C: 3 } // ok!

const bc: ABC = { B: 2, C: 3 } // error!
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4cmtzekwxwd8qsdayiy.png)

[playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAggQgYSgXigb1gLigOwK4C2ARhAE4A0Uc2+xZlCA-DRAG5lQC+UAPurM1xt6VQTmEUoCGoRKkuAWABQygMYB7HAGdgUAIZFV2eElQYY2AIyVqUAEwNsAZi5QA9G6hlS60gEJlNU0dfSJjRBR+CyhrKmw7Vw8odQBrAJUlDW1dI1gIsylnRM9U9KDsqENw035bB0KoF24k718-IA)

With common properties that have different types, Typescript is able to [discriminate unions](https://www.typescriptlang.org/docs/handbook/unions-and-intersections.html#discriminating-unions)

However it is a lot of work if we have a large unions of object literal 

We need to create an utility type that automate this process

```ts
type GetAllKeys<T> = T extends T ? keyof T : never

type CreateOptionalExcessProperty<T, Y> = T extends T ? T & Partial<Record<Exclude<GetAllKeys<Y>, keyof T>, never>> : never

type StrictUnion<T> = CreateOptionalExcessProperty<T, T>

type ABC = StrictUnion<{ A: number, B: number } | { C: number }>;

const abc: ABC = { A: 1, B: 2, C: 3 } // error!

const ab: ABC = { A: 1, B: 2 } // ok!

const c: ABC = { C: 3 } // ok!

const bc: ABC = { B: 2, C: 3 } // error!
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5h75kk356s1drx6d2z0f.png)

[playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBA4hwEEA2SDSEQGcA8AVAfFALxS5QQAewEAdgCaalQD8UA1hgPYBmTAXFBoQAbhABOAWABQ00JCgBhMRACG1APJhgAS040VSAKIUAxhEyYACmM6QxoPABooATUIkylavUZlWZADIoSxV7bQNsACUIE04xOmxjEyQAVzoIbDhEFHQsbDdnDhAeUnxnIVExfEIBCvFpWXBoAGVgMW0TYABVGl0aPHdFZTUITR09AyTzKxs7B1xnAgapOWgEACEFYihW9s6evuwAbygEWpSAWwAjcWd18+vxKABfKAAfKBOFB5uxF-wANzLWI0TDAKAqK4mAQbLYkE5nKAARjuAgATM5vlAAMwvKAAenx5DENjEAEJgXowRCrjDNtsEQIUVB7lA0XjCVBOGwKTIpCDqdDTvT4YoBLjXpzubzpALwVC6XDPiz0ZjxRyieJSWSgA)

The purpose of `T extends T` is to [distribute unions](https://stackoverflow.com/a/62085569/5338829)

[credit](https://stackoverflow.com/a/65805753/5338829)
The Advantages of a Dedicated Team for Your Startup Project
Tags: dedicateddeveloper, dedicateddevelopment
Published: 2023-06-20 10:26:21

Today, dedicated software teams are increasing in frequency. Working with such a team lets you focus entirely on product development, be informed of every process step, and avoid hiring and motivating staff members. Let's clarify the terms "dedicated team" and "distinctive features of this type of partnership" before delving further into the specifics. 

A dedicated team is a good option for startups because those businesses do not have enough resources to hire employees and developers with multiple skills. There are many advantages to having a **dedicated team for your start-up projects**.

## 
Top 3 Advantages of a Dedicated Team

A good delivery approach for the product might be a contract with a dedicated development team. Start-up projects have that much potential to take advantage of a dedicated team.

1. Cost-effectiveness
2. Easy Recruitment
3. Flexible team management

## 1. Cost-effectiveness

The dedicated team approach allows for practical budget usage. Suppose the project's or a portion of its emphasis changes, the financing envelope can be altered. You save money on time-consuming tasks like business analysis and technological research, which are crucial and expensive. It is one of the most essential benefits of collaboration. [Hire dedicated software development team](https://www.bacancytechnology.com/dedicated-software-development-team), and you can cut costs for dedicated team for your startup projects.

## 2. Easy Recruitment

You may save time by using a software outsourcing business to get the best-qualified professionals. We are happy to give you this model as soon as you decide that a distributed team is what you want. We can easily choose the ideal tech team, including engineers, QA engineers, designers, business analysts, and project managers, to help us take advantage of a dedicated team. You save time by getting a highly skilled team, flexible team member management, and a quick mechanism for replacing team members.

## 3. Flexible team management

When it comes to project management, the committed group is adaptable. You could have an independent project manager who will interact with the contracted team, oversee every step of the cooperation process, and keep you informed. You can assign the dedicated team for your start up projects management outsourcing to your partner if you don't have such a person. 

## Conclusion

These three advantages of a dedicated team for your start-up projects can help you improve and expand your business. You can contact the integration business if you want further details.
底部代码效果
Published: 2023-06-20 10:25:38

效果图


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




以下代码


`<section class="section css-1sc6ezf" data-guid="de95d1b1-2d05-4e15-b089-dc3f412da865">
            <div class="container" id="legal">
                <div class="layout flex flex--12" data-guid="22b5bec6-51d9-1cac-3cce-54a184b905f3">
                    <div class="column flex__item--md-12 flex__item--xs-12 css-1b5csnr" data-guid="f3815fc3-5d09-5763-6412-bf8bdf93dc2b">
                        <div class="inner-column css-efs6e5">
                            <div class="row flex flex--12 css-1v1axsl">
                                <div class="composite flex__item--md-12 flex__item--xs-12 css-8x0d4x">
                                    <div class="inner-composite flex flex--12">
                                        <div class="widget-column flex__item--md-12 flex__item--xs-12">
                                            <div class="widget-row flex flex--12">
                                                <div class="flex__item--md-12 flex__item--xs-12">
                                                    <div data-widget-id="b24a8b99-1a47-56ff-b861-b6fb7251c255" class="widget">
                                                        <div class="lp-text-react lp-headline-react" data-widget-type="LpTextReact">
                                                            <p class="text-align-center font-scale-3 line-height-scale-4 gutter-bottom-1"><span style="color: rgb(161, 161, 161);"><span style="font-weight: 400">Copyright 2020 by ลงทุนกล้วยๆ - Bananas Investment</span></span></p>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>`
Web Application Development Company India
Tags: javascript, webdev, programming, beginners
Published: 2023-06-20 10:25:36

[Prometheas Technologies](https://prometheastech.com/) offers premier bespoke web app, frontend, full-stack JS, and ecommerce & CMS development services to international businesses with more than 100% client satisfaction. Our team holds the expertise to incorporate the latest web technologies to furnish your business with a fresh and modernized feel.
Being in the capital for about a decade, we are one of the most trusted and top-rated customized web app development solution providers in the homeland. We help clients improve their business working efficiency by incorporating the latest technologies while creating web app from scratch or brighten up the existing ones.
Web Application Development Company India
Tags: javascript, webdev, programming, beginners
Published: 2023-06-20 10:24:59

Prometheas Technologies offers premier bespoke web app, frontend, full-stack JS, and ecommerce & CMS development services to international businesses with more than 100% client satisfaction. Our team holds the expertise to incorporate the latest web technologies to furnish your business with a fresh and modernized feel.
Being in the capital for about a decade, we are one of the most trusted and top-rated customized web app development solution providers in the homeland. We help clients improve their business working efficiency by incorporating the latest technologies while creating web app from scratch or brighten up the existing ones.
Communication link failure:1153 Got a packet bigger than 'max_allowed_packet' bytes"
Tags: mysql, xamp
Published: 2023-06-20 10:23:03

In etc/my.cnf try changing the max_allowed _packet and net_buffer_length to

max_allowed_packet=100000000
net_buffer_length=1000000 

if this is not working then try changing to

max_allowed_packet=100M
net_buffer_length=100K
A Beginner's Guide to Node.js: What It Is, How It Works, and Its History
Tags: javascript, beginners, node, webdev
Published: 2023-06-20 10:14:03

Node.js is not a framework or a library, but rather a runtime environment that allows you to run JavaScript code on the server side. This means that you can use JavaScript not only for creating dynamic web pages in the browser, but also for writing backend logic, accessing databases, handling HTTP requests and responses, and much more.

But why would you want to use JavaScript on the server side? Well, there are several advantages of using Node.js:

- You can use the same language for both frontend and backend development, which simplifies your workflow and reduces the learning curve.
- You can leverage the huge ecosystem of npm packages (over 2.3 million) that provide ready-made solutions for various tasks and challenges.
- You can benefit from the high performance and efficiency of Node.js, which is based on Google's V8 engine that compiles JavaScript into native machine code.
- You can easily create real-time applications that support bidirectional communication between clients and servers using WebSockets or Socket.io.
- You can take advantage of the asynchronous and event-driven nature of Node.js, which enables you to handle multiple concurrent requests without blocking the main thread or creating multiple threads.

**How does Node.js achieve this?**
its history and more: https://blog.dhananjaythomble.me/beginners-guide-to-nodejs-how-it-works
Building AI applications on AWS Bedrock with enhanced security measures
Tags: aws, ai
Published: 2023-06-20 10:08:02

Great session with Andrew Kane and Mark Ryland on building AI applications on AWS Bedrock with enhanced security measures.

https://www.youtube.com/watch?v=5EDOTtYmkmI&list=PL2yQDdvlhXf_kZMl0XZYqWfysycSXCJx8&index=40

Here are my top key takeaways from this session:

1) Access to Bedrock is facilitated through APIs powered by foundation models from Amazon Titan, Anthropic, and Stability.ai.

2) Sagemaker training/pipeline can be utilized for fine-tuning the base model provided by the model provider.

3) Fine-tuned data resides in your account, while the fine-tuned model is stored in the Model Provider Escrow Account, owned and operated by AWS. However, you can securely use your fine-tuned model through a Single-tenant endpoint, ensuring exclusive consumption.

4) All data transmitted is secured using TLS1.2, and data at rest is protected by AWS KMS (Key Management Service).

5) Prompt data and its outputs are not used by AWS, and the prompt history is stored securely.

6) IAM provides role-based access control (RBAC) for managing model access permissions.


7) #AWS CodeWhisperer significantly improves developer productivity as an AI code companion and enables one-click security scans of your code.

8) Additionally, AWS Sagemaker MLOps, distributed training of LLM, and Foundation Model from Sagemaker Jumpstart empower experimentation before utilizing models from AI21 Labs, LightOn, Stability AI, Cohere, Amazon Titan, and facilitate easy single-click deployments.
Don't underestimate SQL
Tags: sql, mysql, beginners, backend
Published: 2023-06-20 09:42:52

You may read that cheat sheet to get started:

{% embed https://dev.to/jmau111/another-sql-cheat-sheet-4ja5 %}

While SQL (Structured Query Language) is not the only programming language to master as a back-end developer, it's a critical one!

Pretty much everything we do allows users to fill a relational database with various entries. Of course, SQL is not the only approach (e.g., NoSQL), but it's a fundamental step in your journey.

## MySQL?

MySQL is a product that implements SQL. In other words, it's a relational database management system.

It's still widely used in dev teams, so you should definitely learn it, whether you want to get a job as a back-end dev, a database administrator, a system admin, or a data analyst (or many other jobs).

## The key points they don't tell you

By "they," I mean _the Illuminati_, of course 🤣🤪.

More seriously, you will find everything about the technique on Internet, but the "why" is often skipped.

So, why SQL anyway?

5 reasons in short:

* SQL is everywhere in the IT business
* a well-crafted SQL query can spare significant time and resources (e.g., vs far-fetched PHP operations with big arrays), whereas a slow query can literally ruin your app
* SQL is easy to learn **and** powerful to extract relevant data in a large dataset
* mastering SQL will help you secure your queries, whereas ignorance will put your app and your users in danger
* very good introduction to programming that will be still valuable over the course of your career

## Bottom line: start with SQL

While it might seem opinionated, I would likely recommend starting your journey in programming with SQL.

You won't waste your time at all, and it may even make learning other languages easier.
WELCOME!
Tags: webdev, beginners, programming, productivity
Published: 2023-06-20 09:41:41

*I am thrilled to embark on this exciting journey of sharing my thoughts, experiences, and expertise with all of you. Through this blog, I aim to create a space where we can connect, learn, and explore together.*
<img align="right" alt="Coding" width="400" src="https://i.pinimg.com/originals/8e/91/5e/8e915ebeee6769fa88bbc838d015742e.gif">

``_Join me as we embark on this exciting adventure. Let's learn, grow, and explore together._

- 
I encourage you to actively engage with the content by leaving comments, sharing your own thoughts and experiences, and connecting with me on social media. Your feedback and interactions are invaluable, and they will shape the direction of this blog, making it a truly collaborative and enriching space for all.


> 
Stay tuned for upcoming posts, and feel free to explore the existing content. Welcome once again, and let's make this blog an incredible platform for learning and inspiration!

Happy reading!
Racheal