teleren/devto huggingface dataset:
Navigating the Dark Corners of the Internet with a Beacon of Hope
Tags: opensource, cybersecurity, internetsafety, security
Published: 2023-09-06 09:21:33

At the recently concluded #CivoNavigate conference, organized by Civo, a cloud-native service provider known for its K3s Kubernetes offering, a range of topics around cloud-native technologies were discussed. Among the standout sessions was one helmed by Oliver Pinson-Roxburgh, where he ventured into the topic of securing cloud-native infrastructures and the underbelly of the internet. Here's an exploration of some of the vital points raised during this session and a perspective on how open-source communities can potentially lead the charge in securing the digital space.


![Among the standout sessions was one helmed by Oliver Pinson-Roxburgh, where he ventured into the topic of securing cloud-native infrastructures and the underbelly of the internet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3upk05kmvjp7anlzayna.jpg)



#### **The Landscape of Cyber Vulnerabilities**

Oliver painted a rather grim picture of the current state of internet security, highlighting how widespread unsecured internet-connected systems are, and the substantial risks they pose to organizations. Through an array of real-world cases, the session navigated through incidents of unauthorized access, data breaches, and the utilization of compromised Kubernetes clusters for malicious endeavors.

#### **The Third-Party Software Dilemma**

A critical takeaway from the session was the spotlight on the vulnerabilities introduced through third-party software patches. Oliver advocated that a significant portion of security issues stem from these patches, leaving organizations at a constant risk of cyber threats.

However, I believe this narrative presents an opportunity for intervention, especially in the open-source ecosystem. While the issue with third-party patches is pronounced, the open-source community is uniquely positioned to influence the timeliness and security of these patches.

#### **An Open-Source Beacon of Hope**

This is where platforms like Mintycode come into the picture, serving as a beacon of hope amidst the prevalent gloom. By fostering a space where businesses can sponsor dedicated patches, Mintycode ensures that these patches are developed and delivered within a business-friendly timeframe. This proactive approach not only mitigates the risk associated with third-party patches but also nurtures a collaborative and secure ecosystem where stakeholders actively contribute to a safer digital space.

#### **Conclusion**

The #CivoNavigate conference served as a vivid reminder of the potential risks lurking in the digital shadows. It also brought to the forefront the collaborative spirit inherent in the open-source community, highlighting avenues where we can make a tangible difference.

As we navigate these murky waters, it's platforms like [Mintycode](https://mintycode.io/) and the collaborative efforts within the open-source community that can light the way, steering us towards a safer, more secure digital future.

Let's foster collaboration and secure our digital spaces, one patch at a time!
best seo company in patna
Tags: seo, digitalmarketing
Published: 2023-09-06 09:20:10


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5ccncwlpgpz71s5200s.png)
Vikash Technology Is best Seo Services Company In Patna, Bihar f your goal is also to be included in the top search results URLs, then you need the help of an [SEO company in Patna](https://www.vikashtechnology.com/seo-company-patna), Bihar. Your search ends with us as we are a Vikash Technology renowned name in Patna for ROI-focused SEO services.
Carpet Cleaning Qatar
Published: 2023-09-05 22:25:23

carpet cleaning service

Looking for Qatar's top [carpet cleaning company](https://www.hegyqatar.com/carpet-cleaning-qatar.html)? Hegy is the only person you need! Our qualified staff provides first-rate cleaning at reasonable prices. Experience the best carpet cleaners and cleaning services in Qatar right away. Call us right away!

In Qatar, regular deep [carpet cleaning services](https://www.pestcontrolqatar.com/carpet-cleaning.php) are essential for preserving a healthy living space. Indoor air pollution is a problem since dust collection is a common problem on many surfaces, including carpets and rugs. For those who have asthma and other respiratory diseases, this is extremely problematic. You may significantly raise the quality of the air in your house by using the usual carpet cleaning services offered in Doha, Qatar. With a customized professional carpet cleaning service, enjoy a cleaner, dust-free home.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpfac35zh9kotacwat3r.jpg)
Laravel 10 Ajax Form Submit with Validation Tutorial
Published: 2023-09-06 09:19:30



Laravel 10 application allows Ajax form submission with validation. When you submit the form, it will send an Ajax request to the server, validate the data, and return a response accordingly. You can build upon this foundation to create more complex forms and handling logic as per your project requirements. Remember to adapt this tutorial for Laravel 10 when it becomes available.


## Laravel 10 Ajax Form Submit with Validation Tutorial

Creating an Ajax form submission with validation in Laravel 10 is a common task in web development. This tutorial will guide you through the process step-by-step.

- Step 1: Set Up a New Laravel Project
- Step 2: Create a Route
- Step 3: Create a Controller
- Step 4: Create a Blade View
- Step 5: Create the FormController Methods
- Step 6: Start the Laravel Development Server

Read More - [Laravel 10 Ajax Form Submit with Validation Tutorial](https://www.tutsmake.com/laravel-10-ajax-post-form-data-with-validation/)
Wanna uncover sneaky APIs with us? 🐱‍👤 👀
Tags: api, security, learning, cybersecurity
Published: 2023-09-06 09:15:15

Hello everyone, 👋

I wanted to share an exciting opportunity with the community. We're hosting a webinar titled **"How to discover your hidden APIs"**. It's a deep dive into the intricacies of the cyber world, and I genuinely believe it's something that could benefit a lot of us here.

We've managed to onboard some top-tier cyber experts for this session. The focus will be on the intricacies of hidden/shadow/rouge APIs. These unauthorized APIs can introduce significant security risks by bypassing official channels and protocols, and hidden APIs can create a sneaky hole in your security policies.

We'll delve into the potential threats they pose, discuss best practices to identify them, and share strategies to mitigate their risks.

**Secure your seat:** [Discover Your Hidden APIs Webinar](https://blstsecurity.com/how-to-discover-your-hidden-apis-webinar)

Looking forward to a great exchange of knowledge!

Star our [Github repo](https://bit.ly/3QFgAUf) and join the discussion in our [Discord channel](https://bit.ly/3HQtlYo)!
Test your API for free now at [BLST](https://www.blstsecurity.com/?promo=blst&domain=https://dev.to/webinar_promo_daniel)!
CREATING A BUTTON USING JAVAFX
Tags: java, gui, codenewbie
Published: 2023-09-06 09:11:52

JAVAFX  is the language that is used to create windows and visual elements for java applications

To use JAVAFX to create a java window, 
1. make sure your Java class extends "Application"
 example:  public class JavaFX extends Application{}

2. implement the 'start()' method of the Application class
example: @Override
    public void start(Stage primaryStage)  {}

3. Inside the start() method, a button and call it 'btOK'
example: Button btOK = new Button();
Now give the button a text 'Ih"
example: btOK.setText("lh");

4.  To show the button the window, create a "SCENE" and put the button on the scene.
example:         Scene scene = new Scene(btOK,200,250);
defined as 'new Scene('button name', SCENE width in pixels, SCENE height in pixels)

5. To display the SCENE on the screen for the user, place the SCENE on a STAGE.
example: primaryStage.setScene(scene);

set the title of the STAGE: primaryStage.setTitle("MyJavaFX");

show the stage: primaryStage.show();

Finally, call the 'launch(args)' method. It is needed to test your application.

DONE.
Golang multinode tree with parallel search
Tags: go, tree, parallel, tread
Published: 2023-09-06 09:10:26

Golang package tree is pure golang implementation of tree with any direction nodes. Each node in the tree can be connected to many children and has many parents.


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

In the implementation of this tree, parents are no different from children. The tree element contains references to branches without specifying whether it is a parent or a child.

Each node reference in an element contains a path cost that is taken into account when calculating the path from point A to point B. The path between points A and B calculates using threads (parallel) to minimize time of find all paths.

This tree has no root. Paths in a tree can be looped.

The tree elements can store any data structure. This structure is defined when the tree is created.

See the part of code to create Tree and it Elements:

```go
t := tree.New[TreeData]("My first element")

// Create new tree elements (first element and end point element)
e := t.New("My first element")
ep := t.New("End point")

// Create children of e (first element) element
ch1, _ := e.Add(t.New("My first child"))
ch2, _ := e.Add(t.New("My second child"), tree.WayOptions{Cost: 3.0})
ch4, _ := e.Add(t.New("My fourth child"), tree.WayOptions{Cost: 3.0})

// Create sub children elements
ch3, _ := ch2.Add(t.New("Some third child"))
ch3.Add(ch4)

// Add children to ep (end point) element
ch1.Add(ch4)
ch2.Add(ep)
ch4.Add(ep)

// Set oneway path from ep (end point) to e (first element) element
ep.Add(e, tree.WayOptions{Cost: 5.0, Oneway: true})

// Print tree started from e (first element) element
fmt.Printf("\nPrint tree:\n%v\n\n", e)
```

The result of last printf:

```sh
. My first element
├── My first child, cost: 1.00
│   ├── My fourth child, cost: 1.00
│   │   ├── My first element, cost: 3.00 🡡
│   │   ├── Some third child, cost: 1.00
│   │   │   ├── My second child, cost: 1.00
│   │   │   │   ├── My first element, cost: 3.00 🡡
│   │   │   │   ├── Some third child, cost: 1.00 🡡
│   │   │   │   └── End point, cost: 1.00
│   │   │   │       ├── My second child, cost: 1.00 🡡
│   │   │   │       ├── My fourth child, cost: 1.00 🡡
│   │   │   │       └── My first element, cost: 5.00 (one way road) 🡡
│   │   │   └── My fourth child, cost: 1.00 🡡
│   │   ├── My first child, cost: 1.00 🡡
│   │   └── End point, cost: 1.00 🡡
│   └── My first element, cost: 1.00 🡡
├── My second child, cost: 3.00 🡡
├── My fourth child, cost: 3.00 🡡
└── End point, cost: 5.00 (way not allowed) 🡡
```

See the code and more descriptions and example at: https://github.com/kirill-scherba/tree
行为型设计模式-观察者(发布订阅) Observer
Tags: designpatterns
Published: 2023-09-06 08:49:03


### 简介

也叫做发布/订阅模式，多个观察者可订阅一个主题对象，当主题状态发生变化时会通知所有已订阅的观察者，观察者可自由处理。

### 角色

- Subject/Publisher 主题/发布者
    
    维护已订阅的观察者
    
    通知已订阅的观察者
    
- 抽象Subscribe 订阅者
    
    定义订阅者接口
    
- 具体Subscribe 订阅者
    
    实现订阅者通用接口，并实现各自逻辑
    

### 类图

![类图](https://deb-gmi.oss-cn-beijing.aliyuncs.com/img/20210409120536.png)

### 代码

```php
class Subject implements \SplSubject
{
    public $state;

    private $observers;

    public function __construct()
    {
        $this->observers = new \SplObjectStorage();
    }

    public function attach(\SplObserver $observer): void
    {
        echo "Subject: Attached an observer.\n";
        $this->observers->attach($observer);
    }

    public function detach(\SplObserver $observer): void
    {
        $this->observers->detach($observer);
        echo "Subject: Detached an observer.\n";
    }

    public function notify(): void
    {
        echo "Subject: Notifying observers...\n";
        foreach ($this->observers as $observer) {
            $observer->update($this);
        }
    }

    public function someBusinessLogic(): void
    {
        echo "\nSubject: I'm doing something important.\n";
        $this->state = rand(0, 10);

        echo "Subject: My state has just changed to: {$this->state}\n";
        $this->notify();
    }
}

class ConcreteObserverA implements \SplObserver
{
    public function update(\SplSubject $subject): void
    {
        if ($subject->state < 3) {
            echo "ConcreteObserverA: Reacted to the event.\n";
        }
    }
}

class ConcreteObserverB implements \SplObserver
{
    public function update(\SplSubject $subject): void
    {
        if ($subject->state == 0 || $subject->state >= 2) {
            echo "ConcreteObserverB: Reacted to the event.\n";
        }
    }
}
$subject = new Subject();

$o1 = new ConcreteObserverA();
$subject->attach($o1);

$o2 = new ConcreteObserverB();
$subject->attach($o2);

$subject->someBusinessLogic();
$subject->someBusinessLogic();

$subject->detach($o2);

$subject->someBusinessLogic();
```

output:

```
Subject: Attached an observer.
Subject: Attached an observer.

Subject: I'm doing something important.
Subject: My state has just changed to: 2
Subject: Notifying observers...
ConcreteObserverA: Reacted to the event.
ConcreteObserverB: Reacted to the event.

Subject: I'm doing something important.
Subject: My state has just changed to: 0
Subject: Notifying observers...
ConcreteObserverA: Reacted to the event.
ConcreteObserverB: Reacted to the event.
Subject: Detached an observer.

Subject: I'm doing something important.
Subject: My state has just changed to: 8
Subject: Notifying observers...
```
AntDB-Oracle Compatibility Developer’s Manual P3–26
Published: 2023-09-06 08:40:14

##### SET TRANSACTION

**Name**

SET TRANSACTION -- set the characteristics of the current transaction

**Summary**

SET TRANSACTION transaction\_mode

Transaction\_mode is one of the following five options

ISOLATION LEVEL { SERIALIZABLE \| READ COMMITTED }

READ WRITE \| READ ONLY

**Description**

SET TRANSACTION sets the characteristics of the current transaction and has no effect on subsequent transactions. The allowed transaction processing characteristics are transaction isolation level and transaction access mode (read/write or read-only). When other transactions are running concurrently, the transaction isolation level determines the data that the transaction can see.

READ COMMITTED

statement can only see the records that were committed before this statement was run. This is the default setting.

SERIALIZABLE

Until the first query or data modification statement is executed in a transaction, all statements in the current transaction can only see the committed rows.

The transaction isolation level cannot be changed after the first query or data modification statement (including SELECT, INSERT, DELETE, UPDATE, or FETCH) in the transaction has run.

The transaction access mode determines whether the transaction is in read/write mode or read-only mode. Read/write mode is the default condition. When the transaction is in read-only mode, the following SQL commands are not allowed: INSERT, UPDATE, and DELETE commands if they are writing to a non-temporary table; all CREATE, ALTER, and DROP commands. COMMENT, GRANT, REVOKE, TRUNCATE; and if the commands executed include those listed above, the EXECUTE command is also included. This is a high-level concept about read-only that does not prevent all write operations to disk.
Laravel 10 Form Validation Example Tutorial
Tags: laravel, form, validation, laravel10
Published: 2023-09-06 08:47:19

Laravel is known for its built-in form validation features, making it easy to validate form data before saving it to the database or processing it further. 

## How to Validate Form in Laravel 10

Here's a step-by-step guide on how to validate a form in Laravel 10:

- Step 1: Set Up a Laravel Project
- Step 2: Create a Form
- Step 3: Create a Validation Request
- Step 4: Use the Validation Request in Your Controller
- Step 5: Display Validation Errors in the View
- Step 6: Display Success Messages
- Step 7: Routes

Read More - [How to Validate Form in Laravel 10](https://www.tutsmake.com/laravel-10-form-validation-example/)
行为型设计模式-中介者 Mediator
Tags: designpatterns
Published: 2023-09-06 08:44:25



### 简介

通过引入一个中介者，将对象之间两两交互的情景，改为每个对象都是与中介者交互，即将网状关系改成了星状关系。缺点是中介者逻辑会很臃肿。

当系统中出现多对多的情况时，应该先考虑设计是否合理，而尽量不要直接使用中介者。

### 角色

- 抽象Mediator中介者
- 具体Mediator中介者
- 抽象Component
- 具体Component

### 类图

中介者需要了解所有Component，而且notify中要编写处理所有可能发生的情况，Mediator是一个非常臃肿的类。

![类图](https://deb-gmi.oss-cn-beijing.aliyuncs.com/img/20210409005714.png)

### 代码

```php
interface Mediator
{
    public function notify(object $sender, string $event): void;
}

class ConcreteMediator implements Mediator
{
    private $component1;

    private $component2;

    public function __construct(Component1 $c1, Component2 $c2)
    {
        $this->component1 = $c1;
        $this->component1->setMediator($this);
        $this->component2 = $c2;
        $this->component2->setMediator($this);
    }

    public function notify(object $sender, string $event): void
    {
        if ($event == "A") {
            echo "Mediator reacts on A and triggers following operations:\n";
            $this->component2->doC();
        }

        if ($event == "D") {
            echo "Mediator reacts on D and triggers following operations:\n";
            $this->component1->doB();
            $this->component2->doC();
        }
    }
}

class BaseComponent
{
    protected $mediator;

    public function __construct(Mediator $mediator = null)
    {
        $this->mediator = $mediator;
    }

    public function setMediator(Mediator $mediator): void
    {
        $this->mediator = $mediator;
    }
}

class Component1 extends BaseComponent
{
    public function doA(): void
    {
        echo "Component 1 does A.\n";
        $this->mediator->notify($this, "A");
    }

    public function doB(): void
    {
        echo "Component 1 does B.\n";
        $this->mediator->notify($this, "B");
    }
}

class Component2 extends BaseComponent
{
    public function doC(): void
    {
        echo "Component 2 does C.\n";
        $this->mediator->notify($this, "C");
    }

    public function doD(): void
    {
        echo "Component 2 does D.\n";
        $this->mediator->notify($this, "D");
    }
}

$c1 = new Component1();
$c2 = new Component2();
$mediator = new ConcreteMediator($c1, $c2);

echo "Client triggers operation A.\n";
$c1->doA();

echo "\n";
echo "Client triggers operation D.\n";
$c2->doD();
```

output:

```
Client triggers operation A.
Component 1 does A.
Mediator reacts on A and triggers following operations:
Component 2 does C.

Client triggers operation D.
Component 2 does D.
Mediator reacts on D and triggers following operations:
Component 1 does B.
Component 2 does C.
```
AntDB-Oracle Compatibility Developer’s Manual P3–27
Published: 2023-09-06 08:44:07

##### TRUNCATE

**Name**

TRUNCATE -- clear a table

**Summary**

TRUNCATE TABLE name

**Description**

The TRUNCATE command quickly clears all rows from a table and does the same thing as an unqualified DELETE statement, but it is faster to execute because it does not actually scan the table. This command is very useful for operations like clearing the contents of a large table

**argument**

name

The name of the table to be truncated (which can be referenced in a schema-qualified manner).

**Note**

The TRUNCATE command cannot be used if there is a foreign key reference from another table to the table to be truncated. In this case, the check for validity operation will require a table scan, which we do not recommend in practice.

The TRUNCATE command will not trigger any ON DELETE triggers defined by the user on the table.

**Example**

Truncate table bigtable.

```
TRUNCATE TABLE bigtable; 
```
行为型设计模式-迭代器 Iterator
Tags: designpatterns
Published: 2023-09-06 08:40:58



### 简介

提供一种方法顺序访问一个聚合对象中的各个元素，而又不需要暴露该对象的内部表示。

### 角色

- Iterator抽象迭代器
- Collection抽象集合
- ConcreteIterator具体迭代器
- ConcreteCollection具体集合

### 类图

如图，Iterator和IterableCollection定义了操作接口，ConcreteIterator实现类持有ConcreteCollection的引用，默默实现迭代的逻辑。

![类图](https://deb-gmi.oss-cn-beijing.aliyuncs.com/img/20210409003813.png)

### 代码

```php
use Iterator;

class AlphabeticalOrderIterator implements \Iterator
{
    private $collection;

    private $position = 0;

    private $reverse = false;

    public function __construct($collection, $reverse = false)
    {
        $this->collection = $collection;
        $this->reverse = $reverse;
    }

    public function rewind()
    {
        $this->position = $this->reverse ?
            count($this->collection->getItems()) - 1 : 0;
    }

    public function current()
    {
        return $this->collection->getItems()[$this->position];
    }

    public function key()
    {
        return $this->position;
    }

    public function next()
    {
        $this->position = $this->position + ($this->reverse ? -1 : 1);
    }

    public function valid()
    {
        return isset($this->collection->getItems()[$this->position]);
    }
}

class WordsCollection implements \IteratorAggregate
{
    private $items = [];

    public function getItems()
    {
        return $this->items;
    }

    public function addItem($item)
    {
        $this->items[] = $item;
    }

    public function getIterator(): Iterator
    {
        return new AlphabeticalOrderIterator($this);
    }

    public function getReverseIterator(): Iterator
    {
        return new AlphabeticalOrderIterator($this, true);
    }
}

$collection = new WordsCollection();
$collection->addItem("First");
$collection->addItem("Second");
$collection->addItem("Third");

echo "Straight traversal:\n";
foreach ($collection->getIterator() as $item) {
    echo $item . "\n";
}

echo "\n";
echo "Reverse traversal:\n";
foreach ($collection->getReverseIterator() as $item) {
    echo $item . "\n";
}
```

output:

```
Straight traversal:
First
Second
Third

Reverse traversal:
Third
Second
First
```
How to Install Laravel 10 in Windows, macOS, Ubuntu
Tags: laravel, windows, macos, ubuntu
Published: 2023-09-06 08:38:44

Installing Laravel 10 on Windows, macOS, or Ubuntu is a straightforward process, but the steps can vary slightly depending on your operating system. Below, I'll provide you with a step-by-step tutorial for each of these platforms:

## Prerequisites

Before installing Laravel 10, you need to ensure that you have the following prerequisites installed on your system:

PHP: Laravel requires PHP to be installed on your system. Make sure you have PHP 7.4 or higher installed.

Composer: Composer is a PHP package manager and is essential for managing Laravel dependencies. Install Composer by following the instructions on the Composer website.

Node.js and npm: Laravel Mix, which is used for front-end asset compilation, requires Node.js and npm. You can download and install them from the Node.js website.

Git: Git is used for version control and is often needed for Laravel projects. Download and install Git from the Git website.

## How to Install Laravel 10 in Windows, macOS, Ubuntu

- Installing Laravel 10 On Windows:
- On macOS and Ubuntu:

[Read More How to Install Laravel 10, 9, 8 in Windows, macOS, Ubuntu
](https://www.tutsmake.com/install-laravel-on-windows-with-composer)