teleren/devto huggingface dataset:
Elasticsearch vs Meilisearch
Tags: elasticsearch, php, laravel, hiring
Published: 2021-01-27 09:04:51

During the process of building [arbeitnow](https://arbeitnow.com) there was a need for providing a near instant search experience for Job Seekers. 

**Criteria:**
* Easy to integrate with PHP
* Runs reasonably well on VPS systems
* Good community support (GitHub or Stackoverflow)
* Flexibility

I had a bit of experience on Elasticsearch with a small project, which I learnt with the help of Udemy tutorials which were great. It should have been the obvious choice, except for the fact that it does require a steep learning curve and setup to get it going smoothly.

So I decided to give [Meilisearch](https://www.meilisearch.com/) a try. It's quick, small footprint, integrates well using their SDK and provides great tolerance for typo's. But unfortunately, it lacks a lot when it comes to customising Search filters. 

Things missing from Meilisearch:
* Setting up Synonyms from a file
* Multiple WHERE clauses, thus limiting search to simple queries and restricts us to mostly single columns WHERE conditions
* Multi Index searching
* Sorting Results

Elasticsearch supports all of the above (their recent licensing change is another thing!) so I decided to go with it.

Meilisearch's [public roadmap](https://roadmap.meilisearch.com/) is indeed promising, so I will surely be coming back to it in the near future, it is a great tool for smaller projects and hopefully it gets the love it deserves!
DevOps Online Training with Placements
Tags: devops, devopstraining, devopstools
Published: 2021-01-27 06:50:49

Looking for DevOps online training with Experts?
	
What is DevOps?
The goal is to bridge the gap between IT operations and development to improve communication and collaboration, create more seamless processes, and align strategy and objectives for faster and more efficient delivery.

We are providing online certification in Pune on DevOps online training with live projects so you will get practical experience with highly experts. We have experienced trainers who provide industrial-based knowledge and share their own experience in the IT world. We can assure you that after completing this online training in DevOps you will be able to develop and configure products using DevOps.

Get Certified in DevOps Framework with Best Institute.
DevOps with Industry Expert.
 join Us and get certification 
with placement assistance.

URL: https://devopstraininginpune.com/courses/devops-online-training/

Address: DevOps Training in Pune, Office No. 405 , 4th Floor, Above McDonalds, Rainbow Plaza, Pimple Saudagar, Pune – 411027

Contact us : 
•	+91 741 007 3340
•	+91 962 386 8215
Microsoft announces FREE Azure certification renewals 
Tags: azure, cloud, aws, news
Published: 2021-01-27 08:50:27

**Good news for all Azure role-based and specialty Certified** :smile: :clap:

Recently I came to know that Microsoft announced FREE `Azure` certification renewals for role-based and specialty certifications.

This means those who have completed their `Azure` certifications need not to pay again to renew their certification. Instead pass online assessment on `Microsoft Learn` and renew for FREE. Below is the announcement:

**Stay current with free certification renewals**

Starting in February 2021, you will be able to renew your role-based and specialty certifications by passing a free renewal assessment on Microsoft Learn. Instead of retaking an exam, the assessment can be completed online anytime within six months before your certification expires.` 

Check the announcement at https://aka.ms/mpn/news/staycurrent

All the best. :wave: :+1:
Matt Brannelly | Nonprofit's Make Profit
Tags: nonprofit, fundraising, savings
Published: 2021-01-27 08:24:46

According to Matt Brannelly from Clayfield - Australia, nonprofit Organisations are established to achieve a community outcome as opposed to make a profit for commercial reasons. Their goal is to carry out charitable activities and make an impact. 

Matt Brannelly takes us through various ways how nonprofit organisations create revenue.

Read More: https://mattbrannelly.medium.com/nonprofit-revenue-sources-d3a2dca60678
Fill PDF Form Fields using Java
Tags: java, pdf, formfields
Published: 2021-01-27 08:24:05

PDF form fields are mainly used to collect user information and I've introduced how to [create form fields in PDF](https://dev.to/jazzzzz/creating-fillable-pdf-form-fields-in-java-application-19e8) by using Free Spire.PDF for Java.  In this article I will share how to fill each form field with value with this 3rd party free library.

**Installation**
**Method 1:** Download the Free Spire.PDF for Java and unzip it.Then add the Spire.Pdf.jar file to your project as dependency.

**Method 2:** You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.pdf.free</artifactId>
        <version>3.9.0</version>
    </dependency>
</dependencies>
```

**Relevant Code Snippet**
```java
import com.spire.pdf.PdfDocument;
import com.spire.pdf.PdfPageBase;
import com.spire.pdf.graphics.PdfBrushes;
import com.spire.pdf.graphics.PdfCanvas;
import com.spire.pdf.graphics.PdfPen;
import com.spire.pdf.graphics.layer.PdfLayer;

import java.awt.geom.Point2D;

public class AddLayers {
    public static void main(String[] args){
        //Instantiate a PdfDocument object
        PdfDocument pdf = new PdfDocument();
        //Add a page
        PdfPageBase page = pdf.getPages().add();

        //Add 3 layers to the page
        PdfLayer layer = pdf.getLayers().addLayer("red line1");
        PdfCanvas canvas1 = layer.createGraphics(pdf.getPages().get(0).getCanvas());
        canvas1.drawLine(new PdfPen(PdfBrushes.getRed(), 1), new Point2D.Float(50, 350), new Point2D.Float(200, 350));
        layer = pdf.getLayers().addLayer("blue line1");
        PdfCanvas canvas2 = layer.createGraphics(pdf.getPages().get(0).getCanvas());
        canvas2.drawLine(new PdfPen(PdfBrushes.getBlue(), 1), new Point2D.Float(50, 450), new Point2D.Float(200, 450));
        layer = pdf.getLayers().addLayer("green line1");
        PdfCanvas canvas3 = layer.createGraphics(pdf.getPages().get(0).getCanvas());
        canvas3.drawLine(new PdfPen(PdfBrushes.getGreen(), 1), new Point2D.Float(50,550), new Point2D.Float(200, 550));

        //Save the resultant document
        pdf.saveToFile("output/addLayers.pdf");
        pdf.close();
    }
}
```
**Output**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/h8nh2g1hojd6vn4yytjh.jpg)
Split CSV by number in shell only.
Tags: linux, bash, beginners
Published: 2021-01-27 08:13:53

- Sometimes I have to deal with large CSV files.
- In this case, dividing and foldering in advance will make it easier to handle.
- This section describes how to split files and classify folders according to the number of lines using only Shell.

## Result
- The following is the directory structure before execution.

```bash
.
├── sample.csv
├── main.sh
```

- The following is the description of `main.sh`
    - **sample.csv has 100 rows of data**
    - **※Error handling is omitted.**

```bash
#!/bin/sh
set -e

# file path
[ ! -e "$1" ] && exit 1 || datafile="$1"
# File extension deletion
filename="${datafile%.*}"
# Get number of lines
row=$(grep -c '' $datafile)
# Obtaining the number of splits
sep="$2"
# Number of directories created
dir_cnt=$(awk -v row="$row" -v sep="$sep" 'BEGIN {
	i=row/sep
	printf("%d\n",i+=i<0?0:0.999)
	}
	'
)
# Folder creation
seq -f "${filename}_%01.0f" 1 ${dir_cnt} |
xargs mkdir -p
# File division
split -l ${sep} -a 2 $datafile "${filename}_"
# File movement
count=1
for i in `find . -type f -name "${filename}_*" | sort`
do
	mv $i "${filename}_${count}/${i//_*/_${count}}.csv"
	let count++
done
```

- Run as follows.

```bash
sh main.sh sample.csv 25
```

- After executing, check that the directory structure is as follows.

```
.
├── main.sh
├── sample.csv
├── sample_1
│   ├── sample_1.csv
├── sample_2
│   ├── sample_2.csv
├── sample_3
│   ├── sample3.csv
├── sample_4
│   ├── sample4.csv
```

## Supplement

### Number of created directories
- **Rounding up**
    - In the case of a decimal number such as `100/15`, the directory is not created normally.
    - Round up to an integer with `printf`.

### File splitting and moving
- **Extension is added by mv.**
    - Additional extension (`--additional-suffix`) in split is not the default on Mac etc.

## Link
- [split](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/split.html)
- https://unix.stackexchange.com/questions/32626/split-a-file-by-line-and-have-control-over-resulting-files-extension
Useful AI Resources — Behavior Trees
Tags: ai, programming, resources, gamedev
Published: 2021-01-27 08:12:25

Behavior Trees are an incredibly powerful tool that can be used for building game AIs, but it can be daunting at first trying to learn how it all works.

Here are some resources that I have found very helpful in aiding my understanding of behavior trees.

---

[Behavior Tree Introduction](https://www.youtube.com/watch?v=6VBCXvfNlCM)
This is an incredibly handy introduction video by the AI and Games YouTube channel that gives a nice overview of what a behavior tree actually is, how they work, and why you probably want to use them.

[Chris Simpson's blog post on Behavior Trees](https://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php)
Chris Simpson, developer of Project Zomboid, has a really good blog post that will add on to the previous introductory video and really help cement in your mind the concepts that drive behavior trees.

[Behavior Tree Lecture](https://www.youtube.com/watch?v=YCMvUCxzWz8)
If you are more of a visual/auditory learner, here is a great lecture that goes more into depth than the first video about behavior trees.

[GameAIPro's Behavior Tree Starter Kit](https://www.gameaipro.com/GameAIPro/GameAIPro_Chapter06_The_Behavior_Tree_Starter_Kit.pdf)
This is a great document from GameAIPro that gets into how behavior trees work and also comes alongside solid code examples. This gives you some insight about how you might actually implement a behavior tree.

[Behavior Tree Book](https://arxiv.org/pdf/1709.00084.pdf)
This is an extremely detailed book about behavior trees by Michele Colledanchise and Petter Ogren. If there are any gaps in your knowledge left from the previous resources, this resource should fill those gaps.

---

I hope these resources will help all of you out as much as they have helped me, not only have I learned a lot about behavior trees from them, but also AI in general.
5 REASONS THAT MAKES OPEN-SOURCE SO POPULAR IN 2021
Tags: opensource, github, privacy, programming
Published: 2021-01-27 08:08:57

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

It's 2021, when things are drastically moving towards open source from closed source.
MEME FROM TENNOR
![Alt Text](https://media.tenor.com/images/81ad70da9bfdb0834562fb9093307239/tenor.gif)
Gif from Tenor
Let's take a recent example how signal app gone so popular over WhatsApp just because its open source on the other hand WhatsApp is not. Slowly people are realising about their privacy and how their data is being used processed against them.
The drastic increment in user base of signal has blown away the old monopoly closed source companies that pray on your personal data and steal the ad preferences information.

I am computer science engineer with 6 years of experience in web development I have never seen anything as famous as open source. Open sources is the future of technologies and workflows.

Few reasons why open source is game changer:
1) Collaborative Work:
☞ Collaborative work is more productive than any other work experience studies have shown that one developers that collaborate work they tend to have more optimised and more creative experience, while programming a particular task.

2) Open-Source:
☞ Of course being open source one can watch, analyse, rewrite, reproduce and add some modifications in such a way that it can be more useful then before. isn't it great?

3) Community:
☞ You know what makes more special about a particular technology and what makes it last so long? It's the community it has. Python, JavaScript, and another languages, they are so much dominant in their field only just because their community and it has been accepted by their original developers or by original creators of that particular technology, there are amazing communities on open source that you always provide a positive juster no matter how big or small the project is.

4) Transparency:
☞ No matter where you will find your source and no matter how is deployed you will always receive authentic reliable and the accurate results from the origin and from the official source.

5) Privacy and Security:
☞ Open-Source softwares provide more privacy than any other closed-source s/w. It is because you know actually what's happening with you information that you share and how secure it is. I'm not sharing you that open source technologies are always more secure then close source but you can always check if you know the code you know your information is being handled properly or not.

I hope this article has helped you in some way if you have any other suggestions or views please feel free to write in comment box thanks for reading.
Structurizr quick tip: hiding descriptions
Tags: architecture, productivity, structurizr, c4model
Published: 2021-01-27 07:57:49

---
title: Structurizr quick tip: hiding descriptions
published: true
description: 
tags: #architecture #productivity #structurizr #c4model
//cover_image: https://direct_url_to_image.jpg
---

By default, Structurizr will include an element's descriptive text inside of that element when rendering a diagram:

![Diagram with element descriptions](https://dev-to-uploads.s3.amazonaws.com/i/jklq9jmh7ncpf4syrp7c.png)

While that level of information definitely enriches the diagram, there are situations where you might not want to show the descriptive text, for example if you're doing a presentation. For this reason, Structurizr allows you to hide the descriptive text in a couple of ways.

When you're viewing a diagram, pressing the `d` key will toggle the descriptions on and off:

![Diagram without element descriptions](https://dev-to-uploads.s3.amazonaws.com/i/0jhgdrvypcqxceyhptq9.png)

If you'd like to hide the descriptions a little more permanently, you can use a style for the `Element` tag, setting the `description` property to `false`. For example, with the [Structurizr DSL](https://structurizr.com/dsl):

```
styles {
  element "Element" {
    description false
  }
  ...
}
```

As a bonus tip, you can also increase the font size in a similar way, to enlarge the text for presentation purposes:

![Diagram without element descriptions, with a larger font size](https://dev-to-uploads.s3.amazonaws.com/i/w27bb7c7t0xgwecgpwbs.png)

## Summary

The descriptive text can be useful, but sometimes you don't need to see it. Structurizr makes it easy to show/hide element descriptions, without needing to modify your diagram.
HTML elements
Tags: 100daysofcode, html, javascript, css
Published: 2021-01-27 04:43:17

HTML describes the structure of the website.When creating the web page, you can add tags(Markup).
* Structural Markup
* Semantic Markup

**Structural Markup**: the elements that we can use to describe the headings and paragraphs.
**Semantic Markup**: the elements which provides more information and helpful for `SEO` purposes.

## HTML elements:
*  `<h1></h1>` to `<h6></h6>`.
The browser displays the heading in different sizes. `<h1>` is the largest and `<h6>` is the smallest.
*  `<p></p>` used to display the paragraph tag.
* `<b></b>` display text in bold.
* `<strong></strong>` used to display the content which has importance. By default, the browser displays the content in bold.
* `<i></i>` display text in italics.
* `<em></em>` used to emphasize the content(show it's importance). By default, the browser displays the content in italics.
* `<sup></sup>` used to contain characters that should be superscript such raising power of 2.
* `<sub></sub>` used to contain characters that should be subscript.
* `<br />` break tag helps to show each new paragraph or heading on a new line.
* `<hr />` gives a horizontal rule between sections.
* `<blockquote></blockqoute>` used for longer quotes.
* `<q></q>` used for shorter quotes.
* `<abbr></abbr>` - Abbreviation.
* `<acronym></acronym>` - Acronym.
* `<cite></cite>` used to indicate where the citation is from.
* `<address></address>` used to indicate the address and displays the content in italics.
* `<ins></ins>` used to show the content that has been inserted to the document.
* `<del></del>` used to show the content that has been deleted from the document.
* `

` used to show the content that is no longer relevant.

**Empty Elements**:
There are few elements that don't have a child node.
They are:
`<area>,<base>,<br>,<col>,<embed>,<hr>,<img>,<input>,<keygen>,<link>,<meta>,<param>,<source>,<track>,<wbr>`
Pyswahili (Python for non-english speakers)
Tags: python, programming, codenewbie, opensource
Published: 2021-01-27 07:46:59

A month ago I started an open-source project titled **Pyswahili**, which acts as a middleware to help non-English speakers get started with Python Programming using Swahili based keywords.

With just a twist of the dictionary file, you could make the python understand your custom language keywords.

The Project is available on GitHub as open-source under MIT Public License

Here is the link
{% github https://github.com/Kalebu/pyswahili %}

I also write article on my [personal blog](https://kalebujordan.dev/)
Why do you use Dev.to ?
Tags: watercooler, discuss, developer, help
Published: 2021-01-27 07:44:05

What do you aim to accomplish on dev? are you here for the tutorials? career advice? are you hoping to build connections with people in the tech industry or are you here to build a following? Or maybe you're just here for fun ? :smiley: 
Let me know in the comments below.
Top Tips on How To Prioritize Work?
Tags: productivity
Published: 2021-01-27 07:43:56

For Most of us working professionals, we see a lot of pressure for achieving goals, tasks and deadlines Unfortunately, not all of these goals and work tasks see the daylight. This can be attributed to lack of planning and prioritizing. At some point of time every professional in their careers have been faced with how to prioritize between urgent and important tasks. There are scenarios where managers have been reported to say “Everything is important”.

In such cases how does one decide which tasks to work on and which to push back. At TaskOpad we strongly believe that the hardest part of getting work done, is not working on it, it is planning it. When priorities and work start piling up, it is important to have a system in place which helps you prioritize well. While a task management software can easily help you with that, but there is a whole science to it that professionals need to follow in order to be more productive.

Read More on : <b> <a href="https://www.taskopad.com/blog/ultimate-guide-to-prioritize-work/"> Tool For Project Management </a> </b>
3 ways to check if variable is a number in JavaScript

Tags: javascript, webdev, beginners, codenewbie
Published: 2021-01-27 07:23:57

I was building a form the other day in Vue and I had to write number validation for the field so had to write the logic to check whether the input value is number or not. I wanted to list out the few ways I learnt which might be helpful to others.

> **NOTE:** *In JavaScript, special values like `NaN`, `Infinity` and `-Infinity` are numbers too - though, we'll be ignoring those values.*

##1) Using isNan()
The `isNaN()` determines whether a value is `NaN` or not. We can take advantage of this to determine whether a variable is number type or not.
```javascript
var numberOfpushUpsToday = 34; 

if(!isNaN(numberOfpushUpsToday)){
    console.log('It is a number')
}
else {
    console.log('It is not a number')
}
```
```javascript
!isNaN(34) // returns true
!isNaN('34') // returns true
!isNaN('Hello') // returns false
!isNaN(true) // returns true
!isNaN(false) // returns true 
!isNaN('undefined') // returns false
```
###Limitations:
1) It returns `true` for the Boolean values because the Boolean values are converted to numbers `0` and `1` accordingly so it would be misleading sometimes.
2) We have same issue for the `null` value as well. It returns true and hence one has to be careful while writing the code.

##2) Using typeof()
The `typeof` operator returns a string indicating the type of the unevaluated operand.
```javascript
num = 45
strng = '34'
typeof num // returns 'number'
typeof strng // returns "string"
typeof undefined // returns "undefined"
typeof null // returns "object"
```
If the variable is type number, it would return the string `number`. We can use this to determine if the variable is number type.

```javascript
var numberOfpushUpsToday = 34; 

if(typeof numberOfpushUpsToday === 'number' ){
    console.log('It is a number')
}
else {
    console.log('It is not a number')
}
```
The `typeof()` performs much better than `isNaN()`. It correctly determines that a string variable, null and Boolean values are not numbers.

##3) Using Number.isFinite()
The function `isFinite()` determines if the passed value is finite. The arguments are first converted to numbers and then checks if the value is finite and hence this is the most best way among all the methods mentioned above.
```javascript
Number.isFinite(34) // returns true
Number.isFinite('Hello') // returns false
Number.isFinite(undefined) // returns false
Number.isFinite(true) // returns false
Number.isFinite(null) // returns false
```
```javascript
var numberOfpushUpsToday = 34; 

if(Number.isFinite(numberOfpushUpsToday) ){
    console.log('It is a number')
}
else {
    console.log('It is not a number')
    }
```
###Conclusion:
Although these methods can get tricky with Boolean values, `undefined` and `null`, they are helpful in solving some problems in day to day life. One just have to be careful while writing the code according to their needs.

*And that sums it up!!!
Thank you..
Comment below if you have any feedback or thoughts.*
ডকার বিগেইনার্স গাইড।  Docker Beginners Guide In Bengla. Run an API Service with Database and Redis. Youtube series - 
Published: 2021-01-27 07:21:43

https://www.youtube.com/watch?v=P-BwzLXUIVA
https://www.youtube.com/watch?v=k3p4dDeAEks&ab_channel=NahidHasan
Learn how to create a custom toggle switch button using Html, and Css.
Tags: html, css, tutorial, webdev
Published: 2021-01-27 07:12:29

If you like the video, don't forget to smash that Like icon 👍 and subscribe ❤️. It will help a lot! Thanks! 🙏

Tutorial: https://youtu.be/j2tdnJdYc0Q
Twitter: https://twitter.com/shahir_dev
Telegram: https://t.me/WeeklyTipsWithShahir

{% codepen https://codepen.io/shahirhossaini/pen/bGwRYmb %}