teleren/devto huggingface dataset:
Calculate the sum of squares of given input of numbers
Published: 2023-02-26 16:42:49

OBJECTIVES:

1. Create the algorithm in a flow chart

2. Create pseudo code

PSEUDOCODE

Read num;
Set Sum=0;
For (set Counter = 1 ; Counter<num+1; Counter++){

Sum+= Counter * Counter;

}
Print Sum;

Flow Chart

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


CODE (Javascript)
//Assuming we are using 4 as the value//
let  num =4;
let sum=0;
for (let i = 0; i < num+1; i++) {
  sum += i * i ;
}
return sum;
Inheritance in Solidity
Tags: ethereum, solidity, web3, blockchain
Published: 2023-02-26 16:42:39

>Solidity supports inheritance between smart contracts, where multiple contracts can be inherited into a single contract.

Solidity supports inheritance between smart contracts, where multiple contracts can be inherited into a single contract. There are four types of inheritance in Solidity: single, multi-level, hierarchical, and multiple. Single inheritance is when one contract is inherited by another contract. Multi-level inheritance is similar to single inheritance but has levels of the relationship between the parent and child. Hierarchical inheritance is when a parent contract has more than one child contract. Multiple inheritances is when a single contract inherits from multiple contracts at the same time. 

Developers can extend a contractor's attributes and properties to their derived contracts using Solidity's inheritance feature. They can also modify these aspects in the derived contract via a process known as overriding. A derived contract can access all non-private members including internal methods and state variables. However, using this is not allowed. In case of multiple inheritances, function call using super gives preference to the most derived contract. 

Solidity constructors are optional. If not set, contracts have a default constructor. Developers can indicate constructor arguments in two ways. Inheritance marks several associated contracts with a parent-child relationship. Solidity inheritance rules highly resemble Python but have some differences.

One of the most fundamental characteristics of the object-oriented programming language is the concept of inheritance. Using it to enhance the functionality of a program helps to isolate the code, eliminates dependencies, and increases the reusability of the already existing code. Solidity allows for the inheritance of smart contracts between themselves, with many contracts being able to be inherited into a single contract. 

The contract from which other contracts inherit features is referred to as the base contract, and the contract from which the features are inherited is referred to as the derived contract. They are referred to as "parent-child contracts" to put it simply. Unlike other programming languages, inheritance in Solidity is restricted to public and internal modifiers only. Some of the most notable aspects of Solidity are as follows:

- In addition to state variables and internal methods, a derived contract has access to all other non-private members of the contract. However, it is not permitted to do so.

- Overriding functions are permitted as long as the function signature remains unchanged.

- The compilation will fail if the output parameters are different from the input values.

- The function of a super contract can be accessed through the use of a super keyword or the name of the super contract.

- When there are numerous inheritances, function calls made with the super keyword give preference to the contracts that are the most deprived.

For more content, follow me at - https://linktr.ee/shlokkumar2303
Testing Webhooks Locally Just Got Easier
Tags: webhooks, programming, productivity, devtools
Published: 2023-02-26 16:34:01

Testing webhooks locally has been quite a pain for me. 

In the past I've used [Cloudflare tunnels](https://dev.to/hacksore/share-your-localhost-with-cloudflare-tunnels-43c9) to forward real webhook requests to my local server. Despite that approach working it leaves much to be desired from a developer experience standpoint. 

Some tools like [stripe CLI](https://stripe.com/docs/webhooks/test) will give you a better experience for their webhook development but that does not solve all of your webhook needs from different providers.

There is a pretty awesome solution though!
![loki](https://media.tenor.com/IxdUslcWb40AAAAd/loki-tell-me.gif)

The people from [Ping Labs](https://ping.gg/) have built a very nice tool for this called [webhookthing](https://webhookthing.com).

### How does it work?
It uses JSON files on your file system to dispatch requests to your server.

### Getting started
To get started with webhookthing you just need to create a `.thing/hooks` directory.

The next step is to create a new file in the `.thing/hooks` directory, let's say `example.json`.

```json
{
  "hello": "world"
}
```

Now you can start webhookthing with `npx webhookthing@latest` and it will start the web UI and load all of your webhooks.

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

Make sure you have your webserver running then dispatch the webhook payload we created by clicking the play button.

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

Voilà! We now have a very convenient way to test webhook payloads.

### Benefits
- 🔧 Super simple to configure and maintain
- 👨‍💻 Version & share the payloads in source control
- 🌎 No need for internet access to test your webhooks
- 🎨 Nice UI to manage, test, and execute payloads

If you want to see a demo check out [this repo](https://github.com/Hacksore/webhookthing-example) I put together.

Feel free to leave your comments on what you think about the tool and if there is anything I can clarify.

### Resources
- [webhookthing.com](https://webhookthing.com)
- [webhookthing docs](https://docs.webhookthing.com)
- [webhookthing issues](https://github.com/pingdotgg/sample_hooks/issues)
- [Demo repo](https://github.com/Hacksore/webhookthing-example)
[Windows] Installing OpenSSL
Tags: openssl
Published: 2023-02-26 16:26:28

## Getting tools and sources
To install OpenSSL, I have to build it from source.
I can get the source from its GitHub repository.

* [openssl - GitHub](https://github.com/openssl/openssl)

```
git clone https://github.com/openssl/openssl.git
```

To build it, I need install Visual Studio(and components for C++ Desktop Development), Perl and NASM.


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

I installed Visual Studio Community 2022, Strawberry Perl, and NASM.

* [Visual Studio Community](https://visualstudio.microsoft.com/ja/vs/community/)
* [Strawberry Perl for Windows](https://strawberryperl.com/)
* [NASM](https://www.nasm.us/)

Most of the installation steps are described in the documentation.

* [Notes for Windows platforms - openssl - GitHub](https://github.com/openssl/openssl/blob/master/NOTES-WINDOWS.md)

However, there are two things to note.

### 1. Should not use the default installed Command Prompt or PowerShell

I must use the "x64 Native Tools Command Prompt for VS 2022" installed with Visual Studio.
Otherwise I will get errors on executing "nmake".

### 2. Execute "nmake install" as Administrator

I must execute "nmake install" as Administrator to avoid permission denied.

Now I can execute OpenSSL commands.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmvk44kd5qs6pm003z6e.png)
Send email using reactjs
Tags: react, javascript, emailjs, webdev
Published: 2023-02-26 16:04:15




Create a React.js application using either Create React App or by setting up a React project manually.

Install the emailjs-com package by running the following command in the terminal:

`npm install emailjs-com`

Import the emailjs-com package in your React component where you want to send the email:


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

Initialize Email.js by providing your Email.js user ID. This ID can be obtained by creating a free account on the Email.js website.

**[Emailjs.com](https://www.emailjs.com/)**

A quick and simple way to get a good understanding of EmailJS is to follow our "Contact Form" tutorial that covers all the fundamentals of EmailJS.

Create a function in your component to send the email. The function should use the send method provided by the emailjs-com package and pass the necessary parameters such as the service ID, template ID, template parameters, and callback function.


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

Now we can implement Regex Form validation.

To add regular expression (regex) validation to your email sending form in React, you can use JavaScript's built-in RegExp object to match the input data against a pattern. 

If the input data does not match the pattern, you can display an error message to the user. Here's an example:


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

For Validation:

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

Emailjs Dashboard:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thyqg37owk1d9eprqjb4.PNG)

Email message:

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

Source will be available on : https://github.com/erajamanickam/how-to-sent-email-in-reactjs-using-emailjs

Live demo : https://how-to-sent-email-in-reactjs.vercel.app/

Watch on video : https://youtu.be/W4JUdgR8a0E
Boove
Tags: javascript, bot, bottingpanel, html
Published: 2023-02-26 15:48:58


An advanced, open sourced and easy to use botting panel that makes minecraft and discord bot and host them on your pc, giving you full control over everything.
**Now availabe with discord rich presence**

The minecraft bot features a lot of functions out of which mainly the popular ones are

- **AI Farming** (exclusive, made by us)
- **AI player following**
- **PvP**
- Full inventory management

Both x86 and x64 versions are available and linux support will be added soon

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7d346e6tfs5xcvr1vs4y.PNG)

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4j0gw0ubyhio2xsiirh9.PNG)

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wpf6wu0cj2hqgjbo5bt7.PNG)
What If You Would Marry a Programming Language
Tags: jokes, webdev, programming
Published: 2023-02-26 15:38:50

> What if programming languages were human and you could marry them? What could you expect in relationships like that? This is what I think it would be like to live with four of the most known programming languages.

## In the Kitchen

**Java**: 
A good baker following recipes in detail, but will need an apron, food processor, colander, steak hammer and a cork screw to even make a sandwich.

**JavaScript**: 
JavaScript doesn't care if the only ingredients you have at home is chocolate sauce, canned tuna and some potato peels from the sink, it's fine to combine!

**Python**: 
Python gladly accepts any meal request you have and lets C prepare it for you.

**C++**: 
C++ makes sure you have whatever utensil you may need, but don't expect any help cooking the food. And don't you dare buying meat that is already minced, that's not why C++ bought you that meat grinder!

![Too much potato meme](https://www.perssondennis.com/images/articles/what-if-you-would-marry-a-programming-language/potato-peel.webp)
_What's not to like? Chocolate good. Tuna good. Potato peel..._

## In the Bedroom

**Java**: 
Just bring the necessary tools and Java can run anywhere. No need to keep it inside, it works just as fine outside the windows.

**JavaScript**: 
JavaScript doesn't understand the importance of foreplay, it believes it can get you ready during the act and finish just in time.

**Python**: 
Can probably give you what you want, otherwise it works perfectly to invite a third party.

**C++**: 
Do I really need to say anything more than that C++ has made a great reputation from being quick?

## First Meeting With Family

**Java**: 
Don't be fooled by your great connection with Java, if your parents aren't the right types, Java will refuse to meet them.

**JavaScript**: 
Even though there are other ways, JavaScript is most comfortable when meeting your family over the internet.

**Python**: 
There's a great chance your parents will like Python. Unfortunately, there's a risk they may find Python being quite slow.

**C++**: 
There's no chance your parents will get C++ from start, they will for sure be some misunderstandings.

{% embed https://dev.to/perssondennis/react-anti-patterns-and-best-practices-dos-and-donts-3c2g %}

## Mental Connection

**Java**: 
Old and reliable but quite boring. You know Java is always there for you but can be rather grumpy if you don't follow its rules and conventions.

**JavaScript**: 
Acceptive, versatile and will always introduce you to new friends. If you do something wrong, JavaScript won't let you now, you will have to find that out on your own.

**Python**: 
Nice to communicate with, easy to read and will always try to get rid of all the garbage in your life.

**C++**: 
If you want the smartest tool in the shed, C++ is a good choice. But don't complain if it doesn't listen to you, it's probably your fault it's having memory leaks.

## What About You?

What programming language would you marry? What is so good with it?

{% embed https://dev.to/perssondennis %}
Display current time
Tags: webdev, javascript, beginners, tutorial
Published: 2023-02-26 15:31:00

```
/**
 * display current time (hours, minutes and seconds)
 */
```

In this challenge, we are tasked with creating a clock that displays the current time in hours, minutes, and seconds. This can be achieved with the help of JavaScript's built-in Date object and setInterval method.

The `Date` object allows us to retrieve the current date and time information from the user's device. The toLocaleTimeString method returns a string representation of the time in a local format. For example, if you're in the US, it might return something like "11:23:45 AM".

The `setInterval` method is a JavaScript function that allows us to repeatedly call a function at a specified interval, in this case, every second. This means that our clock function will log the current time to the console every second.


### Solution: 

```js
const clock = () => {
  return setInterval(() => {
    let date = new Date();
    let time = date.toLocaleTimeString();
    console.log(time);
  }, 1000);
};
clock();

```
In this code, we first create a clock function that returns a call to setInterval. Inside the setInterval function, we create a new Date object, retrieve the local time string representation, and log it to the console.

Finally, we call the clock function to start the clock. And that's it! Now, every second, the current time will be displayed in the console.

```
/*Result:
11:04:03 AM
11:04:04 AM
11:04:05 AM
.
.
.
*/
```

While this solution is simple and straightforward, it's just the tip of the iceberg when it comes to working with dates and times in JavaScript. Whether you're building a clock, a calendar, or a scheduling application, there are many advanced techniques and tools to help you achieve your goals. So don't be afraid to dive deeper and explore all that JavaScript has to offer!
Como Integrar ChatGPT + SAP
Tags: sap, api, odata
Published: 2023-02-26 15:24:17

ara conectar o ChatGPT ao SAP, você pode seguir os seguintes passos:

1. Determine o tipo de integração necessária: o SAP é um sistema complexo com várias funcionalidades e módulos. Determine qual é o objetivo da integração com o ChatGPT para definir os requisitos específicos.

2. Selecione a plataforma de chatbot: existem várias plataformas de chatbot disponíveis, incluindo Dialogflow, Botpress, Microsoft Bot Framework e outros. Escolha a plataforma que melhor atenda às suas necessidades e habilidades.

3. Configure o chatbot: uma vez que você escolha a plataforma de chatbot, configure-o para atender às necessidades de integração. Configure a lógica do chatbot e suas ações, assim como as APIs e integrações que serão usadas para conectar o chatbot ao SAP.

4. Configure a integração com o SAP: utilize as APIs do SAP para conectar o chatbot. As APIs mais comuns são as APIs REST e OData. As APIs permitem que o chatbot se comunique com o SAP para realizar ações específicas, como consultar dados, criar pedidos, verificar status, entre outros.

5. Teste a integração: teste a integração para garantir que tudo está funcionando conforme o esperado. Verifique se as respostas do chatbot estão corretas, se as ações do SAP são realizadas corretamente, e se o fluxo de conversação está de acordo com o esperado.

6. Implemente o chatbot: após o teste, implemente o chatbot em um ambiente de produção. Teste novamente para garantir que tudo está funcionando corretamente.

7. Monitore e atualize: monitore o chatbot para garantir que ele está funcionando conforme o esperado e atualize-o conforme necessário para garantir que ele permaneça relevante e eficaz.

Esses são os passos básicos para conectar o ChatGPT ao SAP. É importante lembrar que a integração pode ser complexa e pode exigir habilidades específicas de desenvolvimento. Se necessário, busque a ajuda de um desenvolvedor ou consultor experiente em integração de sistemas.
O futuro dos negócios na linha de código dos desenvolvedores
Published: 2023-02-26 15:20:41

Quando falamos de desenvolvedores (ou devs), estamos tratando de uma profissão que ganhou força recentemente no mercado de tecnologia, que viram nos códigos e nas linguagens de programação - como HTML, CSS, SQL, Python, Java e C#, entre outras - uma forma de criação e de comunicação universais. Foi a partir das linhas de códigos escritas por eles que grandes revoluções digitais transformaram a indústria de software de maneira irreversível.


O motivo do sucesso desta profissão não é uma surpresa. Desenvolvedores são as mentes criativas por trás não apenas da programação de sistemas e apps, mas também da identificação de demandas por inovação e da tradução de objetivos de negócios em produtos ou serviços. Estes profissionais estão revolucionando diferentes indústrias, do entretenimento ao transporte, da agricultura ao mercado financeiro. A tecnologia impactou todos os mercados, e os desenvolvedores foram o pilar fundamental desta transformação.


Reconhecida como uma das profissões mais promissoras do século 21, os desenvolvedores são agora peça essencial para o sucesso de empresas de tecnologia, das startups às gigantes internacionais. Somadas às empresas mais tradicionais, que dão agora seus primeiros passos em direção à digitalização, a caça por talentos na área tem se tornado acirrada.


Se sua empresa é baseada em tecnologia, sente cada vez mais a pressão da velocidade de entrega e de atualizações constantes. Em consequência, a necessidade de atrair os melhores profissionais escala exponencialmente. Mas, o que torna uma empresa uma opção atraente para desenvolvedores trabalharem e crescerem profissionalmente?
Catch up on JavaScript: Cookie-es, TW Classed, Devalue, and more
Tags: javascript, webdev, beginners, github
Published: 2023-02-26 15:00:00

![Photo by Tim Mossholder on Unsplash](https://cdn-images-1.medium.com/max/16384/0*j5_4FPJDrdeawCiV)

## [Cookie-es](https://github.com/unjs/cookie-es)

Hell freezes over before we get the easy native way of manipulating cookies. But if you need to pick something, I recommend this less than 1kb (min + gz) alternative for the most popular js-cookie.

![[https://github.com/unjs/cookie-es](https://github.com/unjs/cookie-es)](https://cdn-images-1.medium.com/max/2400/0*-_gVNW5YkxWXgj8H)

## [TW Classed](https://github.com/sannajammeh/tw-classed)

TW Classed lets you create a primitive component on top of the [Tailwind CSS](undefined) but in a variant-oriented way. Produced components are type safety.

![[https://github.com/sannajammeh/tw-classed](https://github.com/sannajammeh/tw-classed)](https://cdn-images-1.medium.com/max/2400/0*edFgXfMf1njMAlj6)

## [Devalue](https://github.com/Rich-Harris/devalue)

JSON serializer that supports more Maps, Sets, and BigInt. JSON spec should catch up with the development of the specification. Such libraries shouldn’t be needed but here we are.

![[https://github.com/Rich-Harris/devalue](https://github.com/Rich-Harris/devalue)](https://cdn-images-1.medium.com/max/2400/0*VjoR-FjV48W_VIfi)

## [Nextra](https://github.com/shuding/nextra)

Docusaurus has serious competition in React world. Nextra is fast, based on the next.js documentation generator. I’m using it personally and cannot recommend it more.

![[https://github.com/shuding/nextra](https://github.com/shuding/nextra)](https://cdn-images-1.medium.com/max/2400/0*N5hxZzA8ak7xFZH_)

## [react-resizable-panels](https://github.com/bvaughn/react-resizable-panels)

react-resizable-panels let you create sidebars or split views a delightful experience. Easy to use with tons of customization options.

![[https://github.com/bvaughn/react-resizable-panels](https://github.com/bvaughn/react-resizable-panels)](https://cdn-images-1.medium.com/max/2400/0*fqFjx-DGEmEr87gw)

Please react to this post or leave a comment and let me know what you think. Check [my Twitter](https://twitter.com/marcin_codes) where I post these libraries daily.

## Stay up to date with my writing

You can stay up to date by following me in one of these ways:

* Follow me on [Medium](https://medium.com/@marcin-codes)

* Follow me on [Twitter](https://twitter.com/marcin_codes)

* Follow me on [Dev.to](https://dev.to/marcin_codes)

* Follow me on [Mastodon](https://mas.to/@marcin_codes)

* Add [my blog](https://marcin.page/) to the [RSS feed](https://marcin.page/feed.xml) reader