teleren/devto huggingface dataset:
Power Automate - Cloud Flows: What is your opinion?
Published: 2022-02-08 16:38:42

## Summary (for our beginners here)

As a part of the Power Platform Power Automate allows us among several kinds applications to create the Cloud Flows. These are serverless processes created with a graphical user interface and only for certain cases you will need some code (the expressions).

The Flows can be compared to the Logic Apps (it is identical in many aspects), which are created with Azure. An alternative are the Azure Functions, but this time you are allowed to program with actual code.

Basically you have the main parts you would have for programming, like conditions, variables etc.. Other components are the "Connectors", which represent Web Services (Web APIs) and allow easy integration of these. The complex functionalities are most likely to be provided by the services.

If you are developing Business Applications with Power Platform (which includes Dynamics 365 for Customer Engagement), you mostly likely will be confronted with the Flows. This is also because Microsoft encourages to use these instead of the "classic" Workflows.

## The important part now

**What is your experience about the Cloud Flows?** In my opinion these can be great, if the company uses these to allow users, the Citizen Developers, to create their own "little applications". Given that the allowed Connectors are limited and other restrictions. But if you plan to use them as part of a whole system, in sense of the traditional development, you can face some issues. Just imagine using it for data integration, there are chances that you hit limitations (if Flows exceed a certain amount of actions or runs, throttling will happen or even suspending). Another thing, which is annoying, is that Flows get deactivated after some time without being triggered. Just imagine a very important Flow, which usually would run to send a warning message, but suddenly gets turned off. Only the Owner would receive a notification with E-Mail.
There seems to be only one option, if you look at the plans and are currently using the "Per User Plan": The "Per Flow Plan", which is not only limited to single Flows, but seems also to be quite expensive. There are plenty other issues, but for now I would like to read your experiences!
How to install Apache PySpark on Mac using Python?
Tags: python, beginners, machinelearning, ai
Published: 2022-02-08 16:34:55

Hello,

Apache PySpark works with Java 8 version and not with the latest Java version so, make sure that you install the correct version to run Apache PySpark on your Machine.

Download Java 8 from the following link and install the software:
https://www.java.com/en/download/manual.jsp

If you already have the latest Java version on your Machine and want to remove the latest Java software from your Machine, then please visit the following blog:

https://dev.to/ruthvikraja_mv/how-to-uninstall-java-on-mac-104a

Now, its time to check the installed Java version on your Mac, enter the following command in the terminal to check the version:

```python
java -version
```

Launch Anaconda Navigator (or) any other IDE to run python code for installing Apache PySpark on your Machine. Type the following command and hit enter:

```python
pip install pyspark
```

It will take some time to install the software and once the software got installed you can check the version by entering the following command:

```python
pyspark
```

Once everything is done please type the following command in the terminal to check whether we can create a new session using PySpark:

```python
spark-shell
```

If the software has been successfully installed on your machine without any dependency errors then it should show as follows:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onbxz4ohmqag55hsa2rt.png)
 
 Done...
Proxy and Reflect in Javascript | Part 2
Tags: javascript, webdev
Published: 2022-02-08 16:29:54

In the [*previous*](https://dev.to/vtechguys/proxy-in-javascript-part-1-1ndp) post, we discussed Proxy in detail. In this post, we will build upon that knowledge and learn some more.

Reflect helps in the creation of Proxy and somewhat allows us to play with internal methods `[[Get]]` and `[[Set]]`. Below are some reflect methods:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1644169920073/ceLPJXJ9Q.png)

Let us look at a code example:

```js
let user = {};

Relect.set(user, 'name', 'Aniket Jha'); // [[Set]]

console.log(user.name); // Aniket Jha
```

Reflect allow us to call operators as functions also there is a reflect method for any proxy traps having the same name and arguments.

```js
let user = {};

user = new Proxy(user, {
  get(target, prop, receiver) {
    console.log(`GET Trap > Target: ${target} Prop ${prop} Receiver ${receiver}`);
    return Reflect.get(target, prop, receiver);
  },
  set(target, prop, value, receiver) {
    console.log(`SET Trap > Target ${traget} Prop ${prop} Value ${value} Receiver ${receiver}`);
    return Relect.set(target, prop, value, receiver);
  },
});
```

The Reflect methods work nicely with proxy to ensure that traps output and what we expected is the same. Following is an example:

```js
let user = {
  _name: 'User',
  get name() {
    return this._name;
  }
};
let proxyUserObj = new Proxy(user, {
  get(target, prop) {
    return target[prop]; // Note we didn't used reflect here.
  },
});
let admin = {
  __proto__: proxyUserObj,
  _name: 'Admin'
};
console.log(admin.name); // Admin or User 🤔 
// admin.name ?
// `name` is not found on admin obj
// so it will go up in prototype chain
// Note prototype chain is proxyfied object `proxyUserObj`
// it finds `name` property(getter property) on `proxyUserObj`
// resolving for name property trigger proxy `get trap`
// the arguments that are passed to proxy get trap
// target => user
// prop => 'name'
// as trap return traget[prop] i.e user['name'] so `this === user`
// and returned value is `User` 😱 which was not expected
// to prevent it from happening `receiver` argument is requried
// and we can leave it to `Reflect.get(target, props, receiver)` to
// correctly resolve properties for us.
```

We saw an example of how Reflect is useful for dealing with this Proxy gotcha. I always write`return Reflect.get(…arguments);` 😎. Reflect is awesome to enhance proxy and use it correctly. More on proxy on [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy).
ES6: Default parameters explained
Tags: javascript, beginners, tutorial, webdev
Published: 2022-02-08 16:28:14

## Introduction

ES2015(ES6) introduced default parameters. Let's jump right in and learn about default parameters.

## Default parameters

What would happen if we called a function with all or some parameters missing? It turns out JavaScript assigns `undefined` to the missing arguments.

Let's see example in code:
```typescript
const add = (num1, num2) => num1 + num2

const sum = add(2) // one argument is missing // gets called as 2 + undefined
console.log(sum) // prints NaN
```

Default parameters allow us to define a default parameter value and will be used when no argument is provided for the paramter during  funcion call:

```typescript
const main = (port = 3000) => {
  // possible code ommitted here
}
main() //port will default to value of 3000
main(5000) // call main with 5000
```
Another dummy example:
```typescript
// add default parameters at the end of parameter list
const restoreWallet = (privateKey, dumpToJson=true) => {
  // posible code omitted
}

const myWallet = restoreWallet('0xFEEDBEEFFEEDBEEF', false) // dumpToJson supplied as false
const myWalletTwo = restoreWallet('0x05417') // dumpToJson defaults to true if not supplied


const fetchItems = async (storeName, keys = []) => {
  // possible code omitted here
  
}
const itemStore = await fetchItems('Electronics') // keys defaults to an empty array object
```

## Summary
Default parameters allow us to provide a default value for the argument when not supplied during the function call.

Default parameters are added at the end of the paremeter list.
Why is VS Code so hard to beat?
Tags: vscode, webdev, frontend, programming
Published: 2022-02-08 16:25:42

As the famous saying goes: “There is nothing more opinionated than a developer”. Well I made that up but we all are aware how hard it is to convince a developer. Nothing really changes when it comes to Code Editors. Some devs prefer Sublime and Vim but others like to use Atom. Among all these names there is one that really stands out and beats all others with a fair margin. I am talking about VS Code. VS Code has made a mark very quickly and is considered one of the most durable code editors today. But why is it so hard to beat? Let’s discuss in detail what makes VS Code so special and why.

## Hey, it’s free and cross-platform man

VS Code is free, open-source, and cross-platform IDE. It will work on all devices whether it is Windows, macOS, and Linux which makes it easier for everyone to work regardless of the device they are working on. 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2b99aa28clay55lejqru.jpg)
## Very easy to install

It’s extremely easy to install. All you have to do is just download it and you are ready to code your first web app using, say, Express and JavaScript etc…

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cefimmuhd0k1blwo7efl.jpg)
## Supports a lot of languages

Another thing that makes VS Code so special is the fact that it has support for almost all the programming languages that exist. It supports Python, JavaScript, HTML, CSS, TypeScript, C++, Java, PHP, Go, C#, PHP, SQL, Ruby, Objective-C, and much more.


## Debugging
VS Code comes out with a built-in debugger which is also one of its key features. It helps to speed up any editing, merging, and debugging. However, it automatically comes with a debugger that supports NodeJS that can modify anything transpired to JavaScript but also, you can use extensions for other runtimes.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88tf4f8e6nsizagelz0z.jpg)
## Extensions

VS Code has thousands of extensions on offer from themes like UI extension to programming language support, debugging, Git integration, and even Spotify players!
You can easily create your own with the help of specific JavaScript / TypeScript and detailed scripts.
Extensions are very important because they make the VS Code what it is right now, a piece of software that you know very well.
Without them, VS Code would be no more than a magnificent text editor with beautiful design and basic automation complete here and there.
Extensions are really important in customizing your software to suit your personal needs.

## Conclusion
Most people do agree that it is the best IDE right now and the stack overflow surveys say the same. Its ease of use and countless amazing features make it great. I and my team have also tried to make the developer experience smoother by making a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=vsblox.blox) for front-end developers that have Premade UI components. Do check out if interested.
Database Transactions - Automatically Rollback - Laravel
Tags: php, laravel, programming, webdev
Published: 2022-02-08 16:24:42

Imagine with me about entering data into the database. More than one entry process will take place in a single function, and an error occurred in one of these operations. This will result in a bigger mistake at one stage of the function than not executing the entire function. Here comes the role of transactions https://laravel.com/docs/8.x/database#database-transactions
Found this source and want to share it with you because of its importance https://www.youtube.com/watch?v=u-lHNsHbZ9Q
here automatically rollback if something goes wrong 
```php
use Illuminate\Support\Facades\DB;

DB::transaction(function () {
    DB::update('update users set votes = 1'); // First operation

    DB::delete('delete from posts'); // second operation
});
```

Take a look at Manually Using Transactions, you will have more fun https://laravel.com/docs/8.x/database#manually-using-transactions and `` afterCommit() `` https://laravel.com/docs/8.x/mail#queued-mailables-and-database-transactions
I hope you have fun.
ES6: Rest parameters
Tags: tutorial, javascript, begginers, webdev
Published: 2022-02-08 16:24:27

## Introduction

In this article, we shall learn about rest parameters.

## Rest Parameters 

Rest parameters allow several arguments to be supplied to a function.  `console.log(...args)` follows this pattern. We can supply as many arguments to `console.log()` because `console.log()` takes rest parameters.

Example in code snippet showing the rest parameters:
```typescript
// syntax for rest parameters:
const addSeveralNumbers = (...args) => {
  let result = 0
  args.forEach((num, index) => {
    result += num
  })

  return result
}
const addToTen = addSeveralNumbers(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
console.log(addTo) // prints 55
```

## Summary
1. Rest parameters allow us to supply a non-fixed number of arguments to a function. 
2. Syntax for rest parameters:`function multiply(...args) { // function body}`
3. Calling a function that takes rest parameters is done as one would do with a normal function like `multiply(1,2,3,4)`
4. The arguments supplied are accessed as an array of values inside of the function body like in the example

I've rarely used `function rest parameters` but it's good to learn and know they exist
Letting it all hang out
Published: 2022-02-08 16:21:00

This is repost of a blog I wrote [here!](https://zacharyp.blog/letting-it-all-hang-out)

## Putting yourself out there.

This week I launched [zacharyp.dev](https://www.zacharyp.dev/) my own personal site dedicated to showing off my work and be a test bench for new techniques. I have been working on this for the better part of 2ish months and I finally felt ready current bugs and all... to show off to the world. I am no stranger to putting out content in one form or another but always as a side thing like music or video games, this was a whole new ball game because it is directly linked to what I hope in the not so distant future is my career.

I would be lying if I said I was not nervous over this but at first I could not place why and I just chalked it up to simple new project nerves. Now that I have had time to sit in this feeling I realized that up until this point I have not had anything forward facing announcing my work at becoming a developer. I have been on this path relatively in the dark, with the launching of this site along with finally.. getting my social presence in order that abruptly changed.

## It all became real.

For those that did not know as of this post id say we are at about the 10 month mark since I wrote my first line of code ever. Launching that site is the culmination of those 10 months and the hard work that has gone into it. Launching the site is me fully committing all the practice rounds are over it's time to perform and that realization is what made me more nervous than anything, because with that leap comes the possibility of total failure. Now I am not all doom and gloom I actually have a supreme confidence in my ability to see this through but acknowledging those downsides is what fuels that next step and the one after that.

All this rambling is to say I had a simple choice, either let fear of failure break me or let it be the fuel that pushes me forward. Both choices are neither right nor wrong, fear is the bodies way to get you to pay better attention. Fear can be harnessed like any other emotion to boil things down to what really is important to yourself. To me the fear of regret for not trying to see this through is a harder pill to swallow than the fear of financial hardship.

I will leave yall with this, I've been reading Dune again and the movie was dope for a part 1.. but the "Litany Against Fear" sums this all up nicely..

> “I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.” -Frank Herbert, Dune
SUPERs changements pour la SUPER SEMAINE ✨
Tags: libeclub
Published: 2022-02-08 16:03:22

SUPER bonne nouvelle mes amis du LibéClub.
Nous avons opéré de grands changements sur le planning de la semaine, alors je vous en dévoile un nouveau.

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

🍿 **Lundi 14** : Soirée Cinéma <u>(Le Château Ambulant)</u>
✏️ **Mardi 15** : Soirée Dessin (Je vous explique le concept après)
🍿 **Mercredi 16** : Soirée Cinéma <u>(Soul)</u>
🎮 **Jeudi 17** : Soirée Jeux <u>(Wolfy, Among Us, Garit Phone, ...)</u>
**Vendredi 18** : rien de prévu
🏆**Samedi 19 et Dimanche 20** : OLYMPIADES LIBÉÉÉÉÉÉÉÉCLUBIEEEENES

"Mais... BOUGRE D'ANES?!:;,;:! que s'est-il passé?? je suis FURIEUX, la sOIRéee pppPOWERPoint est encore décallé?:!:;,!!!!!" - Probablement ce que vous avez pensé en lisant le joli planning

"OUI MAIS NON" - A peu près ce que je vous répond.

Oui j'ai encore décalé la soirée mais ~~j'ai été obligé~~ c'est pour la bonne cause ~~sauvez-moi~~ ! En effet, la soirée PowerPoint servira de préambule aux Olympiades LibéClubiennes, elle vous servira même à remporter des points bonus pour démarrer avec un petit coup de pouce 🤏🤏🤏🤏🍗
Pour ce qui est du détail et du déroulement, je ferai une autre annonce soyez patients svp


"MAIS LA SOIRÉE DESSIN QU'EST-CE QUE C'EST???!!! 😡😡😤😤😤🥵🥵🥵🥵

Vous allez rire

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hir7hbabanfxdixqanol.png)
Dans cette soirée, de **21h à 0h00**, nous allons réaliser des dessins collaboratifs euuh..; sur un un site internet sur la toile 🕸️🪠🪠
Voilà c'est très précis mais on pourra faire plusieurs choses comme réaliser une fresque géante pour le LibéClub par exemple.


Merci à Théo pour la collaboration sur la magnifique fresque d'annonce et déso pour les pings
howto remove an eventListener
Tags: javascript
Published: 2022-02-08 16:01:21

### first try....

```html
<!DOCTYPE html>
<html lang=de>
<meta charset=UTF-8>
<title>CSV2Table</title>
<link rel=stylesheet 
href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
<style>
  .fat-red{font-weight:bold; color:red;}
  button{width:200px;}
</style>

<div class=container>
<hgroup>
  <h1>EventListener</h1>
  <h2>how to remove</h2>
</hgroup>
<p>click me to get fat and red!</p>
  <button>remove Event</button>
</div>
<script>
"use strict";
var paragraph = document.querySelector("p");
var button = document.querySelector("button");
// lets add an eventListener to the paragraph,
paragraph.addEventListener("click", 
  (evt) => evt.target.classList.toggle("fat-red"))
// an eventListener to the button
button.addEventListener("click",
  () => paragraph.removeEventListener("click", 
       (evt) => evt.target.classList.toggle("fat-red")))
</script>
```

![sample view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ia3pdd2j7mdi8xn2nn5z.png)


OK, that **doesn't** work

### second try....

```javascript
"use strict";
var paragraph = document.querySelector("p");
var button = document.querySelector("button");
const fatRed = evt => evt.target.classList.toggle("fat-red")
paragraph.addEventListener("click", fatRed)
button.addEventListener("click",
  () => paragraph.removeEventListener("click", fatRed))
```
OK, that's work...

### third try...

```javascript
"use strict";
var paragraph = document.querySelector("p");
var button = document.querySelector("button");
function fatRed(evt){evt.target.classList.toggle("fat-red")} 
paragraph.addEventListener("click", fatRed)
button.addEventListener("click",
  () => paragraph.removeEventListener("click", fatRed))
```
it's working also ...  

## It's better not to use anonymous functions for eventListener(s) !!
What is JavaScript String charAt() and charCodeAt()
Tags: javascript, webdev, programming, beginners
Published: 2022-02-08 15:55:45

first lets see `charAt()` in javascript

it is simple

-  `charAt()` method returns the character at a specified index in 
      a string
 
-  The index of the first character is 0, the second 1, third 3
 
-  The index of the last character is string length - 1
![charAt()](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0ywjbnlf0t7k1atuedk.png)

now lets see what is `charCodeAt()` in javascript

 - `charCodeAt()` method returns Unicode of the the character at a 
    specified index in a string.

 - The index of the first character is 0, the second is 1, third 3

 - The index of the last character is string length - 1
 - both uppercase and lowercase characters has seperate unicode 
   values

![charCodeAt()](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tsz011t196i3baf38iem.png)

Hope your dots connected!!!! : )
[BTY] Day 4: AI Roadmap
Tags: betterthanyesterday, roadmap, ai
Published: 2022-02-08 15:43:40

_This post was for 07.02.2022_

I come across this Roadmap from my colleague. The link is here: https://i.am.ai/roadmap/#note

Quote from the guideline:

> The purpose of these roadmaps is to give you an idea about the landscape and to guide you if you are confused about what to learn next and not to encourage you to pick what is hip and trendy.

![Data Science roadmap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gsj89q1yxmnfvt1ijx9.png)
 

![Machine Learning Roadmap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l0ueerr8zb48qykv1hwp.png)

And many more!

Hope I could find the right roadmap for myself in the AI journey!
REGEX (REGULAR EXPRESSIONS) WITH EXAMPLES
Tags: regex
Published: 2022-02-08 15:08:16

For testing Regular Expressions visit regexr.com [website](https://regexr.com/) . It is an online tool.

**Email Validation**: 
_sample_: `google@gmail.com`
```python
/[a-zA-Z0-9_\-\.]+[@][a-z]+[\.][a-z]{2,3}/
```

**Bangladeshi Mobile Phone Validation**: 
_sample_: `8801412345678`
```python
/(\+88|88)(01)[3|4|5|6|7|8|9]{1}[0-9]{8}/
```

**Facebook id Validation**: 
_sample_: `https://www.facebook.com/zuck`
```python
/(https:)?\/\/?(www\.)?facebook\.com\/[a-zA-Z0-9\.]*/
```
Build a language translator in just 3 lines using googletrans API
Tags: python, api, googletrans
Published: 2022-02-08 15:07:12

Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make calls to such methods as detect and translate. [Link](https://py-googletrans.readthedocs.io/en/latest/)

We can use Free Google Translate API in Python, which is a free of charge translator. [Link](https://pypi.org/project/googletrans/)

We need to install the API:

```
$ pip install googletrans
```
Let us try to translate "Hello" to Japanese, simply say:

```
from googletrans import Translator
translator = Translator()
result = translator.translate("Hello", dest="ja")

print(result)
```

In the above, we can specify any language code for 'dest' value. Get the supported language codes from the [documentation](https://py-googletrans.readthedocs.io/en/latest/)