teleren/devto huggingface dataset:
Daily Developer Jokes - Sunday, Jun 7, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-06-07 12:00:09

---
title: "Daily Developer Jokes - Sunday, Jun 7, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Sunday%2C%20Jun%207%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259316ab83.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What are the three hardest problems in computer science?

___A:___ Naming things and off-by-one errors
 -->
#40daysofHybridCloud (Day-4)
Published: 2020-06-07 11:56:57

##*#Day4*

Today I have learned about the json format which is used during the data retrieval while using CLI to interact with the instance and other services of AWS .

Json is one of the great method to send or receive data on web or between any programs same like YAML and XML , which works on key-value pair and it is extensively used in day to day tech.

while using AWS services through CLI , I have one software used to parse or extract json that is [jq-win64.exe](https://stedolan.github.io/jq/download/) .

Other online tool to check whether you have a written correct syntax (Json)or not is [*json editor online*](https://jsoneditoronline.org/)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7de0v2g640v5fii8cghr.JPG)

Lets talk more about <b>*S3*</b> !
> S3 (Simple Storage Service) is one of the storage service used in AWS which can be accessed globally (which means it is not like EC2 which is regional in nature).

but the difference between the S3 and EBS is that S3 is not same as Block storage as EBS is rather it is "Object storage as a Service"(OSTAAS) which means that OS/instance can not be installed on S3.

Reasons for not installing OS on S3 are :- 
for any OS be be installed two things are required :- 
1. storage can be partitioned (S3 can not)
2. storage must be formatted (S3 can not)


Never the less S3 is one of the most powerful service of AWS and also widely used.

###S3 is very useful some of them mentioned below : 

* Most globally used storage structure of AWS.
* Data is more secured on S3
* Data for different services like cloudtrail and external storage can be store on S3 .  
* Data for Edge location is also stored on S3.
 
Data stored on S3 is in form of buckets.

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


> lets discuss one more term that is <b><u>*Edge Location*</u></b>.

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


An <b>edge location<b> is the nearest point to the consumer(user) who is consuming the AWS service. In these locations, the server is not present but a small setup is there.

They are located in major cities around the world. Unlike Availability Zones which are Physical Locations where AWS servers Lies, An Edge location is basically a small setup in different locations.AWS Edge location is the place where the data is cached to reduce the latency to the end users. 

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

That's all for today , any suggestions to make blog more intractive are most welcomed !!

*happy learning :)*
Bash/Zsh function to export SVG diagrams using PlantUML
Tags: plantuml, svg, bash
Published: 2020-06-07 11:56:52

In this short clip, we'll look at creating a simple Bash/Zsh function to export SVG diagrams using PlantUML.

#### Requirements:

* PlantUML: [Direct Download](http://sourceforge.net/projects/plantuml/files/plantuml.jar/download)

Place it where you can easily refer to it. 

```bash
nmn$ ls -l $TOOLS_HOME/plantuml/plantuml.jar
-rw-r--r--@ 1 nmn  staff  7985304  9 Nov  2019 /Users/nmn/tools/plantuml/plantuml.jar
```

Next, we'll create a function and put that in bash/zsh profile so that it can be loaded automatically on each session.

```bash
function plantsvg() {
    NAME="$1"
    cat ${NAME} | java -DPLANTUML_LIMIT_SIZE=8192 -jar $TOOLS_HOME/plantuml/plantuml.jar -tsvg -pipe > ${NAME}.svg
    open -a Firefox.app ${NAME}.svg
}
```

Once you have it setup, this will export the provided plantuml file to an SVG image and open it up using Firefox.
You can change the application used to open this SVG by replacing `Firefox.app` with the another application.

Here it is in action

{% youtube ytSB-cjAKzA %}

📝:

👉 Tested on MacOS but should work on earlier versions and all flavours of Linux
Parse ISO8601 duration string to Duration object in Dart/Flutter
Tags: flutter, dart
Published: 2020-06-07 11:17:24



```dart
Duration toDuration(String isoString) {
  if (!RegExp(
          r"^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$")
      .hasMatch(isoString)) {
    throw ArgumentError("String does not follow correct format");
  }

  final weeks = _parseTime(isoString, "W");
  final days = _parseTime(isoString, "D");
  final hours = _parseTime(isoString, "H");
  final minutes = _parseTime(isoString, "M");
  final seconds = _parseTime(isoString, "S");

  return Duration(
    days: days + (weeks * 7),
    hours: hours,
    minutes: minutes,
    seconds: seconds,
  );
}

/// Private helper method for extracting a time value from the ISO8601 string.
int _parseTime(String duration, String timeUnit) {
  final timeMatch = RegExp(r"\d+" + timeUnit).firstMatch(duration);

  if (timeMatch == null) {
    return 0;
  }
  final timeString = timeMatch.group(0);
  return int.parse(timeString.substring(0, timeString.length - 1));
}

```
What is React JS
Tags: react, javascript
Published: 2020-06-07 11:12:05

A Brief story behind React:
React is a Java Script library developed by Facebook . It is used to create appealing UI and UX in websites and web applications.
React helps you develop Single Page Applications, website or web application that dynamically rewrites the data in the web page with the new data it receives from the web server instead of reloading the entire web page.

How React works ?
Generally HTML code of a web page gets converted to Document Object Model (DOM), and it is rendered as a web page by the web browser.
React creates a virtual DOM from the actual DOM at first, and displays it to us. Whenever a change is made in the actual DOM, React compares virtual DOM with the actual DOM. And, updates the change in the virtual DOM.
React uses JSX to write HTML code. The JSX code will be transcompiled to Javascript before the browser renders.

Why choose React?
Uses Virtual DOM. So it renders very fast.
Easy to learn, supports code re-usability.
“Learn once, write anywhere library ”. React is the heart of React Native. React Native is a mobile application framework, and react native apps are supported by both iOS and Android.
Not only SEO friendly, but also backed by a strong community, Facebook and Instagram development teams.

Quick Summary
The main idea behind React is to build large-scale SPA with data that changes repeatedly over time, and tackles the challenges.
Provides developers with the capability of working with a virtual DOM, much faster and user-friendly. Also, offers easier creation of interactive UIs, JSX support, component-based structure and much more.
Where We Stand
Published: 2020-06-07 11:11:01

![illustration of black man with fist in the air standing next to a black women with a sign that reads 'Black Lives Matter'](https://dev-to-uploads.s3.amazonaws.com/i/uh9es2z9i7nhteyrexm2.png)
If anyone has any question on where this organization stands in regards to the recent protest over the countless lives lost due to systemic racism that plagues our globe, I'm afraid you don't understand [Tech By Choice](http://techbychoice.org/). Our mission. Our values. Our community. Our leadership. Our board.

Our current social unrest did not start with Emmett Till and did not end with George Floyd. The black lives lost during the week of May 25 was the tipping point of the unjust treatment of Black people that has been going on for the last 400+ years. No amount of words can express the hurt, anger, and fear our community is going through.

We are all grieving.

Recent events had me question several things. How can we thrive if they don't think we matter? If they don't think we deserve civil rights? If they don't see us?

To me, the best part of being black in tech has been using tech to enhance my ability to turn nothing into something. This is why Tech By Choice is on a mission to ensure underserved adults know they can enter, stay, and thrive in STEAM (Science Technology Art Engineering and Math) because we have always thrived. And always will.

But we can't lose hope.

Do not let our silence be confused with being complicit. We stand with every person protesting. They are our hope.

Our leadership and board are working harder than ever to keep this hope going. Stay tuned for the action we take.

In the meantime remember statements can easily become empty promises. Hold us, and others, accountable to these statements.

If you feel inclined to donate to organizations, we ask that you do your homework and lookup these organizations on sites like Guidestar. Find organizations that are doing the work but don't have the funding that well-known organizations have.

Valerie
Founder & CEO
Tech By Choice
##### #BlackLivesMatter #SayHerName

###Resources for people grieving
#### Mental Health
[Therapy For Black Girls](https://therapyforblackgirls.com/)
[Therapy For Black Men](https://therapyforblackmen.org/)
[Black Mental Health Matters](https://blackmentalhealthmatters.carrd.co/)
[The Loveland Foundation](https://thelovelandfoundation.org/)
[Psychology Today](https://www.psychologytoday.com/us/therapists)
####How to recharge
[Protect Your Energy](https://hashtagprotectyourenergy.weebly.com/)
#### Protesting
[Tips](https://moreblminfo.carrd.co/#prosafety)
#### Additional Learning
[Resources for non Black folks who don't know where to start](https://docs.google.com/document/u/2/d/1-4BqwazBjN0DF2zBjwJR5i1hGd6XQ8OVabgTgg0jkas/mobilebasic)
[Mapping Police Violence](https://mappingpoliceviolence.org/)
[Fatal Encounters](https://fatalencounters.org/)
How to Implement Clean Architecture in an iOS App
Tags: architecture, ios, patterns
Published: 2020-06-07 10:55:11

When you don’t have formal education in software engineering, you might find the topic of _software architecture_ uncomfortable. You might hear these _architecture du jour_ and have difficulties in separating signal from the noise – hence dismiss these as _nonsense talk_ done by charlatans to sell books.




Nevertheless a good architecture – when correctly applied – would promote longevity of the code base as it gets maintained and enhanced. A clear structure would compartmentalize functionalities, making them easy to find and guides how code should be added (or even removed).


[Follow this jump](https://tinyurl.com/yccd68tg) to learn how to apply the principles of Clean Architecture on an iOS app by using the VIPER / MVVM-R style as an example.
What does a bug do to you?
Tags: software, bugs, psychology, qa
Published: 2020-06-07 10:39:27

---
title: What does a bug do to you?
published: true
description: Thinking about software-bugs from a developer's perspective
tags: software,bugs,psychology,QA
//cover_image: https://direct_url_to_image.jpg
---
Last week I started my weekly report to management with the words "a frustratingly buggy week". And only afterwards I did fully realize that I might be on a journey to find a new approach of thinking about bugs.

(I'm sorry if I seem to jump between various issues here - this is not a finished academic research, but rather a thought process in the making. So I can only show various building blocks and hope that we can we have a discussion which might lead to some learnings...)

I have some early childhood memories about a software-bug: my grandma was working as accountant in a large tea-company that implemented their own accounting software (1970'ish). A few days before going live they discovered severe bugs...and ultimately the lead-dev commmited suicide!

In my job in a software-company I have 2 (or more) roles: I develop software for end-users as well as internal use - and I'm also getting involved in the QA of our flagship-product. So I can commit bugs and am affected by them! ;)

My thinking *was* that a bug is an offensive thing that interrupts productive work and that needs to be fixed quickly so that I does not affect my "rate of output". The fact that I perceive them so harshly may have to do with personal experience as a long-time independent developer (who needed to finish projects to make a living).

But there is another way to see bugs: "Some of us find debugging intellectually stimulating and are perversely attracted to it. "(Dijkstra or Hoare or Wirth?)

Where do you find yourself on that scale? And what about "corporate culture" dealing with bugs?
Why Geospatial Technology
Tags: gis, qgis, arcgis, datascience
Published: 2020-06-07 10:37:47

Geospatial technology is an emerging field of study that includes Geographic Information System (GIS), Remote Sensing (RS) and Global Positioning System (GPS). 

Here is the link to the article in my medium account [Why Geospatial Technology] (https://link.medium.com/EyYnQhhy76)
How to use .bind() in javascript.
Tags: javascript, codenewbie, tutorial, freecodecamp
Published: 2020-06-07 10:13:42

This is one part of a two part series on how to use bind(), call() and apply() in your javascript code. 

How and where you call a function in javascript matters a lot, yeah a lot. One reason being that it defines what the value of 'this' will be in that function's execution context. 

Javascript gives us the ability to decide what **'this'** would point to each time the function is executed. What this means is that we can tell the javascript engine what object we want the method(function) to be called on, each time it's executed. Cool right! Let's proceed. 

You may have heard of bind, call or apply methods, have you? Well their primary purpose is to help you decide what you want **'this'** to point to while executing a function. bind is a method on the Function object(**Function.prototype.bind**), and is available by default as a method on functions you create since functions have the Function object as their *prototype*.

##bind(this, args)
Whenever bind is called, it returns a **_'new function'_**, this function has it's **'this'** value set to the object you provided when bind was called. This means each time this new function will be executed, the **'this'** in the execution context that will be created, would always point at the object you passed in when calling bind.

```javascript

    const user = {
      name: 'sage',
      balance: 1000
    };

     const getBalance = () => this.balance;

     console.log(getBalance()); // undefined
```
Since the function was called in global scope, its **'this'** pointed to the global object(**_Window_** object in web browsers). And **_balance_** was not defined as a property on the global object so it returned **_undefined_**.

Now let's bind the function's **'this'** to a different object and see how it goes.

```javascript 
    const newGetBalance = getBalance.bind(user);

    console.log(newGetBalance()); // 1000
```

So what this means is that each time you call the new function we got from the bind call(**_newGetBalance_**), a new execution context will be created, and in that execution context, the value of **'this'** would always be the **_user_** object that we provided. That's flexible if you ask me.

**_bind_** also accepts other *parameters*, in addition to the *parameters* the function accepts by default. These new *parameters* to the bind call will precede the original ones the function accepts.
Simple Weather App With Google Maps Using Blazor Server, HttpClient and Radzen Components
Tags: webdev, csharp, dotnet, blazor
Published: 2020-06-07 09:19:07

My favorite teacher for C# on Youtube is **Tim Corey**, and his latest material concerns *HttpClient*, using a Weather Forecast Api.
See his material, and check the code provided, as this is a the beginning step towards our application. https://youtu.be/cwgck1k0YKU
My application is live: https://httpclientwithmaps.azurewebsites.net
Final project is: https://github.com/zoltanhalasz/HttpClientWithMaps 

**The way the final application works:**
1. map is centered in Central Europe
2. click on the map- we will see the neighboring cities with available weather data
3. click on a red bullet - (marker) - the available weather forecast will be displayed in the table on the right.

**Prerequisites:**
1. Dotnet Blazor Server Side Basics - see my previous tutorial
2. Check Radzen Controls for Maps - check the source
https://blazor.radzen.com/googlemap
3. Check the Weather Api - it's the same source as mentioned by Tim
https://www.metaweather.com/api/

**Steps to follow:**
A. Take the sample application as starting point from Tim (it's a Blazor Server Application) - see repo in his description https://leadmagnets.app/?Resource=HttpClient
B. Add Blazor Radzen to the project, as presented below:
https://blazor.radzen.com/get-started
C. Add the following Changes, described below:

I. Add another class to Model folder to track the locations (which will be represented as red dots on the map)
```csharp
    public class LocationModel
    {
        public int distance { get; set; }      
        public string title { get; set; }
        public string location_type { get; set; }
        public int woeid { get; set; }
        public string latt_long { get; set; }
        public double latt { get; set; }
        public double _long { get; set; }
    }
```
II. The code from my repo is commented, in order to understand the main functions, you can copy the WeatherData.razor page content into your project. This contains the functionality described in the beginning.

Please check the map functionality and weather api in the prerequisites to understand it.

III. The left menu is slightly simplified versus the Tim version, you can copy or leave it.

Final result:

![Maps](https://dev-to-uploads.s3.amazonaws.com/i/09ibzksoggd7vzr44ws5.png)
Enjoy! Let me know your comments.
How I can use Google Assistant Functionality in My Android App
Tags: android, java, kotlin
Published: 2020-06-07 09:10:27

---
title: How I can use Google Assistant Functionality in My Android App
published: true
description: Google Assistant
tags: android, java, kotlin
//cover_image: https://direct_url_to_image.jpg
---

For Example I need get from user " compute 5 * 5 " and pass this statment to Google Assistant and Show for user the result.
movies ki duniya website
Published: 2020-06-07 08:51:32

In case, if you are struggling to download the movies from this movies ki duniya site due to the government has banned it, then you can go ahead with new links. For instance, the site come up with different domain names in order to offer the regular updates regarding the fresh contents to download it. If you are the one who would like to download the movies from new links, then it is also possible for you to search for the respective link and make use of it.

Is it illegal to download movies from movie ki duniya site?
Yes, it is completely illegal and at the same time not safe at all for the people to enter the site and search for the movies to download or stream it. Also, you need to know that these kinds of sites are producing the virus which will affect the device big time. Even it will slow down the performance of your device. 

It is also one of the main reasons where most of the people are thinking and looking for the safer side like to visit legal platforms. But when it comes to movies ki duniya, it is the best chance for the people to search for the 300mb movies from here at good quality. Especially, people who all are handling mobile devices to watch the movies, then this could be the best platform for most of them. However, it is illegal for the people to download movies or other video contents from here. 

How to download movies from movies ki duniya site?
By following this site, you are able to search for the right category and tap to enter it to search for the movies to download. Here you can search for the categories like Bollywood, Hollywood, yearly wise and others. It is all up to your choice in terms of choosing the right one. Once you have chosen the right category then focus on movies with different quality to choose and tap to download it.

If the respective movie is available to download, then tap and wait for some time under the downloading is over. At last you are ready to watch it for free.

is it safe to access movies ki duniya site?
Definitely not safe for the device when you visit this site and looking forward to download the movies or other video contents from here. In case, if you use, then there is a chance to experience virus on your device for sure. Even it will affect your device drastically than ex.
for more information https://www.adviceduniya.com/movies-ki-duniya-bollywood-website/
Easiest way to install Android OS via Linux. No Grub fiddling!
Tags: linux, android, opensource, webdev
Published: 2020-06-07 08:35:13

Let's get to business right away. We will be installing an android fork from [https://www.android-x86.org/](https://www.android-x86.org/)

## Step 1 - Download the Android x86 rpm file

Download either of 32bit or 64bit  .rpm package of android-x86 from [https://www.android-x86.org/download.html](https://www.android-x86.org/download.html)

![rpm-ref](https://i.imgur.com/cbOWV7d.gif)

*__Note__* : Step 2  is not applicable for (Fedora/Red Hat/CentOS/SUSE) users since rpm package can be installed in those by default. Skip on to Step 3

## Step 2 - Installing alien package
 Install alien package for your linux distro. 'Alien' is a computer program that converts different Linux package distribution file formats. It supports conversion between Linux Standard Base, RPM, deb, Stampede (.slp) and Slackware (tgz) packages.

 - Ubuntu/ LinuxMint/ Debian users can do


```
sudo apt install alien
```

- Arch user can install from AUR - [https://aur.archlinux.org/packages/alien_package_converter/](https://aur.archlinux.org/packages/alien_package_converter/)


## Step 3 - Installing the Android x86 rpm file.

*__Note__* :The installation may take around 3-5 minutes depending upon the read/ write speeds. 


 For (Fedora/Red Hat/CentOS/SUSE) users, as you all know run:

```
sudo rpm -ivh android-x86-version.rpm
```

For (Ubuntu/Debian/Linux mint) users, run: 

```
sudo alien -ci android-x86-version.rpm
```


Volá! 🤩 Now you are ready with android x86 desktop O.S.
Reboot and you will see a boot entry with Android x86 tag. If it doesn't show up, just change the grub timeout using [Grub Customizer](https://launchpad.net/grub-customizer) or manually press Esc while booting up to show boot entries. 

![desktop](https://i.imgur.com/naOHcwe.jpg)

*__Note__* : 
- Do remember to enable Native Bridge from android settings to enjoy android desktop to the prime.
- You could launch the installed Android-x86 in a QEMU virtual machine if needed.
- To uninstall the O.S files and boot entry. Use the usual package uninstalling method of you distribution.


Enjoy your day 💖.