teleren/devto huggingface dataset:
Vector vs ArrayList vs LinkedList
Tags: java, interview, beginners
Published: 2020-04-25 21:16:56

Here I mentioned all the differences between __Vector__, __ArrayList__, and __LinkedList__. 


|                  | Vector          | ArrayList       | LinkedList         |
| -----------------|:---------------:| ---------------:|--------------------|
| _Data structure_ | Growable array  | Dynamic array   | Doubly linked list |          
| _Increment size_ | 100%            | 50%             | No initial size    |
| _Traverse_       | Uses enumeration| Uses iterator   | Uses iterator      |
| _Accessibility_  | Random and fast | Random and fast | Sequential and slow|
| _Order_          | Insertion order | Insertion order | Insertion order    |
| _Duplicates_     | Allowed         | Allowed         | Allowed            |
| _Insert / Delete_| Slow            | Slow            | Fast               |
| _Synchronized_   | Yes             | No              | No                 |
| _Null values_    | Allowed         | Allowed         | Allowed            |
Cypress II in 20 minutes
Tags: cypress
Published: 2020-04-25 21:16:23

In the first post, details were given on how to install and get Cypress running in your new Angular project. 

The first question of importance, is "how do we get addressibility to the elements within the Cypress Test?"


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

Answer: Cy.get('')
 
```javascript
cy.get('body').then(function(body){...} 
```
But notice that to get the children; we must call a function, and not a property.  This is because Cypress uses JQuery under the hood.  Which means we have to learn a bit about Cypress internals and how it does things.

```javascript
var firstelement = body.children()[0]
``` 

For now, it's probably a good idea to read up on Cypress' [How do I get the native DOM reference? ](https://docs.cypress.io/faq/questions/using-cypress-faq.html#How-do-I-get-the-native-DOM-reference-of-an-element-found-using-Cypress).

Notice in the documentation that the results from a Cypress Get have predefined functions for us to use such as *then,shoud,to,not,type* These are the commands Cypress uses to effect the tests we are about to write. 

More to come...
JWP2020
Launching a Vim email newsletter
Tags: vim, news
Published: 2020-04-25 21:09:35

More than 2 years ago, my business partner, @alibby and I started a tiny little website called [VimTricks](https://vimtricks.com) on a whim. It was a place to showcase tidbits and tricks we had learned over our many years of using the [Vim text editor](https://www.vim.org/). This month, we evolved VimTricks into something brand new: a vim newsletter. [VimTricks](https://vimtricks.substack.com/) is now a vim email newsletter that delivers new tips twice a week.

We have both been using the Vim for many years. We build all of products and services, like our main business, [StatusGator](https://statusgator.com), using Vim. For us, Vim represents the most powerful text editing tool available: customizable, extensible, and open source. But Vim can be daunting to learn as a beginner. Even advanced users have much to learn from the large ecosystem of plugins and customizations available.

Internalizing all the capabilities of Vim is a difficult process but one of the most effective ways we have found to do so is to write them down. In fact, the minute we launched VimTricks, we both realized how much more learning and exploring we were doing. VimTricks gave us a reason to find a better way to do things with Vim. Instead of using the same old roundabout way to make an edit, we would research and find a better way. Then, we’d write up a post, reinforcing what we learned. Just this process of discovery, writing, and editing, has proven to be an incredibly powerful way for us to improve our Vim skills.

And now, we are even more motivated to keep learning Vim because we hold ourselves to a deadline. Our Vim newsletter sends emails twice per week, every Monday and Thursday at 8 AM Eastern time. The feedback has been great so far and we are thrilled to keep learning and keep publishing. We may look for a way to monetize such as with subscriptions or sponsors. But right now I am just highly motivated to keep publishing because I'm learning so much.
React Mentions – How to Add Mentions to React Component
Tags: react, javascript, webdev, draftjs
Published: 2020-04-25 20:56:18

{% youtube gDWoQwyI4Vk %}

Almost all modern React applications with chatting features have the mentions functionality built in. You type @-character and as you continue to type the person’s name you want to mention, you see a list of suggestions narrowing down and you can choose the right person.

This is a feature that has become a norm in all chat applications. Nowadays, if you create a chat application and deploy it to production, you should have mentions functionality built in it. If you don’t, I bet that sooner than later you will start to get messages like “Why don’t I see my friend’s name when I type @ and her name?” or something of that sorts. That is because in people’s minds, it is a feature that is required in a chat application. It is non negotiable.

But when I was trying to implement this kind of functionality to my own application for the first time, it was very hard to find any tutorials or guides on how one can actually implement it. Which was pretty surprising since it is so common functionality and feature.

I might just be bad at researching or there actually is very few tutorials about it. Nevertheless, since I now know how it can be done, I decided to create a video, where I teach step by step how you can use [React](https://codepulse.blog/react-for-beginners-complete-guide-to-mastering-react-fundamentals/?utm_source=devto), [Draft.js](https://codepulse.blog/getting-started-with-draft-js/?utm_source=devto) and [Draft.js plugins](https://codepulse.blog/introduction-to-draft-js-plugins/?utm_source=devto) to create text input component that has a mentions functionality. I hope this video will save you some of the trouble I went through when I was figuring this out.

You can see the video [here](https://www.youtube.com/watch?v=gDWoQwyI4Vk).

-----------
_Originally published at [codepulse.blog](https://codepulse.blog/react-mentions-how-to-add-mentions-to-react-component/?utm_source=devto) on April 25, 2020._
I got my first job during Quarantine
Tags: beginners, webdev, career, codenewbie
Published: 2020-04-25 20:47:15


Hi folks, this is my first post, I been thinking of writing this article for the past three days, about how I got my first job as a Frontend Developer and immediately had to work remotely.

![](https://usersnap.com/blog/wp-content/uploads/2017/04/college-study-web-development-2.png)

## The interview

2020 was going to be my year, I was about to do my last semester, and getting a Frontend Developer role was my main goal, I was working hard for it and applying actively to job postings. 

So, one day I was lucky enough to be called for an internship, It was a small company, with a friendly team, they asked me if I had experience with Angular, I told him I had none, but I little of Vue.js, which I was learning since three weeks ago XD; but I was determined to enter and not afraid to learn something new. So, he gave me a design which I had to code to and a couple of days, so I work hard to send it two days before than expected, just to show off, you know, and It worked.

## Time to work

As I enter, my first assignment was to translate my coworker design to a web page, using Angular, yep I just had a couple of days reading the docs and now had to apply then to a real-life project. I admitted It wasn't easy, I spend the first two days in a loop of, reading, writing, and correcting; thankfully I knew how to use Git. It took me a week to finish the web app, and ensure everything was in place. 

after that first project, I felt confident and excited to be early every day at work, but sometimes unexpected things happen; after three weeks at work, our boss told us that we were going to work remotely because of COVID-19, I knew the situation was difficult, but the first thing that comes to my mind was, wow I was just getting used to the office and now I will work remote, this is going to be challenging, and damn I was right.

## The Office outside the office

![home-office](https://www.codebox.es/wp-content/uploads/2017/01/desarrollo-web.jpg)

During my first week working from home, I learn that I wasn't as great as it seems on tv, you must learn to organize your time if you want to survive, these are some of the things that happened to me:

- Seems I just finish my career I still live with my family, and sometimes they interrupted me during my job.
- I worked till late at night, then I was sleepy the next morning.
- Finding a space to be productive is difficult, and not having it affects your workflow.
- Sometimes I forgot to open Slack or my assignments, so I had to get used to not having anyone telling me what to do.

However, I know that I'm lucky, many people are unemployed right now, and who knows when life will go back to normal, but at least I'm still working and with my family, and that's all I need. 

I hope you are ok, as well.
Compile-time polymorphism vs Run-time polymorphism
Tags: java, tutorial, beginners, oop
Published: 2020-04-25 20:43:21

In this post, you will understand,
* What is run-time polymorphism?
* What is compile-time polymorphism?
* What does it happen in the compile-time & run-time?


##__Run-time polymorphism__

You may look at the following classes.

```
//Parent class
class Parent {
    public void eat(){
        System.out.println("Parent - eat()");
    }
}

//Child class
class Child extends Parent {

    @Override
    public void eat() {
        System.out.println("Child - eat()");
    }
}

public class OOPDemo {

    public static void main(String args[]){
        Parent obj = new Child();
        obj.eat();
    }
}
```


In this example, I have created a parent class, child class, and the main class. Then I have created a __Child object by Parent reference__. Now let's check what happens in the compile-time and run-time.

####__Compile-time__
* In compile time it takes care of the Parent reference. 
* Because objects are created in the run time. 
* First, it checks is there any eat() method in Parent class. 
* In this example Parent class has eat() method. 
* So it doesn't give any exception in the compile-time and compilation will be a success.

####__Run time__
* At the run time it takes care of the Child reference and it creates the new child object.
* Then it checks is there any eat() method in Child class. 
* There is an eat() method in Child also. 
* Then this method will be called at the run time. 
* It means object creation is happening at the run time by JVM and Run time is responsible to call which eat() method to call.
* That is why it is called run-time polymorphism (__Dynamic polymorphism__)


##__Compile-time polymorphism__

```
class Animal{

    public void eat(){
        System.out.println("Eat method");
    }

    public void eat(int quantity){
        System.out.println("Eat method with quantity");
    }
}

public class ReferenceDemo {
    public static void main(String args[]){
        Animal animal = new Animal();
        animal.eat();
    }
}
```


In this case, a single class has the same methods with two different parameters. As you know it is called __method overloading__. 

####__Compile-time__
* In compile time it checks animal.eat() method in Animal class. 
* No arg eat() method is there in the animal class.
* According to the parameter list, it will call which method should be called.
* Then the compilation is OK.

####__Run time__
* At the run time it creates the same Animal type object.
* Then it checks the same thing that it did at the compile time.
* It means compile time is enough to check which method should be called.
* That is why it is called Compile time polymorphism (__Static polymorphism__).


##__Final words !__

Overriding   = run-time polymorphism      = dynamic polymorphism
Overloading  = compile-time polymorphism  = static polymorphism

More info: [www.javafoundation.xyz](https://www.javafoundation.xyz/2017/11/compile-time-polymorphism-vs-run-time.html)
Flutter no CodePen!!
Tags: codepen, flutter
Published: 2020-04-25 20:37:29

Oi pessoal, hoje foi [anunciado](https://www.youtube.com/watch?v=VFQB1zE9zYU) que o [CodePen](https://codepen.io/) agora tem suporte para flutter! 

Esse anúncio é super importante para crescer a comunidade de flutter ainda mais. Alem de nos termos mais um espaço para divulgar nossas ideias, designs e dicas.

# Como criar um Pen em flutter

Para criar um design com flutter no CodePen voce deve acessar o a [pagina de tópico de flutter](https://codepen.io/topic/flutter/templates) nela voce pode escolher um template dentre os vários disponíveis ou então clicar em "Open flutter editor" para começar com um projeto limpo.

# Por que eu estou tão animada?

Esse novo espaço para se descobrir pens de flutter é perfeito para uma característica da comunidade: A divulgação de designs e animações!

Todo dia aparece mais um video de um aplicativo lindo feito em flutter, ou um clone do nuBank, agora voce vai poder ver como essas pessoas fizeram essas coisas, além de colocar as coisas que voce fez e acha que a comunidade pode gostar!

## Se quiser dar uma olhada no meu CodePen

Voce pode ver o meu [perfil](https://codepen.io/biaheroliveira), agora vou sempre colocar widgets e designs que eu gostei de fazer e user para outras pessoas usarem também.
Ja ate mesmo coloquei alguns =D
Java interview coding questions - Part 02
Tags: java, interview, tutorial, beginners
Published: 2020-04-25 20:17:55

##__Palindrome check__

{% gist https://gist.github.com/raviyasas/a8452f9e7f14f99a407b49efde01af4a %}


##__Reverse a number__

{% gist https://gist.github.com/raviyasas/a8452f9e7f14f99a407b49efde01af4a %}


##__Copy an array__

{% gist https://gist.github.com/raviyasas/e1a690359f41f0b4f4546e14e61ab910 %}


##__Check the longest word__
{% gist https://gist.github.com/raviyasas/83925b4ab7899f12908bf87c5e8be19e %}


##__Swap numbers of two integers__
{% gist https://gist.github.com/raviyasas/e752acf0cb10eb8394f9cfb79581d577 %}


##__Common elements of two arrays__
{% gist https://gist.github.com/raviyasas/08c0c0e19dc5c160ad4b16b097ce30aa %}
Slim Console
Tags: slim, php, opensource
Published: 2020-04-25 20:02:25

---
title: Slim Console
published: true
description: new Slim Component - Slim Console
tags: #slim, #php #open-source
---

Today we started working on the new Slim Component - Slim Console. Let's build a better Open Source world together.
https://github.com/slimphp/Slim-Console/
Making a game for Jacksepticeye
Published: 2020-04-25 20:00:53

Hello, I really need your help. My favourite youtuber 'Jacksepticeye' has requested for someone to make a game based on 'Siren Head' and I need help making a full blown game of 'Siren Head' I need a team with one or multiple of the following skills:
Programmer
Game Designer
Artist
Sound Designer/Composer
Writer

If you would like to participate please email me @: TheToxicChemist01@gmail.com
Please send on what skill/s you have and I will contact you shortly.
ハードウェアのハッキング
Tags: security, hardware, japanese
Published: 2020-04-25 19:28:59

---
title:  ハードウェアのハッキング 
published: true
description: ハードウェアのハッキングの導入 
tags: security, hardware, japanese
---


私の専門 はハードウェアのハッキング！ 電子機器を設計を楽しんでいます。基本的な物理学を復習しましょう、お先に 。

回路は電気の元(Vcc)とGND(0V)と電子部品をしています。抵抗器はとても大事、回路を壊さないでために抵抗器がつかうなければならない。

![](https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fhacksterio.s3.amazonaws.com%2Fuploads%2Fattachments%2F445961%2Fboi_what_u_doooooooooo_5n2RSLI4Ff.png&f=1&nofb=1)

ハッキング ために電子機器を設計は楽しいですしかしむずかしいですよ。はじめに、サイバー攻撃を考えてなければなrない。Bluetoothプロファイルの一覧はありますか?、ＷｉＦｉ 【ワイファイ】はありますか? 

* 複雑の プロセシング を使て(ために)、RASPBERRY PIはとてもいいです。ネットワークの捕獲の仕掛けために私はRASPERRY PI ４ もとZEROを使て。
* ARDUINOはRASPBERRYより簡単です。でも、 PENDRIVEのバックドアのサイバー攻撃 ためにいいです。(ﾉ◕ヮ◕)ﾉ*:･ﾟ✧ [ コンピュータを注視 ほうがいいですよ ]*:･ﾟ✧ 

便利電子部品:

- [ESP8266](https://www.adafruit.com/product/2471) BluetoothとWIFIあります
- [RPI Zero W](https://www.adafruit.com/product/3400) WIFIあります
- [BLUE Fruit Sniffer](https://www.adafruit.com/product/2269) Bluetoothの スニファ 
- [Digispark Attiny85](https://www.gearbest.com/other-accessories/pp_227676.html?lkid=15666791) PENDRIVEのバックドア

![](https://hackernoon.com/hn-images/1*Iv7e7RJ9TK8AlJ-oGxouWg.png)
Layouts Ideas with CSS Grid
Tags: css, webdev, design
Published: 2020-04-25 19:55:48

In this post I share you a three types of galeries that you can build with CSS Grid and use for your personal projects. CSS Grid is super powerfull for layout design, I hope that this cause you inpiration and motivation to learn more in deep about this world of creativity with CSS, lets go.

[Original publication in Spanish](https://ismaeldevloop.com/ideas-de-dise%C3%B1os-con-css-grid)

1. Photo Gallery 

{% codepen https://codepen.io/ismaeldevloop/pen/wvKJYZe default-tab=css,result %}

{% codepen https://codepen.io/ismaeldevloop/pen/LYpWajN default-tab=result %}

2. Contact

{% codepen  https://codepen.io/ismaeldevloop/pen/XWmMyWG default-tab=result %}

3. Cards

{% codepen https://codepen.io/ismaeldevloop/pen/qBOrQbE default-tab=result %}

If you liked the content and want to learn more about web development, I invite you to subscribe to my [YouTube](https://youtube.com/c/runcoding) channel and follow me on my social networks. See you, see you next time.
Cypress in 20 minutes
Tags: cypress
Published: 2020-04-25 19:50:47

Create a new Angular Project, name it Angular9.

Go to a command line and type.

**'npm install cypress --save-dev'**

After about 10 minutes you should be able to start it.  Type in 

**'npx cypress open'**

When Cypress opens it will create a folder in your project named Cypress and inject multiple test files for you to get started.
 
You should see this:

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

Clicking on a file will start the test immediately in a new window. 

**Change the Examples to test your Angular Project**

Serve up your Angular site 'ng serve', ours is using port 4200. Just to allow Cypress to request your site.

Then make these changes:

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

Once you save them, the Cypress Runner window will reload, press Stop. Click on the first test again. Once the new window opens, press F12 to open debug mode in Chrome.

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

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

This gives us a start on using Cypress in our Angular project. 

Total Time 20 minutes.

In an upcoming article we'll dive in a bit deeper.

JWP2020
Rename and Delete files with Python
Tags: python, linux, productivity, beginners
Published: 2020-04-25 19:47:31

Every day I find myself in need of doing tiring jobs that can be replaced by scripts and that the computer can help me too much, so one day I thought "Okay, I got tired, from now on I refuse to do that kind of work!" and from then on things only got better.

Since college, I created a great bond with the Python programming language, and we became great friends. That way I developed a script with him that would save my life!

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

In my work sometimes I needed to rename files from a list or even delete them from a folder, because they were no longer useful. So my first approach was to create two functions.

The first function was to rename files, so that they had a pattern and an order, like: file_1, file_2 and so on.

{% gist https://gist.github.com/Lucs1590/22f005f182673a62c38447b62d4325eb %}

The heart of this code, as you can see, is in the **os.rename** that renames from the old name to the new file name.
**NOTE: One very cool thing is that the script renames the whole way, so it makes use of the glob.**

The second problem was that I needed to delete all files that were not on a .txt list (believe me, that list was over 100 files). So I used a very similar approach, but with the use of **pandas**, to read the txt file, of **.index** to try to find the file and **os.remove** to remove the files outside the list. The code is shown below.

{% gist https://gist.github.com/Lucs1590/23bea150cdda941af0749f951663e886 %}

And it's because of scripts like these that I have time today to write this article for you. I hope you like it and that it helped!
Try my new CSS-based game!
Tags: pandemic, game, css
Published: 2020-04-25 19:47:22


{% codepen https://codepen.io/cepix/pen/VwvpEOv default-tab=result %}
I hope you like it! 
Let me know if you have any comm.. - dong - 

*What?* Are you complaining because you cannot actually *play* this *game*?
We mortals *can't* and *should* **NOT** play this game!!

*Say what? There is no winner?* 
Of course there aren't winners in this game!!
Wait...**Are there??** 🤔🤔
Technical SEO is more important than people realise
Tags: seo, schema, scripts
Published: 2020-04-25 19:40:36

SEO is changing all the time; Google now makes over 500 small changes (not always to their algorithm) every year, and large core algorithm updates are being rolled out at an accelerating rate. So when we're talking about SEO, we can only ever really talk about the situation right now. 

However, there are a few things in SEO which we can talk about with some permanence. One of those is the fact that technical search engine optimisation gets routinely overlooked. Even today's leading experts regularly fail to mention technical considerations when they talk about the most important ranking factors today. Their own websites are mediocre when it comes to performance, and they often fail to include any technical SEO in their client campaigns, beyond reducing some image sizes and setting up lazy loading to make the site very slightly faster. 

This isn't true of *all* agencies of course. We are the only [SEO agency Manchester](https://heavygatemarketing.co.uk/) has that is currently putting technical SEO at the forefront of what we do. But the *vast majority* of search professionals out there are dropping technical considerations by the wayside and instead focusing exclusively on on-page factors and link building.

## Never ignore technical SEO

I probably don't need to tell you what a mistake this is. Technical SEO is potentially the most important aspect of search engine optimisation. Our tests regularly confirm that poor technical performance - be it slow page load speed, missing sitemap elements, impediments to crawling, or something else - can obliterate any rankings you currently have in an instant. That isn't something you can say about LSI keywords or image alt tags (which some SEOs obsess over while ignoring site performance). 

So why do so many SEOs ignore technical SEO?

Easy - they don't understand it!

Most SEO "experts" are people who started out writing content at a marketing agency, and as the youngest person in the office, they were left in charge of "SEO and all that" as well. A few years and a lot of time spent reading Search Engine Journal later, they're Head of SEO at an agency. 

They usually think of a site's technical aspects as something for developers to think about. 

But we know this is wrong. 

The good news is that getting the basics of technical SEO right is *very* simple. Get in touch with a technical SEO specialist and they'll be able to walk you through getting all the most important things right. As this part of SEO is so often overlooked, even getting the basics right is usually enough to put you ahead of your competitors.