teleren/devto huggingface dataset:
Algoritmos Complejos
Published: 2023-02-20 22:14:44


## What is an Iterative solution?

Es cuando se aplican las Estructuras de control(while, for, simple double) independientemente del lenguaje de programcion.(las que nos sirven par arealizar las iteraciones(es decir repetir))

**What is an Recursividad solution?**
Para su solución se llama así mismo.
Cuando su solución esta basada en invocarse o llamarse a si misma.

**¿Qué es el caso base?**
Cuando se conoce la solución
Encontramos la solución cuando llegamos al caso base.

**¿Qué es el caso recursivo?**
Cuando llamamos a la misma función para llegar llegar a la solución.
Cuando su solución esta basado en si mismo.

**¿Un algoritmo puede tener mas de un caso base?**
Existen algoritmo que tienen mas de 1 caso base, como el problema de fibonacchi.
I look forward to easy adaptable change
Tags: beginners
Published: 2023-02-20 22:02:19

I was today years old when I learned about the coding community. I appreciate the support groups and up to date information . I envision a tech world for easy expression. Currently, on my mind is superbowl 57 "Eagles" vs "Chiefs". As a Philly native we are use to winning and this was a tough lost. We are the city of brotherly love and sisterly affection. We should of still celebrated our team win or loose. It is not easy to make it to the superbowl and being different is a part of the human experience. I feel like our leaders today are too fearful for adaptable change. If you are scared how can you lead others to go forward. To the leaders, use technology, be bold, come to a different world that's not yet scary and breathe. I am suppose to be writing an assignment about what I learned today. I learned about expressing myself on a blog and it feels so good!
How to update an element in a map - JavaScript
Tags: webdev, javascript, beginners, programming
Published: 2023-02-20 21:55:48

In this article we will learn how to update an element in a map.

It is very common to update an element in a map in JavaScript.

***

## Problem
Now we have a problem, which is that we want to update the value in the map

Imagine we have a map like this:

```js
// Map
const map = new Map([
    ['name', 'John'],
    ['age', 30],
]);

console.log(map);
// Map(2) { 'name' => 'John', 'age' => 30 }
```

And we want to update these values to become like this:

```js
Map(2) { 'name' => 'Doe', 'age' => 60 }
```

**How to solve this problem?**

Fortunately, we have a built-in function that add elements to map called set.

***

## Update elements in a map using set method

We can use set to update our map values.

set can update or add element to a map, in our example we will use it for update values.

**Example**

```js
// Map
const map = new Map([
    ['name', 'John'],
    ['age', 30],
]);

// Before updating
console.log(map);

// Update values
map.set('name', 'Doe');
map.set('age', 60);

// After updating
console.log(map);
```

**Output**

```js
Map(2) { 'name' => 'John', 'age' => 30 }
Map(2) { 'name' => 'Doe', 'age' => 60 }
```

If the key does not exist, the function will add a new element to the map

```js
// Map
const map = new Map([
    ['name', 'John'],
    ['age', 30],
]);

// Update exists elements:
map.set('name', 'Doe');
map.set('age', 60);

// Add new element
map.set('country', 'USA');

// Print result:
console.log(map);
```

**Output**

```js
Map(2) { 'name' => 'John', 'age' => 30 }
Map(3) { 'name' => 'Doe', 'age' => 60, 'country' => 'USA' }
```

## Thank you for reading

Thank you for reading my blog. 🚀 You can find more on [my blog](https://mo-ibra.com/) and connect on [Twitter](https://twitter.com/MoIbrraa)
Unreal Engine Dumping
Tags: reverseengineering, gamehacking, gamedev
Published: 2023-02-20 21:51:29

This tutorial will provide an overview of Unreal Engine, a highly acclaimed game engine used for developing large-scale games such as Fortnite, Ark Survival Evolved, and Borderlands 3. Specialized techniques are necessary when attempting to hack games created with this engine compared to other games.  [Download UE Dumper Here](https://guidedhacking.com/resources/gh-unreal-engine-dumper-ue4-cheat-engine-plugin.763/).

{% embed https://www.youtube.com/watch?v=zp4TlfZ5YCI %}

## Unreal Engine 4 Dumper
It is advised that those who lack expertise and knowledge of game hacking should stay away from Unreal Engine. To use the engine, the best route to take would be to generate an SDK using an Unreal Engine 4 Dumper. This process is similar to Unity game hacking, however, it is much more difficult when it comes to [Unreal Engine](https://www.unrealengine.com/en-US) games.

When it comes to Cheat Engine, you will be able to make your own Cheat Engine Unreal Engine hacks by looking up pointers with just a few clicks, and without having to scan for anything using Cheat Engine. That is how great of a deal dumpers are.

## Unreal Engine Tutorial Summary
To start, we will use a certain tool to acquire data from a game. Because various forms of the dumper might be more appropriate for different games, we must test to determine which one works best. After connecting the game and turning on the Unreal Engine feature, we will be able to view the details that the dumper was able to collect.

We will enable ue_structureDissectCallback, which will be beneficial when we analyze data/structures. We can view the information associated with the player address that we discovered, and some of the elements in the window are labeled for us, making the task much simpler. We can manipulate the values that are available and experiment as normal, since we already have all we need to create our own hacks.

Using [Cheat Engine](https://cheatengine.org/) to dump games made with Unreal Engine is not as straightforward as it may appear. This is just the start and many games created with this engine have a built-in anti-cheat system that cannot be bypassed with extensive knowledge.

This is a demonstration of the simplest techniques to hack Unreal Engine. If you found this video useful, consider checking out the Cheat The Game channel for more game hacking content. Additionally, there are lots of other videos that could help with any issues you have been having.

### More Game Cheat Articles​

-   [Black Ops Cold War Cheats](https://dev.to/ghrake/black-ops-cold-war-cheats-346b)
-   [PUBG Hacks](https://dev.to/ghrake/pubg-hacks-nl4)
-   [Sifu Cheat Engine](https://dev.to/ghrake/sifu-cheat-engine-11k7)
-   [ManEater Cheats](https://dev.to/ghrake/maneater-cheats-4dpf)
Understanding SwiftUI - What is SwiftUI? 🧐
Tags: swiftui, swift, ios, declarativeprogramming
Published: 2023-02-26 05:24:59

---
title: Understanding SwiftUI - What is SwiftUI? 🧐
description: In this concise and no-nonsense article, let's postulate what SwiftUI is and why it is all the hype within the iOS developer community.
published: true
date: 2023-02-20 21:27:21 UTC
tags: SwiftUI, Swift, iOS, DeclarativeProgramming
canonical_url: https://blog.shivammaggu.com/understanding-swiftui-what-is-swiftui
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p6ygamqdfodrwu6dopag.png
series: Understanding SwiftUI
---

In this concise and no-nonsense article, let's postulate what SwiftUI is and why it is all the hype within the iOS developer community.

## Table of Contents
- [Requirements](#requirements)
- [The basics](#the-basics)
- [Pros](#pros)
- [Cons](#cons)

## Requirements

- The **minimum deployment target version is iOS 13** and above.

- SwiftUI development is supported by **Xcode version 11** and above.

## The basics

- SwiftUI is a **UI Design Framework** just like its predecessor, the UIKit.

- It uses the **Declarative** programming approach as opposed to Imperative programming.

- In simple words, we inform the framework of **what** should be done based on a state change and it handles the rest.

- Whereas in the Imperative approach, we keep track of the state and instruct the framework on **how** to change the UI.

- SwiftUI uses **struct** to create views **instead of class**.

## Pros

- SwiftUI helps developers write **simple, clean and less code**.

- It **manages the state better** than the Imperative approach of UIKit.

- Supports **cross-platform development for iOS/iPadOS, macOS, tvOS and watchOS**.

- It uses **Live Previews** instead of building the project to view UI changes.

- There are **no auto layout issues** as it always generates satisfiable layouts.

- People working in teams **no** longer have to suffer **merge conflicts in storyboards**. 😜

- It can be used **alongside UIKit using UIHostingController**.

- It supports **reactive programming using ObjectBinding, BindableObject and the Combine Framework**.

## Cons

- Users with iOS version 12 and below will not be able to use apps developed with SwiftUI.

- Team development might take more time as others might not be familiar with SwiftUI.
(Array Methods Part 3) What are Iteration Methods?
Tags: javascript, beginners, programming
Published: 2023-02-20 21:17:02

Today, finally, I will explain the last type of array methods.

![Sorry for the delay](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okudyyosvhs9cur0r0w2.gif)

If you have had contact with JavaScript at some point, you have probably come across one (or maybe all) of the methods that I will show in this post.

Iteration methods are very important because we generally need to work with a group of information that is most of the time inside arrays.

This type of method directly interacts with each element of the array, facilitating the handling of the data that we want to obtain.

**Iteration Methods**

`.forEach(callback(item, index, array)) -` This method take a callback function as an argument. The callback function is called for each element in array.

The callback function take three arguments: item (current item), index (position of item in array) and original array. 

For example,

```javascript
const fruits = [
  {
    name: "Apple",
    price: 2.0,
  },
  {
    name: "Banana",
    price: 4.0,
  },
  {
    name: "Orange",
    price: 3.0,
  },
];

fruits.forEach((fruit, index, originalArray) => {
  console.log(`${fruit.name} costs ${fruit.price}`); // (Name of fruit) costs (price of fruit)
  console.log(`Its in position ${index} of the array`); // Its in position (0, 1 or 2) of the array
  console.log(originalArray); // [{ name: 'Apple', price: 2 }, { name: 'Banana', price: 4 }, { name: 'Orange', price: 3 }]
});
```

In this case, I used forEach just to display the name of the fruit along with its price, show the item's position in the array, and display the original array.


`.map(callback(itemAtual, index, array)) -` This method works the same as **forEach**, the only difference is that map method return new array with the changes made by callback function

```javascript
const fruits = [
  {
    name: "Apple",
    price: 2.0,
  },
  {
    name: "Banana",
    price: 4.0,
  },
  {
    name: "Orange",
    price: 3.0,
  },
];

const fruitsWithIndex = fruits.map((fruit, index) => {
  return {
    name: fruit.name,
    price: fruit.price,
    index,
  };
});

console.log(fruitsWithIndex);

/*
  [
    { name: 'Apple', price: 2, index: 0 },
    { name: 'Banana', price: 4, index: 1 },
    { name: 'Orange', price: 3, index: 2 }
  ]
*/
```

In this case, I used the `map` method to generate a new array `fruitsWithIndex`, which adds an index to the object related to each fruit in the iterated array.

As usual I'll leave some others important Iteration Methods that I think you should know:

.reduce()
.reduceRight()
.some()
.every()

That's all for today!!

![see you soon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bn8vmn25doz4kr9vr4za.gif)
JavaScript Tutorial Series: Loops
Published: 2023-02-20 21:15:05

Loops allow us to repeat a block of code, which is an essential concept in programming. There are different types of loops that you will encounter in your journey as a developer and these are for, while, and do-while. Let's look at some examples of each of these loops.

## For loop
the for loop is the most popular type of loop. This loop allows a code block to be repeated a predetermined number of times. 

### For loop syntax 

```JavaScript
for (initialization; condition; increment/decrement) {
  // block of code
}
```
Let's break the syntax down.

Before the loop begins, the initialization statement is only executed once. It is used to set the loop variable's initial value. Each time the loop iterates, the condition statement is evaluated. The loop continues if the condition is true; if not, it comes to an end. Each time the loop iterates, the increment/decrement statement is executed which changes the loop variable.

Let's look at an example.

```JavaScript
for (let i = 0; i < 3; i++) {
  console.log("I am a loop");
}
```
The variable `i` is initialized to 0, and at the conclusion of each iteration, `i` is increased by 1 if it is less than 3. The loop will run three times, and the console will display "I am a loop" 3 times.

## While loop
The while loop is used when you are uncertain of how many times you want to repeat your block of code.

### While loop syntax

```JavaScript
while (condition) {
  // block of code
}
```
Before each iteration of the loop, the condition statement is evaluated. The loop continues if it is true; otherwise, it is terminated.

Let's look at an easy example.

```JavaScript
let i = 0;

while (i <= 4) {
  console.log(i);
  i++;
}
```
The variable `i` is initialized to 0, and at the end of each iteration, `i` is increased by 1 if it is less than or equal to 4. The loop will run 5 times, and the console will display the numbers 0 through 4.

## do while loop 
The do-while loop is similar to the while loop, the only difference is that, the do-while loop always executes the code block at least once.

### do-while syntax

```JavaScript
do {
  // code block
} while (condition);
```
The condition statement is evaluated after the block of code has been run. The loop continues if it is true; if not, it comes to an end.

Let's look at an example.

```JavaScript
let i = 0;

do {
  console.log("I'm a do-while loop");
  i++;
} while (i < 3);
```
This loop will execute the block of code once, then checks if the condition is true. While the condition is true the loop will keep printing to the console "I'm a do-while loop". When the condition evaluates to false, the loop stops executing.

In this example the sentence "I'm a do-while loop" will be printed 3 times before the loop stops executing.
Five Cozy Videos to Code With
Published: 2023-02-20 20:41:37


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

### Rainy Night Coffee Shop Ambience with Relaxing Jazz Music and Rain Sounds

{% embed https://www.youtube.com/watch?v=c0_ejQQcrwI %}

### Sunset Sailors 🌠

{% embed https://www.youtube.com/watch?v=1B63too9Rr0 %}

### Early start ⛅

{% embed https://www.youtube.com/watch?v=lf6refTxQs8 %}

### A peaceful place

{% embed https://www.youtube.com/watch?v=DbuebKNKQsQ %}

### Boba stop 🧃

{% embed https://www.youtube.com/watch?v=on9BTX6dHN0 %}
Using Apache AGE and PostgreSQL for a Real-World Application: A Case Study
Published: 2023-02-20 20:38:11

**Case study**
In this case study, we'll discuss how a leading e-commerce company used Apache AGE and PostgreSQL to analyze large amounts of data generated by their online platform. The goal was to improve user experience, optimize pricing strategies, and identify growth opportunities. We'll dive into the details of how Apache AGE and PostgreSQL were used to overcome this challenge and achieve successful outcomes.


**Background:**

An e-commerce company approached us with a common problem: they were struggling to analyze the large amount of data generated by their online platform. This data included user activity, transactional data, and other sources, which needed to be analysed to improve user experience, optimize pricing strategies, and identify growth opportunities.


**Challenges**
The e-commerce company faced several challenges while analyzing their vast amount of data. Their traditional SQL databases did not support complex graph queries and transferring data between different databases was time-consuming and expensive. Furthermore, managing multiple data storage systems was becoming increasingly challenging, as their data was growing rapidly.

Solution:-
The company first migrated their data to PostgreSQL using built-in import tools. With the data now stored in PostgreSQL, Apache AGE was used to run complex graph queries directly on the data, enabling the company to gain insights into user behavior, transaction patterns, and other important data. Apache AGE's support for path queries, pattern matching, and subgraph queries allowed the company to analyze their data in greater detail and identify growth opportunities. The extension's use of Spark's distributed computing capabilities also enabled it to handle large datasets generated by the company's platform.

**Outcome**
By implementing Apache AGE and PostgreSQL, the e-commerce company was able to gain new insights into their data and improve their pricing strategies, user experience, and identify growth opportunities. The solution was cost-effective and scalable, allowing the company to manage their data more efficiently and remain competitive in a rapidly changing industry.

[Apache-Age:-https://age.apache.org/](https://age.apache.org/)
[GitHub:-https://github.com/apache/age ](https://github.com/apache/age)
📢 Unboxing Domaine NC mobile v1.3.0
Tags: opensource, flutter, news, showdev
Published: 2023-02-20 20:22:05

## 🗞️ About

A new version ([`v1.3.0`](https://github.com/lschaeffer313/domaine-nc-mobile/releases/tag/v1.3.0)) of has landed on the Play Store:

{% embed https://play.google.com/store/apps/details?id=nc.laurent.domaine_nc_mobile %}

Let's see what's new 🤓

## 🍿 Unboxing

{% youtube wD2mH2LMrP0 %}

## 🪝 What's next

If you wonder how we do to release so fast on our side project, stay tuned as we'll release a dedicated content very (very) soon ❣️
Liguard - The Linode Guard
Tags: linodehackathon, javascript, showdev, firewall
Published: 2023-02-20 20:11:55

## What I built

Imagine you wanted to block people using iPhone to access your server, or people using Chrome or people accessing from IPs of specific location to your server, but you don't want to write all this on serverside. You can do that all on edge (before request hits your server) with Liguard!

Liguard is an Edge cloud firewall reverse proxy with an inbuilt ddos prevention solution. Does that sound complex? Let's break it down.

- **Cloud:** A system/server that is sitting on the cloud
- **Firewall:** A system that denies/allows a packet based on some instruction and conditional logic
- **Reverse Proxy:** A system that sits in-front of your actual server and forward the request to your actual server safely
- **DDoS Protection:** A system that detects DDoS and contains the attack
Liguard is a combination of all these! Yes, you read that right.


### Category Submission:
EdgeWorker Experts

### Screenshots

![Liguard Edge Worker Service Hosted](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pllnsnafxuq407lgpt2j.png)


{% youtube XB_V2_Kjba0 %}


### Description


One can simply define custom security policies in JSON like the following:

```json
{
  "siteConfigs": [
    {
      "siteData": {
        "siteName": "google",
        "forwardingUrl": "https://google.com",
        "blockedOs": ["iPhone"],
        "blockedBrowser": ["Chrome"],
        "blockedDevice": ["iPhone"],
        "blockedOSVersion": ["15.1"],
        "blockedLocations": [""],
        "blockedIPs": ["0.0.0.0", "8.8.8.8"]
      }
    },
    {
      "siteData": {
        "siteName": "github",
        "forwardingUrl": "https://github.com",
        "blockedOs": ["Mac"],
        "blockedBrowser": ["Chrome"],
        "blockedDevice": ["iPhone"],
        "blockedOSVersion": ["15.1"],
        "blockedLocations": ["India"],
        "blockedIPs": ["0.0.0.0", "8.8.8.8"]
      }
    }
  ]
}
```

This will implement all these security policies in the Edge using Linode's EdgeWorker service! A truly customisable and configurable firewall guard.

### Source Code

{% github DarthBenro008/liguard %}

### Permissive License

This project is backed under **MIT License**, special shout out to project [UA-Parser](https://github.com/faisalman/ua-parser-js), as liguard uses a piece of its source-code.

## Background

As a backend developer, i always was very concerned about security issues. Adding security features on server levels are always hectic, i always wondered if i could somehow block people who use safari to visit my website (because a lot of CSS frameworks break in safari), hence this motivated me to make a firewall/guard that could be applied in a whole domain, and is not at server level, but at edge-level.


### How I built it

Thanks to Linode's Edgeworker service and their amazing tutorials!

This project is written in Javascript, and deployed via `akamai` CLI

The resources and relevant info on how to develop/test and deploy can be found [here](https://techdocs.akamai.com/edgeworkers/docs/welcome-to-edgeworkers)!
Three Great Blogs You Must Follow
Tags: programming, news, cloud
Published: 2023-02-20 20:11:24


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

Today, we will see three great blogs you must follow (in no particular order).

# High Scalability

High Scalability is a tech blog on cloud technologies with a focus on environments at a very large scale. The blog releases a series called "Stuff The Internet Says On Scalability" every month.

[Blog](http://highscalability.com/)

# Julia Evans' Blog

Julia Evans is a software engineer mostly known for her [Wizard Zines](https://wizardzines.com/). She also holds a blog that she updates quite frequently.

[Blog](https://jvns.ca/)

# Riot Games

Riot Games (the company between games such as Leagues of Legends) has an amazing blog. The blog is a rich source of information and I was particularly impressed by posts such as [Valorant's 128-tick servers](https://technology.riotgames.com/news/valorants-128-tick-servers).

[Blog](https://technology.riotgames.com/)