teleren/devto huggingface dataset:
Code like a machine
Tags: showdev
Published: 2021-12-09 14:21:51

Human's are only good at repeating 1 to 2 steps without having slow down. So if you want to code like a machine, then do just that. What do I mean? Let me show you.

I have a long list of nav items I have to add data attributes to. I have to compare it to an existing nav which I'm porting over to React. 

There are hundreds of links and some of this I can't do with a regex find/replace. So to speed it up, I'll give myself a single task to add to each link, then another simple task to repeat again. 

I have to fill out things such as the title, position, aria, etc...

Instead of trying to copy and paste all of the elements at a  time, title, position and so on... I pick 1 thing to do, so I start with the title and go down the list. Then I come back to the top and I start with the position and so on. 

This makes it much quicker because I don't have to think about what I'm doing because it's a single task, I just do it. 

If I were to copy the whole thing over for each nav, I might copy of the title, the position and then have to remember what else to copy over next for every list item. That is a lot to track and remember. 

I apply this to a lot of things in my life, even my laundry. Instead of grabbing a random piece of clothing from the pile, shaking it out, folding it and then putting it in its matching pile, I do this instead.

I first sort all my clothes in to piles they belong in, then I shake them out/straighten them. 

Now i have organized piles of cloths to go through so I don't have to think, just do. 

My shirts are all in one pile, face up. I can grab my hangers and quickly hook them all on in one quick swoop. Next I fold my pants, just grab, fold and move on. 

I think you get the point. I'd love to see how much time it saves you. 

So try this little trick and let me know if it helps you. 

P.S. If you have any cool tricks or tips you use to be productive, please drop them in the comments below.
Difference Between Kotlin and Java
Tags: java, kotlin, difference, beginners
Published: 2021-12-09 14:10:36

There are heaps of inquiries Android application advancement competitors have, for example, 'Would it be a good idea for me to leave my continuous seminars on Java and decide on Kotlin?' and 'Would it be a good idea for me to pick Kotlin as my first language?'

![Kotlin and Java](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8y95coebpgoeosipzgsf.png) 

See, if you want a career in Android app development and you are learning Java for it, do not leave your course halfway. Complete your course and then move to Kotlin. Kotlin was made to interoperate with Java. Thus, you get a feature that helps you to convert your Java code to Kotlin or vice-versa without doing anything.

In Android application advancement, your Java abilities may be of no utilization in the coming 4 or 5 years, yet aside from Android application improvement, there are numerous things that no one but Java can do. Accordingly, great working capacity in Java can get you a lucrative work.

Additionally, assuming you are a finished fledgling and need to foster Android applications, then, at that point, experienced engineers will recommend that you ought to have some information on Java before you use Kotlin in light of the fact that it truly assists with learning Kotlin without any problem. Be that as it may, what are the significant contrasts among Java and Kotlin? For that, we have a committed Java versus Kotlin area, yet before that, we should get a short presentation of Kotlin and Java.

## Java

**Main features of Java:**

* Simple to use.
* Portable.
* Supports object-orientated programming.
* Secure compilation.
* Has dynamic memory allocation.
* Delivers high performance.
* Supports multithreading.

## Kotlin

Introduced by JetBrains, Kotlin is an open-source programming language. Kotlin was designed to interoperate with Java and JVM standard libraries. Following are some of the most popular Android apps made using Kotlin:

* Evernote
* Udacity
* WeChat
* Adobe Reader
* Twitter
* WordPress
* Netflix
* Expedia
* Pinterest

## [Kotlin vs Java](https://www.techgeekbuzz.com/kotlin-vs-java/):

![Kotlin vs Jav](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zei2wxgdyzgvqyj9fe4p.png)
![Kotlin vs Jav](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/suf6be4u1hvzgjybv5am.png)
![Kotlin vs Jav](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5003nsu33if0a2byhtg.png)
   
## Conclusion

Both the dialects are all set, yet assuming you need a programming language explicitly for Android application advancement, then, at that point, we propose Kotlin. In any case, imagine a scenario in which, in the forthcoming years, some other mobile operating system takes over Android? That would be terrible assuming you simply learn Kotlin.
Learning HUGO has been fun
Tags: markdown, html, webdev
Published: 2021-12-09 14:08:35

Very recently I started to learn about HUGO which has been super fun!

I first started with a wacky [terminal inspired website](https://shell.buymymojo.net/):

![Linux shell inspired website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sr32ep2synxkn7dd3n4y.gif)

Then I made a much more [reserved website](https://buymymojo.net/) which is a cleaner overall experience:
![My main website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adb297o8jw8786fc3cim.png)
 
It has been a fun overall experience being my first time using HUGO, I'm excited to learn more about it.

[Theme used](https://github.com/athul/archie)
CSS Hamburger Menu Icons
Tags: css, webdev, beginners, codenewbie
Published: 2021-12-09 14:07:39

Hi,
I created some hamburger menu icon animations using CSS. Since there are a few designs, I created a collection in this [codepen collection](https://codepen.io/collection/xKOwmL). 

A few pens from the collected is linked below. Take a look, I just used CSS, to mimic the use of checkbox effect I used JavaScript. 

 
{% codepen https://codepen.io/kiran-r-raj/pen/RwLbzLJ %}
{% codepen https://codepen.io/kiran-r-raj/pen/QWqLPap %}
{% codepen https://codepen.io/kiran-r-raj/pen/wvrvGjy %}
{% codepen https://codepen.io/kiran-r-raj/pen/poWzYoX %}
{% codepen https://codepen.io/kiran-r-raj/pen/GRMKeee %}
Fresh Tomatoes guys
Tags: python, programming, tutorial, productivity
Published: 2021-12-09 14:04:32

Alright let me clear I am not opening any tomato shop :)

I am gonna show you how to get any movie rottentomatoes score using my python package.
Let me show you,

```python
import freshtomatoes as ft
movie=ft.FreshTomatoes()
aladdin=movie.Scores("aladdin")
coco=movie.Scores("coco",2017)

print("Aladdin:- ",aladdin)
print("Coco:- ",coco)
```
## Output
```
Aladdin:-  {'audiencescore': '94', 'tomatometerscore': '57'}
Coco:-  {'audiencescore': '94', 'tomatometerscore': '97'}

```

As you can see it is returnig a dictionary containing two info 
+ audiencescore
+ tomatometerscore

## syntax
```python
import freshtomatoes as ft
movie=ft.FreshTomatoes()
movie.Scores("MOVIE_NAME")
#or
name=movie.Scores("MOVIE_NAME",MOVIE_RELEASE_YEAR)

```
So as you can see it is pretty simple now to get a movie's rottentomatoes scores.

So why wait install and try it now .
```
pip install freshtomatoes
```
Visit on pypi.org:- https://pypi.org/project/freshtomatoes/

## Want to contribute ?
Check the repo :- https://github.com/freakflames29/FreshTomatoes
Most Vital Features To Consider During WhatsApp Like App Development

Tags: whatsappclone, development, productivity, javascript
Published: 2021-12-09 13:58:02

In the technology-driven digital world, there is a need for instant messaging apps to communicate with each other. WhatsApp is one such real-time messaging app that connects people in distant places. Following its success, many business owners showed interest in deploying the messaging apps. Those who want to launch their app can leverage a WhatsApp Clone app with a plethora of features incorporated. Let’s discuss some predominant features to be considered during WhatsApp like app development.   

**Vital Features Of A WhatsApp Clone App:**

**Share Files**

It will facilitate the users to share files, including photos, videos, documents, contacts, and others within the app when they have a stable internet connection. They either have an option to send photos from the gallery or take pictures instantly with the built-in camera. 

**Voice & Video Calls**

Individuals can make voice/video calls with their friends. The [WhatsApp Clone app](https://www.uberlikeapp.com/whatsapp-clone) also supports group video calls with a maximum of 8 members at the same time. This works well when your device is connected to a stable internet.

**Profile Creation & Update**

Upon installing the app, users can create their profiles by specifying the profile name and about (bio). Also, they can set a profile picture. After the creation of a profile, they can modify it whenever they want.

**Last Seen**

When the users are active, an app like WhatsApp will display the “Online” status. If they are away, the app will display the last seen when they were last available. The users were able to hide the last seen if they wished by changing the setting.

**Create Group**

The users will be able to create and join groups and then send messages that the group members can view. Not only messages, but they can also send gifs, emojis, and stickers. 

**Mute Conversations**

This is quite an unavoidable feature for messaging apps. When receiving messages, the app will notify users. This may sound irritating for a few. Using this, they can mute the conversations and so they can continue with their tasks without any interruptions.
  
**No Text Limit**
 
There is no limit to sending messages as the users can unlimited messages to anyone whenever they want. It sounds great! Right? Such a kind of feature should not be omitted during WhatsApp like app development.

**Final Say,**

In this informative blog, we have covered almost every important feature to be included in the WhatsApp Clone app. Besides this, you ought to consider including new features for better functionality. This is how you can distinguish your app from other instant messaging apps.
Is my Data Safe with SaaS?
Tags: saas, startup, security
Published: 2021-12-09 13:36:19

_Do you want to build a SaaS solution as a developer? Or are you planning to become a vendor for other companies? Either way, you should study all risks, and especially data safety ones._

With traditional software, it’s up to users to make their network secure. 

SaaS integration means that a software vendor and cloud provider become responsible for data protection.

## What challenges you may face:

1. Security monitoring.
2. Data encryption.
3. Key management.
4. Data privacy.
5. Data residency.
6. IAM (Identity and Access Management).
7. Incident response.
8. Integration with other security environments in a company.
9. Additional expenses (e.g., third-party tools to compensate risks) increasing SaaS development cost.
10. Poor communication with B2B SaaS technical experts leaves unanswered questions or misunderstandings.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4fcutoir61n795wwykit.png)
 
Knowing what kinds of weak spots may occur, you are ready to strengthen them and prevent security risks. 

Now you’ve become more prepared to apply SaaS.

___________________________
Read more about SaaS implementation and monetization [in our article here](https://exceed-team.com/blog/saas-integration-when-and-how-to-apply-saas-how-much-does-it-cost-to-develop-saas)
Delay console.log()
Tags: node, react, debug
Published: 2021-12-09 13:19:23

Examine this short snippet within two scenarios given :

```javascript
stream.on('some-event', console.log("hello world")) // comment : this won't wait for some-event being triggered (no delay) i.e. should trigger right away – this is not we want to happen !
stream.on('some-event', console.log.bind(null, "hello world")) // comment : this wait for some-event being triggered (delayed)
```

In React this would be achieved by encapsulating console.log into fat arrow function wrapper as so (this is common practice) :

```javascript
stream.on('some-event', ()=>console.log("hello world"))
```

**TL;DR** : By delaying we "kinda" mocking scenario of `console.log.preventDefault()` idiomatically .

---

If any typos found or suggestions could be made , please leave a comment below !
Load Magento Store details to Alibaba OSS in webMethods.io Integration Flowservice
Tags: webmethods, integration, cloudstreams, connectors
Published: 2021-12-14 09:52:13

---
title: Load Magento Store details to Alibaba OSS in webMethods.io Integration Flowservice
published: true
date: 2021-12-09 13:18:19 UTC
tags: webmethods, integration, cloudstreams, connectors
canonical_url: https://tech.forums.softwareag.com/t/load-magento-store-details-to-alibaba-oss-in-webmethods-io-integration-flowservice/253815
---

 **Summary:**

This article describes the step-by-step process of creating the Integration for loading Magento Store details to Alibaba Object Storage Service using the **Magento and Alibaba OSS** Connectors in **[webMethods.io](http://webmethods.io/) Integration**.

**Pre-requisites:**

- The user needs to have a active **Magento E-commerce** and **Alibaba OSS** account.

- Active **[webMethods.io](http://webmethods.io/) Integration** cloud tenant.

**Contents:**

- **Section 1:** Configure **Magento E-commerce** and **Alibaba OSS** accounts in **[webMethods.io](http://webmethods.io/) Integration**
- **Section 2:** Creating the integration for uploading store details to Alibaba OSS.

Check out the steps for **Section 1** and **Section 2** in the original article in the [Software AG Tech Community](https://tech.forums.softwareag.com/t/load-magento-store-details-to-alibaba-oss-in-webmethods-io-integration-flowservice/253815).
Inclusive range Python - What does this signify?
Tags: python, beginners, tutorial
Published: 2021-12-09 12:37:16

In this short tutorial, we look at the inclusive range Python function. We explain what inclusive signifies with the help of examples.

### Table of Contents - Inclusive range Python
- [Inclusive range Python](#inclusive-range-python)
- [Code and Explanation](#code-and-explanation)
- [Closing thoughts - Inclusive range Python](#closing-thoughts-inclusive-range-python)

## Inclusive range Python
The Python range function is commonly used to create a series of numbers. These numbers can be printed or used in loops.
```python
for  values in range(0,4):
    print(values) 
```
Although the range in the code block says 0-4. The output is as follows.
```python
0
1
2
3
```
This is because Python prints values from 0 until 4. This behavior is called off-by-one and is common in programming languages. Essentially the function does not include the end value. This behavior is favorable while looping through objects since the index starts at 0. However, in case you are looking to print values or if you are new to Python, this can take some time to get used to.

While programming the best practice is to understand the language and use it to its strengths. Although I would recommend understanding and using the syntax as it is, there are a few methods to make range inclusive.

## Code and Explanation:
Let us first take a look at the syntax of the range() function.
### Syntax:
```python
range(start, stop, Increment)
```
### Parameters:
- Start - Optional, used to specify where the range should start. The default start value is 0.
- Stop - Required, used to specify where the range should stop.
- Increment - Optional, used to specify the incrementation.

The right way to print values from 0 to 10 would be as follows:
```python
for  values in range(0,11):
    print(values)
``` 
This would print out values from 0 - 10.

Another method is to create a function which increments the range. This makes the Python range function inclusive. The code is as follows:
```python
def range_inclusive(start, end):
     return range(start, end+1)

range_inclusive(1, 10)
```
When the function is called, it adds 1 to the stop parameter. The output is as follows.
```python
0
1
2
3
4
5
6
7
8
9
10
```

## Closing thoughts - Inclusive range Python
Although the above method works properly it is not advisable to use it. I would only recommend using it for learning purposes. Product development would involve working with multiple developers and using such syntax would not be advisable.
Merging Multiple PDF File in Single File Example in Laravel
Tags: laravel
Published: 2021-12-09 12:57:52

Hello Friends,

This example is focused on merge multiple pdf files laravel. step by step explain laravel 8 merge pdf files. you will learn dompdf merge pdf laravel. i would like to show you laravel merge pdf files.

As we know almost document written on pdf. so it you need to send email or fax then you might be require to merge one pdf file instead of multiple pdf files. If you need to create one pdf file from multiple pdf files then you can follow this tutorial.

In this tutorial, we will use lara-pdf-merger composer package and create one example. we will also create two routes GET and POST. then we will create one controller file with one blade file. When user will select multiple pdf files then it will return single file with merge.

So, let's follow few steps and get easy example.

https://www.codecheef.org/article/merging-multiple-pdf-file-in-single-file-example-in-laravel
Implement Rate Limiting in Laravel to Block User Too Many Request
Tags: laravel, ratelimit
Published: 2021-12-09 12:55:24

Laravel includes powerful and customizable rate limiting services that you may utilize to restrict the amount of traffic for a given route or group of routes. To get started, you should define rate limiter configurations that meet your application's needs. Typically, this should be done within the configureRateLimiting method of your application's App\Providers\RouteServiceProvider class.

Rate limiters are defined using the RateLimiter facade's for method. The for method accepts a rate limiter name and a closure that returns the limit configuration that should apply to routes that are assigned to the rate limiter. Limit configuration are instances of the Illuminate\Cache\RateLimiting\Limit class. This class contains helpful "builder" methods so that you can quickly define your limit. The rate limiter name may be any string you wish:

https://www.codecheef.org/article/how-to-implement-rate-limiting-in-laravel-8
Just released Cachalot DB V2
Tags: csharp, database, cache, dotnet
Published: 2021-12-09 12:46:51

What is Cachalot DB?

An **in-memory database for dotnet applications**
All data is available in memory and distributed on multiple nodes, allowing for blazing-fast queries. Like Redis but with some significant differences:

- **Persistence is transactional**; all update operations are written into a persistent transaction log before being applied to memory.

- It has a **full query model** available through SQL and LINQ. It supports all usual operators like projections, distinct, order by, and, of course, a complete where clause. Everything is done server-side.

- It supports both dictionary and ordered indexes. A highly optimized query processor chooses the best index, combining multiple indexes for one query.

- It can compute **pivot tables** server-side even on a cluster of many nodes

- A high-speed **full-text search**. You can do either full-text search, traditional queries, or combine the two.

- Very fast, fully ACID, **two-stage transactions** on multiple nodes

- Consistent read context allows executing a sequence of queries in a context that guarantees that data is not modified meanwhile.

- Bulk inserts: when feeding with large quantities of data, ordered indexes are sorted only once at the end to ensure optimum performance.

- When used as a **distributed cache** (persistence disabled), an inventive mechanism allows the description of the cached data, thus enabling complex queries to be served from cache only if all the concerned data is available.

I would really apreciate your feedback

The project can be found here https://github.com/usinesoft/Cachalot
Catching Attackers with Traps
Tags: discuss, webdev, security, programming
Published: 2021-12-09 12:15:21

Sometimes, a simple **trap** or **honeytoken** placed at the right spot in your application can be enough to catch suspicious activity. This [video](https://www.youtube.com/watch?v=XHeM_OizkoQ) from Shakacon by two Application Security Engineers at Netflix is an example implementing this idea with a project called [Ensnare](https://github.com/ahoernecke/ensnare) (unfortunately not maintained anymore). 

I was wondering whether this form of attacker detection is actually practiced by you folks and what your experiences were in regards to successes, issues, implementation and maintenance effort.      

Another, more recent illustration of this idea can be found in this talk by Dana Epp:

{% youtube 5dukn9hcy_Q %}
Auto-incrementing your Power Platform solution version in your DevOps Pipeline
Tags: powerplatform, dynamics365, devops, azuredevops
Published: 2021-12-09 12:11:10

Just a quick enhancement to this [post](https://dev.to/diskdrive/using-devops-to-export-a-power-platform-solution-into-source-control-56hk) where we exported a solution from Power Platforms in order to commit to a source repo.

If you manually exported the solution in Power Platform, it would normally offer to automatically increment the version by one. This post will demonstrate how to do it with DevOps Pipeline as well.

#Setting the build number format

![build number format](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sx6ad5n8u0x0v0vzwyjn.png)

This sets the format of the Pipeline's Build.BuildNumber property. What `1.0.1.$(rev:rr)` means is that we want the version to be 1.0.1.x with x being appended by one each time.

#Add Set Solution Version Step

![Set Version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bmqowyl6ancpn4womltb.png)
 
Add the Set Solution Version task before the export solution task. This step will actually go into your Dev environment's solution and update the version number to be the same as the BuildNumber.

#Running the pipeline

![Pipeline](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxtxj5tvhsumwmj76wk6.png)
When you run the pipeline, notice that the version number has changed from just a number to now in the 1.0.1.x format.

 ![PR Solution](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vj99abkvocf7gieez2n.png)

When you do a PR, you'll be able see that the version in the solution has also changed.
Advent of Code 2021 - Day 9
Published: 2021-12-09 12:04:56

---
title: Advent of Code 2021 - Day 9
published: true
description: In this video series, I try to challenge myself with the Advent of Code trials. Each solution will be published to Github, and I hope you will learn something from my coding mistakes and perhaps send some code my way on how you have done these challenges. I know by reading code, so this is such an exciting thing for me.
tags:
cover_image: https://i.ytimg.com/vi/WE5CIYNU2bg/maxresdefault.jpg
---

{% youtube WE5CIYNU2bg %}

In this video series, I try to challenge myself with the Advent of Code trials. Each solution will be published to Github, and I hope you will learn something from my coding mistakes and perhaps send some code my way on how you have done these challenges. I know by reading code, so this is such an exciting thing for me.