teleren/devto huggingface dataset:
RDBMS Vs DBMS
Tags: apacheage, dbms, rdbms
Published: 2023-07-26 08:32:33

## What Is DBMS?

A Database Management System (DBMS) is a software developed in the 1960s for storing, managing, and manipulating data. It handles tasks like defining, creating, modifying, and managing databases, enabling business applications to extract and preserve relevant data.
XML, File system, window registry, etc are some of the examples of database management systems.

## What Is RDBMS?

RDBMS, or relational database management system, is a more powerful DBMS system. It was established in the 1970s.It is a robust data management system, utilized extensively all over the world.
Oracle, MYSQL, SQL Server, etc are some of the examples of Relational Database Management Systems.


Even though DBMS and RDBMS are both used to store data in physical databases, there are several notable distinctions between the two.

_**Below are some of the parameters based on which DBMS and RDBMS can be differentiated:**_


**Data storage and structure**

- In DBMS, files are used to store data. Either a hierarchical structure or a navigational structure is used to organise it.
- Data is kept in tables in RDBMS. There is no hierarchy; rather, a relational approach is used. The headers are in the columns, and the values are in the rows.


**Number of Users**

- A single user is all that a database management system can accommodate.
- Multiple users can access the databases using relational database management systems.


**Hardware and Software Requirement**

- Minimum hardware and software specifications are needed for DBMS.
- RDBMS has more complex software and hardware requirements than traditional DBMS.


**Data Client-Server**

- The client-server architecture is not supported by DBMS.
- RDBMS supports client-server architecture


**Data Redundancy**

- The DBMS version adds data repetition and redundancy.
- RDBMS uses keys and indexes to eliminate data redundancy hence saves time and resources.


**Data Relationships**

- There are no relationships between the data maintained in the database management system.
- RDBMS establishes relationships between data stored in tables using foreign keys for relating tables with each other.


**Distributed Databases**

- Database distribution is not supported by DBMSs.
- Distributed database functionality is provided by RBMS.


## Conclusion:

The structural differences between DBMS and RDBMS are significant. Since DBMS was the first database management system, it lacks capabilities for data security, data integrity, access to data, multiple-user access, and quicker data retrieval. The RDBMS ensures there are no data redundancies or inconsistencies and is quicker and more effective. In short, there is no absolute standard that establishes RDBMS as the greatest type of database management system available. Despite the fact that there are various kinds of database management systems, RDBMS is by far the best and moves more quickly than DBMS.
What is GPT-4 and How it can be used in Fintech Industry
Tags: gpt3, gpt4, finance, gpt
Published: 2023-07-26 08:31:05

In the FinTech industry, GPT-4 could be applied in various ways to improve efficiency, customer experience, and decision-making processes:

Customer Support and Chatbots:GPT-4 could be integrated into financial institutions' [customer support systems](https://www.optisolbusiness.com/portfolio/call-center-audio-analytics) to provide more sophisticated and natural language interactions with customers. It might handle complex inquiries, help troubleshoot issues, and offer personalized financial advice.

Risk Assessment and Fraud Detection: GPT-4 could analyze vast amounts of data to assess risks associated with loans, investments, or other financial products. It may also aid in [detecting fraudulent activities](https://www.optisolbusiness.com/portfolio/insurance-claims-analytics-for-anomaly) by recognizing patterns and anomalies in transactions.

Financial Analysis and Market Insights: The model could assist financial analysts by processing and interpreting large datasets, economic indicators, and market news to provide real-time insights and predictions.

Personalized Financial Planning:GPT-4 could analyze individual financial data and offer personalized financial planning recommendations, considering factors like income, spending habits, and investment preferences.

Automated Compliance and Regulation:GPT-4 might be employed to ensure compliance with complex financial regulations by interpreting legal documents and providing guidance on adherence.

Trading and Investment Strategies:Financial firms could leverage GPT-4 to develop and optimize trading algorithms and investment strategies by analyzing historical market data and predicting potential trends.

Credit Risk Assessment:GPT-4 could assist in evaluating credit risk for borrowers more accurately by considering a broader range of factors and providing a more comprehensive risk profile.

However, it's essential to remember that as an AI language model, GPT-4 would still have limitations. For instance, ethical concerns, data privacy, and potential biases in the training data used to create the model would require careful consideration and management.
Driving Digital Transformation and Adopting Quality Coaching: Insights from Anne Marie Charrett
Tags: webdev, digitaltransformation, qualitytesting, testing
Published: 2023-07-26 08:22:37

Software testing has acquired a new significance in today’s quickly changing digital environment, going beyond ensuring product quality to profoundly impact businesses. Anne Marie Charrett, a renowned testing evangelist and author of the ‘Quality Coach Book’, recently sat down with the LambdaTest team to share valuable insights on testing’s role in digital transformation and the importance of quality coaching at EuroStar 2023 held in Antwerp, Belgium.

During our conversation with Anne Marie, one point stood out clearly: quality is a responsibility shared by everyone, including leadership.”Senior leaders must actively participate in quality discussions and make them a crucial component of efforts to implement digital transformation,” she said. Companies can avoid considering quality as an afterthought by incorporating the appropriate stakeholders early on.

*“Quality is everyone’s responsibility, and that includes leadership. Leaders are responsible for making decisions about quality and creating a space for conversations about quality all the time.”*

Anne Marie also emphasized the importance of utilizing present-day technology, especially automation. By enabling teams to have fruitful talks about enhancing code quality and reducing manual processes, automation not only improves quality but also fosters collaboration.

*“There’s so much value we can get from tools and automation. It helps engineers connect and have conversations about improving quality at a code level.”*

A quality coach, in Anne Marie’s opinion, is essential in helping teams accept responsibility for their own quality. They point out gaps, provide guidance and insights, and enable teams to embrace test automation. They also provide continuing support.

*“The role of a quality coach is to help the team see how to move forward in quality improvement. They facilitate the identification of gaps and support the team in solving those problems.”*

Anne strongly feels when it comes to KPIs in testing, certain metrics like test coverage and team engagement are really valuable. Further she believes that looking at a diversity of metrics ensures a better team performance and faster quality checks.

This insightful interview with Anne Marie sheds light on the vital role of testing in digital transformation, the strategic implementation of automation, the significance of non-functional testing, and the responsibilities of a quality coach. Her expertise and experiences provide valuable guidance for professionals seeking to enhance their understanding and practices in these areas.

Watch the video to hear the full interview and unlock the secrets to drive successful digital transformation through effective testing and quality coaching.

{% youtube m07ts4wSur4 %}
Kotlin Code Smell 22 - Accidental Methods on Business Objects
Tags: kotlin, codesmells, cleancode, programming
Published: 2023-07-30 05:36:14

---
title: Kotlin Code Smell 22 - Accidental Methods on Business Objects
published: true
date: 2023-07-26 08:00:09 UTC
tags: kotlin,codesmells,cleancode,programming
canonical_url: https://yonatankarp.com/kotlin-code-smell-22-accidental-methods-on-business-objects
---

Adding code for persistence, serialization, displaying, importing, and exporting to an object can lead to bloating its protocol and create unnecessary coupling.

## Problem

- Readability

- Coupling

- Maintainability

## Solution

1. Keep your objects clean by focusing on their core responsibilities.

2. Decouple business objects from unrelated concerns.

3. Separate accidental concerns: Move functionality related to a specific dedicated objects (e.g. Persistence, Formatting, Serialization).

4. Keep the essential protocol of your objects concise and focused.

## Examples

- Persistence

- Identifiers

- Serialization

- Formatting

## Sample Code

### Wrong

```
class Car(
    private val company: Company,
    private val color: Color,
    private val engine: Engine
) {
    fun goTo(coordinate: Coordinate) {
        move(coordinate)
    }

    fun startEngine() {
        engine.start()
    }

    fun display() {
        println("This is a $color $company")
    }

    fun toJson(): String {
        return "json"
    }

    fun updateOnDatabase() {
        database.update(this)
    }

    fun getId(): Int {
        return id
    }

    fun fromRow(row: Row) {
        database.convertFromRow(row, this)
    }

    fun forkCar() {
        // Concurrency is accidental
        ConcurrencySemaphoreSingleton.getInstance().forkCar(this)
    }

    // ...
}

```

### Right

```
class Car(
    private val company: Company,
    private val color: Color,
    private val engine: Engine
) {
    fun goTo(coordinate: Coordinate) {
        move(coordinate)
    }

    fun startEngine() {
        // Code to start the engine - all logic was extracted
        engine.start()
    }

    // ...
}

```

## Exceptions

- In some cases, certain frameworks may force us to inject code related to unrelated concerns into our objects (e.g., identifiers). In such cases, it is advisable to explore better frameworks that allow for cleaner designs.

## Conclusion

It is common to encounter business objects with mixed responsibilities. However, it is essential to consider the consequences and coupling that such designs can introduce.

* * *

I hope you enjoyed this journey and learned something new. If you want to stay updated with my latest thoughts and ideas, feel free to register for my [**newsletter**](https://yonatankarp.com/newsletter). You can also find me on [**LinkedIn**](https://www.linkedin.com/in/yonatankarp/) or [**Twitter**](https://twitter.com/yonatan_karp). Let's stay connected and keep the conversation going!

* * *

## Credits

- [Code Smell 31 - Accidental Methods on Business Objects](https://maximilianocontieri.com/code-smell-31-accidental-methods-on-business-objects) by [Maxi Contieri](https://hashnode.com/@mcsee)
Laravel 10 Upload Image To Storage Folder Part 2
Published: 2023-07-26 07:56:15

<?php

namespace App\Http\Controllers;

use App\Helper\ImageManager;
use App\Models\Image;
use Illuminate\Http\Request;
class TutorialController extends Controller
{   
    use ImageManager;
    public function index()
    {
        return view('welcome');
    }
    public function store(Request $request)
    {
    $request->validate([
            'image' => 'required|image|mimes:jpeg,png,jpg|max:2048',
        ]);
        $path = storage_path('images/');
        !is_dir($path) &&
            mkdir($path, 0777, true);
        if($file = $request->file('image')) {
            $fileData = $this->uploads($file,$path);
            Image::create([
                'name' => $fileData['fileName'],
                'type' => $fileData['fileType'],
                'path' => $fileData['filePath'],
                'size' => $fileData['fileSize']
            ]);
        }
        return redirect()
            ->back()
            ->with('success', 'Image successfully upload.');
    }
}

app/Helper/ImageManager.php
--------
namespace App\Helper;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
trait ImageManager {
    public function uploads($file, $path)
    {
        if($file) {
       $fileName   = time() . $file->getClientOriginalName();
       Storage::disk('public')->put($path . $fileName, File::get($file));
       $file_name  = $file->getClientOriginalName();
            $file_type  = $file->getClientOriginalExtension();
            $filePath   = $path . $fileName;
            return $file = [
                'fileName' => $file_name,
                'fileType' => $file_type,
                'filePath' => $filePath,
                'fileSize' => $this->fileSize($file)
            ];
        }
    }
    public function fileSize($file, $precision = 2)
    {   
        $size = $file->getSize();
        if ( $size > 0 ) {
            $size = (int) $size;
            $base = log($size) / log(1024);
            $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB');
            return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];
        }
        return $size;
    }
}

https://www.laravelia.com/
Unsubscribe, un jeu d’enfant avec takeUntilDestroyed
Tags: angular, rxjs, observable, unsubscribe
Published: 2023-07-26 07:50:00

---
title: Unsubscribe, un jeu d’enfant avec takeUntilDestroyed
published: true
description: L’opérateur rxjs `takeUntilDestroyed` permet de complete automatiquement un observable lorsque le contexte d'appel est détruit. Cela contribue donc à éviter les fuites de mémoire et améliore l’expérience de dev en apportant un code plus lisible.
tags: Angular, Rxjs, Observable, unsubscribe
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2ws3673pm8ijjpycpi6.png
published_at: 2023-07-26 7:50 +0000
---

Avoir un moyen d'unsubscribe à une observable facilement ça vous dis ? 

En effet, tout développeur Angular c’est un jour trouvé confronté à répéter du code pour unsubscribe à des observables qui ont été subscribes manuellement (c’est-à-dire sans utiliser le pipe async fourni par Angular qui s’occupe d’unsubscribe automatiquement à notre place).

Et oui, qui dit observable dit subscribe et qui dit subscribe dit unsubscribe ! Tout oubli d'unsubscribe implique une fuite de mémoire et les pertes de performance qui vont avec.

Unsubscribe peut vite devenir un processus répétitif qui va réduire la lisibilité de notre code. Mais ça c’était avant ! 

Depuis Angular [v16](https://github.com/angular/angular/releases/tag/16.0.0) l'opérateur `takeUntilDestroyed` va nous permettre de nous simplifier la vie.

Pour l’utiliser, c’est simple, tu l’importes depuis `@angular/core/rxjs-interop` et tu le chaines à une observable. Par exemple :

```tsx
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({ ... })
export class ExempleComponent {

  constructor() {
    interval(1000).pipe(takeUntilDestroyed()).subscribe(console.log);
  }
}
```

L'opérateur `takeUntilDestroyed` est conçu pour être utilisé à l'intérieur d'un contexte d'injection. C’est pourquoi il est utilisé dans le `constructeur` de `ExempleComponent`

Si tu souhaites utiliser l'opérateur en dehors d’un contexte d’injection, tu dois lui passer explicitement le fournisseur [DestroyRef](https://angular.io/api/core/DestroyRef). Voici un exemple : 

```tsx
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
  ...
})
export class ExempleComponent implements OnInit {
  private destroyRef = inject(DestroyRef);

  ngOnInit() {
    interval(1000).pipe(
      takeUntilDestroyed(this.destroyRef)
    ).subscribe(console.log);
  }
}
```

En conclusions, on a vu que l’opérateur `takeUntilDestroyed` nous permet de complete automatiquement et simplement un observable lorsque le contexte d'appel est détruit. Cela contribue donc à éviter les fuites de mémoire et améliore l’expérience de dev en apportant un code plus lisible.

Merci d'être ici 😇 n'oublier pas de liker, commenter ou partager ça m'aide à continuer de poster du contenu 👨🏻‍💻
Achilles numbers generation
Tags: codewars, achilles, oeis, solution
Published: 2023-07-26 07:34:34

Today I solved "Slay Achilles!" codewars task.

[Achilles numbers](https://en.wikipedia.org/wiki/Achilles_number) can be found on on-line encyclopedia of integer sequences [A052486](https://oeis.org/A052486)

https://www.codewars.com/kata/5708c90cd531cdfecf00147c/javascript

Here is my code that is checking if number is Achilles one, and prints 10k first integers with Achilles check.

```js
function factors(n) {
  let max = Math.floor(Math.sqrt(n));
  let res = [];
  for (let i = 2; i <= max; ++i) {
    if (n % i === 0) {
      res.push(i);
      n /= i;
      max = Math.floor(Math.sqrt(n));
      i = (Math.min(...res) || 2) - 1;
    }
  }
  res.push(n);
  return res;
}

const groupToMap = (array, cb = el => el) => {
  const map = new Map();
  array.map((el, i) => {
    const key = cb(el, i);
    if (map.has(key)) {
      map.get(key).push(el);
    } else {
      map.set(key, [el]);
    }
  });
  return map;
};

function gcd(a, b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  if (b > a) {
    [a, b] = [b, a];
  }
  while (1) {
    if (b == 0) return a;
    a %= b;
    if (a == 0) return b;
    b %= a;
  }
}

const isAchilles = n => {
  const f = factors(n);
  const grouped = groupToMap(f);
  const values = [...grouped.values()];
  const gcdLen = values.map(arr => arr.length).reduce(gcd);
  if (gcdLen !== 1) return false;
  return values.length > 1 && values.every(arr => arr.length > 1);
};

for (let i = 0; i < 1e4; ++i) {
  console.log(i, isAchilles(i));
}
```

In this code I used few already created functions:
- `factors` - breaks integer number into factors
- `groupToMap` - group array elements ([MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/groupToMap) experimental feature yet)
- `gcd` - calculates Greatest Common Divisor

Here you can play with that code:

[Instacode playground](https://instacode.app/run/FAMwrgdgxgLglgewgAhAQ1ggTgZwBQQCUyA3sMsgDYCmMyAtmgB7IC8yAsmjABYB0ISgmx4uvPjgCOWGAUKEA3OSq1kWajjbIA2gF0lFENmR4adOFoBMC5BYA87RkxsBqF3GJkKFOCBMoAUls2VnYABk9lbzUNPgAHMBwePA8DaOQUAHp2ODTopy0xfkFhLFFufikZOUUo7wt2cvF6OAg8Pg71HGIAHx7kS2IAWmQARjzkAF9laYou+MTkojT1GDAsFC6laeAoJBw6AHMsBDA4gBUELjitPDQsLDQATwAaZCgAIy1qSjYAPmQP2IrABXne+zojBu7Ag1AA7pw0HE8LUKPdHk8+FC8Hgfm8PP9SHU9hADsgANbUJ5aT64yj41H1Px4KF8HhofCUp7yInpBhIviHWh4LmEBZJOmMiiTQGUHDUXnpVny2Rct7aH66KVTGaM1brFBQ7ZKUCQWCIFCHKAAEzubw+kR8zLQyDsyAiyBd7CGaDSvhMXzdHq+3o+fuZXwBaEd3m0aHtui02g+bzQ+hmyjhPDgNBMoxjToDIXdxH1G09ExdAXYYbq-ruxY9ZZQteiX2rFYzOxJZLgOAAglBs5QaJoYYSwT26H52OhMLg5Gkp8hjqc4tRrVpV2dLtc8CBGcuAG5oShgDRJjqCk5nDd8E9njQo9MUZdW60AGWoKHYD-POCxJE7geQl0T4GgIEOXgxXUa0wCgag8HfRl63fL8UAAQlCMZS1oA1UFPeUVjw8s-1iCCoJ4ZAAVGZAADI6OQMiAOoI9qCwJ5gKwUCHnA79KOonDjWAUBjFMVQGndGx7DGagABZXHcGMewQGhwIQQ4UnxAchxzUcUnkbZgCAA)
Easy Download and Save Images in C#
Tags: csharp
Published: 2023-07-26 07:24:19

Here is the code 

```csharp
using File = System.IO.File;

namespace Demo;
class Program
{
    public async static Task Main(string[] args)
    {
        string fileToWriteTo = "myimage.jpg";
        string urlImage = "https://g7y6h3a7.rocketcdn.me/wp-content/uploads/2020/03/dummy-image-square.jpg";
        using var httpClient = new HttpClient();
        await using var input = await httpClient.GetStreamAsync(urlImage);
        using Stream streamToWriteTo = File.Open(fileToWriteTo, FileMode.Create);
        await input.CopyToAsync(streamToWriteTo);
    }
}



```
Laravel File Upload
Published: 2023-07-26 07:16:03


**Validasi Image**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/al45q7dn1y1ki3e3b7uq.JPG)
**Memeriksa File Upload**
if($request->hasFile('foto')){
		// ada file yang diupload
	}else{
		// tidak ada file yang diupload
	}
**Nama File Unik**
$filenameWithExt = $request->file('foto’)->getClientOriginalName();
$filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);
$extension = $request->file('foto’)->getClientOriginalExtension();
$filenameSimpan = $filename.'_'.time().’.'.$extension;

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y53t4wuxujscnfegdnsu.JPG)
Nhà cái uy tín
Tags: webdev, javascript, programming
Published: 2023-07-26 07:13:31

Lý giải những thắc mắc thường gặp xoay quanh nhà cái uy tín 
Những người chơi mới lần đầu tham gia trải nghiệm các trò chơi trực tuyến sẽ khó tránh khỏi băn khoăn, bỡ ngỡ. Do đó không ít thắc mắc đã được đặt ra xoay quanh hoạt động của những nhà cái uy tín. Nếu mọi người cũng đang có vài thắc mắc thì hãy theo dõi bài viết sau xem có phải là những điều mình đang cần giải đáp không nhé!

Những thắc mắc thường gặp về nhà cái uy tín
Những câu hỏi dành cho nhà cái uy tín
Do ngày nay có quá nhiều nhà cái xuất hiện trên thị trường nên khó tránh khỏi việc người chơi đặt ra các câu hỏi. Sau đây là những thắc mắc về nhà cái trực tuyến thường gặp nhất:
Những nhà cái trực tuyến có gian lận không?
Tùy vào từng địa chỉ mà anh em tham gia thì tình trạng này có thể xảy ra hoặc không. Anh em nếu đăng ký chơi game tại các nhà cái uy tín thì hoàn toàn không cần lo vấn đề này. Nhưng chúng tôi sẽ không đảm bảo hầu hết các nhà cái trên thị trường hiện nay đều uy tín. Vì thế mọi người hãy tìm hiểu kỹ trước khi tham gia nhé!
Người chơi có thể luôn thắng tại nhà cái trực tuyến hay không?
Các trò chơi đều mang tính chất may rủi là chủ yếu. Do đó anh em nếu đủ may mắn thì thắng liên tiếp là việc đương nhiên. Tuy nhiên thường đối với các trường hợp này thì nhà cái sẽ rà soát để đảm bảo độ công bằng cho toàn bộ người chơi. Bởi hiện có không ít người chơi cố tình sử dụng tool hack để thắng nhiều ván game liên tiếp.
Nhà cái uy tín có cho phép cá cược trên điện thoại không?
Hầu hết các nhà cái uy tín tại Việt Nam hiện nay đều đã cung cấp thêm những ứng dụng cá cược trên điện thoại. Do đó anh em có thể trải nghiệm dễ dàng, thuận tiện bất cứ lúc nào. Hơn nữa, việc đặt cược trên điện thoại cũng giúp ngăn ngừa các tình trạng người dùng bị chặn truy cập vào nhà cái. Chưa kể, anh em cũng được bảo vệ dữ liệu cá nhân tối ưu hơn.
Nên làm gì khi bị chặn truy cập vào nhà cái?
Điều này hẳn không gây nhiều bất ngờ đối với các game thủ lâu năm. Bởi lẽ tình trạng nhà mạng chặn link truy cập ở Việt Nam diễn ra rất thường xuyên. Điều này bắt nguồn từ việc nhà nước Việt Nam chưa hợp pháp hóa các hình thức cờ bạc, dù là online hay trực tiếp đều sẽ bị cản trở và tạo sức ép ngay.
Anh em khi gặp tình trạng này có thể thay đổi địa chỉ IP, hoặc cài đặt app 1.1.1.1. Ứng dụng này hiện có mặt trên cả Appstore và CH Play. Anh em nếu đăng nhập bằng máy tính thì có thể tải AnonymoX thì sẽ có thể truy cập lại bình thường.

Có nhiều cách để vào trang web bị chặn
Kết luận
Trên đây là toàn bộ thông tin lý giải các thắc mắc có liên quan đến hoạt động của [nhà cái uy tín](https://topnhacaiuytinnhat.net/). Anh em có thể áp dụng những cách khắc phục nếu gặp tình trạng chặn truy cập như trên. Nếu mọi người muốn biết thêm nhiều thông tin thì hãy theo dõi các bài viết tiếp theo của chúng tôi nhé!