teleren/devto huggingface dataset:
How Many types of Dependency Injection in Magento 2
Tags: magento, magento2, magento2tutorial
Published: 2023-05-26 11:17:32

**_What are the different types of Dependency Injection in Magento 2_** and how is it utilized? Automatic Dependency Injection (ADI) in Magento 2 eradicates the requirement for an object to manually seek out its dependent objects. ADI encompasses three distinct types: Constructor Injection, Setter Injection, and Interface Injection. In Magento 2, ADI, specifically Constructor Injection, is employed, where dependencies are passed as parameters in the constructor to comply with injection guidelines. 

This approach serves as an alternative to the Mage Class method employed in Magento 1. To illustrate this concept, an example within Magento 2 is provided.

For more information , please visit this :- **_[https://webguru.dev/how-many-types-of-dependency-injection-in-magento-2/](https://webguru.dev/how-many-types-of-dependency-injection-in-magento-2/)_**
How to Bind Data to the Blazor HeatMap Chart Component
Tags: blazor, webdev, dotnet, csharp
Published: 2023-05-26 10:54:27

Learn how easily you can bind data to the Blazor HeatMap Chart component using different methods. This video demonstrates how to bind a two-dimensional array data and JSON data to the Blazor HeatMap Chart component using cell binding and row binding methods.

The Blazor HeatMap Chart is a graphical representation of two-dimensional data where the values are represented with gradient or solid color variations. 

_Product overview_: https://www.syncfusion.com/blazor-components/blazor-heatmap-chart

_Explore our tutorial videos_: https://www.syncfusion.com/tutorial-videos

_Example Project_: https://github.com/SyncfusionExamples/how-to-bind-data-to-the-blazor-heatmap-chart-component

{% youtube u27NqwNs8sw %}
Alice AI
Tags: ai, python, tkinter, programming
Published: 2023-05-26 10:50:57

Alice AI is a talking software helps you to answer your all questions


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

Introducing Alice AI, the revolutionary personal assistant designed to enhance and simplify your daily life. Alice AI combines cutting-edge artificial intelligence technology with an intuitive user interface to provide you with an unparalleled level of support and convenience.

At its core, Alice AI is a highly intelligent virtual assistant that adapts to your needs and preferences. Whether you’re a busy professional, a student, or someone looking to optimize their productivity, Alice AI is your dedicated companion, ready to assist you at any time.

With its advanced natural language processing capabilities, Alice AI understands your commands, questions, and requests with remarkable accuracy. Whether you want to schedule appointments, set reminders, or even make reservations, Alice AI effortlessly handles these tasks, saving you time and effort.

The versatility of Alice AI extends beyond personal assistance. With its integration with opening websites such as whether you say (open google, open youtube, open spotify, open stackoverflow) it will open directly from your default webbrowser.

Privacy and security are of paramount importance with Alice AI. All your personal data is encrypted and not stored to anywhere, and you have full control over what information you choose to share.

Alice AI is available for windows 11 only into your existing devices and workflows. Its user-friendly interface and natural language understanding make it accessible to users of all technical backgrounds, enabling effortless adoption and utilization.

Experience the future of personal assistance with Alice AI. Say goodbye to mundane tasks and let Alice AI empower you to focus on what truly matters. With its intelligence, adaptability, and dedication, Alice AI is poised to revolutionize the way you navigate your daily life.

this application is based on Python a coding language, Alice AI use speech_recognition to listen your voice and answer you by voice using pyttsx3 module.

Alice AI uses OpenAI to answer your all questions from ChatGPT and also uses Tkinter to give you a comfortable UI. It is only made for windows because of (.exe) file but we provide you source code to create it for all operating systems the source code is given in Python language so use a code editor or visual studio code or IDE (Integrated Development Environment) to edit this codes

`https://github.com/Yash12007/Alice_AI/blob/main/Alice_AI.py`

copy and paste the given link to your webbrowser to visit the source code page on GitHub
Unraveling JavaScript's Immutable Secrets: The Dance Between Primitives and Objects
Tags: javascript, beginners, programming, tutorial
Published: 2023-05-26 10:45:16

Hi, Do you know that Javascript is one of the most popular programming language. In the mean time it is one of the most hated programming language too. Do you know why? Because javascript contains lot of weird stuffs with amazing capability in performing operation. On this line, Today let we explore one of the most missed concept to learn as beginners.

Let we start with an example:

```
let a = 10;
let b = a;
```
In the previous code, I just assigned value `10` to a variable `a`, and I am reassigning the `a` to `b`. you may thinking what is the issue in it.? let me give a another code snippet.

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

here I assigning an `obj1` to `obj2`. Very similar to previous code. But there is a difference. let we see the difference

```
let a = 10;
let b = a;
b = 20;
console.log(a) // 10
console.log(b) // 20
```
In the code, I modified the value of `b` as `20` but it doesn't affect the value of the `a`. as you see on the console.log of `a` gives still `10` but b is 20. you may think it is simple. Yes it is.! but behind this, there lies a concept called **mutability** . 
**Generally Primitives are mutable in JS. **
oh! OK. what is primitives.? 
In JS Primitives are numbers, string, boolean. whereas Non Primitives are Array, objects.

Let we see the difference between them:
If we declare a variable with string, number, or boolean it will store its data. whenever we try to modify that data it will not overwrite rather it will create a new copy in different memory address.

but, When a variable is assigned with non-primitives like array or object, that variable holds reference to that non-primitive ,instead of that as value. 

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

If you noticed I changed the obj2 but it is affecting the obj1 as well, the reason is non primitive variable stores address not data.

Hope This is helpful.
Cheers,
Happy Learning.!
Animate your .NET MAUI Windows app
Tags: dotnet, winui, windows, dotnetmaui
Published: 2023-05-26 10:44:17

If you're new to Windows development with .NET MAUI, you may not be familiar with some of the native tricks available. However, developers experienced in `UWP` and `WinUI` have knowledge of these tricks! Currently, .NET MAUI uses `WinUI` for Windows development, and there are a lot of impressive animations in WinUI that we can incorporate into our .NET MAUI apps. Let's explore some of them.

## Animate moving elements
One of the animations available is the `RepositionThemeTransition`, which works when an element moves, such as when you resize your window or when certain events occur in your C# code. You can also utilize Triggers and VisualStates in XAML to trigger this animation. I'm absolutely enamored by this animation, It's truly remarkable. You just need to have a responsive design to witness its magic.
To animate any layout by targeting a `Panel`, you can use the following XAML code snippet:
```xml
    <maui:MauiWinUIApplication.Resources>
        <Style TargetType="Panel">
            <Setter Property="ChildrenTransitions">
                <Setter.Value>
                    <TransitionCollection>
                        <RepositionThemeTransition />
                    </TransitionCollection>
                </Setter.Value>
            </Setter>
        </Style>
    </maui:MauiWinUIApplication.Resources>
```
You can also animate individual elements like `Button` by specifying the target type accordingly.

## Changing Page Navigation Animation
If you wish to modify the default page animation in .NET MAUI for Windows, which is the `SlideNavigationTransition`, here's the code you need:

```xml
    <maui:MauiWinUIApplication.Resources>
        <Style TargetType="Page">
            <Setter Property="Transitions">
                <Setter.Value>
                    <TransitionCollection>
                        <EdgeUIThemeTransition Edge="Bottom" />
                    </TransitionCollection>
                </Setter.Value>
            </Setter>
        </Style>
    </maui:MauiWinUIApplication.Resources>
```

---

That's all there is to it! Just remember to include these code snippets in the `Platforms/Windows/App.xaml` file of your project. Additionally, I've created a sample repository where you can access the code [here](https://github.com/mhrastegari/MAUIWinUIAnimations).
Also you can learn more about Windows animations from [here](https://learn.microsoft.com/en-us/windows/apps/design/motion/xaml-animation).

I hope you find these animations useful and enjoy enhancing your .NET MAUI Windows app with delightful visual effects!
Bonn Massage: Namaste Massage
Published: 2023-05-26 10:37:16


Willkommen bei Namaste Massage, Ihrem ultimativen Ziel für Entspannung und Verjüngung bei Bonn Massage. Mitten im Herzen der Stadt bietet Namaste Massage einen wohltuenden Rückzugsort, an dem Sie dem Stress des Alltags entfliehen und in eine Welt der Ruhe eintauchen können. Bei Namaste Massage glauben wir an die Kraft der Berührung und ihre Fähigkeit, Körper und Geist zu heilen. Unser Team aus qualifizierten und erfahrenen Massagetherapeuten ist bestrebt, Ihnen ein außergewöhnliches und persönliches Erlebnis zu bieten, das auf Ihre individuellen Bedürfnisse zugeschnitten ist. Egal, ob Sie Muskelverspannungen lösen, Stress abbauen oder einfach nur einen Moment purer Entspannung suchen, wir bieten eine breite Palette an Massagetherapien, die Ihren Wünschen gerecht werden.[ https://www.namastemassage.de/ ](Bonn Massage: Namaste Massage )
Is your PR really ready for review?
Tags: codereview, productivity, beginners
Published: 2023-05-26 10:29:15

When it comes to writing code, it's not just about making it work - it's also about making it **readable** and **maintainable**. Even though code review is a common practice, it is still a time-consuming and sometimes tiring process. It's important to reduce the amount of time needed for review and to make it easier for your colleagues. This way you have better chances for quick merge 🙂

One effective way to do this is by checking your own PRs before asking for a review. But what exactly should you be checking in order to save everyone's time?

While there are numerous articles and checklists on this topic, most of them cover common issues that can be fixed automatically, like alphabetical sorting of imports, typos and etc. Instead, this checklist focuses on aspects that cannot be automated:

- Variable names are **clear** and **descriptive**.
- Comments are added where necessary to clarify your changes.
- There are **no out-of-scope** changes in the PR.
- PR focuses on **one feature** and is relatively small.
- All functions and variables are in the right files and that there are **no misplaced elements**.
- There is a **description** of the PR to give reviewers context.
- Docs are **updated** to reflect any changes made in the PR.
- Any necessary **cleanups** are done.
- Follow the **single responsibility principle** in functions.
- Keep **consistency** in mind throughout the PR.
- Follow the [boyscout rule](https://www.oreilly.com/library/view/97-things-every/9780596809515/ch08.html): 'Always leave the code better than you found it.'

If you check whether your PR complies with these rules, you will definitely get less comments on Code Review and save your colleagues a lot of time🙌
What Are The Parameters of The around Method in Magento 2
Tags: magneto, magento2, magento2tutorial
Published: 2023-05-26 10:22:29

In Magento 2, plugins, also referred to as interceptors, serve the purpose of altering the behavior of class methods without the need to extend or modify the original class. One of these methods is called the "around" method, which enables the interception of calls to a particular method and the addition of custom functionality before and/or after the original method execution. The parameters of the around method in Magento 2 consist of the intercepted class and method, along with a closure containing the custom functionality to be incorporated. This approach facilitates a more adaptable and modular architecture while allowing for the integration of custom functionality without impacting the core codebase. A significant query that developers often have is **_What Are The Parameters of The around Method in Magento 2_**?

A plugin class within Magento 2 can employ the around method to enclose a class method, executing custom code prior to and/or following the original method. This enables the modification of method inputs and outputs, or the inclusion of additional functionality, all without requiring modifications to the original class. If you are working with Magento 2, you may find it valuable to understand the parameters of the around method or the specific parameters employed in the around method of Magento 2.

For more information , please visit this :- **_[https://webguru.dev/what-are-the-parameters-of-the-around-method-in-magento-2/](https://webguru.dev/what-are-the-parameters-of-the-around-method-in-magento-2/)_**
🐍🔥 Empowering Web Development with Python Flask 🔥🐍
Tags: python, programming, productivity, webdev
Published: 2023-05-26 10:18:56

Calling all Python enthusiasts eager to build web applications with simplicity and flexibility! Look no further as we embark on an exciting journey into the extraordinary realm of Python Flask. Brace yourself for this micro web framework that delivers an exceptional punch!

🔸 What is Flask?
Flask is a lightweight web framework written in Python. It provides a simple and efficient way to build web applications and APIs. With Flask, you can create anything from a small personal project to a large-scale application with ease.

🔸 Why Choose Flask?

1️⃣ Minimalistic: Flask follows a "micro" approach, focusing on simplicity and minimalism. It doesn't impose any dependencies or project structures, giving you the freedom to choose your own tools and components.

2️⃣ Flexible Routing: Flask provides a powerful routing system, allowing you to map URLs to Python functions effortlessly. You can define routes, handle HTTP methods, and even pass variables dynamically.

3️⃣ Template Engine: Flask integrates with Jinja, a powerful templating engine. It enables you to separate your logic and presentation, making your code more maintainable and readable.

4️⃣ Extensible: Flask's modular design allows you to add additional functionality easily. It supports various extensions for database integration, form handling, authentication, and more, giving you a wide range of options.

5️⃣ Lightweight: Flask has a small codebase and a minimal overhead. It doesn't force unnecessary abstractions, making it efficient and fast. It's perfect for building applications with low resource requirements.

🔸 Getting Started with Flask:
1️⃣ Install Flask using pip: pip install flask
2️⃣ Create a Python file (e.g., app.py) and import Flask: from flask import Flask
3️⃣ Define the Flask application: app = Flask(__name__)
4️⃣ Create routes by defining functions decorated with @app.route('/')
5️⃣ Start the development server: app.run()

🔸 Exploring Flask Ecosystem:
Flask's true power lies in its vast ecosystem of extensions and libraries. Here are a few popular ones:

1️⃣ Flask-RESTful: Simplifies building RESTful APIs with Flask, providing features like request parsing, resource routing, and more.

2️⃣ Flask-SQLAlchemy: Integrates Flask with SQLAlchemy, a powerful and flexible Object-Relational Mapping (ORM) library.

3️⃣ Flask-WTF: Makes form handling a breeze by providing integration with WTForms, a flexible form validation and rendering library.

4️⃣ Flask-Login: Offers user authentication and session management capabilities, making it easy to handle user login and access control.

🔸 Conclusion:
Python Flask is a fantastic web framework that empowers developers to create web applications swiftly and efficiently. Its simplicity, flexibility, and extensibility make it a top choice for projects of all sizes. So, go ahead, dive into Flask, and unleash your web development potential!
Configure passwordless sudo for a specific user in linux
Tags: linux, sudo, configuration
Published: 2023-05-26 09:56:43

---
title: Configure passwordless sudo for a specific user in linux
published: true
description: https://youtu.be/7QwdRYuM5i0
tags: #linux #sudo #configuration
---

In Linux, the sudo command allows users to execute administrative tasks with elevated privileges. 

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

By default, when a user runs sudo, they are prompted to enter their own password to authenticate themselves. However, there are scenarios where you might want to configure passwordless sudo access for a specific user. This can be useful for automation scripts or specific administrative tasks. In this article, we will explore how to set up passwordless sudo for a specific user in Linux.

- Edit the Sudoers File:
The sudoers file contains the configuration for the sudo command. To edit this file, you need root or sudo privileges. 
Open a terminal and run the following command:

```bash
sudo visudo
```
- Configure Passwordless Sudo:
Within the sudoers file, locate the section that grants sudo access to users.
its look like 
```bash
# User privilege specification
root    ALL=(ALL:ALL) ALL
```
Paste your username with following command, to   grant passwordless sudo access.
```bash
<your_username>    ALL=(ALL) NOPASSWD:ALL
```
Replace "your_username" with the actual username of the user you want to grant passwordless sudo access to.
To get your username use following command : 
```bash
echo $USER
```
The NOPASSWD option allows the user to run any command with sudo without entering their password.

- Test the Configuration:

Run a command that requires sudo privileges:
```bash
sudo ls
```
If the configuration was successful, the command should execute without prompting for a password.
ERROR_USER_UNAUTHORIZED error using publish profile in App Service
Tags: azure, appservice
Published: 2023-05-26 09:43:15

If you try to publish an App Service using the Publish Profile and you receive the `ERROR_USER_UNAUTHORIZED` error, you need to enable the Basic Authentication on App Service to solve it.

You can receive this error, for example, if you are deploying your App Service using Visual Studio. 
You create the Publish Profile in Visual Studio with the Publish menu:

![The Publish menu in Visual Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/slmvp0ebihm6kpgo2dk0.png)

This Visual Studio feature, behind the scene, use the Publish Profile of the App Service to deploy your code.
Up until a couple of weeks ago, the Basic authentication in App Service was active by default and this always allowed this option to be used without errors. For a couple of weeks now, if you create an App Service from the Azure portal and try to do this type of publication, you get the following error:

![The publish error in Visual Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3kd153mncbr3c8957a9.png)

This happens because the Basic Authentication is, now, disable by default.
If you want to continue to deploy your app using this way, you need to open the **Configuration** blade of your App Service, click on the **General settings** tab and enable the **Basic Authentication** option.

![The Basic Authentication option in the App Service configuration blade](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4nrhex70odpls368tie.png)

This configuration should solve your problem.
Online Pet Shops Singapore: Convenient Shopping for Your Pets
Tags: onlinepetshopssingapore, dogfoodinsingapore, buydogsupplementssingapore, catdryfoodonline
Published: 2023-05-26 09:34:23

Shop with ease at the leading Online Pet Shops Singapore. Our comprehensive online platform offers a wide selection of pet care products and services for your pets. From premium pet food to toys, accessories, grooming supplies, and healthcare essentials, find everything you require to provide optimal care for your pets. Learn all about the products :- [https://www.whatsyourhours.com/singapore/pet-supplies-care/petfolio]
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qe8ar210j9r0oyunz9nh.jpg)
Mac Right-Click Menu Customization
Published: 2023-05-26 09:32:14

I recently switched from Windows to macOS only to find that some common functionalities, such as new file creation and app uninstallation, seem to be absent from the Mac right-click context menu. I used to create Office documents (Word, Excel, PPT, etc.) with a single right-click. I'd like to make my Mac right-click menu more customizable and similar to the one on my Windows PC. Luckily, I found [iBoysoft MagicMenu](https://iboysoft.com/magic-menu/). 

Main Features:
- Create different types of new files (including TXT, RTF, Doc, XLS, WPS, PPT, Keynote, Markdown, Numbers, Pages, etc.) with a single right-click.
- Add a folder shortcut to the Copy/Move To menu and quickly copy/move files to a target location.
- Right-click to quickly access files, apps, and webpages that are frequently used.
- Completely uninstall the unwanted applications and their associated files.
- Locate and clean up the duplicate files.
- Track down and remove similar photos.
- Open a file or folder with JetBrains apps.
- Support for additional features, including file compression, screen capture, screen recording, file path copying, hidden file listing, etc.
...

Source: https://www.giveawayoftheday.com/iboysoft-magicmenu-3-2/
How to Install Modules Manually in Magento 2
Tags: magento, magento2, magento2tutorial
Published: 2023-05-26 09:20:49

Magento 2 provides three options for manual module installation: via Composer, using a ZIP archive, or through the browser. The choice of method depends on how the module was obtained, whether it was purchased from the store or acquired from third-party sources. Installing modules manually in Magento 2 involves a straightforward process that requires following a few steps and having a basic understanding of Magento's file structure and command line interface. This guide will walk you through the process of **_How to Install Modules Manually in Magento 2_**.

If you're looking to install a module manually in Magento 2, there are several methods to consider. If you have purchased a module from the Magento store, you will need to use the access keys generated in your marketplace account to add the module to the Magento admin panel. This will synchronize your Magento marketplace account and enable you to manage the installation of purchased packages. On the other hand, advanced users who prefer manual module installation in Magento 2 can use Composer. If you choose to install a module via Composer, you will need to provide the access keys unless they have already been saved in the system.

For more information , please visit this :- **_[https://webguru.dev/how-to-install-modules-manually-in-magento-2/](https://webguru.dev/how-to-install-modules-manually-in-magento-2/)_**