teleren/devto huggingface dataset:
How to manage multiple Node JS versions?
Tags: tutorial, node, webdev, beginners
Published: 2023-03-15 07:06:31

Hello Everyone today I will show you how you can manage multiple Node Js version on a single System.

Let's get started...
## What is the need for having multiple Node JS Version?
Well a few weeks ago I was working on a Project Created with JSP(Java Servlet Pages) and webpack, So the "SASS" node package has some dependency on other packages which is only supported in the old version of Node JS like v14, So I installed v14.16.0 and everything worked fine for that time But after few days when I was working with "Next JS" I have to use "SASS" node package but It only compiles the SASS code for Node JS v18+.
I can't install V18 because that JSP Project was still in progress.
There comes the saviour NVM(Node version Manager),with 1 line of command i could easily switch between multiple version of Node JS.

## How to install NVM?
* For Windows - https://github.com/coreybutler/nvm-windows/releases, go to this link and download the ".exe" file and install it.
* For Mac and Linux - You can check some articles on how to install nvm as I am not familiar with Mac and Linux.
* Once the installation is done, open your command prompt or VS Code terminal and run this command 
```
nvm -v
```
* It will show you the nvm version if installed properly

## How to install Multiple Node Js version?
* To install any node js version just type this command with version number you want to install
```
nvm install <version_number>
```
* Example 1 - It will install the latest version
```
nvm install latest
```

* Example 2 - It will install the v14.16.0
```
nvm install 14.16.0
```
### If you want to delete any version just use this command
```
nvm uninstall <version_number>
```

## How to switch between different versions?
* You can use this command to switch between different versions
```
nvm use <version_number
// Example
nvm use 14.16.0
```
* It will switch to version 14.16.0

## How to check the installed Versions?
* You can use this command to check how many versions are installed
```
nvm list
```

THANK YOU FOR CHECKING THIS POST
You can contact me on -
Instagram - https://www.instagram.com/supremacism__shubh/
LinkedIn - https://www.linkedin.com/in/shubham-tiwari-b7544b193/
Email - shubhmtiwri00@gmail.com

^^You can help me with some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/website-components-you-should-know-25nm

https://dev.to/shubhamtiwari909/smooth-scrolling-with-js-n56

https://dev.to/shubhamtiwari909/swiperjs-3802

https://dev.to/shubhamtiwari909/custom-tabs-with-sass-and-javascript-4dej
openGauss Support for Functions and Stored Procedures
Published: 2023-03-15 07:05:52

## Availability
This feature is available since openGauss 1.1.0.

## Introduction
Functions and stored procedures are important database objects. They encapsulate SQL statement sets used for certain functions so that the statements can be easily invoked.

## Benefits
Allows customers to modularize program design and encapsulate SQL statement sets, easy to invoke.
Caches the compilation results of stored procedures to accelerate SQL statement set execution.
Allows system administrators to restrict the permission for executing a specific stored procedure and controls access to the corresponding type of data. This prevents access from unauthorized users and ensures data security.
Description
openGauss supports functions and stored procedures compliant with the SQL standard. The stored procedures are compatible with certain mainstream stored procedure syntax, improving their usability.

## Enhancements
None

## Constraints
None

## Dependencies
None
openGauss Access Control Model
Published: 2023-03-15 07:04:12

## Availability
This feature is available as of openGauss 1.1.0.

## Introduction
The access control model can be used to manage users' access permissions and grant them the minimum permissions required for completing a task.

## Benefits
You can create users and grant permissions to them as needed to minimize risks.

## Description
The database provides a role-based access control model and an access control model based on the separation of duties. In the role-based access control model, database roles are classified into system administrator, monitoring administrator, O&M administrator, security policy administrator, and common user. The security administrator creates roles or user groups and grant permissions to roles. The monitoring administrator views the monitoring views or functions in dbe_perf mode. The O&M administrator uses the Roach tool to back up and restore the database. The security policy administrator creates resource labels, anonymization policies, and unified audit policies. A user who is assigned a role has the role's permissions.

In the access control model based on the separation of duties, database roles are classified into system administrator, security administrator, audit administrator, monitoring administrator, O&M administrator, security policy administrator, and common user. The security administrator creates users, the system administrator grants permissions to users, and the audit administrator audits all user behavior.

By default, the role-based access control model is used. To switch to another mode, set the GUC parameter enableSeparationOfDuty to on.

## Enhancements
None

## Constraints
The permissions of the system administrator are controlled by the GUC parameter enableSeparationOfDuty.

The database needs to be restarted when the separation of duties is enabled, disabled or switched. In addition, improper user permissions in the new model cannot be automatically identified. The database administrator needs to manually identify and rectify the fault.

Dependencies
None
openGauss Separation of Control and Access Permissions
Published: 2023-03-15 07:03:04

## Availability
This feature is available as of openGauss 1.1.0.

## Introduction
The control permissions and the access permissions can be separated.

## Benefits
The control permissions of database administrators for tables need to be isolated from their access permissions to improve the data security of common users.

## Description
If multiple business departments use different database users to perform service operations and a database maintenance department at the same level uses database administrators to perform O&M operations, the business departments may require that database administrators can only perform control operations (DROP, ALTER, and TRUNCATE) and cannot perform access operations (INSERT, DELETE, UPDATE, SELECT, and COPY) without authorization. That is, the control permissions of database administrators for tables need to be isolated from their access permissions to improve the data security of common users.

In separation-of-duties mode, a database administrator does not have permissions for the tables in schemas of other users. In this case, database administrators have neither control permissions nor access permissions. This does not meet the requirements of the business departments mentioned above. Therefore, GaussDB Kernel provides private users to solve the problem. That is, create private users with the INDEPENDENT attribute in non-separation-of-duties mode. Users with the CREATEROLE permission or the system administrator permission can create private users or change the attributes of common users to private users. Common users can also change their own attributes to private users.

""
openGauss=# CREATE USER user_independent WITH INDEPENDENT IDENTIFIED BY "1234@abc";
System administrators can manage (DROP, ALTER, and TRUNCATE) table objects of private users but cannot access (INSERT, DELETE, SELECT, UPDATE, COPY, GRANT, REVOKE, and ALTER OWNER) the objects before being authorized.

## Enhancements
None

Constraints
For a table owned by a private user, grant the trigger permission of the table to other users with caution to prevent other users from using the trigger to view the data of the private user.

If permissions related to private user tables are granted to non-private users, the system administrator will obtain the same permissions.

## Dependencies
None
openGauss Database Encryption Authentication
Published: 2023-03-15 07:01:45

## Availability
This feature is available since openGauss 1.1.0.

## Introduction
The client/server (C/S) mode-based client connection authentication mechanism is provided.

## Benefits
The unidirectional, irreversible hash encryption algorithm PBKDF2 is used for encryption and authentication, effectively defending against rainbow attacks.

## Description
openGauss uses a basic client connection authentication mechanism. After a client initiates a connection request, the server verifies the information and sends the information required for authentication to the client based on the verification result. The authentication information includes the salt, token, and server signature. The client responds to the request and sends the authentication information to the server. The server calls the authentication module to authenticate the client authentication information. The user password is encrypted and stored in the memory. During the entire authentication process, passwords are encrypted for storage and transmission. When the user logs in to the system next time, the hash value is calculated and compared with the key value stored on the server to verify the correctness.

## Enhancements
The message processing flow in the unified encryption and authentication process effectively prevents attackers from cracking the username or password by capturing packets.

## Constraints
None

## Dependencies
None
keras.applications .preprocess_input(x) to preprocess the input image for Neural Network.
Published: 2023-03-15 07:00:39

preprocess_input(x) is a function that applies some preprocessing to an input image before feeding it to a neural network model. It is part of the keras.applications module and is typically used when working with pre-trained models such as ResNet50.

The preprocess_input function takes a single argument x, which is a NumPy array representing an image. The function applies a series of transformations to the image, such as normalizing the pixel values to be between -1 and 1 and zero-centering the data.

The purpose of this preprocessing step is to ensure that the input image is in the same format as the images used to train the pre-trained model. This is important because the pre-trained model has learned to recognize patterns in images of a specific format, and if the input images are not in that format, the model's performance may suffer.

Once the input image has been preprocessed, it can be passed through the neural network model to obtain a prediction.
Alternate Career Paths: If You Weren’t A Coder or Developer, What Would You Be Instead?
Tags: discuss, beginners, codenewbie
Published: 2023-03-15 07:00:00

It's always fun to imagine what our lives would be like if we had made different choices. So, if you weren't a coder or a developer, what would you be instead? A chef, a musician, a veterinarian? Are there opportunities to incorporate your alternate passions into coding career?

Let's hear from you all! Share your thoughts in the comments below.
openGauss Data Encryption and Storage
Published: 2023-03-15 06:59:45

## Availability
This feature is available since openGauss 1.1.0.

## Introduction
Imported data is encrypted before stored.

## Benefits
You can use encrypted import interfaces to encrypt sensitive information and store it in a table.

## Description
openGauss provides the encryption functions gs_encrypt_aes128() and gs_encrypt(), and decryption functions gs_decrypt_aes128() and gs_decrypt(). Before you import data to a certain column in a table, you can use this function to encrypt the data. The function can be called using a statement in the following format:

""
gs_encrypt_aes128(column, key), gs_encrypt (decryptstr, keystr, decrypttype)
In the preceding command, key indicates the initial password specified by the user, which is used to derive the encryption key. To encrypt an entire table, you need to write an encryption function for each column.

If a user with the required permission wants to view specific data, the user can decrypt required columns using the decryption function interface gs_decrypt_aes128(column, key). To invoke the interface, run the following command:

""
gs_decrypt_aes128(column, key), gs_decrypt(decryptstr, keystr, decrypttype)

## Enhancements
None.

Constraints
None.

## Dependencies
None.
What is a batch in the context of neural networks?
Published: 2023-03-15 06:55:43

In machine learning, a batch refers to a subset of the training data that is processed at once during the training process. Instead of processing the entire dataset in one go, it is often more efficient to break it down into smaller batches and feed them into the model sequentially. This allows the model to update its parameters more frequently, which can help it converge to a better solution faster.

For example, if you have a training set of 1000 examples, you might choose to process it in batches of 100. This means that the model will see the data in 10 passes, with each pass updating its parameters based on the loss calculated for the 100 examples in that batch. The size of the batch is a hyperparameter that can be tuned to find the optimal balance between training time and performance.
Database Audit
Published: 2023-03-15 06:55:09

## Availability
This feature is available as of openGauss 1.1.0.

## Introduction
Audit logs record user operations performed on database startup and stopping, as well as connection, DDL, DML, and DCL operations.

## Benefits
The audit log mechanism enhances the database capability of tracing unauthorized operations and collecting evidence.

## Description
Database security is essential for a database system. GaussDB 200 writes all user operations in the database into audit logs. Database security administrators can use the audit logs to reproduce a series of events that cause faults in the database and identify unauthorized users, unauthorized operations, and the time when these operations are performed.

## Enhancements
None

## Constraints
None

## Dependencies
None
np.expand_dims(x, axis=0)?
Published: 2023-03-15 06:55:05

np.expand_dims(x, axis=0) is a NumPy function used to add a new dimension to a given NumPy array x at the specified axis (in this case, axis 0).

For example, if x is a NumPy array of shape (3, 4) which represents a 3x4 matrix, calling np.expand_dims(x, axis=0) will add a new dimension to x at axis 0, resulting in a new NumPy array of shape (1, 3, 4) which represents a 1x3x4 matrix.

This can be useful when working with neural networks, as many deep learning frameworks expect inputs to be in the form of batches. Adding a new dimension to a single input array using np.expand_dims can allow it to be passed through a neural network that expects inputs in batch form, such as resnet50 in TensorFlow.
Resnet50 with TensorFlow implementation, high level overview.
Published: 2023-03-15 06:54:20

ResNet50 is a deep learning model for image classification that was introduced by Microsoft researchers in 2015. It is a deep convolutional neural network that can classify images into 1,000 categories, including common objects, animals, and scenes.

The ResNet50 architecture is composed of 50 layers, with skip connections that allow the network to learn residual functions that can be more easily optimized. These skip connections bypass one or more layers, allowing the network to learn the identity function as well as the residual function. This approach can help avoid the problem of vanishing gradients that can occur in deep neural networks.

Here is an implementation of ResNet50 using TensorFlow, a popular deep learning framework:

```
import tensorflow as tf
from tensorflow.keras.applications.resnet50 import ResNet50
from tensorflow.keras.preprocessing import image
from tensorflow.keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np

# Load the ResNet50 model
model = ResNet50(weights='imagenet')

# Load and preprocess the image
img_path = 'image.jpg'
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)

# Use the model to classify the image
preds = model.predict(x)
print('Predicted:', decode_predictions(preds, top=3)[0])

```
- [np.expand_dims(x, axis=0)](https://dev.to/sarvesh42/npexpanddimsx-axis0-2mic)
- [preprocess_input(x)](https://dev.to/sarvesh42/what-is-a-batch-in-the-context-of-neural-networks-b77)
- [preprocess_input(x)](https://dev.to/sarvesh42/kerasapplications-preprocessinputx-to-preprocess-the-input-image-for-neural-network-21fc)

In this implementation, we first load the ResNet50 model with pre-trained weights on the ImageNet dataset. We then load and preprocess the image we want to classify, and pass it through the ResNet50 model to get the predicted class probabilities. Finally, we use the decode_predictions function to convert the predicted probabilities to class names.

Note that ResNet50 is a large and complex model, and training it from scratch can be computationally expensive. Therefore, it is common to use pre-trained weights and fine-tune the model on a smaller dataset if needed.
Konfigurasi Router Mikrotik dengan DNS
Tags: pens, jaringan, pakferry, winbox
Published: 2023-03-15 06:42:31

## Kelompok 8
1. M. Roy Farchan
2. Azis Zuhri Pratomo
3. Habibi Fatahillah

###1. Reset Configuration Router - 2
Reset Konfigurasi dilakukan dengan menggunakan software Winbox 

Akses fitur di bagian sidebar pada menu System -> pilih Reset Configuration -> centang No Default Configuration -> klik Reset Configuration.
 
Setelah itu akan otomatis melakukan rebooting pada router dan aplikasi akan melakukan reconnecting.


###2. Config IP Local & Public
Setelah rebooting akses fitur di sidebar pada menu IP -> Addresses -> klik tombol "**+**" ->
**ETHER 1**
 - Address = 10.252.108.18/24
 - Network = 10.252.108.0
 - Interface = ETHER 1

 **ETHER 2**
 - Address = 192.168.8.1/24
 - Network = 192.168.8.1/24
 - Interface = ETHER 2


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


### 3. Config Default Route
Akses fitur di sidebar pada menu New Terminal
#### Configurasi Default Route
```console
ip route add dst-address=0.0.0.0/0 gateway=10.252.108.1
ip ro pr
```

### 3. Configurasi DNS
Akses fitur di sidebar pada menu IP -> DNS -> masukkan IP Server=202.9.85.3

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



### 4. Config Internet Client
 - Berikut konfigurasi lengkapnya

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



### 5. Menambah IP Routes
Ketikkan pada New Terminal Winbox
```console
ip ro add gateway 10.252.108.11 dst 192.168.1.0/24
ip ro add gateway 10.252.108.12 dst 192.168.2.0/24
ip ro add gateway 10.252.108.13 dst 192.168.3.0/24
ip ro add gateway 10.252.108.14 dst 192.168.4.0/24
ip ro add gateway 10.252.108.15 dst 192.168.5.0/24
ip ro add gateway 10.252.108.16 dst 192.168.6.0/24
ip ro add gateway 10.252.108.17 dst 192.168.7.0/24
ip ro add gateway 10.252.108.19 dst 192.168.9.0/24
```

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



### 6. Tes ping antar client

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


### 7. Export Config
Akses fitur di sidebar pada menu New Terminal, lalu ketikkan :

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


dan file sudah berhasil di download ke komputer
30 Days of API Testing - Learn API Testing Even As a Complete Beginner.
Tags: webdev, beginners, programming, tutorial
Published: 2023-03-15 06:41:55

💬 Ask me : https://apitesting.co/chat

{% embed https://youtu.be/apoxlzW2abg %}

 🔥🔥Master API Testing(Full Course) -  https://www.learnapitesting.com


🚀🚀Become a Automation RockStar - https://sendfox.com/thetestingacademy


🚀🚀 Join TheTesting Academy - https://thetestingacademy.com/30daysapi


In this series of 30 Days of API Testing - Introduction, We are going to start a 30 api testing challenge.

You are going to learn the about the concepts of API, API testing, web services and HTTP Methods basics which are helpful in API testing interview questions. you will learn about everything API Testing Using Postman, SOAPUI, PAW and many more API Testing Tools in these 30 Days.

These challenges are a great way to learn on your own, as a team effort or join in with the wonderful Ministry of Testing community online.

Below is a list of 30 challenges and a bonus challenge, one for each day of the month. Download the PDF below. Save it somewhere. Print it out. Stick it on your wall. Let’s do this!

Source. : https://www.ministryoftesting.com/doj...


#API #APITesting #Postman  #APITestingTutorials.

Join Facebook Group :  http://bit.ly/learntesting2019

Website:   https://scrolltest.com

Website:   https://thetestingacademy.com

Twitter: https://twitter.com/itstechmode


Download PPT : https://bit.ly/2PhosOh


API stands for Application Programming Interface.
API is a defined set of rules, which contains clearly defined methods of communication. API helps different software components to interact with each other.

API testing involves testing the collection of APIs and checking if they meet expectations for functionality, reliability, performance, and security and returns the correct response.
API testing is used to determine whether the output is well-structured and useful to another application or not, checks the response on basis of input (request) parameter, and checks how much time the API is taking to retrieve and authorize the data too. 🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅Selenium Training and Certification -
https://scrolltest.com/go/edureka


✅Learn Jenkins for QA -
https://bit.ly/learnjenkins-p1


✅Programming Java -
https://bit.ly/learnjava2020-p1


✅Test Automation - 
https://bit.ly/learnautomation2020


✅API Testing - 
https://www.learnapitesting.com


✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com