teleren/devto huggingface dataset:
Coding a 3D Cube in pure CSS !
Tags: css, animation, perspective, 3d
Published: 2021-01-12 13:10:59

Hey **fellow creators** !

It's time **to have fun** with the *perspective* in CSS.

If you prefer to watch the video **version** it's right here : 

{%youtube cIcKReQpT-4%}


##1. The HTML structure.

When you use perspective in CSS, you need a container to set the **perspective depth**, and a child or children to play **with the 3D environment.**

```html
  <div class="container">
    <div class="cube">
      <div class="face front"></div>
      <div class="face back"></div>
      <div class="face right"></div>
      <div class="face left"></div>
      <div class="face top"></div>
      <div class="face bottom"></div>
    </div>
  </div>
```

##2. Perspective set up.

Create the deepness of the perspective.
Perspective will add depth between the screen and the scene.

```css
.container {
  width: 200px;
  height: 200px;
  perspective: 1000px;
  margin: 100px auto 0;
}
```

Use it with the child.

```css
.cube {
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
  position: relative;
}
```

Style the faces, the bg-image is just to have a stylish background.

```css
.face {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(0deg, rgba(70,70,70, 0.2) 0px, rgba(70,70,70, 0.2) 1px,transparent 1px, transparent 21px),repeating-linear-gradient(90deg, rgba(70,70,70, 0.2) 0px, rgba(70,70,70, 0.2) 1px,transparent 1px, transparent 21px),linear-gradient(90deg, rgb(255,255,255),rgb(255,255,255));
}
```

##3 Translate and rotate the faces.

The translateZ will bring the elements closer to the screen.
It's used to create the cube dimensions. (100px).
The rotation are on X and Y, to place the elements on the edges of the cube.

```css

.top {
  transform: rotateX(90deg) translateZ(100px);
}
.bottom {
  transform: rotateX(-90deg) translateZ(100px);
}

.right {
  transform: rotateY(90deg) translateZ(100px);
}
.left {
  transform: rotateY(-90deg) translateZ(100px);
}

.front {
  transform: rotateX(0deg) translateZ(100px);
}
.back {
  transform: rotateX(-180deg) translateZ(100px);
}

```

##4. 360° flip time !

Create and link the animation.

```css
@keyframes spin {
  from {
    transform: rotateX(0deg) rotateY(0deg);
  }
  to {
    transform: rotateX(360deg) rotateY(360deg);
  }
}
.cube {
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
  position: relative;
  animation: spin 5s infinite linear;
}
```


*Bravissimo* ! It's **done** 🥖🍷

**Source code,** with all the shiny CSS is right here :
https://github.com/Ziratsu/Cube-3D

Come and take a look at my brand new **Youtube channel** :
https://www.youtube.com/c/TheWebSchool
Be part the first pioneers that follow me uh ? ⛰️

*See you next time for some quick and sweet tutorials !*

Enzo.
Let’s Build Signup, SignIn, and Role-Based Access in Our E-Commerce App
Published: 2021-01-12 13:04:43

An Overview Of The Tutorial!

    Introduction

    Database Design

    API Design

    Demo overview

    Signup

    Dealing with the Android Application

    Our Intention

    Requirements

    Dependencies

    Permissions

    Creating Models

    Updating the API

    Creating Activities

    The Main Page

    Signing Up Users

    Signing In Users

    Constructing the Dashboard

    Running the Application

    Resources

Introduction

This is a series of tutorials we are building to demonstrate how to build an E-Commerce App, one component at a time.

We are going to implement a basic authentication which will be extended to role-based access i.e. Admin can change anything, add new Users, a manager can only add/update Category and Products, users can only see the products and Category.

When users/admin sign in, we will generate an authentication token, which will be used to verify the users, when they are going to access an API later.

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

We will have a user table and tokens table. For every user, when they signUp and sign in, we will generate a token, which will have an expiry date. After the expiry day has passed, we should generate a new token, although we will not cover it in the tutorial.

API Design
{% gist https://gist.github.com/nilmadhab1995/f4c507635aebecdcd51dcd7414282d7d.js %}
UserController will have two methods, Signup and SignIn, which will be POST requests.

Demo Overview

{% youtube UGAjCy5Jc4A %}

SignUp

Let's look at signUp API. It takes SignupDto as Input and returns True or False as output depending upon if SignUp succeeds.

{% gist https://gist.github.com/nilmadhab1995/46ebfe02fd7554b20e38a7e1d331cffa.js %}
We follow these steps for signup

    1.Encrypt the password
    2.Save the User
    3.Generate auth token and save it in database
    4.Return Success

{%gist https://gist.github.com/nilmadhab1995/fcf95158baab020f7c3d6381ad54a768.js %}

We will now look at models that are mapped as a table in the database

{% gist https://gist.github.com/nilmadhab1995/c3ca9fad0745bd1e0d275aeef3e7646c.js %}

User and Tokens are linked by user_id field in tokens table, which has one to one relationship, i.e one user can have one token and vice versa.

User and Tokens are linked by user_id field in tokens table, which has one to one relationship, i.e one user can have one token and vice versa.

{% gist https://gist.github.com/nilmadhab1995/96cbca2bdff1a97a80aaf0be7e9ab786.js %}
Sitecore XP 9.0.0 or 9.0.1 and Azure Search? You might need a hotfix!
Tags: sitecore, azure
Published: 2021-01-12 13:01:04

Sitecore XP 9.0.0 and 9.0.1 are [no longer in mainstream support](https://kb.sitecore.net/articles/641167), but the team just [published a hotfix](https://kb.sitecore.net/articles/419401) to help with some [Azure Cognitive Search deprecations by Microsoft](https://docs.microsoft.com/en-us/azure/search/search-api-versions). 

##You might need a hotfix if:
1. Running Sitecore XP 9.0.0 or 9.0.1
2. Using Azure Cognitive Search

Microsoft initially stated that October 2020 would be when they would retire older versions of the Azure Cognitive Search API, but that date was then extended to **January 15th, 2021**.

##What if the hotfix isn’t applied?
If you are in the group that needs the hotfix, and you DO NOT apply a hotfix before the deadline, you will start seeing failures on any applications or web pages that use connections to the Azure Search indexes.

Visitors viewing pages which initiate content search queries will trigger an exception which will prevent pages from loading content. For authors, some authoring capabilities that leverage content search will no longer function and may cause errors. For example, using Experience Editor to edit a page showing a list of content pulled from an index. Experience analytics reports or profile screens that depend on data from the index will also fail to display or throw errors. Other background functionality, like the xConnect Search Indexer worker will also be impacted as they will no longer be able to update the indexes.

**Related articles:**

- [Azure Cognitive Search API Deprecation](https://kb.sitecore.net/articles/419401) [kb.sitecore.net]
- [API versions in Azure Cognitive Search](https://docs.microsoft.com/en-us/azure/search/search-api-versions) [docs.microsoft.com]
- [Sitecore Cloud final reminder notice](https://status.cloud.sitecore.net/maintenance/117f8168-9bb9-421f-bf9f-04f810f6cbde) [status.cloud.sitecore.net]
Daily Developer Jokes - Tuesday, Jan 12, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-01-12 13:00:08

---
title: "Daily Developer Jokes - Tuesday, Jan 12, 2021"
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=Tuesday%2C%20Jan%2012%2C%202021"
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/5e1259d54c109.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___: Did you here about the witch who was off by two when casting a hex?

___A___: They failed to make the target DEAD and made them DEAF instead!
 -->
🗣 How to Talk About Breach Prevention With Your Customers
Tags: security, customers, breach, prevent
Published: 2021-01-12 12:41:40

📈 Giving your customers good news can make it less likely you’ll have to give them bad news later.
[Read more...](https://auth0.com/blog/how-to-talk-about-breach-prevention-with-your-customers/?utm_source=content_synd&utm_medium=sc&utm_campaign=prevention)
Image source from Google Drive
Tags: html, webdev
Published: 2021-01-12 12:37:52

This is just a short document on how we will use google drive images in `<img>` tag.

This is a working solution as of this day. I posted this answer in [Stackoverflow](https://stackoverflow.com/a/64592502/6358813) last October 2020.

#Steps
1. Upload your image to google drive.
2. Share your image from the sharing option.
3. Copy your sharing link (Sample: https://drive.google.com/file/d/14hz3ySPn-zBd4Tu3NtY1F05LSGdFfWvp/view?usp=sharing)
4. Copy the id from your link, in the above link, the id is: **14hz3ySPn-zBd4Tu3NtY1F05LSGdFfWvp**
5. Have a look at the below link and replace the ID. https://drive.google.com/thumbnail?id=1jNWSPr_BOSbm7iIJQTTbl7lXX06NH9_r

After Replace ID: https://drive.google.com/thumbnail?id=14hz3ySPn-zBd4Tu3NtY1F05LSGdFfWvp

Now insert the link to your `<img>` tag.
Learn: Speed Up The Development Process Using Figma
Tags: learn, story, figma
Published: 2021-01-12 12:28:03

Before we start, I would recommend you to try Figma. Why? This will give you a clarity.

While created side projects, I straightly run to code it for most of the time. My consideration before were only around "What tech stack would I use to complete it". I only thought about technicalities of the process, but didn't really deep dive into the interface design of the application that I built.

And then I realized by now that I spent quite a bit of time to design proper Interfaces. I need to define the style as it represent how my apps will look alike. I have to create a prototype first.

Built somethings in prototyping tools is not my first time experience. I've used `Adobe XD` before, though not that often.

Speaking of which, I'm exploring Figma documentation and read/watch some tutorials recently. Then I try to install Figma and start crafting my first design. It turns out that there are so many interesting concepts from Figma to learn.

For now on, I have decided to join **#TeamFigma**
Structuring an expressJS application
Tags: node, javascript, programming, webdev
Published: 2021-01-12 12:21:07

This is my opinion for file structuring expressJS apps. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/70ygs6d8hqtsr45mb4dn.png)

I am open to read any opinions and for further discussion.
Javascript IIFE functions
Tags: javascript
Published: 2021-01-12 12:12:25

Javascript IIFE Functions

IIFE stands for immediately invoked function expression

These functions are used to define variables ,functions with local scope.

When many people work on a same codebase they may use same function name unknowingly which may give rise unwanted code linking.

So this feature of javascript removes that boundary and allows user to define their variable/functions in local scope which does not have any global effect if they are similarly named with any global function or variable.

A sample expression would be
```
(function (a,b){
   function sum() {
   let a,b;
   return (a+b);
}
})(5,6);
```
How can I create a provisioning profile in Xcode?
Tags: xcode, ios
Published: 2021-01-12 11:57:13

Let's check the following step to create a provisioning profile in Xcode?

    Log in to your Apple Developer account and navigate to Certificates, IDs & Profiles > Identifiers > Provisioning Profiles.

    Add a new provisioning profile.

    Activate App Store.

4.Click Continue.

5.From the dropdown menu, select the app ID you just created.

6.Click Continue.

7.Select the certificate you just created.

8.Click Continue.

9.Fill in a name of your choice. The name is not visible to end-users.

Learn more step here: https://www.reddit.com/user/Rlogical_Techsoft/comments/kvm2x4/how_can_i_create_a_provisioning_profile_in_xcode/
Ask Your Mentor These 40 Questions : failure (Q1-10)
Tags: development, leadership, mentor, professionaldevelopment
Published: 2021-01-12 11:57:56

---
title: Ask Your Mentor These 40 Questions : failure (Q1-10)
published: true
date: 2021-01-12 11:50:00 UTC
tags: development,leadership,Mentor,professionaldevelopment
canonical_url: https://craignicol.wordpress.com/2021/01/12/ask-your-mentor-these-40-questions-failure-q1-10/
series: mentor
cover_image: https://craignicol.files.wordpress.com/2021/01/wp-1609625209612.jpg?w=2400
---

[Lifehacker suggests 40 questions to ask your mentor. So that I don’t have to repeat myself, I’m posting the answers here in 4 chunks.](https://lifehacker.com/ask-your-mentor-these-40-questions-1844330641)

1. What’s a big mistake you’ve made that you’d want others to avoid repeating?

> Never take responsibility away from a team. Empower them and trust them. If you lead a team, don’t tell them that the buck stops with you, tell them that the buck stops with all of them. You can defend the team from others, and take responsibility for failures externally, but always make sure everyone is accountable for their own work and you all succeed together or not at all.

2. What’s your strategy for overcoming failure?

> Move on. Leave the failure in your notebook, or in your action log. Own the failure, understand why it happened and work to avoid that situation in future. Put safeguards in place, rework the environment, but don’t expect future you not to fall into the same trap as current you. Move the trap where you will notice it.

3. What’s an essential lesson you learned as a result of failure?

> An untested backup is a wish, not a promise. Test it to make sure its a promise.

4. When should I give up on a pursuit?

> When it no longer provides value. Or there is a better way to provide the intended value.

5. Do you believe in the sunk-cost fallacy?

> Absolutely. And I have worked on projects that recognised this, restarted from scratch, and delivered for less than the change in estimate to continue the project.

6. How do you assess what feedback is legitimate?

> It’s specific, The person giving it has your trust, or the trust of others you respect, It’s given in kindness even if it’s given with force.

7. How do you integrate feedback into your work and lifestyle?

> Always listen. Ask for feedback. But most importantly, act on the feedback, and show yourself acting on feedback, because that always encourages more. If feedback is lost, new feedback is never given, because what’s the point?

8. How big of a risk is too big of a risk?

> Depends on the project. A team of 1 can handle a much bigger risk than a team of 100. A team with a strong PM who manages risk well, can handle more risk than one with a weak PM.

9. How do you determine which weaknesses can be overcome?

> Ask. Whichever weakness you have, someone out there is thriving with it.

10. Can you tell a story of how you recovered from a massive blunder?

_[[I deleted a database]](https://craignicol.wordpress.com/2015/06/16/the-getting-better-moment/)_
Results from the EuroPython 2021 Format Poll
Tags: europython, ep2021, conference
Published: 2021-01-12 11:37:19

![ep-poll](https://dev-to-uploads.s3.amazonaws.com/i/2ywmg8dxedif3mb5fjgc.png)

Following on from previous post, thanks to all who sent feedback on format of EuroPython 2021 online. Here's the results (2021-01-11):

![tumblr_8262f4a1341318eba1f678ebd2a4df3c_fa5333d0_500](https://dev-to-uploads.s3.amazonaws.com/i/k5kuppybz6qlr8z6edlm.png)

![tumblr_abd9644c2d2c3039b13fcc9ab1499f60_a9994fac_500](https://dev-to-uploads.s3.amazonaws.com/i/bfmckb0t11tsyjajlpp0.png)

![tumblr_05d9643431b585eee9e712e80bd43595_43f4d759_500](https://dev-to-uploads.s3.amazonaws.com/i/qn89z6ayfy1mopxkhl9b.png)
   
As a result, the board decided to plan for the following structure:

* 2 workshop / training days (Jul 26-27)
* 3 conference days (Jul 28-30)
* 2 sprint days (Jul 31, Aug 1)

–
EuroPython 2021 Team
https://www.europython-society.org/

---

*(This information was originally posted on [EuroPython official blog](https://blog.europython.eu/post/639651925251571712/europython-2021-format-poll) and [@europython](https://twitter.com/europython/status/1348920015484030977) on Twitter.)*
Match arrays in JavaScript
Tags: javascript
Published: 2021-01-12 11:07:46

### Check if array A has all elements of array B

{% gist https://gist.github.com/dhruvangg/7d6b3748baf403ab95f8c52ef107b083 %}

### Check if array A has any elements of array B 

{% gist https://gist.github.com/dhruvangg/a03e188c4aadef0336e5a34a40b0c2ad
%}
Switch or not to switch out from WhatsApp
Tags: privacy, current, firstpost, discuss
Published: 2021-01-12 11:01:34

WhatsApp has updated their privacy policy recently. All was fine until world's richest man tweeted about it and asked to give up WhatsApp and switch to Signal or Telegram. Since then I have received many messages in (WhatsApp) to switch as the data will now be shared with Facebook. First I thought have I missed something and agreed to it as we (mostly) do without reading the fine print. So I started reading the privacy policy and here are my thoughts.
1. If you have account with Facebook, Instagram and WhatsApp, they already have your most profile information. Like name, date of birth, location and probably the phone number.
2. WhatsApp has specifically mentioned that media and message will not be shared. (https://www.whatsapp.com/legal/privacy-policy-eea)
"Nothing you share on WhatsApp, including your messages, photos, and account information, will be shared onto Facebook or any of our other family of apps for others to see, and nothing you post on those apps will be shared on WhatsApp for others to see, unless you choose to do so." 
3. Those who have issue sharing their number with Facebook, what if you want Two-Factor authentication for more security. You will have to provide your number.
4. Today Signal and Telegram are small and autonomous companies. But so was WhatsApp before Facebook acquired it. Ring is now Amazon company, GitHub is owned by Microsoft. There is high chances that once Signal and Telegram has enough users any of these BIG BOYS will acquire them. AND the cycle will repeat.
5. Even if data is shared and user start to see relevant ads based on interests what is wrong with it. When I started looking for higher studies I started seeing so many ads about courses from Universities and colleges worldwide. My thought process improved and I had more data than I could gather by myself to make decision.
6. For those who fear about this should also know that when we have to switch phone we generally use google or iCloud to backup phone so we don't lose anything that is more sensitive than this issue but we do it anyways.

All in all what I want to say is yes privacy is important and we should keep it that way. But the time we are living is difficult and we need to be connected with our loved ones family and friends. WhatsApp and Facebook has done it beautifully for so many years. I personally is not going to give it up just because they are streamlining there internal databases and improving the processes. Moreover, I am not the world's Richest by any means and what is my phone number is will not be of so much of interest for Facebook. So this time I am going to wait to see if all my near and dear have switched until I switch. 

Please let me know what is your take on this or am I really missing something.
Most important Python concepts for beginners to intermediate
Tags: python, interview, programming, basics
Published: 2021-01-12 10:58:22

If you have 0-3 years of experience working in tech and you are going to apply for python developer role or if you are starting with python to build a project, then you must know some crucial concepts of the language. 
Below you will find the most important and frequently asked topics in python interviews.
There are some amazing links to learn and master python at the end of this blog.

1.	Different data structures in python
      * List
      *	Tuple
      *	Sets
      *	Dictionaries
2.	Valid types of keys in dictionary and their properties.
      *	Iterating a dict
3.	Zip function
4.	Difference between arrays and list in python.
5.	String manipulation and slicing operation
6.	Regex
7.	List comprehension
8.	Lambda/anonymous functions
9.	Filter, map, reduce functions
10.	Generators
11.	Decorators
12.	Exception handling
13.	Files input and output using with
14.	Deep and shallow copy
15.	Memory management in python
16.	Modules in python
17.	Local vs global variables
18.	\__init\__
19.	*args, **kwargs
20.	Multithreading

Python’s official [documentation](https://docs.python.org/3/tutorial/index.html) is very precise and coherent, so going through that would be helpful to understand above concepts. But if you are someone who understands better visually than reading, then here are some useful links,

For absolute beginners into programming/python: 
[python for beginners](https://youtu.be/oVp1vrfL_w4)

**Important data structures in python**:
1. [Data structures in python video](https://youtu.be/D3JvDWO-BY4)		           2. [Documentation of DS](https://docs.python.org/3/tutorial/datastructures.html)

Comprehensions: [Python Comprehensions](https://youtu.be/3dt4OGnU5sM)
Generators in python: [Python generators](https://youtu.be/bD05uGo_sVI)
Decorators: [Python decorators]https://youtu.be/FsAPt_9Bf3U
Multiprocessing in python: [multiprocessing](https://youtu.be/fKl2JW_qrso)
File operations: [Input/Output operations](https://docs.python.org/3/tutorial/inputoutput.html)

The definitions of these concepts can be quite clear; however, you will need to understand them exceedingly to truly use them in your projects. The interviewers also ask tricky questions which can be answered only if you know the concepts thoroughly.