teleren/devto huggingface dataset:
Zeebe Message Correlation Java
Tags: java, zeebe, message, correation
Published: 2021-05-07 04:49:05

We could not find any clear working example of Zeebe message correlation when we needed to implement it. After trying different things we have figured out how it works. This project simulates packaging multiple items in a order with message correlation where order id is the unique key.   

* The workflow BPMN: The BPMN file is included in the resources of the github project.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/otqbbds49vwx28zbjamp.PNG)

* For single item the bottom flow gets executed based on the condition.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fqlad24jfwg652s2x7l.PNG)

* For multiple items message gets correlated in “Collect Items” Receive Task and collected item count gets incremented upon receiving a new message. It runs through the loop at the top the diagram until total number of items are received. This is implemented in the PackageItemsJobHandler of this Java project.

* Message correlation workflow setting in the BPMN file
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9lnhyq2663w43icjykuy.PNG)

* Workflow instance with 2 items to package is
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/42ab3lf131fh7kxqsbm3.PNG)

* Timeout is implemented so that it doesn’t wait in the loop forever if next messages are not sent. In this project 5 minutes is passed as timeout to Zeeke workflow. Interrupting timer boundary event is included to timeout after a duration which is provided as expression by accessing a variable.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b5vfmpq4540gwtjlt2rz.PNG)

The complete project is available on github https://github.com/mahfuzulamin/zeebe-message-correlation-java
Ghế hội trường
Tags: codepen
Published: 2021-05-07 04:48:38

<p>Công ty GSC – Là một đơn vị tư vấn thiết kế, thi công ghế hội trường, ghế rạp chiếu phim, ghế sân vận động cho các công trình hội trường hội thảo hội nghị của các cơ sở ban nghành, các tổ chức và nhiều doanh nghiệp lớn.</p>

{% codepen https://codepen.io/ghehoitruong/pen/ExWaPXY %}
Monaco Editor + Svelte Kit
Tags: svelte, vscode, javascript
Published: 2021-05-07 04:44:36

Here's the gist:
```html
<script lang="ts">
	import type monaco from 'monaco-editor';
	import { onMount } from 'svelte';
	import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
	import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
	import cssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker';
	import htmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker';
	import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';

	let divEl: HTMLDivElement = null;
	let editor: monaco.editor.IStandaloneCodeEditor;
	let Monaco;

	onMount(async () => {
		// @ts-ignore
		self.MonacoEnvironment = {
			getWorker: function (_moduleId: any, label: string) {
				if (label === 'json') {
					return new jsonWorker();
				}
				if (label === 'css' || label === 'scss' || label === 'less') {
					return new cssWorker();
				}
				if (label === 'html' || label === 'handlebars' || label === 'razor') {
					return new htmlWorker();
				}
				if (label === 'typescript' || label === 'javascript') {
					return new tsWorker();
				}
				return new editorWorker();
			}
		};

		Monaco = await import('monaco-editor');
		editor = Monaco.editor.create(divEl, {
			value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
			language: 'javascript'
		});

		return () => {
			editor.dispose();
		};
	});
</script>

<div bind:this={divEl} class="h-screen" />

```

## Key points
- Don't do `module.default` as shown on the [FAQ](https://kit.svelte.dev/faq)
- With Vite, you [don't need to configure workers with your bundler](https://github.com/vitejs/vite/discussions/1791#discussioncomment-321046)
India: Covid19 hospitals on Map
Tags: showdev, webdev, opensource, react
Published: 2021-05-07 04:28:00

---
title: India: Covid19 hospitals on Map
published: true
description: Locate covid19 hospital with beds availability and contact details on Map
tags: #showdev #webdev #opensource #react
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xie12ak6603eo199j7p.PNG
---
Hello!

I have created a site to locate covid19 hospitals in India on map with details like beds availability, contact information and directions to the hospitals.

Idea is to bring all hospitals on the map so that any one quickly search nearby hospitals or search hospitals near to an address. And be able to navigate to it using the directions.

Site: https://covidhospitals.online/
GitHub: https://github.com/covidhospitals/covidhospitals

## Features:
- Explore nearby hospitals using current device location
- Search address to look at hospitals around that.
- See hospitals contact details like phone, address along with beds availability
- Get directions to navigate to hospital location

## Built With
- [Leaflet](https://leafletjs.com/)
- [OpenStreetMap](https://openstreetmap.org)
- ReactJS
- [MapQuest](https://www.mapquest.com/)

## Source of Data

Currently hospital location, and beds information is being collected for AP, and Delhi states. Feel free to volunteer to contribute the data adhering the JSON format. 

|State or Locality|Site|Normalised data|
|:------------- |:-------------|:-------------|
|Andhra Pradesh|[http://dashboard.covid19.ap.gov.in/](http://dashboard.covid19.ap.gov.in/)|[See here](https://api.npoint.io/4594de00c3f1d76a08ec)|
|Delhi|[https://coronabeds.jantasamvad.org/](https://coronabeds.jantasamvad.org/)|[See here](https://api.npoint.io/4d61424b0910b4a2b692)|

## Credits
- A big thanks [Netlify](https://netlify.com/) for hosting the [covidhospitals.online](https://covidhospitals.online/)
- Thanks to [npoint.io](https://npoint.io) for hosting the AP hospital location data.


Please feel to make changes to the site and add more data sources to it. Any contributions are most welcome.
Jamstack and Serverless with Jason Lengstorf
Tags: devstream, pairprogramming, serverless, jamstack
Published: 2021-05-07 03:21:25

On <time datetime="2021-04-21">April 21st</time>, Jason Lengstorf (VP of Developer Experience at [Netlify](https://netlify.com/) and DEV Community member) joined @coffeecraftcode and I on the Walkthrough Wednesday stream to discuss Jamstack, serverless, and Jamstack Explorers.

We used Netlify's serverless functions to quickly set up an API to grab DEV posts with the DEV API.

Thanks again for joining us, Jason! 😎 I had a great time pairing with you on the stream.

_Watch the Walkthrough Wednesday with Jason and catch up on what you missed:_

{%youtube dXr0iJE10tQ %}

_Take a look at the repository we created and worked on._

{%github https://github.com/nickytonline/fun-with-jason %}

### On this stream, we covered:

* [GitHub CLI](https://github.com/cli/cli#installation)
* [Netlify CLI](https://docs.netlify.com/cli/get-started/) and how to quickly deploy and update our API
* [Netlify On-demand builders](https://docs.netlify.com/configure-builds/on-demand-builders/)
* [The DEV API](https://docs.forem.com/api/)
* [Jamstack Explorers](https://explorers.netlify.com/) - We forgot to cover this one, but Christina gave it a shoutout at the end of the stream. It's really good. I did the NEXT.js course with @cassidoo a little while back. 😎

<center>

![Amy Poehler slouching in a seat in a theater putting both her hands out as if to say cool!](https://media.giphy.com/media/nFFguNjdeotwc/giphy.gif)

</center>

Thanks again for coming on the stream, Jason!

### You can also find the three of us all over the web here:

Jason:

* [Twitter](https://twitter.com/jlengstorf)
* [Website](https://www.jason.af/)

Nick:

* [Twitter](https://twitter.com/nickytonline)
* [Website](https://iamdeveloper.com/)
* [livecoding.ca](https://livecoding.ca)
* [YouTube](https://youtube.iamdeveloper.com)

Christina:

* [Twitter](https://twitter.com/coffeecraftcode)

I hope to see you on future DEV streams! If you're interested in pairing, fill out [this form](https://iamdeveloper.com/pair). Christina and I would love to tackle an issue with you that the whole community could learn from.

P.S. [Follow DEV on Twitch](https://twitch.tv/thepracticaldev) to be notified when future streams begin and catch old streams on [YouTube](https://www.youtube.com/c/thepracticaldevteam)
Creating symbolic link in a shared hosting using PHP
Tags: laravel, php
Published: 2021-05-07 03:12:08

Now, we will learn how create symbolic link in a shared hosting using PHP

In Laravel documentation, a symbolic link (symlink or soft link) from public/storage to storage/app/public should be created to make files accessible from the web.

Create a symlink.php file:

```php
$targetFolder = '/home/your_account/your_project_src/storage/app/public';
$linkFolder = '/home/your_account/your_domain.com/storage';
symlink($targetFolder, $linkFolder);
echo 'Symlink process successfully completed';
```

Upload to public_html or your domain folder and run this symlink.php file:

```
http://your_domain.com/symlink.php
```

Done! A folder named storage will be created to link path with an indicator >>> on the folder icon.

Happy Coding:)
Setup An .Htaccess File For Redirecting To Laravel’s Public Folder
Tags: laravel, php, htaccess
Published: 2021-05-07 03:09:30

In this post, let's learn how to setup an .htaccess file for redirecting to Laravel’s public folder.

In Laravel the path for serving your web page is in the /public folder. By default after installing Laravel and navigating in a browser to the URL you will see a directory listing of all the Laravel files.  Here’s an easy way using an .htaccess file to redirect requests of user to the Laravel /public folder mod_rewrite.

Create a .htaccess file in your root directory and add the following code.

```
<IfModule mod_rewrite.c>
# That was ONLY to protect you from 500 errors
# if your server did not have mod_rewrite enabled

RewriteEngine On
# RewriteBase /
# NOT needed unless you're using mod_alias to redirect

RewriteCond %{REQUEST_URI} !/public
RewriteRule ^(.*)$ public/$1 [L]
# Direct all requests to /public folder

</IfModule>
```

I hope it's helpful for you.
Cartoonify Image with Machine Learning
Published: 2021-05-07 03:03:26

This article is all about building a photo cartoonifyer using Python and OpenCV.

WHAT IS OpenCV?

Python is the pool of libraries and OpenCV is a cross-platform library used for Computer Vision. It includes applications like video and image capturing and processing. It is majorly used in image transformation, object detection, face recognition, and many other stunning applications. 

Steps to create this application:-

Step 1: We need to import all the required libraries/modules

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

Step 2: In this step we need to build a File Box to choose a particular file.

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

Step 3:Storing the image.

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

Step 4: Transforming the image into grayscale.

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

Step 5: Smoothening the grayscale image.

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

Step 6: Retrieving the edges of the image.

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

Step 7: Preparing a Mask Image.

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

Step 8: Giving a Cartoon Effect.

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

Step 9: Plotting all the transitions together.

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

Step 10: Functionally of save button.

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

Step 11: Making the main window.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/62wm3rxnp3d2p7w15dge.png)

Step 12: Making the Cartoonify button in the main window.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dpq977b9w8gso4euah3.png)

Step 13: Making a Save button in the main window

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

Step 14: Main function to build the tkinter window.

"top.mainloop()"


And that's how we create our image cartoonifer, hope this article was helpful.
Removing Whitespace from Start and End
Tags: javascript, devops, tutorial, beginners
Published: 2021-05-07 02:35:50

* Sometimes whitespace characters around strings are not wanted but are there. Typical processing of strings is to remove the whitespace at the start and end of it.

* Let's write a regex and use the appropriate string methods to remove whitespace at the beginning and end of strings.

* Note: The `String.prototype.trim()` method would work here, but for now you'll need to complete this challenge using regular expressions.
* Ex:
```
let hello = "   Hello, World!  ";
let wsRegex = /^\s+|\s+$/g; 
let result =  hello.replace(wsRegex, ""); 
```
* `result` will be equal to the string `Hello, World!`
Why I chose Jekyll for my personal site
Tags: jekyll, github, blog
Published: 2021-05-07 02:31:20


*Why I decided to create my own blog on Github Pages with Jekyll instead of using popular platforms like Medium, Dev.to, or Hackernoon.*

When I first came up with the idea of creating a blog, Medium seemed the right choice. Popular platform, no concerns about hosting or configuration. I could just start writing.

But I stopped for a moment and decided to do a little research on Medium. And I found some concerns about the paywall, user tracking, and other issues. This already made me rethink the idea.

Then, I also found this article called [Medium Was Never Meant to Be a Part of the Developer Ecosystem](https://dev.to/devteam/medium-was-never-meant-to-be-a-part-of-the-developer-ecosystem-25a0), and it made me see how all the Medium restrictions and policies actually make it harder for us developers to find the information we need.

After that, I gave up on Medium.
# OK, Medium is not fit for Developers. But what about the other platforms?

The research about Medium made me cautious about the others as well. So I did my research on each of the platforms, but different from Medium, I didn't find anything to be concerned about.

Actually, reading the "About" section for both [Dev.to](https://dev.to/about) and [Hackernoon](https://www.about.hackernoon.com/) I found out they both have good policies and the goal of having an open space for developers to share knowledge. And I was really considering writing directly in one of those.

That was when I found a post about [Why you should not publish content on Dev.to](https://slashgear.github.io/stop-dev-to/) and why we should follow the POSSE principle.

> Publish (on your) Own Site, Syndicate Elsewhere

After reading that, I started to like the idea of having my own blog and using Dev.to and Hackernoon to share it.

# But why not WordPress or any other CMS?

Well, I had my experience with WordPress years ago. Setting up a host for it, plus all the trouble for the configuration didn't seem worth it.

Then I remembered GitHub Pages and the fact that it supports Jekyll. GitHub would provide free hosting, and Jekyll would allow me to blog by simply committing markdown files.

**Free hosting with custom domain support, plus being able to blog from my IDE?** That sounded really good.

So I decided to give it a try. And with only 2 hours I got it up and running. (most of the time was spent deciding on the theme)

Now, here I am, writing my first post.

# Conclusion (TL;DR)

If you are writing to help other developers, Medium, with its paywall and other limitations, doesn't seem the right platform for it.

Dev.to and Hackernoon are good platforms for developers. And I definitely recommend those if you don't want the trouble of hosting your blog, worrying about a theme, and so on.

But if you want the advantages of actually owning your content, without spending too much time setting up a host and configuring a blogging tool, GitHub Pages and Jekyll might be a good choice for you, and you can still use Dev.to and Hackernoon to share your content.
Using Capture Groups To Search and Replace
Tags: javascript, devops, tutorial, beginners
Published: 2021-05-07 02:30:07

* Searching is useful. However, you can make searching even more powerful when it also changes (or replaces) the text you match.

* You can search and replace text in a string using `.replace()` on a string. The inputs for `.replace()` is first the regex pattern you want to search for. The second parameter is the string to replace the match or a function to do something.

* Ex:
```
let myStr = "one two three";
let oneRegex = /one/;
console.log(str.replace(oneRegex, "five"));
```
* The `replace` call would return the string `five two three`

* You can also access capture groups in the replacement string with dollar signs (`$`).
* Ex:
```
let str = "one two three";
let fixRegex = /(\w+)\s(\w+)\s(\w+)/; 
let replaceText = "$3 $2 $1"; 
let result = str.replace(fixRegex, replaceText);
```
* Here we wrote a regex `fixRegex` using three capture groups that will search for each word in the string `one two three`. Then we updated the `replaceText` variable to replace `one two three` with the string `three two one` and assigned the result to the `result` variable. Also we made sure that we are utilizing capture groups in the replacement string using the dollar sign (`$`) syntax.
tcg player
Published: 2021-05-07 02:26:04

TCGplayer is the industry’s most advanced online technology platform for collectibles. The Company, which began as a digital media outlet in the collectible hobby room, has evolved from its humble beginnings selling comic books, sports cards, CDs, collectible cards, action figures, and tabletop games within Syracuse-area hobby stores to a vast eCommerce marketplace.
https://www.techitop.com/tcgplayer/
May 6th, 2021: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2021-05-07 01:44:00

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

<center>

![Information flowing through your brain](https://media.giphy.com/media/qKltgF7Aw515K/giphy.gif)

</center>

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{%link https://dev.to/devteam/what-was-your-win-this-week-nbe %}

<center>

![Someone feeling like "Yaaas!"](https://media.giphy.com/media/zBhZiVNNQjfTG/giphy.gif)
</center>

Photo by [Wes Hicks](https://unsplash.com/@sickhews?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](Photo by Wes Hicks on Unsplash)
Typescript vs Javascript
Tags: typescript, javascript, react, reactnative
Published: 2021-05-07 01:38:53

TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. Current Stable release: 4.2.3 / 5 March 2021. It has extensions: ts,.tsx.

TypeScript used to develop JavaScript applications for both client-side and server-side execution. Typescipt describe the shape of an object, also validate that your code is working correctly. All valid JavaScript code is also TypeScript code.

TypeScript code is transformed into JavaScript code via the TypeScript compiler or Babel. This JavaScript is clean, simple code which runs anywhere JavaScript runs: In a browser, on Node.JS or in your apps.

Typescript support in Visual Studio, Visual Studio Code, Nova, Atom, Sublime Text, Emacs, Vim, WebStorm and Eclipse. Provide wide range of accessibility & usablity.

Typescript is combination of static type checking with intelligent code completion provides a significant boost in developer productivity.

### TypeScript vs JavaScript

**Type**
TS: TS is strongly type object oriented compiled langauge.
JS: Javascript is a light weight, interpreted programming language.

**Design & Developed by**
TS: Anders Heijsberg at Microsoft
JS: J Brendan Eich at Netscape Communications Coropration, Mozilla Foundation, ECMA International

**Light/Heavy Weight**
TS: Heavy Weighted interpreted programming language
JS - Light weighted, design for development of large application and trans compile to JS

**Client Side/Server Side**
TS: Specially used in Client Side
JS: Both client side & server side

**File Extension**
TS: .ts, .tsx
JS: .js, .jsx

**Syntax**
TS: Modules, Functions, Variable, Statement & Expression, Comments
JS: All Statement are written within Script tag, tell browser to start interpreting text between script tag

**Benefits**
TS: Static Typing, Better Choice Of large Coding Projects, Better For Collaboration - Type Safetly, Warning, Options, Required, Better Productivity, ECMA 6 code, Dynamic Typing, Auto Compilation are help developers to boost their productivity
JS: Huge active community, Supported Native Browsers, While for TS will first complied and convert to js, which is extra step, More flexibility

**Want to start with Typescript, Let's start!** Join Us www.kpiteng.com

### Connect Us - 
KPITENG
Digital Transformation Service Provider
www.kpiteng.com
hello@kpiteng.com
Love this green dress!
Published: 2021-05-07 01:15:33

I love this green dress from Walmart! The fabric is pleasant, stitching is decent, able to stay cool in it!

Going for walks soon, just have some things to take care of before I do! I'll take some pictures! Selfy-stick or tripod?

5❤️for pics without mask

https://www.walmart.com/ip/2017New-Vintage-Style-Retro-1940s-Shirtwaist-Flared-Party-Tea-elegant-Women-Dress-Summer-Dress-Swing-Skaters-Size-8-18/805187371

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ajaiskqlof99o83wlirb.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5a4j818fwiqni5yht37c.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuc2dm7qx83xm74pvvuk.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5bdq4ydbby976zfedppv.png)
Fix missing Flutter menus in Android Studio
Tags: flutter, androidstudio, ide, troubleshooting
Published: 2021-05-07 00:57:56

## Problem

When I struggled to build [Flutter](https://flutter.dev/) 2 development environment with [Android Studio](https://developer.android.com/studio) in [Arch Linux](https://archlinux.org/), I sometimes met the situation where Flutter menus were missing.
I installed Flutter and [Dart](https://dart.dev/) via [pacman](https://wiki.archlinux.org/title/pacman) and also "Configure"d "Plugins" of them on Android Studio. The start menus didn't show, however, Flutter menus.

![Problem 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15aleudkg3jkkq63j85m.png)

I could create only [Android](https://developer.android.com/) projects 🤕

![Problem 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhp32hb2i6fq8eqylezy.png)

## Solution

### Case 1. Just hidden

The window of Android Studio start menus is expandable. Try to resize it:

![Solution 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2hrqfodebd84xqvgk0lw.png)

### Case 2. Broken configuration

It may be because Android Studio is configured before Flutter configuration is completed. Restore the default settings:

![Solution 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnyyj5uzdelzdz9u6ecb.png)

... and Flutter menus will appear with luck 🙂

![Solved](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kw4h3i2ybczrnxgklc0m.png)