teleren/devto huggingface dataset:
Using Java inner classes for Jackson serialization
Tags: java
Published: 2020-12-15 14:05:28

I recently picked up some work in progress done by a collegues not longer with a company. He wrote a lot of code, that probably never really compiled and my task was make sense of it and finish his work. 
As part of making sense of it I made it compile. Next step was to run it. 
Here I ran into ugly Jackson serialization exceptions. 

Jist of the error massages was this.
```
can only instantiate non-static inner class by using default, no-argument constructor
```

Strange I did not see any new classes without default constructor. I was digining in it for few seconds and figure out the source of my issues were inner classes added into some Dto classes. 
These inner classes did not have any constructors but they still were source of my issues. 

## TL;DR

Just add static keyword to your inner class. 

```java
class ExampleClass {
    static class InnerClass {
        public int getCount() {
            return 42;
        }
    }
}
```

## How so?

Java has few types of inner classes. Anonymous, static and non-static inner classes. 

The non static inner classes (including the anonymous ones) have set of hidden variables passed by hidden constructor, all done at compile time. 
So if you have something like this
```java
class ExampleClass {
    class InnerClass {
        public int getCount() {
            return 42;
        }
    }
}
```
Compiler will produce something like this
```java
public class ExampleClass { ... }

class ExampleClass$InnerClass {
    private final ExampleClass parent;

    ExampleClass$InnerClass(ExampleClass p) {
        parent = p;
    }
    public int getCount() { 
        return 42; 
    }
}
```
Why the hell is compiler doing something like this? 
This is part of the magic why inner classes can access all members of enclosing class. Including the private ones. 

Static inner classes are just normal classes without any abilities to read members of encosling classes. They do not have any hidden constructors, etc... That is why when you want to have inner class part of your Jackson serialiaziation it needs to be inner static class. 

Jackson is refusing to work with non static classes as there is no easy way to instantiate those. 

--- 

For more Java tips you can follow me on [Twitter](https://twitter.com/pavel_polivka)
Project 1, Week 3, Day 2
Published: 2020-12-15 13:58:30

I think I need to wrap this up soon. Today was quite a lazy day. Could have a got a lot more done. 

Only thing I got done towards the project is that I got the server running. It might be small, but now I can ssh into the server via the domain. I had no idea how to do that before today. :)
New personal web site
Tags: discuss, javascript, html, css
Published: 2020-12-15 13:49:30

Hello, guys these days I am redesigning my personal website. I bootstrapped my project with a ready bootstrap template and I have modified it to make it personal.
I am planning to post some personal articles, game dev tutorials,
free models, and also some of my favorite projects. 
Also for any game developer out there who wants some free game assets, I have modeled a low poly car pack with 32 models and they are free for download.
For my dev friends out there. Any additional functionality of the site is made only with vanilla javascript and some css.
Any feedback about my site and models is appreciated.
The site: [Site](https://eneaslari.github.io/ "eneaslari site")
Solving day 15 of Advent of Code 2020 in JavaScript
Tags: challenge, adventofcode, javascript, video
Published: 2020-12-15 13:45:57

---
title: Solving day 15 of Advent of Code 2020 in JavaScript
published: true
description: JavaScript walkthrough of Advent of Code 2020 (day 15)
tags: challenge, AdventOfCode, javascript, video
series: Advent of Code 2020 in Javascript
---

{% youtube -1kEuA7x7Bg %}
Strong AI
Tags: machinelearning, android
Published: 2020-12-15 13:41:08

Strong AI is a term used to describe a certain mindset of artificial intelligence development. Strong AI’s goal is to develop artificial intelligence to the point where the machine’s intellectual capability is functionally equal to a human’s.

There are several fundamental differences between the chatbots of the Loebner Prize and a true example of Strong AI. Chatbots are built for the sole purpose of conversation, using increasingly complex algorithms and response databases to determine an appropriate reply to a query or statement. They are an example of Applied AI, where systems are built specifically for one usage. The ideal Strong AI machine, however, would be built in the form of a man, have the same sensory perception as a human, and go through the same education and learning processes as a human child. (Copeland) Essentially, the machine would be “born” as a child and eventually develop to an adult in a way analogous to human development.

Flawed from the outset and distorted by time, the Turing Test has become constraining and ultimately irrelevant to AI development, but it remains an important and historical thought experiment bold enough to imagine the achievement of humanoid intelligence in the early years of artificial intelligence.
[Webinar] Speed up the adoption of automation with high-quality Ansible Collections
Tags: ansible, automation, ansiblecollections
Published: 2020-12-15 13:34:42

Automation is becoming the preferred method for adopting new technologies among users. High-quality Ansible Collections help eliminate barriers to adoption and improve the reliability of onboarding new technology. Learn how to get from the “my collection exists” level to the “my collection really speeds up the adoption of automation” level by registering for our **[free on-demand webinar] (https://steampunk.si/webinars-training/speed-up-automation-ansible-collections/)**.


In just **30 minutes**, we'll share: 

* What a high-quality Ansible Collection looks like.
* How to improve the adoption of your product.
* What benefits high-quality integration has for your users.
* Best practices and real-life examples of high-quality Collections.
* Reproducible steps for building such Ansible content.
React js learning path for 2020 | perfect guide
Tags: reactjslearningpath, react, javascript, webdev
Published: 2020-12-15 13:18:28

For Oringinal Post [click here](https://www.codingtouch.in/react-js-learning-path-in-2020/)
Hello guys , in this post we are going to discuss about a very useful topic what is the perfect React js learning path in 2020. If you are a beginner are just going to start journey with a trending JavaScript Library called as React js, then it is the right place.

#Topics going to cover
Let’s see what are the topics that we are going to cover in this post. First we will see what is React js. Then we will see what is the perfect roadmap to learn React efficiently.

#What is React js
React js is a JavaScript library introduce by the facebook . ReactJS ia an open source JavaScript library used to develop User Interfaces. React JS is concerned with the component that utilizes the JavaScript with a HTML like syntax called JSX. It is a component based JavaScript library.

To learn more about React js checkout my previous post – Introduction to React

#React js learning path
We are divided the roadmap or learning path in three sub-path. In first part we discuss the topics from where we will start our journey with React.js. Then we will see the Advance topics and last , we will discuss some eco systems of React js.

##Fundamentals
To master the fundamentals , we should learn following topics –

*How to create a React app or How to initialize a React Project.
*What is a Component.
*Types of component such as – Functional Component and Class based component.
*JSX
*Props and State
*Conditional rendering
*List and key
*Lifecycle Methods
*Building some simple Forms

##Advance
After complete above fundamentals topics, we should start learning these topics-
*Context API
*Higher Ordered Component
*Rendering Props
*Refs
*Error boundaries
*Making HTTP Request
*Some Hooks such as – useEffect , UseState , useRef , useMemo ,
Custom Hooks

##EcoSystem
After complete above Advance topics, we should start learning these topics-
*State management – Redux or Mobx
*Styling – Styled component / Material UI /Tailwind CSS or *Reactstrap
*Routing – React Router
*Form – Formik
*Testing – JEST or React testing Library

##Next Step
After completing above topics properly you can start learning these technologies-
*Gatsby
*Next.js
*React Native

#Conclusion
So finally we have seen a complete learning path for React js. I hope now will master the React js.

Thank you.

Keep Coding , Keep Learning.
How to download and install MongoDB on windows
Published: 2020-12-15 13:12:36

Mongo DB is an open-source document-based database management tool that stores data in JSON-like formats. It is a highly scalable, flexible, and distributed NoSQL database.

Step 1
Download the setup from this link https://www.mongodb.com/try/download/community


![mn1](https://dev-to-uploads.s3.amazonaws.com/i/f0v1xktb87za73im6w7p.PNG)

Step 2
Double click the executable file you downloaded to launch the setup wizard. Click on Next to continue.
![mn2](https://dev-to-uploads.s3.amazonaws.com/i/fbnkviv5fnrxo7ip941n.PNG)

Step 3 
Read through the end user agreement and accept the terms then you click Next.
![mn3](https://dev-to-uploads.s3.amazonaws.com/i/ton3zqjw6tafj9ul1swi.PNG)

Step 4 
Choose the recommended setup type “Complete” and click Next.
![mn4](https://dev-to-uploads.s3.amazonaws.com/i/jxbiu5oiotvnda5v22p3.PNG)
 
Step 5
In the service Configuration window choose “Run service as Network service User and click next
![mn5](https://dev-to-uploads.s3.amazonaws.com/i/cbcerplq554b471l5bg0.PNG)

Step 6
Check the box to install MongoDb and click next.
![mn6](https://dev-to-uploads.s3.amazonaws.com/i/gmxzyyyapxi9mzsvxu07.PNG)

Step 7
Click on install and start.
![mn7](https://dev-to-uploads.s3.amazonaws.com/i/8ygr9mqiej4e6ha8mpk0.PNG)
 

Step 8
Please wait for Installation files to finish copying
![mn8](https://dev-to-uploads.s3.amazonaws.com/i/6roh1b9ga65uawamu1xz.PNG) 

Step 9
Your installation is Now complete.
![mn9](https://dev-to-uploads.s3.amazonaws.com/i/kh37tgl75j8ziq20dt8x.PNG)
 

Click on finish and go to system variables and include it to the 
path.

![mn10](https://dev-to-uploads.s3.amazonaws.com/i/fzr1mzccyf542uhwkeqt.PNG)
 

Open command line and type Mongo and you are good to Go!
LINKED LIST INSERTION
Published: 2020-12-15 12:37:51

***Insertion in a Linked List:***

A node can be inserted in a linked list at three places:

- At the front
- In between the list after a given node
- At the end

*Adding a node at the front of the Linked List:*

Here, the new node should be added before the head of the given Linked List. Now, this newly added node becomes the head of the list.

*Adding a node after a given node in the Linked List:*

Here, the previous node’s next pointer should be linked with the new node and new node’s next pointer should link the next node.

*Adding a node at the end of the Linked List:*

Here, the node should be added at the end, hence we need to traverse through the Linked List till the end. Then we need to change the value of next value of the last node from null to new node and assign null to the next pointer of new node.

#CODE
class Node:
    
    def __init__(self, data):
        self.data = data
        self.next = None

class LinkedList:
    
    def __init__(self):
        self.head = None

    # Adding a node at the front
    def push(self, new_data):
        new_node = Node(new_data)
        new_node.next = self.head
        self.head = new_node

    # Adding a node after a given node
    def insertAfter(self, prev_node, new_data):
        if prev_node is None:
            print("There is no previous node")
            return
        new_node = Node(new_data)
        new_node.next = prev_node.next
        prev_node.next = new_node

    # Adding a node at the end
    def append(self, new_data):
        new_node = Node(new_data)
        if self.head is None:
            self.head = new_node
            return
        last = self.head
        while(last.next):
            last = last.next
        last.next = new_node
    
    # Printing the linked list
    def printList(self):
        temp = self.head
        while(temp):
            print(temp.data, end = ' ')
            temp = temp.next

\# Driver Code            
if \_\_name__ == '\_\_main__':
    
    llist = LinkedList()
    
    llist.head = Node(1)
    node2 = Node(2)
    node3 = Node(3)
    
    llist.head.next = node2
    node2.next = node3
    
    llist.push('first')
    
    llist.insertAfter(node2, 'a')
    
    llist.append('last')
    
    llist.printList()

#OUTPUT:
first 1 2 a 3 last
Daily Developer Jokes - Tuesday, Dec 15, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-12-15 13:00:24

---
title: "Daily Developer Jokes - Tuesday, Dec 15, 2020"
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%20Dec%2015%2C%202020"
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/5e1259a37a785.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:
A new database query walks into a bar.

The server says "Sorry, cache only."
 -->
Microservices and Bounded Context 
Tags: discuss, microservices, architecture
Published: 2020-12-15 12:54:48

Bounded context (DDD) is a good thing to start defining a service boundary with. But practically, it's just too coarse-grained to gain real benefits of microservices. 

A service per bounded context means having multiple monoliths. That could be perfectly fine as there's no problem with a monolith. However, with microservices, we want to go further. A bounded context can contain multiple services.

So, what are the right boundaries for services? 

I believe it's business capabilities. The fine-grained a business capability can be while still remaining autonomous the small can a service be.

A team per service or a team taking care of multiple services within one bounded context is a good practice. However, a single team should not be working across multiple bounded contexts.

Services should be orthogonal, that is, one service won't affect another. 

How do you align your (micro)services?
Vue-table-2 : how to customize the filter input search?
Tags: vue, javascript
Published: 2020-12-15 12:54:05

Hello, 

I'm using the matfish2/vue-table-2 (server side),

```
<v-server-table
                    :columns="columns"
                    :options="options"
                    :url="'my-url/api/'"
                    ref="segmentTable"

                    @loading="onTableLoad"
                    @loaded="onTableLoaded"
            >
```
current situation : when user search (filter) something it sends requests on every keyboard type,

Example: id user types `hello` it will search for `h` and  `he` and `hel` and `hell` and `hello`

Question: how to send search request only when user type Enter  ?

Thanks
Was ist eine Lernplattform oder ein LMS?
Published: 2020-12-15 12:53:19

E-Learning und Lernplattformen legten seit dem Corona-Lockdown im März 2020 einen Höhenflug hin. Doch was braucht man, um online zu lernen und zu lehren? Die technische Grundvoraussetzung sind funktionale E-Learning-Systeme.

Lies den ganzen Post: [Was ist eine Lernplattform?](https://kursprofi.com/lernplattform-oder-lms/)
Sitecore downloads are now global!
Tags: sitecore
Published: 2020-12-15 12:48:38

##Good news in 2020? Yes!
Sitecore has placed all downloads from [dev.sitecore.net](https://dev.sitecore.net/) **onto a global CDN** to provide faster download times and availability to wherever you find yourself in the world! This means less time downloading the latest plugins, software installation packages, and whatever else you need for your projects.

This also comes with another welcome change that has been asked for by the community for a long time: **no more account logins for downloads!**

This aligns with the existing public availability of [Sitecore NuGet packages](https://sitecore.myget.org/gallery) and the [new Sitecore Docker Image Repository](https://containers.doc.sitecore.com/docs/image-reference#browse-the-sitecore-container-registry).

Sitecore software is now available to download for everybody, anywhere in the world, no restrictions.


##Well there is still one restriction…
This change only affects how to download the software. Running the software has not changed and still requires a valid license. If you do not have access to a valid license but wish to start learning about Sitecore, you may want to look into our [Learning options](https://learning.sitecore.com/) which can help you get started or our [Developer Trial](http://sitecore.com/trial) which can provide you with another way to start learning.
I made a podcast about regular expressions
Tags: podcast, regex, sideprojects, perl
Published: 2020-12-15 12:08:15

**Hello everyone! I’m Eugene, and /^[a-z0-9_-] {3,16}$/ is a podcast in which I share some tips and tricks about working with regular expressions and using them in your day-to-day work.**

{% spotify spotify:episode:229EPBGAyYQjZpsUSyVJyS %}

Regular expressions can be extremely useful whenever you need to make the computer do something with text. 

For example, when you need to check that what user typed is a real email, or automatically replace every uppercase letter F into a lowercase letter F. 

But as useful as they are, regular expressions can be extremely confusing and intimidating for beginners. 

{% twitter 1338806834816294915 %}

In this podcast I’m going to explain regular expressions in a simple and accessible way, and help you start using them in your day-to-day work.

The first episode, **/^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})*$/**, is about checking that a given string is a valid email.

* **[Listen on Spotify](https://open.spotify.com/show/00DKkZWGlbKA5VC4Cjd6KB) or [elsewhere](https://anchor.fm/slashcircumflex)**

Let me know what you think and share it with your network if you like it! And follow me on Twitter or Spotify to get the next episodes

Thank you :)
Beginner Python Project : Part 3
Tags: python, opensource, programming, beginners
Published: 2020-12-15 12:03:39

In this third post on my preferred python beginner projects I continue by building a jokes app using python. Yap it tells jokes because it has text to speech conversion.

It fetches the jokes from an API

To get started we will need first have a code editor :
either * pycharm * VScode or * Sublime

* Next step create a file and give a .py extension
* Now you will have to install pyjokes: pip install pyjokes
* Next you will need a text to speech conversion, you will have to install pyttxs3: pip install pyttxs3
* After doing the basics you can now write the code below and run it
```python
import pyjokes
import pyttsx3

engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
rate = engine.getProperty('rate')
engine.setProperty('rate', rate+-20)

def speak(audio):
    engine.say(audio)
    engine.runAndWait()

def joke():
    speak(pyjokes.get_joke())

if __name__ == "__main__":
    joke()
```
Feel free To add your python scripts to my GitHub repo
Also Give me a follow on dev

GitHub: [larymak](https://github.com/larymak/Python-project-Scripts)
Twitter: [larymak1](https://github.com/larymak1/)
My #100daysOfCode Challenge - Python 100 projects in 100 days - Journal Entries - Day 9
Tags: 100daysofcode, beginners, python, codenewbie
Published: 2020-12-15 11:45:16

Day 9 - Silent Auction Program

I'm back with 100daysofPython!
Learned about Dictionaries and Nesting in Python

logo = '''
                         ___________
                         \         /
                          )_______(
                          |"""""""|_.-._,.---------.,_.-._
                          |       | | |               | | ''-.
                          |       |_| |_             _| |_..-'
                          |_______| '-' `'---------'` '-'
                          )"""""""(
                         /_________\\
                       .-------------.
                      /_______________\\
'''

from replit import clear
#HINT: You can call clear() to clear the output in the console.

from art import logo
print(logo)

bids = {}
bidding_finished = False

def find_highest_bidder(bidding_record):
  highest_bid = 0
  winner = ""
  for bidder in bidding_record:
    bid_amount = bidding_record[bidder]
    if bid_amount > highest_bid:
      highest_bid = bid_amount
      winner = bidder
  print(f"The winner is {winner} with a bid of ${highest_bid}")


while not bidding_finished:
  name = input("What is your name?: ")
  price = int(input("What's your bid?: "))
  bids[name] = price
  should_continue = input("Are there any other bidder? Type 'yes' or 'no' ")
  if should_continue == 'no':
    bidding_finished = True
    find_highest_bidder(bids)
  elif should_continue == 'yes':
    clear()
My 1st DO Hackathon
Tags: firstpost, beginners, react, dohackathon
Published: 2020-12-15 11:41:21

This is my 1st post, I will like to keep track of my 1st DO Hackathon that I m going to participating in.

I am a PHP developer. I will like to learn a new language for this project. I m going to learn React and implement my 1st personal site.

I m planning to study react and jest - unit test for 7 days. Cheers!!🥳

OK.... I do done create DO account😅

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

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


** I better start to learn react first before start DO😒
Easy to DEPLOY Python/Django app to HEROKU⚡️(with video)
Tags: heroku, python, django, devops
Published: 2020-12-15 11:34:23

<b>HEROKU:</b> It is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.


We can deploy our Python//Django Apps to <b>Heroku</b> easily. ⚡️

It can be done with 2 commands if you already have <b>heroku-cli</b> installed in your machine.

To learn how to deploy your Python-Django application to Heroku, watch the video 🤓
Enjoy 🌸

{% youtube vlruc37LsbE %}

SUBSCRIBE to YouTube Channel - https://www.youtube.com/channel/UCy5EgfydCQlVv_AM-FZyYcg?sub_confirmation=1
LIKE FB Page - https://www.facebook.com/the.destro.dev.show/
Follow on Twitter - https://twitter.com/destro_mas
Follow on DEV - https://dev.to/destro_mas

Made with ❤️ in Berlin!

Cheers!
👋
<hr />
As I am trying to contribute contents on the Web, you can buy me a coffee for my hours spent on all of these ❤️😊🌸

<a href="https://www.buymeacoffee.com/destrodevshow" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 45px !important;width: 117px !important;" ></a>