teleren/devto huggingface dataset:
forEach, a JavaScript Iterator
Tags: javascript, higherorder, foreach, loop
Published: 2023-01-04 07:06:38

JavaScript Higher-order Function
If you are just getting familiar with JavaScript higher-order functions, you might get confused with maps, for each, filter and reduce.
This is a continuous series that will explain the four concepts broadly and also differentiate them so you know which to use per time.
In this first part of the series, we will learn about forEach in JavaScript
One major thing to note about forEach is that it always returns undefined. forEach is a JavaScript iterator so it also is Map and filter. Iterators are JavaScript built-in methods on arrays that can be used in place or for loops. However, the issue is picking the right iterator per time.
forEach uses a callback function for its operations and executes the function once for each provided element. It does not return an array, unlike map.forEach loops through an array, executes the callback function but returns the values in the array. Whether you use the return keyword in a forEach iterator or not, does not make a difference. It always returns undefined. The callback function can have up to three parameters. The first is the value at the current array's index, the second is the current array index and the third is the array itself.
Let's look at a few examples:
Given an array of five elements in ascending order, print the different values in the array.
Let arr= [1,2,3,4,5];
arr.forEach(function(val,index,arr){
console.log(val)
Answer in the console:
1
2
3
4
5
If you decide to console.log the index
console.log(index),
Answer in the console:
0
1
2
3
4
Here, the val represents the value of the array, the index represents the index of the array, and the arr represents the array itself.
Also, you do not necessarily need to use the three parameters in the forEach callback function. You can use one parameter, two parameters or three parameters. The result remains the same.
Example:
Let arr = [1,2,3,4]
arr.forEach(function(val){
console.log(val)
Answer in the console:
1
2
3
4
Let us see another example:
Write a function that returns a new array with all its values increased by ten.
Function increasedByTen(ten) {
Let increasedArray = [];
ten.forEach(function(val){
increasedArray.push(val + 10);
})
return increasedArray;
If the value of ten = [2,4,6,8,10]
increasedArray = [12,14,16,18,20].
Here, the reason we used the push function is that forEach does not return an array. Instead, it returns undefined.
This is one of the differences between map and forEach.
If you use a map for this, you would write shorter code as your map creates a new array. So you add ten to each value in the new array and it returns a new array.

My Twitter Handle: https://twitter.com/mchelleOkonicha

My LinkedIn Handle: https://www.linkedin.com/in/buchi-michelle-okonicha-0a3b2b194/
What is Hasura? What are the differences between Hasura and Apollo Graphql?
Tags: graphql, backend, webdev, programming
Published: 2023-01-04 07:04:39

Hasura is an open-source engine that connects to your databases and microservices and automatically generates a GraphQL API for them. It provides a number of features on top of the API, including an intuitive console for querying the API, real-time updates using GraphQL subscriptions, and end-to-end tracing for debugging GraphQL queries.

Apollo is a set of tools for building GraphQL applications, including a server that implements the GraphQL specification and client libraries for making GraphQL queries from a client application. Apollo can be used with any backend that exposes a GraphQL API, including Hasura.

So, while Hasura is a backend service for exposing a GraphQL API, Apollo is a set of tools for building applications that use a GraphQL API, whether it is provided by Hasura or another service.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vla00tckkmp40k51lfp5.png)

- Hasura provides a number of additional features on top of a GraphQL API, such as support for GraphQL subscriptions and triggering webhooks on database events.

- Hasura allows you to build a GraphQL API on top of your existing databases and microservices, without writing any backend code. This can make it easier to get started with GraphQL, especially if you are already familiar with your existing data model.

- Apollo, on the other hand, is more focused on providing tools for building GraphQL-based applications, such as client libraries for making GraphQL queries from a frontend application and a server for executing those queries.

- You can use Hasura and Apollo together to build a GraphQL-based application. In this case, Hasura would provide the backend GraphQL API, and you could use Apollo's client libraries and server to build the frontend application and handle things like caching and performance optimization.
A Simpler and Better Way of Hiding Elements with HTML
Tags: html, css
Published: 2023-01-04 07:03:29

Hiding an element in web pages is sometimes necessary or we use this for an instant (or temporary) fix. Lets examine the most common types of element hiding in web pages.

Our first two are going be CSS attributes: `display: none` and `visibility: hidden`

Even though most of us already use these, let’s sum up for to be clear.

```
.hideThis {display: none}

.doNotShow {visibility: hidden}
```

Any element which has the `hideThis` class (display:none) will be hidden and will not take up any space.

Elements which has the `doNotShow` class (visibility: hidden) will also be hidden from the eye **but** they will take up space for their content. If an element (lets say a paragraph), takes 2 lines of space in height, then there will a blank space which has a height of 2 paragraphs if `visibility: hidden` is applied.

## How about using an HTML attribute?

Apart from the CSS hiding, if it is suitable, we can also use a simpler method, such as **hidden**

```
<p hidden>This paragraph is hidden and not does 
not take up space. By HTML boolean attribute</p>
```

Looks very simple right? **hidden** is a boolean HTML attribute. That means, if present, it specifies that an element is not yet, or no longer, relevant and browsers will not display that element. Works the same way of its HTML twin: `display: none`
How To Find A Job With Soft Skills When Coding Skills Are Weak II
Tags: career, motivation
Published: 2023-01-04 07:00:00

On Tuesday December 20th, 2022, I held a talk about **How to get a job as a developer with soft skills when tech skills are weak**.

It was for the last episode this year on [The  Monthly Dev](https://www.meetup.com/the-monthly-dev-world-class-talks-by-expert-developers/) event hosted by [daily.dev](https://daily.dev/). 

## Different kind of skills

Let's go through some different types of skills which are important for software developers.

### Hard Skills

- referred as tech skills
- Programming Languages (JavaScript, Python, ..)
- Specific tools, like Git, GitHub
- Project Management
- Agile Methodologies (Scrum, Kanban)
- and much more

A hard skill for a developer, for example, might be the ability to program software, so different kind of programming languages.

### Soft Skills

- often referred as business skills
- Time Management
- Communication Skills
- Problem Solving
- Critical Thinking
- Interpersonal Skills
- and much more

A soft skill, on the other hand, is the ability to get along well with all the people with whom they interact, or how you manage your time when working on a project.

![Decorative Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y50cw623firr348a8e4r.png)

A good combination of these skills can help you get a job if you're not that good at programming itself.

Most likely, you already have some of these skills, but are not aware of them or are not able to communicate them in a way that others will recognize as well.

It's much easier to show off your programming skills by demonstrating your code and answering questions about programming concepts in an interview than it is to **prove your soft skills**.

In this series, I would like to give you tips and examples of how you can also demonstrate your soft skills.

---

_Stay tuned for the next part._
Data Engineering Toolset 2023
Tags: python, aws, database, beginners
Published: 2023-01-04 06:48:23

Happy new year!
Let's have a recap of what's DE is and why is important in this era.

Data Engineering is a process of collecting, transforming, cleansing, profiling and aggregating huge dataset in a nutshell.

**Why do Organizations need Data Engineers?**
Organizations are increasingly becoming data-driven, requiring data to inform their decision-making processes. However, the data that analysts and Scientists need to perform their jobs is not always readily accessible, leading to time-consuming data gathering processes. In such cases, organizations need Data Engineers to help ensure that the data they use is accurate and reliable, so they can achieve their business objectives. The saying "garbage in, garbage out" highlights the importance of having quality data.

As Data Engineers, our role is to ensure that the data collected from various sources, such as social media platforms, cloud systems, CRMs, and flat files, is readily accessible to the data team. To achieve this, we create a central repository, known as a Data Warehouse, to store this data. This will ensure that the data team has easy access to the information they need to perform their jobs effectively. I will include a snapshot of the Data Warehouse at the end of this article.

**Toolset**
Most important of all is SQL.
Then:

- Python
- Scala
- Apache spark

- RDBMS(Eg. Postgresql, MSSQL, etc)

- Apache Kafka
- AWS Services(AWS REDSHIFT- cloud data warehouse, Athena-performing SQL(QUERY ENGINE),AWS S3- acts as a data lake or storage, AWs Glue-is an Etl tool)

- Apache airfow,cronjobs

- Hadoop, MongoDb or Cassandra.

- 
PowerBi/Tableau/Metabase/Aws Quicksight -for analytics.

Start with SQL as it cuts across all  technologies.

Earlier, we discussed the importance of having a central repository, known as a Data Warehouse (DW), to store data. The DW uses a multidimensional data model.

One of the key concepts in a DW is data modeling, which involves creating a visual representation of the entire information system or its parts, to show the connections between data points and structures. A DW is composed of fact tables and dimension tables.

**Conceptual modelling of DW.**

Lastly Data Engineers need to understand these two schemas:
1.**Star schema**  - a fact table in the middle connected to a set of dimensions.
2.**Snowflake schema** - a refinement of star schema where some dimensional hierarchy is normalized into a set of smaller dimension tables, forming a shape similar to snowflake.


Have a fantastic day!
Getting Started with the .NET MAUI DataGrid Control
Tags: dotnet, csharp, dotnetmaui
Published: 2023-01-04 06:47:40

Learn how easily you can create and configure the .NET MAUI DataGrid control of Syncfusion using Visual Studio 2022 and .NET 6.0. In this video, the DataGrid control was added to the project using the Syncfusion.Maui.DataGrid NuGet package. I’ll also explain how to do simple customization to the DataGrid columns and enable important features, such as sorting and selecting.

Product overview: https://www.syncfusion.com/maui-controls/maui-datagrid

Documentation : https://help.syncfusion.com/maui/datagrid/getting-started

Examples : https://github.com/syncfusion/maui-demos

{% youtube xW0a7JlHbz4 %}
2244. Minimum Rounds to Complete All Tasks
Tags: java, leetcode, problemoftheday, 100daysofcode
Published: 2023-01-04 06:45:10

You are given a 0-indexed integer array tasks, where tasks[i] represents the difficulty level of a task. In each round, you can complete either 2 or 3 tasks of the same difficulty level.

Return the minimum rounds required to complete all the tasks, or -1 if it is not possible to complete all the tasks.

 

**Example 1:**


**Input:** tasks = [2,2,3,3,2,4,4,4,4,4]
**Output:** 4
**Explanation:** To complete all the tasks, a possible plan is:
- In the first round, you complete 3 tasks of difficulty level 2. 
- In the second round, you complete 2 tasks of difficulty level 3. 
- In the third round, you complete 3 tasks of difficulty level 4. 
- In the fourth round, you complete 2 tasks of difficulty level 4.  
It can be shown that all the tasks cannot be completed in fewer than 4 rounds, so the answer is 4.

**Example 2:**

**Input:** tasks = [2,3,3]
**Output:** -1
**Explanation:** There is only 1 task of difficulty level 2, but in each round, you can only complete either 2 or 3 tasks of the same difficulty level. Hence, you cannot complete all the tasks, and the answer is -1.

 

**Constraints:**

1 <= tasks.length <= 105
1 <= tasks[i] <= 109

```
public class Solution {

    public int minimumRounds(int[] tasks) {
        HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();// Creating HashMap
        int a = 0;
        int c = 0;
        for (int i = 0; i < tasks.length; i++)// Traversing array
        {
            // Checking if the element is present
            if (hm.containsKey(tasks[i])) {
                a = hm.get(tasks[i]) + 1;
                hm.put(tasks[i], a);
                a = 0;
            } else // If element is not present then add it to the HashMap
            {
                hm.put(tasks[i], 1);
            }
        }
        // Iterating over the HashMap to count the minimum number of rounds or return -1
        // if it is not possible to complete all the tasks.
        for (int z : hm.keySet()) {
            int d = hm.get(z);
            if (d == 1) {
                return -1;
            } else if (d == 2) {
                c += 1;
            } else if (d % 3 == 0) {
                c += d / 3;
            } else {
                c += d / 3 + 1;
            }
        }
        return c;// returning the minimum number of rounds.
        // Time Complexity: O(n)
        // Space Complexity: O(n)
        // End of the program.
    }

}

```
[LIAPP FEATURES] Class Protection & Source Code Encryption
Published: 2023-01-04 06:42:11

LIAPP provides robust and very useful features to protect various kinds of factors in mobile apps.
Among them, 'Class protection' and 'Source code encryption' that you can set on ‘Code Protection’ tab protect important Source code containing in mobile apps.
With these two features, LIAPP users can prevent critical incidents from the leakage of operations sequence of mobile apps, and specific important logic such as Log-in, authority to access user information, obtaining user’s control, goods (or can be money) and payment logic through distributed apps.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fg31k16e1b7c8f1llark.png)

Class protection divides core logic (class made by Java) from existing source files and provides protection features by storing it at a specific location safely.
You can follow this guide to set Class protection on LIAPP. If your app’s important source code is under com.lockincompany, you can input com.lockincompany* at Class protection.
In this way, LIAPP recognizes class start from com.lockincompany and all of lower classes as an important class and LIAPP protects them by separating from existing source code.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkguj6rwsktjzmz1speo.png)

Once this protection is in progress, those important source codes that separated to a specific location will be encrypted and strongly protected by LIAPP’s Source code encryption feature. Then, unimportant codes (irrelevant or inevitably to be disclosed like 3rd party source) will be remained at the app’s source code file.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9lwm9lxgpy6bzegpdo0.png)

Protection Technology explained above is an advanced and sophisticated way to encrypt all source code, including unimportant ones. This way, it will improve the security level and optimize the performance of the app.
This logic will be applicable based on compiled app file (apk), it can be applied to any compiled file in either apk or aab regardless of programming language or framework.

**_LIAPP, we provide the best service possible._**
What is SEO Tools and What are the Different SEO Tools?
Published: 2023-01-04 06:38:31

SEO tools are software applications that help website owners to optimize their sites for search engines. They can be used to perform a variety of tasks, such as identifying keywords that are relevant to a website’s content, analyzing the performance of a site in search results, and identifying technical issues that may be impacting a site’s ranking. Some common types of SEO tools include keyword research tools, site audit tools, and rank-tracking tools. These tools can help website owners to understand how their websites are performing in search results, identify areas for improvement, and track the progress of their SEO efforts over time.
**What are the Different SEO Toos ?**
Keyword research tools: These tools help you identify keywords that are relevant to your business and popular among searchers. Examples include Google’s Keyword Planner and Ahrefs’ Keywords Explorer.
Site audit tools: These tools scan your website and identify technical issues that may be affecting your search engine rankings. Examples include SEMrush’s Site Audit and Ahrefs’ Site Audit.
Rank tracking tools: These tools help you monitor your search engine rankings for specific keywords over time. Examples include SEMrush’s Rank Tracker and Ahrefs’ Rank Tracker.
Backlink analysis tools: These tools help you analyze the backlinks (links from other websites to your own) pointing to your website. Examples include a hrefs’ Backlink Checker and Moz’s Link Explorer.
On-page optimization tools: These tools help you optimize individual pages on your website for specific keywords. Examples include SEMrush’s On-Page SEO Checker and Yoast SEO (a [Free SEO Plugins for WordPress](https://techzpad.com/wordpress-free-seo-plugins)).
O que é e para que serve Elasticsearch?
Published: 2023-01-04 03:47:50

Elasticsearch é um mecanismo de busca e análise de dados distribuídos como textos, números, dados estruturados, não estruturados e até geoespaciais.

O Elasticsearch é aberto e gratuito, utilizado em grandes empresas como Facebook, Uber, Vimeo, Cisco, ebay, Shopify.

Uma das principais vantagens do Elasticsearch é a sua capacidade de indexar e pesquisar grandes quantidades de dados em tempo real. Ele é capaz de indexar milhões de documentos em poucos segundos e fornecer resultados de pesquisa quase imediatamente. Além disso, o Elasticsearch é altamente escalável, o que significa que você pode adicionar mais nós ao seu cluster à medida que sua base de dados cresce, sem perder desempenho.

Outra vantagem do Elasticsearch é a sua flexibilidade. Ele pode ser usado para indexar praticamente qualquer tipo de dados estruturados ou não estruturados, incluindo texto, números, data e hora, geolocalização e até mesmo imagens e vídeos. Além disso, o Elasticsearch oferece suporte a vários tipos de consultas, como pesquisas de texto completo, filtros e agregações, o que o torna muito útil para análises de dados avançadas.

O Elasticsearch também é conhecido por sua facilidade de uso. Ele fornece uma interface RESTful que permite que você interaja com ele através de chamadas HTTP, tornando muito fácil integrá-lo com outras aplicações. Além disso, ele vem com uma série de bibliotecas clientes em várias linguagens de programação, incluindo Java, Python, Ruby e PHP, o que torna ainda mais fácil usá-lo em aplicações web.
YouTube Clone Script - Video Streaming App Like YouTube
Tags: clonescript, youtubeclone, videostreamingapp, videostreamingsoftware
Published: 2023-01-04 05:45:49

All-in-One-Cluster YouTube Clone is an effective video-sharing solution that helps in launching your [video streaming software](https://allinonecluster.com/youtube-clone). The app adds to an unlimited collection of videos and keeps the users engaged using the app. It has all the significant and advanced features like playback option, download, recommendation section and many other exciting features.
The solution is developed using cutting-edge technology and becomes the best app for the users. There is also an admin dashboard that enhances everything. There is a video sharing script that has a feature-packed admin panel and gives multiple input formats to users. It is also a powerful and feature-rich CMS that helps with handling a large volume of data daily. Hence the script is full- customized from video input conversation formats. Due to tremendous growth in technology over the years, it has changed the way of reaping benefits from video content. At present, video streaming platforms are being used as the preferred form of entertainment among the audience that enables people to watch their favorite videos anytime. Considering the above trend, video streaming apps like YouTube are coming a long way and have grown to become massive holders in the global entertainment business.
https://allinonecluster.com/youtube-clone
A journey through state management and widget testing in Flutter
Tags: flutter, statemanagement, widgettest, unittest
Published: 2023-01-04 05:44:32

In this post, we will explore the key concepts of state management and widget testing in Flutter. We will look at different state management approaches. We will also learn how to write and run widget tests in Flutter, and discuss best practices for testing individual widgets. By the end of the post, you should have a good understanding of how to manage the state of your Flutter app and how to write reliable and maintainable widget tests. Whether you are new to Flutter or an experienced developer, this post has something for everyone.
[A journey through state management and widget testing in Flutter](https://flutterwithdotnet.hashnode.dev/a-journey-through-state-management-and-widget-testing-in-flutter)
Discover the Hidden Power of the "Command Prompt"
Tags: webdev, programming, tutorial, cmd
Published: 2023-01-04 05:38:51

The Most Powerful Tool In Window:- "Command Prompt" (CMD) How To Hide/unhide Your Drives Using CMD
Here I'm Exploring The Awesome CMD Hack Which All You Need To Know And You Can Try Also!!


Step 1. Open a command prompt window. To do this, type “cmd” in the Windows search bar and press Enter.


Step 2. Type "Diskpart" and press Enter.


Step 3. Type “list volume” and press Enter.

[See my full article originally published in 4/01/2023](https://www.javaoneworld.com/2023/01/discover-hidden-power-of-command-prompt.html)
4 Ways to create an object in JS
Tags: javascript, webdev, beginners
Published: 2023-01-04 05:35:31

I often get tripped up learning something new when there are many ways to achieve the same outcome.

A recent example of this I experienced was learning how to create Objects in JS.

There are several ways to create objects in JavaScript, and here are 4. My personal preference is to use the Object constructor.

## Using the Object constructor:
You can use the Object constructor to create an empty object and then add properties to it. For example:


![object constructor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9v6kn5opyzr34mqxv0s4.png)

## Using object literals
You can use object literals to create objects with properties directly. For example:

![object literal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qu42be7f0ce7c4jxfqtu.png)

## Using the Object.create method
You can use the Object.create method to create an object that has a specified prototype. For example:

```
let obj = Object.create(Object.prototype)
obj.name = 'John'
obj.age = 30
```

## Using class syntax
You can use class syntax to define a class and then create objects from that class using the new operator. For example:


![class syntax](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tmcqyfy4dayhgbe0abx.png)

---

A good way to learn is to play around in the console or something like RunJS to get a feel for each approach.