teleren/devto huggingface dataset:
Enjoy Programming-Themed Humor? Here's today's daily developer joke!
Tags: jokes, dailydeveloperjokes, watercooler
Published: 2022-02-05 08:00:17

---
title: "Enjoy Programming-Themed Humor? Here's today's daily developer joke!"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes, #watercooler
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12594a73e61.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_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:___ Why did the document store go out of business?

___A:___ It had NoSQL.
 -->
Make A calculator with Python with 2 lines of code.
Tags: python, tutorial, programming, productivity
Published: 2022-02-05 07:55:33

Learning **Python**? Trying to make a **Calculator**? Then Read this post. For creating an easy calculator in **python** you just need two lines of code and you don't need to install any other packages for that.

_AND THIS IS THE CODE __

```
x = input("Type your equation here : ")
print("Your Answer is : ", eval(x))
```

So, What does this code means?

In the first line, you can see `x` which is a variable and `input("Type your equation here : ")` which means an input and when it prints, it's like the selected text in image given below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/89k5oic0v7xfgap0gfnz.png)

And for the next line - `print("Your Answer is : ", eval(x))`. The first code, which is `print("Your Answer is : )` shows the text inside the quotes. And `, eval(x)` Calculates the equation. 

**RESULT - **

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kb8mgbfwd9tkt02ger0j.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kt8lfz47qnfgthb93gzh.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v4jyskd7bp5wyn5lrdyd.png)


⚠️  **WARNING** - Always put space between every digits you put!
Select all Checkboxes using JavaScript
Tags: javascript, html, css, beginners
Published: 2022-02-05 07:43:54

Explained how to Style and Select All Checkboxes using CSS & JavaScript.

Timeline :
00:00 Teaser
00:20 Create Checkboxes
01:30 Style Checkboxes
02:50 Align Checkboes and labels in same line
03:54 Select All - First Approach
06:50 Second Approach to Select All
{%youtube mzZQoY0MRzM%}
Release Ionic APK with GitHub Actions
Tags: ionic, github, githubaction
Published: 2022-02-05 07:43:19

Recently I was tasked with creating CI/CD that would add Android APK to releases in GitHub with every PR to main from an ionic codebase. I had never worked with ionic before and the person working on the codebase wasn’t that cooperative so I decided to dive in and explore the codebase to accomplish my task. Here are the steps I followed.

Step 1.
I created a bash script with all the initial plugins installation for android in the ionic codebase as shown in the image below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tp9zcq5jrr6jzw9ry1q.png)
 
Step 2.
I installed Cordova globally in the execution context of the workflow: `npm i -g cordova`
Installed dependencies with: `npm i`
Step 3.
Since I wasn’t using Android Studio in the workflow, I had to use jetifier so I installed it and run `npx jetify` to migrate Java, XML, POM, and ProGuard references that point to android.support.* packages, changing them so they point to the corresponding androidx.* packages.(As per docs on jetifier)

Step 4.
I was going to use capacitor to create my android build folder from which I would build the APK so I first built the source codes that generate a .www folder that capacitor uses to generate the android artifacts and then ran: 
`npx ionic capacitor copy android && npx cap sync android`

Step 5.
Move into the android folder and use gradlew to build the final APK with: `cd android && ./gradlew assembleDebug`
NB: For some reason, it doesn’t work without being in the android folder.

The final APK will be in `app/build/outputs/apk/debug/`
Game Dev 2/45
Tags: gamedev, design
Published: 2022-02-05 07:39:29

Well, I decided to use the existing project for this challenge. It has been for a long that "WE" did the demo (we mean my siblings) and I took this concept to make it come true.


![onehand rpg screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqk1rnqbxbtx9dulhoqu.png)

full demo here [twitter](https://twitter.com/cookievirus/status/1108234771111374848)

The reason why I pick this one is that easier to play on mobile with a single hand! "One-hand RPG" and able to implement with my imagination

Well.. that's all for this second day.
A real-time news webapp made using reactjs
Tags: javascript, webdev, react, news
Published: 2022-02-05 07:31:43

[](url)https://github.com/nisabmohd/news

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zz3ebhl3dvt6goa01c78.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fz0uid298f6wdc1zl2c.png)
Problem Solving for Developers - JavaScript [Arrays, Searching].
Tags: javascript, programming, tutorial, challenge
Published: 2022-02-05 07:15:04

Hey everyone, 
I'm Dreamy and today we're gonna solve a problem in JavaScript.

And today's type of Problem is - Arrays and Searching.

```js
/**
 * Given two sorted arrays array1 and array2 of size m and n respectively.
 * Find the median of the two sorted arrays.
 *
 * @Example 1:
 * Input:
 * m = 3, n = 4
 * array1 = [1, 9, 15]
 * array2 = [2, 4, 5, 23]
 *
 * Output: 5
 *
 * @Example 2:
 * Input:
 * m = 2, n = 4
 * array1 = [41, 78]
 * array2 = [3, 4, 7, 8]
 *
 * Output: 7.5
 *
 * Expected Time Complexity: O(min(log n, log m)).
 * Expected Auxiliary Space: O((n+m)/2).
 */
```

Have a bit of a coding yourself and see what kind of solution you can come up with and comment your solution [here](https://youtu.be/crflWrWDwcA). 
You can write your solution in any language and in your way, But don't forget to comment your best solution [here](https://youtu.be/crflWrWDwcA).

If you get stuck or you want to see the solution,
II'l show you how would i solve it.

**We will Highlight top answers || comments in Future videos.**

![highlighted Comments showing 40% responded "Yes", 50% responded "No" and 10% responded "Not sure"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vhvlc5h8ej32slfbqk4.png)

Check the tutorial for [Solution](https://youtu.be/crflWrWDwcA)

{% youtube crflWrWDwcA %}
Custom Silver App bar
Tags: flutter, beginners, dart, whatsapp
Published: 2022-02-05 06:59:41

In normal case we use **AppBar** widget to create tool bar, and when we need a special type of app-bar like WhatsApp app-bar then we need an another widget called **SliverAppBar**.


These is simple to understand but it's not very simple, if we practice and explore more more parameters then will be simple.


I have seen many questions in _stackOverflow_ and _gitHub-repos_ how we can build WhatsApp like app-bar ? 




## **Observation**



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wbrgq0o8pruv4jxdfeuw.jpeg)


**First we need understand about differentiation of  WhatsApp appBar and normal appBar**

- We can observe from WhatsApp there we can see a sliding behaviour on appBar.

- That sliding behaviour we can't build using normal AppBar widget .

- Wee need help of another widget to achieve that kind of design.


## **Let's build.**

```
import 'package:flutter/material.dart';
import 'package:whatsapp/constants/app_colors.dart';
import 'package:whatsapp/views/screens/home_screen/widgets/custom_tab.dart';

class CustomAppBar extends StatelessWidget {
  const CustomAppBar({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SliverAppBar(
      toolbarHeight: 49,
      pinned: true,
      expandedHeight: 110,
      backgroundColor: AppColors.primarySwatch,
      title: const Text(
        'WhatsApp',
        style: TextStyle(
          fontWeight: FontWeight.w600,
          fontSize: 23,
        ),
      ),
      centerTitle: false,
      actions: [
        IconButton(
          splashRadius: 20,
          onPressed: () {},
          icon: const Icon(Icons.search),
        ),
        IconButton(
          splashRadius: 20,
          onPressed: () {},
          icon: const Icon(Icons.more_vert),
        ),
      ],
      bottom: const PreferredSize(
        preferredSize: Size.fromHeight(0),
        child: TabBar(
          indicatorWeight: 3,
          indicatorColor: Colors.white,
          tabs: [
            Tab(
              icon: Icon(Icons.photo_camera),
            ),
            CustomTab(name: 'chats'),
            CustomTab(name: 'status'),
            CustomTab(name: 'calls'),
          ],
        ),
      ),
    );
  }
}

```


here we are using sliver appBar.



full code is available on [gitHub](https://github.com/aninarafath6/whatsapp_clone_yt) 

WhatsApp clone full video series [YouTube](https://www.youtube.com/watch?v=KCbiNYHQPqM&list=PLYg7VCCs-_tzajBchbANFoPojQnVoNYtA)
Secrets to creating WP sites In Minutes. [check inside]!
#Best tools for wp sites #Great Hiden tool


Published: 2022-02-05 06:24:24

Use WordPress to Earn Substantial Income? [Check this out]
Create Stunning WordPress Sites in Minutes and charge $50+ a Po

Did you know that at over half of websites that use content management systems use an open-source one?
https://tinyurl.com/y6d6uce3
That’s right! Everyone from small bloggers to huge country-sized corporations uses WordPress to manage their content.
https://tinyurl.com/y6d6uce3
The reach of WordPress goes far beyond its affiliated hosting service, WordPress.com.

Since its founding in 2003 WordPress has grown from a blogging tool to a full-on CMS that powers large swaths of the Internet.

But that’s not all… People around the world are making a living through WordPress and there are a lot of opportunities for developers to help businesses build sites with pleasing design and high functionality.

Now, the question is “How you can get started with WordPress and start earning?”

And Here’s the answer, “Simply by acquiring this Brand New ‘WordPress Bible’ HD Video Training Membership that will reveal all the crucial methods to get started with WordPress and website creation”.
https://tinyurl.com/y6d6uce3
Take a Look at what you are going to get inside Inside…

Module #1 – Learning WordPress Basics

Module #2 – Mastering WordPress

Module #3 – Building Landing Pages With Elementor

Module #4 – Building Ecommerce Sites On WordPress

Module #5 – Building Membership Sites On WordPress

Module #6 – Building LMS Sites On WordPress

Module #7 – Make Money With WordPress

We strongly urge you to check out the WordPress Bible Premium Membership on the market:

==>Get access to this 130+ video click here 
https://tinyurl.com/y6d6uce3
Here are just a few reasons why WordPress Bible Premium Membership is intrinsic for any business’ growth and success:

[+] WordPress has a 60.8% market share in the CMS market
[+] WordPress powers 14.7% of the world’s top websites
[+] 500+ sites are built each day using WordPress while only 60-80 per day are built on platforms like Shopify and Squarespace
[+] The WordPress Plugin Directory features 55,000+ plugins
[+] WooCommerce powers 22% of the top 1 million ecommerce sites in the world

And these facts understate the blooming popularity of WordPress.

Surely, by now you are jumping on your seats to get your hands on this Exclusive “WordPress Bible Premium Membership” HD 133 Video Training course…..

So without much ado, let us present A[[](url)]Key to your Success.[]https://tinyurl.com/y6d6uce3
How to Open File From MBOX to Google Takeout?
Tags: file, email
Published: 2022-02-05 06:10:22

<p>The <b><a href="https://www.cubexsoft.com/mbox-to-gmail/">CubexSoft MBOX to Gmail Converter</a></b> software is one of the best application to add multiple MBOX files to a Gmail account without any loss and issue. The MBOX to Gmail migration process does best works and export MBOX emails to Gmail account and is compatible with all editions of Windows Operating System including 11, 10, and also below editions.</P>
Read More: [https://www.cubexsoft.com/mbox/](https://www.cubexsoft.com/mbox/)
How to Merge Multiple vCard or VCF Files into One
Published: 2022-02-05 06:00:01

If you want to learn how to merge multiple VCF files, I recommend utilizing VCF merge tool. With this software, you can merge numerous VCF files into one. This software has more advanced functions, such as the ability to remove duplicate VCF file items. 

Visit at : https://www.osttopstapp.com/merge-vcf.html
How I made my portfolio in React
Tags: react, portfolio
Published: 2022-02-05 04:10:40


![Portfolio in React](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hnspf660omdnpatsskiq.png)
Portfolio is one of the best things a developer can make for himself as it showcases all the knowledge he has about that language in which he made the portfolio and all of his past works with some additional info.

Making a portfolio in HTML and CSS is fine, but making it in React will give it a boost which it requires to leave an impact and showcase the level of skills that we have as React developers.

It will also decrease the amount of time and effort required to make with HTML and CSS as we will be –

1. Dividing the whole app into components makes it easier to handle and debug
2. Using data dynamically and not hard-coding it.

In this blog, we will make a Portfolio in React with all the points covered in the above statements.

## Index

1. Getting Started
2. Creating the React App
3. Explaining the Structure of App
4. Working on Components

- Data Component
- Hero Component
- About Component
- Services Component
- Projects Component
- Contact Component

## Getting Started
To make a portfolio in React, we will most definitely be needing the latest versions of npm and node.js installed with create-react-app to reduce the time.
For styling our App, we will use Bootstrap5 with vanilla CSS, and for icons that will be used, font-awesome will be used.

A portfolio should contain all our skills and previous work which according to us is the best and can be showcased with little information about us and a place to contact us for further details.

We will all make this in our app with React with dynamic data. Before getting started, this is what our portfolio will [look like](https://portfolio-blush-eight.vercel.app/).

> The CSS part will not be discussed here as we want you to do that part yourselves.

Let's begin….

## What we will learn?

1. How to write cleaner code in React
2. How to make reusable components to increase the efficiency of our app
3. How to print different types of data dynamically - data includes strings, font-awesome icons, styles, links, and bootstrap classes

## Creating the React App - Portfolio in React
It's very easy to create a React App - just go to your working directory in any of your preferred IDE's and enter the following command in the terminal.

`npx create-react-app portfolio-in React`

If you are unsure how to properly set up a create-react-app project you can refer to the official guide here at create-react-app-dev.‌‌

After the setup, run npm start in the same terminal to start the localhost:3000 where our React app will be hosted. We can also see all our changes there.

Read the whole post from its [official link](https://tekolio.com/how-i-made-my-portfolio-in-react/)
Self-Taught Developer Journal, Day 54: TOP Building Rock Paper Scissors UI cont.
Tags: webdev, beginners, codenewbie, devjournal
Published: 2022-02-05 05:34:48

Today I am still working on my JavaScript code.

I am trying to set up tracking the rounds. The game should stop when the round count reaches five. At first, I was putting a conditional to check the round count first when the button was pressed, but I realized an issue.

![Round Condition](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bcw6e0szg835usqgiyfo.png)

Assuming the round count is four, when the player presses the button and the condition where round equals five will not execute. However, when they round finishes then the round will update to five and they game should end. I could put the same condition at the end, but I don't really want to repeat myself in two places. I could try making a function or a loop? Maybe not a loop. A function might work.

I might try that and see.
 
## Resources
[The Odin Project](https://www.theodinproject.com/paths/foundations/courses/foundations/)
[Revisiting Rock Paper Scissors](https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/revisiting-rock-paper-scissors)
Invitation to become better 
Tags: motivation, productivity, beginners, programming
Published: 2022-02-05 05:33:09

So I've always asked myself what makes a good developer, is it the amount of knowledge the experience or the talent?.

![confused](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbh36t5aw8oemiho0gul.gif)
It is all confusing in the IT world because there is no highest standard of deciding if one's code is better than someone else's. That's what got me thinking that being a good developer isn't really an asset that is just acquired one day or another,all the opposite being a good developer is being in loving with the development process and being passionate enough to keep learning new things everyday.

Because when it comes right in to it, technology is an endless sea and  taken individually we pretty much don't know anything. And It's what makes this journey quite exciting and fascinating, the fact that there's so much to learn and so much to keep up with is what drive us to build  teams and create open source ideas, and ultimately  that's what causes progress.



![satisfaction](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l4k1tplclq2yq89toxxf.gif)

So, I really feel that although we might get overwhelmed it's absolutely fine the most important part is to keep on improving , and as the time passes one would notice how much improvement was accomplished and how better the skills are getting.

So keep on coding guys but don't forget to take some days off as not to burn out . and during the time off try writing some articles or watching some new quick tutorials that get you set up on little details that will for sure make the difference in the long run.

Thank you for reading this post hope it got your energy back to proper levels!
Dynamic Selection List for Selection Fields in Odoo ft
Published: 2022-02-05 05:17:18

Dynamic list can be approached by 3 patterns when defining selection fields in Odoo. These patterns are old however some colleagues may find them weird. These patterns are helpful instead of hard-coding the definition of each related `fields.Selection`.

**The First Pattern**:
You  could  define a global variable then to import in your class file definition. Such as the following global variable `TYPE_TAX_USE`:
[addons/account/models/account_tax.py](https://github.com/odoo/odoo/blob/15.0/addons/account/models/account_tax.py#L11)

```python
# base class with the first definition
TYPE_TAX_USE = [
    ('sale', 'Sales'),
    ('purchase', 'Purchases'),
    ('none', 'None'),
]


class AccountTax(models.Model):
    _name = 'account.tax'

    type_tax_use = fields.Selection(TYPE_TAX_USE, string='Tax Type', required=True, default='sale')
```
Now, You could import the variable as following:
[addons/account/models/chart_template.py](https://github.com/odoo/odoo/blob/15.0/addons/account/models/chart_template.py#L916)

```python
from odoo.addons.account.models.account_tax import TYPE_TAX_USE


class AccountTaxTemplate(models.Model):
    _name = 'account.tax.template'

    type_tax_use = fields.Selection(TYPE_TAX_USE, string='Tax Type', required=True, default='sale',)
```
**The Second Pattern**:
if the model have a relation with your model. You could use the `related` attribute in the field definition. `internal_type` field is an example in the following snippet:
[addons/account/models/account_account.py](https://github.com/odoo/odoo/blob/15.0/addons/account/models/account_account.py#L66)

```python
class AccountAccount(models.Model):
    _name = 'account.account'

    user_type_id = fields.Many2one('account.account.type', string='Type', required=True,)
    internal_type = fields.Selection(related='user_type_id.type', string='Internal Type' store=True, readonly=True)
```
**The Third Pattern**:
you could use a function to return such list. This function should also be outside the class definition for <u>auto invocation</u>.
[odoo/addons/base/models/res_partner.py](https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/models/res_partner.py#L39)

```python
import pytz

_tzs = [(tz, tz) for tz in sorted(pytz.all_timezones, key=lambda tz: tz if not tz.startswith('Etc/') else '_')]
def _tz_get(self):
    return _tzs


class Partner(models.Model):
_name = 'res.partner'

    tz = fields.Selection(_tz_get, string='Timezone', default=lambda self: self._context.get('tz'),)
```
Another example could be as following:

```python
def _get_purchase_order_states(self):
    return self.env['purchase.order']._fields['state'].selection

class PurchaseReport(models.Model):
    _name = 'purchase.report'

    state = fields.Selection(_get_purchase_order_states, string='Order States')

```