teleren/devto huggingface dataset:
User Roles and Permissions in Laravel 5.8
Tags: laravel
Published: 2019-09-17 08:33:24

Everyone can seen here:[User Roles & Permissions in Laravel 5.8](https://hoanguyenit.com/user-roles-and-permissions-in-laravel-58.html)

![User Roles & Permissions in Laravel 5.8](https://thepracticaldev.s3.amazonaws.com/i/bxoi39y38a8ri8ec4pfg.png)
100 Days - 100 Projects Challenge
Tags: developer, challenge, 100days100projects
Published: 2019-09-17 08:22:26

---
title: 100 Days - 100 Projects Challenge
published: true
description: The complete guide of the 100 Days - 100 Projects
tags: developer, challenge, 100days100projects
cover_image: https://www.florin-pop.com/static/a84a6e193fd98c8fe0d817e1cf54a8e1/ff993/100-days-100-projects.png
---

The past couple of months I found out something really important about myself. It turns out that I really, REALLY love challenges! So I came up with a new challenge to push my limits even further!

I'm calling the challenge: **100 Days - 100 Projects** and the purpose is to build 100 projects in 100 days or 1 project / day (pretty obvious, right?). 
Think of it as the next step if you ever participated in the **#100DaysOfCode** challenge.

You can read more about the challenge, its purpose, rules and variations in [The Complete Guide](https://www.florin-pop.com/blog/2019/09/100-days-100-projects).

I'm planning to start the challenge today (17th September 2019) and anyone is welcome to join! :smiley: 
You can even join the discord server if you want to be closer to me and the other participants - the support group!

You'll be able to see my progress if you follow me on [Twitter](https://twitter.com/florinpop1705) or check the **#100Days100Projects** hashtag. 

Come and support us when our motivation will drop! :smile:

If you have any questions, feel free to [contact me](https://florin-pop.com/contact).
PyCon Resources
Tags: azure, raspberrypi, machinelearning
Published: 2019-09-17 08:08:33

---
title: PyCon Resources
published: true
description: 
tags: Azure, RaspberryPi, MachineLearning
---

## Powerpoint Slides

- [Presentation (Mandarin)](https://microsoftapc-my.sharepoint.com/:p:/g/personal/dglover_microsoft_com/EQKN-2BQCRRHjMaIgQHFEIYBwAqrM9OEggAGd7bhRp6Axw?e=cmMVfE)
- [Presentation (English)](https://1drv.ms/p/s!AoksQQquzfG6hcFBqMPooHXaOLWEKg?e=e1sSyk)

## Vision Impaired Shopping Solution

- [Vision Impaired Shopping Solution on GitHub](https://github.com/gloveboxes/Creating-an-image-recognition-solution-with-Azure-IoT-Edge-and-Azure-Cognitive-Services)

## Resources

- [Create your first Python function in Azure](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python?WT.mc_id=pycon-blog-dglover)
- [Azure Custom Vision AI](Azure Custom Vision AI)
- [https://devblogs.microsoft.com/python](https://devblogs.microsoft.com/python?WT.mc_id=pycon-blog-dglover)

- [Azure Functions Python Worker](https://github.com/Azure/azure-functions-python-worker)
- [Deploy Azure IoT Edge modules with Azure CLI](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-deploy-modules-cli?WT.mc_id=pycon-blog-dglover)
- [https://azure.microsoft.com/en-au/try/cosmosdb](https://azure.microsoft.com/en-au/try/cosmosdb?WT.mc_id=pycon-blog-dglover)
React Blink Component
Tags: react, component, blink
Published: 2019-09-17 08:05:29

---
title: React Blink Component
published: true
description: React Reusable blink component for any html tags
tags: React, Component, Blink
---

# React Blink 

This reusable React component will manage to blink any text and changing the text color and font size if we need.

Blink takes plain HTML tags and outputs plain HTML tags. It's dead simple, and React beginner friendly.

## Example 

```
import React, { Component } from "react";
import Blink from 'react-blink-text';

class Application extends Component {
  render() {
    return (
      <div className="Application">
        <Blink color='blue' text='TestReactApp' fontSize='20'>
          Testing the Blink
        </Blink> 
      </div>
    );
  }
}
export default Application;
```

## Features
1. Supports all html tags : H1, H2, h3,..,etc., Span, Div, A Href tag.
2. Supports all different types of colors
3. Supports server-side rendering.

## Installation

### Yarn:
```
yarn add react-blink-text
```

### Npm:
```
npm install --save react-blink-text
```

## Repo Link:

Link : https://github.com/10secondsofcode/react-blink-text
Create Issue : https://github.com/10secondsofcode/react-blink-text/issues/new
Bubble Sort in Java
Tags: bubblesort, tutorial, algorithms, sortingalgorithm
Published: 2019-09-17 08:04:18

Bubble sort is one of the simplest sorting algorithms and really intuitive to understand. We compare adjacent elements and see if their order is wrong (a[i] > a[j] for 1 <= i < j <= size of array; if array is to be in ascending order, and vice-versa). If yes, then swap them.


```
Implementation of Bubble Sort in Java:
import java.util.Scanner;
class BubbleSort {
  public static void main(String []args) {
    int n;
    Scanner in = new Scanner(System.in);
 System.out.println("Input number of integers to sort");
    n = in.nextInt();
    int array[] = new int[n];
     System.out.println("Enter " + n + " integers");
     for (int i = 0; i < n; i++)
      array[i] = in.nextInt();
   
    for (int i = 0; i < n - 1; i++) {
   Boolean swapped = false;
      for (int j = 0; j < n - i - 1; j++) {
        if (array[j] > array[j+1]) /* For descending order use < */
        {
          int temp = array[j];
          array[j]= array[j+1];
          array[j+1] = temp;

      swapped = true;
        }
      }
   if(!swapped)
      break;
   } 
System.out.println("Sorted list of numbers:");
for (int i = 0; i < n; i++)
System.out.println(array[i]);
  }
}
```

Orignally posted on [interviewbit](https://www.interviewbit.com/tutorial/bubble-sort/).
Favorite song to listen while you code?
Tags: productivity, discuss, code, work
Published: 2019-09-17 07:02:21

I would love to see what other developers listen while they code. I may steal a few names and add them to my playlist😝. 🎶🎵🎧.

The rule... only post ONE song in the comments.

I will add them to a list in this post and I will create a Spotify playlist as well to share with y'all.


Based on comments here and twitter:

1.-  Fast Forward by Quantum Dot.
2.-  Tool by Lateralus
3.-  Illenium by Leaving
4.-  All Due Respect by Run The Jewels
5.-  Boot by the algorithm
6.-  Vow by Make Me Young
7.-  Halcyon on and on by Orbital
8.-  Feng Suave by Noche Escura
9.-  Chillmix Music to work by deadmau5 on SoundCloud
10.- When a demon defiles a witch by Whitechapel
11.- Matrix Reloaded soundtrack 
12.- Finally - Phil Collins
13.- Destiny by Neffex
14.-  The Mission by Jail Job Eve
15.- The Dark Knight soundtrack
16.- Interstellar Sountrack
17.- Aruarian Dance by Nujabes
18.- Midnight by Coldplay
19.- faradenza
20.- Moon Boots by The Life Aquatic
21.- Way Out West by Domination
22.- Work by Iggy Azalea
23.- Hans Zimmer by S.T.A.Y.
24.- TwentyThree by Carbon Based Lifeforms
25.- Gosh - Jamie xx
26.- Anjunadeep mix by Yotto, Luttrell, Lane 8, Andrew Bayer
27.- Celtic music by Adrian von Ziegler:
28.- Four Seasons by Vivaldi
29.- Pleiadian Friend
30.- Lateralus by Tool
31.- Noche Escura by Feng Suave
32.- Halcyon on and on by Orbital
33.- Make Me Young by Vow 
33.- All Due Respect by Run The Jewels
34.- Way Out West by Domination
35.- Faradenza
36.- Coldplay by Midnight
37.- Its the end of the world as we know it (and I feel fine) by R.E.M.
38.- Prelude to War from the Battlestar Galactica Season 2 Soundtrack
39.- Build Our Machine by DAGames
40.- Silence by None
41.- False God by Taylor Swift
42.- Wir können nix dafür by Moritz Krämer
43.- Work by Iggy Azalea
44.- Moon Boots by The Life Aquatic



<img src="https://thepracticaldev.s3.amazonaws.com/i/5a87eog40zvcsimuaew4.png" />
Difference between varchar, nvarchar in sql server ?
Tags: sql, database, bestpractice, datatype
Published: 2019-09-17 07:01:23

In this article i will differentiate between varchar, nvarchar data type.

About the Varchar: 
1. It is a variable that has a length data type.
2. It is use to store non-Unicode characters.
3. It Occupy 1 byte of space for each character.
 
example :
         DECLARE @name VARCHAR(20)  
         SET @name = 'Rizwan'  
         SELECT @name AS 'Name', DATALENGTH(@name) AS 'Occupied Length' , 
         LEN(@name) AS 'Name Length'
Result : Name	  Occupied Length	Length
         Rizwan	  6(6*1 byte=6bytes)	6 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/pvydum30l3w5pinf13b8.png)
---------------------------------------------------------------------------------
About the NVARCHAR data:
1. It is a variable that has length data type.
2. It is use to store Unicode characters.
3. It Occupy 2 bytes of space for each character.

example :
         DECLARE @name NVARCHAR(20)  
         SET @name = 'Rizwan'  
         SELECT @name AS 'Name', DATALENGTH(@name) AS 'Occupied Length' , 
         LEN(@name) AS 'Name Length'
Result : Name	  Occupied Length	 Length
         Rizwan	  12(6*2 byte=12 bytes)	 6 

 ![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/le97yeeby0w8ofi7z2ho.png)

Conclusion

This tiny article is just to make you aware of the basic differences between the  VARCHAR and NVARCHAR data types they are used to store characters, numbers or special characters. 
This is my first article
I hope you all will like and that will be helpful to you most of developers confuse about varchar ,nvarchar when we should use varchar,nvarchar. 
Please Leave your comments about your opinion good or bad.
Sharing is caring :)
Howto: Drop-down list with Gitlab projects in Jenkins if you have more them 99 projects in namespace
Tags: jenkins, gitlab, howto, regex
Published: 2019-09-17 06:57:07

In the previous receipt about Drop-down list for values we learned how-to choice any component from Jira. But in Jira ofteт isn't need in real life for development process.
At this receipt I've tell about how to create drop-down list for choosing projects's names by regex from Gitlab via API.

Prerequisites:
- [Active Choices plugin](https://wiki.jenkins.io/display/JENKINS/Active+Choices+Plugin)
- Gitlab token for API

Step 1: In job configuration add parameter Active Choice Reactive Parameter

Step 2: Set name for your parameter (for example COMPONENT)

Step 3: Select Groovy script and add next groovy-code

```groovy
import groovy.json.JsonSlurperClassic
import java.util.regex.*
  
def projectNamespace = JIRA_PROJECT.toLowerCase()
def regexLine = "^((${projectNamespace}-(int|sys|service|bpl|pl|stp|tst)-([a-z,0-9,-]*)))"

def gitlabUrl = "https://gitlab.domain.org"
def gitlabApiToken = "secretToken"
  
def page = 1
def perPage = 64

def data = []
def list = []

while (true) {  
  paging = "&per_page=${perPage}&page=${page}"
  url = "curl -k -H PRIVATE-TOKEN:${gitlabApiToken} ${gitlabUrl}/api/v4/projects?search=${projectNamespace}-${paging}"
  json = url.execute().text.replaceAll("\r\n", "")
  data = new JsonSlurperClassic().parseText(json)
  if( data == [] ) { break }  
  data.each { project ->
    def projectMatcher = (project.name =~ regexLine)    
    if(projectMatcher.count && project.namespace.path == projectNamespace) {
      list += project.name
    }
  }
  page++
}


return list.sort()
```
When SOME or EVERY things matters.
Tags: javascript
Published: 2019-09-17 06:55:37

Ever since the arrow operators (=>) arrived in the javascript, Higher Order Functions (HOF) have gained a lot of popularity among the javascript developers. HOF operations such as forEach(), filter(), map(), reduce(), are the most common HOF among developers. These HOF are so much popular among developers such that they are adapted to many other programming languages as-well. 

But do you know there are other functions released by ECMA as of 2015 which are still rarely used such as every() and some(), which are of great use.

Recently I came across a problem where I had to return TRUE value if there was a single value greater than 20 in an array (CONDITION) 🧐.

At a glance, what I thought was I need a FLAG 🏁 that will have a default value FALSE. Then, run the loop on array that checks the condition with every value and BREAK the loop when condition is matched.

```
let data = [ 1, 2, 3, 4, 5, 6, 22 ]
let flag = false

for(let i = 0; i <= data.length; i++){
    if(data[i] > 20){
        flag = true
        break
    }
}

if(flag){
    console.log('Above array contains numbers greater than 20.')
}else{
    console.log('Above array does not contain numbers greater than 20.')
}

\\********result**********
\\Above array contains numbers greater than 20.

```

It is readable but I thought what if I could make codes smaller, what if there was already a function for this in 'loadash' (which was already there in my project). But while researching about these functions I found out about these cool functions some() and every() which were already there as Array operations from way back.

So, the code above became:

```
let data = [1,2,3,4,5,6,22]
let flag = data.some( value => value > 20)

if(flag){
    console.log('Above array contains numbers greater than 20.')
}else{
    console.log('Above array does not contain numbers greater than 20.')
}

\\******** Result **********
\\Above array contains numbers greater than 20.

```

Woooooaaaaahh... it just blew my mind 🤯🤯🤯🤯

Then there was another function which had similar function, every().
While some() checks for any one value in the array to meet the condition, every() checks for all the value in the array to meet the condition.

```
let data = [ 22, 23, 3, 4, 5, 6]
let flag = data.every( value => value > 20)

if(flag){
    console.log('All the numbers in above array are greater than 20.')
}else{
    console.log('Not all the numbers in above array are greater than 20.')
}

//******* Result ***********
//Not all the numbers in above array are greater than 20.
```

Here are some reference to [some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) and [every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every)

That's it for today, So Did you find this blog post helpful? 🤞


P.S. It is my first article on the web 🤓
Top 8 AI Chatbot Building Platforms
Published: 2019-09-17 06:30:57

<H2>Best Chatbot Platforms in the Market</H2>

Here is a list of some of the <a href=https://blog.kore.ai/a-complete-guide-to-chatbots> best chatbot </a> platforms to build a chatbot:

1. Chatfuel - The platform provides features like adding content cards and gathering information via forms inside Messenger chats and letting users interact with the bot via buttons.

2. Kore.ai - The bots platform provides a complete development toolkit to build and manage a bot without having to build a backend service for the bot.

3. Motion AI - The platform is to train, build and deploy chatbots on FB messenger, slack or on your website. It lets you diagram your conversation flow and have a visual overview of the outcomes of a bot query.

4. BotKit - Includes Botkit Studio, tools, a core library, and plugins to extend the capabilities of the bot built.

5. IBM Watson- The omnichannel and tone analyzer bot platform where you can build a chatbot without writing the code. It is the pioneer in the fields of Artificial Intelligence, Machine learning, and Natural Language Processing & reasoning.

6. Microsoft Bot Framework - The bot platform features a streamlined process of chatbot building. The platform environment is structured with SDKs and a bot connector for building intelligent bots. The most interesting feature of it is pre-existing entities in order to build smart bots.

7. Botsify - Botsify offers no coding platform including drag and drops design and in-app integration.

8. Flow XO - The chatbot platform that lets you create a bot without any coding with 100 integration options. The platform also comes with pre-built templates for an easy and quick start.
Minha semana: Os melhores vídeos Serverless
Tags: ptbr, serverless, aws, webdev
Published: 2019-09-17 05:28:51

[_Créditos Imagem_](https://unsplash.com/photos/18mUXUS8ksI)

Meu consumo de conteúdo é bem variado durante a semana. Livros, livros em aúdio, vídeos, tutoriais e alguns [cursos de longa duração](https://www.edx.org/school/aws), sempre estão no meu [**Pocket**](https://getpocket.com/).

As vezes ajudo os integrantes da minha equipe e empresa, revisando conteúdo e recomendando caminhos de aprendizado. Por causa disso, resolvi começar a divulgar semanalmente o que tem me chamado a atenção pessoalmente e no ambiente de trabalho.

Acabei criando mais um boletim de notícia, na qual vou começar a enviar conteúdo personalizado para quem estiver lá ou simplesmente para mim mesmo, pois até o momento escrevo/traduzo conteúdo como um passatempo. Se quiser mais um email para deletar na sua caixa de entrada, se inscreve por lá:

[![Imagem da tela do website do boletim de notícias do Eduardo Rabelo](https://thepracticaldev.s3.amazonaws.com/i/65qk59z2wp9yricldzcn.png)](https://relentless-maker-801.ck.page/c6d617a2d4)

---

Abaixo uma lista bem interessante de vídeos para você se divertir no seu tempo livre.

- [Fast, Cheap & Global React Apps via Serverless Framework Components (Video)](https://serverless.com/blog/react-apps-with-serverless-components/?utm_source=newsletter&utm_medium=email&utm_content=oieduardorabelo&utm_campaign=oieduardorabelo-devto): Um ótimo artigo/vídeo tutorial para criar aplicações React utilizando Serverless Framework Components
{% youtube ts26BVuX3j0 %}
- [Creating a Python Lambda Function](https://www.youtube.com/watch?v=FbMX5a6j6vY)
{% youtube FbMX5a6j6vY %}
- [Using Lambda Functions With NodeJS](https://www.youtube.com/watch?v=4ZyicyDpqE0)
{% youtube 4ZyicyDpqE0 %}
- [AWS Lambda for Java - Deploying a function](https://www.youtube.com/watch?v=abZYbBr1DNc)
{% youtube abZYbBr1DNc %}
- [Building a messaging system with SNS and Lambda](https://www.youtube.com/watch?v=S8uczd9uUnM)
{% youtube S8uczd9uUnM %}
- [Creating a API with Lambda](https://www.youtube.com/watch?v=4_WI8ZGIcXY)
{% youtube 4_WI8ZGIcXY %}
Simple way to get all values from hash
Tags: ruby
Published: 2019-09-17 05:28:51

In the ruby from the box, we can't find all the hash values if it's nested. 
I suggest an easy way to find all the values using recursion.

Example hash:
```ruby
hash = {
  a: 2,
  b: { c: 3, d: 4, e: {f: 5}}
}
```
```bash
> hash.values
=> [2, {:c=>3, :d=>4, :e=>{:f=>5}}]
```

That's not an option, we need all the values.
```ruby
def deep_values(array = [], object:)
  object.each do |_key, value|
    if value.is_a?(Hash)
      deep_values(array, object: value)
    else
      array << value
    end
  end
  array
end

> deep_values(object: hash)
=> [2, 3, 4, 5]
```

If you run the benchmark with this data, we get the following data: 
```ruby
>  puts Benchmark.measure { 100_000.times { hash.values } }
=> 0.028920   0.002643   0.031563 (  0.032759)

>  puts Benchmark.measure { 100_000.times { deep_values(object: hash ) } }
=> 0.140439   0.003318   0.143757 (  0.146637)
```
Do Good Daily Day 5
Tags: swift, swiftui, ios
Published: 2019-09-17 05:03:09

📅 09/16/2019
🔥 5 day streak
📱 Do Good Daily
💰 $0.99 price
🤑 0 sales
⌚️ 5 hours spent
💻 8 files changed, 53 additions(+), 9 deletions(-)
✅ Today's goal: Finish two intro views

## SwiftUI is fast

Xcode swiftUI previews weren't working an hour ago, of course. Then I decided to do something crazy and restart my mac and POW 💥 they started working again. From this point it was like I reached the [ballmer peak](https://www.xkcd.com/323/) and the code flowed from my fingertips like lava flows down a raging volcano 🌋.

I'm tired and delirious, don't judge me. But feel free to go ahead and judge these latest views I coded up:

![eyeball with rays coming down and "do good daily" text along with continue button finally at the bottom of the screen shows the text designed by skyler westby and developed by sean walker](https://i.imgur.com/WHulKTq.png)

![showing the text Do Good Daily was created to help you live intentionally. It is based on Benjamin Franklin’s daily schedule and a picture of ben franklin's schedule with the text "what good shall I do today" and a continue button at the bottom](https://i.imgur.com/Dk0GcvP.png)
What is Imposter Syndrome
Published: 2019-09-18 12:01:47

---
title: What is Imposter Syndrome
published: true
tags: 
canonical_url: https://flaviocopes.com/imposter-syndrome/
---

Every person, sooner or later, is going to suffer from this thing which we label “imposter syndrome”.

You might have this feeling now, but you don’t know that it has a name attached.

Let me describe some situations where you might find imposter syndrome in the wild.

1. You are a developer, have no Computer Science degree, and you feel people that got the CS degree know a lot more than you, and you should get one too in order to be called a developer too
2. You work on a project and you call it a little side project, not a real project, because - you know - it’s just a simple app
3. You constantly belittle yourself, and have low confidence in your abilities
4. You think other developers know a lot more than you do.
5. You think some day someone will find out what you are not worth your job position, as you can’t solve the coding interview quiz #423 on a random book
6. You think you don’t belong to the “coder’s club”
7. You’d like to start blogging but you fear other’s opinions and even think that you can’t add anything new to the table, so you don’t even start

I know these examples because I have people emailing me those very specific issues.

Now sometimes I think the solution is to tell you

- everyone’s winging it
- no one really knows what they are doing
- people you look up to like to show themselves as overconfident publicly, but under the hoods they’re not really like that
- things will always be like this

But this is still very self-deprecating.

The real response to all this thinking is to realize how far you went from when you started.

Look back.

There was a day when you could not even figure out how to start the computer. What code even _was_. You didn’t know you could actually create programs and make the computer do what you want.

Look at you now.

You are the best version of yourself and yet you are perfectly sure that tomorrow you’ll be an even better version.

You are improving. Just like your code.

But you know you are not _perfect_ at your craft, and I think that this is a feeling that might never go away. After all programming is such an enormous field.

And we all know that person that is very overconfident, and will deprecate others just because they don’t know that specific thing they happen to know a lot about… well, don’t be that person.

Find your sweet spot.

I’m sure you’ll even get better at your craft if you start believing more that _you were made for it_.

The hardest part of solving a bug is identifying that bug. The rest comes easier.
Amplify private npm repository
Tags: amplify, gatsby, npm, monorepo
Published: 2019-09-17 03:34:22

```yml
publicversion: 0.1
frontend:
  phases:
    preBuild:
      commands:
        # Monorepo going in gatsby directory
        - cd gatsby
        # Can use $VERSION_NODE_10/$VERSION_NODE_8
        - nvm use $VERSION_NODE_12
        - npx npm-cli-login -u $NPM_USER -p $NPM_PASS -e $NPM_EMAIL -r $NPM_REG
        - npm config set always-auth true
        - npm config set registry=$NPM_REG
        - yarn

    build:
      commands:
        # Can use $VERSION_NODE_10/$VERSION_NODE_8
        - nvm use $VERSION_NODE_12
        - yarn run build
  artifacts:
    baseDirectory: gatsby/public
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*


```