teleren/devto huggingface dataset:
Kill Server Port Active if React Native Project is Running
Tags: reactnative, killserver, tutorial
Published: 2023-04-10 06:31:59

Disini gw mau share gimana caranya nge-kill server yang masih aktif saat kita ingin menjalankan project react native dan kita tidak tau bahwa server dengan port yang sama (default) sedang aktif atau running

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

Nah, disini gw dapet bocorannya gimana cara handlenya kurang lebih sebagai berikut

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

dan link bocorannya dari stackoverflow berikut : https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server

atau bisa juga baca dokumentasinya yang terdapat di troubleshot 

https://reactnative.dev/docs/troubleshooting

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

Sebetulnya sih kita juga bisa mengkostumisasi port dengan cara seperti berikut

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5f1gux7dspbt1qwh72m.png)
Hates 92553 Non Christian Terror...
Tags: patrickyib3ckwith19
Published: 2023-04-10 06:19:25

Hates America, F America. Loses Data Life And Belonging to Fgots Using AK ETS Commie Tech Like I'm A Slave F AK In So Cal Pre Rich 92553 Single His Whole Life. Hates. (Erased My Previous Paragraph Hates 92553 911 Is Real (Genius Forced Steroid 04) F Word Games Brain Raped By Terrorist Fgots Ever Since 19-37. Is Never Free and Threatened 24/7 Some How Like Things They Do To A Junkie... WA State
Exporting a Database
Tags: opengauss
Published: 2023-04-10 06:15:05

You can use **gs_dump** to export data and all object definitions of a database from openGauss. You can specify the information to export as follows:

**·** Export full information of a database, including its data and all object definitions.

You can use the exported information to create a database containing the same data as the current one.

**·** Export all object definitions of a database, including the definitions of the database, functions, schemas, tables, indexes, and stored procedures.

You can use the exported object definitions to quickly create a database that is the same as the current one, except that the new database does not have data.

**·** Export data of a database.

**Procedure**
1. Log in as the OS user omm to the primary node of the database.

2. Use gs_dump to export data of the userdatabase database.

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

Table 1 Common parameters

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

For details about other parameters, see “Server Tools > gs_dump” in the Tool Reference.

**Examples**
Example 1: Run **gs_dump** to export full information of the postgres database and compress the exported files in .sql format.

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

Example 2: Run **gs_dump** to export data of the **postgres** database, excluding object definitions. The exported files are in a custom format.

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

Example 3: Run **gs_dump** to export object definitions of the **postgres** database. The exported files are in .sql format.

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

Example 4: Run **gs_dump** to export object definitions of the **postgres** database. The exported files are in text format and are encrypted.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbhfvgkf35ee6wkg3t51.png)
Building a Basic Neural Network with Brain.js
Tags: machinelearning, javascript, brainjs, programming
Published: 2023-04-10 05:58:58

Neural networks are a powerful tool for solving complex problems in machine learning and artificial intelligence. They are used to make predictions, classify data, and recognize patterns. In this article, we will explore how to build a basic neural network using Brain.js, a popular JavaScript library for neural networks.

for more details please check [brain.js](https://brain.js.org) official documentation.

**Getting Started with Brain.js**

Before we dive into the code, let's first get familiar with Brain.js. Brain.js is a JavaScript library that makes it easy to build and train neural networks. It provides a simple API that allows you to create, train, and test your neural network.

To get started with Brain.js, you will need to install it using npm. Open your terminal and run the following command:

```

npm install brain.js

```

Once Brain.js is installed, you can start building your neural network.

**Building a Basic Neural Network**

In this example, we will build a basic neural network that learns to recognize patterns in data. We will create a dataset of 10 examples, each with two inputs and one output. The output will be a binary value, either 0 or 1, depending on the inputs.

**Let's start by defining our dataset:**

```

const data = [  { input: [0, 0], output: [0] },
  { input: [0, 1], output: [1] },
  { input: [1, 0], output: [1] },
  { input: [1, 1], output: [0] },
  { input: [0, 0], output: [0] },
  { input: [0, 1], output: [1] },
  { input: [1, 0], output: [1] },
  { input: [1, 1], output: [0] },
  { input: [0, 0], output: [0] },
  { input: [0, 1], output: [1] },
];

```

Next, we will create a neural network using Brain.js. Our network will have two inputs, one hidden layer with three neurons, and one output.

```

const net = new brain.NeuralNetwork({
  inputSize: 2,
  hiddenLayers: [3],
  outputSize: 1,
});

```

Now that we have defined our dataset and our neural network, we can train our network using the dataset. We will use the train method of the NeuralNetwork class to train the network.

```

net.train(data);

```

Finally, we can test our neural network by passing in new input data and getting a prediction from the network.

```

const output = net.run([0, 1]);
console.log(output);

```

In this code, we pass in an array of two inputs, [0, 1], and get a prediction from the network. The output should be close to 1, since [0, 1] corresponds to an output of 1 in our dataset.

**Conclusion**

Brain.js makes it easy to build and train neural networks in JavaScript. In this article, we explored how to build a basic neural network that learns to recognize patterns in data. By understanding the basics of neural networks, you can build more complex models to solve a wide range of machine learning problems.
Difference Between Undeclared & Undefined Variables?
Tags: javascript
Published: 2023-04-10 05:48:09

Undeclared and undefined are two different concepts when it comes to variables in JavaScript.

An undeclared variable is a variable that has not been declared in the code, meaning that it has not been assigned a value or even defined using the var, let, or const keywords. Attempting to use an undeclared variable will result in a ReferenceError.

For example: console.log(myVariable); // ReferenceError: myVariable is not defined

In the above example, myVariable is undeclared because it has not been defined anywhere in the code.

On the other hand, an undefined variable is a variable that has been declared, but has not been assigned a value. In this case, the variable exists, but it has a value of undefined. Trying to access the value of an undefined variable will result in the value undefined.

For example:
let myVariable;
console.log(myVariable); // undefined

In the above example, myVariable is defined using the let keyword, but it has not been assigned a value, so its value is undefined.

To summarize, an undeclared variable is one that has not been declared or defined in the code, while an undefined variable is one that has been declared, but has not been assigned a value.

It's important to note that using undeclared or undefined variables can cause unexpected behavior in your code, so it's always a good practice to declare and initialize your variables properly.
SEO 2023
Tags: seo2023, searchengines, digitalmarketing, storybytes
Published: 2023-04-10 05:40:44


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

Around 1990, SEO was the factor that drove traffic to your site. Although it could be argued that SEO and all things search engine marketing began with the launch of the first website published in 1991, or perhaps when the first web search engine launched, the story of SEO “officially” started a bit later, around 1997. Twenty-three years later, SEO is still a massive factor in reachability. The most significant difference from then to Today is the billions of websites created, and everyone wishes in ranking to reach page one or two or a maximum of page three. Even though Social Media, advertisements, and other digital marketing strategies are there, the factor of SEO didn’t get swiped away from the industry. As Search engines change their algorithms frequently, the user’s behaviour has also adapted. Content Rules, and with that, UX and UI matter a lot. With the best out of these three, you covered a great space to improve your ranking. In Addition, don’t neglect the technical details. A site has to be fast, regardless of your bandwidth. Crawlers and not only indexing metadata; they are hungry for structured data with a schema. Once crawled, such data will be needed in too many sources, creating a ripple effect on your traffic. All these changes are a stark reminder that SEO professionals and website owners must always stay on their toes to maintain their competitive edge.
Building a Scalable Drupal Website with Spheron Compute and MySQL Database: A Step-by-Step Guide
Tags: drupal, webdev, tutorial, devops
Published: 2023-04-10 05:39:58

Drupal is a popular open-source content management system (CMS) that can be used to build websites and web applications. It is known for its flexibility, scalability, and extensibility. If you want to build a Drupal website with Spheron Compute Marketplace and use a MySQL database, you have come to the right place. This blog post will guide you through setting up a Drupal website on Spheron and connecting it to a MySQL database.

## What is Spheron?
Spheron is a Web3 cloud infrastructure platform that allows developers to manage web3 cloud infra quickly and easily. It is designed to simplify the process of building, deploying, and scaling applications, making it an ideal choice for Drupal websites.

You can follow these steps to launch your own Drupal application: 

### Step 1: Create a Spheron Account

The first step in building a Drupal website with Spheron is to create a Spheron Account. Sign up with Github, Gitlab, or Bitbucket on the Spheron platform.

### Step 2: Choose a Drupal App from Spheron Compute Marketplace

Once you have a Spheron account, you can go to compute dashboard and browse the marketplace to find a Drupal app. You can do this by navigating to the "Marketplace App" section of the Spheron dashboard and searching for "Drupal". From there, you can select a compute plan that meets your needs and click the "Deploy" button to get started.

### Step 3: Wait for Drupal instance to provision

Next, you must wait for Drupal instance to provision. Once the instance is provisioned, Spheron will share a link where you can start setting up your Drupal website's initial settings. When you are required to attach a database, please go to the next step.

### Step 4: Set Up a MySQL Database

The next step is to set up a MySQL database for your Drupal website. You can do this by creating a new MySQL database separately. You can do this within Spheron, but since Spheron doesn’t support persistent storage, we recommend using another platform to launch your MySQL database.

### Step 5: Connect Drupal to the MySQL Database

Once your MySQL database is set up, you must connect Drupal to the database. This can be done by configuring the database settings in the Drupal configuration file. You must provide the database name, host, port, username, and password, which can all be found in your MySQL dashboard settings.

### Step 6: Test Your Drupal Website

With everything set up and connected, you can now test your Drupal website to ensure everything works as expected. You should be able to access your site and perform basic functions, such as creating and editing content.

## Conclusion

Building a Drupal website with Spheron Compute and using an externally deployed MySQL for the database is a great way to quickly and easily deploy a robust, scalable website. By following the steps outlined in this blog post, you should get your Drupal website up and running in no time. If you have any questions or need further assistance, don't hesitate to contact the Spheron team for help.
The Role of zkRollups in the Decentralized Finance (DeFi) Ecosystem
Tags: web3, finance, decentralized
Published: 2023-04-10 05:31:28

zkRollups, or zero-knowledge rollups, are a layer-2 scaling solution for blockchains that can significantly improve the efficiency and scalability of decentralized applications (dApps), including those in the decentralized finance (DeFi) ecosystem.

In DeFi, zkRollups can be used to bundle and verify a large number of transactions off-chain before committing them to the main blockchain. This process greatly reduces the number of transactions that need to be processed by the main blockchain, resulting in faster transaction processing times and lower fees. This is especially important for DeFi applications, which can involve complex smart contract interactions and require high levels of transaction throughput.

Furthermore, zkRollups also provide a high degree of privacy and security for DeFi users. This is because they use zero-knowledge proofs to validate transactions, which allows users to prove that a transaction is valid without revealing any sensitive information about the transaction itself. This makes zkRollups an attractive option for DeFi users who value privacy and security.

Overall, zkRollups have the potential to significantly improve the efficiency, scalability, privacy, and security of DeFi applications. As the DeFi ecosystem continues to grow and evolve, it is likely that we will see an increasing number of projects and applications adopting zkRollups as a key part of their infrastructure.
Excel add-in and custom functions
Tags: officeaddins, exceladdin, customfunctions
Published: 2023-04-10 05:10:25

As technology continues to evolve, the tools and platforms that developers use to create applications are also evolving. In this blog, we will explore how to create an Office Add-in with Excel custom functions using the Angular framework and the Yeoman generator.

The first step is to install the Yeoman generator for Office Add-ins using the following command:
`npm install -g yo generator-office`

Once the generator is installed, we can create a new Office Add-in project using the following command:
`yo office`

This command will prompt you to select the type of Office Add-in you want to create. In this case, we will select the Excel Add-in.
Next, we need to choose the framework we want to use to create our add-in. We will select Angular, We could also select React or HTML,CSS only if required based on requirements.

Once the project is generated, we can navigate to the project directory and run the following command to build and run the add-in:
`npm start`

This will build the add-in and start a local server where we can test our add-in in Excel.
The build files will be located in under dist folder in the root of the project.

Now that we have our add-in project set up, we can start creating our Excel custom functions.

Excel custom functions allow you to create your own functions that can be used in Excel formulas. To create a custom function, we need to open the Functions.ts file under Functions folder 
Write the Function code:

```
export function double(input: number): number {
  return input * 2;
}
```

This function takes in a number and returns the number multiplied by 2.

Now we can use this function in Excel formulas like any other built-in function.
`=double(A1)
`

This will take the value in cell A1, double it, and return the result.
In conclusion, creating an Office Add-in with Excel custom functions using the Angular framework and the Yeoman generator is a straightforward process. With just a few lines of code, we can create custom functions that can be used in Excel formulas, extending the functionality of Excel to fit our specific needs.
Variadic Function in Swift
Tags: swift, variadic, ios, variadicfunc
Published: 2023-04-10 05:30:17

The functions which takes Variadic parameter are called **Variadic Functions**.

Variadic parameters allow us to pass either single or multiple values based on our requirement.


**Declaration** - You just need to add Three Dots i.e. ... after param data type to make it variadic.

Example - Below function takes an Int as variadic param - 

```Swift
func getSum(values:Int...){
    let sum = values.reduce(0, +)
    print("Sum is-\(sum)")
}
```

Now let's check how can we call it - 
case 1 - Call it with single value - 

```Swift
getSum(values: 8)
```

case 2 - Call it with multiple values - 
```Swift
getSum(values: 1,7)
```
How to Install Magento 2
Tags: webdev, magento, magento2tutorials
Published: 2023-04-10 05:17:37

Introducing Magento 2 can be really difficult for the people who are new to internet business, however with the right direction, it tends to be finished effortlessly. 

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

The most important phase in introducing Magento 2 is to ensure that your framework meets the base prerequisites for establishment then subsequently you can arrange Magento 2. This incorporates having a web server, PHP, and a data set. 

Prior to beginning the establishment cycle, it's essential to guarantee that your framework is cutting-edge and prepared to deal with Magento 2.Here is a bit by bit guide on **_how to install Magento 2._**

For more info, visit **_https://webguru.dev/how-to-install-magento-2/_**
BigCommerce New Store
Tags: bigcommerce, ownerseries, howto, beginners
Published: 2023-04-10 05:05:31

Hey guys,
We are going to look into a super simple task of creating [New Store](https://manage.bigcommerce.com/account/stores/new). It can be super easy by filling all the details here. And boom, we now have the new store and an confirmation email that the store has been created.

Enjoy Folks.
Hi There! I'm new here
Tags: react, webdev, javascript, beginners
Published: 2023-04-10 05:04:23

My name is Halilulloh you can simply call as Adam. 
I recently started a new job in Tashkent, Uzbekistan as junior React developer. Imma bit nervous but I believe I can make this with my passion to rise and of course with your helps and advices. Please feel free to write me if you have some advices or smth from your experience. Wish me a luck!
Steps & Tips to Becoming a Content Creator in 2023
Tags: webdev, tutorial, career, contentcreator
Published: 2023-04-10 05:02:54


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sfoepznruo99fgzo6pmz.jpg)
Creating compelling content is more than just possessing the skills to write, shoot pictures, and record videos. It requires keeping up with trends and possessing research skills. In today's digital world, it's essential to make a digital push to enhance your career. 
To generate traffic to your content, it's important to find your audience and understand their needs. While a scripted document can drive traffic, videos and infographics have the potential to generate sales to your products or services. So identifying your potential audience is a crucial step.

Choosing the best platform is the second tip. With everyone on social media nowadays, it's important to choose the best platform to promote your business. Developing a content plan is also crucial, as it resembles a business plan. It prepares the brand for multiple situations and improves coordination. Using an effective content plan, you can better prepare yourself for the topics and events of each month. For instance, if you're focusing on social media, make the plan accordingly.

If you operate in the content creation sector, it's even more crucial to develop a portfolio that effectively conveys your knowledge and differentiators. Provide details resembling an "About Us" page, in addition to examples of your best completed work, so potential customers can get a sense of your brand voice and style.

Following the AIDA model is essential: Attention, Interest, Desire, and Action. The attention part means that your target audience will start to be interested in what your business truly does if your content can capture their interest and hold it. To reach this stage, you need to get your material in front of them initially. This is followed by improved brand recognition and compelling messaging.

In the interest stage, after becoming interested in your offering, your target market will want to know more about your company, the advantages of your solution, and how well you might match their needs. To get someone to the point where they genuinely consider wanting or seeking that good or service, it's important to keep their interest.

The goal of the action phase is to stimulate the reader's curiosity and turn their desire into concrete outcomes. A call-to-action link or button is necessary in this stage.

Becoming a successful content creator in 2023 requires following these key points, in addition to reading newspapers about your industry every day, questioning everything, establishing your own voice, and more. Softloom IT Training is the [best digital marketing institute in Kochi](https://softloomittraining.com/digital-marketing-training-courses-cochin/), offering specialized modules such as SEO, social media marketing, SEO, and content creation strategies. With proper training from real experts, you can become an expert in digital marketing and succeed in the area of internet marketing.
Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input
Tags: angular, forms, errors, formsmodule
Published: 2023-04-10 04:41:03

This error occurs when you try to use ngModel directive in your component’s template but have not imported the FormsModule in your app module or the component’s module.
To solve this error, you need to import the FormsModule in your app module or the component’s module. Here is an example:

```
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms'; // Import the FormsModule

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule // Add FormsModule to the imports array
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

Once you have imported the FormsModule, you should no longer receive this error. For more information, you can refer to this Github issue: https://github.com/angular/angular/issues/13768

For any question please comment.