teleren/devto huggingface dataset:
Solving Merge Conflicts in Git | Conflicts between two branches on the same file [ Command Line ]
Tags: git, github, webdev, react
Published: 2023-08-25 13:00:15

While **collaborating on github** , and you update the same file at the same time , you have  **conflicts** between two branches on the same file upon merge!
Let's take a scenario , where you have `main` branch and `updated_branch` and the `updated_branch` has remote changes on the same file as your local `main` branch.
**TLDR**;
`git merge updated_branch` throws an error  

![merge Error Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gcelad6s5as6o0ulsem.png)

It's easy . Let's solve it :
**1. Checkout the main branch**
`git checkout main`
**2. Merge specific files from the updated_branch  :**
`git checkout other_branch_name -- path/to/file`
_Replace other_branch_name with the actual name of the other branch and path/to/file with the path to the file you want to update._
**3.Commit the Changes:**
`git commit -m "Update file from updated_branch_name"`
**4.Push Changes (If Necessary):**
`git push origin master`

**Finally** , try the initial merge operation. 
`git merge updated_branch` 

**Voila** ! Everything should be fine now !!
WhatsApp cloud API for java
Published: 2023-08-25 12:57:41

## WhatsApp launches a cloud API accessible to all

With WhatsApp Cloud API, Meta provides a free and secure cloud service to facilitate the work of developers.

> 
Until now, the WhatsApp Business API was reserved for medium and large companies who wanted to facilitate exchanges with their customers, all over the world. Now, Meta offers a new version of WhatsApp Business, cloud-based and hosted by the parent company, accessible to all businesses, from SMEs to large groups.
 
 Concretely, WhatsApp Cloud API offers free and secure cloud hosting services. This makes it easily and quickly accessible to developers, who therefore do not have to worry about the details of data storage. With this API, the objective is to be able to customize WhatsApp services, through the configuration of different services that adapt to the needs of the company.

So I just developed a java library Opensource that implements some features offered by this api in other to facilitate their effective integration.


Have a look .....
Mastering Maven: Harnessing the Power of Resource Filtering
Tags: springboot, spring, programming, tutorial
Published: 2023-08-25 12:55:15

In the world of software development, configuration management is a critical aspect. Maven, a widely used build automation tool, provides a powerful feature known as resource filtering that simplifies this task. In this guide, we'll dive into how to leverage Maven's resource filtering to streamline your project's configuration management.

## Project Setup

Let's start by setting up a hypothetical Maven project. Here's the project structure:

```
my-maven-project/
├── src/
│ └── main/
│ └── resources/
│ └── config.properties
├── pom.xml
```




## Configuring Resource Filtering

In your `pom.xml`, configure resource filtering under the `<build>` section:

```xml
<build>
   <resources>
       <resource>
           <directory>src/main/resources</directory>
           <filtering>true</filtering>
       </resource>
   </resources>
</build>
```

## The Config File: config.properties
Create a `config.properties` file in the `src/main/resources `directory:

```
api.url=${api.baseurl}/v1
```

## Defining Properties
Define properties to be used for filtering in your pom.xml:

```xml
<properties>
   <api.baseurl>https://api.example.com</api.baseurl>
</properties>
```

## Building the Project
When you build the project using `mvn clean install`, Maven will perform resource filtering. It replaces `${api.baseurl}` in `config.properties` with the value defined in the `<properties> `section of the `pom.xml`.

## Result
After the build, the `config.properties` file in the target directory (where the compiled resources are placed) will look like this:

```
api.url=https://api.example.com/v1
```

## Conclusion
Resource filtering in Maven makes managing configurations a breeze, allowing you to inject values into resource files during the build process.

Now that you've learned how to harness the power of Maven's resource filtering, you can take control of your project's configurations with ease. This feature is invaluable for managing different configurations for various environments and simplifying your development workflow.
The Importance of Criminal Law: How It Protects Individuals, Maintains Order, and Upholds Justice
Published: 2023-08-25 12:51:44


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

Criminal law is the body of law that defines crimes and establishes punishments for those who commit them. It is an essential part of any free society, as it helps to protect individuals and their property, maintain order, and uphold justice.

**- Protects Individuals and Their Property:** Criminal law helps to protect individuals and their property from harm by defining crimes such as murder, theft, and assault. These crimes are harmful to individuals and their property, and criminal law helps to deter people from committing them.

**- Maintains Order:** Criminal law also helps to maintain order in society by establishing rules and regulations. These rules and regulations help to create a sense of order and predictability, and they also help to deter people from engaging in activities that would disrupt or endanger the community.

**
- Upholds Justice:** Criminal law upholds justice by ensuring that everyone is treated fairly under the law. This means that everyone is subject to the same laws, regardless of their race, ethnicity, gender, or social status. It also means that everyone has the right to a fair trial, and that they will be punished fairly if they are found guilty of a crime.

**Conclusion:**

Criminal law is an essential part of any free society. It helps to protect individuals and their property, maintain order, and uphold justice. While it is not without its challenges, criminal law remains an important tool for creating a safe and just society.

If you are looking for the [best criminal litigation law in mumbai ](https://elixirlegalservices.com/practice-area/criminal-litigation/)firm in Mumbai, Elixir Legal Services is the best choice.The firm has a team of experienced and dedicated lawyers who are experts in all aspects of criminal law.
Task3-Functional & Non-functional testing
Tags: beginners, python, manualtesting, learning
Published: 2023-08-25 12:43:34

Functional Testing:

Functional testing is the testing of software or an application, which is done to verify an application's functionality. 
It is a kind of Black box testing that tests whether the application or the software is working as expected.
Blackbox testing is done manually and it is very effective in finding out bugs.
Based on the requirement of the client, a document is prepared as a guide to test the software or the application, which is called software specification or requirement specification.

Below are the various types of functional testing:

1.Unit testing:
The developers usually perform unit testing to check their unit of codes to achieve a particular functionality.

2.Sanity testing:
sanity testing is done to check if all the major functionalities of the software or application are working as expected.

3.Smoke testing:
smoke testing is done when the new build is released to ensure that the build is stable or not.

4.Regression testing:
regression testing is to check if the existing functionality still works according to the specifications after adding new code and fixing bugs.

5.Integration testing:
when the individual modules are clubbed together to achieve an end-to-end scenario. 

Non-functional testing:

In non-functional testing it accesses the application properties and verifies the application's performance, reliability and usability.
it checks for the behaviour of the software at various load conditions to check for the performance.
ex: JMeter, loadmeter which dynamically creates IP addresses.
Free Ai Image Generator
Tags: freeaiimagegenerator, ai, aiimagegenerator
Published: 2023-08-25 12:34:48

## Free Ai Image Generator
12 Free Ai Image Generator
[Free Ai Image Generator](https://devs.news.blog/2023/08/24/free-ai-image-generator/)

![Amsterdam](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jx8vkttw1whh5w46qqrc.png)
Handle Dialog.disableBackdropClick descoped property warning in MUI v5
Tags: react, materialui, webdev, mahjong
Published: 2023-08-25 12:34:40

Recently I started to work on a simple mahjong game. Initially I planned to create a clone of [mahjong titans](https://mahjongtitans.com) in react, but I realized that even if it is a simple mahjong game and it does not have dialogs and other similar gui elements, is not that easy to implement in react. So, I went for even a more simple mahjong game: mahjong memory, a memory game with a mahjong twist where you need to pair mahjong tiles. 

I started the game long time back did not finish yet. Now, I upgraded from Material UI 4 to Material and I encountered the Handle Dialog.disableBackdropClick descoped property warning.

If you are moving from Material UI v4 to MUI V5 you might encounter the same warning. It happens because disableBackdropClick is descoped in MUI v5. disableBackdropClick is used to prevent closing the dialog when the background is clicked. However, if we need that functionality in MUI v5, we need to implement.

Here is the warning that is triggered when the dialog is open:

react-dom.development.js:86 Warning: React does not recognize the `disableBackdropClick` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disablebackdropclick` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

This is the dialog:
```
      <Dialog
        open={showModal}
        disableBackdropClick
        disableEscapeKeyDown
        aria-labelledby="alert-dialog-title"
        aria-describedby="alert-dialog-description"
        onClose={handleDlgClose}
      >
        <DialogTitle id="alert-dialog-title">
          The title of the dialog
        </DialogTitle>
        <DialogContent>
          <DialogContentText id="alert-dialog-description">
            The message is here
            {bestScore} moves.
          </DialogContentText>
        </DialogContent>
        <DialogActions>
          <Button onClick={handleOk} color="primary">
            Restart
          </Button>
        </DialogActions>
      </Dialog>

```

In order to prevent closing the Dialog in MUI v5, we need to add a function handleDlgClose that intercepts the close event and if it comes from a click in the background and returns without closing the dialog.

```
  const handleDlgClose = (event, reason) => {
    if (reason && reason == "backdropClick") {
      console.log('backdropClicked. Not closing dialog.')
      return;
    }

    setShowModal(false);
  }
```

Then we add in the Dialog code the event handler and we remove the disableBackdropClick property:

```
      <Dialog
        open={showModal}
        disableEscapeKeyDown
        aria-labelledby="alert-dialog-title"
        aria-describedby="alert-dialog-description"
        onClose={handleDlgClose}
      >
      ...
```
Display Array Items over template in Angular Application
Published: 2023-08-25 12:33:02

It is one of the very common tasks in any of the language or its library/frameworks. In this article, We will see how to display array list items using the ngFor directive in the Angular framework.

### Displaying Array list item using ngFor directive
Syntax

``````<tr *ngFor="let post of posts; let i = index">

  ..

  ..

  <tr/>``````

### Example

Let's say we have to show the below array item over the template. For simplicity, I am creating an array named posts with static items but in the real application, data may be dynamic and will be fetched for any server.

``````[
    {
      "userId": 1,
      "id": 1,
      "title": "Test title 1",
      "body": "Test body1, This is test body"
    },
    {
      "userId": 1,
      "id": 2,
      "title": "Test title 2",
      "body": "Test body1, This is test body"
    },
    {
      "userId": 1,
      "id": 3,
      "title": "Test title 3",
      "body": "Test body1, This is test body"
    },
    {
      "userId": 1,
      "id": 4,
      "title": "Test title 4",
      "body": "Test body1, This is test body"
    }
]``````

We will bind the above array into the template part. Here we will show it inside a table. Let's have a look at the code on the template side.
```
<table class="table table-dark">
    <tr>
        <th>Id</th>
        <th>Title</th>
        <th>Body</th>
        <th>User Id</th>
    </tr>
    <tr *ngFor="let post of posts; let i = index">
        <td>{{post.id}}</td>
        <td>{{post.title}}</td>
        <td>{{post.body}}</td>
        <td>{{post.userId}}</td>
    </tr>
</table>
```

In the above example, We have created a posts array inside a component ts file which is having objects in it with few properties like id, title, body, and userId. And bound that array items in angular template part.

 

The ngFor built-in structural directive of Angular provides a couple of local variables, Which can be used for performing some basic tasks while iteration of the array,

**Index: number** – Used for getting the index for current element while iteration.
**First: boolean** – It returns true if the current element is the first element in the iteration otherwise it returns false.
**Last: boolean**  – It returns true if the current element is the last element in the iteration otherwise it returns false.
**Even: boolean**  – IT returns true if the current element is even element based on the index in the iteration otherwise it returns false.
**Odd: boolean**  – It returns true if the current element is odd element based on the index in the iteration otherwise it returns false.

Let me know your thoughts over email at **pankaj.itdeveloper@gmail.com.** I would love to hear them and If you like this article, share it with your friends.

Thanks!

This article is originally posted over [jsonworld](jsonworld.com)
Jannat Events, One Of The Leading Event Management Companies, Dubai
Published: 2023-08-25 12:29:20

Step into a world of enchantment and seamless celebrations with Jannat Events, the preeminent event organizing company that turns ordinary occasions into extraordinary memories. Nestled in the heart of the UAE, Jannat Events stands as a beacon of innovation, passion, and excellence in curating remarkable events that resonate with elegance and finesse.
With a sterling track record of orchestrating over 250 awe-inspiring events, our expertise encompasses a dazzling spectrum of festivities. From the intimate allure of birthday parties and heartwarming baby showers to the opulence of weddings, the sophistication of corporate galas, the buzz of press releases, and the glamour of esteemed award nights – Jannat Events reigns supreme in crafting experiences that linger in the heart and mind.
At the heart of our success lies an expansive network of artisans, visionaries, and magicians who infuse every event with a touch of their brilliance. From visionary designers and passionate makeup artists to melodic singers and captivating dancers, our ecosystem thrives on synergy and creativity, culminating in the harmonious symphony that is a Jannat Event.
Jannat Events stands as a testament to the profound dedication and talent of our curated ensemble. Each event is a canvas, meticulously brushed with the strokes of passion and commitment. We value the invaluable contributions of our suppliers, vendors, photographers, entertainers, caterers, and more, recognizing that their devotion is the cornerstone of our triumphs.

We are one of the leading [event management companies](https://jannatevents.com/) in Dubai. Step into a realm of possibilities, where celebrations transcend expectations. Step into Jannat Events, where magic meets reality. Your journey to an unforgettable event begins here.

Website: https://jannatevents.com/
Email ID: sales@jannatevents.com
Address: Office no: 33, Tanvi business center, old Nissan showroom, Airport road, Dubai PO BOX. 416563
ELI5: Node Embeddings
Tags: python, machinelearning, datascience
Published: 2023-08-25 11:41:41

<h3>What are node embeddings?</h3>
<p>Node embeddings are vectors (tensors) of numbers that are obtained by a process called embedding. So what's this embedding process? the way i think of it is a process of mapping something complicated (a graph, a document, an image) into simple fixed length vectors while retain its key features. For an example, in graph, it would mean to translate the whole or parts of graph in N-dimensional space. Take a look at the example below. In this example, all the nodes are mapped in 2-dimensional space.</p>

<h3>What do we use node embeddings for?</h3>
<ol>
<li>Node Classification</li>
<li>Link Prediction</li>
<li>Clustering</li>
</ol>
How to optimize your functions in JavaScript using memoization (Interview question)
Tags: javascript, webdev, programming, tutorial
Published: 2023-08-25 11:40:45

Many developers arent familiar with optimizing their functions in javascript. You would be amazed how further you could optimize your functions in javascript and make your overall website more performant with this simple trick.
The link attached describes everything in a simple, short and indepth manner.

{% embed https://www.youtube.com/watch?v=S7ZdO0EMKM4 %}
Service Lifecycles: Singleton, Scoped, Transient
Tags: singleton, scoped, transient
Published: 2023-08-25 11:37:11

In the software development process, the goal is to reduce dependencies and create more flexible and testable software by utilizing Dependency Injection. During the application of this design pattern, the creation of services and their lifecycles play a significant role. In this article, we will explore three distinct lifecycles: Singleton, Scoped, and Transient.

** Singleton Lifecycles for Services**

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

Singleton services are created once throughout the application's lifecycle and share the same instance across all incoming requests. When the application is stopped and restarted, the initial instance that was produced continues to be returned.

Singleton services are typically employed in scenarios where shared state is used or for objects with a costly construction process.

**Scoped Lifecycles for Services**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxnbdqku6v8uvab35h14.png)
Scoped services generate a new instance for each request, and requests within the same request pipeline utilize the same instance. For instance, throughout a request's lifecycle, this service type can be employed to access the relevant user session data. This allows for the provision of services that store user-specific data such as state or authentication information.

Scoped services are useful in situations where state specific to each user or request needs to be maintained.

**Transient Lifecycles for Services**

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

A new instance is created for each individual request. For example, Transient services can be used for stateless operations like a calculation function or a temporary data storage service.

When comparing service lifecycles with an example:


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

- Singleton services are like a shared tool in a household that everyone uses and remembers its state across different tasks.
  
- Scoped services are akin to a personal workspace in an office where each person has their materials, ensuring privacy and personalization.
  
- Transient services are comparable to disposable utensils in a cafeteria, with a new set given for every meal, ensuring hygiene and independence.

Remember, choosing the appropriate service lifecycle is crucial in achieving the desired application behavior and resource management.
Refactoring Your Legacy Code Covertly!
Tags: webdev, programming
Published: 2023-08-25 11:30:00

We are reminiscing on how we needed to build a system with no outage  to our clients. Single Sign-On was a huge part of that, and having a solid team to make it happen.

https://youtu.be/Re_OhP9fWZk

{% youtube https://youtu.be/Re_OhP9fWZk %}
List Of Free Journals For Paper Publication
Tags: webdev, research, machinelearning, student
Published: 2023-08-25 11:19:34

Individuals who are looking for free paper publications or [research article publications without any cost](https://abcdindex.com/blogs/free-online-journal-for-students) can Visit ABCD Index. It’s a free to access platform for the research and academic individuals. Here they can find all types of databases required for research from beginning to publishing.

**[Click Here- Submit Research Paper/ Article Now ](https://abcdindex.com/blogs/list-of-free-journals-for-paper-publication)**

RAMP – RAMP is a free to publish portal where researchers, scholars and other academicians can submit their research paper or article to publish free of cost in an ABCD Index registered journal.

Who can submit research papers and articles in RAMP?
Individuals related to science, mathematics, engineering, social science, arts, humanities, and others can submit their research papers/ articles to RAMP. There is no restriction for a particular discipline; we accept almost all types of research papers from different research domains. Scholars can submit their research paper or article without worrying about the research areas. They will be notified by the journal for the further process.

[Upcoming Conferences For Paper Publishing 2023](https://abcdindex.com/blogs/upcoming-conferences-for-paper-publishing-2023)

How one can submit research papers and articles to RAMP
Submitting a research paper or article in RAMP is very easy and user friendly. Follow the steps to submit research paper or article in the RAMP:

1.    The first thing one has to do is go to the RAMP portal. For this, one has to click on the link given in the blog. It will redirect to the paper submission page.

2.    Take an overview of the RAMP portal and get familiarized with the fields.

3.    Now fill the corresponding author email in the box, stating the same then move to the next field.

4.    Now fill in the authors details like name, email address, belonging country or region, affiliated institute i.e. college, university, research lab, organization), profile link if you have any etc.

5.    If a research paper or article has more than one author then they can use the Add more option to include multiple authors. To add co-authors just click on the Add more authors button provided below the author details and fill the fields. One can also delete the last added field if required.

6.    After filling the author’s details, move to the next field. Here write the title of the research paper or article in the title box. Now move to the abstract part and fill the abstract related to the research article. It will [help reviewers](https://webdigitalweb.com/iot-project-ideas-for-final-year-students/) to have an overview of the content of the research work.

7.    Add keywords related to the research paper.
8.    Now add the research paper file in pdf or document whatever format you had.

9.    Check all the fields before making the final submission.
10. Now click on the submit button.
Wait for the response, you will be notified soon.