teleren/devto huggingface dataset:
A futuristic dark theme `Aurora Future`
Tags: vscode, design, webdev, javascript
Published: 2021-04-17 16:32:34

# Aurora Future

> This theme is inspired by **Adam Argyle**'s [Kung-Fury-Theme](https://github.com/argyleink/Kung-Fury-Theme).

**Purple**, **pink** and **blue** are the main colors of this theme. These colors combine give us a futuristic feel. The color scheme is inspired by Adam Argyle's theme.

However I have change the colors, to follow the colors used in `Auroral-UI`, basically the same colors used in my [Hexo Theme Aurora](https://github.com/auroral-ui/hexo-theme-aurora).

## Why make this theme?

First is because I fall in love with Adam Argyle's sublime3 theme when I watched his Youtube videos. The syntax highlight he did is just pure awesomeness, but his VSCode's version of the theme is very outdated, also the color saturation is just a bit too high for my own liking, therefore I decided to make my own base on his ideas. Another thing is that I would like to have my own custom theme to go with my Auroral-UI project.

I have used many themes in VSCode, but most of them used way too many colors. After writing hours of codes, my eyes gets very tiring of looking at those colors.

Therefore the main goal of this theme is to use the main colors of Auroral-UI and draw back all the distractions from the colors. Which help us focus on what is important and keep the visual harmony in the theme.

## Features

> I follow the same goals as Adam Argyle's sublime3 theme, because I couldn't agree more on his design concepts.

- **Accentuates the signal** of your code, while pushing back the noise
- Colors, italics, and subdued colors are meaningful to help you understand the code via consistent coloring, there's rhyme and reason for the choices beyond visual harmony
- If your code has no errors, then it looks pythonic (noise reduction)
- Dark mode that's been tested heavily for day and night use
- Leverages cursive if you're using [Dank Mono]() or [Operator Mono]()

## Recommended combination

- **Font**: use **Dank Mono** or **Operator Mono**
- **Icon theme**: Material Theme Icon Dark

## Screenshots

### JavaScript

![JavaScript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t88o8pv37a5tl5ea2dmn.png)

### Vue

![Vue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vrik7tz5m12ktv1ech1.png)

### Vue-HTML

![Vue-HTML](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tivaizo4pfmmbqehy0l.png)

### Json

![Json](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3a36m0695cpbu1b42ro5.png)

### Yaml

![Yaml](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aavtd9seygegzh4ote6c.png)

## How to get this theme?

Go search for the theme from VSCode extension, use the theme name `Aurora Future`.

Or

Go to the extension's page [here](https://marketplace.visualstudio.com/items?itemName=auroral-ui.aurora-future&ssr=false)

---

Hope you enjoy!~
Big picture thinking
Tags: bigpicture, wordpress
Published: 2021-04-17 16:31:25

Task-Force Bootcamp is a good place to grow as a developer. This week we created the projects to be demonstrated to the client. There are a lot of ways to develop a project, everyone can come up with his own method and work. Today I want to speak a little bit about how we can develop big picture thinking in our daily activities.

In a team of two, I and my mate were assigned the WordPress project and our main goal was to add the functionality of having different logos on different pages. 

For those who don’t know what WordPress is, WordPress is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database. 

WordPress with the help of its themes, templates, and plugins is Simple and easy to use. By using a plugin we were able to achieve our main goal. However, its performance, maintenance, and ease of use were not good as they could have been if we had built that functionality for our own.

After demonstrating what we built, we received feedback from the client and his IT expert who specialized in WordPress website development. An IT expert focused not only on the working principle but the performance and other technical drawbacks.

From the feedback of that expert, I acquired a lot of technical skills and thinking. I looked back and remembered to use the big picture thinking before starting to develop any project.

You might wonder what big picture thinking is! Big picture thinking is the ability to understand abstract concepts, ideas, and possibilities.

By understanding what we need to achieve we should name many different ways to achieve that and we identify the advantages, disadvantages, or drawbacks of each and decide which to use according to the tangible facts.

Thank you for reading!
Kotlin – Sort List of Objects with Kotlin Comparator Example
Tags: kotlin, sort, comparator
Published: 2021-04-17 16:20:15

https://grokonez.com/kotlin/kotlin-sort-list-objects-kotlin-comparator-example

Kotlin – Sort List of Objects with Kotlin Comparator Example


This tutorial shows you way to Sort List of Objects by implementing <code>Comparator</code> example.

Related posts:
- <a href="https://grokonez.com/kotlin/kotlin-compare-objects-comparable-example">Kotlin – Compare Objects with Comparable Example</a>
- <a href="https://grokonez.com/kotlin/kotlin-sort-list-objects-comparable">Kotlin – Sort List of Objects with Comparable</a>
- <a href="https://grokonez.com/kotlin/kotlin-sort-object-list-kotlin-selector-function-crossinline-selector-t-r">Kotlin Sort Object List with Kotlin Selector function – crossinline selector: (T) -> R?</a>
- <a href="https://grokonez.com/kotlin/kotlin-comparator-binary-search-object-list">Kotlin Comparator Binary Search for Object List</a>

<!--more-->
<h2>I. Technology</h2>
- Java 1.8
- Kotlin 1.1.2
<h2>II. Overview</h2>
<h3>1. Goal</h3>
Sort list of three <code>MyDate(year,month,day)</code> objects.
<h5>2. Steps to do</h5>
- Implement <code>Comparator</code> interface for the class that you use for handling sorting.
- Override <code>compare(object1: T, object2: T)</code> method and:
+ return <em><strong>zero</strong></em> if <code>object1</code> is <em><strong>equal</strong></em> <code>object2</code>
+ a <strong><em>negative</em></strong> number if <code>object1</code> is <strong><em>less</em></strong> than <code>object2</code>
+ a <em><strong>positive</strong></em> number if <code>object1</code> is <em><strong>greater</strong></em> than <code>object2</code>
- Use <code>sortedWith(comparator: Comparator)</code> method that returns a <code>List</code>.
<h2>III. Practice</h2>
<h3>1. Create Class for objects to be sorted</h3>
<pre><code class="language-java">
package com.javasampleapproach.objcomparator

data class MyDate (val year: Int, val month: Int, val day: Int) {
	
}
</code></pre>

More at:

https://grokonez.com/kotlin/kotlin-sort-list-objects-kotlin-comparator-example

Kotlin – Sort List of Objects with Kotlin Comparator Example
Learn SQL and get Job ready today!
Tags: 100daysofcode, beginners, programming
Published: 2021-04-17 16:11:56

Why you should learn SQL

SQL is one of the most important languages ​​in data science practice, especially when analyzing big data. SQL is a powerful language for RDBMS. It is also the largest big data software, but it also supports Apache Spark, machine learning and data. spread.

I just launched new APP on the same.
It covers all the Required Fundamental concepts

It's FREE and available on PLAYSTORE

https://play.google.com/store/apps/details?id=com.pavandeore.sqltutorial
Kotlin Comparator Binary Search for Object List
Tags: kotlin, comparator, binarysearch
Published: 2021-04-17 15:55:46

https://grokonez.com/kotlin/kotlin-comparator-binary-search-object-list

Kotlin Comparator Binary Search for Object List

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you how to look up an element in an object list with <strong>Kotlin Comparator Binary Search</strong>.

Related posts:
- <a href="https://grokonez.com/kotlin/kotlin-sort-list-objects-kotlin-comparator-example">Kotlin – Sort List of Objects with Kotlin Comparator Example</a>
- <a href="https://grokonez.com/kotlin/kotlin-comparable-binary-search-object-list">Kotlin Comparable Binary Search for Object List</a>
- <a href="https://grokonez.com/kotlin/kotlin-binary-search-object-list-comparison-function-comparison-t-int">Kotlin Binary Search for Object List with Comparison function – comparison: (T) -> Int</a>
- <a href="https://grokonez.com/kotlin/kotlin-binary-search-object-list-selector-function-crossinline-selector-t-k">Kotlin Binary Search for Object List with Selector function – crossinline selector: (T) -> K?</a>

<!--more-->
<h2>I. Technologies</h2>
- Kotlin 1.1.61
- Java 8
<h2>II. Kotlin Comparator Binary Search</h2>
<strong>Step to do</strong>:
- Create data model & Comparator
- Create a sorted list
- Do Binary Search
<h3>1. Create data model & Comparator</h3>
- Create <strong>Product</strong> data model:

<pre><code class="language-java">
data class Product(val name: String, val price: Double /*USD*/)
</code></pre>

- Create a <strong>Comparator</strong>:

<pre><code class="language-java">
class CompareObjects {
	companion object : Comparator<Product> {
		override fun compare(p1: Product, p2: Product): Int = (p1.price - p2.price).toInt()
	}
}
</code></pre>
<h3>2. Create a sorted list</h3>
We can use <code>Iterable<T>.sortedWith(comparator: Comparator<in T>)</code> to sort an <strong>Object List</strong>.
-> Detail method signature: <pre>public fun <T> Iterable<T>.sortedWith(comparator: Comparator<in T>): List<T></pre>

https://grokonez.com/kotlin/kotlin-comparator-binary-search-object-list

Kotlin Comparator Binary Search for Object List
Kotlin Convert String to Int
Tags: kotlin, string, int
Published: 2021-04-17 15:45:40

https://grokonez.com/kotlin/kotlin-convert-string-int

Kotlin Convert String to Int

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you how to convert <strong>Kotlin String to Int</strong>.

Related posts:
- <a href="https://grokonez.com/kotlin/kotlin-convert-string-long">Kotlin Convert String to Long</a>

<!--more-->
<strong>Working environment</strong>: 
- Java 8
- Kotlin 1.1.61
<h2>Kotlin toInt() method</h2>
<h3>String.toInt(): Int</h3>
- use method signature: <code>public inline fun String.toInt(): Int</code>

<pre><code class="language-java">
package com.javasampleapproach.string2int

fun main(args : Array<String>) {
	// use method:
	// -> public inline fun String.toInt(): Int = java.lang.Integer.parseInt(this)
	val number: Int = "123".toInt();
	println(number) // 123
	
	// if the string is not a valid representation of a number
	// -> throw NumberFormatException
	try{
		"12w".toInt();
	}catch(e: NumberFormatException){
		println(e.printStackTrace())
		// -> print on console:
		/*
		java.lang.NumberFormatException: For input string: "12w"
			at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
			at java.lang.Integer.parseInt(Integer.java:580)
			at java.lang.Integer.parseInt(Integer.java:615)
			at com.javasampleapproach.string2int.ConvertString2IntKt.main(ConvertString2Int.kt:12)
		*/
	}
}
</code></pre>

- <code>Strig.toInt()</code> will throw a <strong>NumberFormatException</strong> if the string is not a valid representation of a number.
- <code>String.toInt()</code> just uses <code>Integer.parseInt</code> of Java for converting
-> detail: <code>public inline fun String.toInt(): Int = java.lang.Integer.parseInt(this)</code>

More at:

https://grokonez.com/kotlin/kotlin-convert-string-int

Kotlin Convert String to Int
Getting back on the horse
Tags: webdev, devops, indiehacking
Published: 2021-04-17 13:35:21

It’s been a while that I have had time to write. 

These past few months have been incredibly busy, exciting and challenging. I accepted a side project from a client and took a deep dive into DevOps. Switched off windows, switched on Linux, and got exposed to tools and applications like the elastic stack, ansible, docker, nginx, ngrok, zammad, zabbix, deep speech, touched a little of python, angular and [created a podcasting application](https://podiumcast.herokuapp.com) which I am going to write about in a future post. I learnt a lot but had to put the development of [Page Insight Analytics](https://pageinsight.app) on hold for a while.

Returning back to indie hacking after a period of hiatus, I had been feeling like I had some kind of ‘brain fog’, where I couldn’t really process any new information. I panicked because I make a living out of my imagination. I needed to rekindle my creativity.
 
In the times that we live in today as developers, there is a need for speed. You are bombarded with information from all sides. Your brain is going at full speed and you are expected to consume, assimilate and apply it all like Kyle XY. Our brains are evolving before our very eyes. Settle down and try to read an article, a lot of times you’ll catch yourself skimming through the text. This is the new normal.

Keeping the right balance and focusing on one thing at a time is the way to go, or else you’ll end up knowing a little about a lot of things and miss the big picture, which is to solve the problems that people care about.
Kotlin – Convert comma-separated String into List & List into one String

Tags: kotlin, list
Published: 2021-04-17 15:36:07

https://grokonez.com/kotlin/kotlin-convert-comma-separated-string-list-list-one-string

Kotlin – Convert comma-separated String into List & List into one String

This Kotlin tutorial gives you a simple example that helps to convert comma-separated String into List & List into one String.

<!--more-->
<h2>I. Technology</h2>
- Java 1.8
- Kotlin 1.1.2
<h2>II. Practice</h2>
<h3>1. String into List</h3>
Use <code>CharSequence.split()</code> method that returns a <code>List</code>, then <code>map()</code> each item with <code>CharSequence.trim()</code> method to remove [space] character.
<pre><code class="language-java">
val input: String = "One, Two, Three, Four"

println("=== String into List ===")
var result: List<String> = input.split(",").map { it.trim() }

result.forEach { println(it) }
</code></pre>
Result:
<pre><code class="language-java">
=== String into List ===
One
Two
Three
Four</code></pre>
<h3>2. List into String</h3>
Use <code>joinToString()</code> method with <code>prefix</code>, <code>postfix</code>, limit <strong>3</strong> elements to be appended, and truncated by string <em>"...more..."</em>:

More at:

https://grokonez.com/kotlin/kotlin-convert-comma-separated-string-list-list-one-string

Kotlin – Convert comma-separated String into List & List into one String
Kotlin Equality – Difference between “===” vs “==”
Tags: kotlin
Published: 2021-04-17 15:31:54

https://grokonez.com/kotlin/kotlin-equality-difference-referential-equality-vs-structural-equality

Kotlin Equality – Difference between “===” vs “==”

In the tutorial, <a href="https://grokonez.com">Grokonez</a> will introduce <strong>Kotlin Equality</strong>, the difference between <code>===</code> and <code>==</code>.

<!--more-->
<h2>I. Kotlin Equality</h2>
We have 2 types of Kotlin equality:
- Referential equality with <code>===</code> operation
- Structural equality with <code>==</code> operation
<h3>1. Referential equality</h3>
Referential equality is used to check references with same pointing object. It represents with <code>===</code> operation (negative form <code>!==</code>).

<pre><code class="language-java">
// ###########################
// 1. referential equality
// ###########################
val str = "a"
val str1 = "a"
println(str===str1)
/*
	true
	-> a & b point to the same object
*/

val i = Integer(10)
val j = Integer(10)
println(i===j)
/*
	false
	-> i & j point to the difference objects
*/

val jack = Customer("Jack", 25)
var customer = jack;
println(jack === customer)
/*
	true
	-> Because 'jack' and 'customer' objects point to the same object 
*/	

customer = Customer("Jack", 25)
println(jack === customer)
/*
	false
	-> Because 'jack' and 'customer' objects point to the difference object 
*/
</code></pre>
<h3>2. Structural equality</h3>
Structural equality is used to check equality of objects by <code>equals()</code> function with <code>==</code> operation (negative form <code>!=</code>)

<code>a==b</code> is translated to <code>a?equals(b) ?: (b === null)</code>

More at:

https://grokonez.com/kotlin/kotlin-equality-difference-referential-equality-vs-structural-equality

Kotlin Equality – Difference between “===” vs “==”
Hello, world!
Tags: webdev
Published: 2021-04-17 15:22:10

Welcome to my blog! The purpose of this blog is purely for me to share my thoughts, learnings, and experiences as I study web development. 

This blog isn't intended to be purely technical, but I will likely post things I am learning on my web development journey, purely to reinforce my knowledge of particular subjects/concepts, but if that in turn also helps another relative newbie then that's just awesome.

Feel free to reach out and get in contact with me either via the blog or on social media. Happy coding!
#6 of 100DaysOfCode
Tags: 100daysofcode, javascript, react
Published: 2021-04-17 14:50:08

Today was a regular day. All thanks to closures I was only able to learn just one new concept.
### Higher-Order Components in React 
Those are basically nothing but Higher-order functions.

So Higher-Order Components basically takes one component as input do something with it and return a new component and components are basically functions returning JSX markup (type of return value).
But get this, that is a new component after all even though it inherits the logic of original component. 
```Javascript
const EnhancedComponent = higherOrderComponent(ComponentToBeWrapped)
```

And here is the code that shows beautiful use of closures.
```Javascript
const Speakers = ({ speakers }) => {
  return (
    <div>
      {speakers.map(({ imageSrc, name }) => {
        return (
          <img src={`/images/${imageSrc}.png`} alt={name} key={imageSrc}></img>
        );
      })}
    </div>
  );
};


function withData(maxSpeakersToShow) {
  return function(Component) {
    const speakers = [
      { imageSrc: 'speaker-component-1124', name: 'Douglas Crockford' },
      { imageSrc: 'speaker-component-1530', name: 'Tamara Baker' },
      { imageSrc: 'speaker-component-10803', name: 'Eugene Chuvyrov' }
    ];
    return function() {
      // This is the place where magic happens
      // How can this function access Components if its parent function have already executed?
      return <Component speakers={speakers}></Component>;
    };
  };
}

export default withData(Speakers);

/*
Speakers are nothing but just the people who are supposed to give a presentation on the given day, like a regular TED talk.
*/
```

And my beautiful friends, I present Mr. Closure in front of you.

Returned child function can access environment variables of its parent and hence it can get the job done.

*Little update from the comments*
HOC(High order components) is an implementation of the decorator design pattern which consist in a component, that takes another component as parameter and return a new enanched component. In a nutshell, it adds logic(or behaviour) to the passed components without modifying it and its existent logic.


*My view ?*

Seperation of concerns demand seperation of **UI logic** (logic that makes UI visible as it is) and the **application logic**.
So we can use higher order components to do that. 
Pass in our component with UI logic and let the HOC add data to it as in the example.

Hope this might have helped in any way.

I'd love to read your point of view about HOC.

Thanks for reading.😀😀
Have a beautiful day.🌼
Start a new job, automate tools setup. 
Tags: discuss, ubuntu, bash, python
Published: 2021-04-17 14:43:40

#Feel free to share your scripts

**Scripts**: that installs all the tools you need   

**Objective** of this discuss is to find many solutions as possible for different platforms to help Getting start with setting up necessary tools   

By the end of this discuss, I hope we get a useful solution for automating setups for various OS specially ~~Debian based distros~~
Using Netlify DNS with domains registered with Route53 
Tags: netlify, route53, aws
Published: 2021-04-17 14:32:04

Web services sometimes require custom domains, and so do apps hosted with Netlify. Domains are not necessarily hosted with the same platform to host apps, so in this article, I note the name server problem to keep apps from being connected with your domains.

# Problem: I cannot access sites through apex domains although I have set name servers
i. e. I can only access sites through domains with subdomains (`www`)

When you can see NS records set like the screenshot below, you might have set name servers incorrectly.
![S](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/artxtqy5hp6brsld7kos.png)

To ensure that what name servers are set, you can run `whois <your domain> | grep -i "name server"`.

As [this article](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-name-servers-glue-records.html#updating-name-servers-other-dns-service) explains steps when using external DNS, you should set Netlify name servers on the domain detail page

![S](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qyiwbsb7pgz2wypfbmfm.png)