teleren/devto huggingface dataset:
Dummy open-source: one command to test your API before it’s even built
Tags: go, programming, testing, opensource
Published: 2022-03-18 11:41:57

When our Golang developer, Alexander Melentyev, was working on one of our client’s projects, he had to work on integrations with the partner’s API. During the integration, we didn’t want to pull the real API, so there was a need use mock data to test API. The partner had an openAPI specification, on the basis of which it was possible to generate a server using swagger-codegen, but such tools have a nuance — they generate stubs, meaning that if you follow the “handle” from the specification, you will get an empty response, and you will need to write it yourself.

[So we created dummy,](https://evrone.com/dummy) a very useful and in-demand tool that can help launch a mock server based on an API contract, which helps people see how the API will work before it’s even built. You can run it locally with the dummy server command to run your API on an HTTP server that you can interact with.
NEXTJS: getServerSideProps not working into components
Tags: nextjs, react, javascript, beginners
Published: 2022-03-18 10:07:45

Hey, Guys! 

This is Kenn here, from CodeWithKenn.
From today, you'll be seeing many React/Next/Gatsby related bugs solved, just decided to add a kind of bugs Documentation style.

Because, I ended up searching for the same bugs after months (I don't remember what the solutions were). So, I decided to start documenting it here on Dev.to

This helps me to save some time and be more productive.

So, Feel free to follow if you're interested! Peace ;)


# Bug Info
`NEXTJS: getServerSideProps not working into components`


# Bug Solution


You cannot use **`getServerSideProps `**in non-page components.

**`getServerSideProps `**can only be exported from a page. You can’t export it from non-page files.

👉 [More Details](https://nextjs.org/docs/basic-features/data-fetching#only-allowed-in-a-page-2)




# Let's Connect

- [Twitter](https://twitter.com/KennKibadi) 
- [Github](https://github.com/KennStack01) 
- [LinkedIn](https://www.linkedin.com/in/kennkibadi/) 
- [Instagram](https://www.instagram.com/codewithkenn_/) 
- [Facebook](https://www.facebook.com/Code-With-Kenn-104376625415201)
- [See My Bio Link](https://www.bio.link/IamKenn)



Want to start blogging?  🔥[Join NOW!](https://hashnode.com/@CodeWithKenn/joinme)
What is TypeScript
Published: 2022-03-18 11:19:31

TypeScript, as its name suggests, is a typed superset of JavaScript, which means that all JavaScript code is valid in TypeScript – making it very easy to get started. In addition, TypeScript has several language features including static typing, most ES6 syntax, and object-oriented programming constructs. It is a compiled language, which means you’ll have to transpile it to JavaScript before it can be run.

TypeScript's main mission is simple: make JavaScript, which is a dynamically typed language, behave more like a statically typed language.

But whats the difference between dynamic and static typing?


### Basics
Every feature provided in TypeScript is non-invading, meaning that it has syntax that doesn't overlap with any part of the JS code. This makes porting your JS app back and forth relatively easily.

You can specify your variable's type using the colon (:) followed by the actual name of the type:

```ts
const stringVar: string = "str";
```
There are 6 basic, primitive types to remember:

```ts
number // represents any kind of numeric value
```
```ts
string // represents any kind of string value;
```
```ts
boolean // represents any boolean value, i.e. true or false;
```
```ts
symbol // represents symbol values;
```
```ts
null // represents null value only;
```

```ts
undefined //represents undefined value only;
```

### What does TypeScript offer ?

- Static Type Checking (Optional) – Like other high level programming languages like Java, C etc. TypeScript does provide static type checking unlike JavaScript. Although static typing requires some extra steps while writing code but it has its own advantages. With TypeScript, we can check and assign variables, parameters and function types. It is completely Optional and helps us find and prevent bugs. Also helps make code more readable and descriptive.
- Class Based Objects – Another huge advantage is the use of Classes which provides the ability to use true object oriented programming in our applications and prevents use of prototype based objects. It also provides encapsulation, inheritance and modifiers.
- Modularity – It helps make the code more modular.
- ES6 Features – Support for ES6 features is also one of the main reasons for its popularity.
- Syntax – TypeScript provides syntax which is closer to java and other high level languages (Syntactical Sugaring).
Introducing the AlterClass accelerator program
Published: 2022-03-18 11:15:26

Want to launch an online course this year? What about next month?

At AlterClass, we'd like to empower the next generation of tech instructors;
that's why we are launching the [AlterClass accelerator program](https://alterclass.io/accelerator).
This is the perfect opportunity to help you get started and launch a successful
online course **in 30 days only**.

This exclusive program maps out every step you need to take to have a course
ready to sell within 30 days, no matter where you're starting from — whether
it's your first, second, or fifteenth course. You'll get the techniques,
resources, and guidance you need to launch and start selling your course.

The AlterClass accelerator program includes:

- **👨‍💻 Live sessions**: 1-hour live session every week for 4 weeks to get clear
  guidance and a detailed strategy for a successful launch.

- **🏅 Private Discord access**: Be part of the first AlterClass instructors
  cohort and get access to a private Discord channel with the AlterClass team
  and the other authors.

- **🛠 Course builder**: Create an engaging and interactive programming course by
  using the AlterClass course builder.

- **📢 Extra exposure**: We'll feature your course on the AlterClass marketplace
  to give it an extra boost when you launch and beyond.

- **⭐️ Pro instructor**: Receive an AlterClass Pro subscription for free for a
  year and access advanced features such as course pre-orders.

- **💵 No transaction fees**: We'll waive the transaction fees of your course
  sales. So, you will keep all the profit for yourself.

What are you waiting for? Join the AlterClass accelerator now and be part of the
first instructors cohort → [Apply now](https://alterclass.io/accelerator).
Why We Should Use Context API Instead of Redux For New React Apps
Tags: javascript, react, redux, webdev
Published: 2022-03-18 11:13:56

### When creating a new React application, we think about redux as a state management solution as a default choice. Let’s have a look at the Context API as a possible replacement.

If you’re building a new React app today, your instincts may urge you to choose Redux. But should you start with Redux? That has turned into a legitimate question these days. The state management capabilities of React have vastly increased in recent versions. I’d want to discuss a more straightforward technique that relies on the Context API in this post.

##LET’S TAKE A LOOK BACK
#WHY DID WE ADOPT REDUX?

It wasn’t always the case that frontend apps used an organized approach to state transitions. When we were still using jQuery, I recall changing many locations in an application. That was not a pleasant encounter.

Here comes Redux to rescue, and in comparison, Redux was an outstanding solution:

1. An object represents the whole state of the User Interface (UI).
2. Any action that may change the state is a data-contained object. 
3. To change the state, those acts are ingested by pure functions (reducers)
4. We structure the data in the state using selectors so that our components may consume it quickly.

It now appears self-evident. It was, nevertheless, excellent at the time.

All of the factors that got us here remain valid. However, the situation has altered nowadays.

The ecosystem of React has changed a lot recently. Two other additions have altered the terrain and created new opportunities:

1. Hooks
2. Context

It’s easier than ever to manage state across a hierarchical tree and trigger side effects using those two. So simple that I believe Redux is no longer required in many circumstances.

Most frontend apps lack the rich data flow that supports the use of Redux. If all you’re doing is getting data from an API and performing some simple interactions, Redux is overkill now.

OVER-ABSTRACTION IS A PITFALL THAT MANY PEOPLE FALL INTO
Forms are a fair instance of something close to elaborating this scenario. I’ve used Redux to create sophisticated forms with the aid of various supporting frameworks. Things become more complicated as they become more complex. And for what purpose? Finally, the state conveyed in a form is usually somewhat local. 

Using Redux to model something like a form may be a painful experience. Is the state genuinely global? Frequently, a specialist library will do the job done. For this situation, Formik comes to the rescue. It’s designed specifically for that purpose and will meet almost any criteria you can think of.

## USE CONTEXT API AS AN ALTERNATIVE
Read the rest of the article here: https://www.mushfiqweb.com/why-should-we-use-context-api-instead-of-redux-for-new-react-apps/
How to use Slim 4 framework
Published: 2022-03-18 10:43:47

---
title: How to use Slim 4 framework
published: true
description: We look into how to use the Slim 4 framework. First, we will talk about the difference between the Slim 3 generated code from OpenAPI and then we will look at the new requirements for Slim 4 and how to run it in a production environment.
tags:
cover_image: https://i.ytimg.com/vi/nQCsdOZ8aX4/maxresdefault.jpg
---

{% youtube nQCsdOZ8aX4 %}

We look into how to use the Slim 4 framework. First, we will talk about the difference between the Slim 3 generated code from OpenAPI and then we will look at the new requirements for Slim 4 and how to run it in a production environment.
Introduction to SQL
Tags: sql, database, tutorial, beginners
Published: 2022-03-18 10:35:09

---
canonical_url: https://baransel.dev/post/sql-introduction/
---

## What is SQL?

`SQL` (Structered Query Language), `SQL` is definitely not a programming language. As a sub-language, it is used for database operations, and the general syntax is almost the same for all databases.

## Where Is SQL Used, What Does It Do?

The main use of `SQL` is in databases, and it is needed to process the data stored in the database. It enables the data to be modeled within the targeted task definition.

Some software that does query work with `SQL` are as follows:
* Microsoft SQL Server: It is a server-based software developed by Microsoft.
* Oracle: Known as the most powerful database software and used in large companies and applications. Its developer is Oracle.
* MSSQL: It is a paid software and written by Microsoft.
* MySQL: It is free and open source software. Its developer is Oracle.
* Access: Developed by Microsoft and preferred for smaller applications.

This list goes on and on.

## What is a Database?

Today, it is necessary to keep the information in a place with primitive methods, to make transactions related to that information, to organize it, etc. Since it has become impossible, systems that systematically store countless data were needed. In order to store this much data, the concept of database has emerged.

A database is the area where data such as customer's personal information, account information or patient records of a hospital are stored in a bank with millions of customers. Databases provide data integrity, prevent data duplication.

Database applications are divided into:
* **Flat File Database**: In these databases, all records must be kept in a single table. Therefore, data duplication is inevitable. For example, **Excel** and **Word** are databases of this type.
* **Relational Database**: This is the part that we will be interested in. There are more than one table in this database and there is a relationship between the tables according to a certain hierarchy. **MSSQL**, **Oracle**, **MySQL**, **PostgreSQL**, **Berkeley**, **Firebird**, **Sybase**, **Access** are examples of relational databases.

## What is Database Management System (DBMS)?

The systems that provide the management of works such as **creating** a database, **adding** new records, **updating** existing records are called Database Management System (DBMS). The purpose of the database management system is to facilitate software development, database management, performance measurements, and security by using the relevant database. DBYS provides communication and order between the database and the software that will use the database.
Interaction in Javascript
Tags: javascript, webdev, beginners, programming
Published: 2022-03-18 09:39:55

We have the ability to connect with the user and answer appropriately thanks to Javascript. It has a number of user-interface functions that aid interaction. Let's take a look at each one individually.

**Alert:**
     Simply produces an alert box that may or may not contain the supplied content, but always includes a 'OK' button. It just displays a notice and stops the script from running until you press the 'OK' button. The modal window is the name for the pop-up mini-window.
`alert('text');`
**Example:**

```
// alert example
<script>
 alert('HI there'); // with specified content
 alert(); // without any specified content
</script>
```

**Output:**

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

It can be used for debugging or simply for popping something to the user.

**Prompt:**
    Prompt is another user-interface function which normally contains two arguments.
`prompt('text', default value);`

The default value parameter is optional, albeit it functions as a placeholder inside a text field. The text is basically what you want to show the user, and the default value argument is what you want to display the user. It is the most commonly used interface since it allows you to ask the user for input and then use that information to build something.
**Example:**

```

<script>
// prompt example
let age = prompt('How old are you?', 50);// For default arg 
alert(`You are ${age} years old!`); 
</script>
```
**Output:**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ifoix06fwgn1xgn9mnvu.png)
You can enter anything and it will print that, it doesn’t necessarily have to be a number. Without the default value, you have to enter something in the text-field otherwise it will print a blank space simply.

```
<script>
// prompt example
let age = prompt('How old are you?');
  
alert(`You are ${age} years old!`); 
</script>
```

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

**Confirm:**
     The confirm function basically outputs a modal window with a question and two button ‘OK’ and ‘CANCEL’.
`confirm('question');`
**Example:**

```
<script>
// confirm example 
let isHappy  = confirm('Are you Happy?');
alert(`You are ${isHappy}`); 
</script>
```
**Output:**

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

It will print true or false based on your choice of clicking the ‘OK’ button or ‘CANCEL’ button respectively.
Posters from the Bosnian War
Tags: bosnia, ukraine, art, propaganda
Published: 2022-03-18 10:32:22

---
title: Posters from the Bosnian War
published: true
description: 
tags: Bosnia, Ukraine, art, propaganda
//cover_image: https://direct_url_to_image.jpg
---
We’ve compiled a beautiful book of posters made during Bosnia’s war, and we need your help in getting this unknown part of their heritage into Bosnia’s libraries.

You can see some of the posters here, as well as very short interviews with people in Bosnia: https://www.instagram.com/bosnianwarposters/

Let me know if you're interested in getting a (discounted) copy of the book.
Failling in Bugbounty's
Tags: bugbounty, cybersecurity
Published: 2022-03-18 10:17:13

This post what are the mistakes i make in bugbounty's first what is bugbounty? bugbounty is a programs offer by a company open challenge to find bugs to make organization bugfree and also hackerone ,Bugcrowd,intrigity are bugbountyplatform bridge between hackers and company.
     1)Expectation ,yours following Hunter posts in twitter linkedin Bountyamounts are very Huge 10000$ they have experience and knowledge and also private programs you find simpleBug expect those amount you get demovitated and Burnouts
     2)Following many member only watch  youtube videos and read blogs without implementation

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cw1xtldjwgrlxdonabf.png)
     3) continously changing the targets working on one target check all times of vulnerabilities,Recon also take one week single target work with one or two month definitly you find something
    4)persistance and never give up altitude needed ,Read hackerone hacktivity  and implement it create your own vulnearable app for better understanding  
    5) learn new technologies Read the docs how  it works and how deployed ,create a your own wordlist by add H1 reports  
    6) Automate the continously Repeative  process using Bash and python use axiom and nuclei tools create your own template 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hcd8pxw2yxbgrpszucai.jpg)
    7) don't compare yourself to others Impostor Syndrome  codingo make video on that 
      https://www.youtube.com/watch?v=SMV3r2KnQz0
    8) Duplicate ,not applicable,out of scope are common in Bugbounty accept and try to improve yourself fast do your work continously get success
    links https://github.com/bugcrowd/bugcrowd_university
   of  cover all topics 
i mentioned what i maked mistakes in Bugbounty on last one year i didn't  take laptop also last two months because this Burnouts and depression on myself watch and trying developer and linux topics also i think start today do Bugbounty i trying overcome with mentioning thoughts any mistake feelfree to ask discussion
DevTips Daily Update 18/03/22
Tags: javascript, beginners, tutorial
Published: 2022-03-18 10:02:37

So in this week's update we did some cool stuff with Geolocation and used a free API to write the user's location into the database (for someone who has accessed a short url).  This is to setup our stats data so we can start working on the newly created stats app!

Here's a link to each individual tutorial:

[Viewing MongoDB records](https://youtu.be/tTSOA28LpFY)
{% youtube tTSOA28LpFY %}

[Geolocating users by IP](https://youtu.be/TdFSeFDnm78)
{% youtube TdFSeFDnm78 %}

[Checking Geolocation details](https://youtu.be/62fz_VqbKyE)
{% youtube 62fz_VqbKyE %}

[Preventing unnessary Geolocation requests](https://youtu.be/-ZMuqwIeZtE)
{% youtube -ZMuqwIeZtE %}

[Creating a GET endpoint to serve stats](https://youtu.be/9S-RenxtXlU)
{% youtube 9S-RenxtXlU %}

[Changing the default port of an NX App](https://youtu.be/Tzt20m3Gr6M)
{% youtube Tzt20m3Gr6M %}

[Parsing Path / Query Params](https://youtu.be/d-QkcGmm_EU)
{% youtube d-QkcGmm_EU %}


Next week we're going to be carrying on with the project again, we're going to be working on the stats app and displaying stats to the user and starting to wrap up the rest of the Rick and Roll end to end project!

Thanks for watching 👍
Should I Join a Hackathon?
Published: 2022-03-18 09:44:45

I recently got into learning Solidity without any web2 coding experience. I always believe in learning by doing, and went ahead to submit my project to an ongoing [NFT hackathon](https://moledao.io/#/hackathon) about NFT use cases on DAOs. 

Am wondering if joining a hackathon is the best way to learn quickly?
One color palette a day with example. - 00
Tags: uiweekly, uiux, design
Published: 2022-03-18 09:35:57

www.colorsandfonts.com

## Color and typography for Web Developers and Digital Designers.

From today, I will sharing 1 Color palette a day as I did before, when I started Colors & fonts.


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

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

You will find them here, [Dribbble](https://dribbble.com/MichaelAndreuzza), [Instagram](https://www.instagram.com/apes_of_london/), [Pinterest](https://pin.it/w18zxbr) and [Twitter](https://twitter.com/Mike_Andreuzza).

Since 2017 - 2022
Vue event modifiers
Published: 2022-03-18 09:35:07

Imagine you want to implement events something like:

```vue
<Modal @ok.prevent="doNothing">
Modal Code
</Modal>
```

That is when ok button of the modal is clicked, you want to prevent the event. In that case the prevent modifier can be implemented by code given below:

```js
okButtonClickedMethod(e) {
   //First emit the ok event, then check if it is prevented or not
    emit('ok', e);
     //then hides modal
     if (e.defaultPrevented) {
          //emitted event is prevented now
     }
}
```

**** Happy Coding ***
Google chrome and why it's liked
Tags: programming, webdev
Published: 2022-03-18 09:33:12

Google chrome is a browser offered by Google.

You can install it on any operating system Currently, I'm using it on Ubuntu, a Linux O.S distribution.

Google chrome has options for extensions, bookmarks. I personally like Chrome because of the bookmarks.

**Bookmarks
**
Bookmarks is a way you can save your most visited websites so that you can access them at any time. You can have folders for Design related websites, Social media websites, learning sites on the bookmark bar. This makes it very easy and less time consuming trying to remember the link and navigating to it.

**Extensions
**
Extensions are my second favorite. You can have you favourite extensions at your finger tips. Personally, when I'm doing web design/development I like using 'Show me the styles', 'Wappalyzer', 'colorzilla' and 'Page Ruler Redux'. These extensions make life easier as a web designer/developer.

That's all for now. See you soon.