teleren/devto huggingface dataset:
successfully completed Hacktoberfest2020! 🥳🥳
Tags: hacktoberfest
Published: 2020-11-12 03:55:51

✨Hello guys happy to share with you that I successfully completed the challenge! ✨

So this Manal BENCHRIF future engineer in SI & Big data. 2020 was my first years with open source. During this year I create my first github account , contribute and discover DEV community.

I'm not new in coding, but I'm new in open source .It's a little weird, I know hahaha

Thank to Hacktoberfest I made my first contribution, then second, 3,4... of course in future I will contribute more and more

First, I contribute in a basic project. To learn how to merge... then I contribute in a website, an html page...

Frankly Hacktoberfest was a great experience for me. And of course I will participate next year and help people to participate too.
Anyone else work inside VR during their remote work?
Tags: discuss, wfh, virtualreality, immersedvr
Published: 2020-11-12 03:34:13

---
title: Anyone else work inside VR during their remote work?
published: true
description: 
tags: discuss,wfh,virtualreality,immersedvr
cover_image: https://cdn.nextgov.com/media/img/upload/2020/03/18/NGvr20200318/route-fifty-lead-image.jpg
---
After recently purchasing an Oculus Quest 2, I have taken to using [Immersed VR](https://immersedvr.com/) during my daily wfh routine. Just wanted to see if anyone else out there did something similar? I have found that it helps me focus, and **almost** feels like I'm getting out of the house xD
Random Number Generation in JS
Tags: javascript, node, algorithms
Published: 2020-11-12 03:11:25

Here we will be generating the random number of 9 digits using JS.
```javascript
function getRandom(length) {

return Math.floor(Math.pow(10, length-1) + Math.random() * 9 * Math.pow(10, length-1));

}
getRandom(9)
```
Output:
```javascript
234664534
```
The core of graphic design(my modest experience)
Tags: design, devops
Published: 2020-11-12 02:31:09


Graphic design can be found nowhere ... in the media, articles, posts, billboards, applications ...

Maybe for a few it's just typography of shapes in general a design ... but the core of graphic design goes beyond this superficial vision.



The idea is more than the design itself, the idea is to combine all the tools (image, shape, text, movement ...) to communicate an idea in a simple and smart way.



Personally when I started mobile application development the first time, I believed that the important thing is to create new layouts with different colors, shapes, styles ... but when I decided to create my first application which has an objective, and which targets a category. At this point my vision is completely changed.



Why?

I did a little experiment. I created a few pages with different designs and colors. And I have sent to different people to find out what is included in these pages. The worst they liked the colors, the shape, the animation but the idea is poorly conveyed.



The solution?

I focused on the idea and based on the idea I created some kind layouts. (The converse leads to a worthless product because the idea is not clear)



So I tried to share my little experience with you. If I was wrong, please let me know. If you have any additional information or experiences you are free to share in the comments.




Graphic design can be found nowhere ... in the media, articles, posts, billboards, applications ...

Maybe for a few it's just typography of shapes in general a design ... but the core of graphic design goes beyond this superficial vision.



The idea is more than the design itself, the idea is to combine all the tools (image, shape, text, movement ...) to communicate an idea in a simple and smart way.



Personally when I started mobile application development the first time, I believed that the important thing is to create new layouts with different colors, shapes, styles ... but when I decided to create my first application which has an objective, and which targets a category. At this point my vision is completely changed.



Why?

I did a little experiment. I created a few pages with different designs and colors. And I have sent to different people to find out what is included in these pages. The worst they liked the colors, the shape, the animation but the idea is poorly conveyed.



The solution?

I focused on the idea and based on the idea I created some kind layouts. (The converse leads to a worthless product because the idea is not clear)



So I tried to share my little experience with you. If I was wrong, please let me know. If you have any additional information or experiences you are free to share in the comments.
Custom Cv Background paper
Published: 2020-11-12 01:55:24

Created a custom parchment paper background for my Cv to send to netmatters in Norfolk - https://www.netmatters.co.uk/, hopefully they can train me to be a developer, but uploaded the stock image to deviantart if anyone else wishes to use it feel free, can download the image here @ https://www.deviantart.com/squidcannonarmed/art/StockParchmentPaper-860938820?ga_submit_new=10%3A1605145655&ga_type=edit&ga_changes=1 or you can join us on our Discord server and chat about developement or Art. the invite link is here: https://discord.gg/h5rvrsdwD9 send me a PM if you wanna chat.. From Tao
The Four Principles of Object Oriented Programming in Python
Tags: python, webdev, oop, codenewbie
Published: 2020-11-12 01:49:55


Object-oriented or OOP we shall call it is one of several different programming paradigms used in order to structure your code in a way that is easier to follow. It receives its name by defining objects you can interface within your Python programs. 

## Objects
Objects purposely represent real-world objects or things like a cat or dog. Python objects have a collection of related properties or behaviors like meow() or bark(). 

## Classes 
OOP in Python is class-based and your objects will be defined with the class keyword like the example below: 

```python
class Cat:
    pass 
```

## Principle 1 - Abstraction 
Abstraction is the concept of hiding all the implementation of your class away from anything outside of the class. 

```python
class Dog:
    
    def __init__(self, name):
        self.name = name 
        print(self.name + " was adopted.")

    def bark(self):
        print("woof!")


# we don't care how it works just bark
spot = Dog("spot") #=> spot was adopted. 
spot.bark() #=> woof! 
```

## Principle 2 - Inheritance
Inheritance is the mechanism for creating a child class that can inherit behavior and properties from a parent(derived) class. 

```python
class Animal:
    
    def __init__(self, name):
        self.name = name 
        print(self.name + " was adopted.")

    def run(self):
        print("running!")


class Dog(Animal):
    
    def __init__(self):
        super().init 

    def bark(self):
        print("woof!")


# new dog behavior inherited from Animal parent class 
spot = Dog("spot") #=> spot was adopted. 
spot.run() #=> running! 
```

## Principle 3 - Encapsulation 
Encapsulation is the method of keeping all the state, variables, and methods private unless declared to be public. 

```python
class Fish:

    def __init__(self):
        self.__size = "big"

    def get_size(self):
        print("I'm a " + self.__size + " fish")

    def set_size(self, new_size):
        self.__size = new_size 

# using the getter method
oscar = Fish()
oscar.get_size()  #=> I'm a big fish

# change the size 
bert = Fish()
bert.__size = "small" 
bert.get_size() #=> I'm a big fish

# using setter method
fin = Fish()
fin.set_size("tiny")
fin.get_size() #=> I'm a tiny fish
```

## Principle 4 - Polymorphism 
Polymorphism is a way of interfacing with objects and receiving different forms or results. 

```python
class Animal:
    
    def __init__(self, name):
        self.name = name 
        print(self.name + " was adopted.")

    def run(self):
        print("running!")


class Turtle(Animal):
    
    def __init__(self):
        super().init 

    def run(self):
        print("running slowly!")


# we get back an interesting response 
tim = Turtle("tim") #=> tim was adopted. 
tim.run() #=> running slowly!
```

# Farewell

So now you a great deal about how object-oriented in Python works. If you enjoyed this post feel free to leave a comment about your experience with object-oriented programming.

Happy Coding,
Terry Threatt
Streamlit Code Running from Jupyter Notebook
Tags: streamlit, jupyternotebook
Published: 2020-11-12 00:53:20

## 3 Simple Steps
...

* Launch(Open) command prompt
* Run the command,
  * jupyter nbconvert –to script JupyterNotebookName.ipynb
  * awk ‘!/ipython/’ JupyterNotebookName.py > temp.py && mv 
    temp.py app.py && rm JupyterNotebookName.py
  * streamlit run app.py
* Open the url http://localhost:8501 (Browser)

## References

**Notebook**:   https://github.com/SurendraRedd/StreamlitProjects/blob/master/Streamlit.ipynb

**App**:   https://github.com/SurendraRedd/StreamlitProjects/blob/master/app.py
Edpresso Spotlight: Mohammad Quanit
Tags: writing, watercooler, webdev
Published: 2020-11-11 22:50:07

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ynlrtsmp4v0ssr01x4y5.jpg)

> [Mohammad Quanit](https://www.educative.io/profile/view/5062356741652480) is the author of, [How to write better automated tests with Cypress in Angular](https://www.educative.io/edpresso/how-to-write-better-automated-tests-with-cypress-in-angular), the shot that received the most views of any community-contributed shot in November 2020. Quanit has been a part of the Edpresso community for three months.

Mohammad has been a developer for the last three years. He first got involved with development when his cousin, who is a software engineer, encouraged him to try it. At first, Mohammad struggled with English content, as English is not his first language, but he was able to work on and get used to it. Now, Mohammad is “in love with coding" and the way it has forced him to be a problem solver.

Mohammad is a self-taught developer, which he considers to be an asset. “I found that I learned the important skill of how to adapt/learn something in a specific time frame. This is a key skill that has really helped in my career.” 


To anyone who is new to coding he says, “It’s a skill that really works for you in terms of problem-solving (no matter if it’s your career or in other aspects of your life), it teaches you how to think like an engineer, and gives you a good scope of the industry.” That being said, he warns that if you don't feel passionate about ​coding, it may not be for you as it does require a lot of time and dedication. 

Mohammad loves being a part of the online dev community and teaching others what he's learned. However, his busy schedule often limits his availability.

**Connect with Mohammad on [Twitter](https://twitter.com/mquanit) or visit his [website](https://mohammad-quanit.github.io).**

> [Edpresso](https://educative.io/edpresso) is a free database of short, concise articles on dev topics written by Educative Inc. community members.
Streamlit Digital Book
Tags: digitalbook, streamlit, streamlitdigitalbook
Published: 2020-11-12 00:40:30

Streamlit **Digital Book** contains details of the package installation, development & deployment of the streamlit application, sample codes and other information related to the streamlit.

> Github: https://surendraredd.github.io/Books/
> Preview: https://vimeo.com/476881584
> Youtube: https://www.youtube.com/watch?v=z2u34-kuatI

{% vimeo 476881584 %}
Migrating a Blazor WebAssembly app to .NET 5
Tags: dotnet5, dotnet, blazor, webassembly
Published: 2020-11-12 00:24:24

---
title: Migrating a Blazor WebAssembly app to .NET 5
published: true
description: Migrating a Blazor WebAssembly app to .NET 5
tags: dotnet5, dotnet, blazor, webassembly
//cover_image: https://direct_url_to_image.jpg
---

I have a small side project made with Blazor WebAssembly and although it's great for my needs, the debugging experience is very poor. Lucky for us, this was greatly improved in .NET 5 and I wanted to try it out immediately. The migration was quite easy but I did encounter some issues, so here are the steps you have to do to to upgrade your app and then we'll go over the issues:

## Migration

1. Install  [Visual Studio 16.8](https://devblogs.microsoft.com/visualstudio/visual-studio-2019-v16-8/) 
2. Change the first line in your Blazor WebAssembly project from
```
Microsoft.NET.Sdk.Web
```
to
```
Microsoft.NET.Sdk.BlazorWebAssembly
```
3. Change target framework to .NET 5
```
<TargetFramework>netstandard2.1</TargetFramework>
```
becomes
```
<TargetFramework>net5.0</TargetFramework>
```
4. Update other packages to `5.0.0` (`Microsoft.AspNetCore.*`, `System.Net.Http.Json`, `Microsoft.EntityFrameworkCore`, etc.)

In the end, this is how my diff looks like for a fresh project ([click to open in a new tab](https://cdn.hashnode.com/res/hashnode/image/upload/v1605139050446/v8GMkgpP9.png)).

![Migration](https://cdn.hashnode.com/res/hashnode/image/upload/v1605139050446/v8GMkgpP9.png)

## Errors

If you have any errors, there are some things you can try:

1. Remove `Microsoft.AspNetCore.Components.WebAssembly.Build` from your project
2. Remove the properties
```
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
```
 and
``` 
<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
```
3. If the build still fails, do the usual routine in Visual Studio:


- Clean solution
- Close Visual Studio and delete the bin/obj folders
- Delete the .vs folder
- Open Visual Studio and build the solution again

## Azure App Service

If you're using Azure App Service, then you can deploy your Blazor app immediately because .NET 5 is already supported. However, if you just deploy your Blazor app after upgrading to .NET 5 then you'll encounter this error:


> The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

To fix it, you just have to go to the App Service Configuration page and change the Stack from `.NET Core` to `.NET` and the .NET Framework version to `.NET 5`. It should look like this in the end:


![Azure App Service](https://cdn.hashnode.com/res/hashnode/image/upload/v1605143271515/F7-_KTLhH.png)

That's it! Now you can take advantage of all the goodies that Blazor has to offer with .NET 5

PS: I tried the debugging experience and indeed, it's way better now :)

The post [Migrating a Blazor WebAssembly app to .NET 5](https://thewindev.net/migrating-a-blazor-webassembly-app-to-net-5) appeared first on [thewindev.net](https://thewindev.net).
How to convert a string representation of a floating-point number to number type in JavaScript?
Tags: javascript
Published: 2020-11-12 00:00:00

---
  title: How to convert a string representation of a floating-point number to number type in JavaScript?
  published: true
  tags: JavaScript
  date: Thu Nov 12 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/convert-string-floating-point-number-to-number-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-96de88e9d186e3f2eea9ab5b46da9f57.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/convert-string-floating-point-number-to-number-javascript)
  
To convert a `string` representation of a floating-point number to a `number` type, you can use the `parseFloat()` function in JavaScript.

Consider this string of floating-point number,

```js
// string with floating point number
const str = "45.67";
```

Let's use the `parseFloat()` function and pass the `string` to the function as an argument to convert it to a `number` type like this,

```js
// string with floating point number
const str = "45.67";

// convert to number type
const floatNum = parseFloat(str);

console.log(floatNum); // 45.67
```

- This function is useful when you want to convert values that are obtained from `url`, `form`, or whichever places where the values will be `string` type and need to be converted to a floating-point number.

See this example live in [JSBin](https://jsbin.com/henacayeyo/1/edit?js,console).

### Feel free to share if you found this useful 😃.

---
Book Review: Working effectively with legacy code
Tags: bookreview, architecture, practices
Published: 2020-11-12 22:16:45

---
title: Book Review: Working effectively with legacy code
published: true
date: 2020-11-12 00:00:00 UTC
tags: BookReview,Architecture,Practices
canonical_url: https://hceris.com/book-review-working-effectively-with-legacy-code/
---

[![Working effectively with legacy code](https://hceris.com/static/ff13a32e4413493f43271e7391550c56/5fc5d/cover.jpg "Working effectively with legacy code")](/static/ff13a32e4413493f43271e7391550c56/5fc5d/cover.jpg)

Do you wake up in the morning and tell yourself, “man, I would love to work on some legacy code today”? I guess you don’t. We need to talk if you do.

But anyway, whether you like it or not, you probably **will** work on legacy code more often than you’d like to. That’s where this book comes in. If you have read [Refactoring](https://martinfowler.com/books/refactoring.html), the structure will ring familiar. A collection of patterns to handle different aspects of working in a legacy system. I read it in one go, but it’s probably a book that works best as a reference that you revisit whenever you’re facing a concrete issue.

## A collection of patterns

There are plenty of patterns to choose from. Some examples include:

- Interception Points
- Delete Unused Code
- Adding New Behavior

Each pattern describes a problem, proposes a way of handling it, and has sample code to visualize it better. That part is crucial. Actionable advice based on real-life experience with examples make the scenarios a lot easier to digest.

An interesting point is that some language features that we normally appreciate can hinder when dealing with legacy code. If a class is entirely untestable, overriding some parts through subclassing might enable you to write some tests. But if the constructor is private, then you are out of luck.

## A shared vocabulary

I’m a big believer in having a shared vocabulary inside a team. If we use different words whenever we talk about the same thing, a lot of effort is spent understanding each other. Referring back to the way concepts are named in the book is something I’d like to try at some point to see if it helps or not.

## Verdict

Having a strategy in place to handle code that is, to put it nicely, _problematic_ will be crucial at some point in your career. How do you start testing a monstrosity with dozens of methods and dependencies that you inherited? TDD won’t help here.

That’s why I liked this book, as it covers an area of development that isn’t sexy. You can almost feel the pain that led to some of the techniques to add test harnesses or bring structure in a code grown without a plan. It gets ⭐⭐⭐⭐ stars from me.
Day 254: Storm Comin'
Tags: hiphop, code, coding, lifelongdev
Published: 2020-11-11 23:29:29

_liner notes_:
- Professional : Can't believe it's Wednesday already! Wow! Going by so fast. Got up early to take part in a Talk Prep session. Then I went back to sleep so I could get some rest before doing another live stream show. We spoke about the Video API, showed some sample code and I got to talk about and got to demo some of my side projects that use the API. Good news is that everything worked! haha We were worried if we would be able to fill the full time. We had no problem. Every time I do a live stream, I get super tired. haha I had to take a nap. Got up and then started working on the documentation for the SDK. Pretty exciting day.

- Personal : So last night, I wanted to see if the Structured Data (to help with SEO) I set up for each event in my side project actually worked now that it is deployed. Nope! haha So I spent the night basically using Google's tool: https://search.google.com/test/rich-results?utm_campaign=sdtt&utm_medium=url to squash any errors it found. I ran into a pretty big issue where the Start Date need the timezone, but the data I had didn't really have it in the right format, so basically I had to transform what I had into a form that worked. Had to do some math, convert to a string, splice and replace some characters. haha Felt good when the site passed the Google Tool. We'll see if it helps with SEO and ranking.

![Kluane Nat'l Park, YT, Canada landscape with forest in the foreground and mountains in the background](https://dev-to-uploads.s3.amazonaws.com/i/xn1lznimszvrqgc221mf.jpg)

Since half the week is basically over, I need to get the recording of the last show to the radio station so they can play it on air this weekend. While I'm at it, I'll probably go through tracks for this week. Maybe think more on the design of my next side project. Really want to get that started and ready to go in the new year. Going to take some planning to launch it. So there's supposed to be a storm coming from earlier in the week. The whole week has been really cloudy and windy. Had a lot of Tropical Cyclones warning alerts on my phone. Good thing I'm in the back of my folks' place to kind of protect me from the wind.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube Za-a9lt_RFA %}
Access Control in Swift
Tags: ios, swift
Published: 2020-11-11 23:23:44

---
title: Access Control in Swift
published: true
description: 
tags: #ios #swift
//cover_image: https://direct_url_to_image.jpg
---

<!-- wp:paragraph -->
<p>What is Access Controls in Swift? According to the documentation<strong> "Access control restricts access to parts of your code from code in other source files and modules. This feature enables you to hide the implementation details of your code, and to specify a preferred interface through which that code can be accessed and used."</strong> We can implement access controlS by adding five different types of modifiers to our code. These modifiers are:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><strong><span style="text-decoration:underline;">Public</span>:</strong> Which means anyone can read and write to this property.</li><li><strong><span style="text-decoration:underline;">Internal</span>:</strong> This is the default access control for any property we create. This allows us access within the same module.</li><li><strong><span style="text-decoration:underline;">File Private</span>:</strong> Like the name says, this modifier allows us to only access this property within the same file.</li><li><strong><span style="text-decoration:underline;">Private</span>:</strong> This is the most restrictive. This only allows access within the current enclosing it is being used in.</li><li><strong><span style="text-decoration:underline;">Open</span>:</strong> This is the most unrestricted. This property can be accessed from anywhere and other developers can subclass it and/or override it.</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>If you would like a deeper dive into Access Control check out the <a href="https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html">Swift Documentation</a> on it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Thanks for reading and I hope this gives you a better understand of when to use Access Controls in Swift.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Happy Coding!!!</p>
<!-- /wp:paragraph -->
Releasing my personal project
Tags: graphql, react, sideprojects, showdev
Published: 2020-11-11 23:23:23

Hey 👋

I have recently opened up [groobe.io](https://groobe.io/) for signups, and I am excited to share it with the community!

Feel free to checkout it out and tell me your favorite features! I would like to share some of the technicals aspects but I am not sure were to start.

The site is made on:
* Typescript
* React
* Node
* GraphQL
* Relay

I have experimented with various things such as Data Driven UIs, React Concurrent mode, Routing prefetching and preloading and more!

Cheers! 😄
Using Cloud9 (AWS Cloud IDE)
Tags: aws, 100daysofcode, 100daysofcloud, cloudnative
Published: 2020-11-11 23:18:50

Hey All,

I just released a new video on using the cloud IDE by AWS, Cloud9. It’s an awesome way to move away from writing all of your code locally, if that’s your thing.

https://youtu.be/ab6ug94r76g