teleren/devto huggingface dataset:
Lombok can be as ORM framework
Tags: java
Published: 2020-12-05 13:02:10

Do you like Lombok? Ohh! You might think it changed the way Java programming, but it makes your programming efficient.

Now, It can become an ORM framework, Improve your efficiency in SQL programming.

ObjectiveSQL is an ORM framework in Java based on ActiveRecord pattern, which encourages rapid development and clean, codes with the least, and convention over configuration.

### Github

https://github.com/braisdom/ObjectiveSql

### Features
- With one annotation your Class has fully featured capabilities of SQL programming
- Easy to relational(has_one, has_many, beglongs_to) querying and paged querying
- Java expressions(arithmetic, comparison and logical) can be converted into SQL expression directly

### Simple SQL programming without coding
You just define a JavaBean with one annotation your Class has fully capabilities of featured database access

```java
@DomainModel
public class Member {
    private String no;
    
    @Queryable
    private String name;
    private Integer gender;
    private String mobile;
    private String otherInfo;

    @Relation(relationType = RelationType.HAS_MANY)
    private List<Order> orders;
}
```

### Querying

```java
Member.countAll();
Member.count("id > ?", 1);
Member.queryByPrimaryKey(1);
Member.queryFirst("id = ?", 1);
Member.query("id > ?", 1);
Member.queryAll();
```

### Relation querying

```java
Member.queryAll(Member.HAS_MANY_ORDERS);
Member.queryByPrimary(1, Member.HAS_MANY_ORDERS);
Member.queryByName("demo", Member.HAS_MANY_ORDERS);
```
Working with Amazon Elastic Container Service
Tags: aws, amazonecs, amazonelasticcontainerservice
Published: 2020-12-07 14:06:17

This tutorial leads you through the steps to:

[Create a Task Definition, a description of an application that contains one or more Docker containers.
Create a Cluster, a logical grouping of Amazon EC2 instances on which you can place tasks.
Create a Service, that allows you to run and maintain a specified number of instances of a task definition simultaneously.](https://www.truongbui.com/2020/12/working-with-amazon-elastic-container-service.html)
Javascript Project - Character Counter
Tags: javascript, webdev, tutorial
Published: 2020-12-07 13:58:23

Hello Everyone, 
This is Madhuban Khatri and I created a Simple Character Counter using Javascript.
 You can type text in TEXTAREA and program can count each character of the Text.

Here is the Video:- 

{% youtube sbb_lKrX3M0%}

If you like this video then HIT LIKE and Share this,
Subscribe also.
Top 17 Strategies And Ways To Market Your Business Online
Published: 2020-12-07 13:55:40

The word ‘marketing’ conjures up visions of pricey marketing strategies and excessive expenditure for many people and businesses. However, it doesn’t have to be expensive: there are plenty of free ways to market a business and get the best results. In this article, we will share our top tips & Strategies for how to market your online business.


Email Marketing :-
Email marketing is one of the best and most effective ways to drive business. Think about it for a second; you’re delivering targeted messages straight to your customers’ inboxes, and you’re reaching them on their mobile device if they’re on the go. For this you have to ensure that you have a method of capturing email data from website visitors. Integrate an email sign up option onto your site and begin building a database of customer data. Starting an email marketing list may sound difficult, but it’s really not. Think about all of the emails you receive from companies and brands, and then think about how they acquired that information Read more at - https://www.devopsschool.com/blog/best-tactics-and-tricks-for-online-marketing-business/
Code Smell 45 - Not Polymorphic
Tags: oop, codesmell, webdev, cleancode
Published: 2020-12-07 13:48:57

*Methods should be interchangeable if they do the same.*

# Problems

- Missed Polymorphism

- Coupling

- IFs / Type check Polluting

- Names coupled to types.

# Solutions

1. Rename methods after what they do.

2. Favor polymorphism.

# Sample Code

## Wrong

{% gist https://gist.github.com/mcsee/17ccba69a9bcb7fbe2e8ee15e0487585 %}

## Right

{% gist https://gist.github.com/mcsee/ba7cb02ed4cf4c8ae6d0bf4aae3d7cb2 %}

# Detection

This is a semantic mistake. We could add a warning for *similar* method names on Polymorphic classes.

# Tags

- Polymorphic

# Conclusion

Naming is very important. We need to name after concepts and not after accidental types,

# Relations

{% post https://dev.to/mcsee/code-smell-36-switch-case-elseif-else-if-statements-h6c %}

# More info

[what is in a name](https://maximilianocontieri.com/what-exactly-is-a-name-part-ii-rehab)

* * *

> If you have three pet dogs, give them names. If you have 10,000 head of cattle, don't bother. Nowadays, the idea of giving a name to every file on your computer is ridiculous.

_David Gelernter_
SOLVED: Cisco Anyconnect Linux Mint 20 SIGSEGV
Tags: linux, ciscoanyconnect, problem, solved
Published: 2020-12-07 13:46:50

```
I/O warning : failed to load external entity "/opt/cisco/anyconnect/CustomerExperienceFeedback/CustomerExperience_Feedback.xml"
I/O warning : failed to load external entity "/opt/cisco/anyconnect/CustomerExperienceFeedback/CustomerExperience_Feedback.xml"
I/O warning : failed to load external entity "/opt/cisco/anyconnect/CustomerExperienceFeedback/CustomerExperience_Feedback.xml"
Neoprávněný přístup do paměti (SIGSEGV) (core dumped [obraz paměti uložen])
```
# Tried
reinstall
https://unix.stackexchange.com/questions/532585/getting-dbind-warnings-about-registering-with-the-accessibility-bus
https://askubuntu.com/questions/1039243/packet-tracer-segmentation-fault-ubuntu-18-04
https://www.cisco.com/c/en/us/td/docs/security/vpn_client/anyconnect/anyconnect40/administration/guide/b_AnyConnect_Administrator_Guide_4-0/customize-localize-anyconnect.html
https://askubuntu.com/questions/1040485/unable-to-open-cisco-anyconnect-secure-mobility-client-on-my-ubuntu-18-04-lts

# Solved
Delete with sudo /opt/cisco/anyconnect and install again.
Guide to Diem (or Libra 2.0)
Tags: fintech, cryptocurrency, crypto, technology
Published: 2020-12-17 06:40:54

---
title: Guide to Diem (or Libra 2.0)
published: true
date: 2020-12-07 13:43:57 UTC
tags: fintech,cryptocurrency,crypto,technology
canonical_url: https://medium.com/coinmonks/guide-to-diem-or-libra-2-0-cf90a31c9430
---

[![](https://cdn-images-1.medium.com/max/600/1*RH05tIYMtAUtgl6CrvdYiA.png)](https://medium.com/coinmonks/guide-to-diem-or-libra-2-0-cf90a31c9430?source=rss----721b17443fd5---4)

The decisive moment seems to have come for the arrival of the cryptocurrency from Facebook and the consortium behind it. After several…

[Continue reading on Coinmonks »](https://medium.com/coinmonks/guide-to-diem-or-libra-2-0-cf90a31c9430?source=rss----721b17443fd5---4)
Problem generating FCM token in apk release
Tags: fcm, token, react, apk
Published: 2020-12-07 13:39:10

Hello,
I have a quick question if you can help me please:
My react project is a simple Web view with integration of FCM notifications, and for that I have to send the token device by injection of javascript when calling the webview.
- When I am locally, and I run run-android everything is fine, I receive my token
- When I create my apk in release mode and I open and run it in Android Studio => everything is fine, I receive the token
- but if I install the same apk on my phone, I don't get the token, it is still empty.
Anyone have an idea please?
Thank you
Project 1, Week 2, Day 1
Published: 2020-12-07 13:36:55

Major progress made today. It helped that it was a long weekend. :)

* Socket set up, and video/audio stream sent through
* Used peerjs to set up a connection between two computers
* Added styling :)

Todo: 
* Get chat set up, it's easy. As it uses the same socket
* Create an experience for the user
* This is more for my work: they need it to be integrated into their product. I was thinking creating a micro-service as I have never done it before. Looks like it's going to be a fun week ahead. :)

[Pull Request](https://github.com/Cijin/project-we/pull/7)
What are "var" and "dynamic" in C#?
Tags: csharp, dotnet, webdev, computerscience
Published: 2020-12-07 13:32:34

Hello, My name is Nima Owji. I am 14. I am a C# programmer. Today, I wanna tell you what are the differences between var and dynamic in C#.

# When did they add to C#?
First of all, I'm gonna tell you when did they add to C#.
"var" added in C# 3 but "dynamic" added in C# 4. They aren't available in earlier versions, so you should use C# 4 to up.

# How to use variables?
You know how to declare a variable in C#.
For example:
```cs
public int x = 5;
private string y = "nima";
bool z = true;
```
As you know, You should use a data type for your variable, then assign a name. You can also assign a value to your variable in declaration time, like the example.

This is the format of variables:
```
[Scope] [DataType] [Name];
```

As you know we use "int" or "long" ... for numbers, "string" for strings and text. We all tell the compiler what is the datatype in the normal declaration.

# How to use "var"
var will use like a data type in C#. You can assign all values to it, for example, "int", "string", "long", "List<int>".
But how do we use them?

Look at the example:
```cs
var x = 5;
var y = "nima";
var z = true;
```

It will select the best data type for your variable automatically.
But you can't change their data types like variables too. For example, this code will not work!

```cs
var x = 5;
x = "nima";
```

Because you are assigning a string to an int variable. 
Now, what are the "dynamic"s?

# What are the "dynamic"s?
dynamics are another type like "var". It will select the best data type for your variable based on your value. dynamics won't be checked at compile time. They be will checked at runtime.

Like this:
```cs
dynamic x = 5;
dynamic y = "nima";
dynamic z = true;
```

But what is the difference between "dynamic" and "var"?
As I told you, you can't change the data type of a variable. But you can do that in "dynamic"!

# Example for "dynamic"
Look at this example:
```cs
dynamic x = 5;
x = "nima";
x = 'a';
x = false;
```
This will work correctly. 

# The end
These were the most important things you have to know about "var" and "dynamic" in C#.
I hope you liked this article.

# Don't forget to like it
Please like this article and follow me on Twitter: @nima_owji.
Thank you so much. Byeeee!
12 Ways that Libraries are Good for the Country
Tags: lis51
Published: 2020-12-07 13:28:30

####Do you agree / disagree with any of the statements? Why?
Since the [article](https://americanlibrariesmagazine.org/2010/12/21/12-ways-libraries-are-good-for-the-country/) was written from an American perspective not all statements are applicable to Philippine libraries. In particular, "Libraries build technology skills," is inapplicable to some Philippine libraries as public libraries outside of city centers likely do not have the funding to offer access to the internet.

####Growing up, have u had any experience using the library? How was it?
During elementary I learned to love reading in the small library of my school; I had a fondness for fairy tales and mythologies of ancient cultures. In high school and college I went to the library to hang out or do homework, mostly because it had aircon.

I would say that my overall experience with libraries has been positive, and they have been a safe space for me throughout my life.
Higher Order Functions
Tags: javascript, teamtanayejs, eloquentjs
Published: 2020-12-07 13:23:32

####Abstraction
Abstraction is the process of hiding information from the users. They give us the ability to understand and read code at a higher level, while hiding the details, to give us an overview. 
* There exists a __filter__ method which builds a new array that contains the results that pass given test.
```javascript
console.log(filter(SCRIPTS, script => script.living));
// → [{name: "Adlam", ...}, ...]
```
####Maps
The map method transforms an array by applying a function to all of its elements and building a new array from the returned values. The new array will have the same length as the input array, but its content will have been mapped to a new form by the function.
```javascript
function map(array, transform) {
    let mapped = [];
    for (let element of array) {
        mapped.push(transform(element));
    }
    return mapped;
}
let rtlScripts = SCRIPTS.filter(s => s.direction == "rtl");
console.log(map(rtlScripts, s => s.name));
// → ["Adlam", "Arabic", "Imperial Aramaic", ...]
```
* The __reduce__ method is another function that takes in the input, and a condition based on which it combines elements. You can easily understand how reduce works based on the given example.
```javascript
console.log([1, 2, 3, 4].reduce((a, b) => a + b));
// → 10
```
Daily Developer Jokes - Monday, Dec 7, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-12-07 13:00:21

---
title: "Daily Developer Jokes - Monday, Dec 7, 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=Monday%2C%20Dec%207%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/5e1258ca137e1.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 was the computer freezing?

___A:___ It left its Windows open!
 -->
Jordan Finishes California in AWS Lambda and DynamoDB
Tags: webscraping, aws, dynamodb, lambda
Published: 2021-01-29 12:49:20

---
title: Jordan Finishes California in AWS Lambda and DynamoDB
published: true
date: 2020-12-07 13:00:00 UTC
tags: WebScraping,aws,dynamodb,lambda
canonical_url: https://javascriptwebscrapingguy.com/jordan-finishes-california-in-aws-lambda-and-dynamodb/?utm_source=rss&utm_medium=rss&utm_campaign=jordan-finishes-california-in-aws-lambda-and-dynamodb
---

Final video for the California Secretary of State. [First video](https://javascriptwebscrapingguy.com/jordan-scrapes-california-soon-to-be-in-aws-lambda/) and [second video](https://javascriptwebscrapingguy.com/jordan-scrapes-california-implemented-into-aws-lambda-and-dynamodb).

<iframe title="Scraping California Secretary of State Part 2. AWS Lambda and DynamoDB" width="640" height="360" src="https://www.youtube.com/embed/JebNFJpvNrs?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

California businesses aren’t always sequential (sosId #7 had a filingDate of 11-11-2020 but sosId #10 had a filingDate of 11-07-2020). Because of this I need a better way to pull the businesses. I landed on using the createdAt field, which should work pretty great as long as I keep my Lambda execute times well ordered.

## Looking for business leads?

Using the techniques talked about here at [javascriptwebscrapingguy.com](https://javascriptwebscrapingguy.com), we’ve been able to launch a way to access awesome web data. Learn more at [Cobalt Intelligence](https://cobaltintelligence.com)!

The post [Jordan Finishes California in AWS Lambda and DynamoDB](https://javascriptwebscrapingguy.com/jordan-finishes-california-in-aws-lambda-and-dynamodb/) appeared first on [Javascript Web Scraping Guy](https://javascriptwebscrapingguy.com).
How to use Vim on Linux and macOS
Tags: beginners, cli
Published: 2020-12-07 12:59:02

If you ever did try to edit files on Linux through the terminal, you'll probably have run into Vim. It is a text-based editor pre-installed on macOS and most Linux distributions.

Very handy, but a bit difficult to grasp for first-time users. Especially when you have opened up a file in the Vim editor by accident. It all bit us developers at least once in our career. As it's apparently one of [the most sought-after answers](https://stackoverflow.com/questions/11828270/how-do-i-exit-the-vim-editor) on StackOverflow.

So I've summarized a couple of basic commands that will help you open a file, do some changes and then exit Vim.

## How to open a file

First, you need to open a file that you would like to edit. You can use either `vim` or `vi` with the name of the file you would like to open. If the file does not exists in the current directory, it will be created for you.

```bash
vi file-to-open.txt
```

## How to edit a file

When you have opened up a file, you get into **normal** (or **master**) **mode**. You will be able to read the contents, but you can't make any changes yet. From there, you can execute commands or switch to **insert mode**. Within this mode, all your keystrokes will result in changes to the text. To go back to the _normal mode_, you need to press the `<ESC>` key.

All other Vim commands start with a `:` character followed by a keyword, which you can only enter when you are in **normal mode**.

A good overview is provided by the following reference diagram.

<picture>
![An overview of all available Vim modes](https://dev-to-uploads.s3.amazonaws.com/i/njg2bsw76vu0ummiz4w6.png)
    <figcaption>
        Source: <a href="https://github.com/nilp0inter/Vim-for-Muggles">https://github.com/nilp0inter/Vim-for-Muggles</a>
    </figcaption>
</picture>

## How to exit Vim

When you are done making changes, you need to make sure that you are in **normal mode** by pressing the `<ESC>` key. And then use the `:q` command (or one of its siblings) to exit the editor.

```vim
:q - just quit when you don't have any changes
:q! - quit and discard any changes you've made
:wq - quit and save all changes to the file
```
Having a dev as a life partner!
Tags: watercooler, career, productivity, discuss
Published: 2020-12-07 12:51:55

As a dev, what is your thought on marrying another dev?

I am not married as of now, and I really do think about it. I was hesitant to write this but I couldn't stop myself.

My thinking is, it's good for a dev to marry a dev as they both can understand each other more, can discuss things with each other and help. I think it also positively affects your career and productivity.

Please please please share your thoughts 😃
PL-900 Power Platform Fundamentals [Lab 8]
Tags: powerplatform, pl900, rpa, powervirtualagent
Published: 2020-12-07 12:40:58

## Power Virtual Agent
{% youtube OI8NMHKKTuY %}

## Resources
Other videos in this series 
https://www.youtube.com/playlist?list=PLPIVZsyfpXt-S9gGT8TlfjHWfS6XmOxrP 

The Certification Page 
https://docs.microsoft.com/en-us/learn/certifications/exams/pl-900 

The study material 
https://docs.microsoft.com/en-us/learn/paths/power-plat-fundamentals/  

The Labs 
https://github.com/microsoftlearning
Pretty Logger for Java - build nice looking command line apps in Java
Tags: java, logging, cli
Published: 2020-12-07 12:39:02

![Default Theme](https://dev-to-uploads.s3.amazonaws.com/i/fl60cu8c46tjtsu0hahu.png)![Gestures Theme](https://dev-to-uploads.s3.amazonaws.com/i/m3a662ud4jhsluqju0x1.png)
# Overview
Java might not be the first choice when wanting to build command line applications, but as a Java developer myself, I don't see any reason for not doing so. With the rise of frameworks like [Spring Boot](https://spring.io/projects/spring-boot) or [Quarkus](https://quarkus.io/) and [GraalVM](https://www.graalvm.org/) you can create fast, performant and powerful command line apps with ease.

What you display in the console when your application is doing its magic is one of the key aspects that you need to get right. There are plenty of good practices out there on how to output quality content that will help users understand what is going on, but another important thing is aesthetics.

# Improving aesthetics
There are several ways of making your output more eye-catching using libraries like [jansi](https://github.com/fusesource/jansi) but it usually requires either to build some common routines for formatting or treat each output individually. 

This is why I've created the [PL4J library](https://github.com/ludovicianul/pl4j) (Pretty Logger for Java). It's a decorator for SLF4J (so that you don't need to change your logging patterns) that enriches the number of logging levels you have available and adds colourful `symbols` and `labels` for better aesthetics. 

Getting starting it's easy:

```java
PrettyLogger prettyLogger = PrettyLoggerFactory.getLogger(TestClass.class); //same declaration as SLF4J
```

and you have multiple levels available:

```java
prettyLogger.success("received response from: {}", "http://google.com");
prettyLogger.awaiting("parsing input data");
prettyLogger.complete("finish processing");
prettyLogger.debug("value is: {}", "190");
prettyLogger.error("not able to connect to: {}", "http://google.com");
prettyLogger.fatal("something went terribly wrong");
prettyLogger.info("url to connect to: {}", "http://google.com");
prettyLogger.note("remember to run CATS");
prettyLogger.pause("process was paused");
prettyLogger.santa("ho! ho! ho!");
prettyLogger.star("run CATS next time");
prettyLogger.start("process started");
prettyLogger.stop("process paused");
prettyLogger.warning("unable to normalize string");
```

You can also control `labels`'s and `symbols`'s `colour`, `bold`, `underline` as well as setting global themes to get different `symbols` sets entirely.

You can check the entire set of features on GitHub: [https://github.com/ludovicianul/pl4j](https://github.com/ludovicianul/pl4j)
PL-900 Power Platform Fundamentals [Lab 6]
Tags: powerplatform, pl900, certification, powerautomate
Published: 2020-12-07 12:38:53

## Power Automate
{% youtube bVeGL2wggeg %}

## Resources
Other videos in this series 
https://www.youtube.com/playlist?list=PLPIVZsyfpXt-S9gGT8TlfjHWfS6XmOxrP 

The Certification Page 
https://docs.microsoft.com/en-us/learn/certifications/exams/pl-900 

The study material 
https://docs.microsoft.com/en-us/learn/paths/power-plat-fundamentals/  

The Labs 
https://github.com/microsoftlearning
PL-900 Power Platform Fundamentals [Lab 5]
Tags: powerplatform, pl900, certification, portalapp
Published: 2020-12-07 12:37:48

## Portal App
{% youtube CEl-ktpYQJo %}

## Resources
Other videos in this series 
https://www.youtube.com/playlist?list=PLPIVZsyfpXt-S9gGT8TlfjHWfS6XmOxrP 

The Certification Page 
https://docs.microsoft.com/en-us/learn/certifications/exams/pl-900 

The study material 
https://docs.microsoft.com/en-us/learn/paths/power-plat-fundamentals/  

The Labs 
https://github.com/microsoftlearning
PL-900 Power Platform Fundamentals [Lab 4]
Tags: powerplatform, pl900, certification, modeldrivenapp
Published: 2020-12-07 12:36:54

## Model-driven App
{% youtube y9bD0usTm1c %}

## Resources
Other videos in this series 
https://www.youtube.com/playlist?list=PLPIVZsyfpXt-S9gGT8TlfjHWfS6XmOxrP 

The Certification Page 
https://docs.microsoft.com/en-us/learn/certifications/exams/pl-900 

The study material 
https://docs.microsoft.com/en-us/learn/paths/power-plat-fundamentals/  

The Labs 
https://github.com/microsoftlearning
PL-900 Power Platform Fundamentals [Lab 3a]
Tags: powerplatform, pl900, certification, canvasapp
Published: 2020-12-07 12:35:49

## Canvas App Part 2
{% youtube SW8g_cnyHVg %}

## Resources
Other videos in this series 
https://www.youtube.com/playlist?list=PLPIVZsyfpXt-S9gGT8TlfjHWfS6XmOxrP 

The Certification Page 
https://docs.microsoft.com/en-us/learn/certifications/exams/pl-900 

The study material 
https://docs.microsoft.com/en-us/learn/paths/power-plat-fundamentals/  

The Labs 
https://github.com/microsoftlearning