teleren/devto huggingface dataset:
I launched a Free Drag and Drop Dashboard Builder
Tags: css, javascript, webdev, html
Published: 2021-04-24 13:24:51

Hi,

I recently launched the **Beta** version of **Loopple**, a **Free Drag and Drop Dashboard Builder** that aims to help developers to speed up the development process. 

Currently, the builder is built using the Argon Dashboard from Creative Tim.

I am now looking for feedback to see what do you think about this project and what would you like me to add in the next versions that can ease your development work.

- [Loopple](https://www.loopple.com/) - Loopple Website
- [Loopple](https://github.com/Loopple/loopple) - Github Repo

Thank you!
Kotlin Firebase Realtime Database – Get List of Data example | Android

Tags: kotlin, firebase, android
Published: 2021-04-24 13:14:15

https://grokonez.com/android/kotlin-firebase-realtime-database-get-list-data-example-android

Kotlin Firebase Realtime Database – Get List of Data example | Android


In previous <a href="https://grokonez.com/android/kotlin-firebase-realtime-database-readwrite-data-example-android">post</a>, we had known how to read/write single data object. Today, we're gonna look at way to get List of Data in an Android App.

Related Article:
<a href="https://grokonez.com/android/kotlin-firebase-realtime-database-readwrite-data-example-android">Kotlin Firebase Realtime Database – Read/Write Data example | Android</a>

More Practice:
<a href="https://grokonez.com/android/kotlin-firebase-realtime-database-display-list-data-kotlin-firebaserecycleradapter-example-android">Kotlin Firebase Realtime Database – Display List of Data with FirebaseRecyclerAdapter | Android</a>

<!--more-->
<h2>I. Way to get List of Data</h2>
<h3>0. Add Firebase to Android App</h3>
Please visit <a href="https://grokonez.com/android/kotlin-firebase-realtime-database-readwrite-data-example-android#0_Add_Firebase_to_Android_App">Kotlin - Add_Firebase_to_Android_App</a> for details.
<h3>1. Write to specific child of a node</h3>
Before retrieving all data item from a list, we need a node that contains child nodes as data items. So we should write data to each node at first.

Assume that we have a class like this:
<pre><code class="language-java">
@IgnoreExtraProperties
class Message {

    var author: String? = ""
    var body: String? = ""
    var time: String? = ""

    constructor() {
        // Default constructor required for calls to DataSnapshot.getValue(Message.class)
    }

    // ...

    @Exclude
    fun toMap(): Map<String, Any> {
        val result = HashMap<String, Any>()
        result.put("author", author!!)
        result.put("body", body!!)
        result.put("time", time!!)

        return result
    }
}</code></pre>
Use the <code>updateChildren()</code> method, we can write data to specific child node without overwriting other child nodes (by specifying a path for the key):

More at:

https://grokonez.com/android/kotlin-firebase-realtime-database-get-list-data-example-android

Kotlin Firebase Realtime Database – Get List of Data example | Android
Online Rich Markdown Editor
Tags: markdown, showdev
Published: 2021-04-24 13:08:06

Hi,

I am back with the new tool on GoOnlineTools which you use to write markdown easily in the browser using rich markdown editor :)

Today in this post I will introduce [Markdown Editor](https://goonlinetools.com/markdown-editor/)

![GoOnlineTools Markdown Editor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1s73jh7a3mgxwjb1ubpg.png)

## Features of Markdown Editor

* Rich Markdown Editor
* Download full markdown file
* Copy entire markdown
* Data is fully safe, nothing is stored
* Works without internet (App required)

## How to use Markdown Editor?

1. First open this [markdown editor](https://goonlinetools.com/markdown-editor/)
2. Start typing and use the editor toolbar
3. Now click on the download button to download all markdown codes.

If you think any feature added to this Markdown Editor tool then please let me know. I am looking for developers feedback 😍

Update - our tools are now ad-free 🎉
Use useSelector and useDispacth in Your React Redux Application
Tags: react, redux
Published: 2021-04-24 13:05:33

React's new "hooks" APIs give function components the ability to use local component state, execute side effects, and more. React also lets us write custom hooks, which let us extract reusable hooks to add our own behavior on top of React's built-in hooks.

React Redux includes its own custom hook APIs, which allow your React components to subscribe to the Redux store and dispatch actions

[Use useSelector and useDispacth in Your React Redux Application](https://www.codecheef.org/article/use-useselector-and-usedispacth-in-your-react-redux-application)

#READ ALSO
[Spread Operator and Rest Operator Example in JavaScript](https://www.codecheef.org/article/spread-operator-and-rest-operator-example-in-javascript)
Cron expression parser for Golang
Tags: go, cron, parser, cronexpr
Published: 2021-04-24 12:58:17

{% github adhocore/gronx %}

## Installation

```sh
go get -u github.com/adhocore/gronx
```

## Usage

```go
import (
	"time"

	"github.com/adhocore/gronx"
)

gron := gronx.New()
expr := "* * * * *"

// check if expr is even valid, returns bool
gron.IsValid(expr) // true

// check if expr is due for current time, returns bool and error
gron.IsDue(expr) // true|false, nil

// check if expr is due for given time
gron.IsDue(expr, time.Date(2021, time.April, 1, 1, 1, 0, 0, time.UTC)) // true|false, nil
```

In a more practical level, you would use this tool to manage and invoke jobs in app itself and not
mess around with `crontab` for each and every new tasks/jobs. It doesn't yet replace that but rather supplements it.
There is a plan though [#1](https://github.com/adhocore/gronx/issues/1).

In crontab just put one entry with `* * * * *` which points to your Go entry point that uses this tool.
Then in that entry point you would invoke different tasks if the corresponding Cron expr is due.
Simple map structure would work for this.

---
### Cron Expression

Cron expression normally consists of 5 segments viz:
```
<minute> <hour> <day> <month> <weekday>
```
and sometimes there can be 6th segment for `<year>` at the end.

For each segments you can have multiple choices separated by comma:
> Eg: `0,30 * * * *` means either 0th or 30th minute.

To specify range of values you can use dash:
> Eg: `10-15 * * * *` means 10th, 11th, 12th, 13th, 14th and 15th minute.

To specify range of step you can combine a dash and slash:
> Eg: `10-15/2 * * * *` means every 2 minutes between 10 and 15 i.e 10th, 12th and 14th minute.

For the 3rd and 5th segment, there are additional [modifiers](#modifiers) (optional).

And if you want, you can mix them up:
> `5,12-20/4,55 * * * *` matches if any one of `5` or `12-20/4` or `55` matches the minute.

### Real Abbreviations

You can use real abbreviations for month and week days. eg: `JAN`, `dec`, `fri`, `SUN`

### Tags

Following tags are available and they are converted to real cron expressions before parsing:

- *@yearly* or *@annually* - every year
- *@monthly* - every month
- *@daily* - every day
- *@weekly* - every week
- *@hourly* - every hour
- *@5minutes* - every 5 minutes
- *@10minutes* - every 10 minutes
- *@15minutes* - every 15 minutes
- *@30minutes* - every 30 minutes
- *@always* - every minute

```go
gron.IsDue("@5minutes")
```

### Modifiers

Following modifiers supported

- *Day of Month / 3rd segment:*
    - `L` stands for last day of month (eg: `L` could mean 29th for February in leap year)
    - `W` stands for closest week day (eg: `10W` is closest week days (MON-FRI) to 10th date)
- *Day of Week / 5th segment:*
    - `L` stands for last weekday of month (eg: `2L` is last monday)
    - `#` stands for nth day of week in the month (eg: `1#2` is second sunday)
Free 100$ Hosting Credit For Everyone
Tags: offers
Published: 2021-04-24 12:55:50

Hi,

Today I got an email from Linode about 100$ free credit for hosting. So I thought why not share this with developers. If you are looking for hosting then you must try Linode for 60 days without any charges.

If you don't know what is Linode then continue reading this guide.

Linode is a  web hosting company that provides cloud hosting via VPS hosting plans that run on Linux-only servers. With its global data centers, Linode makes a great hosting choice for clients who want the power and responsibility of running their own virtual web servers hands-on.

![Linode promo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eut55mbumdinbocwzr78.png)

## Here is how to get 100$ free credit on Linode?

1. Go to Linode offer page [from here](https://linode.gvw92c.net/c/1929920/939219/10906)
2. Enter your email address and then click on create a free account.
3. Now enter username and password
4. Enter billing address and then click on create account

That’s it now you will get 100$ free credit for 60 days :)

I hope you will get this offer.
Loops in SCSS
Tags: sass, scss
Published: 2021-04-24 12:39:24

Loops are an exciting part of SCSS - it's like you're writing JavaScript in your CSS. But I never had a chance to use them, until recently.

## The problem

I had three cards beside each other and I wanted each one to be a bit lower than the one on the right of it. Which isn't hard to do:
```
.card:nth-last-of-type(2) {
  transform: translateY(2em);
}
.card:last-of-type(3) {
  transform: translateY(3em);
}
```

Simple. But what if something changed I had more than three cards? And/or the distance they are lower than the next needs to change? It could end up with quite a bit of typing.

## Loops to the rescue

With a loop you can do the transform for all the cards at once. And if you want them to be a different distance, it's easy to do.

Confusingly, SCSS has two types of loop. One that doesn't include the end and one that does. I'm using the one that does because that makes the most sense to me.
```
@for $i from 1 through 3 {
  .card:nth-last-of-type(#{$i}) {
    transform: translateY(($i - 1) * 1em);
  }
}
```

The downside is that now looks really complicated. Let's unpack it.

## The solution

```
@for $i from 1 through 3 {
```
The first line here is telling it to loop from 1 to 3, inclusive (so it goes 1, 2, 3). Each time round the loop, it keeps track of which number we're on using $i. So the first time round the loop $i is 1, the second time $i is 2, etc.

```
.card:nth-last-of-type(#{$i}) {
```
The second line is slightly complicated by wanting to go backwards through the cards. Of our three cards, card 3 is at 0, card 2 is down by 1em and and 3 is down by 2em. In order to make the formula on the third line work, we need to think about these backwards. nth-last-of-type(1) is the last card (ie card 3), nth-last-of-type(2) is the second-to-last card (ie card 2).

We can't just use $i in our CSS selector, so we have to put #{} around it, so it knows this is something it needs to interpret, and not something to be taken literally.

The third line is where the maths comes out.
```
transform: translateY(($i - 1) * 1em);
```
This is the line that's working out how far to move the card. It's easiest to work this out going through each loop at a time.
1. $i = 1, nth-last-of-type(1) = card 3. translateY(1 - 1) x 1em = translateY(0) x 1em = moving down by 0em
2. $i = 2, nth-last-of-type(2) = card 2. translateY(2 - 1) x 1em = translateY(1) x 1em = moving down by 1em
3. $i = 3, nth-last-of-type(3) = card 1. translateY(3 - 1) x 1em = translateY(2) x 1em = moving down by 2em

## Scaling it up
We can now easily scale the loop up so we have 10 cards and each card moves down by 0.5em.
```
@for $i from 1 through 10 {
  .card:nth-last-of-type(#{$i}) {
    transform: translateY(($i - 1) * 0.5em);
  }
}
```
From our original loop I only changed two things:
1. The number of cards on line 1
2. The distance they move on line 3

Which is a lot easier than pasting the same snippet of code in 10 times.
Kotlin Firebase Realtime Database - Display List of Data with FirebaseRecyclerAdapter | Android
Tags: kotlin, android, firebase, firebaserecycleradapter
Published: 2021-04-24 12:22:34

https://grokonez.com/android/kotlin-firebase-realtime-database-display-list-data-kotlin-firebaserecycleradapter-example-android

Kotlin Firebase Realtime Database - Display List of Data with FirebaseRecyclerAdapter | Android

In previous <a href="https://grokonez.com/android/kotlin-firebase-realtime-database-readwrite-data-example-android">post</a>, we had known how to read/write list of data object. Today, we're gonna look at way to display List of Data in an Android App with FirebaseUI <code>FirebaseRecyclerAdapter</code>.

Related Articles:
- <a href="https://grokonez.com/android/kotlin-firebase-realtime-database-readwrite-data-example-android">Kotlin Firebase Realtime Database – Read/Write Data example | Android</a>
- <a href="https://grokonez.com/android/kotlin-firebase-realtime-database-get-list-data-example-android">Kotlin Firebase Realtime Database – Get List of Data example | Android</a>

<!--more-->
<h2>I. FirebaseUI Database</h2>
To use the FirebaseUI to display list of data, we need:
- Java class for data object (<strong>Model</strong>)
- Java class for holding UI elements that match with Model's fields (<strong>ViewHolder</strong> and layout)
- Custom RecyclerView adapter to map from a collection from Firebase to Android (<strong>FirebaseRecyclerAdapter</strong>)
- <strong>RecyclerView</strong> object to set the adapter to provide child views on demand.

<img src="https://grokonez.com/wp-content/uploads/2017/12/kotlin-firebase-db-recycleradapter-demo.png" alt="kotlin-firebase-db-recycleradapter-demo" width="325" height="517" class="alignnone size-full wp-image-10127" />
<h3>1. Model and ViewHolder</h3>
- <code>Model</code> class is a class that represents the data from Firebase:
<pre><code class="language-java">
class Message {

    var author: String? = ""
    var body: String? = ""
    var time: String? = ""

    // ...
}
</code></pre>
- <code>ViewHolder</code> layout (R.layout.item_message) with UI items that correspond to <code>Model</code> fields:


More at:

https://grokonez.com/android/kotlin-firebase-realtime-database-display-list-data-kotlin-firebaserecycleradapter-example-android

Kotlin Firebase Realtime Database - Display List of Data with FirebaseRecyclerAdapter | Android
5 Short CSS Snippets that will Make Big Difference
Tags: css, codepen, webdev, html
Published: 2021-04-24 12:13:42

Styles and themes of a website or an app make a huge difference for the use experience. Here are some short code snippets that will make your app or web page look 10x attractive and beautiful. 


### Custom Text Selection
You can change the selection style for your HTML pages using `::selection` pseudo class.
```css
::selection{
  background-color: deeppink;
  color: white;
}
```
{% codepen https://codepen.io/MuhammadWasif/pen/gOgqrav %}

### Gradient Text 
Gradient background for text can make your interface 10x more beautiful and attractive. Feel free to use this styling for big headings of your web pages.
```css
.gradient-text {
  background:  linear-gradient(to top, #30cfd0 0%, #330867 100%);
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  font-size: 32px;
}
```
{% codepen https://codepen.io/MuhammadWasif/pen/mdRvPPp %}

### Disable Select
Set `user-select` CSS property to none. This will disable text selection in your web pages. This pretty useful when you're making PWAs. This can help you provide native app like experience.
```css
p {
  user-select: none;
}
```
{% codepen https://codepen.io/MuhammadWasif/pen/XWpOdNm %}

### Full Screen Mode
Full screen mode for showing images is pretty useful and makes a big difference. You can also use this in your blogs where user can read in full screens. Pretty useful. Right?
```css
#element:fullscreen {
  width: 100vw;
  height: 100vh;
}
```
And enter this full screen mode by executing following JavaScript function.
```javascript
var el = document.getElementById('element'); el.requestFullscreen();
```
{% codepen https://codepen.io/MuhammadWasif/pen/NWdoNpo %}

### Custom Scroll Bar
Scroll bars that match with theme of your website or app make huge difference. Always change scroll bars styling and make it look good according to you app's theme.  
You can style each element of scroll bar by targeting `::-webkit-scrollbar`, `::-webkit-scrollbar-track` and `::-webkit-scrollbar-thumb`
```css
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: pink;
  border-radius: 12px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: deeppink;
  border-radius: 12px;
}
```
{% codepen https://codepen.io/MuhammadWasif/pen/OJWdNmo %}

That's it! Leave some short snippets in comments if you know some.
Using Ruby Procs to improve readability
Tags: ruby, rails, 5days5blogposts
Published: 2021-04-24 12:12:52

---
title: Using Ruby Procs to improve readability
published: true
description: 
tags: ruby, rails, 5days5blogposts
---

We always try to avoid adding comments to our code. There may be some exceptions but ideally the code itself should clearly express what it is doing.

In this pursuit of code readability and expressiveness Procs are helpful in many scenarios. For example when we are dealing with a complex logic within a block we want to pass to a method (`map`, `select`, etc) from the [Enumerable](http://ruby-doc.org/core-2.2.3/Enumerable.html) module.

### Before
```ruby
def self.error_messages(errors)      
  errors.map { |e| e.message.split(":")[3].strip rescue "" }.uniq.join(", ")
end
```

Let's focus on the block `{ |e| e.message.split(":")[3].strip rescue "" }` we are passing to the `map` method. It is not extremely complex but still getting your head around it could take a while especially if it is the first time to face this code or functionally within an application.

### After

```ruby
def self.error_messages(errors)
  extract_readable_message = proc { |e| e.message.split(":")[3].strip rescue "" }
  errors.map(&extract_readable_message).uniq.join(", ")
end
```

This second version adding a Proc didn't change what the code does, but now anyone coming to these lines of code will easily understand not only what the code does but also why it does it.

What you think? Do you find this is worth it? Have you ever add a Proc as a way to improve readability?
Daily Developer Jokes - Saturday, Apr 24, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-04-24 12:00:08

---
title: "Daily Developer Jokes - Saturday, Apr 24, 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%20Apr%2024%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/5e12588a43d6b.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 do you call an idle server?

___A:___ A waiter.
 -->
Download best Email Converter Tool for Windows
Tags: emailconverter, emailconversion, emailconvertertool
Published: 2021-04-24 11:59:56

If you want to convert Thunderbird files to Outlook emails, you can use this Email Converter Tool, which can convert all Thunderbird emails to Outlook and perform migration between different email clients. This Email Converter is a multi-conversion tool that can convert a variety of email files including PST, EML, EMLX, OST, Thunderbird, NSF, MBOX, TGZ, MSG, and others. 

During conversion, it maintains data integrity and preserves the original formatting as it was before conversion. You should try out the free trial version of this app first to get a feel for its features and functions. This software also offers a more user-friendly interface for intensive conversion.

Visit here https://www.filesrecoverytool.com/email-converter.html to get more information about this software
Get Nested Property from a Object in JS 
Published: 2021-04-24 11:41:34

Recently Stumbled upon this nice snippet for accessing Nested property using String.

```javascript
/**
 * get property of object
 * @param obj object
 * @param path e.g user.name
 */
function getProperty(obj, path, defaultValue = '-') {
    const value = path.split('.').reduce((o, p) => o && o[p], obj);
  
    return value ? value : defaultValue;
  }
``` 
and this how you use it 

```javascript
getProperty(object, 'passengerDetails.data.driverInfo.currentVehicle.vehicleType')
```

Reference 
https://stackoverflow.com/a/64239231/11164153

Would be interested to learn if there is any other easier or better way.
Make 11760 Euros per month as a Freelancer More freedom in IT
Tags: dotnet, react, programming, career
Published: 2021-04-24 11:04:02

The year 2020 was a year with many surprises and changes. I guess you guessed it, the biggest surprise was the COVID-19 pandemic due which many industries suffered but there were also industries that developed in an alert way and that adapted to the new conditions without too much effort.

For IT industry, the biggest challenge was moving employees from offices to the online environment, working from home. After this step, the mindset of corporate managers changed and they began to give more freedom to employees, becoming even more open to future collaborations.

Gradually, the big brands agreed to work with outsourcing companies outside their countries of origin, and even started hiring from abroad for their projects in full remote mode. 

At the moment, the main problem in the IT industry is not the pandemic or the lack of projects, but rather the main problem is the lack of staff. There are many projects that cannot be developed due to the lack of staff in this field.

The effect of the snowball has made its presence felt and now the snowballs are constantly growing and it is possible to become a giant.

Lack of staff has helped freelancers grow. Some, in the IT industry, work on 2 or 3 projects at the same time, somewhere at 10-16 hours a day. The current conditions are very favorable for freelancers because many corporations have started working with contractors. In the online environment, [Freelance online jobs](https://www.wearehiring.top/Freelance-jobs-online) are at your discretion.

It should be mentioned that freelancers work on hourly rates and these rates depend on the complexity of the project but also on the client's location. Thus, the best clients, such as those from Germany or Switzerland, end up paying 60 euros/h and clients with smaller budgets in Malta end up paying somewhere around 22.5 euros/h for a Senior position. Now it's perfect time to [Discover Freelancer](https://www.wearehiring.top/) lifestyle.

After a discussion with an experienced freelancer who worked on two projects, I found out that he had come to charge approximately 70 euros/h in February. This rate was calculated for 2 full time projects where the daily tasks were solved in about 10 hours and not 16 as would have been normal. Per month will be approximately 11760 euro.

Questions for you:
1. What do you think about freelancing lifestyle?
2. Do you like it or do you think to try in future?
3. Are you currently a freelancer?
4. [We are hiring join our team?](https://www.wearehiring.top/JoinAsAFreelancer)