teleren/devto huggingface dataset:
Top 35 resources for programmers 2022
Tags: programming, discuss, beginners
Published: 2022-04-22 12:49:47

## Introduction

To order to become a great programmer, you have to conquer programming by learning it from various resources including great youtube channels to great websites.

In this article, I will present you the list of 35 best resources for learning programming.

Let's starts with some popular youtube channels.

## Best Youtube channels

- Edureka
- SimpliLearn
- Sentdex
- Telusko
- Programming with Mosh
- freeCodeCamp.org
- Traversy Media
- ProgrammingKnowledge
- Derek Banas
- Clever Programmer
- thenewboston
- LearnCode.academy 
- mycodeschool
- CodeWithHarry
- Anuj Bhaiya
- Apni Kaksha
- Jenny's lectures CS/IT NET&JRF
- Gate Smashers
- Bhagwan Singh Vishwakarma

## Best Websites

There are many types of websites some of which is made for practising code and some is made for providing tutorials. Therfore, I split them into two parts. 

### Websites for coding practise

- www.hackerrank.com
- www.topcoder.com
- www.codechef.com
- www.coderbyte.com
- www.leetcode.com
- www.hackerearth.com
- www.exercism.io

### Websites for learning programming

- www.w3schools.com
- www.geeksforgeeks.org 
- www.programiz.com 
- www.studytonight.com 
- www.javatpoint.com 
- www.tutorialspoint.com

## Best apps

- ProgrammingHub
- Mimo
- Sololearn
- Grasshopper

There are many apps available in play store and apple app store but I like these apps and these are very popular among developers.

Read the full article:- [Top 35 resources for programmers](https://techwithpie.blogspot.com/2022/04/top-35-resources-for-programming-2022.html)
Thanks
3 Steps to ensure effective & long-term maintenance of your app
Tags: programming, productivity, mobile
Published: 2022-04-22 12:39:23

By following the best app maintenance practices, you can ensure that your users continue to have seamless and engaging app experiences. Here’s what you should consider for maximizing the benefits from app maintenance: 

## 1.  Build your app well from the start: 
When creating an app, make sure to keep app maintenance in mind from the very start. This means using a functional platform that is easy to scale. Make sure the platform uses reliable and latest technologies that won’t become obsolete as soon as you finish development.

Moreover, you need to invest in testing, including security, performance, and other types of testing. Testing documentation can help you with app maintenance and support later.
 
Also, don’t forget to add features in your application that are practically convenient for the users. You can avoid adding unnecessary features to your application that can drive the users away. During the planning stage, your choice for iOS, Android or cross-platform app development will help you determine what features will deliver an amazing experience for your users.

[Also Read: [How much does Android app development cost?](https://appinventiv.com/blog/android-app-development-cost/)]

## 2.  Take care of scalability:
Your app’s structure and architecture should be robust enough to handle any number of users. In order to serve thousands or millions of users at the same time, you may also need to upgrade the features and functionalities of your app. Otherwise, you may quickly lose your new users as well as the money you invested in marketing.

## 3.  Stick to your development team:
If you are working with an app development team, make sure to stick with them. If you hire new developers every time, they’ll need time to get acquainted with your project and learn about the technologies used. 
When your app is maintained by the same team who created it, the process is rather painless and quick. Your developers know exactly what needs to be changed once a new operating system version is out or a new feature is planned.

If your business is Edutech oriented, you should seriously take the services of [education mobile app development](https://appinventiv.com/mlearning-app-development/) company for its development and maintenance.
Make API scanning a daily practice
Published: 2022-04-22 12:35:17

What’s happening with APIs: These days almost all mobile and web applications are powered by APIs. 

What is the problem: API security and validation are hard to achieve

Why the problem exists: Most of the time mobile and web front ends are either tested manually or automatically for security. But APIs rarely get the same treatment. What we have seen is most of the APIs are either leaking data or not properly secured. 

How to solve it: The best practice is to build automation for testing API security or use open source tools as much as possible including 

[EthicalCheck](https://apisec-inc.github.io/pentest/) - automated testing, free

[Burp](https://portswigger.net/burp) - write your own security test, free
hackerrank Mini-Max Sum in javascript
Tags: javascript, beginners, programming
Published: 2022-04-22 12:31:51



```js
function miniMaxSum(arr) {
    // Write your code here
    const sortedArray = arr.sort();
    
    let min_sum = 0
    
    let max_sum = 0
    
    for(let i =0; i < arr.length; i++){
        if( i < arr.length -1 ) {
            min_sum += arr[i]
        } 
        if (i > 0) {
            max_sum += arr[i]
        }
    }
    
    console.log(min_sum , max_sum) 

}
```
StairCase | HackerRank solution in javascript
Tags: javascript, hackerrank, solution, staircase
Published: 2022-04-22 12:23:24

Problem Statement : 

Input Format
A single integer ,n, denoting the size of the staircase.

Constraints: 0 < n <= 100


Output Format : 

Print a staircase of size  using # symbols and spaces.

Note: The last line must have  spaces in it.


Example: 
Sample Input : 6

Sample output 


```
     #
    ##
   ###
  ####
 #####
######

```


Solution in javascript. 


```js
function staircase(n) {
    // Write your code here
    var line = '';
    for(let i = 1; i <n +1; i++) {
        line += Array(n-i).fill(' ').join('')
        line += Array(i).fill('#').join('')
        console.log(line)
        line = ''
    }

}
```
C# Tip: How to temporarily change the CurrentCulture
Tags: csharp, dotnet
Published: 2022-04-22 12:15:36


It may happen, even just for testing some functionalities, that you want to change the Culture of the thread your application is running on.

The current Culture is defined in this global property: `Thread.CurrentThread.CurrentCulture`. How can we *temporarily* change it?

An idea is to create a class that implements the `IDisposable` interface to create a section, delimited by a `using` block, with the new Culture:


```cs
public class TemporaryThreadCulture : IDisposable
{
	CultureInfo _oldCulture;

	public TemporaryThreadCulture(CultureInfo newCulture)
	{
		_oldCulture = CultureInfo.CurrentCulture;
		Thread.CurrentThread.CurrentCulture = newCulture;
	}

	public void Dispose()
	{
		Thread.CurrentThread.CurrentCulture = _oldCulture;
	}
}
```

In the constructor, we store the current Culture in a private field. Then, when we call the `Dispose` method (which is implicitly called when closing the `using` block), we use that value to restore the original Culture.

## How to use it

How can we try it? An example is by checking the currency symbol.


```cs
Thread.CurrentThread.CurrentCulture = new CultureInfo("ja-jp");

Console.WriteLine(Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol); //￥

using (new TemporaryThreadCulture(new CultureInfo("it-it")))
{
	Console.WriteLine(Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol);//€
}

Console.WriteLine(Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol); //￥
```

We start by setting the Culture of the current thread to Japanese so that the Currency symbol is ￥. Then, we temporarily move to the Italian culture, and we print the Euro symbol. Finally, when we move outside the `using` block, we get back to ￥.

Here's a test that demonstrates the usage:

```cs
[Fact] 
void TestChangeOfCurrency()
{
	using (new TemporaryThreadCulture(new CultureInfo("it-it")))
	{
		var euro = CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol;
		Assert.Equal(euro, "€");

		using (new TemporaryThreadCulture(new CultureInfo("en-us")))
		{
			var dollar = CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol;

			Assert.NotEqual(euro, dollar);
		}
		Assert.Equal(euro, "€");
	}
}
```

## Conclusion

Using a class that implements `IDisposable` is a good way to create a temporary environment with different characteristics than the main environment. 

I use this approach a lot when I want to experiment with different cultures to understand how the code behaves when I'm not using English (or, more generically, Western) culture.

Do you have any other approaches for reaching the same goal? If so, feel free to share them in the comments section!

Happy coding!

🐧
A Complete Guide to Optimizing Slow Tests
Tags: testing, productivity, cicd, devops
Published: 2022-04-22 11:59:26

It’s impossible to imagine software development without testing. There would be no feedback, error detection, nor design decision. 

As such, automated testing has become an essential part of the development process. However, tests are only effective when they run within a reasonable timeframe. Slow testing can result in a loss of focus and momentum: Deployment schedules are impacted, release goals are missed, and ultimately, you begin to lose your competitive edge.

To ensure effective and efficient testing that doesn’t cause you to fall behind, you need a plan. [In this short guide](https://semaphoreci.com/resources/complete-guide-to-optimizing-slow-tests), we will give you a complete framework to help you speed up your testing.

You’ll learn:

- How to identify slow tests.
- 9 most common causes for test latency and how to resolve them.
- How to prioritize optimization work to maximize benefits.
- How to write fast tests.
- How to keep them fast.

[Download it now](https://semaphoreci.com/resources/complete-guide-to-optimizing-slow-tests) 📚
Byte Stream Vs Character Stream In Java
Tags: java
Published: 2022-04-22 11:59:00

Byte Stream In Java :

1. They process the data byte by byte i.e 8 bits at a time.
2. They read/write data 8 bits maximum at a time.
3. They are most suitable to process binary files.
4. All byte stream classes in Java are descendants of InputStream and OutputStream.

Character Stream In Java :

1. They process the data character by character.
2. They read/write data 16 bits maximum at a time.
3. They are most suitable to process text files.
4. All character stream classes in Java are descendants of Reader and Writer.

Below image shows some important byte stream classes and character stream classes in Java.


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

Source : https://javaconceptoftheday.com/byte-stream-vs-character-stream-in-java/
C++ uchun run komandasi
Published: 2022-04-22 11:55:56

### scripts papkasi yaratamiz

```sh
mkdir ~/scripts
```

### `run.sh` bash file yaratamiz
```sh
touch ~/scripts/run.sh
```

### `run.sh` fayl ichiga quyidagi _script_ni yozamiz
```sh
#!/bin/bash
clear && gcc $1 -o main && ./main
```

### `run.sh` faylga execution ruxsatini beramiz
```sh
chmod +x ~/scripts/run.sh
```

### **scripts** papkasini global $PATH ga doimiy qo'shamiz.
```sh
echo "export PATH=$PATH:~/scripts" >> ~/.bash_profile
```
Numpy For Engineers, Scientists and Data Analysts
Tags: numpy, arrays, python, datascience
Published: 2022-04-22 11:07:23

A stackoverflow user asked this question:

> If I have list=[1,2,3] and I want to add 1 to each element to get the output [2,3,4], how would I do that? I assume I would use a for loop but not sure exactly how.

Well, the answer to this question is to use [Numpy](https://numpy.org/doc/stable/)

Numpy (Numerical Python) is a python package that comes with all the tools you will need for scientific computing. You should consider using numpy if you want to perform fast operations on [arrays](https://en.wikipedia.org/wiki/Array_data_structure). These operations includes mathematical, logical, shape manipulation, sorting, selecting, basic linear algebra and statistical operations, discrete Fourier transform, the list goes on and on.

The code demonstration below addresses the question asked by the stackoverflow user above:
### Input:
```
# import the numpy library
import numpy as np

# create the list, the convert the list to a numpy array
a = [1, 2, 3]
a = np.array(a)

# perform scalar addition on the array
b = a + 1
print(b) 

``` 
if you type and test the code above correctly; your result should look like this:
### Output
```
array([2, 3, 4])
```
That was quite easy right? :-).

If you are new to python and you don't know how to write and execute the code above, the next few sentences are for you.

I use Anaconda and Jupyter notebook to write and run my python codes.

## What is Anaconda Navigator
Anaconda Navigator is a desktop graphical user interface (GUI) included in Anaconda® distribution that allows you to launch applications and easily manage conda packages, environments, and channels without using command-line commands. Navigator can search for packages on Anaconda.org or in a local Anaconda Repository. It is available for Windows, macOS, and Linux.

Watch the videos below to help you set up Anaconda on your device(s):

1. [Setup Anaconda
](https://www.youtube.com/watch?v=YJC6ldI3hWk)

2. [Using Jupyter notebook](https://www.youtube.com/watch?v=HW29067qVWk)

Stay tuned for my next post on the **Numpy For Engineers, Scientists and Data Analysts** Series.
OctoChats - April 2022
Tags: devops, octopusdeploy
Published: 2022-04-22 10:47:57

Folks we are back with our monthly show [OctoChats](https://youtube.com/playlist?list=PLAGskdGvlaw3M-BGbgR8Hw268pprQm_vt)! 

OctoChat is a monthly show created by the Community Team from Octopus Deploy. We share Octopus news, community news and industry news during each show and we hope to be able to interact and chat to the community as well. 

Join us online on [YouTube](https://youtu.be/cvVx_dGbmsQ) (Live at 2pm UK time) or catch the replay below.

{% youtube cvVx_dGbmsQ %}

## Octopus News

- [Config as Code](https://octopus.com/docs/projects/version-control?utm_source=blog&utm_medium=event&utm_campaign=octochats) dropped in March in 2022.1. The team have been working on this for 2 years and it puts the control of Octopus into where you work best. 
- [Config as Code Webinar](https://octopus.com/events/introducing-config-as-code-in-octopus?utm_source=blog&utm_medium=event&utm_campaign=octochats) on Star Wars day - May the Config as Code be with you!
- We’re currently hiring for a Java Community Solutions Architect focussing on AWS and GCP with a flavour of containers, reach out to me or you can apply directly on [https://octopus.com/company/careers](https://octopus.com/company/careers)
- We have a range of openings over UK, US, Australia and New Zealand and you can see our company handbook on [https://handbook.octopus.com/](https://handbook.octopus.com/)


## Community News
Events are starting to get back to being in person, and we've spotted the following happening soon. 
- The [Glasgow Azure User Group](https://www.gaug.co.uk) is meeting up on the 27th April for a social gathering and quiz!
- [NDC London on the 9th and 13th May, which the Octopus team will be present at](https://ndclondon.com/)
- [Microsoft Build next month on 24th to the 26th of May](https://mybuild.microsoft.com/)
- [KubeCon and CloudnativeCon Europe](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/) is back on the 16th till the 20th of May in Valencia, Spain but it’s also Virtual. Tickets cost $75 for All access or free for the Keynote and Solutions Showcase


## Industry News

- [WhatsApp Is Launching Community Chats, Adding Emoji Message Reactions To Texts](https://www.cnet.com/tech/services-and-software/whatsapp-launching-community-chats-adding-emoji-message-reactions-to-texts/ )
- [Perforce acquire Puppet](https://developer-tech.com/news/2022/apr/11/perforce-expands-devops-portfolio-with-puppet-acquisition/)
Azure - Creating a new tenant
Tags: azure, tenant, cloud, portal
Published: 2022-04-22 10:21:43

---
title: Azure - Creating a new tenant
published: true
description: Creating a new tenant on Azure
tags: 'azure, tenant, cloud, portal'
cover_image: 'https://raw.githubusercontent.com/campelo/documentation/master/posts/azure/assets/cover.png'
canonical_url: null
id: 1063789
date: '2022-04-22T10:21:43Z'
---

###### :postbox: Contact :brazil: :us: :fr:

[Twitter](https://twitter.com/campelo87)
[LinkedIn](https://www.linkedin.com/in/flavio-campelo/?locale=en_US)

---

## Creating a new tenant

- Go to [Azure Active Directory Admin Center](https://aad.portal.azure.com/) 
- Click on **Azure Active Directory > Manage Tenants**

![Image 1](https://raw.githubusercontent.com/campelo/documentation/master/posts/azure/creating-new-tenant-on-azure/assets/img1.png)

- Click on **Create** button to create a new tenant.

## Using a new tenant

- Go to [Azure Portal](https://portal.azure.com)
- Click on **Directories + Subscriptions** on top bar

![Image 2](https://raw.githubusercontent.com/campelo/documentation/master/posts/azure/creating-new-tenant-on-azure/assets/img2.jpg)

- Click on **Switch** button of your new tenant

![Image 3](https://raw.githubusercontent.com/campelo/documentation/master/posts/azure/creating-new-tenant-on-azure/assets/img3.jpg)

Now you're able to use all Azure resources in your new tenant.

## Typos or suggestions?

If you've found a typo, a sentence that could be improved or anything else that should be updated on this blog post, you can access it through a git repository and make a pull request. If you feel comfortable with github, instead of posting a comment, please go directly to https://github.com/campelo/documentation and open a new pull request with your changes.
Design Pattern React : The State Reducer
Tags: react, french, designpattern
Published: 2022-04-22 10:08:02

Pour ceux qui connaisse Redux, c'est le même principe, on a une action, un dispatch et un reduceur.

Pour mettre en application ce design pattern on va se servir du Hook useReducer et on va utiliser le 3eme argument du Hook pour mettre un peu de piment. Ce 3eme argument permet d'initier le state à partir d'une props.

`const [state, dispatch] = useReducer(reducer, initialArg, init);`

<br>
Pour ceux qui ne connaissent pas il y a 3 points clés: 

1/ Un objet js appelé "Action":

`const monAction = { type: 'add', payload: 3}`

C'est un objet javascript (tout simplement), qui va contenir par convention (issus de redux) deux propriétés:

- type: généralement un string et est obligatoire.
- paylod: ce qu'on veut et est facultatif.

2/ le dispatcher : dispatch()

C'est une function qui nous est donnée par le Hook useReducer.
Cette fonction va permet d'envoyer une action dans le reducer.

`dispatch({type: 'add', payload: 3})}`

3/ le reducer: reducer()

Le reducer, c'est une fonction qu'on doit être définis et qui va nous servir à modifier le state.
Dans mon exemple, je m'assure de retourner à chaque fois une nouvelle copie du state (redux).

Cette fonction prend en 1er argument le state et en 2eme argument notre fameuse action.
Le reducer, c'est tout simplement un switch qu'on va faire matcher avec notre action.type et on créer un nouveau state à partir de celui qu'on a passé en paramètre.

Et voilà :)

<br>
Implémentation:

Step 1: Initialisation du State

Pour commencer on va initialiser notre state : 
`useReducer(reducer, propsToInit, init);`

useReducer va utiliser la variable propsToInit et va la faire passer dans la fonction init

Step 2: Condition d'initialisation

<code>
const init = (initState) => {

  if (initState === null) return { ...defaultState };

  return { count: initState };
};
</code>

Notre function init est appelé une seul fois au montage du component. Elle va retourner notre state. 

Step 3: Utilisation du dispatch

La fonction useReducer, nous retourne une fonction dispatch.
`const [state, dispatch] = useReducer(reducer, propsToInit, init);`

Cette fonction va nous permettre de mettre à jours le state, en utilisant une action.

Step 4: Définition des Actions:

 `const actionAdd = {
  type: "add"
};`

Rien de compliqué ici, on déclare une constante pour stocker notre action.

Step 5: Mise à jour du state

Ensuite cette action passe dans le reducer, et on modifie le state.

Step 6: Affichage

Le component s'update et la nouvelle valeur s'affiche.


<br>
{% codesandbox p16r04 %}
Evitando unmute por engano no Zoom
Tags: macos, zoom, futureme
Published: 2022-04-22 10:06:45

Em geral quando estou em reuniões globais da empresa ([All Hands](https://blog.sli.do/what-is-an-all-hands-meeting-and-why-should-you-start-having-one/)) fico alternando entre janelas e não é incomum que por engano eu faça unmute do meu microfone.

Aquele desconforto de alguém desmutar no meio de uma fala importante da empresa gritando com o cachorro ou pedindo um café pro seu companheiro. 

Para evitar esse tipo de desconforto e, bom... evitar de passar vergonha, comecei a procurar alternativas para deixar o microfone impossibilitado de ser tirado do mudo.

Foi assim que cheguei à uma solução interessante. Instalar um driver de áudio virtual e usar ele como fonte de captação do microfone. Funciona como se fosse um microfone fantasma, que não consegue captar som algum.

Como utilizo macOS, estou utilizando o [SoundFlower](https://soundflower.softonic.com.br/mac).

Após sua instalação e ativação nas configurações de sistema. É possível usá-lo como saída de áudio:

![Barra de tarefas do macOS exibindo o relógio e a opção de saída de audio aberta. Nela é possível ver 2 canais de audio com o nome Soundflower](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mwu3x62oih34pyz22h4v.png)

Ou então como captação de áudio:
![janela de seleção de microfone no Zoom. A opção "Soundflower (64ch)" está selecionada](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qntdmdi7r7hwki5xpvet.png)
  
Então toda vez que entro em uma reunião global ou em alguma que tenho certeza que não vou precisar participar falando, eu troco a configuração do microfone para aquela chamada.
Animations with CSS and Vue transitions
Tags: animations, css, vue
Published: 2022-04-22 10:02:26

**How to implement slider and continuous [animations](https://blog.canopas.com/animations-in-jetpack-compose-with-examples-48307ba9dff1) in your website?**


In this blog post, you will learn how to implement slider and continuous animations in VueJs using transitions and CSS.

- If scroll down then animates them to left.
- If scroll up then, animates them to right.
- On hover of divisions, stop animation.

The full source code is available on [Github](https://github.com/canopas/canopas-website).

Check this blog post to add attractive [animations with CSS and Vue transitions](https://blog.canopas.com/animations-with-css-and-vue-transitions-fdb53dbb21e7).