teleren/devto huggingface dataset:
Top-Notch PEGA CSA 7.2 Dumps for Certification
Published: 2023-10-30 09:45:56


Are you gearing up to conquer the PEGA CSA 7.2 certification exam? 
If so, you're likely aware of the rigorous knowledge and skill requirements that this exam demands.  <a href="https://examtopicsfree.com/microsoft-exam-dumps/pega-csa-7-2-dumps/">pega-csa-7-2-dumps</a> Fortunately, there's a powerful tool at your disposal to help you prepare efficiently: PEGA CSA 7.2 dumps.

**Dumps have garnered a mixed reputation in the certification world
.** 
Some consider them a shortcut to success, while others view them with skepticism. In this blog, we'll explore how you can make the most of PEGA CSA 7.2 dumps without compromising the integrity of your certification journey.


**Understanding PEGA CSA 7.2 Certification
**
Before delving into the role of dumps, let's first grasp the significance of the PEGA CSA 7.2 certification. PEGA, a leading software company, offers this certification to individuals who demonstrate their proficiency in PEGA's Customer Service application.

Click Here More Info: https://examtopicsfree.com/other-exams/pega-csa-7-2-dumps/
How to Extract Text from a PDF Document in .NET using the PDF Library
Tags: dotnet, csharp
Published: 2023-10-30 09:43:50

Learn to extract text from a PDF document in a console app using the Syncfusion .NET PDF Library. This video demonstrates how to extract text from a specific page, layout-based extraction, extract text from the entire PDF document, and extract text from predefined bounds. 

The Syncfusion PDF library is a .NET library that allows users to extract useful data from a PDF document, such as text, images, attachments, and form data. 

Text can be extracted from PDF documents for archiving or indexing. Extracting text from a PDF using Syncfusion Essential PDF is easy and efficient, regardless of the document’s content, and its properties. PDF documents are mainly used for exchanging business data in invoices, purchase orders, shipping notes, reports, presentations, price and product lists, HR forms, and more. 

At some point, a user might need to read and validate data in a PDF document. This may require some additional cost and time to do this manually. To avoid this, text extraction techniques can be used. These techniques will extract all the text or specific text data from a PDF document to validate further in an automated way. 

**Explore our tutorial videos:** https://www.syncfusion.com/tutorial-videos

**Example project:** https://github.com/SyncfusionExamples/how-to-extract-text-from-a-PDF-document-in-net

{% youtube CB4tQC-LhUU %}
Top 10 Terraform Commands
Tags: devops, terraform, beginners, hasanelsherbiny
Published: 2023-10-30 09:42:00

Terraform provides a set of commands to manage your infrastructure and perform various tasks.
in this article we are listing the top 10 commonly used Terraform commands.

```
terraform init
```
Initializes a new or existing Terraform configuration. It downloads provider plugins and initializes the working directory.

```
terraform plan
```

Generates an execution plan that shows what Terraform will do when you apply your configuration. This is a dry run and helps you understand the changes Terraform will make.

```
terraform apply
```

Applies the changes described in your Terraform configuration to your infrastructure. It creates, updates, or deletes resources as needed.

```
terraform destroy
```

Destroys all resources created by Terraform in your configuration. Use with caution, as it can lead to data loss and service disruption.

```
terraform validate
```

Checks the validity of your Terraform configuration files. It ensures that the syntax is correct and references to resources are valid.

```
terraform fmt
```

Rewrites Terraform configuration files to a canonical format. This command helps maintain consistent code formatting.

```
terraform show
```

Displays the current state or plan in a human-readable format. It can be useful for reviewing the details of your infrastructure.

```
terraform refresh

```
Updates the state file with the real-world resources that exist in your infrastructure. This is useful if changes were made outside of Terraform's control.

```
terraform state

```
Provides advanced state management functionality. You can use this command to inspect, modify, or remove items from the state file.

```
terraform import
```

Imports existing infrastructure into Terraform. It allows you to manage existing resources using Terraform.
go-go-web: new front matter parsing feature!
Tags: opensource
Published: 2023-10-30 09:34:06

Today I added a new feature to my Open Source project repo, [go-go-web](https://github.com/kliu57/go-go-web), a program that converts TIL posts in `.txt` or `.md` format to `.html`.

## Markdown Front Matter Support

Given an `.md` input file with front matter, my program can convert the file into an `.html` file with the front matter converted into corresponding HTML metadata.

![frontmatter usage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pcbx5l3bqq1y07898d6q.png)

### Example

Front matter can be specified in .md input files like so:

![markdown input file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/brq5j1npyno4zhx5pyks.png)

Running my program via the command line (for full usage details see GitHub [documentation](https://github.com/kliu57/go-go-web)):

![command line run](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7j5bwpt26dlql1v9aaqe.png)

Resulting output `.html` file with the relevant metadata:

![html output file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2h2al09ng0ajz5rdkcf.png)

## Inspiration from Docusaurus

In my [previous post](https://dev.to/katiel/exploring-the-code-behind-docusaurus-pbk), I explored the code behind [Docusaurus](https://github.com/facebook/docusaurus) to learn how it was parsing front matter in markdown files. Docusaurus employed a JavaScript based open source parser called [gray-matter](https://github.com/jonschlinkert/gray-matter) to do the job.

Similarly, I decided to use a Python based open source parser called [python-frontmatter](https://github.com/eyeseast/python-frontmatter), since my program is written in Python. This parser is also open source and has an MIT license.

My approach is very similar to Docusaurus, except that my program is written in Python and so the parser I used. The parser Docusaurus used was written in JavaScript and returned a JavaScript object with key-value pairs for the front matter. The parser I used returned a Python dictionary of key-value pairs.

## Follow-Up Issues

![future issues](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6w5lu4dhe6fwfygagktd.png)

I have filed some future issues that I will work on in the coming weeks:

- [Update documentation website with more examples](https://github.com/kliu57/go-go-web/issues/18)
- [Update README with more details](https://github.com/kliu57/go-go-web/issues/19)
- [Allow users to specify author metadata in front matter](https://github.com/kliu57/go-go-web/issues/20)
- [Add a `<h1>` heading to each output `.html` file based on the title](https://github.com/kliu57/go-go-web/issues/21)
Leetcode - 845. Longest Mountain in Array
Tags: leetcode
Published: 2023-10-30 09:31:35

Firstly i couldn't solve on my own 😅 , so i went through this [video](https://www.youtube.com/watch?v=VXeukMTbxkw&ab_channel=CodewithAlisha) 

U can visualize the mountains of this problem as shown in this image

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

You can see 2 mountains in this image , But which is biggest mountain , its not the one whose peak value is more but the mountain which is formed by many points . ie in this image its the first mountain because it is formed by 6 points where as the other is formed by only 4 points
so the answer will be 6 !!


How can we say it's a mountain ? , it's a mountain if it has a peak . ok now how can we say it has peak ? , it's a peak if its value is greater than it's neighbour's

In code it goes like 
```javascript
arr[i] >arr[i-1] && arr[i]>arr[i+1]
```
where arr is the give array
and i goes from 1 to n-2 , ok but why n-2 , because n-1 is the index of last element and we cant have a peak at last element.

Ok now we got the peak now we calculate how many points its made of , to do this we need to traverse left first and then to right , while we traverse we keep and counter and increment its value .

In code it goes like
_For traversing left side of mountain_
_```javascript
  let j = i
        let points = 1;
        while(j>0  && arr[j]> arr[j-1]){
            j--;
            points++;
        }
```
Here i is the peak point index we got.

_For traversing right side of mountain_

```javascript
 while(i<n-1 && arr[i] > arr[i+1]){
         i++;
         points++;
        }
```

Now we need to find mountain which has max points 

so for that we declare a var outside and keep overriding it with the max value

so finally the entire code is

```javascript
/**
 * @param {number[]} arr
 * @return {number}
 */
var longestMountain = function(arr) {
    
    const n = arr.length;
    let ans = 0; 
    for(let i = 1 ; i <= n-2 ;){
        if(arr[i] >arr[i-1] && arr[i]>arr[i+1]){ // greater than both neighbours
        //is peak point
        //traverse and find length
        let j = i
        let points = 1;
        while(j>0  && arr[j]> arr[j-1]){
            j--;
            points++;
        }
        while(i<n-1 && arr[i] > arr[i+1]){
         i++;
         points++;
        }
    ans = Math.max(points, ans)
        }else{
            i++
        }
       
    } 
    return ans
};
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0p0uao1nxcej43k48dx.png)
Please do follow the series if you are struggling with leetcode questions 😇
🚀 Mastering Exception Handling in PHP: Ensuring Code Resilience 🚀
Tags: php, laravel, oop, webdev
Published: 2023-10-30 09:25:02

Exception handling may not always be the center of attention, but it’s a programming technique that’s absolutely critical in PHP development. It’s all about ensuring your code can gracefully handle unexpected situations and errors.

Why is Exception Handling So Important?

📌 1. Improved Code Resilience: Exceptions allow you to gracefully handle errors, ensuring your application can recover or provide meaningful feedback to users instead of crashing.

📌 2. Debugging and Troubleshooting: Proper exception handling provides valuable information for debugging, helping you quickly identify and resolve issues.

📌 3. Maintainability: Well-structured exception handling makes your code more maintainable by separating error-handling logic from the main application logic.

📌 4. Consistency: It ensures a consistent approach to error handling throughout your application.

How Does Exception Handling Work in PHP?

Let’s take a simple example. Suppose you’re opening a file in PHP, and you want to handle any potential errors, like a missing file or permission issues.

Traditional approach:

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

With exception handling:


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

By using exceptions, you can handle errors uniformly and provide meaningful feedback to users or log errors for debugging.

Here’s how you can leverage exception handling effectively in PHP:

1️⃣ Identify Potential Exceptions: Recognize the points in your code where errors might occur.

2️⃣ Use the try-catch Block: Wrap the code that might throw exceptions within a try block, and catch specific exception types in a catch block.

3️⃣ Handle or Report Exceptions: In the catch block, decide whether to handle the exception (e.g., providing a user-friendly error message) or log and report it for debugging.

Exception handling is a critical aspect of PHP development that contributes to code resilience and maintainability. It’s a skill every PHP developer should master, as it makes your applications more robust and user-friendly.

Let’s share our experiences! How has exception handling benefited your PHP projects? Share your thoughts and insights. 🚀

My LinkedIn — https://www.linkedin.com/in/mahfuzur-rahman-44723728a/

#PHPDevelopment #ExceptionHandling #ProgrammingTechniques #CodeResilience
Converting Callback-Based APIs to Promises: Simplifying Asynchronous JavaScript Operations
Published: 2023-10-30 09:14:32

**Step 1: Understand the Callback API**

Before you convert the API to Promises, you need to understand how the existing callback-based API works. You should know the functions it provides and their callback parameters.

**Step 2: Wrap the API in a Promise**

To convert the callback-based API to Promises, you can create a function that wraps the original API function. This new function will return a Promise. Here's an example:


```javascript
function asyncOperationUsingCallback(param1, param2, callback) {
    // Perform some asynchronous operation
    // Call the callback with the result
    const result = ...; // The result of the operation
    callback(result);
}

function asyncOperationUsingPromise(param1, param2) {
    return new Promise((resolve, reject) => {
        asyncOperationUsingCallback(param1, param2, (result) => {
            if (result) {
                resolve(result);
            } else {
                reject(new Error("Operation failed"));
            }
        });
    });
}
```

In this example, we create a `asyncOperationUsingPromise` function that wraps the `asyncOperationUsingCallback` function. It returns a Promise, and inside the Promise, we call the original function with the provided parameters.

**Step 3: Use the Promisified Function**

Now, you can use the `Promisified` function just like any other Promise-based function. Here's how you'd use it:

```javascript
asyncOperationUsingPromise(param1, param2)
    .then((result) => {
        console.log("Operation succeeded:", result);
    })
    .catch((error) => {
        console.error("Operation failed:", error);
    });
```

This code demonstrates how to call the `Promisified` function, handle successful results with then, and handle errors with catch.

**Step 4: Convert Other Callback Functions**

Repeat the same process for all other callback functions in your API. Create Promisified versions of these functions using the wrapper pattern demonstrated above.

**Step 5: Test and Refactor**

After converting your API to Promises, thoroughly test it to ensure it behaves as expected. Make any necessary adjustments or refactor your code to take advantage of the cleaner Promise syntax.

By following these steps, you can convert an existing `callback-based API` to Promises, making your code more modern and readable.

`LinkedIn Account` : [LinkedIn](https://www.linkedin.com/in/matthew-odumosu/)
`Twitter Account `: [Twitter](https://twitter.com/iamcymentho)
**Credit**: Graphics sourced from [Youtube](https://www.youtube.com/watch?v=rrJQMojRc48)
Mastering Unit-Testing in Microservices: Best Practices Unveiled 🛠️
Tags: microservices, javascript, webdev, unittest
Published: 2023-10-30 09:14:26

#### How to Bulletproof Your Microservices with Robust Unit Tests 🛡️

---

Hey Dev.to fam! Welcome back to "The Ultimate Guide to Unit-Testing: From Zero to Hero 🚀". Today, we're zeroing in on unit-testing in a microservices architecture. Considering many of us are working on distributed systems, especially with tech stacks involving Node.js and cloud services like AWS, this is a must-read! 🌐

#### The Microservices Challenge 🤔

Microservices present unique challenges for unit testing. You've got independently deployable services, each with its own database and bounded context. So, how do you ensure that your unit tests are both effective and manageable?

##### The Golden Rule 🌟

Always remember: unit tests in microservices should focus on testing the service in isolation. You're not testing the interactions between services—that's what integration tests are for.

#### Best Practices for Unit-Testing Microservices 🛠️

1. **Single Responsibility**: Each test should represent one logical concept.

2. **Mock External Calls**: All external service calls should be mocked.

3. **Data Isolation**: Each test case should set up its own data and tear it down afterwards.

4. **Test Coverage**: Aim for high code coverage but don’t get obsessed over the percentage.

5. **Pipeline Integration**: Include your tests in your CI/CD pipelines. If a test fails, the build should fail.

#### Let’s Get Hands-On 🖐️

Suppose you have a Node.js-based Order Service in a retail microservices setup, which communicates with a Payment Service. We'll focus on testing the `createOrder` function.

Here's a simplified example using Jest:

```javascript
// orderService.js
const paymentService = require('./paymentService');

async function createOrder(orderDetails) {
  const paymentStatus = await paymentService.processPayment(orderDetails);
  
  if (paymentStatus === 'Success') {
    // Logic to create the order
    return 'Order Created';
  } else {
    return 'Payment Failed';
  }
}

module.exports = { createOrder };
```

And here's how you would test it:

```javascript
// orderService.test.js
const orderService = require('./orderService');
const paymentService = require('./paymentService');

jest.mock('./paymentService');

test('createOrder creates an order when payment succeeds', async () => {
  paymentService.processPayment.mockResolvedValue('Success');
  
  const result = await orderService.createOrder({ /* order details */ });
  
  expect(result).toBe('Order Created');
});

test('createOrder fails when payment fails', async () => {
  paymentService.processPayment.mockResolvedValue('Failed');
  
  const result = await orderService.createOrder({ /* order details */ });
  
  expect(result).toBe('Payment Failed');
});
```

### Round-Off 🌠

And there you have it! With these best practices and example in hand, you're well-equipped to tackle unit-testing in a microservices architecture. Remember, a well-tested microservice is a reliable microservice. Happy testing! 🚀
NetDev Sponsors!
Tags: networking, netdev, vancouver, network
Published: 2023-10-30 09:09:48

Excited to announce that we are proud sponsors at #NetDev! 🌐🚀 We're not only participating but also supporting this incredible event. Our team is ready to explore cutting-edge developments and contribute to the future of networking. Stay tuned for updates on our journey! 
https://www.relianoid.com/about-us/events/netdev-conference-0x17/
#Networking #Innovation #TechIndustry #Sponsorship #NetworkingEvents #TechInnovations #NetworkingCommunity #SupportingInnovation #FutureofTech #NetworkingTech #ProudSponsorship #NetworkingConference #Vancouver #Canada 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s0jq1vtpo7k7st3gjyw9.jpg)
Difference b/w function testing and non function testing
Published: 2023-10-30 09:09:34

functional testing                  non functional testing
1. functional testing verifies     1.non functional testing 
   each feature of the software        verifies aspects like
2  goal is to validate software     t  performance
   action                          2.goal is to validate software
3.it is based on customers             performance
  requirements                     3. it is based on customers 
                                         expectation
Taking notes
Tags: programming, php, laracasts, tutorial
Published: 2023-10-30 09:07:37

I decided to start taking notes for each lesson I watch on laracasts.com website, starting from PHP for beginners tutorial...That's why I'm making this blog in a first place.

I'll make notes after each lesson I watch, not during it, supposedly it should help with learning retention.
I took this advice from Kevin Powells newsletter, it does make some sense.

Also another benefit is I think it should make my online learning more fun in a way.
Music Monday — What are you listening to? (Halloween Edition 🎃)
Tags: watercooler, music, discuss
Published: 2023-10-30 09:00:00

_cover image source: [Giphy](https://giphy.com/gifs/c2myclQr76JZC)_

**Halloween is tomorrow! In celebration of, I wanna hear y'all's favorite horror-themed tracks and creepy tunes. Whether you wanna throw out a song that is specifically meant for Halloween or if ya know of a tune that just feels appropriately scary, the choice is yours. If you end up dropping a violent or particularly scary music video, please just leave a little content warning for those of us that are digging through the list to find music. By the way, this isn't the first time we've visited this theme, so if you wanna dig through the past version, you can find it [here](https://dev.to/music-discussions/music-monday-what-are-you-listening-to-halloween-edition--71). Alrighty, let's rock and ghoul!** 🎸🧟

![Thing from The Addams Family snapping it's fingers while sitting next to an old-school gramophone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfnmoelj19czz8xzr2jw.gif)

***

## How we do 

In this weekly series, folks can chime in and drop links to whatever it is they've been listening to recently + browse others' suggestions. You can follow the suggested genre if you'd like, but don't feel confined to it; you're free to suggest whatever you wanna. 🙌  

If you're interested in having other discussions about music, consider following the aptly named [#music discussions](https://dev.to/music-discussions) organization.

{% embed https://dev.to/music-discussions %}  

***

"And whosoever shall be found without the soul for getting down must stand and face the hounds of hell and rot inside a corpse's shell..." from MJ's Thriller. _Note: you can embed a link to your song using the following syntax `{% embed https://... %}`. This should work for most common platforms!_

Looking forward to listening to y'all's suggestions! 🎶
Testing Techniques
Published: 2023-10-30 08:56:55

1. Boundary values analysis
Boundary value analysis is one of the software techniques focuses on the testing values at the boundaries of valid input ranges
 example:
testing credit cards valid and expiry
credit issued and activated on month and year of 1/01/2023 and credit card expired on month and year of 1/01/2040
given input is 31/12/2022 = invalid
given input is 2/01/2040  = invalid
given input is 1/06/2030  = valid

2.Decision Table testing
Decision table testing is one of the software techniques used to check system behaves correctly under various conditions 
Example:
we are testing a login page that allows user to log in with a username and password. there are certain level of like guest, user and admin
conditions valid username(yes, no)  valid password(yes, no)
actions:
grand access

condition   valid username   valid password    grand access
case1           yes               yes               yes
case2           yes               no                 no
case3           no                yes                no
case4           no                no                 no

 3.User case testing
user case testing is a method of validating software functionality by testing real world user scenarios
Example:
 use case : search for product
test scenario1 : product search successful
test scenario2 : empty search query

4. linear code sequence and jump testing
it helps uncover defects in code flow and branching logic liner code sequences are uninterrupted sequence of code statement b/w jump instruction