teleren/devto huggingface dataset:
Why do you need CIAM?
Tags: security, ciam
Published: 2021-05-14 12:14:01

#### Learn how customer identity and access management (CIAM) helps you balance security, privacy, and experience for all users.

### <br>

Customer experiences happen primarily online. If this wasn’t completely true for your business before 2020, it’s probably true now. Companies have come to understand that a seamless digital experience is no longer a competitive differentiator; it’s a baseline requirement.

Moreover, pressure-cooker economic conditions during the pandemic have shown that [companies that understand their customers’ needs on a deep level](https://digitally.cognizant.com/customer-identity-and-access-management-in-the-age-of-covid-19-codex5721/) are better-positioned to succeed. One way organizations are trying to do this is [customer identity and access management (CIAM)](https://auth0.com/blog/what-is-ciam/).

CIAM refers to a set of solutions intended to create the optimal balance between convenience, privacy, and security for each type of user. While [identity and access management (IAM)](https://auth0.com/blog/what-is-iam/) is focused on managing identity and access for employees and partners, CIAM centers on customers.

CIAM exists at the intersection of customer experience, security, and analytics. It enables a smooth onboarding/login experience to build customer loyalty and increase conversion rates, guides compliance with data privacy laws and empowers companies to prevent data breaches. Crucially, CIAM encompasses not only how companies control end-users’ access to digital assets but also how they collect, analyze, and store data related to those users.


[Read more...](https://auth0.com/blog/why-do-you-need-ciam/?utm_source=content_synd&utm_medium=sc&utm_campaign=ciam)
Call to a member function render() on null
 in Symfony4 
Published: 2021-05-14 12:10:56

public function notify(Contact $contact){
            
            // Create the message
            $message= ( new \Swift_Message( 'centre : ' . $contact ->getFirstname()))
            ->setFrom('noreply@server.com')
            ->setTo('benabdallahsonia16@gmail.com')
            ->setReplyTo($contact->getEmail())
            ->setBody($this->renderer -> render('emails/contact.html.twig' , [
                'contact'=>$contact ,
            ]), 'text/html'
            );
            $this ->mailer->send($message);


           
        }
Group hover using tailwind css
Tags: tailwindcss, webdev, css, html
Published: 2021-05-14 12:03:58

![Alt Text of image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jomqphbtw826hln868b.gif)
When I came across this thing where every other element was behaving differently when we hover, I didn't even know what do we call it and how to search it, after trying several keywords, I finally got the idea of what's happening and tried to write the css from scratch, it became tedious for me to maintain the *color*, *background-color*, *border-color* and many more styles for every single child element. 
Got **Group-hover** from *tailwindcss* and used it effortlessly.
Put *group* in the parent element and *group-hover:* in all those child elements where we want the style on hover, everything else will be taken care of. 
The code will look something like this:-
```javascript

      <div className=' flex h-screen justify-center items-center'>
        <div className='group text-xl'>
          <strong className='group-hover:text-red-500'>Hover on me </strong>
          <strong className='group-hover:text-green-500'>the texts will be </strong>
          <strong className='group-hover:text-blue-500'>of different colors</strong>
        </div>
      </div>

```

No configuration is required in the *tailwind.config.js* file unless one is trying to apply group-hover on some plugin that needs to be enabled in the variants of the config file.
Daily Developer Jokes - Friday, May 14, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-05-14 12:00:07

---
title: "Daily Developer Jokes - Friday, May 14, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Friday%2C%20May%2014%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12597fe0374.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Where do developers drink?

___A:___ The Foo bar
 -->
Create a circular gradient in CSS
Published: 2021-05-14 11:55:38

After searching during hours, with people saying *"it's impossible to do it with CSS or SVG"*, I found it!

With the following property, you will be able to define a circular gradient in CSS!

```css
background:conic-gradient(from 0deg, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00);
```

{% codepen https://codepen.io/adaendra-the-decoder/pen/poeJaqv %}

---

I hope it will help you!
Announcing Camp Smalltalk Supreme
Published: 2021-05-14 11:51:01

Next year is the 50th anniversary of the Smalltalk programming language. There will be a major celebration in Toronto, Canada. It's a programming conference called Camp Smalltalk Supreme.

Here is the official website: https://campsmalltalksupreme.wordpress.com/.

Here is the promo video: https://youtu.be/ygsqpuSnR-4.

Every attendee will receive free swag. And, of course, there will be birthday cake.

Come to Toronto to hear seminars, watch demos, and attend workshops, all related to Smalltalk. It will be a real blast!
Node.js/Express RestAPIs Example – POST/GET/PUT/DELETE requests
Tags: node, express, crud, restapi
Published: 2021-05-14 11:39:19

https://ozenero.com/nodejs-restapis-how-to-create-nodejs-express-restapis-post-get-put-delete-requests

Node.js/Express RestAPIs Example – POST/GET/PUT/DELETE requests

In the tutorial, we're gonna look at way to create NodeJs/Express RestAPIs with Post/Get/Put/Delete requests.

Related posts:
- <a href="https://ozenero.com/node-js/how-to-setup-node-express-development-environment">How to setup Node/Express development environment</a>

<!--more-->
<h2>Overview</h2>
<h3>Demo</h3>
<iframe width="853" height="480" src="https://www.youtube.com/embed/cw43v48rqEY?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<h3>Goal</h3>
We create a NodeJs/Express RestAPIs project that has structure as below:

<img src="https://ozenero.com/wp-content/uploads/2018/04/nodejs-express-restapis-project-structure.png" alt="nodejs express - restapis - project structure" width="481" height="182" class="alignnone size-full wp-image-11557" />
<pre><code class="language-javascript">
/nodejs-restapi
	/app
		/controllers
			customer.controller.js
		/routes
			customer.routes.js
	/node-modules
	package.json
	package-lock.json
	server.js
</code></pre>

The project create a set of Rest-APIs for POST/GET/UPDATE/DELETE APIs:
<ul>
<li><code>/api/customers</code> - GET all customers</li>
<li><code>/api/customers/:id</code> - GET a customer by Id</li>
<li><code>'/api/customers</code> - POST a customer</li>
<li><code>/api/customers/update/:id</code> - UPDATE a customer by Id</li>
<li><code>/api/customers/delete/:id</code> - DELETE a customer by Id</li>
</ul>
<h2>Setup NodeJs/Express project</h2>
Use NPM to create a Node/Express project as the <a href="https://ozenero.com/node-js/how-to-setup-node-express-development-environment#Using_NPM">guide</a>

<h3>Create application directory</h3>
<pre><code class="language-javascript">
mkdir nodejs-restapi
cd nodejs-restapi
</code></pre>
<h3>Create package.json file</h3>
Use the <code>npm init</code> to create ‘package.json’ file:

More at:

https://ozenero.com/nodejs-restapis-how-to-create-nodejs-express-restapis-post-get-put-delete-requests

Node.js/Express RestAPIs Example – POST/GET/PUT/DELETE requests
Wanna have fun with Lazy Iterators in good ol' C?
Tags: showdev, c, functional, github
Published: 2021-05-14 11:27:05

I made a demonstration + explanation of implementing a lazy iterator interface in pure C99. As well as implementing strong lazy abstractions with the iterators!

Check it out [on github](https://github.com/TotallyNotChase/c-iterators)
Dart - Immutable Variables or Constants
Tags: dart, flutter, programming, mobile
Published: 2021-05-14 11:21:07

We are familiar variables in dart, which we usually declare with var keyword or we can declaring them using type annotation. Guess what? There is another type, which ensures integrity of your data, you can call such variables 'immutable variables' or in a simple word 'constants'. 

We'll be discussing two ways of declaring constants in Dart:

<ol>
  <li>'const' keyword</li>
  <li>'final' keyword</li>
</ol>


## 'const' Keyword
First of all let's look at the syntax:

```dart
 const num hoursSinceMidnight_with_const = 2;
 print('Hours : $hoursSinceMidnight_with_const');
```

<strong>const</strong> value is detected on compile time. Its value will be immutable in the entire program and you will not be able to change its value anywhere in the program. If you try to modify value anywhere in the code, that'll generate error.



## 'final' Keyword

Let's talk about another way to create constant with **final** keyword. When we use **final**, value is detected during runtime and after that point it can't be changed.  

Now compare this code snippet with the **const** code above:

```dart 
  const hoursSinceMidnight = DateTime.now().hour;
  print('Hours before midnight: $hoursSinceMidnight'); 
```
Above code will generate error because when we run it, at runtime we'll be attempting to set a value to <strong>hoursSinceMidnight</strong> constant, which will end up generating an error. If we you are using VS code editor then it will show you error. 

Let's change our code a bit, we'll be replacing **const** with **final** keyword. 

```dart 
  final hoursSinceMidnight = DateTime.now().hour;
  print('Hours before midnight: $hoursSinceMidnight'); 
```

That's about it, have a good day 😊
Node.js/Express – PostgreSQL example – Upload File/Download File – Multer + Sequelize CRUD
Tags: node, express, sequelize, crud
Published: 2021-05-14 11:16:11

https://ozenero.com/node-js-express-rest-api-postgresql-example-upload-file-download-file-multer-sequelize-crud

Node.js/Express – PostgreSQL example – Upload File/Download File – Multer + Sequelize CRUD

In the tutorial, we show how to build a Node.js/Express RestAPIs to Upload Files/Download Files to PostgreSQL using Multer middleware and Sequelize ORM.

Related posts:
- <a href="https://ozenero.com/node-js/multer-build-restapi-to-upload-a-multipartfile-to-nodejs-express">Multer – Build RestAPI to upload a MultipartFile to NodeJS/Express</a>
- <a href="https://ozenero.com/node-js/nodejs-restapis-how-to-create-nodejs-express-restapis-post-get-put-delete-requests">NodeJs/Express RestAPIs – POST/GET/PUT/DELETE requests</a>

<!--more-->
<h2>Technologies</h2>
<ul>
<li>Node.js</li>
<li>Express</li>
<li>Multer</li>
<li>Sequelize</li>
<li>PostgreSQL</li>
</ul>
<h2>Goal</h2>
We create Node.js project as below:

<img src="https://ozenero.com/wp-content/uploads/2018/07/nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql-nodejs-project.png" alt="nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql + nodejs-project" width="344" height="350" class="alignnone size-full wp-image-13639" />

Expose 3 RestAPIs:

<ul>
<li><code>router.post('/api/file/upload', upload.single("file"), fileWorker.uploadFile);</code></li>
<li><code>router.get('/api/file/info', fileWorker.listAllFiles);</code></li>
<li><code>router.get('/api/file/:id', fileWorker.downloadFile);</code></li>
</ul>

Upload file:

<img src="https://ozenero.com/wp-content/uploads/2018/07/nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql-post-request-upload-file.png" alt="nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql + post-request-upload-file" width="539" height="360" class="alignnone size-full wp-image-13640" />

-> PostgreSQL's records:

<img src="https://ozenero.com/wp-content/uploads/2018/07/nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql-postgrsql-records.png" alt="nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql + postgrsql-records" width="675" height="230" class="alignnone size-full wp-image-13641" />

Download file:

<img src="https://ozenero.com/wp-content/uploads/2018/07/nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql-get-file.png" alt="nodejs-express-restapis-multer-upload-files-download-files-sequelize-postgresql + get-file" width="680" height="363" class="alignnone size-full wp-image-13642" />
<h2>Practice</h2>
<h3>Setting up NodeJs/Express project</h3>
Create a folder Node.js-Express-Upload-Download-Files-PostgreSQL:

More at:

https://ozenero.com/node-js-express-rest-api-postgresql-example-upload-file-download-file-multer-sequelize-crud

Node.js/Express – PostgreSQL example – Upload File/Download File – Multer + Sequelize CRUD
Laravel Installation for Macbook. (Without docker)
Published: 2021-05-14 11:13:57

Prerequisite: **homebrew**

> Disclaimer: This article is for the streamlined installation of laravel command-line tools with PHP and MySQL on MacBook. You can follow the installation and starting guide on laravel.com, I personally like the installation with `sail`. But this is the traditional way of using laravel on Macbook. 


## Installation
----------------------------

### PHP installation

we will need to install PHP with homebrew, with command 

```
brew install php 
```
This command will install the latest version of php.

If you have PHP installed already then simply update php 

```
brew update php
```

### MySql Installation
The command is simple enough like 
```
brew install mysql
```

once installation completed you can start mysql with brew services

```
brew services start mysql
```
once mysql is running on your machine you can login to the mysql with 

```
mysql -u root -p 

```
and enter your **password** by default it will blank string. 

now you can use all of the commands for mysql. 

### Installation of the composer.
For installing composer goto https://getcomposer.org/download/

and paste the following code found on the installation document. 

```
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

``` 

If you try to use the composer command it will not be found and the `composer.phar` file is not executable. Follow the following command to make it executable and move it to the local bin folder. 

```
$ chmod +x composer.phar
$ mv composer.phar /usr/local/bin/composer
```

Now try using composer 
```
composer
```
You must be able to see available commands for the composer listed. 

### Laravel installer
Install laravel with composer globally 

```
composer global require laravel/installer
```
Now try using laravel, the command will not found because composer is not been set on the zsh (our terminal)

For zsh 
```
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >>  ~/.zshrc
source ~/.zshrc
```
If you are bash then use
```
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```
Now you have successfully installed the laravel command line tool. Now you can create laravel application with 

```
laravel new example-app
```
Now you can start creating your awesome application with laravel. 

```
cd example-app
php artisan serve
```

Happy Coding....
Angular : conditional class with *ngClass
Tags: angular, javascript, programming, webdev
Published: 2021-05-14 11:08:12

# What is NgClass?
Adds and removes CSS classes on an HTML element.
 
Angular provides several ways to add classes conditionally:

# Method 1
```javascript
[class.my_class] = "step === 'step1'"
```

# Method 2
```javascript
[ngClass]="{'my_class': step === 'step1'}"
```

# Method 3 
```javascript
[ngClass]="{'my_class': step === 'step1', 'my_class2' : step === 'step2' }"
```

# Method 4
```javascript
[ngClass]="{1 : 'my_class1', 2 : 'my_class2', 3 : 'my_class4'}[step]"
```

# Method 5
```javascript
[ngClass]="step == 'step1' ? 'my_class1' : 'my_class2'"
```

Based on the [Official Documentation](https://angular.io/api/common/NgClass) 

The CSS classes are updated as follows, depending on the type of the expression evaluation:

`string` - the CSS classes listed in the string (space delimited) are added,
`Array` - the CSS classes declared as Array elements are added,
`Object` - keys are CSS classes that get added when the expression given in the value evaluates to a truthy value, otherwise they are removed.

```html
<some-element [ngClass]="'first second'">...</some-element>

<some-element [ngClass]="['first', 'second']">...</some-element>

<some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element>

<some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element>

<some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element>
```

<a href="https://www.buymeacoffee.com/rkycom" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

With all that being said, I highly recommend you keep learning!

Thank you for reading this article. Please feel free to connect with me on [LinkedIn](https://www.linkedin.com/in/www-rajeshkumaryadav-com/) and [Twitter](https://twitter.com/rky_com).
Git - Validate commit message - git hooks
Tags: github, githooks, tricks
Published: 2021-05-14 10:28:38

To enforce commit messages in git repo to follow specific format or pattern. This can be achieve by using `git-hooks`, where the commit message is formatted with the help of `commit-msg` hook. commit-msg hook will be trigger on each commit.

First go to git repo which needs the validator, then create `commit-msg` hook file in `.git/hooks` folder

```sh 
cd <path-to-git-repo-to-install-commit-message-validator>

touch .git/hooks/commit-msg
```

Modify permission to make the hook executable
```
chmod +x .git/hooks/commit-msg
```

Open `commit-msg` file in a editor and add the following lines of script.

```ruby
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file)
$regex = /((\w):\s(\w))/i 
if !$regex.match(message) 
  puts "[POLICY] Your message is not formatted correctly" 
  puts "[STANDARD] Your message should be in the format: ‘committer_name: commit message’" 
  exit 1
end
```

### Create hook installer

A simple hook installer can be created as follows, here I have used quite a complex pattern.

Customize the `$regex` found in the script as per need. Existing regex is designed to handle `PROJECT-#### [committer_name_1|committer_name_2] commit message` pattern, which can be replaced.

To install `commit-msg-validator.sh` use the following commands

```sh
cd <path-to-git-repo-to-install-commit-message-validator>

wget https://raw.githubusercontent.com/ImShakthi/hackrator/master/git-hooks/commit-msg-validator.sh

chmod +x commit-msg-validator.sh

sh commit-msg-validator.sh
```

Hola, commit message validator would be installed successfully.
6 Useful habits for finding a workable solution to a programming problem
Published: 2021-05-14 10:16:27

1 - Before writing any code for your programming problem, plan your code in a piece of writing away from your laptop. This will help you  have a clear strategy.You can also refer to it at any stage in your problem solving.

2 - Understand what tools you will need and what tools you have for solving your problem.

3 - Break down your project into smaller projects. Working with one smaller project at a time will help you have a full control over your problem. It will also help you manage your time better. 

4 - Use simple programming languages. Use only the languages you need.

5 - Do not overdo things by writing complex code. Go as simple as you can. As a programmer, it is more than likely that someone else is going to look at your code. If you write a complex solution, the next person might not be able to understand your code. 

6 - When you finish working on one part of your project before moving to the next part of your project, check the readability and maintainability of you code.
Build Cloud-Native Web Hosting on Alibaba Cloud in 15 minutes - Part 1: WordPress Web Hosting Setup
Tags: wordpress, nginx, mysql, redis
Published: 2021-05-14 10:02:19

System configuration?! environment setting?!  application installation?! domain name application?! database management?! Catch layer?! CDN?!  network strategy?!  and etc… 

Are you just stuck at the beginning to establish your own blog or website? Is it because there are so many stuffs like above to consider? No worries, we are about to help you. The one-stop solution is completely free for you, check it out now and learn all about it in 15 minutes.
[Watch Now >](https://www.youtube.com/watch?v=TnWaGHBxPuw)

You will learn to set up a cloud native WordPress on Alibaba Cloud based on a LNMP(Linux + Nginx + MySQL + PHP) with Redis working as hot data caching.


🔥Free Resources For Foundation Build🔥: Register to apply for Free ECS, networking, storage, database and other resources.
[Get Free Trial >](http://45dwz.com/NdmJK)