teleren/devto huggingface dataset:
VS Code September 2019 Release Highlights Video
Tags: discuss, vscode, javascript, webdev
Published: 2019-10-14 16:53:31

---
title: VS Code September 2019 Release Highlights Video
published: true
description: Highlights of some of the latest features found in the September 2019 release of Visual Studio Code.
tags: discuss,vscode,javascript,webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6zdymsbihuar7lyr33rn.jpg
series: vscode-release
---

## September 2019 VS Code Release
You can read through the [release notes](https://code.visualstudio.com/updates/v1_39?WT.mc_id=devto-blog-brcl) to find out more about them or watch this short video to see some of the highlights from it.

{% youtube 5Sk4dkr5gsg %}

### Features Highlighted

- [Updated Source Control View](https://code.visualstudio.com/updates/v1_39#_updated-source-control-view?WT.mc_id=devto-blog-brcl)
- [Minimap Selection Decorations](https://code.visualstudio.com/updates/v1_39#_minimap-editor-selection-decorations?WT.mc_id=devto-blog-brcl)
- [Improved Column Breakpoints](https://code.visualstudio.com/updates/v1_39#_improved-ui-for-column-breakpoints?WT.mc_id=devto-blog-brcl)
- [CSS Property Semicolon Completion](https://code.visualstudio.com/updates/v1_39#_css-property-completion-with-semicolon?WT.mc_id=devto-blog-brcl)
- [Automatic Tunneling of Remote Localhost Links](https://code.visualstudio.com/updates/v1_39#_remote-development-preview?WT.mc_id=devto-blog-brcl)


What's your favorite feature or improvement in this month's release? Share it below 👇
Azure Cosmos DB Change Feed: A Zero Downtime Data Migration Story
Tags: java, azurefunctions, azure, cosmos
Published: 2019-10-14 21:01:06

---
title: Azure Cosmos DB Change Feed: A Zero Downtime Data Migration Story
published: true
date: 2019-10-14 20:39:20 UTC
tags: java,azure-functions,azure,cosmos
canonical_url: https://medium.com/@domenicosibilio/azure-cosmos-db-change-feed-a-zero-downtime-data-migration-story-99c4521f7159
---

[![](https://cdn-images-1.medium.com/max/933/0*QerHrF0XjPRjIBTa.png)](https://medium.com/@domenicosibilio/azure-cosmos-db-change-feed-a-zero-downtime-data-migration-story-99c4521f7159?source=rss-299466747366------2)

How to perform **Zero Downtime Data Migrations** with **Azure Cosmos DB Change Feed**.

[**Continue reading on Medium »**](https://medium.com/@domenicosibilio/azure-cosmos-db-change-feed-a-zero-downtime-data-migration-story-99c4521f7159?source=rss-299466747366------2)
Do Good Daily: The End
Tags: swift, swiftui, ios, xcode
Published: 2019-10-14 21:58:59

📅 10/14/2019
🔥 0 day streak
📱 Do Good Daily
💰 $0.99 price
🤑 0 sales
⌚️ ?? hours spent
💻 58 changed files 1,405 additions ➕ and 58 deletions ➖.
🙅‍♀️ Today's goal: Put this project out to pasture

I did want to say something here about this sad, sad project that really, was doomed to fail. I actually did finish it, it's currently sitting in test flight, and it works just fine, looks just fine.

But that's really the problem, it's just fine. 

It doesn't move the needle. 

I poured quite a few hours into this thing and again, nothing.

It's not all bad and depressing though. I did learn SwiftUI 🤷‍♂️

But yeah, consider this the conclusion of this dreadfully short series 🗿
RESTApi Host
Tags: help
Published: 2019-10-14 22:17:35

Hello community, I have a question here,

I build a app with the MERN Stack, and I decided separate the front from the back.
I thought of upload the static front in github pages, but, I dont know what is the best host to upload my backend.

A host that allows you to store the files that are sent from my frontend and update the database (which I already have made in mlab).

Any know a good solution for this?
Now I tested my entire app in heroku, but the files I upload are removed 24 hours later.

Thanks and nice week :)
Rosetta Stone
Tags: multivalue, multilingual
Published: 2019-10-15 04:01:43

We're building a Rosetta Stone, a series of programs in a variety of languages that all do the same thing. The idea is that if you know any one of the languages, it will help you learn the others.
Initial project has Ruby, C#, PHP, Python, and NodeJs. We've got a promise of GO being added. Wanna come play?
https://github.com/CharlesBarouch/mv_core
NOIA Network - Programmable Internet
Tags: network
Published: 2019-10-15 10:13:38

Check out my latest post on the devdojo.com website!

It is a quick introduction to the NOIA Network project.

Link to the post:

https://devdojo.com/articles/noia-network-programmable-internet

I strongly encourage everyone to go ahead and check out the devdojo.com website, there's a lot of valuable content there.
Evie's Musical Nuggets Vol 2
Tags: career, watercooler, motivation, music
Published: 2019-10-25 13:28:15

## Welcome back to another edition of Evie's Musical Nuggets! I have some more tantalising auditory treats for ya.

- [Green and Gold](https://www.mixcloud.com/totallywiredradio/141019-green-and-gold-carolyn-smee-tim-partridge/). Vintage soul and r'n'b, approximately 63% instrumental for coding in yer onesie on a Sunday afternoon :smile:
- [Soul mix from DJ Vadim](https://www.mixcloud.com/DJVadim/church-4-rainy-days-shrtz/). Departure from his usual reggae mixes, which I also highly recommend!
- [Yummy Beats 143](https://www.mixcloud.com/yummybeats/yb143-guiss-guiss-bou-bess-eprom-portico-quartet-badbadnotgood-neat-beats-muta-knxwledge/). Nuggets of nu jazz, hip-hop and glitchiness.
- [Collaborations across Nations](https://www.mixcloud.com/TOMLOF/collaborations-across-nations-1-mistersalt-tomas-lofgren/). Vinyl only funky selection!
- [El Blues del Pescador](https://www.mixcloud.com/radiomartiko/el-blues-del-pescador/). An enchanting mix of sounds from all over: sumptuous and mysterious listening. I often like listening to music in languages other than my native English, because I tend to focus less on the lyrics that way.

Happy coding!
Matt's Tidbits #38 - An elegant way of dealing with RxLifecycle lint warnings
Tags: mattstidbits, android, kotlin, rxjava
Published: 2019-10-15 14:18:15

[Last week’s tidbit described how to run apps on multiple devices simultaneously.](https://medium.com/@matthew.b.groves/matts-tidbits-37-how-to-run-apps-on-multiple-devices-simultaneously-d99100600492) This time my tidbit details an elegant way to handle lint warnings that arise due to using RxLifecycle.

The project I’ve been working on recently uses [RxLifecycle](https://github.com/trello/RxLifecycle) to manage some of its observables. Curious what RxLifecycle is? In a nutshell, it’s a library that can automatically clean up asynchronous tasks — most commonly when a screen is closed, or an app is backgrounded, etc. Here’s an example of how you might use it:

{% gist https://gist.github.com/mpeng3/fbcb47041664810771a8d0d39a39d5a4 %}

However, this creates lots of lint warnings scattered throughout the code:

![Lint warning when result of subscribe is not used](https://miro.medium.com/max/2096/1*Qpjt6iorhCq0GFPN4q-YaQ.png)

What are our options for resolving this? We could add a `@SuppressLint(“CheckResult”)` annotation at every call site, but this might mask other unused problems that are not RxLifecycle-related, and this will also quickly litter the code with these annotations — not exactly ideal.

I tried out the following solution on my project and it’s been working well, so I wanted to share it here:

{% gist https://gist.github.com/mpeng3/a79e130b4bf0606a2c3e578a0438f1fa %}

This way, we no longer need all of the `@SuppressLint` statements for every place we use RxLifecycle. I can think of several additional benefits of this approach:

1. Newcomers (who perhaps aren’t familiar with RxLifecycle) will be less confused by this than dangling subscribe() calls.
2. You could add log statements/breakpoints inside of this method to easily interact with every place that uses RxLifecycle.
3. Using a dedicated (empty) static object for this method helps keep it separate from the rest of your code.

Are there other options for how to resolve this? Of course! Here are some other ideas I considered:

1. Removing RxLifecycle and relying on more modern frameworks (MVVM, LiveData, etc. — these can help manage asynchronous tasks in a more elegant/automatic way.
2. Submitting a pull request against RxLifecycle that defines a custom lint rule that prevents a lint warning from appearing if you are using RxLifecycle properly — similar to this library except with logic to hide the default “result of subscribe is not used” warning: https://github.com/vokal/Android-Lint-Checks

How have you handled RxLifecycle lint warnings in your project? Let me know in the comments below! And, please follow me on Medium if you’re interested in being notified of future tidbits.

*This tidbit was discovered on October 11, 2019.*
Build a Raffle with Google Sheet
Tags: sheet, google, javascript
Published: 2019-10-15 15:11:00

---
title: Build a Raffle with Google Sheet
published: true
description: Example of how to build a small application in Google Sheet
tags: sheet, google, javascript
series: google-raffle-1
---

In this post we'll see how to build a simple application using Google Sheet.

The application consits in a raffle from a list of assistant to an event from we have the names and surnames in a sheet:


![Example](https://thepracticaldev.s3.amazonaws.com/i/mv6pz9prp3vdcide4fww.png)


# Prepare

Select Tools / Script commands from main menú 

A new tab appears with the Google Sheet Editor and a `Code.gs` file. Replace the code with the code shown at the end of the post


Save the proyect as `Raffle` (or whatever you want) and refresh the Google Sheet tab (F5).

# Raffle

A new option appears in the main menu called `Raffle` with a subitem `Raffle`.

When the user select this item a `sidebar` appears with a (customizable) interface with a button to start a raffle:

![Sidebar raffle](https://thepracticaldev.s3.amazonaws.com/i/hei61zl7iylz54kz4v7o.png)

At this moment the application will choose a random element from the sheet and show it. If the participant is pressent (and want the prize) the user will click at `yepes` or `nopes` it the user reject the prize:

![winner](https://thepracticaldev.s3.amazonaws.com/i/kf0qjqq4sf6u5w1mz63z.png)

In both case the application will mark the participant as "used" to avoid pick him again.

The admin can repeat the raffle as many times he want meanwhile remain participants.


# Code


{% gist https://gist.github.com/jagedn/05cbf22d3cd97afc03f5b9982653de65 %}
React Hooks: useState
Tags: react, hooks
Published: 2019-10-15 21:26:25

---
title: React Hooks: useState
published: true
description: notes on useState
tags: React, hooks

---

Normal react code would use a class component and use this.setState to manage the state.

Hooks is a way to write functional components but use state inside of them like you would a class component.

First, import the hook you want to use from React.

useState gives us back two parameters inside of an array. Use array destructuring to declare, in this order, state value, and the function that will modify that state value. You can name these two items whatever you want (you’re just declaring variables here), so make the names explicit. E.g., if you wanted to set the name to the logged in user, a simple example would be like the below, where the name is being modified by the function setName, and useEffect is setting it to ‘Mikkel’ (as the inital state). 

```javascript
import React, {useState} from 'react';

import Card from '../card/card.component';

const UseStateExample = () => {
  const [name, setName] = useState('Mikkel');
  
  return (
  <Card>
      <h1> { name } </h1> 
      <button onclick={() => setName('Andrei')}>Set Name to Andrei</button>
   </Card>
      );
};
```

You would use a new useState hook for each property you want to set or change, much like this.setState is called for each property that is being set or changed.
The arguments parameter in Javascript
Tags: javascript
Published: 2019-10-16 15:15:27

---
title: The arguments parameter in Javascript
published: true
description: All the arguments passed to a function are accessible with the arguments parameter
tags: javascript
---

## All the arguments passed to a function are accessible with the arguments parameter

The arguments parameter is a collection of all the arguments passed to a function when it's invoked. It allows us to access all the arguments passed to a function, even the ones not listed in the parameter list.

The `arguments` object has a property named length that returns the number of arguments passed to the function.
We can access these parameters with an array-like notation.
For example, `arguments[0]` will return the first argument, `arguments[1]` will return the second argument, and so on.

As an example, let's define a function that takes three arguments: *number*, *street*, and *city*. The function prints out its arguments.

```
function myAddress(number, street, city) {
  console.log("arguments parameter length:", arguments.length);
  console.log("arguments[0]", arguments[0]);
  console.log("arguments[1]", arguments[1]);
  console.log("arguments[2]", arguments[2]);


  // we hava access to the 4th parameter even though it's not
  // in the parameter list

  console.log("arguments[2]", arguments[3]);  
}
```

When we call the function with four parameters instead of the three we specified when we defined the function, we don't get any error. The extra argument will be taken in by the function and placed in the arguments parameter where it will still be accessible.

```
myAddress(123, 'Main St.', 'Anytown', 'second floor');

// This is what's printed out in the console:

// arguments parameter length: 4
// arguments[0] 123
// arguments[1] Main St.
// arguments[2] Anytown
// arguments[2] second floor
```

Even though the `arguments` parameter looks like an array, it's not really a Javascript array, so we can't use array methods on it.

I mentioned earlier that in ES6 we have a *rest* parameter, that is used for the same purposes as the arguments parameter was used in previous versions of Javascript. 
The rest parameter is actually an array, so we can use array methods on it. 
This makes it preferable to the arguments parameter in many cases.

Tomorrow we well study the other implicit parameter passed to a function, the `this` parameter.
I am a Developer Advocate for Security in Mobile Apps and APIs, Ask Me Anything
Tags: ama, security, mobile, api
Published: 2019-10-16 12:08:12

---
title: "I am a Developer Advocate for Security in Mobile Apps and APIs, Ask Me Anything"
cover_image: "https://thepracticaldev.s3.amazonaws.com/i/bejie4kpo2cw7tboufra.jpg"
published: true
description: "Have a question about Mobile API Security? Try me!"
tags: "ama,security,mobile,api"
---

Try me for your questions about Mobile API Security!
[UPDATE] SpaceInvadersJS - Demo live now!
Tags: javascript, typescript, spaceinvaders, gamedev
Published: 2019-10-16 15:38:17

Hi to all!

Finally, a playable (early stage) demo of my Typescript-based framework is live: 

https://nicolalc.github.io/jssheet/spaceinvaders/index.html

## What's in this update

* Generic bugfixes
* Optimizations
* **NEW** player shooting boosts
* **NEW** simple Game HUD
* **NEW** simple game score / logic
* **NEW** player shield and life
* **NEW** explosions effects
* **NEW** shoot effects

## What there will be in the next release

* Levels
* Global score
* Sprite animations
* 2X player boost (will shoot 2x times)

## What will be in the final release

* A full playable 2D game
* A responsive game for every platform (but it's strongly game type dependent)
* A web editor, to handle dinamically sprites and behavior, like a real Engine
* 3D

Take a look to the old development posts:

https://dev.to/nicolalc/spaceinvaders-with-only-javascript-and-css-407c
https://dev.to/nicolalc/threejs-typescript-html-game-engine-5d5k

## USEFUL RESOURCES
[repository](https://github.com/NicolaLC/spaceinvaders-js)
[threejs](https://threejs.org/)
[personal website](http://nicawd.herokuapp.com/)
That's how I came back in time
Tags: php, sql
Published: 2019-10-16 18:09:07

Few days ago one of my clients asked for a little php script that will add the date when users opens a new ticket in his website's tickets system where they can contact the website administrators..

It's pretty simple right?, all it requires is to add a new column in the 'Tickets' MySQL table (I love to define this column as tinytext and not as date field).
And, in the $_POST form operation - get the date with the php date() function, add or reduce hours or minutes depends on the server time.

Surprisingly, in the DB I saw the date 1/1/1970 1:00 for every form entry. What The H....
So I started exploring.
This is how I get the date:
<pre>
$newdate = date("d/m/Y H:i");
$newdate = strtotime('+1 hour', strtotime ($newdate));
$newdate = date ( 'd/m/Y H:i' , $newdate );
echo $newdate;
</pre>

it outputs 1/1/1970 2:00, if I delete the second and the third lines (which adds an hour) the output is the actual date and time. WHY?

##Steps for debugging this issue:
####1. Enabling error display and error reporting in the php file:
<pre>
ini_set('display_errors', 1);
error_reporting(E_ALL);
</pre>

One's we enabled that we can't see *ANY* errors. Seems like everything is O.K. 

####2. Exploring the strtotime() function in the menual:
*Description:*
*strtotime ( string $time [, int $now = time() ] ) : int*
"The function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC), **relative to the timestamp given in now**, or the current time if now is not supplied."

I was given 'now' when I wanted to add 1 hour. Which means the format I'm trying to pass is not valid.
After more research I needed to replace the Slashes ( / ) with Hyphen ( - ) And the edit looks like this:
<pre>
$newdate = date("d-m-Y H:i");
$newdate = strtotime ( '+1 hour' , strtotime ( $newdate ) ) ;
$newdate = date ( 'd/m/Y H:i' , $newdate );
echo $newdate;
</pre>

That's it!
These slashes made the date to be in invalid format which strtotime() function can't handle.

#Conclusion
###Next time, I will read the formats valid for all the php functions, I didn't expected that this / so different from this - .

Thank you for reading,
Nir.
Contributors wanted for python project, autostack - debugging tool!
Tags: python, contributorswanted
Published: 2019-10-28 19:15:39

I am looking for contributors for my project, autostack. autostack is a command-line debugging tool that captures raised python exceptions, automatically searches stack overflow for answers to exceptions, and displays the answers in the console with syntax highlighting!

I created this project at CrimsonHacks 2019 and placed top 5, but I am now looking to expand this to other languages besides python, add smarter Stack Overflow queries, and even create VS Code and Atom extensions.

Literally anyone interested in this project is encouraged to start making changes and submitting pull requests. After a few contributions, if you'd like to become a collaborator, that's a possibility too! This project is definitely beginner friendly!

Checkout the repo at https://github.com/autostack-team/autostack! Looking forward to hearing from you guys!
Advance Boilerplate for getting started with MERN stack 👩‍💻👨‍💻
Tags: javascript
Published: 2019-10-28 19:42:45

---
title: Advance Boilerplate for getting started with MERN stack 👩‍💻👨‍💻
published: true
description: 
tags: javascript
---
Mernless provides a powerful Boilerplate which makes it easy to build isomorphic apps using Mongo, Express, React and NodeJS. It minimises the setup time and gets you up to speed using proven technologies. Mernless takes the pain out of development by easing common tasks used in many web projects, such as:
- Scalable and Maintainable Mern architecture
- Robust routing
- Database caching
- JWT authentication
- (Redux, Mail, Swagger, Docker, Travis) integration
- Command-line interface
How Can I Help?
- Contribute to the core repository.
- Ask your employer to use Mernless in projects.
- Make a tutorial that you explain Mernless.
- Follow our Mernless repository.

GitHub: https://github.com/getspooky/Mernless
Extracting Data from PostgreSQL
Published: 2019-10-29 23:33:28

---
title: Extracting Data from PostgreSQL
published: true
date: 2016-10-10 00:00:00 UTC
tags: 
canonical_url: http://hugomartins.io/blog/extracting-data-from-postgresql/
---

PostgreSQL has an excellent module built specifically for the purpose of extracting data between a file and a table.

This can be used to extract several data in three formats:- Text- CSV- Binary

Sometimes you’d want to extract data to a folder different than the one the database is in. You’d want to extract the data to the machine your logged on instead. This can be done using `\copy` instead of `COPY`.

An example of basic usage for extracting data would be, in CSV:

```
\copy (SELECT * FROM foo WHERE bar IS NOT NULL) TO '/path/to/folder' HEADER CSV

```

This simple snippet is incredibly useful to generate reports or extract data for analysis, simply and quickly.

* * *

Source: - [https://www.postgresql.org/docs/9.5/static/sql-copy.html](https://www.postgresql.org/docs/9.5/static/sql-copy.html)

_Originally published at [hugomartins.io](https://hugomartins.io/) on October 10, 2016._
Getting 401 Access denied in Maven when downloading using artifactory
Tags: java, testing
Published: 2019-10-29 09:51:10

Hi,

I am using Maven to download artifactory which has credentials and i have to use proxy settings also. I created a master password for my real password and i sent it settings-security.xml. and I added this password in servers along with my ID.
But I am getting 401 access denied error and when i tried to download manually i am able to do it. please help me with this.
How to Become a successful Coder
Published: 2019-10-29 12:42:49

While going through the lot and lots of resources I could not be able to make my self confident because somehow I am missing some concept in between . And because of that I will not be able to make  a concept pull from start to end. Then I realise that many student could have same challenges that I had earlier .
 So, I got motivated to create my own YouTube Channel  called “API POTHI” (https://www.youtube.com/apipothi) . 

In this channel I only focused on the core concept of any problem . What would be the basic approach to hit any problem and get the solution . Why we need to write this set of line code ? What is really meaning of particular line of code ? Is there any better approach to solve the problem ? If YES then what are the possible way we can have to solve this problem .

Considering all these kinds of self question I decided to do live coding in order to solve any problem. Either it is Simple ARRAY , STRING or DATA STRATURES program . We have followed the sequence in program that is available in different level of  playlist like below- 
 ARRAY-Level-00
 ARRAY-Level-01
 STRING-Level-00
 DS-SinglyLinkedList

Below Is the list of playlist of my YouTube Channel . Only one thing that you have to follow trough out of any courses or playlist or Level of Playlist is , Do not  directly jump in to any video or skip the video if you are beginner. With lot of patience you must follow the program number order (0,1,2,3 etc.) playlist order (Level-0,1). Remember you came over this channel to learn yourself not to justify other :) 

ARRAY-Level-00:
https://www.youtube.com/playlist?list=PLtsTccOGFwUJe7L4Wmo8VxfTzSI9O2zYr

ARRAY-Level-01
https://www.youtube.com/playlist?list=PLtsTccOGFwULMP18qqzA35LJ_6uZQrFx8

STRING-Level-00
https://www.youtube.com/playlist?list=PLtsTccOGFwUJYxvzU405NYiuoiVJdmppD

DS-SinglyLinkedList
https://www.youtube.com/playlist?list=PLtsTccOGFwUL-0I_QpiMUomgZXx8srgbx

Happy Learning !!!

Team API POTHI
YouTube   : https://www.linkedin.com/company/apipothi/
Facebook  : https://www.facebook.com/apipothi
Instagram : https://www.instagram.com/apipothi/
LinkedIn  : https://www.linkedin.com/company/apipothi/
Twitter   : https://twitter.com/apipothi