teleren/devto huggingface dataset:
Run Laravel artisan commands in PHP Storm
Tags: php, laravel, webdev, tutorial
Published: 2021-07-02 18:39:09

---
title: Run Laravel artisan commands in PHP Storm
published: true
date: 2021-07-02 18:00:07 UTC
tags: PHP,Laravel,webdev,tutorial
canonical_url: https://www.csrhymes.com/2021/07/02/run-artisan-commands-in-phpstorm.html
cover_image: https://www.csrhymes.com/img/run-artisan.jpg
---

PHP Storm has a built in terminal window which you can use to run Laravel artisan commands, but there is a quick configuration change that you can do to make it even easier to run artisan commands.

- Open Preferences > Tools > Command Line Tool Support
- Click the plus icon
- Select `Laravel` from the Choose tools dropdown and press OK

![Command line tools](https://www.csrhymes.com/img/run-artisan/command-line-tools.jpg)

- Set an alias, I’ve used `artisan` in this example
- Choose your PHP Interpreter or use the default project interpreter
- Set the `Path to script` as the location of your Laravel app’s artisan file
- Press `OK`

![Tool Settings](https://www.csrhymes.com/img/run-artisan/tool-settings.jpg)

- Press control twice to open Run Anything
- Type the alias you entered, `artisan` in my example, and a list of artisan commands will appear, along with the available options.
- The list of available commands will filter down as you type
- Enter the command and press enter and it will run the command for you in the PHP Storm terminal

![Run Anywhere](https://www.csrhymes.com/img/run-artisan/run-anywhere.jpg)

For more information, take a look at the [PHP Storm docs website](https://www.jetbrains.com/help/phpstorm/laravel.html#use_artisan_cli)

[Photo](https://stocksnap.io/photo/laptop-apple-EUUXASKH48) by [Ghost Presenter](https://stocksnap.io/author/55737) on [StockSnap](https://stocksnap.io)
Start emulator and simulator from macOS terminal
Tags: android, ios, mobile, testing
Published: 2021-07-02 17:46:12

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

If you like use the terminal and knows how slow it is for macOS to open Xcode and Android Studio in an attempt to get the emulators/simulators started, this article is for you.

Before going to the tutorial, make sure you have Xcode and Android Studio properly installed with their command line tools on your macOS.

With these two NPM packages that can help you, it's `start-ios-simulator` & `start-android-emulator`. Run the following commands to install:

For android emulator:
```
npm install -g start-android-emulator
```
For iOS simulator:
```
npm install -g start-ios-simulator
```

For android just run the command below and it will not only list the emulators available to start, it will also ask you if you intend to clean the device's data to start it.

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

In the iOS simulator you will have all the options available to start.

![Terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1xw1j927nerqasppzlrj.png)


#Starting Android Emulator

You can also run the default emulator command that's in that [developer.android.com](https://developer.android.com/studio/run/emulator-commandline?hl=en#starting) doc.

To list emulators:
```
emulator -list-avds
```

Just reference the device's compiler path, start the emulator and specify the device name.
```
/Users/seu.user/Library/Android/sdk/emulator/emulator -avd Pixel_2_API_29 -netdelay none -netspeed full
```

In your .bash_profile file you can even create an alias to run just a short command in the terminal.
```
export ANDROID_HOME=/Users/{YourUsername}/Library/Android/sdk/
alias run-emulator=”$ANDROID_HOME/emulator/emulator @Pixel_XL_API_27"
```

#Start iOS Simulator

Apple has `simctl` binary for interacting with iOS simulators from the command line. It's very similar to adb for Android. We can access all available options using the help command.
```
$ xcrun simctl help
```

List all simulators:
```
xcrun simctl list --json
```

To launch the simulator app:
```
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/
```

If you want to start a specific simulator, just find the id listed in the `xcrun sumctl list — json` command and run the command:
```
xcrun simctl boot BE53CBFF-4900–4F10-A1D4-B451AB4C9E7E
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/
```
Your Favorite DAWs and the Programming Language they are written in
Published: 2021-07-02 17:42:28

Do you know the programming language some of your favorite Digital Audio Workstations(DAWs) are written in? 

Here is a list of some of them:

* Ableton Live - C++
* FL Studio - Delphi, Assembly language
* Logic Pro - C, C++, Objective-C, Swift
* Reaper - C, C++, Assembly language
* Pro Tools- C, C++, Assembly
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-07-02 17:36:32

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there!


**Looking back on your week, what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Playing a new video game... or whatever else might spark joy ❤️ 

---

Congrats on your wins this week!

![Happy parrot](https://media.giphy.com/media/5PSPV1ucLX31u/giphy.gif)
C# loops
Tags: csharp, tutorial, programming, beginners
Published: 2021-07-02 17:30:40

In this article, we'll learn about how to use loops in C#.

In C# there are 4 types of loops available - 
- for
- foreach
- while
- do-while 

## The `for` loop
The for loop is a basic loop that is available in almost all programming languages. It executes a block of statements until a specified expression evaluates to false.

#### Syntax
```csharp
for(initialValue; condition; iterator)
{
  statements...
}
```
The above code executes the statements inside parentheses until the **condition** evaluates to false.

#### Example
```csharp
for(int i = 0; i < 5; i++)
{
   Console.WriteLine(i);
}
```

## The `foreach` loop

The foreach loop in C# is used to iterate over the instance of the type that implements the `IEnumerable` or `IEnumerable<T>` interface. In other words, it is used to iterate over an array or collection. 

#### Syntax
```csharp
foreach(type variable in collection)
{
  statements...;
}
```

#### Iterate on Array
In this example we'll use a simple array of integers.
```csharp
int[] numbers = {1,2,3,4,5};
foreach(int number in numbers)
{
  Console.WriteLine(number);
}
```

The above lines will print all the numbers in the list `numbers`.
```bash
1
2
3
4
5
```
#### Iterate on Collection

In this example, we are going to use collections.

```csharp
using System.Collections.Generic; 
...
...
List<string> people = new List<string> {"John","Smith","Josh","Walton"};
foreach(string name in people)
{
  Console.WriteLine(name);
}
```
The above lines will print all the names from the collection `people`.

```bash
John
Smith
Josh
Walton
```

## The `while` loop
The while loop executes a block of statements while an expression evaluates to true.

#### Syntax
```csharp
while(condition)
{
  statements...
}
```

#### Example 
```csharp
int j = 0;
while (j<5)
{
    Console.Write(j);
    j++;
}
```

## The `do-while` loop
The **do-while** loop executes a block of statements while an expression evaluates to true. The only difference in this and while loop is that, it executes the block **at least one time** since the condition is checked after the execution of the loop.

####Syntax
```csharp
do
{
statements...
} while (condition)
```

#### Example
```csharp
int k = 1;
do
{
    Console.Write(k);
    k++;
} while(k<5)
```
api v2 or something alike
Tags: laravel, android, apiv2
Published: 2021-07-02 17:23:56

---
title: api v2 or something alike
published: true
description: what happened after a reverse engineering
tags: laravel, android, apiv2
//cover_image: https://direct_url_to_image.jpg
---

Hallo Leute! Today's post is about how I migrated from /api/v1/ to platform v2 🤓

This is the continuation of the [Reverse engineering a platform](https://dev.to/eichgi/reverse-engineering-a-platform-1ohh) post.

The next scenario for my brand-new compatible platform was to be in charge of the live app consuming the first backend (v1). Given I already understood how it worked, it was time to update the app in order to consume the new API. But unlike the new apps consuming the v2 platform this one was rooted to the initial database/storage process.

In order to be able to do a hot swap when updating, I had to:

- migrate the database and make sure the new laravel's
- migrations fit as expected
- migrate all the files to the new server (I could patch the links but eventually that server was going to be dropped)
- add business logic for old and new files and data

It sounds easy but I spent some time figuring out several scenarios in order to pick the simplest solution. Once the roadmap was defined it was basically sew n' sing 😗.

After some polishing it was finally done. I saved some time so the users could make the update, and as usual, you know everything is fine because no one is complaining!

![It's beautiful](https://media1.tenor.com/images/d86a7d4f9caac0b10568b904b5b30bc5/tenor.gif?itemid=13361936)

The cherry of the cake was the unlocking of some features I couldn't have it working in v1. This is how the software works essentially, iterate over and over until you have the desired outcome.

Stay tune for more 😎
<br>
> This post was originally published on https://blog.eichgi.com/apiv2-or-something-alike
Use canos (pipes) sempre que possível em Elixir!
Tags: elixir, programacao
Published: 2021-07-02 17:16:58



Oi, pessoal!

Recentemente fiz um [vídeo sobre Pipes em Elixir](https://youtu.be/rryQ3DdpgiM). Como sei que nem todos gostam de ver vídeos (eu estou entre estas pessoas), vou escrever um pouco sobre o que falei lá.

Em primeiro lugar, preciso falar da Falácia do Espantalho. Um site muito bom sobre falácias lógicas é https://yourlogicalfallacyis.com/. Lá você encontra um texto sobre a falácia do espantalho que diz:

["Ao exagerar, distorcer, ou simplesmente inventar o argumento de alguém, torna-se muito mais fácil apresentar a sua própria posição como sendo razoável."](https://yourlogicalfallacyis.com/br/espantalho)


Por que eu disse isso? Porque quando você entra na página da Elixir School (que eu adoro) sobre o [Operador Pipe](https://elixirschool.com/pt/lessons/basics/pipe-operator/) está escrito "chamadas em funções podem ficar tão incorporadas a outras chamadas de função, tornando-se muito difícil de seguir" e aí eles dão o seguinte exemplo:
```elixir 
foo(bar(baz(new_function(other_function()))))
```

Bem, mesmo sem *pipe* dá pra deixar o código acima bem mais legível. Como? Assim:
```elixir 
valor = other_function()
nome_significativo_1 = new_function(valor)
nome_significativo_2 = baz(nome_significativo_1)
nome_significativo_3 = bar(nome_significativo_2)
foo(nome_significativo_3)
```

Ou seja, o código acima talvez fique, dependendo da escolha dos "nomes significativos" das variáveis, até mais legível do que o exemplo com pipe utilizado na Elixir School:
```elixir 
other_function() |> new_function() |> baz() |> bar() |> foo()
```

Ou seja, eu acho que o pessoal da Elixir School usou um pouco da falácia do espantalho para justificar o pipe.

Eu já sou meio chato em usar os pipes tudo numa mesma linha. OK, sei que no iex não tem muita escolha exceto fazer isto (colocar o pipe no fim da linha e pular para a próxima linha):
```elixir 
iex> "Elixir rocks" |> 
String.upcase() |> 
String.split()
```

Mas não vou escrever sobre o que não gosto e sim sobre o que gosto. 
A tradução literal de *pipe* é cano e usando o operador pipe.

Na figura abaixo você pode ver como os dados fluem de uma função a outra através dos canos (pipes).

![Canos](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrxfpvcn6isq0ad0cwfu.jpeg)

Neste exemplo eu mostrei como você pode usar IO.inspect para ver o que acontece após cada ação do pipe.

```elixir 
Enum.take(1..100, 10)
|> IO.inspect(label: "inicial")
|> Enum.map(fn x -> x * 2 end)
|> IO.inspect(label: "Após map")
|> Enum.filter(fn x -> x > 4 end)
|> IO.inspect(label: "Após filter")
|> Enum.sum()
|> IO.inspect(label: "Após sum")
```

Portanto, minha sugestão é: use o pipe sempre que possível em Elixir. Na minha opinião (é somente uma opinião, claro), o pipe deixa o código mais legível!

Cover Photo by [Kyle Glenn](https://unsplash.com/@kylejglenn) on [Unsplash](https://unsplash.com/s/photos/pipe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).
Practical Functional Programming In Typescript — Oct 2021
Tags: javascript, workshop, functional, typescript
Published: 2021-08-06 16:47:57

---
title: Practical Functional Programming In Typescript — Oct 2021
published: true
date: 2021-07-02 16:48:57 UTC
tags: javascript,workshop,functionalprogramming,typescript
canonical_url: https://www.matechs.com/blog/practical-functional-programming-in-typescript-september
---

### Practical Functional Programming In Typescript — Oct 2021

_Join our upcoming workshop in functional programming! Organised by MATECHS, in partnership with ZIVERGE._

![](https://cdn-images-1.medium.com/max/1024/0*W7rNAcnSq44IYWTs.png)

[This 5-day](https://www.eventbrite.co.uk/e/practical-functional-programming-with-typescript-london-edition-tickets-159683316097?aff=erelexpmlt) interactive course aims to level up developers who want to gain practical knowledge of TypeScript in functional programming and build powerful business applications.

You’ll learn the basics of functional programming (Pure Functions, ADTs, e-DSLs), as well as how to use functional effect-systems to build modular, performant applications that are easy to write and maintain.

The workshop targets software developers who are eager to learn how to build modern, robust, and testable applications that are performant both in the back-end and front-end.

### Upon completion of the course, you’ll be able to

- Use the effect-ts library (and similar libraries such as fp-ts, qio, waveguide);
- Build modern, high-performance, asynchronous and concurrent, resource-efficient, and stack-safe applications, both in the back-end (well-optimized for serverless) and front-end;
- Implement best practices regarding error management and dependency management.

👉 Grab your ticket or [check the event page for more details](https://www.eventbrite.co.uk/e/practical-functional-programming-with-typescript-london-edition-tickets-159683316097?aff=erelexpmlt).

### About Ziverge

[Ziverge](https://ziverge.com/) was born in 2020 to help companies succeed using functional programming.

Founded by John A. De Goes, serial entrepreneur and an internationally-recognized expert on Scala and functional programming, Ziverge focuses on providing clients with a powerful combination of rapid turnaround time, technical excellence, and out-of-the-box thinking.

### About Matechs

[Matechs](https://webflow.com/about) supports startup and enterprise clients to grow through industry-leading IT strategy consulting. Matechs is founded by Michael Arnaldi, author of Effect-TS, a functional programming library. The library allows building reliable, scalable, maintainable, and resilient web applications, leveraging the power of functional programming patterns.
Neomorphic Calculator 🧮 + Dark Mode 🖤
Tags: webdev, javascript, css, codepen
Published: 2021-07-02 16:34:17

<h1>Introduction</h1>
Over the past year or even more, it is difficult not to pay attention to how interest in Neomorphism is rapidly growing in web design. And indeed, it is difficult to pass by such an unusual approach in the development of interfaces. Also, many developers have been posting their work on various resources for a long time, demonstrating how using simple shadows you can create beautiful and unusual elements. So I also decided to keep up.

![Alt Text](https://media.giphy.com/media/rZ0nZg8ZSFYzu/giphy.gif)

Therefore, today I would like to present to you my calculator made in the style of Neomorphism. It also has a Dark Theme, which you can launch using the switch in the upper right corner.

You can download the project from my <strong>Github</strong> repository or <strong>CodePen</strong>.
{% github Kerthin/calculator-templateSait %}

<a href="https://kerthin.github.io/calculator-templateSait/" target="_blank"><h1>Full Page Demo</h1></a>

![Alt Text](https://media.giphy.com/media/7Pe37n2eB0lC03ZouU/giphy.gif)

<h3>Dark Mode</h3>
![Alt Text](https://media.giphy.com/media/FDmQNyl8tEzEYpDwFh/giphy.gif)

<h1>CodePen</h1>
(See in the format `0.5x`)
{% codepen https://codepen.io/Astap/pen/abWOXrR %}

<h1>Responsive</h1>

![Alt Text](https://media.giphy.com/media/y8EKnAYyJnSE6qQMuu/giphy.gif)

<strong>The site is adapted for screen resolutions such as:</strong>
`@media 414px`
`@media 375px`
`@media 320px`

<h1>The End</h1>
Well, that's it. The project is very small, so there is no need to write large texts here. Thank you for paying attention to my article. Goodbye.

I can advise you to subscribe to my <a href="https://twitter.com/BelichenkoRoden"><strong>Twitter</strong></a>, I also post my works there.

<strong>P.S.</strong>
After each mathematical action, press the `equal sign`.

![Alt Text](https://media.giphy.com/media/m9eG1qVjvN56H0MXt8/giphy.gif)
How To use libraries and framework in Codepen
Tags: css, javascript, codepen
Published: 2021-07-02 16:10:56

## Table Of Contents
  1. [What is Codepen?](#code)
  2. [How To add CSS Frameworks](#chapter-1)
  3. [How To add JS Libraries](#chapter-2)

## What is Codepen? <a name="code"></a>
Ans. CodePen is an online community for testing and showcasing user-created HTML, CSS and JavaScript code snippets. It functions as an online code editor and open-source learning environment, where developers can create code snippets, called "pens," and test them.


### How To add CSS Frameworks <a name="chapter-1"></a>
1. Headover To Your CSS Section
![Step1](https://confident-lalande-9a807b.netlify.app/Frame%201.png)
2. Click on the settings(wheel) icon 
![Step2](https://confident-lalande-9a807b.netlify.app/Frame%202.png)
3. Then Scroll Down and find the **Add External Stylesheets/Pens**
![Step1](https://confident-lalande-9a807b.netlify.app/step2.jpg)
4. And then in the input section add your style sheet url or search for any style sheet in searchbox 
(for example:bootstrap's css link https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css)
![Step1](https://confident-lalande-9a807b.netlify.app/Frame%203.png)

#### Done Now You can use your linked stylesheet in your codepen project as usual now do same for javascript

### How To add JS Libraries <a name="chapter-2"></a>
1. Headover To Your JS Section
2. Click on the settings(wheel) icon 
3. Then Scroll Down and find the **Add External Scripts/Pens**
4. And then in the input section add your script sheet url or search for any script in searchbox
(for example: bootstrap's JavaScript link https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js)
Excel Formulas to Get the Percentage of Total ~ Easily!!
Tags: excelformula, excelformulas
Published: 2021-07-08 02:32:47

---
title: Excel Formulas to Get the Percentage of Total ~ Easily!!
published: true
date: 2021-07-02 15:40:31 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-get-percentage-of-total/
---

So far we have learned the formulas to **[find out the amount based on percentage](https://geekexcel.com/excel-formulas-to-calculate-the-amount-based-on-percentage/)**. Likewise, here we will show the **formulas to get the percentage of total in Excel**.  Let’s jump into this article! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

[![Get the percentage of total](https://geekexcel.com/wp-content/uploads/2021/07/Get-the-percentage-of-total.png)](https://geekexcel.com/excel-formulas-to-get-percentage-of-total/get-the-percentage-of-total/#main)<figcaption id="caption-attachment-48422">Get the percentage of total</figcaption>

## Generic Formula:

- Use the below formula to get the percentage based on the amount in Excel.

**=amount/total**

## Syntax Explanations:

- **Amount ** – It represents the separated amount.
- **Total** – It represents the total amount.
- **Division (/)** – It is used for dividing values or numbers.

## Practical Example:

Refer to the below example image.

- Here we will enter the input values in **Column B** , and **Column C**.
- Now we need to get the percentage based on the amount.

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/07/Input-Ranges-11.png)<figcaption id="caption-attachment-48423">Input Ranges</figcaption>

- Select any cell and type the above-given formula.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/07/Enter-the-formula-9.png)<figcaption id="caption-attachment-48421">Enter the formula</figcaption>

- Finally, press the ** ENTER**  key, you can get the result as shown below.

![Result](https://geekexcel.com/wp-content/uploads/2021/07/Result-10.png)<figcaption id="caption-attachment-48424">Result</figcaption>

## Closure:

Here we have described the formulas to **calculate the percent of a total in Excel**. Let me know if you have any **doubts** regarding this article or any other Excel/VBA topic.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Read Also:

- **[Excel Formulas to Get the Percent Change ~ Quick Method!!](https://geekexcel.com/excel-formulas-to-get-the-percent-change/)**
- **[How to Insert a Date or Formatted Date in Excel Office 365?](https://geekexcel.com/how-to-insert-a-date-or-formatted-date-in-excel-office-365/)**
- **[Excel Formulas to Calculate the Surface Area of a Cone ~ Easy Tricks!!](https://geekexcel.com/excel-formulas-to-calculate-the-surface-area-of-a-cone/)**
- **[Excel Formulas to Get Domain from Email Address ~ Quickly!!](https://geekexcel.com/excel-formulas-to-get-domain-from-email-address/)**
Appcircle wins the #3 spot on Product Hunt!
Tags: flutter, android, cdcd
Published: 2021-07-02 15:25:50

It was close and came right down to the final hour, but Appcircle held on to take <a href="https://www.producthunt.com/posts/appcircle">one of the coveted top 5 on Product Hunt for June 30th!</a>

We'd like to thank our staff for their hard work in preparing for this, and all the great hunters who helped us get into the top three!

Thank you all!
Learn MERN stack from my YouTube series.
Tags: showdev, webdev, codenewbie, react
Published: 2021-07-02 15:24:31

Hey fam, I'm happy to announce that I completed my MERN stack series on YouTube. In this series I will take you through detailed explanation of `React`, `Redux`, `Node.js`, `express.js`, `mongoDB` and more.

You will learn:
+ **How to create CRUD API endpoints.**
+ **How to create Auth API endponits using JWT.**
+ **Consuming CRUD APIs in React and Redux**
+ **Consuming AUTH APIs in React and Redux**
+ **Joi data validation**
+ **Testing APIs with Postman**
+ **Protecting routes and APIs**
+ **Frontend and Backend deployment**
+ **and more**

![mern](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kai1zkcgybmfqoqleu0t.PNG)

Here is the link to the series: https://youtube.com/playlist?list=PL63c_Ws9ecIQkH5xD6JW4cf2VporjzSRW

You can also subscribe to my channel for more: https://youtube.com/c/chaoocharles

Always stay awesome 💙