teleren/devto huggingface dataset:
Configure security services 
Tags: azure, security
Published: 2019-04-12 16:09:44

---
title: Configure security services 
published: true
description: Manage security operations 
tags: #Azure, #Security
---
**Azure Monitor**
Azure Monitor uses two fundamental data types—metrics and logs:
- You can analyze log data that Azure Monitor collects by using queries to quickly retrieve, consolidate, and analyze the collected data
- Azure Monitor offers a consolidated pipeline for routing any of your monitoring data into an SIEM tool
- Security Center automatically collects, analyzes, and integrates log data from your Azure resources
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/rd43ggya4al2ja3r9pkp.png)

**Configure Azure Log Analytics**
- The Azure Log Analytics service helps you collect and analyze data generated by resources in your cloud and on-premises environments
- At the center of Log Analytics is the Log Analytics workspace, which is hosted in Azure
- Data sources and solutions create different record types, each with its own set of properties
- The connected sources are the computers and other resources that generate the data that Log Analytics collects
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/el8ahzvzowt2fcyqdcgn.png)

**Configure diagnostic logging and log retention**
- Azure Monitor makes two types of diagnostic logs available:
    - Tenant logs
    - Resource logs 
- The content of these logs varies by Azure service and resource type
- These logs differ from the activity log that provides insight into the Azure Resource Manager operations on resources in your subscription
- Guest OS diagnostic logs are those collected by an agent running inside a VM or other supported resource type
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/7pck817xp265dg840hm2.png)
Gulp vs Web-pack
Tags: help, discuss, webdev, javascript
Published: 2019-04-12 15:59:53

---
title: Gulp vs Web-pack
published: true
description: 
tags: #help, #discuss, #webdev, #javascript
---

I'm starting new JavaScript/html based project. I'm very much comfortable with Gulp, since I worked on this a lot, so my gut says to go with this. But my colleagues are insisting on checking web-pack.

I'm looking for an opinion from dev.to community.

So, should I go with Gulp, or check on Web-pack, If I choose one on another, why? Let me know your thoughts.


>[Kim John](http://jsongrid.com/json-grid)
>[Json Grid](http://jsongrid.com/json-grid) *<=Developed with love!*
Stop copying your process.env.NODE_ENV to local variables! 🤯
Tags: javascript, babel, webpack, webperf
Published: 2019-04-12 15:45:05

> Cover image from
> https://www.nationalgeographic.com/photography/proof/2017/06/bird-gallery/

## TL;DR

Instead of this:

- Example nº 1:

```js
const localAndLessCode = process.env.NODE_ENV;

if (localAndLessCode !== 'production') {
  // do dev-only things

  console.warn('[dev-only] Warnings to help devs!');
}

export function anotherFunc(num) {
  if (localAndLessCode !== 'production' && typeof num !== 'number') {
    console.warn('[dev-only] Warnings to help devs!');
  }
  
  // Do something
}
```

Do the following:

- Example nº 2:

```js
if (process.env.NODE_ENV !== 'production') {
  // do dev-only things

  console.warn('[dev-only] Warnings to help devs!');
}

export function anotherFunc(num) {
  if (process.env.NODE_ENV !== 'production' && typeof num !== 'number') {
    console.warn('[dev-only] Warnings to help devs!');
  }
  
  // Do something
}
```

## Why?

Tools like babel will replace every `process.env.NODE_ENV` (and any other `proces.env` variable) with its value. Then, the examples above would be transformed like this:

- Example nº 1 transformed:

```js
const localAndLessCode = 'production';

if (localAndLessCode !== 'production') {
  // do dev-only things

  console.warn('[dev-only] Warnings to help devs!');
}

export function anotherFunc(num) {
  if (localAndLessCode !== 'production' && typeof num !== 'number') {
    console.warn('[dev-only] Warnings to help devs!');
  }
  
  // Do something
}
```

- Example nº 2 transformed:

```js
if ('production' !== 'production') {
  // do dev-only things

  console.warn('[dev-only] Warnings to help devs!');
}

export function anotherFunc(num) {
  if ('production' !== 'production' && typeof num !== 'number') {
    console.warn('[dev-only] Warnings to help devs!');
  }
  
  // Do something
}
```

As you can see, in the second example, both comparisons are static. This is something that uglifiers like the webpack's `TerserPlugin` or `babel-minify` will take as advantage to literally remove those ifs (and their content!).

### It's free!

This is really cool because you don't have to configure anything to reduce your bundle size, it's something you can _fix_ in your code! And it will help you reduce _a lot_ of code you don't want to have in production builds!
What are the best equipment and technique to record coding videos?
Tags: discuss, programmers, livecoding
Published: 2019-04-12 15:30:09

---
title: What are the best equipment and technique to record coding videos?
published: true
description: What are the best equipment and technique to record coding videos?
tags: ['discuss', 'programmers', 'live coding']
---

Big story short, what are the best equipment to record and live-stream coding videos?

I am looking for the cheap and best equipment, and also open source software options. It's for a local dev community - [tamilcode.org](https://tamilcode.org)
Should front end developers be interviewed about algorithms?
Tags: healthydebate
Published: 2019-04-12 15:09:52

---
title: Should front end developers be interviewed about algorithms?
published: true
tags: healthydebate
---

In a lot of the interviews for "Front end" and "Full stack" positions, developers are being grilled in algorithms rather than the actual tech stack that they work on (and are experienced in).

Do you think this is the correct way forward too? Please share your thoughts
Flutter vs React Native
Tags: discuss, reactnative, flutter
Published: 2019-04-12 14:44:58

---
title: Flutter vs React Native
published: true
description: Which one do you prefer and why?
tags: discuss, reactnative, flutter
cover_image: https://thepracticaldev.s3.amazonaws.com/i/wqmazz6c93s4ofv27fcs.png
---

Hi community! There are multiple multi-platform frameworks to develop mobile apps nowadays, but personally, I think the main battle will be between these two.

What are your thoughts? Which one do you prefer and why?
Library vs Frameworks: My own two cents
Tags: libraryvsframework
Published: 2019-04-12 14:27:01

---
title: Library vs Frameworks: My own two cents
published: true
description: I figured why not blog about it like everyone else
tags: library vs framework
---

About a week ago, I was reading a brilliant blog titled “[Anyway, this is why I prefer Vue over React](https://itnext.io/anyway-this-is-why-i-prefer-vue-over-react-ad2653595fc5)”.

He called Vue a library, to which I commented on otherwise. And it sparked an argument that lasted with “let’s agree to disagree”.

Here is what I think

Vue is a framework.

In my opinion, the main distinction between framework and library is who calls who. And callbacks doesn’t count.

Frameworks impose a structure the client must follow in order to make it work. They depend upon the structure you implement to manage the life-cycle of activities. Vue does just that. [Let me explain why](https://www.youtube.com/watch?v=KdlYHsMe2rk)

When you define a Vue component, you define some methods and objects.

```javascript
new Vue({
  data: () => {
    return: {}
  },
  computed: {},
  mounted: () => {
  }, 
  watch: {
  }
})
```

If this was java or any other real object-oriented system, you would have been extending some base class or implementing an interface. Annotating your methods or sometimes just following some naming rules(like Vue). Then the framework decides to call what and when.

When you use a library, you will not be implementing any structure or API, you’ll be calling the API on the library.
How to hire a great web application developer
Tags: webapp, webapplication, developer, hiredeveloper
Published: 2019-04-12 14:21:10

---
title: How to hire a great web application developer
published: true
description: Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer.  
tags: web app, web application, developer, hire developer
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/odm0a7nw5xyjmt2ebske.png"/>

Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer. Here are 15 things to consider when you are hiring a Web App developer.

Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer. Here are 15 things to consider when you are hiring a Web App developer.

1. Research on the type of web developers required
The size of the web development team increases with the complexity and scale of the project. The first task should be to hire a project manager who can map the complexity of your proposed Web Application then study about types of Web application developers and their role in projects. Collaboratively recruit more members with your project manager because the captain should be the one choosing his/her soldiers.

Read here the full article: **<a href="https://www.decipherzone.com/blog-detail/Useful-things-to-consider-when-hiring-a-web-application-developer-">Useful things to consider when hiring a web application developer</a>**
How to hire a great web application developer
Tags: webapp, webapplication, developer, hireadeveloper
Published: 2019-04-12 14:19:26

---
title: How to hire a great web application developer
published: true
description: Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer.  
tags: web app, web application, developer, hire a developer
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/odm0a7nw5xyjmt2ebske.png"/>

Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer. Here are 15 things to consider when you are hiring a Web App developer.

Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer. Here are 15 things to consider when you are hiring a Web App developer.

1. Research on the type of web developers required
The size of the web development team increases with the complexity and scale of the project. The first task should be to hire a project manager who can map the complexity of your proposed Web Application then study about types of Web application developers and their role in projects. Collaboratively recruit more members with your project manager because the captain should be the one choosing his/her soldiers.

Read here the full article: https://www.decipherzone.com/blog-detail/Useful-things-to-consider-when-hiring-a-web-application-developer-
Around the Web – 20190412
Tags: blog
Published: 2019-07-22 12:29:20

---
title: Around the Web – 20190412
published: true
tags: Blog
canonical_url: https://wipdeveloper.com/around-the-web-20190412/
cover_image: https://wipdeveloper.com/wp-content/uploads/2017/07/WIPDeveloper.com-logo-black-with-white-background.png
series: Around the Web
---

And now for somethings to read (or watch) over the weekend, if you have some spare time that is.

## [DevOps Hygiene](https://gooddaysir.fireside.fm/212)

**Fireside**  – Jeremy Ross – In this episode, we discuss the San Francisco Giants Calendar, Git Flow, IntelliJ, Illuminated Cloud, and managing your release environments.

## [Support WIPDeveloper.com](https://www.patreon.com/BrettMN)

Hello I’m Brett and I write and create videos for [WIPDeveloper.com](http://wipdeveloper.com/).  Along with writing I have created some side projects like the [WIPDeveloper.com](http://wipdeveloper.com/) tools for [chrome](https://chrome.google.com/webstore/detail/wipdevelopercom-tools/njghjhclaneaggenfghkdlgepmllflgm),  [Good Day Sir! Mini-Soundboard](https://gooddaysirarmy.github.io/Mini-Soundboard/#/)…

## [Native image lazy-loading for the web!](https://addyosmani.com/blog/lazy-loading/)

**AddyOsmani.com**  – Addy Osmani – In this post, we’ll look at the new loading attribute which brings native <img> and <iframe> lazy-loading to the web!. For the curious, here’s a sneak preview of it in action: Chrome is hoping to ship support for loading in Chrome 75.

## [Setting up VSCode to edit Salesforce metadata](https://dev.to/katiekodes/setting-up-vscode-to-edit-salesforce-metadata-126l)

**katiekodes.com**  – Katie – Apr 10, 8:00 AM – A colleague wanted to edit the XML behind Salesforce flows so she could quickly copy/paste entire flows, copy/paste variables within a flow, etc. That part is easy, but I needed to walk her through setting up her computer to talk to Salesforce…

## [Netlify Dev](https://dev.to/scottw/netlify-dev-3je3-temp-slug-5267792)

**Netlify**  – Netlify Dev automatically detects common tools like Gatsby, Hugo, Jekyll, React Static, Eleventy, and more, providing a zero-config setup for your local dev server. We’ve faithfully replicated our powerful edge logic engine in WebAssembly so you…

## Till Next Week

Want to share something? Let me know by leaving a comment below or emailing [brett@wipdeveloper.com](mailto:brett@wipdeveloper.com)  or following and tell me on [Twitter/BrettMN](https://twitter.com/BrettMN).

Don’t forget to sign up for **[The Weekly Stand-Up!](https://wipdeveloper.com/newsletter/)** to receive free the [WIPDeveloper.com](https://wipdeveloper.com/) weekly newsletter every Sunday!

The post [Around the Web – 20190412](https://wipdeveloper.com/around-the-web-20190412/) appeared first on [WIPDeveloper.com](https://wipdeveloper.com).
How to hire a great web application developer
Tags: webapp, webapplication, developer, hiredeveloper
Published: 2019-04-12 14:16:37

---
title: How to hire a great web application developer
published: true
description: Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer.  
tags: web app, web application, developer, hire developer
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/odm0a7nw5xyjmt2ebske.png"/>

Web Application Development trend is on the rise but it is a tedious task to recruit diversified workforce required for developing a Web Application. The article intends to let you know what to consider for hiring a great Web App developer. Here are 15 things to consider when you are hiring a Web App developer.

Read here the full article: **<a href="https://www.decipherzone.com/blog-detail/Useful-things-to-consider-when-hiring-a-web-application-developer-">Useful things to consider when hiring a web application developer</a>**
What was your win this week?
Tags: discuss, weeklyretro
Published: 2019-04-12 13:27:44

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey, you made it to Friday!

Looking back, what was something you're proud of?

All wins count -- big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄
Day 12 - Automatically resume last played video in vlc - 100 days 100 python scripts
Tags: python, productivity, beginners, career
Published: 2019-04-12 12:57:59

---
title: Day 12 - Automatically resume last played video in vlc - 100 days 100 python scripts
published: true
description: Day 12 - Automatically resume last played video in vlc
tags: python, productivity, beginners, career
cover_image: https://cdn-images-1.medium.com/max/1600/0*GEsDQGQ1BucUNW1g
series: 100 days 100 python scripts
---

##Day 12: resume_vlc 

If you are annoyed by opening recently played videos again and again it's the script for you. You can schdule this script so whenever you open your system it will automatically resume that last player vlc video with the paused seconds.

```python
import configparser
from constants import configFilePath #Vlc configuarion file path
import os, urllib.parse

configParser = configparser.RawConfigParser()   


configParser.read([configFilePath])
recent=configParser["RecentsMRL"]

last_watched=recent["list"].split(",")
time_list=recent["times"].split(",")

if len(last_watched) >0 and len(time_list):
    p=(urllib.parse.urlparse(last_watched[0]))
    finalPath = urllib.parse.unquote(p.path)
    last_stopped_seconds=int(time_list[0])/1000
    if last_stopped_seconds >5:
        last_stopped_seconds=last_stopped_seconds-5 # Go back 5 secs
    os.system("vlc --start-time="+str(last_stopped_seconds)+" '"+finalPath+"'")
```

Please Visit my Git Repo to check out all the previous day challenges.

[https://github.com/ganeshraja10/automated-python-scripts](https://github.com/ganeshraja10/automated-python-scripts)
Live Testing Smart Contracts with ESTIMATEGAS
Tags: solidity, howto, ethereum, testing
Published: 2019-04-12 12:49:39

---
title: Live Testing Smart Contracts with ESTIMATEGAS
published: True
description: We have developed a new technique that allows you to test any deployed contract in arbitrary ways, without spending gas.
tags: solidity, howto, ethereum, testing
---

We have developed a new technique that allows you to test any deployed contract in arbitrary ways, without spending gas.

It works on Ethereum Mainnet, Wanchain, Ethereum Ropsten, Hyperledger Burrow, Proof of Authority Network, private chains, and every other network based on Ethereum Virtual Machine.

This technique could work well for you if:

- Your contract deployment is too complicated to use Truffle
- You are testing somebody else's contract, possibly without access to the source code
- You want to batch test deployed contracts, and you don't care how they were deployed
- You are interested in weird stuff and errors in the Ethereum Yellow Paper

More about it here: https://0xcert.org/news/live-testing-smart-contracts-with-estimategas-william-entriken-tadej-vengust/ (edited)
Gutenberg Components: "I only need one"
Tags: wordpress, gutenberg
Published: 2019-04-12 12:42:26

---
title: Gutenberg Components: "I only need one"
published: true
description: Gutenberg comes with an awful lot of default components most of which will never be used in our websites. Here's how to disable the ones you won't use.
tags: WordPress, Gutenberg
---

![Christopher Lee as Francisco Scaramanga in The Man with the Golden Gun](https://thepracticaldev.s3.amazonaws.com/i/4b1jndfvbjvhk2gijpcj.jpg)

Gutenberg comes with an awful lot of default components (see list below) most of which will never be used in our websites.

It's perfectly possible to just leave them there but this has the potential for disaster.

Leaving them visible to the content manager raises two possibilities;

1. It will be difficult for them to find the actual component they want to use
2. They will try to use a component that we haven't styled which will break the layout on the frontend

So, what do we do...?

### Only show the components you will actually use

Drop this into your `functions.php` file or, better yet, write a plugin to handle it :)

```php
add_filter('allowed_block_types', 'txb_allowed_block_types', 10, 2);

function txb_allowed_block_types( $allowed_blocks, $post )
{
    $allowed_blocks = array(
      'core/image', // Add the blocks you want here...
      'core/paragraph',
      'core/heading',
      'acf/videum' // Add your custom blocks here
    );

    return $allowed_blocks;

}
```

### Gutenberg Default Components
- Paragraph
- Heading
- Image
- List
- Quote
- Gallery
- Audio
- Cover
- File
- Video
- Code
- Preformatted
- Classic Block
- Custom HTML
- Pullquote
- Table
- Verse
- Columns
- Separator
- Button
- Media & Text
- More
- Page Break
- Spacer
- Shortcode
- Archives
- Categories
- Latest Comments
- Latest Posts
- Embed
- Twitter
- YouTube
- Facebook
- Instagram
- WordPress
- SoundCloud
- Spotify
- Flickr
- Vimeo
- Animoto
- Cloudup
- CollegeHumor
- Crowdsignal
- Dailymotion
- Funny or Die
- Hulu
- Imgur
- Issuu
- Kickstarter
- Meetup.com
- Mixcloud
- Photobucket
- Reddit
- ReverbNation
- Screencast
- Scribd
- Slideshare
- SmugMug
- Speaker Deck
- TED
- Tumblr
- VideoPress
- WordPress.tv
LeetCode 31. Next Permutation
Tags: java, twopointers
Published: 2019-04-12 12:28:17

---
title: LeetCode 31. Next Permutation
published: true
description: Solution + explanation for problem 31
tags: java, twopointers
series: LeetCode in Java
---

```java
public class Solution {
    public void nextPermutation(int[] nums) {
        int i = nums.length - 2;
        while (i >= 0 && nums[i + 1] <= nums[i]) {
            i--;
        }
        if (i >= 0) {
            int j = nums.length - 1;
            while (j >= 0 && nums[j] <= nums[i]) {
                j--;
            }
            swap(nums, i, j);
        }
        reverse(nums, i + 1);
    }

    private void reverse(int[] nums, int start) {
        int i = start;
        int j = nums.length - 1;
        while (i < j) {
            swap(nums, i, j);
            i++;
            j--;
        }
    }

    private void swap(int[] nums, int i, int j) {
        int temp = nums[i];
        nums[i] = nums[j];
        nums[j] = temp;
    }
}
```

We iterate through `nums` from right to left to find the number `nums[i]` where the descending order occurs for the first time. Then we scan through the nums from right to `i+1` to find a number that is greater `nums[i]` and swap the number with it. Finally, we reverse `nums[i+1] ... nums[nums.length-1]`.

By doing so, we can guarantee that:

1. The next permutation is always greater or equal to the current permutation (we assume the numbers in the current permutation are not sorted in descending order).
1. There does not exist a permutation that is greater than the current permutation and smaller than the next permutation generated by the above code. 
1. If the numbers in the current permutation are already sorted in descending order (i.e. greatest possible value), the next permutation has the smallest value.

_Time Complexity_: `O(n)`

_Extra Space_: `O(1)`