teleren/devto huggingface dataset:
La tendencia 
Published: 2022-01-31 01:33:08

¿Qué aspectos se tratan en el ciclo de formación complementario?
Lo primero que hay que definir son las herramientas para trabajar en la construcción de la misión empresarial. Esto es importante porque ningún negocio es capaz de funcionar si no conoce su misión, para lo cual hacen uso de herramientas digitales sobre la base de visiones prácticas. También es necesario gestionar la marca personal de sus empleados para mantenerse en el imaginario del cliente y que contribuyan a desarrollar el modelo de negocio que se adapte a los retos que plantea el siglo XXI.

Para trabajar con la marca, la gestión del networking tiene mucho valor porque permite establecer la red de contactos necesaria que refuerce el conocimiento que los demás tengan acerca de la empresa. Otro de los elementos a tomar en cuenta es el conocimiento de la figura del

interim management, sobre todo por su tendencia creciente en el mercado y la solución eficaz que proporciona. En otro aspecto, relacionado con el liderazgo dentro de una institución, se encuentra el método de dirección por misiones como un sistema innovador y efectivo para que la gestión empresarial cuente con el compromiso del talento.

Los servicios de interim management crecen por su efectividad
Son muchos los casos de cargos empresariales en los que se necesita el trabajo de especialistas en tiempo récord. Sea por un cambio en el personal, la revisión del plan de negocio, la creación del plan estratégico, ausencias de directivos por períodos cortos de tiempo o requerimientos específicos en disciplinas clave, los interim managers son una opción recomendable para llevar a cabo esas tareas sin perjudicar el normal desempeño de la organización. Entre los beneficios de contratar este servicio está el hecho de contar con las habilidades y experiencia suficientes para considerar un retorno de la inversión.

La velocidad de adaptación, junto a la experiencia mínima de 15 años en puestos directivos y la mirada fresca del profesional, producto de la objetividad al trabajar de manera independiente, evitarán los condicionamientos en torno a la política y cultura de la empresa, enfocándose directamente en aquello que trae más beneficios a la empresa.

Como valor adicional, el compromiso de un profesional temporal es significativamente mayor en comparación con otro empleado. El motivo es que las futuras contrataciones dependerán de sus buenas referencias y del éxito de los proyectos en los que haya formado parte.

[ver mas...](https://estartit.tv/)
String .split() Method
Tags: javascript, documentation, beginners
Published: 2022-01-31 01:26:30

In MDN, the definition is - "_The [.split()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) method divides a String into an ordered list of substrings, puts these substrings into an array, and **returns the array**_". 

We use this method to split a string with a pattern stated in the first parameter, and limits in the second parameter. But they are not required. 

From the examples below, please use `console.log(splits)` to see the output in the console. 

```js
const words = 'Hello, I am a Split!'; 

let splits = words.split(); //no parameters
//Output: ['Hello, I am a Split!']

let splits = words.split(' '); //a whitespace
//Output: ['Hello,', 'I', 'am', 'a', 'Split!']

let splits = words.split(','); //a comma
//Output: ['Hello', ' I am a Split!']

let splits = words.split(' ', 3);
//Output: ['Hello,', 'I', 'am']
``` 

### Split method can also have `multiple parameters`:
 
- We need to use `slashes` instead of quotations within the split method when there are multiple parameters since we are using regex ([Regular Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)). 

```js
const words = 'Hello, I am a Split!'; 

//Using Regex - brackets '/[]/'
let splits = words.split(/[,\s!]/); //comma, whitespace ('\s'), exclamation
//Output: ['Hello', '', 'I', 'am', 'a', 'Split', '']

//Using Regex - pipes '/|/'
let splits = words.split(/,|\s|!/);
//Output: ['Hello', '', 'I', 'am', 'a', 'Split', '']
```
### Additional Notes: 
As you noticed there are some empty elements generated from the output, you can use [Array filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) method to get rid of them, as below: 

```js
const filters = splits.filter(element => element); 
//Output: ['Hello', 'I', 'am', 'a', 'Split']
```
JavaScript: Two Sum
Published: 2022-01-31 01:11:11

Two Sum is another question frequently asked during interviews. There are two common ways to approach this problem. One way is considered "brute force" - it uses nested loops with a time complexity of O(n²). The second way is one of the preferred methods, because it has a time complexity of O(n). 

The problem asks: given an array of numbers and a target sum, find the sum of two numbers in the array that is equal to the target sum. This is how to solve it: 

Step 1. Start with an array of numbers and a target sum 

```
const array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const sum = 15; 

const twoSum = (array, sum) => {

};
```

Step 2. Write a for-loop to iterate through the array. 

```
const twoSum = (array, sum) => {
    const past = []
    
    for(let i = 0; i < array.length; i++){
        let curr = array[i]
        let needed = sum - array[i]
    }
};
```

Step 3. Write if-statement to search through array of past numbers 

```

const twoSum = (array, sum) => {
    const past = []
    
    for(let i = 0; i < array.length; i++){
        let curr = array[i]
        let needed = sum - array[i]
        if(!past.includes(needed)){
            past.push(curr)
        } else {
            return [needed, curr];
        }
    }
    return "Not found!"; 
};
```

Step 4. Add counter that will increment by one each run 
This will show how many runs it takes to return "Not Found!"

```
const array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const sum = 20;

const twoSum = (array, sum) => {
    const past = [];
    let count = 0;

    for (let i = 0; i < array.length; i++) {
        let curr = array[i]
        let needed = sum - array[i]
        if (!past.includes(needed)) {
            past.push(curr)
        } else {
            return [needed, curr];
        }
    count++; 
    }
    console.log(count)
    return "Not found!";
};
```


and that's it!
Set operator di Mysql
Tags: mysql, database, php, programming
Published: 2022-01-31 00:58:26

Set adalah sebuah operator dari hasil sebuah operasi dari 2 SELECT query.
Jenis operator Set:
- UNION
- UNION ALL
- INTERSECT
- MINUS

## Union
- adalah operasi yg menggabungkan 2 hasil SELECT, yg dimana jika ada data yg duplikat, maka data duplikatnya akan dihapus
- contoh:
SELECT DISTINCT email FROM users
UNION
SELECT DISTINCT email FROM guestbooks;

## Union All
- adalah operasi yg sama dengan UNION, namun data yg duplikat tetap akan ditampilkan dihasil query nya
- contoh 1
SELECT DISTINCT email FROM users
UNION ALL
SELECT DISTINCT email FROM guestbooks;
- contoh 2
SELECT emails.email, COUNT(emails.email) FROM 
(SELECT email FROM users
UNION ALL
SELECT email FROM guestbooks) as emails
GROUP BY emails.email;

## Intersect
- operasi menggabungkan 2 query, namun data yg ditampilkan ada data yg terdapat dari kedua SELECT query
- jika ada data yg tidak terdapat disalah satu SELECT query, maka data tersebut tidak akan ditampilkan
- data tersebut tidak dalam duplikat
- MySQL tidak memiliki operator INTERSECT, untuk melakukannya, harus menggunakan JOIN atau SUBQUERY
- contoh 1
SELECT DISTINCT email FROM users
  WHERE email IN (SELECT DISTINCT email FROM guestbooks);
- contoh 2
SELECT DISTINCT users.email FROM users
  INNER JOIN guestbooks ON (guestbooks.email = users.email);

## Minus
- adalah operasi query yg dimana jika ada data yg sama dari 2 SELECT query, maka data
  dari SELECT query yg kedua akan dihilangkan.
- artinya, jika data di query pertama dan query kedua ada yg sama, data di query kedua
  akan dihilangkan
- MySQL tidak memiliki operator MINUS, untuk melakukannya hal ini bisa menggunakan JOIN
- contoh 1
SELECT DISTINCT guestbooks.email, users.email FROM users
  LEFT JOIN guestbooks ON (users.email = guestbooks.email)
  WHERE guestbooks.email is NULL;
- operator ini cocok untuk menampilkan data users yg belum pernah mengisi guestbooks
Import a CSV file into a MySQL database using PHP PDO (fast af) 🚀
Tags: sql, csv, php, pdo
Published: 2022-01-31 00:20:14

Let say you're like me and need to get ~2Gib of records into a SQL database. Most of us are probably running a shared hosted server and have limitations regarding file upload size in phpMyAdmin. Honestly, after discovering this new method, I dont know that I'll ever upload big data another way.

Here is a great [PHP Script](https://gist.github.com/stavrossk/0f513ccbfe7882870ab1) from [Stavros Skamagkis](https://gist.github.com/stavrossk) that uses PDO. It is pretty self explanatory. I've included a modified version below.

So how long does the import take? Well, in my case I have ~1,800,000 records with 30 columns and it takes seconds, like less than 5 😎.

Tips:

- Define `fieldseparator`, `fieldEscapedBy`, `fieldEnclosedBy`, and `lineSeperator` as variables (shown in first few lines). I span my wheels a little defining them inline which did not work (I believe because of PDO).

- CSV file location is relative to this files location.

- Header? Use `IGNORE 1 LINES` to skip the first line.

- How to run? I created a Development Button and linked `onClick()` that connects via Ajax to the resource. I'm know there are easier methods, I just already had it setup. Nevertheless, this works.


```php
<?php
//  Code Source: https://gist.github.com/stavrossk/0f513ccbfe7882870ab1

$databasehost = "localhost";
$databasename = "YOUR_DATABASE_NAME";

$databasetable = "YOUR_DATABASE_TABLE";

$databaseusername = "YOUR_DATABASE_USERNAME";
$databasepassword = 'YOUR_DATABASE_PASSWORD';

$fieldSeparator = ";";
$fieldEscapedBy = "";
$fieldEnclosedBy = '"';
$lineSeparator = "\n";

$csvfile = "../FILE_TO_IMPORT.csv";


if (!file_exists($csvfile)) {
    error_log('File does NOT exist!');
    die("File not found. Make sure you specified the correct path.");
}

try {

    $pdo = new PDO(
        "mysql:host=$databasehost;dbname=$databasename",
        $databaseusername,
        $databasepassword,
        array(
            PDO::MYSQL_ATTR_LOCAL_INFILE => true,
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
        )
    );
} catch (PDOException $e) {
    error_log('database connection failed!');
    die("database connection failed: " . $e->getMessage());
}

$affectedRows = $pdo->exec(
    "LOAD DATA LOCAL INFILE "
        . $pdo->quote($csvfile)
        . " INTO TABLE `$databasetable` FIELDS TERMINATED BY "
        . $pdo->quote($fieldSeparator)
        . " ESCAPED BY "
        . $pdo->quote($fieldEscapedBy)
        . " ENCLOSED BY "
        . $pdo->quote($fieldEnclosedBy)
        . " LINES TERMINATED BY "
        . $pdo->quote($lineSeparator)
        . " IGNORE 1 LINES "
);

echo "Loaded a total of $affectedRows records from this csv file.\n";
?>
```
Using Conductor Forks to run tasks in parallel - creating multiple images
Published: 2022-02-03 21:13:46

---
title: Using Conductor Forks to run tasks in parallel - creating multiple images
published: true
date: 2022-01-31 00:00:00 UTC
tags: 
canonical_url: https://orkes.io/content/blog/image-processing-multiple-images-forks
---

In our previous post on image processing workflows, we built a Netflix Conductor workflow that took an image input, and then ran 2 tasks: The first task resizes and reformats the image, and the second task uploads the image to an AWS S3 bucket.

With today's varied screen sizes, and varied browser support, it is a common requirement that the image processing pipeline must create multiple images with different sizes and formats of each image.

To do this with a Conductor workflow, we'll utilize the [FORK](https://orkes.io/content/docs/reference-docs/fork-task) operation to create parallel processes to generate multiple versions of the same image.  The FORK task creates multiple parallel processes, so each iamge will be created asynchronously - ensuring a fast and efficient process.

In this post, our workflow will create 2 versions of the same image - a jpg and webp.

[read more at orkes.io](https://orkes.io/content/blog/image-processing-multiple-images-forks)
Boas práticas: <strong> ou <b> 💻
Published: 2022-01-30 23:42:35

Qual a diferença entre as tags `<strong>` e `<b>`?
<br>
**`<strong>`  `<b>`**
<p>Bom, basicamente as duas tags fazem o mesmo esteticamente falando, deixam um texto em negrito. A diferença fica na semântica (significado/interpretação). </p>


Trecho do código:
```
<strong> Deixando esse trecho em negrito com a tag strong. </strong>
```
Saída:
<strong> Deixando esse trecho em negrito com a tag strong. </strong>
<hr>
Trecho do código:
```
<b> Deixando esse trecho em negrito com a tag b (bold). </b>
```
Saída:
<b> Deixando esse trecho em negrito com a tag b (bold). </b>

Quando usamos a tag `<strong>`, damos uma forte importância ao texto então delimitado, indicamos que a informação em negrito tem um certo grau de urgencia. Dito isto, `<strong>` é um estado <b>lógico</b>.Os estados lógicos desassociam o conteúdo da apresentação, fazendo isso permite-se que eles sejam expressos de muitas maneiras. 
Com isso, futuramente ao invés de renderizar o trecho em negrito você queira renderizá-lo por exemplo na cor vermelha, ou mudar de tanho, tanto faz a forma que queira manipular esse trecho do texto. Faz mais sentido trocar apenas as propriedades da tag `<strong>`.
Por isso é uma boa prática utilizarmos o `<strong>` nessas situações.
Utilizando `<b>`significará apenas que a escrita está em negrito nessa formatação do texto, quando se quer chamar atenção sem aumentar a importância.
A Job In Tech That Requires No Coding Skills.
Published: 2022-01-30 23:03:40

What Is Software Project Management and How Does It Work? 

The planning, scheduling, resource allocation, execution, tracking, and delivery of software and web projects are all part of software project management. 

Software engineering project management differs from typical project management in that software projects have a specific life cycle process that necessitates numerous rounds of testing, updating, and user input. To keep up with the increasing pace of business and iterate depending on customer and stakeholder feedback, most IT-related projects are handled in an Agile manner.

Software Project Management Benefits: 

- It aids in software development planning. 

- Software development is made simple to implement. 

Software project management includes issues such as monitoring and regulating. 

- Overall, it reduces the amount of time and money spent on software development.

I personally believe that PM positions are the crucial part of every management team. They bring developers, creatives, QAs, product developers together and manage the final product for UX.
How to create a React Native Emulator Device for running with expo
Tags: beginners, todayilearned, react
Published: 2022-01-30 22:34:39


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







1. Install Android Studio.
2. Check if you are logged in an [expo](https://expo.dev/)
(or reading [Starting an app with react native! (just to save)](https://dev.to/nataliacatundafr/how-definitely-start-an-app-with-react-native-at-windows-with-vs-code-44l4).
We have 2 manners:
Connect with USB just like the article above.
or...
[Create Device with Android Studio](https://developer.android.com/studio/run/managing-avds)
After this latter step by step, you run in your project menu:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfmseuzb7492jseqrtc6.png)
3. Go in to the terminal of your project and:
`expo start`
4.
`a`
5.An other window begin:

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

Happy Coding!
Digital Products - 10 Ways Developers Make Money Working from Home - E04
Tags: career, javascript, programming, webdev
Published: 2022-01-30 22:29:49

No matter what you build, there is a market for it online.

You can create courses, software, ebooks, or any digital product that you later distribute to customers worldwide.

👉 Video here - https://youtu.be/ORbLO2rjHaQ

In this video series, I share the best ways and how to increase your money income as a web developer while working from home.

👉 Subscribe to Dan Later - https://bit.ly/31SdiZv

Timeline - Digital Products
00:00 Intro
00:19 What products to create?
00:35 Why digital products?
00:52 Instant access
01:18 Where to sell?
01:57 How to create a product? 
02:05 How to write a book Google Docs 
02:17 Create videos
02:24 Create page templates/Create page themes
02:34 What to do when you don’t have ideas? - boost ideas
02:52 Build an MVP
03:15 Marketing
03:34 Create your own Newsletter
03:40 Growing Your Audience
04:09 Sell anything by Creating a Bundle 
04:20 Outro

Other parts:
1. Running A Youtube Channel - https://youtu.be/MMbp6eNk4Q8
2. Live Coding & Streaming - https://youtu.be/d7jczFpBKl0
3. Courses - https://youtu.be/zs4abEW9nNk
4. Digital Products - https://youtu.be/ORbLO2rjHaQ
5. Software-as-a-service - https://youtu.be/lnwifUqJ7HU
6. Why&how To Blog - https://youtu.be/E5XNUr04p7k
7. Freelancing - https://youtu.be/JjGTrdJkiJs
8. Working As A Professional Developer - https://youtu.be/uJKVk7cv3Dw
9. Mentoring - https://youtu.be/Ni6Jlkj4Xuo
10. Contributing To Open Source - https://youtu.be/qVN9FIY0j4Y

#programming #buildinpublic #career
Weekly Challenge 149
Tags: perl, python, theweeklychallenge
Published: 2022-01-30 22:17:18

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-149/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-149/sgreen)

## TASK #1 › Fibonacci Digit Sum

### Task

Given an input `$N`, generate the first `$N` numbers for which the sum of their digits is a Fibonacci number.

### My solutions

This is (hopefully) a relatively straight forward task. We have a loop that increments by 1 until we have `$N` numbers. For each iteration, I have a `is_sum_fib` to determine if the number meets the criteria. I have a global variable `fibs` that keeps a count of all Fibonacci numbers, and top up the array if the last computed one is less than the sum of digits.

The Perl code is a transliteration of the Python code, with the `fibs` array a private persistent variable using the [state](https://perldoc.perl.org/functions/state) declaration.

### Examples

```
$ ./ch-1.py 20
0, 1, 2, 3, 5, 8, 10, 11, 12, 14, 17, 20, 21, 23, 26, 30, 32, 35, 41, 44

$ ./ch-1.pl 20
0, 1, 2, 3, 5, 8, 10, 11, 12, 14, 17, 20, 21, 23, 26, 30, 32, 35, 41, 44
```

## TASK #2 › Largest Square

### Task

Given a number base, derive the largest perfect square with no repeated digits and return it as a string. (For base>10, use ‘A’..‘Z’.)

### Python solution

There appears to be two ways to solve this one. One is to work out the maximum square n<sup>n</sup> work downwards and see if that number is has no repeating digits. The other is to work downwards from the maximum unique values and see if that number is square. I'm sure they bright sparks in Team PWC may have an even better solution, and am looking forward to reading every ones blog posts.

I choose the second method. It works fine when n <= 12, struggles (takes a wee while to produce a result) on most numbers bases between 13-22, and outright fails on larger number bases. While Python can handle an infinite number of digits in an integer, the `math.sqrt` function is bound by 2<sup>64</sup>-1.

So on with my explanation. I start by creating a string `v` with all the digits in reverse order (so `A9876543210` for base 11). This is the highest possible value that can be expressed as unique digits. I then use python's [itertools.permutations](https://docs.python.org/3/library/itertools.html#itertools.permutations) function to work through all possible unique digits in reverse order. As we get to a number that starts with 0, I restart the permutations call with one less digit.

As the permutations call uses the `yield` command, we don't need to dump all possible permutations into memory. For each uniquely digited number, I convert it to an integer, and see if it is a perfect square.

I did write a Perl solution, but am not happy with it enough that I'm going to share it :-/

### Examples

```
$ ./ch-2.py 2
1 (1² = 1)

$ ./ch-2.py 4
3201 (15² = 225)

$ ./ch-2.py 10
9814072356 (99066² = 9814072356)

$ ./ch-2.py 12
B8750A649321 (2950717² = 8706730814089)
```
Browser Storage APIs
Tags: javascript, beginners, webdev
Published: 2022-01-30 22:04:46

## 1- Cookies

Cookies are small pieces of text data stored in the browser mainly used for authentication, tracking and personalization.

Cookies can be read and set by browser and server with certain rules, hold 4069 bytes of data.

For more details I have an article  “[Cookies: simple and comprehensive guide](https://dev.to/adelhamad/cookies-simple-and-comprehensive-guide-3ni1)”

To set a cookie using javascript

```jsx
document.cookie = "username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC";
```

## 2- Web Storage

Similar to cookies, pieces of text data stored in the browser. It can hold up to 5MB and can be read and set only by the browser.

It offers simpler APIs than cookies and all Web Storage calls are synchronous.

The two mechanisms within Web Storage are as follows:

- Local Storage
    
    No expiration date.
    
- SessionStorage
    
    data is stored until the tab is closed.
    

Code Example

```jsx
localStorage.setItem('myCat', 'Tom');
const cat = localStorage.getItem('myCat');
localStorage.removeItem('myCat');
localStorage.clear();
```

## 3- IndexedDB

A Transactional NoSQL database system built in the browser. It can be used synchronously and asynchronously.

If you have big amount of data or files that needs to be stored in the browser, IndexedDB is a good option.

While it includes more features than traditional Web Storage API, using IndexedDB is also more complex, for that there are open source libraries to simplify it like [localForage](https://github.com/localForage/localForage) which wraps IndexedDB API and makes it as simple as using Web Storage API

## 4- Cache

Used mainly to optimize the performance of the website by storing its files to not be downloaded again when you open the same website again.

You can cache any response whether it’s HTML, Javascript, CSS, image, font or even API response.

The storage allowed for cache storage is different per browser, for example Chrome allow to take 80% of available disk space.
Which would you go for? Spring boot cron job,scheduled tasks vs Events in Mysql.
Tags: java, discuss, spring, mysql
Published: 2022-01-30 21:48:34

I was recently studying about using cron jobs in spring boot for a particular use case for my small side project. I ended up not using the cron job but rather went the SQL way(will explain this in detail below). However,in the process I learnt a lot about cron jobs and scheduling in spring boot so this is just a small article about my learnings

https://www.codeklutz.com/scheduling/java/spring/spring%20boot/events/sql/mysql/Spring-boot-cron-job-scheduled-tasks-vs-Events-in-Mysql/