teleren/devto huggingface dataset:
OAuth2.0 M2M with OKTA, Spring Boot & Boomi Integration
Tags: springboot, boomi, okta, postgres
Published: 2021-06-10 07:21:02

## Objective
An efficient search API based on Spring boot which is protected via OAuth2.0. Use **OKTA OAuth2.0 Machine2Machine** instead of Web based OAuth2.0. The m2m method implements **Client Credentials flow** and is recommended for server-side (AKA confidential) client applications with no end user, which normally describes machine-to-machine communication.

**Additionally** build a **Boomi** based HTTP client that gets authenticated data from the Spring boot API **(OPTIONAL)**

**Example:** An internal API (Boomi HTTP client or CURL) calling another third party API (Spring boot) which is secured via OKTA. Your client application/API needs to securely store its Client ID and secret and pass those to Okta in exchange for an access token. At a high-level, the flow only has four steps:

![image](https://user-images.githubusercontent.com/39495790/121356158-3cd29d80-c94e-11eb-9ea4-adb639f7a40b.png)

### Prequisites
* Basic familiarity with Spring Boot, Postgresql, docker, Boomi, OAuth2 workflows
* Docker host with docker-compose installed and access to Internet
* Boomi Atomsphere account (optional in case you want to spin up the Client API)

**Continue reading on GitHub...**

https://github.com/thecloudgarage/springboot-examples/blob/main/validated/springboot-efficient-search-rest-api-with-okta-m2m/README.md
Blob Storage File - Content MD5
Tags: azure, blobstorage, andreacarratta, coding
Published: 2021-06-10 07:15:03


🥱 #developer stufo di file duplicati? 

📦 Verifica i doppioni su #Azure #BlobStorage

In questi giorni stavo facendo una cernita dei file presenti all'interno di un #container di un mio Storage. Mi sono reso conto di avere una serie di file duplicati che occupavano solamente spazio.

🛢️ L'operazione si pulizia è stata davvero semplice e veloce. Per fare questa operazione ho sfruttato il valore #md5 associato ad ogni singolo file. 

1️⃣ Il primo file con un determinato MD5 viene tenuto

2️⃣ Dal secondo file in poi -a parità di MD5 - verrà cancellato

Semplice vero? In questo  articolo viene mostrato come ottenere il valore MD5  di un file presente su Blob Storage. 

🔗 [Blob Storage File - Content MD5](https://links.devandreacarratta.it/4Y9v)

#coding #andreacarratta
#developer ... da #JSON a codice
Tags: json, andreacarratta, developer, vscode
Published: 2021-06-10 07:12:39



⚙️ #developer ... da  #JSON a codice



🧙‍♂️ Atto di stregoneria oppure no?



Ragazzi, diciamo la verità una volta per tutte. Quante volte davanti ad un file JSON -specialmente di un servizio esterno- abbiamo detto "ma che due balle immense" nel doverlo "convertire" in codice sorgente per usarlo all'interno del codice?



🔥 Oggi vi voglio raccontare come semplificarvi la vita in pochissimi passaggi proprio grazie all'utilizzo del nostro amico #vscode risparmiando veramente tantissimo tempo. 



In questo modo potrete "convertire" il vostro JSON in ben 1️⃣5️⃣ formati finali.



❓ Vi state chiedendo quali e soprattutto come? [Visual Studio Code: Paste JSON as Code
 ](https://links.devandreacarratta.it/4WAa)


Tranquilli, non agitatevi. E' davvero semplice il tutto!



✍️ Aspetto poi un feedback da parte vostra! Come vi sembra la soluzione proposta?



#coding #visualstudiocode  #andreacarratta
What is a Cyber Physical System?
Tags: cybersecurity, beginners
Published: 2021-06-10 07:05:44

In general, CPS is a computer system in which a mechanism is controlled (or) monitored by computer based algorithms.                        
                         (OR)                        
CPS could be defined as IT systems that are integrated into physical world applications.

A CPS consists of various components like sensors, actuators, embedded systems etc.
Ex: Smart grids, Autonomous vehicles, Medical monitoring etc.

##Applications of CPS:-

* Industrial Control Systems(ICS) (or) SCADA(Supervisory    Control and Data Acquisition)
* Smart Grid Systems
* Medical Devices
* Smart Cars

Industrial Control Systems(ICS) (or) SCADA(Supervisory Control and Data Acquisition):-

* It refers to control systems that are used for control, monitoring and production in different Industries(Ex: Nuclear plants, Water and Sewage plants etc).
* A popular controller for this could be Programmable Logic Controller(PLC) which is a microprocessor. This is connected to the physical world through sensors and actuators.

Smart Grid Systems:-

* Smart grids are used for electricity generation, transmission and distribution.
* These are efficient due to one of its main feature i.e global load balancing of voltage automatically as per demand and it also makes use of Renewable energy that is generated by Windmills.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n77cqqtthkeuq44k95wo.jpeg)

Medical Devices:-

* Medical devices like Wearable devices, IMD’s(Implantable Medical Devices) which are implanted inside the patient’s body and they are communicated using wireless technology by the physician (or) the programmers.

Smart Cars:-

* Smart cars can also be known as intelligent cars which are likely to be environmentally-friendly and also have enhanced convenient features, Auto pilot mode etc.
Working with the Azure Cosmos DB Change Feed using Azure Functions and C#
Tags: azure, dotnet, tutorial, serverless
Published: 2021-06-10 06:48:09

---
title: Working with the Azure Cosmos DB Change Feed using Azure Functions and C#
published: true
description: 
tags: azure,dotnet,tutorial,serverless
//cover_image: https://direct_url_to_image.jpg
---

In this video, I explain what the Change Feed is and how you can work with it, then I go through a basic demo on how you can consume the Change Feed using Azure Functions in C#

The Change Feed in Azure Cosmos DB is a persistent record of changes to a container in the order that they occur. Essentially, the change feed will listen to a container in Azure Cosmos DB for any changes that occur, and it will then output those changes into a sorted list of documents that were changes in the order that they were modified.

Azure Functions is the simplest option to consume the change feed. As you’ll see from the demo, all you need to do is create a Function that uses a Cosmos DB Trigger and connect it to the container that we want to listen to.

{% youtube 9DtLz1fcsBM %}

Azure Cosmos DB Change Feed: https://docs.microsoft.com/en-us/azur...
Azure Functions Cosmos DB Trigger: https://docs.microsoft.com/en-us/azur...

If you have any questions, feel free to ask in the comment section below or feel free to reach out to me on Twitter.

Twitter: https://twitter.com/willvelida
Making htaccess work on Mac OS X
Tags: mac, serverless
Published: 2021-06-10 06:38:54

Yesterday we learned how to [set up virtual host on Mac OS X](https://daily-dev-tips.com/posts/mac-os-x-setting-up-virtual-hosts/), and today I'll show you how to make htaccess work so we can have SEO friendly URL's.

SEO-friendly URLs are a big part of your online presence, and a lot of times, you want to rewrite ugly things like index.php?id=121212 to something like /hello-world.

## Enabling mod_rewrite on Mac OS X

In order to make it work, we first have to enable mod_rewrite so we can use RewriteRules.

Open your terminal and open the `httpd.conf` file.

```bash
sudo nano /etc/apache2/httpd.conf
```

Now search for the following line and remove the `#` in front of it.

```text
#LoadModule rewrite_module libexec/apache2/mod_rewrite.so
```

Now close the terminal and restart apache.

```bash
sudo apachectl restart
```

We already enabled the AllowOverride in our virtual host yesterday so we don't need to worry about that.

## Testing if mod_rewrite works

For this example, we want to see if it works by redirecting any request to our index.php file.

So let's say someone wants to request the following URL: `http://daily-dev-tips.local/fuu`.

This will now give us a 404 Not Found.

But let's change that so that it will serve our index.php file.
Create a `.htaccess` file at the root of your project.

```text
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
```

Now refreshing our fuu link should show our index.php, and with this, we know the mod_rewrite and `.htaccess` file are working as expected.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Rock,paper,scissors With python
Tags: python, programming, games
Published: 2021-06-10 06:35:45

Ok guys this is my first post here on Dev and today am gonna be talking on making rock paper scissors using Python 
So let's get started

Requirements:
Python IDLE
Tkinter module (inbuilt moudle)
Radom module (inbuilt Python module)


As we all see all the module needed for this programme are all inbuilt Python module I.e the don't need to be downloaded

Follow me on Instagram @anon_mike1
 https://www.instagram.com/invites/contact/?i=ipimgm36ir5v



import tkinter 
import random

stats = []


def get_winner(call):
    if random.random() <= (1 / 3):
        choose = "rock"
    elif (1 / 3) < random.random() <= (2 / 3):
        choose = "scissors"
    else:
        choose = "paper"

    if (choose == "rock" and call == "paper") or (choose == "paper" and call == "scissors") \
            or (choose == "scissors" and call == "rock"):
        stats.append('W')
        result = "You won"
    elif choose == call:
        stats.append('D')
        result = "It's a tie"
    else:
        stats.append('L')
        result = "You lost"

    global output
    output.config(text="Computer choosed: " + choose + "\n" + result)


def pass_s():
    get_winner("scissors")


def pass_r():
    get_winner("rock")


def pass_p():
    get_winner("paper")


window = tkinter.Tk()

scissors = tkinter.Button(window, text="Scissors", bg="red", padx=10, pady=5, command=pass_s, width=15)
rock = tkinter.Button(window, text="Rock", bg="grey", padx=10, pady=5, command=pass_r, width=15)
paper = tkinter.Button(window, text="Paper", bg="white", padx=10, pady=5, command=pass_p, width=20)
output = tkinter.Label(window, width=30, fg="red", text="What's your call?")

scissors.pack(side="left")
rock.pack(side="left")
paper.pack(side="left")
output.pack(side="right")
window.mainloop()

for i in stats: print(i, end=" ")
if stats.count('L') > stats.count('W'):
    result = "\nYou loose"
elif stats.count('L') == stats.count('W'):
    result = "\n its a draw."
else:
    result = "\nYou win"

print(result)

Happy programming ❤❤
Getting started with Syncfusion Flutter DataGrid
Published: 2021-06-10 06:32:53

This section explains the steps required to add the DataGrid widget and its features. This section covers only basic features needed to get started with the Syncfusion Flutter DataGrid widget.
Add Flutter DataGrid to an application
Create a simple project using the instruction given in the Getting Started with your first Flutter app documentation.

https://help.syncfusion.com/flutter/datagrid/getting-started

To get start quickly with Flutter DataGrid, you can check on this video:https://youtu.be/-ULsEfjxFuY
Visualization of perl development history
Tags: perl, gource
Published: 2021-06-10 06:32:06

---
title: Visualization of perl development history
published: true
description: 
tags: perl, gource
---
About 10 years ago I tried [gource][1] and made a visualization of the commit history of [perl5.git][2]. It was when grouce was new, shiny and cool: 

{% youtube jl9HVEJl_-w %}

10 years passed like a blink and it has been a remarkable decade for perl5.git. As we see the growth of commit volume, there is also stable pace of releasees thanks to the standardization of release procedure. With relocation of communication platform, participation and small fixes seems to be much easier. While it has not be a perfectly stable decade, it is a good one.

So as a 10-yearly review, here's the updated version of that gource visualization on perl5.git, all the way to mid 2021: 

{% youtube 8udGUs7TnEM %}

These are the commands used to produce that video:

```
cd ~/src/perl5
gource -s 0.01 --auto-skip-seconds 0.1 -r 30 -f --user-scale 3 --file-idle-time 0 --hide bloom,filenames,dirnames --date-format '%Y' -o ~/var/gource-perl.ppm
ffmpeg  -an -y -f image2pipe -vcodec ppm -i ~/var/gource-perl.ppm -r 30.000 ~/var/gource-out.webm
```

[1]: https://gource.io/
[2]: https://github.com/Perl/perl5

---
本篇文章為 [perl 開發歷史紀錄之視覺化](https://gugod.org/2021/06/perl-development-history-visualized/) 之英文版
Change Detection in Angular
Tags: angular
Published: 2021-06-10 06:20:38

Hi Readers, So if you have been using Angular for a while you might have heard of Angular Change detection. Angular handles all the changes which happen for the application on behalf of us even without our interference. In this article, we are going to discuss angular change detection and then how we can manage that manually.

Even if Angular is doing it for we must know how it's working and do we even have ways to modify it. So the answer to later is Yes, we can modify for the component to behave differently based upon our requirement.

#### How does it works?

So in Angular is there is a change detection cycle that helps render the component tree with the new changes on its own. If there is some value change in the component then you will be able to see the updated value automatically, as Angular re-renders all the components in the component tree from parent to child for us automatically. So as I mentioned earlier we can modify this behavior, let us discuss briefly on this.

#### Modifying the default behavior

So Angular has 2 ways for Change Detection, the first is OnPush, and the other is Default. Default is what we have touched already. In the OnPush strategy, we have more control over the component re-rendering and Angular also skips re-rendering of the component if certain conditions are not fulfilled which are:
1. Change in input bound property.
2. Use of async pipe.
3. Event from component or its child.
4. Manually marked components for change detection.

The first point is related to the value for **@Input**  Decorator. So whenever you are passing the value to the Input property just remember to pass a new reference if you want to take advantage of the ngOnChanges hook which is like passing immutable objects always, if you just modify the object directly instead of providing a new copy you may face issues where the component data is not updated in case of OnPush strategy and even if you are Default strategy and using ngOnChanges hook for some purpose that may not work.

So to sum up, here we learned basics about change detection and how we can have custom control over the component when we set its change detection strategy to OnPush. Hope you were able to understand this, in my upcoming articles about change detection will touch base upon some working examples and some deep dive.
If you liked it please share it with your friends or if any suggestions reach me out on [Twitter](https://twitter.com/nikhild64) or comment below.
Till then Happy Learning!
Unit Testing In Github Actions With Go - The Cloud Resume Challenge Series (Part 16)
Tags: devops, cloud, aws, serverless
Published: 2021-06-10 06:12:12

---
title: Unit Testing In Github Actions With Go - The Cloud Resume Challenge Series (Part 16)
published: true
tags: #devops #cloud #aws #serverless 
---

Hey cloud engineering friends! 

Over the past weeks I've been completing [the cloud resume challenge](https://cloudresumechallenge.dev/). It's a free challenge started by AWS hero Forest Brazeal to help people get into the cloud by doing a hands-on project. [Original announcement post here](https://dev.to/forrestbrazeal/the-cloud-resume-challenge-503g).

In the last video, we finished off our backend by getting values out of DynamoDB and showing them as a visitor count on our resume. 

In these final few video's we'll go through Github Actions and how to get set up with running our unit tests. We'll also discuss a little about CI/CD and what that means. 

{% youtube 50vzowTPdv0 %}

If you're thinking getting into cloud I do really recommend you check out the cloud resume challenge as a place to start! 

---

Hey! 👋 If we haven't met, let me introduce myself, I'm [Lou](https://twitter.com/loujaybee), and I created _[Open Up The Cloud](http://thedevcoach.co.uk/)_ to help you get your start, and grow your career in cloud 🚀. 

If you're interested in cloud, the best way to keep up-to-date with news, and everything I publish is via the [monthly cloud newsletter](http://newsletter.thedevcoach.co.uk/). And find _Open Up The Cloud_ on [YouTube](https://www.youtube.com/channel/UCAklaE5D59xWtip-3Jwa7xA), [Twitter](https://twitter.com/openupthecloud), [Instagram](https://www.instagram.com/openupthecloud)... wherever you like hang out! 😄
How many percent of your work is not building the core business logic?
Tags: discuss, architecture, webdev, react
Published: 2021-06-10 06:09:07

We have built a chatbot + commerce solution on Messenger for businesses. Businesses can use our solution for Facebook Live Selling and Facebook Ads, no website is needed. Customer make comment and the bot will lead them to Messenger to complete the purchase, it works seamlessly.

We have actually deployed to few clients. The thing is each client will have different CRM system, Payment Gateway, Logistic system. Before we launch, our team need to spend few weeks building the integration. It is necessary but actually not the core of our software.

I am not complaining about it. But I think there must be a lot of software out there always need to write this integration layer, which it is identical to the other system. So wouldn't it be great if there is an integration layer we can plug into our software and it will work just with few lines of code?

For example, the integration layer already integrated with Payment Gateway A, B and C. My software just need to integrate with the integration layer and all 3 payment gateways will be available on my system.

This is very high level view, let me know if you have any questions. More important, feel free to share your opinion 😊.
Top 6 Vs-Code Extension to be used in 2021
Tags: vscode, extensions, showdev, visualstudiocode
Published: 2021-06-10 06:06:23

Visual Studio Code is one of the most widely used code editors in the developer community. One of the reasons for VS Code’s popularity is its many extensions that speed up the development process.

In this blog, we’ll see top 6 VS Code extensions every web developer should know in 2021. These tools are designed to improve the developer experience and make your job easier in various ways.

## Top 6 extensions 

- Auto Rename Tag
- Bracket Pair Colorizer
- Better Comments
- Markdown All in One
- Icons
- Prettier
- Thunder Client

### 1. Auto Rename Tag
A must have extension if you're a Web Developer !
Auto Rename Tag is one of the best and a super useful VS Code extension for web developers. As the names suggest, Auto Rename tag renames the second tag as the first one is updated and vice versa. 

![auto rename tag](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mvyqygdv3jk4x2jwk5bv.gif)


### 2. Bracket Pair Colorizer
Bracket Pair Colorizer is an extension that matches corresponding brackets with the same color. Having nested components, functions, objects, etc., in a file, can become confusing with multiple parentheses, brackets, etc.

![bracket pair](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tti11fjc4zuf7lzxl9n7.png)

### 3. Better Comments
Better Comments Extension is made to write more human friendly comments.

You can use either of the following characters after double forward slash (//):

- `*` for highlighted text
- `!` for errors and warnings
- `?` for queries and questions
- `//` for strikethrough
- `TODO` for to-dos

![better comments](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wu1xpltnetfspwem2ido.png)

### 4. Markdown All in One
Markdown All in One is an extension that takes leap of all your markdown needs, such as auto-preview, shortcuts, autocomplete,etc.

![Markdown](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fk7ystl6ozo0j9ldpym5.gif)

### 5. Prettier
Prettier is a code formatter. It’s one of the most popular code formatters available. Having consistent formatting and styling across your code can save a lot of time.

![Prettier](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/otcktn4cr6u8ih792c1o.gif)

### 6. Thunder Client
Thunder Client is a lightweight Rest API Client Extension for Visual Studio Code, with simple and clean design.
In backend development we use 100s of get, post, put, patch and delete requests. It is really very hard to switch between software to check our requests. You might be using Postman or any other software to check those request but Thunder Client is one of the biggest competitor of those. 

![Thunder Client](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8mic47tb8e5yqqlblu1.gif)

## Conclusion
In this blog we saw top 6 vs-code extensions in 2021. There are 100s of Vs-Code Extensions that you can explore. i.e.

- Live Server 
- Live Share
- Code Spell checker
Easily Configure Syncfusion JavaScript UI Controls in Salesforce
Published: 2021-06-10 05:45:06

Our Syncfusion JavaScript UI controls suite is the only suite you will ever need to build an application. It contains over 65 high-performance, lightweight, modular, and responsive UI components in a single package. In this blog, we are going to see how to configure Syncfusion JavaScript UI controls in the Lightning component framework to use them in the Salesforce Lightning App Builder tool.

What is Salesforce?
Salesforce is a cloud computing software as a service (SaaS) company that specializes in customer relationship management (CRM). Its services allow business users to use cloud technology to better connect with their customers and partners.

In the Lightning version of Salesforce, we can create custom components and use them in the Lightning App Builder tool which contains everything you need for a custom app, such as custom and standard objects, and custom tabs. It also includes Lightning page tabs and utilities like Lightning Voice.

Read
https://www.syncfusion.com/blogs/post/easily-configure-syncfusion-javascript-ui-controls-in-salesforce.aspx
How to convert multiple images into a single pdf file
Tags: java, pdf, itextpdf
Published: 2021-07-03 07:33:00

---
title: How to convert multiple images into a single pdf file
published: true
date: 2021-06-10 05:38:10 UTC
tags: java, pdf, itextpdf
canonical_url: http://bazlur.com/2021/06/how-to-convert-multiple-images-into-a-single-pdf-file/
---

I had some images that I needed had to export as pdf. I looked in the app store to find a free tool that makes it possible for me. However, after a quick search, I was not satisfied with the result. The Apps that support such things come at a hefty price tag. Then it hits me. Why not I write a few lines of java code and export pdf with ITextPdf library.

Well, that’s it. Five minutes of working helped me to save quite a few bucks.

Here is what I have got -

![100DaysOfProgramming_Day004](http://bazlur.com/img/Day004.png "100DaysOfJava")

for copy/paste pleasure: [https://gist.github.com/rokon12/85705a4abe04cd572774bebdf76aebb7](https://gist.github.com/rokon12/85705a4abe04cd572774bebdf76aebb7)I have used ITextPdf library for this purpose, and the dependency is-

```
implementation group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13.2'

```
The most fertile animal
Published: 2021-06-10 05:34:38

这个星球上生育能力最强的动物是什么?
据我所知，有种动物一年365天每一天都合适交配，四季交替寒来暑往丝毫影响不了他们的性趣；
更不可思议的是，他们可以在任何地方交配，北野、井上、川瀬、小松，他们用这些名字记录下繁衍后代活动发生的地点。
这就是：男人