teleren/devto huggingface dataset:
New Things Added - Laravel 9.14 Released
Tags: laravel, php, webdev, programming
Published: 2022-05-26 13:49:39

Let's get started quickly I found new things in Laravel 9.14 Released I wanted to share with you.

- Migration table comments for MySQL and Postgres
https://github.com/laravel/framework/pull/42401

the ability to add table comments for MySQL and Postgres migrations
```php
Schema::table('posts', function (Blueprint $table) {
    $table->comment('This is a comment');
});
```

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



- Dynamic "trashed" factory state
https://github.com/laravel/framework/pull/42414

dynamic support of a "trashed" factory state for models using soft deletes
```php
// in Factory class
public function trashed()
{
    return $this->state([
        'deleted_at' => now()->subDay(),
    ]);
}
```

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

- Array prependKeysWith() helper
https://github.com/laravel/framework/pull/42448

new array helper to prepend all key names in an associative array quickly
```php
Arr::prependKeysWith(['key' => 'value'], 'prefix.');
 
// ['prefix.key' => 'value']
```

- Adds ability to have paginate() $perPage parameter as callable with access to $total

https://github.com/laravel/framework/pull/42429
```php
// Previously:
$total = DB::table('products')->count();
DB::table('products')->paginate( $total <= 110 ? 110 : 100 );

// Now (saves extra query and builder code):
DB::table('products')->paginate(function ($total) {
    return $total <= 110 ? 110 : 100;
});
```

I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://laravel-news.com/laravel-9-14-0
Source :- https://www.youtube.com/watch?v=OC3K69wuCKE
Rodauth Authentication in Ruby on Rails
Tags: rails, ruby, webdev, tutorial
Published: 2022-05-26 13:35:54

Today, we will learn how to authenitcate our Applications with Rodauth. Rodauth is Ruby's most advanced authentication framework, designed to work in any rack application. It's built using Roda and Sequel, but it can be used with other web frameworks, database libraries, and databases.

[Project Link](https://github.com/railsdrill/Episode-14-authrod-authentication)
{% youtube L0JPsan4V1A %}
Fireside chat with Engineer who just landed a job at Google
Tags: eventsinyourcity, programming, career, beginners
Published: 2022-05-26 13:24:57

Join us for a fireside chat with another [Hackpack](https://www.hackpack.io/) alumni who got a job at Google! If you are interested in Google or currently studying for programming interviews, this will be a great opportunity to learn and get advice for your own career journey.

The event will be held over discord today (5/26) at 2pm EST: [discord.gg/NKFGEzav5M?event=978743742490112..](https://discord.gg/NKFGEzav5M?event=978743742490112140)
Create well designed application with Unified Identity
Tags: dotnet, cqrs
Published: 2022-05-26 13:21:40

On the earlier stage of building a new software project you need a software architect to design the application and build cross cutting-features.

Some teams take a shortcut by using a ready made framework/boilerplate that provides with ready source code. for dot net developers, a famous example of that is Aspnet Zero, but here I will talk about a new rising boilerplate, I mean “Unified Identity” built by “Unified Projects” team.


Unified Identity comes with full source code for dot net 6 applications and angular 12, with the following specs:

Clean architecture
CQRS Pattern
Repository Pattern
Also basic features are already developed, the following are included with the source code:

multi tenancy
multi lingual
Authentication and authorization
Logging
Organization structure page
Audit trail
Take a look at the website and get the source code at https://www.unifiedprojects.net/

Or check the documents at https://www.unifiedprojects.net/Documents/index.html
LocalServer
Tags: python
Published: 2022-05-26 12:52:30

Hi!
I'm working on a project that will be very useful for many others.
When I was learning Python, I created a program that creates an account for the user.
It had two variables: username and password.
But every time I ran the program, the values of both variables weren't the same.
So, I'm creating this project, that will sove the problem.
The idea is to create a text file that will work as a server.

```
def CreateFile(name):
  try:
    with open(f"{name}.txt", "a+"):
      return 0
  except:
    pass
       
```
This code will create a text file.
The next time you run the your code, it'll check if the file already exists.
If it does, nothing will happen.
To add informations to the file you can call the function Write():

```
def Write(name, value):
  with open(f"{name}.txt", "a") as file:
    file.write(f"[INFO]:{value}]")
```
As you may have noticed, the text file that you want to acess is a string, not a variable:

```
# this is TestFile.py
import LocalServer

# creates a text file named MyFile
LocalServer.CreateFile("MyFile")

# adds Hello, World! to MyFile.txt
LocalServer.Write("MyFile", "Hello, World!")
```
You can test if some text is in your text file or add settings to it.
I'll keep working on this project so that it'll  be complete.
Fronted-Mnetor-Challenge
Tags: webdev, beginners, html, css
Published: 2022-05-26 12:24:36

I've just completed a front-end coding challenge from @frontendmentor! 🎉

You can see my solution here: https://www.frontendmentor.io/solutions/clipboardlandingpagemaster-build-with-html5-and-css-grid-and-flex-CegxsU1sbN

Any suggestions on how I can improve are welcome!
🧵 What are your favourite Browser Extentions ?
Tags: discuss, watercooler
Published: 2022-05-26 12:20:35

Here are my top 3 extentions - 

- [daily.dev](https://chrome.google.com/webstore/detail/dailydev-the-homepage-dev/jlmpjdjjbgclbocgajdjefcidcncaied) - Get a feed of the hottest developer news personalized to you on your Homepage.

- [Raindrop.io](https://chrome.google.com/webstore/detail/raindropio/ldgfbffkinooeloadekpmfoklnobpien) - All-in-one bookmark manager

- [Bitwarden](https://chrome.google.com/webstore/detail/bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb) - A secure and free password manager for all of your devices.


👇 Drop a comment on your top 3 browser extentions.
My First Dev post
Tags: webdev, javascript, programming
Published: 2022-05-26 12:20:27

## How to signup to dev.to

1. First you have to click on create an account button

![Screen shot of dev.to website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9zzsjvftj8u75c50rpah.png)

2. Then sign up using your github account.
3. You are done now create your first post like I am doing.

Thank you for reading!
LimeSurvey Plugin Settings
Tags: php, yii, limesurvey
Published: 2022-05-26 11:51:49

In [my last article](https://dev.to/bismark/limesurvey-helloworld-plugin-433k) I created a simple plugin for LimeSurvey,
that is used at the command line, which can be useful for cronjobs.

The next step could be some plugin settings. There are two types.

## Global Plugin Settings

Global Plugin Settings are defined in a variable `$settings`

```php
protected $settings = [
    'setting1' => [
        'type' => 'string',
        'label' => 'Setting One',
        'help' => 'This might be a useful hint',
        'default' => '' 
    ]
];
```

You can access this setting via:
```php
var_dump($this->get('setting1'));
```

## Survey Level Plugin Settings

In order to create some settings on survey level, you have to subscribe two events in your `init()` method.

```php
public function init()
{
    /* @see https://manual.limesurvey.org/BeforeSurveySettings */
    $this->subscribe('beforeSurveySettings');
    /* @see https://manual.limesurvey.org/NewSurveySettings */
    $this->subscribe('newSurveySettings');
}
```

Next we define a field `isActive` of type boolean.
There are several types available. See some examples [here](https://framagit.org/Shnoulle/exampleSettings/blob/master/exampleSettings.php):


```php
public function beforeSurveySettings()
{
    $event = $this->event;
    $surveyId = $event->get('survey');
    
    $event->set("surveysettings.{$this->id}", [
        'name' => get_class($this),
        'settings' => [
            'isActive' => [
                'type' => 'boolean',
                'label' => 'enable plugin for this survey',
                'current' => $this->get('isActive', 'Survey', $surveyId, false),
                'help' => 'some useful hint'
            ]
        ]
     ]);
}
```

The following code is needed to save your survey settings:

```php
public function newSurveySettings()
{
    $event = $this->event;
    foreach ($event->get('settings') as $name => $value) {
        $this->set($name, $value, 'Survey', $event->get('survey'));
    }
}
```

That's it.
Bye!
Variable explanation help:
Tags: javascript, discuss, beginners, tutorial
Published: 2022-05-26 11:25:50

**You can help me explain some of this words just in variables.**

**->** Concatenation 
**->** conversion
**->** Coercion 
**->** Truthy and Falsy .


and give me some examples too... 
**Note:** _This words are under variables types in javascript_
NFT Business Models To Only Start in 2022 | NFT Business Ideas
Tags: nft, blockchain, webdev
Published: 2022-05-26 11:25:45

Starting an NFT business is just becoming a trend nowadays. With the advancement of Blockchain Technology and the vogue of Crypto currency, demand for the NFT business development is increasing every day. In the year 2021, the global Non-fungible Tokens(NFT) market size reached over $50 billion and is expected to grow to USD 147.24 billion by the end of 2026 as the press release published on PRNewswire.

With the NFT, you can start a business in different industries like music, business ideas, art selling, sports, wearable, cryptocurrency, an investment firm, business consulting firm, NFT course, etc.

Now we explore the terms NFT so you can easily get to know it before starting your NFT marketplace business.

**Non-fungible Tokens(NFTs)**
NFTs are crypto assets available in blockchain with unique metadata. These crypto assets can not be replicated and are different from each other. So can be used for commercial transactions of physical goods and services.

For instance — To understand it better, you can compare non-fungible tokens with real money. You know every paper currency has printed a combination of unique alphanumeric on it that distinguishes it from other paper money. Like real money, each non-fungible tokens are unique and don’t have any copy of it in the blockchain.

A Brief History of NFT That Matter to Entrepreneurs
The first NFT “ Quantum” was minted in the year 2014 on the Namecoin blockchain by an artist Kavin McKoy. Quantum is a pixilated image in an octagon shape that hypnotically changes shade and pulsates in a way reminiscent of an octopus.

Jaw Dropping Numbers of NFT Business and Marketplace
The worldwide NFT market is worth upwards of $20 billion (TheGuardian)

NFT transactions have risen from $40.96 million in 2018 to $338.04 million in 2020. That’s an increase of over 8x in two years.
You can see the latest stat updates here: https://dappradar.com/nft/marketplaces

We think reasons are enough to start your own NFT business. NFT marketplace development is the best opportunity for entrepreneurs to earn money that they never think.

## Best NFT Business Models(Ideas) You Can Start

You can start your NFT business journey by choosing a unique business model according to your preferences and expertise. We listed the best NFT business models or ideas that should be successful for you in 2022. Here is the list of NFT business models that you can start now:

1. An NFT Marketplace
2. NFT Online Course
3. An NFT Gaming Platform
4. Selling NFT Arts
5. NFT Sport Business
6. Create An NFT Community
7. NFT Cryptocurrency Business Model
8. NFT Collectibles

Let’s discuss all the business ideas one by one

Read the complete post here: [NFT Business Models](https://www.startdesigns.com/blog/nft-business-models-ideas/)
Building a Complete Testing Framework
Tags: software, testing, softwarelifecycle
Published: 2022-05-26 11:06:27

In the software lifecycle, building a test is an essential framework to enable trust in our system. It allows to pop errors out before the product goes into production.

So if you have extensive coverage of your code you can be assured with certain reliability that your code is flawless.

But an automatic testing framework is not enough alone. Before we put things in production we need to test manually in a staging environment. So automatic tests are necessary but are not enough.

Surely, we can rely on End-to-end tests but they are hard to write and not so easy to maintain and, in the end, nothing can substitute a good human eye that makes an overall test about the new feature and checks if the system still works properly in staging and production environment.

Besides, collecting the issues from the final users is the best test an application could have, because only when the application is used by whom is supposed to be used that we can check if, overall, we have done good work. And at the final instance, if our product satisfied end-user expectations and needs.
Get busy learning!!
Tags: datascience, cybersecurity, programming, webdev
Published: 2022-05-26 10:51:21


#springsale $10 campaign is now live on Packt where you can get eBooks and Videos at $10, everything from our latest releases and bestsellers.

You don't want to miss out on this amazing opportunity.

Visit https://lnkd.in/dGgdnrAE and grab your copies.
Dimensionality Reduction
Tags: machinelearning, featureselection, featureextraction, dimensionalityreduction
Published: 2022-05-26 10:48:39

## What is Dimensionality Reduction?

Dimensionality Reduction is nothing but reducing the number of features in our dataset which gets feed to our Model for training.

## Why to do Dimensionality Reduction?

1. Machine Learning Classifier becomes worse and worse more the features we have in our dataset. As they tend our Machine Learning towards overfitting. Particularly to various types of ML algorithms such as K Nearest Neighbour's.
 
2. The greater number of features also means more computation and power needed to train and do the prediction by the model. For instance, in case of KNN as we have to find the EUCLIDEAN DISTANCE for each feature so greater the feature the more time and computation time it will take. It doesn't mean reducing the features without any intuition behind it but reducing in a way for the betterment of our model so that it's predictive performance doesn't get infected in the negative way.

3. Sometimes we do have dataset with a lot of features but our main goal is to deploy the model in real setting. There can be some features which we can't really get for prediction. This can be one of the reason for dropping the features.

4. More storage is required as it is directly proportional to number of features and number of records in our dataset.

5. Some times our interpretability of the model is also important. We may need to explain why certain prediction is this and what's the logic behind it. Some features may not be explainable. So, this can be a reason as well.
 
 
## Methods Of Dimensionality Reduction

There are two main ways we can do the dimensionality reduction.

1. Feature Selection
2. Feature Extraction

Under the Umbrella of Feature Selection there are several ways of doing it and same goes for Feature Extraction. We will start by Feature Selection and see what are different ways of feature Selection and when should one use one. Then, we will move towards the Feature Extraction.

## Feature Selection

It help us select the subset of the features. We try the best subset of the features which improves our machine learning model performance. We don't change the existing features.

## Feature Extraction

 Here, we also extract/develop new features from our existing features resulting in fewer features. For example: PCA (Principal Component Analysis) perform Linear Transformation on features resulting in fewer features.
Software-Driven Organizations
Tags: career, security, startup
Published: 2022-05-26 10:12:02

Hello Dev Community! 

Thanks for all the constructive lessons and discussions about various aspects of systems and project frameworks!

In this post, I'd like to explore some things about working within an organization that might not be so apparent to those who _apply from the outside_.

Years ago, the common belief was that organisations 🏢 accepted only personnel with prestigious educational records ,or those with extensive experience as managers. Once in, they would obtain as much ,by way of perks, as they requested for. They had the most influence in the company.🏯

## **<u>Software Sector</u>**
But software-driven companies ARE different. Developers build them, ☁️ clouds ☁️ support them, and people from several countries depend on their APIs and other open-source libraries.


![Cloud meets ICT workspace](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76aw78o3ftnl7978pqpz.jpeg)

To be part of one, you simply draw upon _training and commitment_ in software as you would do in any other discipline. Most of these companies encourage open dialogue🗣 and brainstorming 🙇‍♀️ over the direction they should be headed, and the best ideas usually get greenlit. 💚

## **<u>Work Concerns</u>**
Ever since the outbreak of nCOV-19, there have been more discussions about the value of remote workgroups and digital conferencing.
Sadly, there has also been an upsurge in 🚓🌡cybersecurity alerts,despite best practices
of access management and encryption (https://www.simplilearn.com/data-encryption-methods-article)

I encourage every prospective developer to take a few minutes of free time to ask themselves some of these delicate questions:

- Do you agree with policies on **data privacy**? Or should platforms be free to monetize user information? 


- Do you worry about ♨️ **network security**? ♨️ Or are various reports on 'spyware' and 'malware' merely hoaxes? 
<u>Pegasus</u>(https://m.youtube.com/watch?v=DzZfXNWgklpg)
<u>Predator</u>(https://gizmodo.com/google-chrome-android-predator-spyware-cytrox-zero-days-1848963816/amp)


- Do you consider 🤔 the impact of open source on commercial software packages and on standardized software design ? Or are you keen on everyone using the same tools at little cost?

These questions🧭 can reveal the kind of organization one would prefer to apply to, or even to startup sometime in the future. 

It's better to know something about where you stand - so whether you work remotely or in person, you have your perspective on appropriate practices / user safeguards.


<u>_Photo Credits_</u>
1. STMC (_Forschen nach Virtual Boardroom im Web_  http://www.smtcglobalinc.com)
2. TAJ (_ICT Laboratory_  http://www.tajglobalacademy.com)
How to create Ansible Inventory with Terraform?
Tags: technology, devops, github, terraform
Published: 2022-07-17 14:08:19

---
title: How to create Ansible Inventory with Terraform?
published: true
date: 2022-05-26 10:43:44 UTC
tags: technology,devops,github,terraform
canonical_url: https://faun.pub/how-to-create-ansible-inventory-with-terraform-a32fcbe11be6
---

[![](https://cdn-images-1.medium.com/max/902/1*q3hBzwv18My0sjrr8nYliw.png)](https://faun.pub/how-to-create-ansible-inventory-with-terraform-a32fcbe11be6?source=rss-6e21f0d290d1------2)

Terraform is the go tool to provision your infrastructure and all the VM you need to run your applications.

[Continue reading on FAUN Publication »](https://faun.pub/how-to-create-ansible-inventory-with-terraform-a32fcbe11be6?source=rss-6e21f0d290d1------2)
3 Basic Cat Command Examples in Linux
Tags: linux, opensource, devops, productivity
Published: 2022-05-26 10:36:41

The cat (short for “concatenate“) command is one of the most frequently used commands in Linux/Unix-like operating systems. cat command allows us to create single or multiple files, view content of a file, concatenate files and redirect output in terminal or files.

In this article, we are going to find out the handy use of cat commands with their examples in Linux.

**_General Syntax of Cat Command_**

`$ cat [OPTION] [FILE]...`

**_1. Display Contents of File_**

`cat /etc/passwd`

`root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
narad:x:500:500::/home/narad:/bin/bash`

**_2. View Contents of Multiple Files in terminal_**

In below example, it will display the contents of the test and test1 file in the terminal.

`cat test test1`

`Hello everybody`
`Hi world,`

**_3. Create a File with Cat Command_**

We will create a file called test2 file with the below command.

`cat >test2`

Thanks for reading ! Happy coding !
Vue-Nuxt remove html tags from rendered text for SEO
Tags: seo, vue, nuxt, javascript
Published: 2022-05-26 10:16:32

I am trying to add description in `<head>` tag which is come from backed server via API. But in backend i have rich text editor which is generate text with html tag. 
![text with html](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mvhbwbjubuzkhic15hn9.png)
 
But i want to add only plain text in description for improving SEO performance. So here is the solution, i think you need it also 😏

In computed section we can declare a function which will responsible for generate plain text from mixed with html tag.
```js
computed:{

        strippedHtml() {
            let regex = /(<([^>]+)>)/ig;
        
	    return this.description.replace(regex, "");
    }
```
now display it in your template by `{{strippedHtml}}` 😎
and you can add it also in <head>
```js
 head: {
    title: 'your title',
    meta: [
      {
        hid: 'description',
        name: 'description',
        content: this.strippedHtml
      }
    ],
  }
```
Thank You 😎
Cron Expression Descriptor
Tags: cron
Published: 2022-05-26 10:11:38

An online tool to describe Cron expressions as human-readable text.
[https://devtoolcafe.com/tools/cron](https://devtoolcafe.com/tools/cron)
![Cron Expression Descriptor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7dp1z7cxdu7b7n67rkuf.png)