teleren/devto huggingface dataset:
Daily Developer Jokes - Saturday, Jan 30, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-01-30 13:00:07

---
title: "Daily Developer Jokes - Saturday, Jan 30, 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=Saturday%2C%20Jan%2030%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/5e125988c2636.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:___ Why did the web developer always go to the wrong hotel room?

___A:___ They were in room 301.
 -->
Animation stop working on conditional rendering ..!!
Tags: react, javascript, nextjs
Published: 2021-01-30 12:58:16

```
const Products = ({
  product: { name, displayImage, subtitle, price, uuid, slug },
}) => {
  const [show, setShow] = useState(false);

  const clickVariants = {
    opened: {
      top: "50vh",
    },
    closed: {
      top: "0vh",
    },
  };

  return (
    <>
      <div className="products">
      <motion.button onClick={() => setShow((state) => !state)}>
                Buy
                </motion.button>
              </div>
      {show && (
        <>
          <div
            onClick={() => setShow((state) => !state)}
            className="backdrop"
          ></div>
          <motion.div
            initial={false}
            animate={show ? "opened" : "closed"}
            variants={clickVariants}
            className="modal__container"
          >
            <h1>{name}</h1>
          </motion.div>
        </>
      )}
    </>
  );
};

export default Products;
```

Can someone tell me why i am unable to run popup animation while adding condition ? I tried searching it on google but nothing works for me.
Test an Electron built snap package
Tags: linux, snap, electron, testing
Published: 2021-01-30 12:55:38

### Context
Electron is a very powerful tool to develop cross-platform apps. It also simplify the building process thanks to the [electron-builder](https://www.electron.build/) that targets Windows, MacOS and Linux.

Linux builds have many choices, _rpm_ and _deb_ are the most common ones as they target Debian and Red-Hat distros.

In 2014 Canonical started to develop a new package manager, [snap](https://en.m.wikipedia.org/wiki/Snap_(package_manager)) that now is supported by all main distributions.
```
One release to rule them all
```
The electron-builder creates a **.snap** file, but it is not executable.

---
### Test the .snap file
A snap file is basically a single compressed filesystem using SquashFS. In order to test it we need to mount/uncompress the file.

1) unpack the snap file: **unsquashfs -d /tmp/ \<folder that will be created> \<.snap file>**
2) move to the newly created folder with unpacked data
3) the app should be in the root, just execute it

Note: i choose /tmp folder but anyone can choose where to unpack the snap file

---
Try a snap file is really really easy but nowhere I found how to do it, hope that this short post will help you.

Maybe more posts about snap will follow
Game changers in EventStorming - Pivotal Events
Tags: eventstorming, eventmodeling, ddd, domaindrivendesign
Published: 2021-01-30 12:43:27

Pivotal Events are game changers in the Event Storming sessions. They can be used as:
- a sorting strategy
- candidates for system's boundaries
- markers for the transition between different business phases
- a helper to look for places where exchanging business value for some other value (for example money, reputation) happens

Pivotal events change the rules of the game. They're highlighting important things happening in our domain.
For example, for an e-commerce website it could be Article Added to Catalogue, Order Placed, Order Shipped, Payment Received, and Order Delivered. These are often the events with the highest number of people interested. Also, those can trigger reactions in other departments.
Once a pivotal event happens, the flow might be a little bit different. Let's look at a very simple example.

Once the order is placed, in most places can be changed, for any reason. But once the order is shipped... Well, the change in the order is much harder to do. That's the pivotal event. Once it happened, the rules of the game changed. The time for changing the order has passed. We may need the policy to handle those cases.
DeepNote
Tags: ai, machinelearning, datascience, deepnote
Published: 2021-01-30 12:29:10

# Deepnote is the new browser based development tool for data scientist and anyone that works with data.

## Deepnote offers many features and it's simplicity is what makes it even more amazing than others.

### Deepnote is like a fusion of vscode and google colab, in the sense that it allows live collaboration with teammates and on its new features is commenting on your teammates code.

### Deep note is super simple to setup, just make an account, and get the free tier or the other many tiers they offer and get your machine running. Deepnote also offers integrations with github, many databases and more.

### it already has like libraries like numpy,pandas,TensorFlow,keras,scrapy installed on the machine to make work faster.

https://deepnote.com/
AlphaFold e a predição de estruturas
Tags: bioinformatics, alphafold2, deepmind, google
Published: 2021-01-30 12:27:02

A estrutura terciária de uma proteína possui relação direta com o seu funcionamento e com diversos processos biológicos, muitos deles ligados ao funcionamento do corpo humano e ao surgimento e desenvolvimento de diversas doenças. Embora existam métodos de wet-lab para obtenção deste tipo de dado biológico, o emprego de técnicas computacionais é capaz de permitir a obtenção de uma quantidade dezenas de vezes maior em um tempo absurdamente menor, agilizando o avanço de diversas pesquisas.

Um dos principais "desafios do milênio" no mundo da bioinformática é justamente predizer como seria a estrutura terciária de uma proteína utilizando somente sua sequência de aminoácidos. O desafio é tal que em 1994 foi criada uma verdadeira "Copa do Mundo" [2], o CASP, destinada a monitorar os avanços na resolução deste problema. A regra é  clara: se o modelo possuir uma "taxa de acerto" igual ou maior a 80%, então ele é tão bom quanto as técnicas experimentais de resolução de estruturas [3]. Por ser um problema NP-Difícil [1], esperava-se que ele fosse resolvido só depois de muitas décadas.

E eis que, 26 anos depois do primeiro CASP, aquela barreira dos 80% foi batida. Criado pela DeepMind [4] (subsidiária da 
Google destinada à produção de soluções em IA), o AlphaFold, em sua segunda versão, se propõe a predizer estruturas utilizando uma arquitetura robusta de Deep Learning aliada a modelagens da física e matemática já utilizadas por outros preditores mais tradicionais. Em 2020, no CASP 14, ele atingiu uma média de acerto 92,4%, "sucesso" tal que os próprios organizadores da "Copa" declaram que o desafio estava oficialmente resolvido [6].

Os impactos científicos, tecnológicos, e até mesmo sociológicos deste grande feito podem ser conferidos em mais detalhes  neste post [3] (em inglês) do blog do Mohammed AlQuraishi. Resta-nos agora saber (e aguardar) como ocorrerá o acesso a esta tecnologia: quem poderá usufruir primeiro, do que será possivel usar, quanto será preciso pagar etc. Afinal, como a solução veio com mundo corporativo, alguns dilemas e questões começam a surgir.

Referências

[1] https://www.brown.edu/Research/Istrail_Lab/papers/2001/2001_newman_chapter.pdf
[2] https://predictioncenter.org/
[3] https://moalquraishi.wordpress.com/2020/12/08/alphafold2-casp14-it-feels-like-ones-child-has-left-home/
[4] https://deepmind.com/
[5] https://deepmind.com/blog/article/alphafold-a-solution-to-a-50-year-old-grand-challenge-in-biology
[6] https://predictioncenter.org/casp14/doc/CASP14_press_release.html
Starting a new project
Tags: webdev, android, kotlin, startup
Published: 2021-01-30 12:19:44

I am starting a new project where I will be developing a product which I have in mind for a while and it is based on my wife's work as a Coach helping people to improve their quality of life creating better exercise and eating habits, I know there's a lot of apps out there but nothing that fits my wife's way of work.

I have vast working experience as a back end developer and operations and some limited experience with Android mobile development. My main background is Java, Javascript, Linux and more recently I've been looking into Kotlin.

I am starting this blog so I can share my learning experience building this project and get feedback to learn and improve. 

I will start the project developing an Android mobile application to improve where I have the biggest gap of knowledge to accomplish my goal. I am planning to publish tutorials and document my journey here, I know it will be a long journey as this is a side project but I am prepared to invest a couple of years of my free time in this. 

My first technical post will most likely be related to manipulating images within an Android Application as the app will require taking and manipulating images, stay tuned.



<span>Photo by <a href="https://unsplash.com/@ngeshlew?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Lewis Ngugi</a> on <a href="https://unsplash.com/s/photos/coding?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Google popup sign in with react and firebase
Tags: react, javascript, firebase
Published: 2021-01-30 11:48:01

# set up firebase config:


```
var firebaseConfig = {
    apiKey: "super secret keys.....asgvegxgevergfvr",
    authDomain: "tallans-imageupload-tutorial.firebaseapp.com",
    databaseURL: "https://tallans-imageupload-tutorial.firebaseio.com",
    projectId: "tallans-imageupload-tutorial",
    storageBucket: "tallans-imageupload-tutorial.appspot.com",
    messagingSenderId: "super secret keys.....asgvegxgevergfvr",
    appId: "super secret app id....adsfa;lsdkjf",
    measurementId: "super secret as;dlkfjal;dskjf"
  };
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();
```
# then ::
```
make npx-create-react-app client
and ::
npm i or yarn add firebase 
and react-router-dom
```
now::
```
cd client 
cd src
mkdir componets/login.js
```



# App.js::
==========
```
import React from 'react'
import './App.css'
import Login from './components/Login'
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import Logout from './components/Logout'
import Welcome from './components/Welcome'
const App = () => {
  return (
    <div>
      
      <Router>
        <Switch>
          <Route exact path="/" component={Login} />
          <Route exact path="/home" component={Logout} />
          <Route exact path="/welcome" component={Welcome} />
        
        </Switch>
      </Router>

    </div>
  )
}

export default App
```







login.js::
=================
```
import React from 'react'
import firebase from '../services/firebase'
import {useHistory} from 'react-router-dom'
import './Login.css'
const Login = () => {
const history = useHistory();
    const signInWithGoogle = () => {
        const provider = new firebase.auth.GoogleAuthProvider();
        firebase.auth().signInWithPopup(provider)
            .then((success) => {
                
                let user = success.user;

                const obj = {
                    username : user.displayName,
                    email:user.email,
                    uid:user.uid,
                    img:user.photoURL
                }
                console.log(obj)
                localStorage.setItem('codecaamp',JSON.stringify(obj))
                history.push('/welcome')
            })
            .catch(err => err.message)
    }

    return (
        <div className="login-buttons">
            <div  className="ikmg"><img width="200px" src="https://res.cloudinary.com/codecaamp/image/upload/v1610815107/Purple_Modern_Technology_Gaming_Logo_gqpbv2.png" alt="codecaamp"/></div>
            <h2 style={{fontFamily:"monospace",fontSize:"40px"}}>Welcome to Codecaamp</h2>
            <h3>Continue With</h3>
            <button className="login-provider-button" onClick={signInWithGoogle}>
                <img src="https://img.icons8.com/ios-filled/50/000000/google-logo.png" alt="google icon" />
                <span> Continue with Google</span>
            </button>
        </div>
    )
}

export default Login
```
CKEditor in PHP Installation and Uses
Tags: php, ckeditor
Published: 2021-01-30 11:40:59

What is CKEditor?
It is a Modern JavaScript rich text editor. It provides the perfect WYSIWYI UI for creating semantic content.

CKEditor5 is written in ES6 with MVC Architecture.

CKEditor provides rich text editor with auto formatting, Paste from word, Embed media and Responsive images.

It is also designed to handle tree structure complex data model. It also allows collaboration for real time complex structures.


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>CKEditor 5 – Classic editor</title>
    <script src="https://cdn.ckeditor.com/ckeditor5/22.0.0/classic/ckeditor.js"></script>
</head>
<body>
    <h1>Classic CKEditor5</h1>
    <div id="editor">
        <p>Classic CKEditor Working Fine</p>
    </div>
    <script>
        ClassicEditor
            .create( document.querySelector( '#editor' ) )
            .catch( error => {
                console.error( error );
            } );
    </script>
</body>
</html>


A simple configuration of CKEditor in PHP
https://www.ebhor.com/php-ckeditor-installation-and-uses/
JS  Hoisting
Tags: hoisting, javascript, fundementals
Published: 2021-01-30 11:36:12

Hello there guys,

I hope you everybody has a nice weekend,creative and passionate for some coding time.

What the hack is hoisting?
It is a term that i used to found commonly when i started learning JS and it is confuse sometimes, but trust me its a just a luxurines of JS that can be explained real quick.

In simple worlds hoisting, points to  variable's declaration and initiation.
You can use a variable before you will declare it.
Let's say that you have this :
```
\\assign value to variable before declaration

name = 'Dimitris';

const showName = () => {
 console.log(name);
}

\\Declare variable after the value's assignment
let name ;

showName();
```
To understand the above example,you should have the thought in your mind that hoisting means every declaration is going to the top of the programm even if it is physically sits somewhere else.


So above we have a value that is assigned before the variable declaration.Is working fine, Yes you did it you used hoisting.
Congratulations.!

Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.
GitHub : https://github.com/feco2019
Linkedin : https://www.linkedin.com/in/dimitris-chitas-930285191/
Applications of IoT ( Internet of Things)
Tags: iot
Published: 2021-01-30 11:35:52

1 Applications of IoT in Wearables
2 Applications of IoT in Smart Home Applications
3 Applications of IoT in Healthcare
4 Applications of IoT in Smart Cities
5 Applications of IoT in Agriculture
6 Applications of IoT in Industrial Automation
7 Applications of IoT in Traffic Monitoring
8 Applications of IoT in fleet management
9 Applications of IoT in hospitality
10 Applications of IoT in Smart Grid and Energy Saving
11 Applications of IoT in Water Supply

Read More
https://www.ebhor.com/applications-of-iot/
Cara Membuat Newsletter Subscribers dengan Laravel
Tags: laravel, subscription
Published: 2021-01-30 10:57:04

Ini cara aku bagaimana membuat atau mengelola Newsletter Subscribers internal yang mudah dan gratis dengan Laravel untuk mengirimkan notifikasi berupa email ke daftar subscriber mengenai konten baru pada situs blog.adityacprtm.com sebelum beralih ke wordpress.

> update: beralih ke [dev.to/adityacprtm](https://dev.to/adityacprtm)

Solusi lainnya dapat menggunakan jasa penyedia Newsletter Subscription seperti MailChimp. Namun jika tidak ingin menggunakan pihak ketiga untuk menyimpan data Subscriber, kita dapat membuatnya sendiri dengan laravel menggunakan package dari [mydnic/laravel-subscribers](https://github.com/mydnic/laravel-subscribers).

# Instalasi

Diasumsikan telah memiliki proyek laravel yang sudah siap.

Kita dapat menggunakan Composer untuk menginstal, package akan otomatis terpasang

```
composer require mydnic/laravel-subscribers
```

Kemudian lakukan publish migrasi:

```
php artisan vendor:publish --provider="Mydnic\Subscribers\SubscribersServiceProvider" --tag="subscribers-migrations"
```

# Cara Penggunaan Newsletter Subscribers

Kita hanya perlu membuat sebuah form, kemudian sesuaikan:

```
<form action="{{ route('subscribers.store') }}" method="post">
    @csrf
    <input type="email" name="email">
    <input type="submit" value="submit">
</form>
@if (session('subscribed'))
    <div class="alert alert-success">
        {{ session('subscribed') }}
    </div>
@endif
```

# Unsubscribe atau Hapus

Cukup berikan tautan ini ke subscriber:

```
<a href="{{ route('subscribers.delete', ['email' => $subscriber->email]) }}">unsubscribe</a>
```

Baris tersebut akan menghasilkan tautan seperti: `/subscribers/delete?email=email@example.com`

---

That’s it! Selanjutnya siapkan template untuk email.
Artificial Limb Center in Delhi | Artificial Leg Center, Prosthetic limb fitting Center
Published: 2021-01-30 10:24:21

Best in 2020 Artificial Limb Center in Delhi. Helpline +91-8881788788 for High Quality Artificial Limbs in Delhi India, Robotic Myo electric hand limbs in India, P & O International Can give you the Best artificial prosthetic Limbs, artificial limbs in Delhi, artificial limbs cost, artificial limbs in Delhi. Artificial limbs hands, Good Discount & Light Weight hand Prosthesis, Artificial hand
More Visit Now:-https://www.pointernational.in/
apt-xapian-index on Debian based distro's fails to update (fixed)
Tags: linux, debian, bug
Published: 2021-01-30 09:34:36

Debian 10 and derived distro's have a bug in the apt-xapian-index package. This package can be used to add a quick search box in Synaptic. While the package installs fine, the 'update-apt-xapian-index' command fails to complete every time, which prevents the quick search box to ever show up in Synaptic. This bug was reported to Debian on 23 August 2019, but it has not yet been fixed.

The problem is in a python script called 'relations.py' which is located in /usr/share/apt-xapian-index/plugins/. At line 113 and 114 the code is:

        for name in self.re_split.split(val):
            doc.add_term(pfx + name.split(None, 1)[0])

This should be:

        for name in self.re_split.split(val):
            doc.add_term(pfx + name.split(' ', 1)[0])

Change this using your favorite editor, such as Nano with root permissions. Then run 'update-apt-xapian-index' again.

I encountered this bug in the most recent SparkyLinux (version 5.13) and this fix solves the problem.

For completeness, in order to add the quick search box to Synaptic, install the package:

    ~$ sudo apt install apt-xapian-index

Then apply the above fix.

Finally, update the index with:

    ~$ sudo update-apt-xapian-index

Start Synpatic and you should have the quick search box.
Citus Data - Tưởng dễ mà khó không tưởng
Published: 2021-01-30 09:23:25

Đây là loạt bài về Citus Data cũng như hệ quản trị cơ sở dữ liệu phân tán. Một trong những xu hướng mới khi kết hợp với microservices. Hi vọng loạt bài viết này sẽ giúp cho bạn hiểu được cái nhìn tổng quan nhất về cơ sở dữ liệu phân tán cũng như Citus Data


Chia để trị, Xu hướng phân tán - Một xu hướng đi đâu cũng gặp!
http://blog.ntechdevelopers.com/chia-de-tri-xu-huong-phan-tan-mot-xu-huong-di-dau-cung-gap/

Citus data (cơ sở dữ liệu phân tán) và câu chuyện tăng hiệu năng
http://blog.ntechdevelopers.com/citus-data-va-cau-chuyen-tang-hieu-nang-phan-1/

PostgreSQL liệu có như tuyên bố "Cơ sở dữ liệu mã nguồn mở tiên tiến nhất thế giới"
http://blog.ntechdevelopers.com/postgresql-lieu-co-nhu-tuyen-bo-co-so-du-lieu-ma-nguon-mo-tien-tien-nhat-the-gioi/

Citus Data - Phải chăng bạn có nên sử dụng nó hay không?
http://blog.ntechdevelopers.com/citus-data-phai-chang-ban-co-nen-su-dung-no-hay-khong/

Xây dựng web app multi-tenant đơn giản với Citus data và AspNet Core
http://blog.ntechdevelopers.com/xay-dung-web-app-multi-tenant-don-gian-voi-citus-data-va-aspnet-core/

Hiểu về Sharding trong Citus Data
http://blog.ntechdevelopers.com/hieu-ve-sharding-trong-citus-data/

Sharding trong Citus Data không hề đơn giản như bạn nghĩ
http://blog.ntechdevelopers.com/sharding-trong-citus-data-khong-he-don-gian-nhu-ban-nghi/

Xây dựng real-time analytics dashboards với Postgres và Citus
http://blog.ntechdevelopers.com/xay-dung-real-time-analytics-dashboards-voi-postgres-va-citus/


--
 Source code: Github
https://github.com/vuthanhnam94/ntech.citusdata
Lương - Minh bạch hay bí mật? 
Published: 2021-01-30 09:22:14

Bạn được trả lương bao nhiêu
Đừng nói ra thành lời, hãy giữ con số đó trong đầu bạn
Giờ thì hãy nghĩ bạn bè của bạn được trả lương bao nhiêu?
Ở nơi làm việc, đồng nghiệp ngồi cùng phòng hoặc ngồi ngay bên cạnh bạn được trả bao nhiêu?
Bạn có biết được không?
Bạn có nên biết không nhỉ?
Thật ra, khi hỏi các bạn mấy câu đó ngay bản thân mình còn thấy không thoải mái
Nhưng phải công nhận một điều ai cũng muốn biết đúng không.
Hầu hết chúng ta thấy khó chịu với việc phái công khai lương của mình mặc dù chỉ là ý nghĩ trong đâu


http://blog.ntechdevelopers.com/luong-minh-bach-hay-bi-mat-ly-do-phia-sau-no-va-con-duong-phia-truoc-ban/