teleren/devto huggingface dataset:
On the Topic of Productivity Lies We're Supposed to Believe
Tags: productivity
Published: 2020-06-09 09:42:16

Imagine you just got back from lunch.

Your boss or project manager comes to you with a task and asks what a reasonable deadline would be to finish it. After looking over the task and getting an idea of what might be required to complete it, you determine it’ll take about eight hours of work to complete. So you tell your supervisor a good deadline would be tomorrow afternoon, but let’s say EOD just to give yourself a little wiggle room.

<i>Did you spot the lie?</i>

What we have a hard time realizing is that eight hours at the office almost never equals eight hours of work. It’s called the  [planning fallacy](https://www.7pace.com/blog/software-development-planning-fallacy), and it’s the phenomenon that has almost all people assuming they have more time for work than they actually do. Just an FYI, this is an no-nonsense excerpt from [here.](https://www.7pace.com/blog/stop-lying-time)

<h4>In reality, studies have shown that most people are able to do just under three hours of focused, productive work during every eight-hour workday. </h4>

That’s it. So that eight-hour project you promised your boss would be done by tomorrow? Realistically, you probably need three to four days to finish it. At least.

Sure, we typically spend eight hours a day at the office (or wherever we work). But think about what an actual day looks like. There’s meetings. Taking trips to the break room. Stopping and chatting with coworkers on the way there. Going to lunch. Checking email. Responding to email. Reading texts and social media. Surfing the web. Taking breaks. Getting distracted.

![Typical work schedule that shows the amount of work done per day,about 3 hours](https://www.7pace.com/wp-content/uploads/2019/09/Work-Day-with-Distractions-1024x576.png)

When you think about all of that, it’s no wonder we’re only able to do [three hours of focused, deep work each day](https://www.7pace.com/blog/deep-work-in-the-age-of-distractiony). Every workday is full of distractions.

This leads to a whole host of problems. We tend to make promises we can’t keep at work. We miss deadlines as a rule, which means we gradually grow to take deadlines less seriously. We give up time when we don’t actually have any available time to give. And all of that can lead to tensions in the workplace, stress, and burnout. 

The solution is to stop lying, and learn to estimate our time more accurately.
10 Resources to Learn TYPO3 Composer
Published: 2020-06-09 09:37:44

No matter, If you are TYPO3 beginner or advanced person, This article will help you to learn TYPO3 composer variance topics like TYPO3 Installation, TER extensions, Private TYPO3 composer server, TYPO3 composer generator tools, etc.,

At the initial stage, As a developer, it requires bit learning curves, but by practice, you will feel the power of TYPO3 composer - what such cool tool to install and maintain the TYPO3 website for a long-term.

In this guide to Learn TYPO3 Composer explore, 

- What’s a Composer?
- Official Wiki: Learn TYPO3 Composer
- Video Training on TYPO3 Composer
- Helper for Install TYPO3 Composer Packages
- TYPO3 Composer Generator
- Build Your Private TYPO3 Composer Packages & Server
- Learn TYPO3 Composer Structure & Commands
- TYPO3 Composer Commands
- How to Install TYPO3 Extension with Composer?
- Migrate Your Non-composer to Composer TYPO3 Website
- Helpful Learn TYPO3 Composer Blogs

Read complete blog at - https://t3terminal.com/blog/learn-typo3-composer/
Can you help me identify why I cannot run migrations in testing?
Tags: help, php, laravel, testing
Published: 2020-06-09 09:35:36

Hello can you help me with the following question I did:

https://laracasts.com/discuss/channels/testing/why-by-running-migraterefresh-on-test-setup-phase-fails-to-run-the-mugration-scripts

I try to run migrations for a pre-existing schema on laravel 5.7 application. But as the question says the migrations fail.
Hosting Blazor WebAssembly on ASP.Net Core WebAPI
Tags: blazor, webassembly, aspnetcore
Published: 2020-06-09 09:31:24

---
title: Hosting Blazor WebAssembly on ASP.Net Core WebAPI
published: true
description: Simple steps to host an already created Blazor Web Assembly project in ASP.Net core wen project
tags: Blazor, WebAssembly, ASPNetCore
series: Microsoft Blazor
---
##Background
My WebAssembly project has now been configured to be a PWA (refer the previous article in series). It time to introduce hosting. Since the WebAssembly project handles the client side, I want it to be unchanged but be hosted it in a project that can be used as backend for the UI, hence chose WebAPI.

##The Changes
- Create a new solution and add the already created Blazor WebAssembly project
- Add a new ASPNet core web project and choose WebAPI template and call it the .Server project
- Add reference of the WebAssembly Project to the .Server project.
- Install package Microsoft.AspNetCore.Components.WebAssembly.Server to the .Server project. This package contains the runtime server for Blazor application.
- In the startup class add configuration to the request pipeline to handle Blazor and its routing.

```c#
// This methods serves the WebAssembly framework files when a request is made to root path. 
//This method also take path parameter that can be used if the WebAssembly project is only served 
//from part of the project, giving options to combine web assembly project with a web application

app.UseBlazorFrameworkFiles();
```
```c#
//This configuration helps in serving the static files like 
//Javascript and CSS that is part of the Blazor WebAssembly

 app.UseStaticFiles();
```
```c#
//Add the below configuration to the end of the UseEndpoint configuration, 
//this will serve the index.html file from the WebAssembly when the WebAPI route 
//does not find a match in the routing table

 endpoints.MapFallbackToFile("index.html");
```
Your ASPNet Core hosted WebAssembly project is ready to be published and deployed. Pretty easy!

Next would to move some of the data source maintained in the WebAssembly to the WebAPI Server and use an HTTP call to retrieve it.

Source Code: https://github.com/gopkumr/BlazorTourOfHeroes.git 
Branch: Perf
Why is starting an online business so hard?
Tags: magento, php, smallbusiness, ecommerce
Published: 2020-06-09 05:38:04

Starting a small business is not so hard as it seems but to reach its growth of success is hard and sustainability is a very tougher side of online business. Nowadays every merchant wants to sell online but they don't know the exact plan that they can use in online Commerce. That makes it more difficult so here are some points that you should keep in your mind before going to your business online.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qakqvd7hywsvoj08v2if.jpeg)

**1.Not having plan action**
You don't need to have a proper strategy - yet you despite everything need a plan.
mostly people view the business plan as a homework, they would prefer not to do but planning to play a major role in the success of any business. you must only know who are your clients, what are you selling and what people are willing to pay for your product and service.

**2. Concentrating a lot on the little stuff**

In online business, various things running simultaneously so you should know whats things important and what are not, focus know main factor of business like your product, service, you clients, etc. instead, by getting derailed by things like how your business card look and logo, originators are burning through significant time.

**3. Ignoring customer service**

This is a key factor of any business, if you are not providing good service to your customers. It makes your business not worthy. In online business, so many transactions happening in every night, it's easy to forget that customers people who are way more likely to return your website if they have a good experience.

**“Make sure you have some way of interacting with the people visiting your site,” Tobak says. “Whatever domain -- through live chat, survey, email or phone.”**

**4. Not stressing over cash**

Be idealistic- just not about cash "There's an excellent possibility that your organization will come up short on cash before it makes any," alerts Tobak. "Ability a lot of money you must maintain your business, what your consume rate is and ensure that you have an arrangement to attempt to get more before you run out."

Time after time entrepreneurs scrambles to raise finances when it's past the point of no return. Rather, founders as it so happens ought to make a financial plan, detailing milestones and how a lot of cash it will take to reach these goals.

if you require any assistance in setting up an online business especially in Magento & best ecommerce platform is [magento for small business](https://cedcommerce.com/magento-services/small-medium-business?utm_source=dev.to-cedcommerce-smbpage-sonker&utm_medium=landingpage-9june). as we know Magento is one of the best eCommerce platforms so you can connect with CedCommerce it is a company they have an excellent team of business experts that drives your business to success. they can easily assist you to make a business plan, even they will make a business plan for you. Get to know the pricing for small businesses set up on Magento e-commerce.
I'm in a book! Ha!
Tags: sql, watercooler
Published: 2020-06-09 09:30:49

I got board today, so I did what everyone is doing from time to time and googled my name - and much to my surprise - one of the results was in books.google - in a book called ["SQL Notes: With Hints and Tricks"](https://books.google.co.il/books?id=4niWDwAAQBAJ&pg=PA186&lpg=PA186&dq=Zohar+Peled&source=bl&ots=72_7IhQx_b&sig=ACfU3U29RgOguA2bpIz5WPN5e-qoPP6Rtw&hl=en&sa=X&ved=2ahUKEwi1ja20s_TpAhVsTxUIHdlEDF04ChDoATAFegQICBAB#v=onepage&q=Zohar%20Peled&f=false)

It's probably copied and pasted from stackoverflow or something like that, but still, It made me smile. 
Now that my ever lasting fame is secured, I can go back to work :-)
Conditionally Appending Developer Tools MenuItem To An Existing Menu In Electron
Tags: electronjs, javascript, react, typescript
Published: 2020-06-09 09:26:43

ElectronJS is one of the most popular JavaScript frameworks these days to write desktop apps using Html, CSS, ReactJS etc. If we look around ourselves, we'll see several apps that are built upon this framework. Visual Studio Code, GitKraken, Discord to name few. You can click **[here](https://www.electronjs.org/apps)** to see the extensive list
 
### Problem/Requirement:
There might be times when you'll need to modify existing ElectronJS menus to add or remove menu items based on some condition. Although the API documentation is really good, there are no examples that show how to mix and match different options. 

I am working on a ElectronJs project these days and last night I had to add a menu item conditionally to already existing menu built from template like below:


#### Menu built from a template:


```javascript
// Modules to create application menu
const Menu = electron.Menu
const MenuItem = electron.MenuItem

// Template for menu
const menuTemplate = [
  {
    role: 'App',
    submenu: [
      {role: 'close'}
    ]
  },
  {
    label: 'View',
    submenu: [
      {role: 'reload'}
    ]
  },
  {
    id: 'helpMenu',
    role: 'help',
    submenu: [
      {
        label: 'Learn More',
        click: () => {require('electron').shell.openExternal('https://url.com/')}
      }
    ]
  }
]

// Build menu from menuTemplate
const menu = Menu.buildFromTemplate(menuTemplate)

// Set menu to menuTemplate
Menu.setApplicationMenu(menu)
```


### I need Developer Console menu in Development Mode

Most of the examples I've found on the internet show developer tools menu added in the template by default or being added using Api methods but not combination of both. Surely, there might be some way to hide/show or enable/disable the existing menus items but what if we only want to show it when we are in the development. Here is how I did it:


```javascript

// Other code omitted for brevity

// Build menu from menuTemplate
const menu = Menu.buildFromTemplate(menuTemplate)
  
if (dev) {
  let menuItem = menu.getMenuItemById('helpMenu')
   
  menuItem.submenu.append(new MenuItem({
    label: 'Developer Console',
    click: () => {mainWindow.webContents.toggleDevTools()}
  }))
}

// Set menu to menuTemplate
Menu.setApplicationMenu(menu)

// Other code omitted for brevity

```

That's it! Now when you'll run your Electron app in development mode, you will see **Developer Console** menu item in the **Help** menu.

I am still very new to Electron development and there might be better ways or the best way to do it. So please make sure to let me know in the comments or on my twitter [@AbulHLakhani](https://twitter.com/AbulHLakhani). Hope you enjoyed reading it.

Thanks a lot for reading!

> **P.S** This is the my very first blog post on Dev.to so if my writing is not very good, then accept my apologies
Bootstrap modal not working on iOS - shows only grey background
Tags: laravel, bootstrap, ios
Published: 2020-06-09 09:19:59

Hy, I ask question on StackOverflow and didn't get a right answer. Can somebody here help me?

Link on question:
{% stackoverflow 61899770 %}

EDIT:
New link on website: https://tkpazin.hr/rang-liste/pojedinacni-turnir/21
Django 2 Cheat Sheet
Tags: django, python
Published: 2020-06-09 09:19:37

Django Cheat Sheet tries to provide a basic reference for beginner and advanced developers, lower the entry barrier for newcomers, and help veterans refresh the old tricks. [Full Django Cheat Sheet](https://simplecheatsheet.com/tag/django-cheat-sheet/)


### Creating a virtual environment

We need to create a virtual env for our app to run in: [More Here](https://docs.python.org/3/library/venv.html)
Run this command in whatever folder you want to create your venv folder

```
python -m venv ./venv
```

### Activate the virtualenv

```
# Mac/Linux
source ./venv/bin/activate

# Windows
venv\Scripts\activate.bat - May need to add full path (c:\users\....venv\Scripts\activate.bat)
```

### Escape from venv

```
deactivate
```

### Check packages installed in that venv

```
pip freeze
```

### Install Django

```
pip install django
```

### Create your project

```
django-admin startproject PROJECTNAME
```

### Run Server (http://127.0.0.1:8000) CTRL+C to stop

```
python manage.py runserver
```

### Create an app
```
python manage.py startapp APPNAME
```

### Create migrations
```
python manage.py makemigrations
```

### Run migration
```
python manage.py migrate
```

### Collect Static Files
```
python manage.py collectstatic
```
Be on the safe side with assert.
Tags: python, beginners, tutorial, debugging
Published: 2020-06-09 09:18:30

We all have faced that situation when there was a bug in someone else's code or a third-party library and as a result your production build failed to deploy. The reasons are endless, it may be due to a non-declared method, class, or even due to the data type of the variable.

Python provides an inbuilt solution for this and it's known as **assert**.

## What is assert ?

Assert is an **inbuilt statement** in python and provides a very convenient way to have debugging tests in the program itself.

Using assert you test a condition and the result of that condition is responsible for immediately throwing an error if the condition returns false which will result in the immediate stopping of execution of the code any further.

## So how do you use it ?

Since assert is a statement it can be simply used as

```py
assert the_condition
```

this test can also be expressed with the help of the following code

```py
if not the_condition:
    raise AssertionError()
```

Let us see what it does, we'll take two code bases for simulating the situations in real life.

* First one is the Library code.
* Second one is your code in which you import and use that library code.

We'll take a basic example just to keep the things simple.

### Library code

```py
# animals.py

class Dog:
    def bark(self):
        return "Bhow Bhow .... Bhow"
```

### Your code

```py
# pug.py

from animals import Dog

assert hasattr(Dog,"barks"), "The library code is broken fix it now"

class Pug(Dog):
    def walk(self):
        return self.barks()

if __name__ == "__main__":
    print("Inside main")
```

### The Result

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

You can see here we have got the same error that we have provided in the assert statement, also observe that the assert was tested even before the 

```py
if __name__ == "__main__":
    print("Inside main")
```

block got executed. This shows the real advantage of **assert** statement and why should you use it to become a better developer.

I hope you learned something new & useful from this post & don't forget to join our Newsletter.

See you again (⌐■_■)
Swift: Understand Recursive Enum in Five Minutes
Tags: ios, swift, codenewbie, beginners
Published: 2020-06-09 09:11:42

# 1. What is the Recursive Enumeration #

A recursive enumeration is an enumeration — short: an enum — that has another instance of the enum as the associated value.

# 2. How to define Recursive Enumeration case #

You can indicate that an enum case is recursive by writing **indirect** before it. For example:

{% gist https://gist.github.com/rathodmayur93/727f11af1217a131185a5eb6db9ef740 %}

You can also write **indirect** before the beginning of the enum to enable indirection for all of the enumeration’s cases that have an associated value:

{% gist https://gist.github.com/rathodmayur93/8c89967e3ea98ae8f5705db5d73d8b24 %}

The above enumeration can store three kinds of arithmetic expressions: a plain number, the **addition** of two expressions, and the **multiplication** of two expressions. The addition and multiplication cases have associated values that are also arithmetic expressions

# 3. How to use Recursive Enumeration #

To use the ArithmeticExpression enum will take a simple example of the arithmetic operation. We will calculate (5 + 4) * 3 expression value using recursive enum.

{% gist https://gist.github.com/rathodmayur93/91ced4089596fc0195d90f80156f5f40 %}

A recursive function is a straightforward way to work with data that has a recursive structure. For example, here’s a function that evaluates an arithmetic expression:

{% gist https://gist.github.com/rathodmayur93/b2df8152ad361cebeaef96090efeacfe %}

# Complete Code: #

{% gist https://gist.github.com/rathodmayur93/62e9b2dfdcf9e21d0be0c17d206253df %}

I believe this is pretty straight forward. If, however you need any clarification or questions, leave me a comment below and I will get it answered. Thanks for reading.

You can also find this article on [medium](https://medium.com/@rathodmayur93/swift-understand-recursive-enum-in-five-minutes-d4aff8bd50bb#7c4c-6130cfc99229).
Learn PHP aboard the OSS Elephpant
Tags: php, twilio, codenewbie, twilioquest
Published: 2020-06-09 08:57:16

### Enhance your programming skills with TwilioQuest
[TwilioQuest](https://www.twilio.com/quest) is a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available for Windows, Mac, and Linux. Learn practical skills that are critical for success in the programming field.

### A new mission
Embark on the OSS Elephpant, a massive living colony ship with residents that need your help! The evil legacy systems have attempted to sabotage the ship, and only you can restore order by repairing the ship’s systems. Navigate through the ship as you use your expanding PHP skills to unlock challenges and help save the ship!

![alt text](https://www.twilio.com/quest/missions/php/ELE-AI-intro.png)

### Meet the creator of the PHP mission
"Hi, my name is Margaret and I got to take the lead creating this new part of the TwilioQuest universe! As a Developer Evangelist I loved to create arcade-like experiences at events using TwilioQuest because I love the concept so much, and earlier this year I was very excited to get to join the team creating it!
I've been working primarily with PHP for the last 20 years, and have often lamented the lack of assisted learning experiences available for what is a truly outstanding open source programming language. Getting to tackle that challenge within the context of a retro sci-fi video game is a bizarrely specific dream come true!" You can learn more about Margaret [here](https://www.twilio.com/blog/2017/07/introducing-twilio-developer-evangelist-margaret-staples.html).

[See you in the Cloud!](https://www.twilio.com/quest)
Customize Bootstrap 4 colors for website project, SCSS variables
Tags: colors, palette, bootstrap4, scss
Published: 2020-06-09 08:54:26

---
title: Customize Bootstrap 4 colors for website project, SCSS variables
published: true
description: Customize Bootstrap 4 colors for website project, SCSS variables via colorswall
tags: colors, palette, bootstrap4, scss
cover_image: https://colorswall.com/images/help/palette/clone/customize-color.png
---

Customize Bootstrap 4 colors for website project, SCSS variables

1. Visit [Palettes](https://colorswall.com/palettes) page.
2. Choose "Bootstrap 4 colors" palette press "Edit Copy" button https://colorswall.com/palette/generate/o/64498.
![Clone palette](https://colorswall.com/images/help/palette/clone/palette-clone.png)

3. Adjust palette colors.
Play with slider and change RGB colors.
Drag and drop or remove color.
![Clone palette](https://colorswall.com/images/help/palette/clone/customize-color.png)

4. When your palette is ready press "Save" button.
![Palette save](https://colorswall.com/images/help/palette/clone/palette-save.png)

5. Visit [Palettes](https://colorswall.com/palettes) page and find your palette ([Bootstrap 4 colors palette my website](https://colorswall.com/palette/64498)).
6. Open palette and press "Exprot Button".
![Export SCSS variables button](https://colorswall.com/images/help/palette/clone/export-button.png)

7. Choose "SCSS" or "LESS" and press "Download" button.
![Download SCSS variables button](https://colorswall.com/images/help/palette/clone/export-download.png)

8. Import  "colorswall_bootstrap-4-colors-palette-my-website.scss" file with varibale to your project.

Video version
{% youtube 90FV8Rdtwzw %}
Best Fashion design institute
Published: 2020-06-09 08:48:45

Discover your dream career in Designing with “Shells Institute of Fashion Design”
Profession in Fashion designing is full of color, light and beauty, Shells opens the doors to touch the fashion world. We introduce you, how to generate your creativity in the form of sketches of beautiful mannequins dressed up like dolls or models. Shells institute of fashion design starts training from making bold patterns to the rows of hangers holding clothes of your creations. By using art tools we guide you different techniques to decorate fabric like hand embroideries, paintings, printing etc.

“We are Shells creating pearls”

Course overview
 

Shells Institute of Fashion Design offers special courses, those are designed with standards of fashion industry.Our courses develop the Idea of calculating on the evolving trends , contemporary fashion, culture dynamics and innovations of Haute- Couture.