teleren/devto huggingface dataset:
Flutter for React Native Developers |1| by Stefan Majiros
Tags: flutter, reactnative, mobile
Published: 2021-02-13 17:35:47

Content / What it about :

What is what in Flutter ? Things like pubspec.yaml, widgets, Dart. Dart and its similarity to Typescript, hot reload, type checking. Linters, addons and IDEs. Pub.dev, installing & hosting private packages. 

{% medium https://stefanmajiros.medium.com/flutter-for-react-native-developers-1-by-stefan-majiros-999ad2b0e05b %}
My Power Pack Goal for the next 7.5 months (roadmap😎👍)
Tags: beginners, help, roadmap, programming
Published: 2021-02-13 17:34:17

4 Months(DSA) + 3.5 Months(Competitive Programming)

DSA(4 months): 
      For the first 3 months, I learn DSA from GFG DSA paid Course by Sandeep Jain.

Striver's SDE Sheet(180 questions) link: https://docs.google.com/document/d/1SM92efk8oDl8nyVw8NHPnbGexTS9W-1gmTEYfEurLWQ/edit

I will do 2 Problems a day for 90 days from FEB 15/2021

Note: if u are following this roadmap then take the concept from the above 180 questions
  
Tip for Students like me in time management:
 In normal days do in (5.00 AM -> 8.30 AM) and (7 PM -> 10.30 PM)

For the next 1 Month, I will do Love Babbar Cracker Sheet(450 questions)

link for Love Babbar 450 sheet: https://drive.google.com/file/d/1FMdN_OCfOI0iAeDlqswCiC2DZzD4nPsb/view

I'm Going to do 14 questions a day for 30 days
                _____________________________

CP(3.5 months):
    
   love babbar Cp roadmap:
         https://whimsical.com/codeforces-candidate-master-roadmap-by-love-babbar-CiXPPD3CnwoXPr2d8Ajx1h

I am going to follow this roadmap for Cp

And while learning Algorithms for Cp I will practice in TUF CP LIST

TUF striver Cp list: https://docs.google.com/document/d/1vShwt8yXYUOgkF53-iYAuJXWR7Yi5VSJrW2xB49o0PM/edit

Tip: In this stage, I will read 1 interview experience in GFG a day daily to refresh DSA and do Leetcode random problems

That's it guys for the goal for the next 7.5 months. if u want to follow Me and my roadmap.. Like it  and Let's do it together 
I will Upload Post daily which describes what I learned that day
so u can also see my progress and for my consistency!!

Hope u like it and Peace✌✌✌
Animated Tab Bar
Tags: javascript, css, html, beginners
Published: 2021-02-13 17:33:57

<p>Designed by:  Mauricio Bucardo</p>

<p>Original image:
<a href="https://dribbble.com/shots/5619509-Animated-Tab-Bar" target="_blank">https://dribbble.com/shots/5619509-Animated-Tab-Bar</a></p>

<p>You can use this menu in your projects.
It also works with 100% width and reacts to changing the size of the window :)</p>

{% codepen https://codepen.io/abxlfazl/pen/VwKzaEm %}
Software AG Cumulocity IoT Platform Integration with Microsoft Teams
Tags: iot, integration, microsoft, teams
Published: 2021-10-06 15:08:06

---
title: Software AG Cumulocity IoT Platform Integration with Microsoft Teams
published: true
date: 2021-02-13 17:32:35 UTC
tags: #iot, #integration, #microsoft, #teams
canonical_url: https://tech.forums.softwareag.com/t/cumulocity-iot-platform-integration-with-microsoft-teams/238844/1
---

The **Internet of Things (IoT)** is an emerging paradigm that is transforming the traditional way of living into a high-tech lifestyle by enabling the communication between electronic devices and sensors through the internet to facilitate and ease our lives. With the increasing implementation of IoT, we can observe a great transformation in our daily routine.

**Cumulocity IoT** is an independent device and application management IoT platform. Some of the key features are:

- Connect devices, receive, and send data securely to the platform.
- Manage your devices, manage device onboarding, manage lifecycle like sending software updates and firmware updates.
- Support real-time streaming and predictive analytics and helps users to visualize results in very modern dashboards.
- It is also API enabled which allows you to integrate wide enterprise and enhance business process and business applications.

Using the Cumulocity IoT APIs, one can develop a simple application using Microsoft PowerApps and PowerAutomate and integrate only the required features of IoT platform with Microsoft Teams.

Microsoft [**PowerApps**](https://powerapps.microsoft.com/en-us/) is a tool that allows users to create custom applications and leverage multiple features of the Office 365 and Microsoft platform. The applications can be accessed via mobile devices or web browsers and can be added to Microsoft Teams for any channel. With various security measures in place, users with channel permissions can access these apps as well.

Login to the platform, monitor alarms and events, trigger operations are some of the use cases developed in this POC.

![c8ypng](https://aws1.discourse-cdn.com/techcommunity/optimized/2X/a/af6917c05970a56eb25cfbf49734827ebd18ff18_2_173x499.jpeg)

[Read full topic](https://tech.forums.softwareag.com/t/cumulocity-iot-platform-integration-with-microsoft-teams/238844/1)
100DaysOfCode challenge
Tags: 100daysofcode, kubernetes, microservices, docker
Published: 2021-02-13 17:31:29

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/enl1gbizlc7bthyuy5k9.png)
I’m publicly committing to the 100DaysOfCode Challenge starting today! I will be building an implementation of shortened URL in GO. A micro-services project using Docker and Kubernetes: https://github.com/MoatazBurhan/Grunderound

Learn More and Join me! hey @ka11away

https://100DaysOfCode.com #100DaysOfCode

I will use this space to publish my progress everyday.
Side-projects and time management
Tags: sideprojects, productivity
Published: 2021-02-13 17:25:19

As I wrote in [last weeks entry](https://dev.to/programmingdecoded/choosing-the-technology-for-my-new-side-project-55ha), I recently started working on a new side-project.

A lot of people apparently never complete their side-project. I think part of the reason is that they start off enthusiastically, but then lose interest. To complete a side-project one doesn't necessarily need to spend a lot of time on it, but one has to be consistent. That means, every week one spends some time working on it. It doesn't matter so much if it's every day or just on the weekend and for how long (although it's better to set aside a bigger chunk of time, e.g. an hour). What's important is that one tries to spend the same amount of time regularly. E.g. if I spend a lot of time during the Christmas break on it, but then leave it until I find a big chunk of time again, I'm unlikely to pick it up again, as I won't remember where I left off. Even if I regularly spend a little time on it, it's important that I note down where I left off so that I can immediately pick it up again. In fact, I find it helpful to leave it in a state that is a bit broken so that I can start off with fixing something.

Equally important to regularly setting aside a time for working on a project is to also set a maximum time I plan to work on it. This is because it's easy to get sucked into one's side-project and then not have time for other things (family, exercise, reading, etc.). This is even more important if one already spends the whole day sitting in front of the computer due to one's job. 

How much time do you spend on your side-project and how regularly do you work on it?
Add Network Restrictions to Azure App Services using Powershell 
Tags: powershell, azure, appservices
Published: 2021-02-13 17:04:19

Executing tasks directly in the Azure Portal sometimes needs more time than expected due to in some resources configuration parameters only can be set one by one.

This is the case when it is necessary to configure **network restrictions** to an App Service after it is deployed, you only can set 1 rule at a time.

[Azure Powershell](https://docs.microsoft.com/en-us/powershell/module/az.resourcegraph/?view=azps-5.5.0) provides cmdlets that help to manage our resources faster and effectively.

In this case, we will see how to configure in an App Service several network restriction rules when they belong to a different network segment using an Azure Powershell function.

#### Requierements

To start coding first we will need some information that will be used in our PowerShell runbook:

* The subscription name and tenant Id where our App Service is hosted
* The resources group that contains our App Service
* The App Service name

### Login

Connect to our Azure Account:

```PowerShell
$SubscriptionName = 'Your_Subscription_Name'
$TenantId = 'Your_Tenant_Id'

Connect-AzAccount -SubscriptionName $SubscriptionName -TenantId $TenantId
```
### Define Variables

Define the variables to pass to the function like the Resource Group, the App Service name, and the number of the priority we want to give to the first rule of the set we are creating.

```PowerShell
$ResourceGroup = "Resrouce_Group_Name"
$WebappName = "App_Service_Name"

$RuleName = 'Your_Rule_Name'
$RulePriority = 100

```

### Create the Function

To avoid executing many times the PowerShell runbook, we will create a buckle that will create the Network Restriction Rules in our App Service

```PowerShell
Function NetworkRestrictions ($IpAddress) 

{

[String]$IPAddress, 
[String]$ResourceGroup, 
[String]$WebappName, 
[String]$RuleName, 
[Int]$RulePriority

Add-AzWebAppAccessRestrictionRule -ResourceGroupName $ResourceGroup -WebAppName $WebappName   `
-Name $RuleName -Priority $RulePriority -Action Allow -IpAddress $IPAddress


} ('IP_1','IP_2','IP_3','IP_n') | foreach  {
NetworkRestrictions $_ 
$RulePriority++ 
} 


```

### Conclusion

* We are now able to create several Network Restrictions to an App Services instead of configuring one by one

* We will save time because set one rule at a time using  the Azure Portal will be slower

* We see how useful and powerful are the azure PowerShell modules.
Codewars-Binary addition
Tags: beginners, javascript, fundamentals, binary
Published: 2021-02-13 16:48:19

This challenge has the following instructions:

Adds two numbers together and returns their sum in binary. 
The binary number returned should be a string.

The first step is simply adding numbers to a sum, 
The second step here intoducing toString() method, what it does is passing in an value and convert it based on numeral system.

Let's look at some basic number systems:
1.Decimal number system (Base- 10)
2.Binary number system (Base- 2)
3.Octal number system (Base-8)
4.Hexadecimal number system (Base- 16)

In this case, the solution will be:
![image](https://dev-to-uploads.s3.amazonaws.com/i/k8ct2czt3nf3u6ispl5l.png)

Take it to the next level, using arrow function expression:
![image](https://dev-to-uploads.s3.amazonaws.com/i/772b6h5unui4m7f24e6v.png)
 
One thing to keep in mind is that, you can only pass in from range 2 through 36, otherwise [Range error] is thrown.

Happy coding!

Bonus challenge: How to convert your name into binary representation?  ʕ•́ᴥ•̀ʔっ
The address element
Tags: html
Published: 2021-02-13 16:41:54

Did you know there's an `address` element? Well, brace yourself, because there is! But its use has been a source of confusion until recently.

In the past, the `address` element was strictly used for content author info, something it's still useful for:

```html
<article>
  <!-- article content -->
  <footer>
    <p>Like my stuff? As the kids say, drop me a line via electronic mail:</p>
    <address>
      <a href="mailto:rick.cooldood78@example.com">Ricky Cooldood 😎</a>
    </address>
  </footer>
</article>
```

Note that this example has the `address` element nested within a sectioning element, in this case, an `article`. This is what associates the contact information with the content. If you wanted to associate it with the entire site, you would drop it into the site's main `footer`.

Of course, you would think that you could use an `address` element for addresses as well, but that has not always been the case. Thankfully, a recent [change in spec](https://www.w3.org/TR/html52/grouping-content.html#the-address-element) allows for the one thing you would think it could be used for:

```html
<address>
  Richard Cooldood<br>
  1234 No Way Yes Way<br>
  Awesome, USA 77777
</address>
```

This makes me incredibly happy. Probably too happy. 

Anyway, if you need more granular semantics around an address, you can use a structured data format like [Microdata or RDFa](https://schema.org/address).

If you'd like to hear more about structured data, [let me know](https://twitter.com/therealboone), and while you're at it, hit the follow button, because I'm going to keep writing stuff and you might as well read it, right?
Do you even Refactor? 002
Tags: codenewbie, beginners, python, algorithms
Published: 2021-02-13 16:29:43

Code refactoring is crucial but often overlooked. It can improve the design and performance of existing code.

The Python code below takes about 17 seconds to complete. Refactor the `getData` function to make it run in less than 5 seconds. Post your answer in the comments.

```py
import time

def getData():
  arr = [5] * 1000 * 1000 * 100
  for i in range(1, len(arr)):
    if i % 5 == 0:
      arr[i] = 0
  return arr

def timed(func):
  def run():
    Tstart = time.time()
    func()  
    Tend = time.time()
    Tdt = round(Tend - Tstart, 2)
    print(Tdt, 'seconds')
  return run

@timed
def main():
  data = getData()
  print('len:', len(data), 'sum:', sum(data))

main()
```
Day 39 :100DaysOfCode
Tags: 100daysofcode, programming, productivity
Published: 2021-02-13 15:27:02

gave div2 contest on codeforces (solved 1 only :(-)
...
studied subset sum in dp and dutch national flag problem...
leetcode easy on strings...(just a few)


will be trying to solve more ques on codechef feb long..
over with sem exams.   :)


customized my terminal in breaks>>>> EOD.

You can Follow me->
https://github.com/singhtaran1005
https://www.linkedin.com/in/taranpreet-singh-chabbra-27517918a/
Decrypt Weblogic Console Password using wlst
Published: 2021-02-13 16:13:56

If you have forgotten the console password or any other password for the domain, you can use below wlst commands to decrypt the passwords

* 1 – Note down below two values:

Domain Location
Encrypted password which you want to decrypt
* 2 – Invoke wlst & run below commands:

```
wls:/offline> domain ="/home/weblogic/Oracle/Middleware/Oracle_Home/user_projects/domains/train_domain/"
wls:/offline> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
wls:/offline> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
print encryption.decrypt("{AES}CFbYgsg8ktBwkzi0llxCYrC3wLN6qDCaOJHfEyOL47w")
```

_PS : I had to remove a trailing “\” from the encrypted password in last_

For more detailed version: [Link] (https://devops.egyan.space/decrypt-weblogic-console-password-using-wlst/)
Clone github repos in parallel
Tags: github, parallel, git, linux
Published: 2021-02-13 16:10:18

It is possible to clone a list of github repositories in parallel.

Given that the file is called `your_organization.txt`.

```shell
cd ~/github-orgs/your-organization
cat your_organization.txt | parallel  -j 25 'clone-missing.sh {}; echo job {#} completed {};'
```

You can generate a list of repositories of a github user or a github organization with these helper scripts:

- [github-print-organization-repos.sh](https://github.com/joaovitor/parallel_commands/blob/master/bin/github-print-organization-repos.sh)
- [github-print-user-repos.sh](https://github.com/joaovitor/parallel_commands/blob/master/bin/github-print-organization-repos.sh)
Log all Prime Numbers till `n` using Javascript Generators
Tags: webdev, programming, javascript, 100daysofcode
Published: 2021-02-13 19:11:22

---
title: Log all Prime Numbers till `n` using Javascript Generators
published: true
date: 2021-02-13 15:26:05 UTC
tags: webdev,programming,javascript,100daysofcode
canonical_url: https://medium.com/@isantoshv/log-all-prime-numbers-until-n-using-javascript-generators-461976e27e0a
---

![](https://cdn-images-1.medium.com/max/1024/1*6H1M7BTSwWE2YtFYrCD_MQ.jpeg)<figcaption>Photo by <a href="https://unsplash.com/@fredmarriage?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">freddie marriage</a> on <a href="https://unsplash.com/s/photos/infinity?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption>

I was interviewing with few companies a couple of months back for a Frontend/Fullstack position. One of the most interesting questions I faced in one of the coding exams was to `Write a function in JavaScript that takes an input 'n' and return all the prime numbers until 'n'`. The question is simple and straight forward as you see it.

I quickly wrote the following code and it worked perfectly!

{% gist https://gist.github.com/devcer/1fdc8980966b4e81f7ccc89664730391 %}

BOOM! I’m done. I felt happy and ran the test cases. Of course, they failed. *Happiness is a myth in Javascript*. There was a trick here and this was the provided main method that calls my function…

```
function main() {
  const primeNumberGenerator = getAllPrimeNumbers(23);
  let primeNumber;
  while ((primeNumber = primeNumberGenerator.next().value) !== undefined) {
    console.log(primeNumber);
  }
}
```

I observed some new keywords like `next()`, I remember to have seen something similar to this in `RxJS` but this was a pure Javascript code so this should mean something different. I googled and found something new in Javascript that I have rarely used/heard before - `Generators in Javascript`. It was a timed test, so I quickly read through articles, examples and fixed my code.

{% gist https://gist.github.com/devcer/678c732616f49bf7a70f5da171653b2f %}

It worked and all tests passed!

```
Generators can return (“yield”) multiple values, one after another, on-demand. They work great with [iterables](https://javascript.info/iterable), allowing to create data streams with ease.
```

I don’t want to talk more about generators as there are better articles that do this. I have attached a few at the end that helped me in this course of learning.

This was one of the most interesting things I got to solve as part of the interviews. I wrote code to solve a simple problem but with lazy evaluation and memory efficiency. This was fun.

Few Articles that helped me to quickly understand Generators and Iterators -

- [https://javascript.info/generators](https://javascript.info/generators)
- [https://codeburst.io/understanding-generators-in-es6-javascript-with-examples-6728834016d5](https://codeburst.io/understanding-generators-in-es6-javascript-with-examples-6728834016d5)

I hope this was helpful to you to explore how we can use generators in our everyday code.
Clone azure repos in parallel
Tags: azure, git, parallel, linux
Published: 2021-02-13 16:01:04

Azure repos are hosted inside devops projects.

You can list azure projects with

```shell
az devops project list --detect true
```

To list repositories in azure from one specific *az devops project*

```shell
az repos list --project project_id
```

To grab the repo list from multiple projects in parallel and save it to a file:

```shell
org=$(basename $(pwd)); az devops project list --detect true | jq -r '.value[]|.id' | parallel -j 10 "az repos list --project {} | jq -r '.[]|.sshUrl'" | tee ${org}.txt
```

As the repo ssh url is different from the github one the clone-missing.sh script had to be changed in a not compatible way.

## Difference

github ssh url: `git@github.com:${githuborg}/${repo}.git`
azure repo url: `git@ssh.dev.azure.com:v3/${devopsorg}/${devopsproject}/${repo}`

New `azure-clone-missing.sh` command added to the parallel_commands to handle this url difference.

## Cloning azure repositories in parallel

Given that you created the org.txt file the command below clones only the missing repositories.

```shell
cd ~/azure-orgs/azuredevopsorg/
org=$(basename $(pwd)); cat ${org}.txt | parallel  -j 25 'azure-clone-missing.sh {}; echo job {#} completed {};'
```

If you want to exclude some repositories from your clone.

*PS* change the regex that excludes the repo.
`grep -Ev '(repo1|repo2)' ${org}.txt`

```shell
cd ~/azure-orgs/azuredevopsorg/
org=$(basename $(pwd)); grep -Ev '(repo1|repo2)' ${org}.txt | parallel  -j 25 'azure-clone-missing.sh {}; echo job {#} completed {};'
```

## Documentation reference

- [az repos list
](https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/repos?view=azure-cli-)

- [az devops project list
](https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/devops/project?view=azure-cli-latest#ext_azure_devops_az_devops_project_listlatest#ext_azure_devops_az_repos_list)

- [gnu-parallel](https://www.gnu.org/software/parallel/)

- [azure-clone-missing.sh](https://github.com/joaovitor/parallel_commands/blob/master/bin/azure-clone-missing.sh)
What's the difference between map() and forEach() in JS?
Tags: javascript, webdev, beginners
Published: 2021-02-13 16:00:03

Arrays are super useful and widely used data structures. It also has a ton of different functions which can make our work so much easier. The functions that many people get confused about is `map()` and `forEach()` and it's reasonable both do almost the same thing. I personally made this mistake so many times when I was a beginner. The similarity is- that they both run a function or a piece of code for each of the element of the array. But `forEach()` does not return any new array. It just runs the code for the elements. `map()` on the other hand returns a new array with the result. Hope this helped. 

Thanks for reading.
Week 1 of Major League Hacking Externship
Published: 2021-02-13 15:47:21

I completed my first week in Major League Hackings Externship program! During the first week, I met my team, met our client, and received the first challenge. The challenge was a hackathon. Tasked to build a full-stack application with my team due at the end of the week. The project for our client is to build a Learning Management System so we decided to build something similar. 

Anxious, I took the initiative to start the conversation about each member's specialty and what our tech stack will be. We decided our stack would be a Flask API and React UI. First, we sketched out the models, relationships, and endpoints needed for the API. Teammate 1 was tasked to build the backend. Teammate 2 was tasked to build the frontend. I was to jump between when needed. I helped build the profile page on the frontend. Once the backend was done, I created the fetches for our application. 

Not only was this my first week in the externship but this was my first time building on a team of three. Two main issues I had were, trusting my team and Git. The first issue, I wasn't sure if my teammate could build an API because some terminology was lost on him during our initial sketch of the backend. He mentioned he was fairly new to hacking but he took a course for building backends with Python. I decided to trust him and I am glad I did because he built an API we could use. The second issue, Git, I thought I had git in the bag. I did not. So, I learned I can not work on two different git branches at the same time. Also, all ways git pull to update your local repository to match the remote repository.
Angular Material Background Color Change On Button Click
Tags: css, html, angular, javascript
Published: 2021-02-13 15:46:25

Change background colors using button click with the help of ngClass in angular. Its is easy to make this with different function on button clicks. Here we make this in angular material with buttons and forms.

To make background color change on click we use CSS classes of background-color properties. Also, we used string values to make this changeable values with the help of functions.

Make it yours now by using it, downloading it and please share it. we will design more elements for you.

[Source Code] (https://w3hubs.com/angular-material-background-color-change-on-button-click/)