teleren/devto huggingface dataset:
[LIVE Webinar] Learn how to deploy ES statefulSet and Kibana live 👩🏻‍💻
Tags: kubernetes, devops, webinar, career
Published: 2020-06-03 16:32:13

Hi there,

I'm excited to announce that I'm hosting my first **LIVE Webinar on Kubernetes** 🤓 👩🏻‍💻

Though I love to create my [videos on Youtube](https://www.youtube.com/c/techworld_with_nana), especially reading the comments how they helped you in learning 💙, this is still special. The attendees on the webinar will be limited and you can follow along live and ask me questions directly. 🙂


You will learn quite a lot 🎓 :
- how to **deploy Elastic Search** StatefulSet on Cloud Platform using Helm.
- how to **attach persistent volumes** to your Elastic Search pods using cloud storage.
- **how StatefulSet works and the concepts of data persistence**
- **deploy a simple Nodejs application** that will log directly into elastic search
- **deploy Kibana**, so you can see elastic search data in Kibana UI

------------------------
 ► When: Saturday June 13, 2020
 ► Topic: Deploy Elastic Search StatefulSet and Kibana with Helm on a Cloud platform
 ​► Duration: The webinar will take around 1hour and 30mins
 ► Find out more/register here 👉🏼 https://bit.ly/2TWbxU0
 ► Q&A: You can ask questions during the webinar and also exchange questions in the group chat 🙂

------------------------
**BONUS: The awesome thing is, that the webinar will be recorded. So, even if you don't have time, when registered you get the recording with the same live experience (incl. the Demo, Chat Q&A)** 🙂

Also there will be a surprise bonus for all the attendees! 🎉 😉

Besides that, I'm always happy to connect with you: 🙂
- [Twitter](https://twitter.com/Njuchi_)
- [YouTube](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA?sub_confirmation=1)
- [Instagram](https://www.instagram.com/techworld_with_nana/)


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5cnekymt7wnefhgjvdvm.png)
Working with Scala REPL mode
Tags: scala
Published: 2020-06-03 16:30:25

---
canonical_url: https://youtu.be/ZNzBUWdmano
---


One of the key benefits of working with Scala is to experiment with ideas using Scala's Read-Eval-Print-Loop (REPL) shell and get faster feedback. This video teaches how to work with the Scala REPL mode.

This video is part of a FREE course called First Steps in Scala. If you are interested in learning Scala, be sure to check out our FREE course at http://bit.ly/2MM4QAW

{% youtube ZNzBUWdmano %}
6-10PM challenge problem #006 solution
Tags: challenge, programming, algorithms, array
Published: 2020-06-03 16:22:38

<h2><b>Shifted Array Search</b></h2>

Solution for the <a href="https://dev.to/akbhairwal/6-10pm-challenge-problem-006-4jm2">Problem#006</a> is provided in Java language.

Test cases :

<b>Test case #1</b> 
input:  [2], 2

<b>Test case #2</b> 
input:[1,2], 2

<b>Test case #3</b> 
input: [0,1,2,3,4,5], 1

<b>Test case #4</b> 
input : [1,2,3,4,5,0], 0

<b>Test case #5</b> 
input : [9,12,17,2,4,5], 17

<b>Test case #6</b> 
input : [9,12,17,2,4,5,6], 4

Solution

<div class="highlight"><pre class="highlight plaintext"><code>

static int shiftedArrSearch(int[] shiftArr, int num) {  
     if(shiftArr.length>0){
      return find(shiftArr,0,shiftArr.length-1,num);
    }else return -1;
  }
  
  
 static int find(int[] arr, int l, int h, int num){
    
   
    int median = (l+h)/2;
    if(arr[median]==num) return median;
     if(l==h) return -1;
      return Integer.max(find(arr,l,median,num), find(arr,median+1,h,num));
  }

</code></pre></div>
Artificial Intelligence In Cyber Security
Tags: security, machinelearning, ai
Published: 2020-06-03 16:09:38

Ever since its inception during the 1950s, artificial intelligence has made tremendous progress in every industry.

Artificial intelligence made its first step when Alan Turing introduced the Turing test in 1950. Later on, with the development of Eliza, Shakey, Roomba, Siri and Alexa, AI turned from fiction to reality.

Tons of research and development through the years has also led to artificial intelligence finding its place in cybersecurity. Artificial intelligence and cybersecurity together form a perfect combo for the detection of cyber attacks and harmful trespasses.

Living in an age of “big data” and the transition to modern web applications has provided enormous resources virtually, that could attract the attention of so-called "bad guys". So it is necessary to secure data in an efficient way. 

Artificial intelligence promises to be a great solution for this.

AI-driven systems can ensure more accuracy and can cope up with the time consuming manual security testing procedures.

What we do at Beagle security encompasses the use of this “intelligence” in order to develop a system that can provide better results with reduced false positives and increased accuracy. 

Using AI allows us to actively test through the application response, query strings passed in the URL, error messages and HTTP headers, etc.

We use a model that combs through data and detects suspicious activity by clustering the data into meaningful patterns using unsupervised machine-learning and on confirmation from the human analysts, builds a supervised model. 

Using this model we are able to develop an efficient security testing system.

It is true that the potentiality of artificial intelligence can develop sophisticated systems but it must also cope with the complications allied with the emerging technologies.

_A more detailed version on how learning models can be used in security testing published at https://blog.beaglesecurity.com/blogs/2020/05/26/Artificial-Intelligence-in-Cyber-Security.html_
Fix: Azure DevOps “An image does not exist locally with the tag”
Tags: azure, devops, azuredevops, docker
Published: 2020-06-08 00:27:16

---
title: Fix: Azure DevOps “An image does not exist locally with the tag”
published: true
date: 2020-06-03 15:57:00 UTC
tags: azure,devops,azuredevops,docker
canonical_url: https://seankilleen.com/2020/06/fix-azure-devops-an-image-does-not-exist-locally-with-the-tag/
---

I was working on [a livestream](https://twitch.tv/sjkilleen) recently when I ran into an issue attempting to push a docker container to a private registry in Azure DevOps.

## Problem

Upon attempting to push the container to my container registry, I received the error:

> ##[error]An image does not exist locally with the tag: \*\*\*/konmaripoweb

This is weird, because this tag should be happening automatically. Something wasn’t matching up.

## Solution

The fix in this case actually has to do with how the Azure DevOps tasks work, in particular the `Docker@2` task that I was working with.

I pulled the repo and looked into [the DockerV2 task’s source code](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/DockerV2) to find the solution.

I noticed that in the build and publish tasks specify a registry name if the `containerRegistry` value is set or the service connection exists. My publish step was specifying this attribute, but my build step was not.

I modified the build step to also pass in this parameter, and the correct tags were created across both steps to resolve the issue.

Happy (containerized) coding!
Screen recording with Playwright
Tags: playwright, headless, automation, screencast
Published: 2020-06-03 15:48:54

When you run headless tests with Playwright, the browser will run the test without showing any browser window (UI).


The *advantage* of headless testing is that it is much faster to run tests than for example with Selenium.
One *disadvantage* however is that it makes it harder to debug any problems, since you can not record the UI into a video file.

If you're looking to record videos of your browser sessions, then you can use a NPM package called `playwright-video`. This package uses the DevTools protocol (more specifically `Page.startScreencast`) to capture screencastFrame's and glue these together with `ffmpeg`.

##Installation

To start, please install the necessary NPM packages:
`npm i -D playwright-video ffmpeg-static`

##Running your first test
Now you can run your first test with video. The example below will open a remote browser session in the [HeadlessTesting](https://headlesstesting.com) cloud and send the video frames back. `playwright-video` will then glue these frames together into a video file and save it on your disk.

```
const pw = require('playwright-core');
const { saveVideo } = require('playwright-video');

(async () => {
  const browser = await pw.chromium.connect({
    wsEndpoint: 'wss://chrome.headlesstesting.com?token=[YOUR-TOKEN]&browserVersion=dev',
  });
  const context = await browser.newContext();
  const page = await context.newPage();

  await saveVideo(page, '/tmp/video.mp4');

  await page.goto('https://headlesstesting.com/');
  await page.screenshot({ path: 'screenshot.png' });

  await browser.close();
})();
```

This basic example will open a Chrome browser in the HeadlessTesting.com cloud, open a tab and go to our webpage, and then finally take a screenshot. It will save a video recording of these actions in a file called `/tmp/video.mp4` on your disk.

##Integration with Jest and Mocha
This can be integrated in your favourite test runner as well. Simply add the logic to your before/after hooks to capture a video:

```
let capture
beforeEach(async function() {
    this.timeout(35000)
    browser = await pw.chromium.connect({
        wsEndpoint: 'wss://chrome.headlesstesting.com?token=[YOUR-TOKEN]&browserVersion=dev',
    })
    context = await browser.newContext()
    page = await context.newPage()
    capture = await saveVideo(page, `${this.currentTest.title.replace(/ +/g, '_')}.mp4`)
})
afterEach(async function() {
    await capture.stop()
})
```
range: Functionality of Python's range() in V
Tags: showdev, python, productivity, v
Published: 2020-06-03 15:42:11

# range

Functionality of Python's `range()` in V.

{% github https://github.com/Delta456/range %}

## Why

- `a..b` in V can only be in increasing order and not in negative order.
- Lacks inbuilt `step` which most people need or want.
- No support for `float`.

## Features

- Make `range` arrays easily
- Make ranges for `int` and `f32`
- Positive as well as Negative Support!
- No need to write the whole for loop! (*this maybe slower than the normal one*)
- Use `range` for functional programming
- Full Python's `range()` functionality

## Installation

- Via `git clone`
    - `git clone https://github.com/Delta456/range`
- Via `v install`
    - `v install range`
- Via `vpkg`
    - `vpkg install range`

## Usage

- `range.int(start:0, stop:value, step:1)` 
  makes a range of `int` with the following parameters:
  - `start`: `start` value of the range *by default it's 0*
  - `stop`: `stop` value of the range
  - `step`: `step` value of the range *by default it's 1*

- `range.float(start:0.0, stop:value, step:1.0)` makes a range of `f32` with the following parameters:
  - `start`: `start` value of the range *by default it's 0.0*
  - `stop`: `stop` value of the range
  - `step`: `step` value of the range *by default it's 1.0*

**Note**: If `range.int(step:0)` or `range.float(step:0)` then an error will be raised because `step` cannot be zero.

In `main.v`

```v
import delta456.range

fn main() {
    // using range.int
    for i in range.int(stop:10) {
        println(i)
    }

    for i in range.int(start:1, stop:10) {
        println(i)
    }

    for i in range.int(start:1, stop:10, step:2) {
        println(i)
    }

    for i in range.int(start:10, stop:1, step:-1) {
        println(i)
    }

    for i in range.int(start:-5, stop:-1, step: 1) {
        println(i)
    }

    // using range.float
    for i in in range.float(stop:10) {
        println(i)
    }

    for i in in range.float(stop:10, step:0.2) {
        println(i)
    }

    for i in in range.float(start:0.1, stop:10) {
        println(i)
    }

    for i in in range.float(start:10, stop:1.0, step:-0.2) {
        println(i)
    }

    for i in in range.float(start:-10, stop:-1.0, step:0.2) {
        println(i)
    }
}
```

## Acknowledgments

I thank [@Hungry Blue Dev](https://github.com/hungrybluedev) for giving me the idea of using a `struct` with default parameters so that `range` function for each type can be the same.

## License

Released under MIT
👨‍💻 I made my software open source
Tags: opensource, meteor, node
Published: 2020-06-03 15:23:52

## Intro 
Some time ago, I created a tool for my own use, which sent cold emails to potential customers. It served me basically for everyday work. Sending an email, then - when contact was promising - retrying via LinkedIn and exporting to CRM. I worked on it, hoping that one day it would see a full-paid version and I will start making 💰 on it. 

Looking closely at the current situation, I thought that such a tool could be perhaps useful to others. It is a pity that it is locked up. That’s why I decided to release it as an open-source solution! Simple license, open code, absolutely free. 🔥🔥🔥

I hope it will be useful to someone! ❤️

## Project
If anyone wants to use, please visit [Project Page](https://meteoremails.com).
If someone wants to join the development of the application, it is waiting on [GitHub](https://github.com/catin-black/meteor-emails/)

## TL;TR 
Completely free and open source project to fight against sales stagnation in your company! Download, run and rock your sales!
Rdiff-backup now supports Python 3 !
Tags: backup, python
Published: 2020-06-03 15:12:22

We officially make available a new release of rdiff-backup now supporting Python 3. Published on March 15 as v2.0.0, this new release drop support for the deprecated Python 2 and only support Python 3. What does it mean ? It means rdiff-backup will be supported and integrated in newer Linux distribution that has started to drop support of Python 2. Making sure our lovely backup tools stay usable and available to everyone!

Read more about it here: https://www.tecmint.com/linux-rdiff-backup-tool/
Passing request data as XML in Laravel Http Client
Tags: laravel
Published: 2020-06-03 15:09:56

> If you don't know about Laravel Http client yet, give it a read in the official documentation [here](https://laravel.com/docs/7.x/http-client).

Here's how you can pass the request data while making a `POST`, `PUT` or `PATCH` request as an array (transformed to JSON).

```php
$response = Http::post('http://test.com/users', [
    'name' => 'Steve',
    'role' => 'Network Administrator',
]);
```
> What if you end up with an old school API that still uses XML to receive data?

Here's how you can do this:

```php
    $response = Http::withHeaders([
        "Content-Type" => "text/xml;charset=utf-8"
    ])->send("POST", "http://some-url.com", [
        "body" => '<?xml version="1.0" encoding="utf-8"?>
                    <soap:Envelope
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
                        <soap:Body>
                            <SaveData xmlns="http://tempuri.org/">
                                <pParam>
                                    Value
                                </pParam>
                            </SaveData>
                        </soap:Body>
                    </soap:Envelope>'
    ]);
```
If you know of a better alternative, please let me know :)
How to make an API call using Deno
Tags: deno, webdev, typescript, javascript
Published: 2020-06-03 15:09:35

Without trying to start any more hype for **Deno** today, I'm just going to show an example of doing a HTTP call with this shiny new tool. 

## Show me the code
```ts
import { soxa } from 'https://deno.land/x/soxa/mod.ts'

const welcomeText = "Welcome to Deno.. a random joke is being prepared for you...";
console.log(`\n ${welcomeText} \n`);

async function fetchData() {
  try{
    const result = await soxa.get('https://api.icndb.com/jokes/random');
    console.log(`${result.data.value.joke} \n`);
  } catch (err) {
      console.error(err);
  }

}

fetchData();
```

## Sandbox
In the **JS ecosystem** we have been spoiled with tools where we can try our code straightaway, and you can do this with **Deno** today using a sandbox: 
### [Repl.it](https://repl.it/languages/deno)

So just copy-paste the code above in the [Repl.it](https://repl.it/languages/deno) sandbox, click run, and enjoy. 

{% replit @AlexandruDanPop/ContentGraveMonads %}

We live some troubled times, so hopefully a Chuck Norris joke will put a smile on your face. 

![Img of repl.it sandbox running Deno](https://dev-to-uploads.s3.amazonaws.com/i/9l5964n4h27kf4hu6jwp.PNG)

More interesting reads: 
- [Becoming a better FE developer in 3 steps](https://dev.to/alexandrudanpop/becoming-a-better-fe-developer-in-3-steps-2khn)
- [Tips to boost productivity as a FE developer](https://dev.to/alexandrudanpop/tips-to-boost-productivity-as-a-fe-developer-2ig9)
- [Remote dev checklist](https://dev.to/alexandrudanpop/remote-dev-checklist-clk)
Using WebWorker in React
Published: 2020-06-03 15:01:09

If it’s your first time using WebWorker or if you want to improve your implementation, this article is just for you!

First let’s cover what is WebWorker?
WebWorker is a solution for performing tasks without interfering with user interaction in your website, by running scripts in background threads.
Once created, a worker can send messages to the JavaScript code that created it by posting messages to an event handler specified by that code.

if you want to read how i implemented WebWorker please go to this link and read my article
https://medium.com/@talwaserman/using-webworker-in-react-e893da189a70
Self Restraint
Tags: webdev
Published: 2020-06-03 15:00:24

---
title: Self Restraint 
description: A short thought on the state of the Web and our individual responsibilities.
tags: webdev
canonical_url: https://boris.schapira.dev/2020/06/self-restraint/
published: true
---

Sometimes I write a tweet or a blog post and then I delete it.<br>Because the world doesn’t need it.<br>Because it can hurt some people.<br>Because there are other ways.<br>Because I can live without publishing it<br>and my followers deserve that I don’t.

Please do the same with your JavaScript.
Responsive Image Gallery Using HTML And CSS
Tags: css, html, design, weeklyui
Published: 2020-06-03 14:48:36

Responsive layouts is first priority for a web developer/designers. well, here we design a responsive image gallery in HTML and CSS with an attractive user-friendly interface.

In this element, we used CSS flexbox properties with justify-content and alignment properties to make perfectly aligned. Also, we used width properties for the column side, and for space we used margin. Here we also used box-shadow effects on mouse hover case. To make responsive we used media queries from 1000px till the mobile screen side.

[Download Free source code](https://w3hubs.com/responsive-image-gallery-using-html-and-css/)
Autofill your GitHub contribution graph
Tags: showdev, githunt, git, github
Published: 2020-06-03 14:46:13

I made a [GitHub Action](https://github.com/marketplace/actions/autopopulate-your-contribution-graph) that lets you automatically fill up your GitHub contribution graph without even needing to leave your browser.

* Maybe most of your coding happens on another version control host, like GitLab or Bitbucket.
* Maybe your company uses GitHub Enterprise but hasn't enabled [unified contributions](https://help.github.com/en/enterprise/2.20/admin/installation/enabling-unified-contributions-between-github-enterprise-server-and-githubcom).
* Maybe you're looking for a new software development job and are worried that recruiters will prejudge you by your scarce contribution graph.
* Or maybe you have [other reasons](https://twitter.com/jacobmparis/status/1265740598277025792).

Whatever the case may be, this Action will get the job done. 🙈 You can set up recurring commits and/or backfill commits from the week, month, year, and more. Want to skip weekends? No problem.

It's a super simple Docker action powered by Node. You can check out the source code below!

{% github bcanseco/github-contribution-graph-action %}
One error when import data from Hive cluster to solr6.2 cluster
Published: 2020-06-03 14:43:40

There are 2 clusters for hive and solr. When the num of fields is about 34 then import successfully,once the num larger than 34(num is 44) , i will meet exception of connection reset. You know there is no build-in limit. The limit is going to be dictated by your hardware resources. 
Hope your answers~
{% stackoverflow 62175590 %}
Free course: The 7-Day JavaScript Challenge
Tags: javascript
Published: 2020-07-01 05:20:00

---
title: Free course: The 7-Day JavaScript Challenge
published: true
date: 2020-06-03 14:30:00 UTC
tags: JavaScript
canonical_url: https://drmsite.blogspot.com/2020/06/free-course-7-day-javascript-challenge.html
---

Scrimba are running a [week-long JavaScript challenge](https://jschallenge.scrimba.com), so I jumped in.

## Day 1

_Initial attempt:_

```javascript
function addBorder(array) {const l = Array.from({length: array[0].length + 2 }, () => '\*').join(''); array = array.map((x) => x.padStart(x.length + 1, '\*').padEnd(x.length + 2, '\*')) array.push(l) array.unshift(l)return array;}
```

_After I'd thought about it:_

```javascript
const addBorder = a => ['\*'.repeat(a[0].length), ...a, '\*'.repeat(a[0].length)].map(e => `\*${e}\*`)
```

## Day 2

```javascript
const addTwoDigits = n => (''+n).split('').reduce((a,c) => ~~a +~~ c)
```

## Day 3

```javascript
const firstDuplicate = ns => {const s = new Set();for(n of ns){if(s.size === s.add(n).size) return n }return -1}
```

## Day 4

```javascript
const sumAllPrimes = n => Array.from({length: n-1}, (\_, k) => k+2).reduce((a, c) => a += !'1'.repeat(c).match(/^1?$|^(11+?)\1+$/) ? c : 0)
```

## Day 5

```javascript
const evenDigitsOnly = n => (''+n).split('').every(n => !(~~n % 2))
```

## Day 6

```javascript
const makeArrayConsecutive = n => Math.max(...n) - Math.min(...n) - [...new Set(n)].sort().reduce((a, c) => c > Math.min(...n) && c < Math.max(...n) ? a + 1 : a, 0) - 1
```

Alternatively:

```javascript
const makeArrayConsecutive = n => ([...new Set(n)].sort()[[...new Set(n)].length - 1] - [...new Set(n)].sort()[0] + 1) - [...new Set(n)].length
```

## Day 7

```javascript
const properNounCorrection = s => s === s + '' && s.length ? String.fromCharCode(...[...s].map((\_, i) => !i ? s.charCodeAt(i) - (s.charCodeAt(i) >= 97 && s.charCodeAt(i) <= 122 ? 32 : 0) : s.charCodeAt(i) + (s.charCodeAt(i) >= 65 && s.charCodeAt(i) <= 90 ? 32 : 0))) : ''
```

Think that's all of them now.
5 Skills a New Software Developer must have!
Tags: git, java, oop
Published: 2020-06-03 14:15:45

##A list of 5 important skills that you should have in your skillset if you are joining as a new Software Developer

The month of June-July and August is the season of college graduates starting their new jobs. A new job is full of challenges. Adapting to a new environment is a big task, you have to interact with new people, new technologies, and what not! But, there some skills that are pretty common irrespective of which software company you join in. Having a good command over these skills will surely help you in adapting to this new environment!

I will be sharing why you need to know these skills, how will they help you, and from where you can master them.

Checkout the complete blog on [Medium](https://medium.com/@HrishikeshSuslade/5-things-a-new-software-developer-should-know-e1d0a83b3e57)