teleren/devto huggingface dataset:
5  websites for practicing algorithms
Published: 2020-07-07 20:49:35

##1. [HackerRank](https://www.hackerrank.com/)

If you are a beginner and want to develop a basic concept then I will suggest you go with HackerRank because they have some good problems for beginners which is sorted level wise i.e. you will get problems in increasing difficulty level. And by applying some basic logic you will able to crack them. 


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

##2. [LeetCode](https://leetcode.com/)
LeetCode has straight to the point problem statements. Once your solution has been approved, it lists it against all approved solutions in the same programming language and the percentage of how many solutions you beat out for speed.
There are 3 main difficulty levels are Easy/Medium/Hard.

Aside from the coding problems itself, the LeetCode community is its most valuable asset. It’s the #1 thing users talk about, and it’s a great resource for getting insight into how others are solving problems and learning from others’ mistakes.

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

##3.[CodeWars](https://www.codewars.com/)
Codewars has a captivating interface with unique ways of presenting the challenges, naming them as Katas, where coders gain skills and challenge other coders in Kumite. It’s one of the best places to learn to code and to have fun at the same time. Master your current language of choice, or expand your understanding of a new one. The challenges provide discussion boards as well as the ability to view user solutions.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/g2moxlxzhyzi24bpjhdi.png)

##4.[HackerEarth](https://www.hackerearth.com/for-developers)
HackerEarth features over 8000 questions, 2000 challenges, and 1000 hackathons. This platform has a thriving community of 3 million developers. There is also a remote interview feature plus analytics for companies to see your statistics.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/962enbnshhe0ovk6ae6b.png)

##5.[CoderBryte](https://coderbyte.com/)
Coderbyte is an online collection of algorithms and full-stack coding challenges and interview kits, which can be solved in 15+ languages including React, Python, and SQL directly in their online editor. The challenges come with official solutions and tens of thousands of user solutions and discussions. There are also tutorials on topics like advanced JavaScript features, data structures, and algorithm interview questions.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/grbr8naris7tqb6jxrti.png)

I hope you will found these websites helpful.
Password generator in less than 15 lines of basic python code
Tags: python, beginners, github, webdev
Published: 2020-07-08 10:22:33

Hello everyone I've made a password generator in less than 15 lines of code. It is beginner friendly and anyone with basic knowledge of python can understand it very easily.

Check my password generator on github here:
https://github.com/Shankhesh-16/Password-Generator.git

Suggestions are always welcome.
If you like it let me know in comments.
Getting started with Computer Science? This is CS50x
Tags: computerscience, cs50x, beginners
Published: 2020-07-08 10:14:06

{% youtube HEsMXPn9l1w %}

This is CS50x by David J. Malan

About CS50x
Introduction to the intellectual enterprises of computer science and the art of programming. This course teaches students how to think algorithmically and solve problems efficiently. Topics include abstraction, algorithms, data structures, encapsulation, resource management, security, and software engineering. Languages include C, Python, and SQL plus students’ choice of: HTML, CSS, and JavaScript (for web development); Java or Swift (for mobile app development); or Lua (for game development). Problem sets inspired by the arts, humanities, social sciences, and sciences. The course culminates in a final project. Designed for concentrators and non-concentrators alike, with or without prior programming experience. Two-thirds of CS50 students have never taken CS before. Among the overarching goals of this course are to inspire students to explore unfamiliar waters, without fear of failure, create an intensive, shared experience, accessible to all students, and build community among students.
Top 10 Blogs on Cloud Computing You Should Read in 2020
Published: 2020-07-08 09:57:12

Cloud computing is the on-demand delivery of computing services over the internet to offer faster innovation, flexible resources, and economies of scale. Services include servers, storage, databases, networking, software, and analytics. Cloud computing provides businesses with speed, productivity, cost savings, performance, and security. Cloud-based storage makes it possible to save files to a remote database and retrieve them on demand.

As the <a href="https://www.xcubelabs.com/services/cloud-services/">cloud services</a> market continues to grow, different voices with different perspectives emerge. Current and potential cloud adopters look for experts, vendors, and natives to educate and form thoughts on the advantages and disadvantages of the technology. Here are ten <a href="https://www.xcubelabs.com/blog/top-10-blogs-on-cloud-computing-you-should-read-in-2020/"><strong>cloud computing blogs</strong></a> one should read in 2020.
Philosophy Quiz - A JavaScript Project
Tags: codepen, javascript, tutorial, beginners
Published: 2020-07-08 09:54:55

<p>This is an example project of JavaScript. This project creates and evaluates results of a quiz which is purely object based. All the JavaScript code is well documented and commented for better understanding of practical JS use.</p>

{% codepen https://codepen.io/amitbiswas06/pen/abdqeOx %}

Cover image by <a href="https://pixabay.com/users/cdd20-1193381/">Cdd20</a> from Pixabay
When is it necessary to bother about the performance of your algorithm?
Tags: discuss
Published: 2020-07-08 09:23:33

---
title: When is it necessary to bother about the performance of your algorithm?
published: true
description: 
tags: discuss
//cover_image: https://direct_url_to_image.jpg
---

I just started the Leetcode array data structure exploration and I see that there is a chart showing where I stand based on how long my solution took to run. I sometimes feel this is discouraging as I just spent hours just trying to come up with a solution but still got the bad news that it is not good enough? Should I be bothered by it or just ignore those charts for now?
Loving Day-to-Day Learning + Exciting News!
Tags: devjournal, codenewbie, womenintech
Published: 2020-07-08 09:20:42

_This post was originally published on July 8, 2020 on [my blog] (https://alexlsalt.github.io/blog)._

Oh man - I am *excited* today! I just got my residency card as a legal resident in France, y'all!!!!

When talking with my friend yesterday and she'd asked how long I'd been waiting on this, my response was "Five years...." (the amount of time I've been in France).

But in reality, the overall process has lasted more or less the past year or so.

This all goes back to me harping on and on about cultivating patience in each moment in our lives because, let me tell ya, this has been a long process but I tried to never let the idea of the outcome (altogether out of my control) affect how I conducted myself in my day-to-day life (altogether *in* my control).

Same goes for coding and learning to program. If we get so wrapped up in whatever outcome we're after (i.e. a new job/career, launching a popular app, starting a company, etc) that we don't embrace each joyful and frustrating moment of the day-to-day learning - I'd go so far as to say that it may not have all been truly worth it.

After all, once we achieve whatever it is we're seeking, we'll be so primed to move onto the next objective and start the whole process over again.

Embrace the day-to-learning. Don't get too wrapped up in the outcome of whatever it is you're currently seeking. And just live a damn good life.

Thanks so much for reading along! [Now let's be friends over on Twitter >>] (https://twitter.com/alexlsaltt)

P.S. I've launched a brand-new podcast with new episodes each Wednesday! Stay up to date by [signing up for the newsletter here >>] (https://www.ladiescodecollective.com/)

![The Ladies Code Collective Podcast art](https://dev-to-uploads.s3.amazonaws.com/i/nl20jdyk6b9ec2w1lms7.png)
One browser extension to rule them all
Tags: platypush, webdev, javascript
Published: 2020-07-08 09:17:25

The current WebExtensions API has made the world of browser extensions safer and more cross-compatible, but it has also introduced its share of limitations and compromises in order to achieve better security.

Something I miss from the "first wave" of add-ons/browser apps is the possibility to customise every single aspect of the browser (UI, input events, background scripts etc.) through tweaks and custom scripts. And I've always wanted the ability to connect these tweaks/custom browser actions to my increasing (and increasingly fragmented) network of smart devices around - perform actions like turn on the lights, cast a video or action a switch directly from the browser, without grabbing the phone and opening an app, and without switching tabs in the browser. Moreover, I wanted the ability to run any kind of simple browser actions (simplify/translate page, share to Twitter/Facebook, play on Chromecast/Kodi, send link to mobile device...) as simple JavaScript snippets within the same extension - I've always considered the idea of having a separate extension, and a separate icon in the browser toolbar, just to do one specific little thing as pure madness.

So I got my plan together and finally developed an extension that could fill the gap. An extension that makes e.g. writing a browser action to cast a YouTube URL to your Chromecast something as simple as a JavaScript snippet:

```javascript
async (app, args) => {
  const url = await app.getURL();
  if (!url.startsWith('https://www.youtube.com/watch?v=')) {
    return;
  }

  const response = await app.run({
    action: 'media.chromecast.play',
    args: {
      resource: url,
    },
  }, args.host);

  if (response.success) {
    app.notify('YouTube video now playing on Chromecast');
  }
}
```

Medium article: https://medium.com/@automationguru/one-browser-extension-to-rule-them-all-3118dc7f9c9b

Firefox link: https://addons.mozilla.org/en-US/firefox/addon/platypush/

Chrome link: https://chrome.google.com/webstore/detail/platypush/aphldjclndofhflbbdnmpejbjgomkbie?hl=en-GB&authuser=0
Wednesday Links - Edition 2020-07-08
Tags: kotlin, java, gradle, spring
Published: 2020-07-08 08:59:34

JEP 387: Elastic Metaspace (6 min read) 🦆
https://openjdk.java.net/jeps/387

Kotlin 1.4-M3 is Out: Standard Library Changes (10 min read) 📚
https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-is-out-standard-library-changes

Comparing two strings irrespective of their capitalization in Kotlin ( 20 sec read) 📊
https://twitter.com/kotlin/status/1278712617792679936

Gradle vs Bazel for JVM Projects (22 min read) 🚅
https://blog.gradle.org/gradle-vs-bazel-jvm

Digging into Hibernate's Query Cache (8 min read) 🧊
https://blog.frankel.ch/digging-hibernate-query-cache/

Implementing a Cache with Spring Boot (9 min read) 🧃
https://reflectoring.io/spring-boot-cache/

A Concurrency Cost Hierarchy (40 min read) 🗿
https://travisdowns.github.io/blog/2020/07/06/concurrency-costs.html

IntelliJ's text based HTTP client (1 min read) 📑
https://www.mscharhag.com/intellij/http-client
When to use NoSQL over SQL ?
Tags: sql, datascience, watercooler, career
Published: 2020-07-08 08:16:43

The purpose of this blog is to provide you some clarification about how to choose perfect database for your projects. 

Well In terms of data engineering, data pressure is the ability of the system to process the amount of data at a reasonable cost or at a reasonable time. Thus, data pressure plays a very crucial role while working on highly scalable projects.

So, let's see what are the major differences between them: 

- SQL: Optimized for Storage
NoSQL: Optimized for Compute/Querying

- SQL: Normalized/relational
- NoSQL: De-normalized (Unnormalized)/Hierarchical

- SQL: Table based data structure
NoSQL: Depending on DBs, the data structures are …
★ Key-Values(DynamoDB, Radis, Voldemort)
★ Wide-column i.e. containers for rows(Cassandra, HBase)
★ Collection of Documents(MongoDB, CouchDB, DynamoDB)
★ Graph Structures(Neo4J, InfiniteGraph)

- SQL: Scale Vertically & Expensive. Can Scale Horizontally but challenging & time-consuming
NoSQL: Scale Horizontally & Cheap

- SQL: Fixed schema, altering requires modifying the whole database
NoSQL: Schemas are dynamic

- SQL: Good for OLAP
NoSQL: Good for OLTP at scale

- SQL: ACID(Atomicity, Consistency, Isolation, Durability) properties
NoSQL: BASE(Basically Available, Soft state, Eventual consistency) properties

###__When to choose NoSQL?__
For our application service, when it comes down to
✔ Well-known and well-understood types of access patterns
✔ Want simple queries
✔ Not much data calculation involved
✔ Have a common business process
✔ OLTP apps

If all the above mentioned conditions are required, then NoSQL is a perfect Database and would be most efficient. We have to structure the data model specifically to support the given access pattern.

###__When NOT to choose NoSQL?__
If our application service has the requirements to support

✔ Ad-hoc queries. e.g. bi analytics use case or OLAP application
✔ May require “reshaping” the data
✔ Complex queries, inner joins, outer joins, etc.
✔ Complex value calculations

then we have to prefer SQL instead of NoSQL as it will be much more efficient as NoSQL. 


So basically, if we know about our access patterns and scalability is such a big factor for your application then NoSQL is perfect choice from all sides.

##What's your opinion over my topic?



####IF YOU THINK THIS ARTICLE IS HELPFUL THEN DO LIKE AND FOLLOW ME FOR MORE INFORMATIVE STUFF.
Easier icons in your Laravel Blade templates
Tags: laravel, blade, templating, fontawesome
Published: 2020-07-08 08:02:25

---
title: Easier icons in your Laravel Blade templates
published: true
description: 
tags: ["laravel","blade","templating","fontawesome"]
//cover_image: https://direct_url_to_image.jpg
---

At **AddWorking** we're huge fans of [Font Awesome](https://fontawesome.com/icons?d=gallery&s=solid&m=free). It's so easy to use and have so many icon, it's really *awesome*. 

In today's snippet I'm going to show you how you can create a custom Blade directive to use icons like that:

```HTML
<a href="...">
    @icon('bacon') Click to recieve bacon!
</a>
```

*Yes, bacon is an [existing icon](https://fontawesome.com/icons?d=gallery&q=bacon&s=solid&m=free).*

Bear with me, you may learn a thing or two on how Laravel handles assets & templates.

## Component

First, install Font-Awesome:

```BASH
composer require components/font-awesome
```

*I personnaly prefer using composer for this but you can use NPM also.*

## Stylesheet

First add this to `webpack.mix.js`:

```JS
mix.styles([
    'vendor/components/font-awesome/css/fontawesome.css',
], 'public/css/all.css');
```

*see [Laravel doc](https://laravel.com/docs/7.x/mix#plain-css) for details about mix.*

Run `npm run production` (or dev...)

Then, add this to your template's `<head>` section:

```HTML
<link rel="stylesheet" href="{{ asset('css/all.css') }}">
```

## Service Provider

Now we need a new blade directive: `@icon`.

Update app/Providers/AppServiceProvider.php

```PHP
use Illuminate\Support\Facades\Blade;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        Blade::directive('icon', function ($expression) {
            return "<i class=\"fas fa-fw fa-{{ $expression }}\"></i>";
        });
    }
}
```

*don't forget to clear your view cache with `php artisan view:clear` each time you update a Blade directive!*

## Done.

That was it. Now you can `@icon('check')` anywhere in your views.

---

Don't hesitate to leave a comment if you're having trouble with this snippet.
Angular 10 UI Components
Tags: angular, design, ui, components
Published: 2020-07-08 08:01:15

New Angular UI components library.

Created with Angular 10 only (no javascript). 
32+ components to plug and play in angular application.
Faster and easy integration.
Smaller in size.
And yes it's open source.

Find Examples at https://stackblitz.com/edit/np-ui-lib

NPM package at https://www.npmjs.com/package/np-ui-lib
RouteX - An Update 
Tags: showdev, update, javascript, node
Published: 2020-07-08 07:51:49

---
title: RouteX - An Update 
published: true
description: 
tags: #showdev #update #javascript #node
---


Ahoy!
Remember this [post?](https://dev.to/barelyhuman/routex-api-router-for-node-yes-another-one-34fb).

Yeah, this one's just a follow up so you might want to go through that one to find out what we are talking about. 

## You know, I could just use Next.js's API Routes

You could, I can't force you to shift to a CLI tool that can be used in any project and just pointing it to a folder of files that export a `(req,res)` handler can help you create API routes but all in all, it's your call in the end. 

You might want to check the `canary` version's [performance](https://github.com/barelyhuman/routex/tree/canary#performace) though, might just change your mind.


## It uses `module.exports` ? We are in 2020!

About that.. 
I'm working on a few boilerplate templates for transpilers and   bundlers like webpack and babel's own cli's and also Typescript since it's almost a necessity for some people today. Stay Tuned for that.

## Thats it?

Yeah to sum it down. 

- Added CLI options for directory path and port 
- Improved Performance 
- Response helper functions added
- No dependencies as everything is compiled into a single file

and that's about it.
Vanilla JavaScript Stop Form Submit
Tags: javascript
Published: 2020-07-08 07:15:52

Let's say we want to add form validation in `JavaScript`, first we need to stop the form from actually submitting.

We can do this very simply in `JavaScript`.

## HTML Structure

```html
<form onsubmit="return validate();" novalidate>
  <input type="text" name="name" id="name" placeholder="Your name?" required />
  <br /><br />
  <input type="text" name="leave" placeholder="Leave me" />
  <br /><br />
  <input type="submit" value="Send" />
</form>
```

As you can see we use the `on submit` function and say to return a function callback.
Then we have two fields of we will validate the first one.

## JavaScript Stop Submit

To stop the submit we use the following code:

```js
function validate() {
  var name = document.getElementById('name');
  if (name && name.value) {
    return true;
  } else {
    alert('Please fill the name field');
    return false;
  }
}
```

We use the return values, either true or false, depending on whether someone filled out the name field.

We could even use `event.preventDefault()` on the `onsubmit` function, but this will cause any action not to go true.

That would work well if we plan an Ajax post, for instance.

You can find this example on Codepen.

<p class="codepen" data-height="265" data-theme-id="dark" data-default-tab="html,result" data-user="rebelchris" data-slug-hash="wvMmPgB" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Vanilla JavaScript Stop Form Submit">
  <span>See the Pen <a href="https://codepen.io/rebelchris/pen/wvMmPgB">
  Vanilla JavaScript Stop Form Submit</a> by Chris Bongers (<a href="https://codepen.io/rebelchris">@rebelchris</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Copy/Remove Watermark from Word Document in Java Application
Published: 2020-07-08 07:00:06

In my early post, I have introduced [how to add text watermark and image watermark to Word document in Java application](https://dev.to/jazzzzz/java-add-text-watermark-and-image-watermark-to-word-document-3g9e). Today, I will introduce how to copy and remove watermark from Word document in Java application by using Free Spire.Doc for Java. Free Spire.Doc for Java supports copy and remove both text watermark and image watermark from Word document.

**Installation**
**Method 1:** Download the [Free Spire.Doc for Java](https://www.e-iceblue.com/Download/doc-for-java-free.html) and unzip it. Then add the Spire.Doc.jar file to your Java application as dependency.

**Method 2:** You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.

```java
<repositories>
   <repository>
      <id>com.e-iceblue</id>
      <name>e-iceblue</name>
      <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
   </repository>
</repositories>
<dependencies>
   <dependency>
      <groupId>e-iceblue</groupId>
      <artifactId>spire.doc.free</artifactId>
      <version>2.7.3</version>
   </dependency>
</dependencies>

```

**The original Word document is shown below：**

![](https://dev-to-uploads.s3.amazonaws.com/i/jh1pre9rha8vxx3j5pxi.jpg)

![](https://dev-to-uploads.s3.amazonaws.com/i/r2aeinz6wy7oek1pfp36.jpg)

**Remove Text Watermark**

```java
import com.spire.doc.Document;
import com.spire.doc.FileFormat;

public class RemoveWatermark {
    public static void main(String[] args){
        //Create a Document instance
        Document doc = new Document();
        //Load the Word document
        doc.loadFromFile("result.docx");

        //Set the watermark as null to remove the image (or text) watermark
        doc.setWatermark(null);

        //Save the document
        doc.saveToFile("RemoveWatermark.docx", FileFormat.Docx_2013);
    }
}
```
![](https://dev-to-uploads.s3.amazonaws.com/i/6cg3sza3uy2eeop6qkps.jpg)


**Copy Image Watermark**

```java
import com.spire.doc.*;

public class CopyWatermark {
    public static void main(String[] args) {
        //load document 1
        Document doc1 = new Document();
        doc1.loadFromFile("result2.docx");

        //load document 2
        Document doc2 = new Document();
        doc2.loadFromFile("target.docx");

        //Get the image watermark of document 1, copy it to document 2
        doc2.setWatermark(doc1.getWatermark());

        //Save the document2
        doc2.saveToFile("CopyWatermark.docx",FileFormat.Docx_2013);
        doc2.dispose();
    }
}
```
![](https://dev-to-uploads.s3.amazonaws.com/i/o76ncrdhxstjf3do8sej.jpg)
What's your main browser for development?
Tags: webdev, discuss, productivity
Published: 2020-07-08 06:55:40

---
title: What's your main browser for development?
published: true
description: 
tags: webdev, discuss, productivity
//cover_image: https://direct_url_to_image.jpg
---
When it comes to development, the browser choice is obviously as important as a properly configurated code editor and terminal.

I'm on Chrome and still find dev experience best on it. I've read more and more people switching to Firefox and Brave, tho. 

What is your current weapon of choice and why?