teleren/devto huggingface dataset:
RSpec: when to use double instead of instance_double
Tags: rspec, ruby, testing
Published: 2021-02-16 21:11:19

Let me remind you of the difference: `instance_double` can fail a test if methods are not available in the specified class, `double` doesn't care about anything.

In my experience `double` is needed in two cases:
1\. Instead of an object that doesn't yet exist in the system. There is no class, so `instance_double` has nothing to rely on.

2\. Instead of something minor with a stable API. For example, for emails:
```ruby
allow(DeadlineMailer)
  .to receive(:last_deadline_warning)
  .and_return(double(:email, deliver_later: true))
```
CVE-2021-3396: Full Security Disclosure
Tags: security, jexl, cve
Published: 2021-02-16 21:48:21

---
title: CVE-2021-3396: Full Security Disclosure
published: true
cover_image: https://pbs.twimg.com/media/EuYQiTyXAAUHFCF?format=jpg&name=medium
date: 2021-02-16 21:06:27 UTC
tags: security, jexl, cve
canonical_url: https://www.opennms.com/en/blog/2021-02-16-cve-2021-3396-full-security-disclosure/?utm_source=rss&utm_medium=rss&utm_campaign=cve-2021-3396-full-security-disclosure
---
First published by the OpenNMS security team on [our blog](https://www.opennms.com/en/blog/2021-02-16-cve-2021-3396-full-security-disclosure/).

## OpenNMS Security Issue Requires Immediate Upgrade

The OpenNMS Group recently learned about and fixed a security vulnerability that allowed local and remote code execution as an authenticated user via a custom, targeted JEXL expression.

_Thank you to Artem Smotrakov for notifying us of this issue._

[CVE-2021-3396](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3396 "CVE-2021-3396 ")applies to the following:

- Meridian-2016.1.0 - Meridian-2016.1.24
- Meridian-2017.1.0 - Meridian-2017.1.26
- Meridian-2018.1.0 - Meridian-2018.1.24
- Meridian-2019.1.0 - Meridian-2019.1.15
- Meridian-2020.1.0 - Meridian-2020.1.4
- Horizon 16.0.0 - Horizon 27.0.3 
- Newts: all versions < 1.5.3

OpenNMS Meridian and Horizon users should review the CVE and **upgrade to the latest OpenNMS version as soon as possible.** Anyone using Meridian 2018, 2019, or 2020 should upgrade to the latest point release for their version. If you are using an earlier version, you should upgrade to the latest 2018, 2019, or 2020.

**Impact**  
CVSS Score: **8.4** (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:X/RL:O/RC:C)

- Code Execution
- Information Disclosure

**Affected components**  
This security vulnerability can affect the following components:

- OpenNMS Measurements API (ReST queries and filters)
- OpenNMS Provisiond (IP address matching)
- OpenNMS JMX monitor
- OpenNMS thresholding
- opennms:stress-events Karaf command (events:stress on older releases)
- OpenNMS database reports sub-report rendering
- OpenNMS storage strategies: JEXL index and object name
- Newts web API
Drivers to use with NiFi
Published: 2021-02-21 20:20:50

---
title: Drivers to use with NiFi
published: true
date: 2021-02-16 20:55:00 UTC
tags: 
canonical_url: 
---

## Cloudera JDBC 2.6.20 driver for Apache Impala.  

This release has the following enhancements and fixes:
  

Enhancements and New Features

- [IMPJ-601] Updated third-party libraries

  - The JDBC 4.1 driver has been updated to use the following libraries:

    - log4j 2.2.1
    - slf4j 1.7.30
- [IMPJ-607] Updated CDP support

  - The driver now supports CDP 7.1
  - For a list of supported CDP versions, see the Installation and Configuration Guide
- [https://www.cloudera.com/downloads/connectors/impala/jdbc/2-6-20.html](goog_1663085053)
- [https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-20.html](goog_1663085053)
- [https://www.datainmotion.dev/2021/02/ingest-into-cloud.html](https://dev.to/tspannhw/ingest-into-the-cloud-48f8-temp-slug-8184394)
- [https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-dbcp-service-nar/1.13.0/org.apache.nifi.dbcp.DBCPConnectionPool/index.html](https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-dbcp-service-nar/1.13.0/org.apache.nifi.dbcp.DBCPConnectionPool/index.html)
- [https://www.datainmotion.dev/2019/10/migrating-apache-flume-flows-to-apache\_15.html](https://dev.to/tspannhw/migrating-apache-flume-flows-to-apache-nifi-any-relational-database-to-from-anywhere-45d1)
- [https://dev.to/tspannhw/read-apache-impala-apache-kudu-tables-and-send-to-apache-kafka-in-bulk-easily-with-apache-nifi-4n3g](https://dev.to/tspannhw/read-apache-impala-apache-kudu-tables-and-send-to-apache-kafka-in-bulk-easily-with-apache-nifi-4n3g)
- [https://www.datainmotion.dev/2019/04/oracle-golden-gate-to-apache-kafka-to.html](https://www.datainmotion.dev/2019/04/oracle-golden-gate-to-apache-kafka-to.html)
Project Universe in a Nutshell
Tags: gamedev, projectuniverse, indiedev, opensource
Published: 2021-02-16 20:53:21

{% youtube 5bOAh9g-kvo %}

A 6-minute video explanation of the game, school, mall & housing

Next video is likely explaining the story from the fleets formation, to exploring the galaxy & the accidental arrival at the solar system sized Dyson Sphere
Why does freenom say my domain is "Fraud"?
Tags: freenom, domain, dns
Published: 2021-02-16 20:52:46

Hi, 
I was creating a domain for https://manuthecoder.ga/ and suddenly, it was marked as "fraud"!
I then created a new domain with the same content here: https://manuthecoder.ml/

It's just a personal website! I didn't do anything against the ToS!
It was active only for a few days!

Also, *when will Freenom have a good customer support system*?
Proxy Server Types : Master Explanation
Tags: proxy, types, master, explanation
Published: 2021-02-16 20:48:31

#Today we talk about all the proxy server types out there
Proxy server types have been around since the beginning of the Internet; in fact, they have been around ever since there were internet services. Use the proxy server to get around restrictions imposed by ISP’s or websites. For example, you may have to use a proxy site to access certain types of files or websites. The only problem with this type of proxy sites is that they are very slow.

#Mobile Proxy differences
So how does a mobile proxy differ from other types of proxies? These kinds of proxy servers are seen as a differentiator because they work in such a different manner. So, before we move on to the different types of mobile proxy sites, let’s go through how mobile proxy works.

Proxy servers are basically server software that acts as a server for any type of application. These applications can either be web browsers or servers. For example, when you are browsing the web, your computer acts like a proxy server, acting as an intermediary between your computer and the website of the web server. When the request comes in, it passes through the proxy server, and the web page is forwarded to the browser. In essence, the proxy server acts as a translator between the request made by the user and the server of the web server. This is done using a layer of encryption named SSL.

If we want to make the best use of the proxy server, we have to make sure that we use the right kind of proxy server. This is not always easy, as there are many types of proxy servers, so you should find a proxy server that will work well for your needs. So, let’s look at some of the different types of mobile proxy servers:

First off, there are two main types of proxy servers, namely, desktop proxy and mobile proxy. When you connect to a desktop proxy it gives you a residential IP address. A mobile proxy will give you a cellular mobile IP address. 4G mobile proxies have the least amount of abuse and often perform better than residential.

#Types of mobile proxies
So, now that we have discussed how mobile proxy servers work, let us move on to the types of mobile proxy servers. There are basically three main types of mobile proxy servers – web proxy, mobile proxy server. Each type has its own advantages and drawbacks. We will now discuss each type further. You use web proxy server as a means of getting around web blocking applications such as ad blockers.
Javascript - inline styling or manipulating CSS class list
Tags: javascript, css
Published: 2021-02-16 20:48:14

Hi All,

In my journey of learning WebDev I constantly encounter a problem of changing style of an element using Javascript. There's one thing I can't figure out: 

Is it better to change element's style with JS using "inline method" like:

`button.style.color = 'white';`

or trying to manipulate it e.g. by adding a class which contains such property to the element like:

`button.classList.add('className')`

At first glance I'd choose the "inline method" since it's easier and more flexible but I found out that adding inline CSS which in fact is done by this method is considered as a bad practice and can affect SEO.

What do you think about it? I'd really appreciate for an opinion of more experienced than me in this matter :)
Residential Proxy Server
Tags: residential, proxy, server
Published: 2021-02-16 20:39:53

#Uses for Residential Proxy Server
Residential proxies can be used for various purposes. One instance is to access blocked websites. Another instance is for protecting your online privacy, or even to avoid being watched by government or spy agencies. A residential proxy also acts as your personal gatekeeper and acts to control what information flows through your computer. Here’s a look at how it works, and its benefits.

This type of proxy is used to hide your private information from outside sources. There are many reasons why you may want to do this. For instance, if you’re in a public cafe, you don’t want other people seeing your personal details. Or, if you’re trying to surf a restricted Internet site such as a chat room or a social networking site. All these reasons are to keep your private information secure. Any of these reasons could make residential or business proxy servers a good choice for your needs.

A residential proxy server acts as your private gatekeeper. This means that it routes all the data that goes through your computer to a remote server. All traffic coming through the proxy server will be encrypted. Encrypted information cannot be read by anyone except the server itself. In addition, the server accepts 2 types of connections: HTTP and SOCKS5 protocol. This means that when you visit a website, the site itself sends back the information using one of those protocols.

#Advantages for using residential proxy server
There are several advantages to using residential proxy servers, some users choose to use them for a variety of reasons. For example, they could be set up to allow people who are located outside of your home country access to certain types of websites and activities. If you’re a student, you may want a residential proxy to access university websites that aren’t available in your country. Another use for a residential proxy server would be for business use.

Residential proxy servers can sometimes be more expensive than those used for business purposes. Depending on your needs, and what type of website you’re going to, a residential proxy potentially be a cheaper option. Because you won’t have to purchase a dedicated bandwidth. And you won’t have to use a separate IP address for your website.

Residential proxy servers can make your life easier when you’re trying to protect your privacy and keep your identity safe. Whether you want to surf the Internet anonymously, or access blocked/restricted content, a residential proxy is an easy solution. It’s especially helpful for businesses that need a private network for employees to access their company’s network without anyone being able to track them down.

######Source: [https://proxyguys.com/residential-proxy-servers] (https://proxyguys.com/residential-proxy-servers)
FastAPI 4 hours free course
Tags: python, fastapi
Published: 2021-02-16 20:32:08

## FastAPI is the fastest Python Web Framework
Let's learn fastAPI by creating a full API for crud of blog with user authentication

FastAPI is using Pydantic library for types and starlette framework under the hood
FastAPI also provide amazing support for swagger API docs

Source code - https://github.com/bitfumes/fastapi-course

{% youtube 7t2alSnE2-I %}

##  Course Contents 
⏳ (00:00:00) Framework Intro
⏳ (00:04:51) Course Intro
⏳ (00:10:09) Install and Setup
⏳ (00:22:33) Break it down
⏳ (00:30:47) Path Parameters
⏳ (00:41:40) API Docs
⏳ (00:45:55) Query Parameters
⏳ (00:55:58) Request Body
⏳ (01:03:58) Debugging
⏳ (01:10:47) Pydantic Schemas
⏳ (01:19:59) Database Connection
⏳ (01:25:37) Create Model and Tables
⏳ (01:33:36) Store blog to database
⏳ (01:38:51) Get blog from database
⏳ (01:43:29) Exception & Status Code
⏳ (01:53:46) Delete a blog
⏳ (02:08:02) Response Model
⏳ (02:15:56) Create User
⏳ (02:23:07) Hash Password
⏳ (02:30:36) Show User
⏳ (02:35:05) Using Doc Tags
⏳ (02:37:58) Relationship
⏳ (02:51:13) API Router
⏳ (03:04:08) API router path operators
⏳ (03:07:24) Blog & User respository
⏳ (03:18:08) Logn & verify Password
⏳ (03:28:37) JWT Access Token
⏳ (03:36:24) Route behind authentication
⏳ (03:51:00) Deploy fastAPI app


Please hit like if you feel this course is helpful
Eazy Clock in Python
Tags: python, beginners, vscode, eazy
Published: 2021-02-16 20:30:23

For beginners, I have prepared light code for creating a clock application in the python programming language, it's quite simple.

No installation is required except Python and an editor that supports Python.

All you have to do is copy my code from the image and everything will go as it should. 

Alternatively, you can download it on my GitHub.

Link to download here: https://github.com/SympYcz/Clock_App
Twitter: The Growing Dev's Platform
Tags: javascript, python, codenewbie, twitter
Published: 2021-02-16 20:30:15

Twitter is a social media site, and its primary purpose is to connect people and allow people to share their thought and interact with a big audience. It makes it easy to reach through top people in the world, meaning; it promotes communication.

I see Twitter more than been a social media but a community that has different clans and society. I would advise anyone not developers only to have a twitter account and why? 
#### This would be of great help;

- ### To become prominent in your industry and get job opportunities: 
Like after doing a great project personally, just posting and tagging top and influential people in your field is likely to give you an edge in your career and this can be a channel to even job opportunities. I have seen countless people like that, it was not through LinkedIn or any platform other than Twitter

- ### Making connections: 
Twitter is more of meeting with people in your locality and even beyond. Making friends with those with like minds, passion and even dreams, am never surprise to see people make tech startups from partnership emanated from Twitter. 

- ### It is a platform for learning: 
Twitter tends to be a place where you learn from the experiences of top people; their mistakes and success as a young developer etc. advice, inspiration and motivations from their life story, writing codes in simpler way using some functions, accessing  resources like recommended videos and books that can really be of help.

- ### For easy patronization: 
You can be patronized when good at what you do, but more patronized when having more followers and being skillful. This tends to create a sense of popularity in your field. This also has the power to fish out recommendations that might bring some involvements in projects or short term jobs.

- ### Access to help and support:
Stackoverflow is not the only place to find solutions to the bugs in your code. Twitter is also a platform where you can cry for support using hashtags and tags to be helped through, so when stuck you can also try out twitter as another channel to solutions. The dev community am seeing now are really ready to help and assist others willfully. 

To grow on Twitter, You can check this out;

- [Grow in Twitter with Ravin](https://gumroad.com/l/icgkg) 

- [Exponential:How to grow a large Twitter following](https://gumroad.com/l/fqnIl) 

Please kindly comment below for feedback and you can also link up with me on [Twitter](https://twitter.com/chryz_codez) and also follow me on this platform for more engagement, motivation and support as a developer.
Mobile Proxy Server for Instagram
Tags: mobile, proxy, instagram
Published: 2021-02-16 20:12:31

This article explains the mobile proxy server for Instagram. Many people use mobile proxies when using Instagram to succeed in managing many accounts. In this post I will tell you what makes a good Instagram proxy, and why you need it.

Mobile proxies are more reliable than data center proxies when it comes to Instagram. They are usually more reliable as a data center proxy. If you want to find the most stable proxy for Instagram, use ProxyGuys proxy. 

Clearly, we have the best proxy services that you can use for Instagram. 10 Instagram accounts can be used together with mobile proxies. We offer a private proxy and shared. We have the most reliable mobile proxy service on the market. 

Instagram proxies should use a geo-localized proxy so you can get a few dedicated proxy IP’s. A marketing manager who manages a single Instagram account on a single device doesn’t need a proxy. However, if multiple accounts are required, marketing managers can increase the requirements for an Instagram proxy server. 

Furthermore, a private VPN/proxy is ideal for use on Instagram. Instagram has confidence in the IP addresses of mobile proxies. At this time, when used with ProxyGuys then your accounts work well overall. Not to mention, connecting an IG account to a mobile proxy (often referred to as a 4G mobile proxy) helps to reduce costs.

Instagram Proxy Server
Overall, if you use a proxy for Instagram automation, you have less chance of getting IP blocks. Each provider has its own IP allocation set to static, so you cannot change the IP. Generally, you always want to use a mobile proxy for IG to keep your account safe. You can also create your own 4G mobile proxies, but requires lots of technical expertise. 

Indeed, you may need to try a number of free proxies to find those that are not blocked. For the most part, to help you choose the best proxy, we recommend that you ignore the shared proxy option completely. Coupled with which website you are using, it may be mandatory to use a mobile proxy or 4G proxy. 

For many of you, our proxies seem to work, but if you choose the right Instagram proxies, you’ll be fine. We also have easy to use proxy support so you can use it without being an IT specialist. In fact, you can get a trial version of our mobile proxy server for 1 hour.

Finally, If you decide to connect to a proxy server for Instagram, there are several options and strategies to choose from.
4G Proxy vs 4G VPN
Tags: 4g, proxy, vpn
Published: 2021-02-16 20:05:59

Proxy vs VPN
In this article we will take a closer look at 4G Proxy vs VPN. Proxy and VPN are two different types that may seem similar at first. Both are designed to keep you anonymous on the Internet. You can mask your original IP address, protect the web traffic you send and protect your data and protect your privacy. 

If you are wondering if you can use the proxy and the VPN together, the answer is no. You will need to pick one or the other. It’s possible to use a VPN and then connect to a proxy for double protection, the 2 providers need to be different. There is no benefit to do this.

Many people think that sharing a VPN and a proxy only leads to mutual annihilation. Since proxy services usually do not have encryption, people are more likely to ask if they can work together, and vice versa. 

Encryption
VPN has the decisive advantage over proxy servers in encrypting and routing network traffic. VPNs have encrypted tunnels which data is transmitted securely, all data is encrypted, whereas proxy data is not. The main advantage of using VPN instead of proxy is the total encryption of all traffic that passes through it. However, once the traffic reaches the VPN server, it behaves similarly to a proxy. The connection itself is usually more stable with a VPN and, to repeat, it encrypts the traffic. Running a VPN does not slow down your Internet connection. compared to a proxy. VPN or proxy can not improve Internet speed.

However, this is not the only reason why you want to use a proxy server via a VPN. Read below for a simple comparison to understand which one suits you best, VPN or proxy.  When choosing a proxy or VPN, everything depends on what you are using, so if you are not sure what the differences are between them, it helps to define one first. 

What should you choose?
To make it easier to choose between 4G proxy vs VPN, we have listed the advantages and disadvantages of each. Now that you understand a little more about each one, let’s dive into the comparison between proxy and VPN. If you look at the explanation of VPN against proxy, you will notice that the differences between them are quite obvious. Perhaps there is one that clearly distinguishes a proxy from a VPN, and that is the difference between the two. 

VPNs are used because they transfer data from your ISP router to the VPN provider’s server and are used to redirect your Internet traffic via the proxy and also to a remote server. VPNs are more than proxies, because they not only protect you from what your browser does, but also protect all your traffic, including your browser, no matter where you have installed or activated a VPN. A proxy only protects what you do through your browser, aVPN hides your IP address so that websites cannot see your original IP location.
What is a 4G Proxy and how does it work?
Tags: 4g, proxy, how, lte
Published: 2021-02-16 20:04:25

4G/LTE proxy interfaces with a cellular modem to obtain mobile IP addresses. These types of proxies have a high IP trust score.

What is a 4G Proxy?
A 4G proxy works the same as other connections (data center, residential, commercial, enterprise) except it uses a 4G (also known as LTE) cellular modem connected with a cellular carrier. There are numerous cellular carriers around the world. The most common ones in the USA are AT&T, Verizon, and T-Mobile. Each cellular carrier has millions of IP addresses available. This means the chances of you getting the same IP multiple times is very rare.

How does a proxy work?
It is the gateway connection between your internet connected device and websites you’re visiting. It’s known as “intermediary” because of that separation. All devices get a unique IP address when connected to the internet and by using a proxy you hide your real IP address from the outside world. The way to find out if you are using a proxy is by checking your IP address.

Why do I need a 4G Proxy?
In short, 4G proxies are much better to use due to the fact that the IP’s are the same ones everyday users get. You don’t have to worry about bans on whole subnet’s of residential/datacenter IP’s. Instagram, Facebook, Snapchat, Google Ads view the IP’s from these proxies very high. For the most part this results in much longer use of accounts.
Difference between Linked List and Array in CPP
Tags: cpp, java, python, programming
Published: 2021-02-16 19:59:02

![difference-between-arrays-and-linked-list](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cepplhkh2sx7rps19dar.png)
 


Basically, an array is a set of similar data objects stored in sequential memory locations under a common heading or a variable name.

While a linked list is a data structure that contains a sequence of the elements where each element is linked to its next element. There are two fields in an element of the linked list. One is the Data field, and the other is the link field, Data field contains the actual value to be stored and processed. Furthermore, the link field holds the address of the next data item in the linked list. The address used to access a particular node is known as a pointer.

Another significant difference between an array and a linked list is that Array has a fixed size and required to be declared prior, but Linked List is not restricted to size and expand and contract during execution. Below is a summarized table showing differences clearly


![1_Lnb0IARMGORn_c-gYf-24g](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ql7mwjt0ajm3pjl3mjcx.png)