teleren/devto huggingface dataset:
Dart and Swift
Tags: dart, swift, flutter, ios
Published: 2023-02-04 12:23:02

**Here are some similarities and differences between Dart and Swift:**

**Syntax**:
a. Dart has a more familiar syntax, being closer to Java and JavaScript.
b. Swift has a more modern syntax, being designed specifically for iOS development.

**Type System**:
a. Dart has a flexible type system, with optional typing and type inference.
b. Swift has a strong type system, with mandatory typing and no type inference.

**Null Safety**:
a. Dart has built-in null safety support.
b. Swift has null safety support as of version 5.3.

**Platform Support**:
a. Dart can be used for both front-end (Flutter) and back-end development.
b. Swift is primarily used for iOS, macOS, watchOS, and tvOS development.
what-is-opay-ussd-code
Tags: whatisopayussdcode, opaycodes, opayussdtransfercode, opayloanussdcode
Published: 2023-02-04 12:09:22

<a href="https://www.bankussdcode.com/opay-transfer-code/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle">https://www.bankussdcode.com/opay-transfer-code/</a>
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr85quqhucackx23asss.png)
Laravel 9 with AdminLTE3
Tags: laravel, dashboard, php
Published: 2023-02-04 11:51:07

## In Nepali

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kijxpjyi71id7un9jr76.jpg)](https://youtu.be/d5aJXPRiWk0)
https://youtu.be/d5aJXPRiWk0


## In English

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doe7kd83hkrceb7npja3.jpg)](https://youtu.be/9fiUsyDxSYI)
https://youtu.be/9fiUsyDxSYI


[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doe7kd83hkrceb7npja3.jpg)](https://www.youtube.com/watch?v=KBjBFEOcTzw&t=2813s)
https://www.youtube.com/watch?v=KBjBFEOcTzw&t=2813s

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doe7kd83hkrceb7npja3.jpg)](https://www.youtube.com/watch?v=HknLYDw2ojI&t=6s)
https://www.youtube.com/watch?v=HknLYDw2ojI&t=6s
What is the Difference Between children and childNodes?
Tags: parentnode, javascript, beginners, childnodes
Published: 2023-02-04 11:48:45

What’s the difference between the ParentNode.children and Node.childNodes properties of an element?

```
var elem = document.querySelector('#my-element');
elem.children;
elem.childNodes;
```

## children
-> each element has that property,
-> is provided by Element class (that class implements Node interface),
-> contains only child elements (it has HTMLCollection type).
Hint: elements are: <div>, <span>, <a>, <svg>, <head>, <body>, etc.

## childNodes
-> each node and each element have that property,
-> is provided by Node interface,
-> contains all child nodes (it has NodeList type),
Hint: nodes are: elements, texts and comments.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cyf4qsg810ej9wdyk4yh.png)
Compile lua scripts to exe
Tags: windows, lua, exe, tutorial
Published: 2023-02-04 11:33:14

Have you ever wanted to compile your Lua scripts into Windows executables? Having trouble deploying Lua programs on other computers? Here's a quick and easy way to turn your Lua scripts into executables.

## rtc, an open source Lua to exe compiler

**rtc** is a simple command line tool to build standalone executables from your Lua scripts. A GUI front end is available for those who are resistant to the console.
**rtc** can be downloaded on the [GitHub project homepage](https://github.com/samyeyo/rtc), and available for x86 and x64 Windows platforms.
Once downloaded, put the content of the ZIP archive on your hard disk and make sure it's available on your system PATH.

## Let's build our first executable

Create a simple `hello.lua` file containing this script :
```lua
print("Hello World !")
io.stdin:read("*l")
```

Now, open a console or terminal prompt, go to the folder where you have saved the file `hello.lua` and enter the following command :

```sh
rtc hello.lua
```

And voila ! `rtc` should have produced an executable named `hello.exe`. You can run it like any other executable.

## Static executables with rtc

By default, `rtc` creates dynamic executables, meaning the Lua VM is in the library `lua54.dll` and its needed to run any program built with `rtc` (this dependency can be found along your executable or in your system PATH).

If you want to get rid of this library dependency, you can tell `rtc` to build a static executable with the `-s` option :

```sh
rtc -s hello.lua
```

The `hello.exe` file will be fatter, as it includes now the Lua VM. But be careful with those static executables, as it is strongly discouraged to require for Lua binary modules (may lead to crash). Use this option only if your program don't need any Lua binary module.

## What's next ?

This tutorial shows basic usage of `rtc`. But there is more functionnalities available, like generating Desktop executables, changing default executable icon, embedding content...

Please read the [rtc documentation](https://luart.org/doc/toolchain/rtc.html) for more on this.
New naira notes in globus
Tags: transfer, ussd, code
Published: 2023-02-04 11:06:15


[https://www.bankfanz.com/globus-bank-transfer-code/](https://www.bankfanz.com/globus-bank-transfer-code/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)


https://plaza.rakuten.co.jp/globusbankussd/diary/202302040000/
https://www.divephotoguide.com/user/globusbankussd13
https://www.producthunt.com/@globus_code3
https://www.provenexpert.com/globusbankussdcode13/
https://vocal.media/authors/globus-bank-ussd-code-13
https://wakelet.com/@globusbankussdcode13880
https://www.lifeofpix.com/photographers/globus_bank_ussd_code13/
https://rosalind.info/users/globus_bank_ussd_code13/
http://phillipsservices.net/UserProfile/tabid/43/userId/197380/Default.aspx
https://camp-fire.jp/profile/globus_bank_ussd_code13
https://app.roll20.net/users/11590429/globus-bank-ussd-code-13-s
https://seedandspark.com/user/globus-bank-ussd-code-2
https://plazapublica.cdmx.gob.mx/profiles/globus_bank_ussd13/activity
https://www.metal-archives.com/users/globus_bank_ussd_code13
https://trabajo.merca20.com/author/globus_bank_ussd_code13/
https://www.intensedebate.com/people/Globus_bank13
https://www.mifare.net/support/forum/users/globus_bank_ussd_code13
https://pinshape.com/users/2567406-globus-bank-ussd-code13#designs-tab-open
https://www.kiva.org/lender/globusbankussdcode135623
https://www.credly.com/users/globus-bank-ussd-code-13/badges
https://www.myminifactory.com/users/Globusbankussdcode13
https://www.sqlservercentral.com/forums/user/globus_bank_ussd_code13
https://guides.co/a/globus-bank-u-9688
http://foxsheets.com/UserProfile/tabid/57/userId/119879/Default.aspx
https://storium.com/user/globus_bank_ussd_code13
https://speakerdeck.com/globus_bank_ussd_code13
https://www.kompasiana.com/globusbankussdcode1395199
https://www.longisland.com/profile/globus_bank_ussd_code13
https://myanimelist.net/profile/globus_bank13
https://social.msdn.microsoft.com/Profile/globus_bank_ussd_code13
https://www.iheart.com/podcast/269-globus-bank-ussd-code-13-108312872/episode/globus-bank-ussd-code-13-108312873/
MySQL Injection Vulnerability
Published: 2023-02-04 11:03:38

## MySQL Injection Vulnerability

MySQL Injection is a type of security vulnerability that allows an attacker to execute malicious code on a database management system (DBMS) that uses the MySQL database server. This can result in the theft of sensitive information, the alteration of data, and the disruption of the database's normal operations.

## Impact of a MySQL Injection Attack

A MySQL Injection attack can have significant consequences for organizations and individuals. Some of the impacts of a successful attack include:

- Theft of confidential data, such as login credentials, customer information, and financial data
- Altering or deleting important data, causing loss of information or corruption of records
- Disrupting normal database operations, causing slow performance or complete unavailability of online services
- Damaging the reputation of an organization and its brand

## How MySQL Injection Attacks Work

MySQL Injection attacks take advantage of security vulnerabilities in the database management system to inject malicious code into the database. This code is typically executed in the form of SQL statements, which can be used to retrieve, modify, or delete data in the database.

## Prevention and Mitigation Techniques

To prevent and mitigate the impact of MySQL Injection attacks, organizations and individuals can implement the following measures:

- Use parameterized queries to prevent malicious code from being executed
- Validate user input to prevent malicious SQL statements from being entered into the database
- Implement proper error handling to prevent sensitive information from being disclosed
- Use database firewalls and intrusion detection/prevention systems (IDPS) to block malicious traffic
- Implement proper authentication and access control to limit the ability of unauthorized users to access the database

## Conclusion

MySQL Injection attacks are a serious threat to organizations and individuals that use the MySQL database server. By implementing effective security measures, organizations and individuals can protect their databases from these types of attacks and prevent the loss of sensitive information, the alteration of data, and the disruption of normal database operations.
DDOS Attack
Tags: linux, hacking, sre, devops
Published: 2023-02-04 11:01:19

A Distributed Denial of Service (DDOS) attack is a type of cyber attack that aims to overload a target system with a large amount of traffic, causing it to become unavailable to its intended users.

## Impact of a DDOS Attack

A DDOS attack can cause significant harm to organizations and individuals. The attack can:

- Disrupt business operations by making websites and online services unavailable
- Decrease website and server performance, causing slow page loading times
- Consume network and server resources, reducing their availability for legitimate users
- Damage an organization's reputation and brand image

## Types of DDOS Attacks

There are several types of DDOS attacks, including:

- Flood attacks: This type of attack aims to overwhelm a target system with a large amount of traffic, such as ICMP (ping) flood, UDP flood, and TCP flood attacks.
- Protocol attacks: This type of attack exploits weaknesses in the target system's communication protocols, such as SYN flood attacks and fragmented packet attacks.
- Application layer attacks: This type of attack targets specific applications, such as HTTP flood attacks.

## Prevention and Mitigation Techniques

To prevent and mitigate the impact of DDOS attacks, organizations can implement the following measures:

- Use firewalls and intrusion detection/prevention systems (IDS/IPS) to filter and block malicious traffic
- Implement rate limiting to control the amount of traffic that can be sent to a target system
- Use content delivery networks (CDNs) to distribute traffic across multiple servers
- Monitor network traffic and usage patterns to detect and respond to attacks quickly
- Implement security measures to prevent vulnerabilities in applications and systems from being exploited

## Conclusion

DDOS attacks are a major threat to organizations and individuals, and it is important to take measures to prevent and mitigate their impact. By implementing effective security measures, organizations can protect their systems and users from the damaging effects of DDOS attacks.
Linux FSTAB
Tags: linux, systems, ubuntu, security
Published: 2023-02-04 10:57:05

## Linux FSTAB

The `/etc/fstab` file in Linux is a configuration file that contains information about file systems. It is used to mount file systems automatically during system boot up. Each line in the file represents a separate file system and is organized into columns that provide information about the file system.

## Understanding the columns in `/etc/fstab`

The columns in the `/etc/fstab` file are as follows:

1. File system: The location of the file system (e.g. `/dev/sda1`)
2. Mount Point: The directory where the file system will be mounted (e.g. `/mnt/data`)
3. File System Type: The type of file system (e.g. `ext4`, `ntfs`, etc.)
4. Options: Mount options for the file system (e.g. `rw`, `ro`, `defaults`, etc.)
5. Dump: Specifies whether to include the file system in the backup process (0 or 1)
6. Pass: Specifies the order in which fsck checks the file system during boot up (0 or 1)

## Adding a file system to `/etc/fstab`

To add a file system to the `/etc/fstab` file, you need to know the file system location, mount point, file system type, and mount options.

For example, if you want to add an NTFS partition located at `/dev/sda1` and mount it at `/mnt/data` with read-write permissions, you would add the following line to `/etc/fstab`:`/dev/sda1 /mnt/data ntfs rw 0 0`


Note that you need to have root privileges to edit the `/etc/fstab` file.

## Mounting and unmounting file systems

You can mount and unmount file systems using the `mount` and `umount` commands. For example, to mount the `/mnt/data` file system, you would run the following command:

`sudo mount /mnt/data`


And to unmount the `/mnt/data` file system, you would run:

`sudo umount /mnt/data`


It's important to unmount a file system before disconnecting or removing the device to avoid data corruption.
Deploying Next.js apps to Vercel
Tags: nextjs, hosting, vercel
Published: 2023-02-04 10:56:36

---
title: Deploying Next.js apps to Vercel
published: true
tags: ['nextjs', 'hosting', 'vercel']
canonical_url: https://sevic.dev/nextjs-deployment-vercel/
---

This post covers the main notes for deploying to Vercel and domain setup.

### Prerequisites

- Next.js app bootstrapped

### Deployment

Add a new project, import the Git repository, choose Next.js as the framework preset, set up environment variables, and trigger the deployment.

The deployed project will be available at `<PROJECT_NAME>.vercel.app` or `<PROJECT_NAME>-<SUFFIX>.vercel.app` URL.

The deployment happens every time new changes are pushed to the production branch.

Preview will be available when changes are pushed to a branch other than the production one.

### DNS setup

A purchased domain is needed. You can buy it at [Namecheap](https://namecheap.com/) website.

Add a domain at the Project settings &rarr; Domains page.

Go to Account &rarr; Dashboard &rarr; Manage &rarr; Advanced DNS page for the purchased domain on the Namecheap website. Create two records
- `A` record with `@` host to point to Vercel server IP address with the specified value (`76.76.21.21`)
- `CNAME` record with `www` host and specified value (`cname.vercel-dns.com`)

It might take some time for the changes to apply.

### Alternative

- [Deploying Next.js apps to Netlify](https://sevic.dev/nextjs-deployment-netlify/)

### Boilerplate

Here is the [link](https://sevic.dev/nextjs-starter?ref=devto) to the boilerplate I use for the development.
Dive into DynamoDB Secondary Indexes: Understanding Flexible Querying
Published: 2023-02-04 10:42:00

**Introduction**:

**In this article**, we will be exploring DynamoDB Secondary Indexes and how they provide more flexible querying options.
**Section 1**: What is a Secondary Index?

**A Secondary Index** is an alternative view of data in a DynamoDB table, allowing you to query the data based on attributes other than the primary key.
**Section 2**: Flexible Querying

DynamoDB Secondary Indexes provide the ability to query data in a more flexible manner, allowing you to retrieve data based on non-primary key attributes.
**Section 3**: Local Secondary Index

Local Secondary Indexes are a type of secondary index that have the same partition key as the main table, but a different sort key.
**Section 3.1**: Primary Key

The primary key of a Local Secondary Index is composed of the partition key from the main table and a different sort key.
**Section 3.2**: A Different View

With a Local Secondary Index, you have a different view of the data, allowing you to retrieve data based on a different sort key than the main table.
**Section 3.3**: Faster Queries

Local Secondary Indexes can make queries faster by allowing you to retrieve data based on the sort key, reducing the amount of data that needs to be retrieved.
**Section 3.4**: Add a Creation Time

As an example, you could add a creation time attribute to your data and use a Local Secondary Index with a sort key based on the creation time attribute to efficiently retrieve all data based on when it was created.
Conclusion:

DynamoDB Secondary Indexes provide a powerful tool for retrieving data in a flexible and efficient manner. With Local **Secondary Indexes**, you can create a different view of your data, retrieve data based on non-primary key attributes, and make queries faster.


🌎🙂😎 Let's Connect!
My Twitter: [@muzeyrozcan](https://twitter.com/muzeyrozcan)
[My Substack ](https://muzeyr.substack.com/)(here I will publish more in-depth articles)
Setting up MariaDB Galera Cluster for High Availability
Tags: mariadb, sql, database, sre
Published: 2023-02-04 10:38:41

## Setting up MariaDB Galera Cluster for High Availability

MariaDB is an open-source relational database management system that is a fork of the popular MySQL database. It is designed to provide high availability and scalability for applications and services that require a highly available database backend.

In this blog, we will be discussing the setup of a MariaDB Galera Cluster, which is a multi-node database cluster that provides automatic failover and load balancing. With Galera Cluster, you can ensure that your database is always available, even in the event of a single node failure.

## Prerequisites
- At least three servers with MariaDB installed and configured
- A shared storage system (such as NFS or GlusterFS) for storing the database files
- Network connectivity between all nodes

## Step 1: Configure Galera Replication on Each Node
On each node, open the MariaDB configuration file (my.cnf) and add the following lines:

```
[mysqld]
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://<IP1>,<IP2>,<IP3>"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
```

Replace `<IP1>, <IP2>, <IP3>` with the IP addresses of your cluster nodes.

## Step 2: Start the Cluster
On the first node, start MariaDB and initialize the Galera Cluster:

```
systemctl start mysql
galera_new_cluster
```


## Step 3: Join Additional Nodes
On the remaining nodes, start MariaDB and join the cluster:

```
SET GLOBAL wsrep_cluster_address = "gcomm://<IP1>,<IP2>,<IP3>";
```


## Step 4: Verify Cluster Status
To verify the status of your cluster, log in to MariaDB on any node and run the following command:


```
SHOW STATUS LIKE 'wsrep_cluster_size';
```

The output should show the number of nodes in your cluster.

## Conclusion
In this blog, we covered the steps to set up a MariaDB Galera Cluster for high availability. With Galera Cluster, you can ensure that your database is always available, even in the event of a single node failure. Whether you're running a small application or a large enterprise service, MariaDB Galera Cluster can help you achieve high availability and scalability for your database backend.
Productivity Benefits of Integrating ChatGPT into the Front-End Development Process
Tags: chatgpt, openai, webdev, programming
Published: 2023-02-04 10:23:13


![Wall-E looking at sunset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/116vn71yx7pnut1efpnl.jpg)I've recently got some valuable assistance from ChatGPT while working on a website project, so I decided to document my experiences with it. Hopefully others will find this helpful!

[Productivity Benefits of Integrating ChatGPT into the Front-End Development Process](https://claritydev.net/blog/productivity-benefits-chatgpt-front-end-development)
What I learned : Controlled Components
Tags: react
Published: 2023-02-04 10:22:48

A controlled component is one where the form's data is handled by state. Here are the steps to create a controlled component.

1. Import the useState hook from the react library.

2. Create the state inside of the component that will handle the form data.

3. Set the value of the input to the state variable.

4. Update the state every time in changes.

```
import {useState} from "react";
function App() {
    const [country, setCountry] = useState("");
    return <select value={country} onChange={e => setCountry(e.target.value)}>
        <option>Country</option>
        <option value="france">France</option>
        <option value="spain">Spain</option>
        <option value="germany">Germany</option>
    </select>
}

```
What is smart contract ?
Tags: smartcontract
Published: 2023-02-04 10:16:25

**Introduction**
Smart contracts are self-executing digital agreements with the terms of the agreement between buyer and seller being directly written into lines of code. These contracts run on the blockchain and are secured by cryptography.

**Benefits of Smart Contracts**

1. Trust and Security: Smart contracts are stored on a decentralized blockchain network, making them tamper-proof and secure.
2. Automation: Smart contracts are self-executing, meaning they do not require intermediaries to enforce their terms.
3. Transparency: Smart contracts are public and their execution is recorded on the blockchain, making the entire process transparent.
4. Cost-effective: The removal of intermediaries results in lower transaction costs compared to traditional contracts.

**Example of a Smart Contract**
Let’s say two parties, Alice and Bob, want to enter into an agreement for the sale of a piece of land. In a traditional contract, this would involve the services of a real estate agent, lawyer, and a notary. With a smart contract, the entire process can be automated on the blockchain.

The terms of the agreement would be written into the smart contract, including the price of the land, the date of transfer, and any other conditions that need to be met. Once both parties agree to the terms, the contract is executed automatically, and the transfer of ownership of the land is recorded on the blockchain.

**Conclusion**
Smart contracts are revolutionizing the way we do business, making the process of contract execution more secure, transparent, and cost-effective. The blockchain technology that supports smart contracts provides an infrastructure for secure and transparent transactions, making it ideal for a wide range of applications beyond just financial transactions.