teleren/devto huggingface dataset:
How to swap two variable value without using temporary variable
Tags: javascript, beginners
Published: 2021-02-19 14:06:50

Maybe you will find coding skill test that push you ability to swap value between two variables, some developer often using `"the third var"` technique 

```
// use var instead of let :(
var a = 10;
var b = 14;
var temp = b;
b = a
a = temp
console.log(a, b);
```

but some developer don't waste his line to create third variable, so this is what they do 

```
let a = 10;
let b = 15;
[a,b] = [b,a]; // array destructuring 
console.log(a, b);
```

even more, they can shorting their line with this rhapsodic technique
```
let [a,b] = [10,15];
[a,b] = [b,a];
console.log(a, b);
```
How to get started with online marketing

Tags: onlinemarketing
Published: 2021-02-19 14:00:01

Online marketing is taking shops online where it's possible for them to take orders online and deliver products right to the customer’s door.

These are some of the ways to get going with online marketing

Learn SEO
You should ideally start by learning about SEO. SEO is one of the core things that can help you rank better and backlinks are decidedly the most important factor for ranking a site.
When you learn the basics of SEO which is learning how to build links, how to optimize your site’s internal structure to maximize link juice to the posts you want to rank. You learn how to optimize meta tags and descriptions for seo as well. Most SEO courses have <a href="https://contentsnare.com/client-portal/">client portals</a> where you can ask questions

Learn how to create knock-off-the-socks content
Content should both inspire and educate people. When someone goes through your content they should come of learning better at the other end.
Creating good content is about tapping into the mindset of the consumer and creatively finding what they will be most inspired by.
This must include customer research for starters.

Learning how to network
Networking is an important aspect of online marketing. With networking the goal is to reach out to people in the same niche as you and be exposed to their audience. Networking exposes you to their strategies, what they do best and you end up learning a lot about marketing in this manner.
Networking means paying attention to their site and content as well and using the opportunity to market others as well. For instance Leadpages spent a lot of time giving away templates and content for free before they took a single step marketing their landing page tool. 
By creating and giving away content for free they had tons of leads and active members in the community who wanted more from them. They built and marketed to a ready audience.

Investing in social media marketing
Social media marketing is another core aspect of marketing online. Don’t just post product photos. Instead use the channel to create content and post content that positively elevates your branding and makes you go for success.
Sign up to two or three social channels that you can actively use.
Conclusion
These are some of the steps you need to take to get started with online marketing. Do let us know in the comments below what you think of these tips?
Java ecosystem survey 2021: We need your input
Tags: java, jvm, survey, 2021
Published: 2021-02-19 13:55:32

Hello Java developers! 

Just like in 2020, we are creating a comprehensive Java 2021 report that reflects the state of the JVM ecosystem. Below you will find a summary of the [JVM Ecosystem 2020 report](https://snyk.io/blog/jvm-ecosystem-report-2020/).

![Java ecosystem 2020](https://lh5.googleusercontent.com/uODTvY_96HPp02wvrh8DviCkGDQeLabu0c2zcDXFBXKmUi9WGyftaZw9lTKx_iQJH_ii-icKgKzwmPzb57xv9Fxu8_SxUyeUsh6A1sIEZYMjpGVWgltC-bfDUGY7vI2NLCOrAjMO)


As always, we couldn’t have done this without you! So, once again, we ask for you help with the 2021 edition of the JVM Ecosystem report.

#### [GO TO JAVA 2021 SURVEY](https://snykteam.typeform.com/to/ZHuh7NzJ)

Just like last year, we put together a comprehensive survey. Together with our partner Azul, we would like your input on how you use Java and the JVM ecosystem.

It takes less than 3 minutes (10 questions) to voice your preferences in this year’s Java and JVM report!

Our final report this year will embed multiple data points, on top of the survey results, so this will be interesting! Besides data that we already have at Snyk, we will look at GitHub projects, Google searches, and other available data. Combined with the survey results we aim to create the most comprehensive overview of the JVM 2021 landscape.

[![Go to the Java 2021 survey](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yiavf8xfnq1wp9dihlpm.png)](https://snykteam.typeform.com/to/ZHuh7NzJ)
By submitting your answers to this survey, you are not only helping the community with sharing your data, but you can also help our charity goal for this year. Once we get to 2,000 responses, we’ll donate $1000 to Devoxx4Kids! And if we exceed 5,000 responses, we’ll top that up to $2,000!


We value diverse input, so please do share this survey with friends and colleagues. Let your Java voices be heard!

#### [GO TO JAVA 2021 SURVEY](https://snykteam.typeform.com/to/ZHuh7NzJ)
How to monitor backup and restore progress in SQL Server
Tags: sql, mssql, database, tsql
Published: 2021-02-19 13:17:01

There are few tips that might help you to diagnose problems during backup restore on SQL Server 2016+. 

Common restore script:

```sql
RESTORE DATABASE [mydb] 
FROM  DISK = N'F:\DatabaseBackups\mydb.bak' 
WITH  FILE = 1,  
MOVE N'mydb' TO N'G:\Databases\mydb.mdf',  
MOVE N'mydb_log' TO N'G:\DatabaseLogs\mydb.ldf',  
NOUNLOAD,  STATS = 1
```
`STATS = 1` - for receiving status messages every 1% of progress


The script to validate backup:
```sql
RESTORE verifyonly FROM  DISK = N'F:\DatabaseBackups\mydb.bak'
```

The script to get backup file statistics, it allows to check restored db size:
```sql
Restore Filelistonly FROM  DISK = N'F:\DatabaseBackups\mydb.bak'
```

Concurrent restore/shrink tasks might block your restoring procedure. You can monitor restoring process status by the following SQL:
 
```sql
SELECT session_id as SPID, command, a.text AS Query, start_time, percent_complete, dateadd(second,estimated_completion_time/1000, getdate()) as estimated_completion_time, *
FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) a
WHERE r.command in (
   'BACKUP DATABASE', 'RESTORE DATABASE', 
   'RESTORE HEADERONLY', 'DbccFilesCompact', 'DbccSpaceReclaim')
```

If you see `percent_complete` is zero for a log time, you might need to add SQL Server user to `Perform Volume Maintenance Tasks` security policy via secpol.msc. Check the article:
https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-instant-file-initialization?view=sql-server-ver15

You can check resource consumption with `sp_who2` function. 
The following script uses a temp table for order/filter operation.

```sql
CREATE TABLE #sp_who2 (SPID INT,Status VARCHAR(255),
      Login  VARCHAR(255),HostName  VARCHAR(255),
      BlkBy  VARCHAR(255),DBName  VARCHAR(255),
      Command VARCHAR(255),CPUTime INT,
      DiskIO INT,LastBatch VARCHAR(255),
      ProgramName VARCHAR(255),SPID2 INT,
      REQUESTID INT)
INSERT INTO #sp_who2 EXEC sp_who2
SELECT      *
FROM        #sp_who2
-- Add any filtering of the results here :
--WHERE       SPID = 151
-- Add any sorting of the results here :
ORDER BY    DBName ASC
 
DROP TABLE #sp_who2
```
Hack the climate, Hackathon. How YOU can help with the climate using tech.
Tags: technology, programming, webdev
Published: 2021-02-19 13:45:42

---
title: Hack the climate, Hackathon. How YOU can help with the climate using tech.
published: true
description: This hackathon is about you. It's about me. It's about us and the Earth. It's a hackathon about respect for the environment and to stand united for the climate, through our way of living. This is about sustainability. 
tags: technology, programming, webdev
cover_image: https://challengepost-s3-challengepost.netdna-ssl.com/photos/production/challenge_background_images/001/335/700/datas/original.png
---

TLDR; You want to make the world a better place? Of course you do. Here's a change to join a hackathon "Hack the climate". Help work on some important climate challenges.

## Resources

- [Hackathon homepage](https://hacktheclimate.devpost.com/)

- [Sign up for the Hackathon](https://hacktheclimate.devpost.com/register?flow%5Bdata%5D%5Bchallenge_id%5D=11648&flow%5Bname%5D=register_for_challenge) 

- [Cloud skill challenges](https://www.microsoft.com/ai-cloud-skill-challenge?rtc=1) Read more about Cloud skills challenges you can take before the hack to sharpen your skills.

## Prepare for the Hack, with Cloud skill challenges

As you prepare for the Hackathon, you can do so by taking on three cloud skill challenges. It will surely sharpen your technical skills:

- [Cognitive services challenge](https://docs.microsoft.com/learn/challenges?id=84d54342-a0ea-4886-a7cc-621ffa9e5335&WT.mc_id=aiml-14997-heboelma&ocid=AID3026326)
- [Power platform challenge](https://docs.microsoft.com/learn/challenges?id=1725e6db-260e-4464-85d5-1d1f2169a955&WT.mc_id=aiml-14997-heboelma&ocid=AID3026326)

- [Azure machine learning challenge](https://docs.microsoft.com/learn/challenges?id=b0ee9ade-fae7-4fc5-ac22-a2cabd2df06c&WT.mc_id=aiml-14997-heboelma&ocid=AID3026326)

## When

Mar 22 – 26, 2021

## Some important environmental challenges

Fixing the climate isn't easy, there are many factors to consider. Here are some:

- **CARBON**: How to go low carbon, by reducing emissions and cut energy consumptions?

- **ECOSYSTEM**: How to preserve and protect biodiversity and health of the world’s ecosystem?

- **WASTE**: How to become more sustainable, by developing products with zero waste?

- **WATER**: How to be water positive, meaning replenish more water than used?

## Hackathon challenges

**Buy Food With Plastic** - Today our plastic collection process is manual. We would like to see how this can be automated. An example: Instead of writing number of plastic bottles collected, we want some kind of digital solution. And here the numbers of bottles could be shown on our public web, as well as the numbers of meals provided. We urge you to be creative and innovative. Surprise us on how technology can simplify this process and make our business even more attractive. 

There will be even more challenges added, so make sure you check out the [homepage](https://hacktheclimate.devpost.com/) for the latest info.
Normalization using NumPy norm (Simple Examples)
Tags: python, machinelearning, tutorial
Published: 2021-02-19 13:44:53

---
title: Normalization using NumPy norm (Simple Examples)
published: true
description: 
tags: #python #machinelearning #tutorial
//cover_image: https://direct_url_to_image.jpg
---
Introduction
NumPy norm
norm of an array
Norms of columns and rows of a matrix
Norm of an n-dimensional array
Why do we need norms?
L1 norm of a vector
NumPy norm of arrays with nan values
Euclidean distance using NumPy norm
Performance comparison: NumPy norm vs sqrt
Conclusion


https://likegeeks.com/numpy-norm/
6   advantages-disadvantages of learning coding. 
Published: 2021-02-19 13:31:42

Ok. First of all I have to say that, If you have a strict vision to be a developer.  I am telling you,you are very lucky.Trust me,My name is Asif Zawad.  And I am 16 years old. I am a partime web developer. 
 I started coding in november-2019 with python.I was messing around with the arrays, strings and some super ultra simple projects such as,print("hello world"),or a simple BMI calculator.  I didn't had any vision at that time.And also I was not that creative at that time. So my journey on coding was not so long.  I started doing some basics HTML,css, JS from some courses.That was the first game changer in my life. I was like,"what was I doing over the past months learning nothing but simple strings and messing around with arrays". Then I started with some simple to advanced level designs. And trust me, that was worth it. 

So as my young age experiences,What are the advantages and disadvantages of learning and create a mindset on this type of work. 

##1.Infinity time :
You know at this age, there is not much job for us. At this age, our main job is to learn and learn and also to learn.  So we have enough time to learn something else out of  academic studies. We can easily manage the time in our daily schedule of doing something creative or coding.

##2. Amazing tech skills :
 This thing that I realized that a young kid is more skilled and a fast learner than an adult man. This is one of the biggest opportunity for young generations.They can learn many things faster than other.And also they get a clearer concept from a very small amount of time. 

##3. CONS, Not have much experience : 
You can obviously think that a 25-30 year old developer is way more experienced than a 16-20 year old dev. This is one of the biggest opportunity for 25-30s in the marketplace and they get hired easiy. 


##4.learning is the passion : 
I don't know that this is right.But I saw that our aged guys are more curious about how a tech works, they keep questioning "how" and "why".So this is a very good habit to for this type of career. 

##5. CONS,  Can not attend to bootcamp or colleges : 
Actually this not even a disadvantage for us. At this age, we have schools and also higher educations for various topics. And also have exams,so it is a bit hard to attend on a bootcamp ir even a college.But most of the type. We have unlimited courses and many resources out there. We can get them and learn any time,anywhere.

##6. Cons,  Tutorial hell : 
This thing I mostly see that our aged people have experienced the concept of tutorial hell,the main reason of this thing is not having a good mentor,or a guideliner. So this is why we have to decide on our own what to do next. 

    



I ________ for some spelling and some grammatical mistake.This ia my first blog and English is my third language.
Scrapy Vs Proxies API
Published: 2021-02-19 13:25:59

The world of web scraping is varied and complex and Proxies API sits at one of the most crucial junctions. Allowing web scrapers/crawlers to bypass IP blocks by using a single API endpoint to access our 20 million-plus high-speed proxies on rotation.
One of the questions we get frequently is how we are different from services like OctoParse or Diffbot. Many times it is like comparing Apples and Oranges but when we send this comparison table to our customer's developer team, their CXO, their marketing or SEO team, they typically get it quite easily if we are a suitable service or not.

So here is how we are different from Scrapy.

Scrapy is an extremely powerful crawling and scraping library written in Python.

Here is how easy it is to create a multi-threaded crawler and parse it at a single endpoint.
and to scrape, it allows both XPath and CSS selectors.
Scrapy vs Proxies API
Aspect	Proxies API	Scrapy
Who is it for?	Developers	Developers
Cost	1000 free CallsStarts at $49 pm	Open Source
API access	Yes	yes
Size of project	enterprisemediumsmall	enterprisemediumsmall
Easy to setup	single api call for everything	manual setup
Product/Service	product	product
Rotating Proxies	Yes	no
Single API?	Yes	no
Desktop App	no	no
Visual Scraping	no	no
Untitled
Interfaces em Java
Tags: tutorial, braziliandevs, java
Published: 2021-02-19 13:22:47

As interfaces em **Java** é uma forma de contrato, que a classe ao assinar, tem a responsabilidade de implementar os seus métodos.

Exemplos:

```java
public interface CarroTurbo {
  void ligarTurbo();
  void desligarTurbo();
}
```

Essa é a nossa **interface**, a **classe** que implementa-lá também será um "CarroTurbo" , já que obrigatoriamente deverá implementar seus métodos.

```java
public class CarroPasseio implements CarroTurbo{
  int velocidade;
  String marca;

  @Override
  public void ligarTurbo() {
   //aumentar a velocidade
  }

  @Override
  public void desligarTurbo() {
    //diminuir a velocidade
  }
}

```

A classe "CarroPasseio" implementar "CarroTurbo".

```java
public class CarroDeCorrida implements CarroTurbo{
  int velocidade;
  String marca;

  @Override
  public void ligarTurbo() {
   //aumentar a velocidade
  }

  @Override
  public void desligarTurbo() {
   //diminuir a velocidade
  }
}
```

A classe "CarroDeCorrida" implementar "CarroTurbo".

```java
public class Corrida {
  public void poderCorrer(CarroTurbo carroTurbo){
    carroTurbo.ligarTurbo();
    carroTurbo.desligarTurbo();
  }
}
```

A classe "Corrida" possui o método "poderCorrer" que aceita um "CarroTurbo" , assim qualquer classe que implementar "CarroTurbo", poderá ser utilizado no método, tendo a garantia que o "contrato foi efetuado" e possui os métodos para "ligarTurbo" e "desligarTurbo".

Diagrama de classe:

![Diagrama](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0w48353ccps5y31nv1t8.png)

Código fonte no GitHub:

{% github franciscojsc/interface-em-java no-readme %}
Welcome to Draftbox
Tags: gettingstarted
Published: 2021-02-19 13:09:49

We are excited to have you on-board. To give you a glimpse of what Draftbox is, we have populated it with sample posts.

Wow the preview really works.

## A short story

We are building Draftbox on the promise of bringing JAMstack to content creators. We are very bullish on results when content creators can fully utilize JAMstack, and we want to empower them. Draftbox is a **no-code JAMstack** blogging platform that provides performance, user experience, SEO, security, and scalability without breaking a sweat.

## Under the hood

Draftbox sites are created using [Gatsby](https://www.gatsbyjs.com/). Gatsby is a framework for building blazing-fast apps and websites. Gatsby has a flourishing ecosystem, strong community, and is being used by companies like Nike, Tinder, and AirBnB.

Draftbox sites are deployed to [Netlify ](https://www.netlify.com/)Edge. Netlify is a market leader in hosting services for static sites. Netlify has been at the forefront of the JAMstack revolution and loved by thousands of developers worldwide.

## Next up — Draftbox Editor

As a content creator, you would be excited to learn what kind of content blocks you can add using [editor](/powerful-editor-built-for-pro-content-creators/).

BTW, you can delete these sample posts from dashboard.
Daily Developer Jokes - Friday, Feb 19, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-02-19 13:00:29

---
title: "Daily Developer Jokes - Friday, Feb 19, 2021"
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=Friday%2C%20Feb%2019%2C%202021"
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/5e1258d5a93a0.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:___ What do you get when you cross a computer with an elephant?

___A:___ Lots of memory!
 -->
Setting CSS classes in Markdown with Jekyll
Tags: jekyll, css
Published: 2021-02-19 14:44:04

---
title: Setting CSS classes in Markdown with Jekyll
published: true
date: 2021-02-19 13:00:00 UTC
tags: jekyll, css
canonical_url: https://boringrails.com/tips/jekyll-css-class
---

Writing blog posts in Markdown is just great. This blog is written in Markdown!

But sometimes you might be tempted to drop down to raw HTML to add some extra styling.

## Usage

Jekyll uses Kramdown under-the-hood to render your Markdown by default.

In Kramdown, there is a feature called “Block Inline Attribute Lists”, which is an extension of standard Markdown syntax.

```markdown
A simple paragraph with an ID attribute.
{: #para-one}

> A blockquote with a title
{: .pull-quote }
```

You use `{: CSS_SELECTOR }` to attach additional HTML attributes to the rendered Markdown output.

![Jekyll CSS classes](https://boringrails.com/images/jekyll-css.jpeg)

It’s great for adding small embellishments to your posts without having to drop down to raw HTML.

## Additional Resources

Kramdown Doc: [Inline Attribute Lists](https://kramdown.gettalong.org/syntax.html#block-ials)

* * *
[![](https://boringrails.com/images/twitter-banner.png)](https://twitter.com/_swanson)
Here is Kubeapps the k8s/helm dashboard
Tags: productivity, kubernetes, devops, webdev
Published: 2021-02-19 12:56:37

## Concepts

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/862ch4vsabdsi7p5q3k8.png)

Kubeapps is a dashboard for your Kubernetes cluster that makes it easy to deploy and manage applications in your cluster using Helm

<h4><strong>Deploy Your Favorite Charts and Operators</strong></h4>

Browse Helm charts and Kubernetes Operators from public and private registries. Perform day-two operations like upgrades or rollbacks.

<h4><strong>Use Private Namespaces and Multiple Clusters</strong></h4>

Create and manage different catalogs isolating them in different namespaces and clusters with a single Kubeapps instance.

<h4><strong>Secure Authentication and Authorizations</strong></h4>

Leverage RBAC and OAuth2/OIDC to provide authenticate and authorize users in your system.

![Image](https://user-images.githubusercontent.com/4025665/80470063-c0dfe680-8941-11ea-927a-2a90a0b6b611.gif)

## Prerequisites

* Kubernetes

* Helm 3

* Administrative access to the cluster to create Custom Resource Definitions (CRDs)

## Installation

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
kubectl create namespace kubeapps
helm install kubeapps --namespace kubeapps bitnami/kubeapps
```

## Link

* [https://kubeapps.com/](https://kubeapps.com/)

* [https://github.com/kubeapps/kubeapps](https://github.com/kubeapps/kubeapps)
Focus on one thing for longer
Tags: productivity, programming
Published: 2021-02-19 12:42:47

---
title: Focus on one thing for longer
published: true
description: The importance of concentration
tags: Productivity, Programming
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmrm6j0is8gndperim6e.jpeg
---

I read on a book that said “When you desperately want something, the universe conspires to make it happen”. This sentence is about perseverance, not desire. Focusing on something for a long time is a reflection of perseverance.
# Focused work gives better return
The difference of results between continuous attention and fragmented attention over a period of time is significant. With fragmented attention you will only get a superficial idea of the subject. It takes time for a mind to be submerged into something.
# Some works are not doable without attention
It’s true you can a lot of work without much attention. Logistical tasks such as filling up a form or making powerpoint presentation of the sales figures do not have to be meditative.
But solving creative problems require intense attention. Works like fixing a complex bug in code, editing a research paper, writing a persuasive business proposal demand time and concentration.
# Focused work is insightful
Immersing into a task gets us something else other than just getting it done. It provides insights. Insight come from deep concentration, it makes you question the why of things rather than how.
> To be light is to lose one’s root. To be restless is to lose one’s mastery.
> <cite>— Tao Te Ching</cite>