teleren/devto huggingface dataset:
RTMP Server Development with Red5 Server Series: Capturing RTMP Traffic with Wireshark
Published: 2023-04-04 20:53:25

When you're developing any non-http application, it's necessary to capture traffic (in most cases) with a capture traffic tool like Wireshark, and if you're developing a RTMP server for an old Flash application, then you will find very useful tools of this type.

## Understanding how to use Wireshark to capture RTMP traffic

When I started to use Wireshark to record RTMP traffic, I found some useful information to capture RTMP traffic using Wireshark.

First, I found that usually, RTMP (Real-Time Messaging Protocol) is based on TCP (Datagram Delivery Protocol) as its transport protocol, which in most cases, uses Ethernet as its transport protocol. This information can be found in the [Wireshark's wiki](https://wiki.wireshark.org/).

Second, when I tried to capture RTMP traffic using the previous information in a Windows 11 device, I got a error message from Npcap like this:

![Npcap Error in Windows 11](https://user-images.githubusercontent.com/5597327/189107751-334ea763-cfdd-49a3-a59a-ee86a0376ff1.png)

This is when, while trying to find a fix for this error message on Internet, I found [this issue in the official Npcap repository](https://github.com/nmap/npcap/issues/628), which specifies this error message when using Wireshark in Windows 11 devices.

Moving forward in the issue's conversation, I reached [this comment](https://github.com/nmap/npcap/issues/628#issuecomment-1283568880), which describes that this issue is fixed when using Npcap 1.60 instead of lasts versions.

## References

1. [Real-Time Messaging Protocol (RTMP)](https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol)

2. [Transmission Control Protocol (TCP)](https://en.wikipedia.org/wiki/Transmission_Control_Protocol)

3. [Using Npcap 1.60 to capture RTMP traffic in Windows 11](https://github.com/nmap/npcap/issues/628#issuecomment-1283568880)
[React] Render Props Pattern
Tags: react, frontend, webdev, javascript
Published: 2023-04-04 20:44:37

### What is render props pattern? Understand this powerful React pattern.

With the Render Props pattern, we pass *components* as props to other *components*.

The *components* that are passed as *props* can, in turn, receive other *props* from that parent *component*.

*Render props* make it easy to reuse logic across multiple components.

### Implementation

If we wanted to implement an input with which a user can convert a Celsius temperature to Kelvin and Fahrenheit, we can use the **renderKelvin** and **renderFahrenheit** render props.

These *props* receive the input value, which they convert to the correct temperature in K or °F.

```jsx
function Input(props) {
  const [value, setValue] = useState("");

  return (
    <>
      <input value={value} onChange={(e) => setValue(e.target.value)} />
      {props.renderKelvin({ value: value + 273.15 })}
      {props.renderFahrenheit({ value: (value * 9) / 5 + 32 })}
    </>
  );
}

export default function App() {
  return (
    <Input
      renderKelvin={({ value }) => <div className="temp">{value}K</div>}
      renderFahrenheit={({ value }) => <div className="temp">{value}°F</div>}
    />
  );
}
```

### Benefits

1. **Reuse**: Since render props can be different every time, we can make components that receive render props highly reusable for multiple use cases.
2. **Separation of concerns**: We can separate the logic of our application from the rendering components through render props. The stateful component that receives a render prop can pass the data to stateless components, which only render the data.
3. **Solution to HOC problems**: Since we pass props explicitly, we solve the problem of implicit props from HOCs. The props that need to be passed to the element are all visible in the render prop's argument list. We know exactly where certain props come from.

### Drawbacks

1. **Not as necessary with hooks**: Hooks have changed the way we can add reuse and data sharing to components, which can replace the render props pattern in many cases. However, there are still cases where the render props pattern can be the best solution.

<br/>

Comment below if you knew about this pattern and if you use it in your daily work!

<br/>

#### Did you like it? Check out other articles written by me: 
[Understanding closures](https://www.vequiato.dev/blog/understanding-closures-h2b/245969)
[Understanding classes and prototypes](https://www.vequiato.dev/blog/understanding-classes-and-prototypes-5hhf/245484)
[Understanding Higher Order Function](https://www.vequiato.dev/blog/understanding-higher-order-function-1dlg/250804)
Patching and Pretending
Tags: opensource, programming
Published: 2023-04-04 01:33:40

## This week in Starchart

Here is my weekly run down of developments on my end to do with the [Starchart](https://github.com/DevelopingSpace/starchart) project which is an open source project that has long since been renamed My.Custom.Domain (which I will not be calling it, because we are astronomers here) for students at Seneca College to be able to hone their skills while also delivering a website that can be used to generate certificates for some domains that might not be https for some reason *cough* load balancers *cough*.

This past week I worked on an issue to mock users if you are part of the admin group (the chosen few) and that can be found [here](https://github.com/DevelopingSpace/starchart/pull/466). It was not the biggest code change but it was so dizzying trying to keep track of what I was dealing with between the session, the root loader and the database especially after I looked away from the project and focused on something else entirely, often written in a different language. This last week rolling into this one has given me a different perspective on focus as a finite resource with how many different directions I seem to be pulled in.

It was also brought to my attention shortly after my code landed that staging was broken and David had already had the problem pretty well figured out so I dropped what I was doing to put in a small PR to change the undefined value that was causing us problems to a null value since null is valid in Java Script Object Notation. [The Fix](https://github.com/DevelopingSpace/starchart/pull/501) marked Starchart's 1st PR past 500!

## Looking forward
Today marks a new beginning and the last week before we get going on Alpha for Starchart, as such we had a stand up where we took a look at every one of the open issues, even the ones we have already assigned and redistributed them more evenly, as well as highlighted the immediate tasks to take care of in this final sprint. 

Now that we are just pre-alpha we are also going to start bringing in more collaborators to begin testing our work without instruction to see if what we have created is friendly for new users.
Pollux - Text Assistant
Published: 2023-04-04 20:30:58

Yes, I know, everywhere you look, there's a new magical thing going on with AI. But hey, it's okay. Two years ago, it was the same with crypto, but let's be honest, there weren't a lot of practical approaches as with AI and the GPT fever.

Having said that, and with my consciousness haunted by FOMO and excitement, I have created this Chrome extension. It's called Pollux and is very practical and easy to use. The API was built in python fastAPI framework and deployed on a DigitalOcean machine. [Here is the link to install it.](https://chrome.google.com/webstore/detail/pollux/pfnjnoljecfpnjenjijncmdgmpmhnfhb)

Here are some interesting use cases:

Use case 1: Suppose you are reading an article on any subject you like (news, blogs, newsletters, etc.) and you come across a paragraph you don't understand or a complex concept. You select it, right-click on the Pollux extension, and choose to explain the selected text as if you were 5 or 12 years old. You can even translate the explanation to other languages.

{% embed https://www.youtube.com/watch?v=M7oKhRadThY&ab_channel=pollux-dev %}


Use case 2: You select all the text of an article and make a summary in 5 bullet points, 3 tweets, etc. You can choose the format, language, and style.

{% embed https://www.youtube.com/watch?v=kS5v0B1k0X4&t=1s&ab_channel=pollux-dev %}


So, that's it. I hope you find this useful. It will probably become obsolete in a few days given how fast things are changing, but it was fun anyway.
Level Up TS: Dynamically Extend Interfaces with Generics
Tags: typescript, javascript, webdev
Published: 2023-04-04 20:13:21

With Typescript you can define what kind of interface or type a function should expect to take in as an argument. This allows you gain control over your application as to what your function will take in or reject.

```ts
interface Pet {
  name: string;
  weight: number;
  age: number;
}

function myPet(pet: Pet) {
  // do something with pet
}
```

What if we have more specific types for pets like birds or cats?

```ts
interface Pet {
  name: string;
  weight: number;
  age: number;
}

interface Bird extends Pet {
  wingspan: number;
}

interface Cat extends Pet {
  furType: string;
}

function myBird(bird: Bird) {
  // do something with bird
}

function myCat(cat: Cat) {
  // do something with cat
}
```


What if we want to combine `myCat` and `myBird` so there is just one function?

```ts
interface Pet {
  name: string;
}

interface Bird extends Pet {
  wingspan: number;
}

interface Cat extends Pet {
  furType: string;
}

// T refers to either Cat or Bird interfaces
function myPet<T extends Pet>(pet: T) {
  // do something with extended pet
  // pet can either be of type Bird or Cat 
}

const cat: Cat = {
  name: 'Snowball 2'
  furType: 'short'
}

const bird: Bird = {
  name: 'Tweety'
  wingspan: 12
}

// both are now accepted objects to pass into the same function
myPet(cat)
myPet(bird)
```

Here we have learned how to make Generics work for us to implement DRY into our application reducing duplicate code.

Thanks for reading!
Javascript map() vs forEach()
Tags: beginners, tutorial, javascript, flatironschool
Published: 2023-04-04 16:26:05

During the course of working with Arrays specifically the need to iterate through them will be inevitable. Thus we have the for loop which to me seems like its married to arrays. 

Then I learnt that arrays in JavaScript has methods and these methods included the likes of the map() method and the forEach() method these are both used to iterate over an array. However they were both so similar so they had me confused at first as to why are both these methods made to do the same thing.


Then I realized the difference is that the map() method has a return while forEach() does not, not only that but the map() method also allocates memory to store it's return while it iterates over the original array, forEach() does not do this it always returns nothing (undefined).

## map()

_This is an example of how map() works:_`
const numbers = [10, 20, 30, 40, 50];
const doubleNumbers = numbers.map((number) => number * 2);
console.log(doubleNumbers);`

_the code returns an array looking like this:_`
(5) [20, 40, 60, 80, 100]`

So above we see that the map() code creates an array of the doubled values of the original array numbers which is then allocated to doubleNumbers.

## forEach()
_While this is how forEach() works:_`
const numbers = [10, 20, 30, 40, 50];
numbers.forEach((number) => console.log(number * 2));`

_the forEach() code will output:_`
20
40
60
80
100`

We then use the forEach() method to iterate over the same numbers array and double each item plus logging in to the console. 

## ..
Neat! right no for-loops needed. To make this even more interesting we could use the forEach() method to accomplish the same results as the map() just by adding a few lines of code:
`
const numbers = [10, 20, 30, 40, 50];
const doubleNumbers = []
numbers.forEach((number) => doubleNumbers.push(number * 2));
console.log(doubleNumbers);`

_result:_`
(5) [20, 40, 60, 80, 100]`

There you go in the end they both have there purpose.Hope this helps. Good luck with JavaScript!!.
How to send date with time in req.query parameter in Postman API hitting using Nodejs Technology
Published: 2023-04-04 20:05:28

Hope everyone is fine there!
I am working on an e-commerce website. There is a collection named as transactions which stores the data of transactions.
I would like to filter the transactions based on date.
However, when I put the date in the as query param in the url, it gives me an error stating: 
_`**(const castError = new CastError();
                    ^

CastError: Cast to date failed for value "2024-04-03T19:00:00.000 00:00" (type string) at path "date" for model "Transaction").**`_
I would like to have a solution for this.
The postman API hitting is in the following image.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd2uvbqg0gwf68995sqn.png)
Failing Tests, Write to Fail and Fix
Tags: testing, programming
Published: 2023-04-04 19:53:59

Failing tests are an essential tool in software development. They are written to fail and their main purpose is to indicate that a feature or functionality in the software is not working as expected.

Failing tests are created before fixing a bug, and they help developers identify the root cause of the problem. Once the issue has been resolved, the test is expected to pass, indicating that the issue has been fixed successfully.

## How Write a Failing Test
The process of writing a failing test is relatively simple. First, the developer writes a test that checks for the expected behavior of the code. Next, the test is run, and it is expected to fail since the code has not been written yet. Once the test has failed, the developer can then proceed to write the code that will make the test pass.

## Real Case
For example, lets imagine we have a table of users in a web platform.

This table render three columns of information:
- name
- lastname
- email

and, when clickin in a row must redirect to the user detail.

![user table draw with columns](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjtvccr239av3ltxda58.png)

The prolem is when clickin in the row it is not redirecting. So, your failing test will:

- check the render of table
- can assert the column values
- can assert the row values
- and assert when clicking in the row it will redirect to the right route

Then, when running the test will fail and you will be able to fix it having a test already existing for the expect solution.

## Conclusion
By finding a mistake/error/fail in the code and designing its failing test, it will be much faster to find the solution. Instead of trying to solve with n solutions and testing in the browser or wherever, you will have your test responsible for this, automating the process and saving time in the solution.

As a bonus that scenario will be covered for next steps and improvements in your code.

---

If you want to work in a startup in its early stages, This  is your chance. [Apply today!](https://woovi.com/jobs/)

---

[Woovi](https://woovi.com/) is a Startup that enables shoppers to pay as they please. To make this possible, Woovi provides instant payment solutions for merchants to accept orders.

---

Photo by <a href="https://unsplash.com/@talhahassan116?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Talha Hassan</a> na <a href="https://unsplash.com/pt-br/fotografias/wdBqEHzo39g?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Why Vets Who Code is Becoming an AI-Powered Nonprofit
Published: 2023-04-04 19:40:29

---
title: Why Vets Who Code is Becoming an AI-Powered Nonprofit
published: true
description: 
tags: 
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/86i7hkdd6sa7yoe6sfc1.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2023-04-04 19:31 +0000
---

Recently, we announced that we are becoming an AI-powered nonprofit. Our organization incorporates AI technologies into its programs and operations to enhance its impact and better serve our community.
So, why is VWC becoming an AI-powered nonprofit? There are several reasons.

##Improving Training Programs

First, AI can help the organization improve its training programs. By analyzing data on how veterans learn and progress through the program, VWC can better tailor its curriculum to meet their needs. This can help veterans complete the program more efficiently and tremendously successfully.
For example, by analyzing the performance data of troops while leveraging the GitHub API, we can identify their strengths and weaknesses, which can be used to develop personalized learning plans that meet their individual needs. Additionally, we can use AI to analyze industry trends and identify the most in-demand skills in the tech industry. This information can be used to update the training curriculum to ensure veterans have the skills employers seek.

##Tracking Outcomes

Second, AI can help us better track the progress and outcomes of its participants. By analyzing data on job placements, salaries, and other metrics, we can better understand the impact of its programs and make adjustments to improve them. This can help the organization demonstrate the effectiveness of its programs to donors and other stakeholders. In our goal to start serving 2500 veterans and military spouses a year, this will be very important to our scaling.
For example, we can use AI to analyze data on job placements and salaries of its participants. By doing so, we can identify the most successful job placement strategies and adjust its training programs accordingly. Additionally, we can use AI to analyze data on the impact of its training programs on the participants' lives. This information can be used to develop data-driven stories demonstrating our programs' effectiveness to donors and other stakeholders.

##Streamlining Operations

Finally, AI can help us streamline our operations efforts. As a lean organization with only one contractor, with both directors being volunteers, this frees up our time and resources to focus on more strategic initiatives by automating specific tasks, such as veteran outreach and grant applications.

In conclusion, our decision to become an AI-powered nonprofit is an intelligent move to help the organization enhance its impact and better serve our community. By leveraging AI technologies, we can improve our training programs, track outcomes more effectively, and streamline operations. We will be using AI to drive positive change and make a difference.
My journey from Web Dev to Web 3.0 Dev - Part 3
Tags: web3, blockchain, frontend, devjournal
Published: 2023-04-04 19:35:39

Hey everyone!

I have some exciting news to share with you all. I recently managed to land a job at a fantastic Web3 company called Halborn as a Frontend Developer! While I'm not working directly with blockchain and smart contracts, I'm utilizing my skills to build amazing Web3 websites for the company.

## 🏢 About Halborn

{% embed https://twitter.com/HalbornSecurity/status/1641470842914709504
 %}


Halborn is a cybersecurity company that protects blockchain organizations from cyber attacks. As a third-party partner, Halborn continuously assesses an organization's most vital assets, drives maximum automation, and provides world-class cybersecurity consulting and execution every step of the way - far beyond smart contracts.

## 🌐 My Work at Halborn

I've been involved in several exciting projects since joining the team. Some of the websites I've been working on include:

- **Halborn's main website** ([halborn.com](https://www.halborn.com)): This is the company's primary website, where you can find information about their services, team, and more.
- **Seraph** ([seraph.co](https://www.seraph.co)): A blockchain security notary platform that aims to build trust and transparency in the blockchain ecosystem.
- **Ziion** ([ziion.org](https://www.ziion.org)): A blockchain security testing and development solution that helps organizations ensure the safety and reliability of their smart contracts and other blockchain applications.


![Website preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4j007pms7lgvbrz5lv4.png)



## 📚 Slowing Down Web3 Studies

Although I'm still passionate about studying Web3, I've decided to slow down my studies for now to give my best in this new job. I believe this opportunity at Halborn will help me grow and expand my skills in the Web3 space, even if I'm not directly working with blockchain and smart contracts.

## 🤖 Pivoting Towards Prompt Engineering

Another exciting change in my career path is my interest in becoming a Prompt Engineer. I'm looking forward to learning the best ways to use AI to build innovative projects and develop my expertise in this field.

## 🌟 The Future

This new journey at Halborn is just the beginning, and I'm thrilled to see where it leads me. I'll keep you all updated on my progress, learnings, and any new projects that come my way.

As always, make sure to follow me on my blog and social media to stay updated on my journey:

[Twitter](https://twitter.com/HeyMarkKop) | [Linkedin](https://www.linkedin.com/in/marcelo-kopmann/) | [Github](https://github.com/Markkop)

Until next time!

{% embed https://twitter.com/HeyMarkKop/status/1602468831498276869
 %}
Where you should look for jobs after high school in India?
Tags: career, jobs, employment, india
Published: 2023-04-04 19:27:40

As a fresher candidate, you are searching for jobs after high school from last few days as per your eligibility status. The current job market, which seems a significant starting point, but has discouraged you.

Even the position advertised by recruiters isn’t what you need. You either find the competition challenging enough to beat, or the interview process is much harder than you expected.

There are more reasons to debate and discuss. However, if one is really serious to come up with a solution, then options are also limitless for them.

## Where you should look for jobs after high school in India?

1- **Government Jobs:** The Indian government offers a wide range of job opportunities for candidates who have completed their high school education. You can visit an official website like employmentnews.gov.in to find out about current openings in hindi and english language.

2- **Private Sector:** Many private companies in India also offer entry-level jobs to candidates who have completed their high school education. You can check online career portals such as Naukri.com, MonsterIndia.com, and Indeed.co.in.

3- **Apprenticeships:** Apprenticeships are a great way to get hands on experience in a particular field while earning a stipend. Many companies and organizations offer apprenticeships for high school pass candidates. You can search for such opportunities on govt portal like apprenticeship.gov.in.

4- **Skill Development Programs:** There are several skill development programs run by the government and private organizations that can help you gain the necessary skills to find a best career opportunity. Some of these programs offer placement assistance. You can check out nsdcindia.org or skillindia.gov.in for current information.

5- **Freelancing:** If you have a particular skill or talent, you can consider freelancing. Freelancing platforms such as Upwork, Freelancer, and Fiverr offer a wide range of opportunities for people with unique skill sets. You only need to register an account with them to start your work.

## Conclusion
In summary, there are various options available for high school pass candidates to explore opportunities in India, including government and private sector jobs, apprenticeships, skill development programs, and freelancing.

It is a well-known fact that every sector demands qualified individuals. It is important to identify your abilities, interests, strengths and weaknesses to try your luck with these career opportunities.

Additionally, you can take help from [kaise online blog](https://www.kaiseonline.com/), which provides comprehensive information about government jobs after high school - and you can apply to those job notifications that are recently announced by recruitment boards in India.