teleren/devto huggingface dataset:
G Suite Happy Ending
Published: 2018-08-20 01:18:03

---
title: G Suite Happy Ending
published: true
tags: 
canonical_url: https://law.gmnz.xyz/2018/08/07/g-suite-happy.html
---

Somehow, I got Google's attention.

A representative of Google (I am not sure if I can mention his name here, but I would love to, let me know) contacted me on LinkedIn and that he would like to help out on my G Suite problem. This is nice, straight from Mountain View.

Minutes later, someone from their APAC office called me to check up on my situation and I run down the events that happened. Their representative invited me on a calendar to a Hangout Meet, I shared my screen, logged in to my account, then figuring out and debugging. Unfortunately, there’s not much that they can do about it. And that he will talk to his managers in Mountain View.

After a few minutes, Google rep from LinkedIn called me personally and told me they were very sorry, and they will make sure this will never happen again to me or anyone. And he also said he will escalate this to the managers. That was comforting for him to call me.

A few minutes before 6PM (local time), a Google Engineer called me and that they are trying to check if they can recover my files, my emails, etc. He instructed me to cancel my new G Suite account again so they can proceed. There's hope.

Hours after, I received a couple of emails from Google’s Technical Solutions Engineers and updating me of the status of the recovery, telling me that they should be able to recover my upgraded personal/business email along with all my data.

As of today, I was able to retrieve all my data, emails, files, docs, sheets, photos, etc.

I would like to thank Google for the effort and time to bring back my data, files and email. I am not sure if everyone on the Help Forum has the same recovery process I encountered in this post but I hope they do. I know I am not the only one who encountered this “upgrade” based on the forums, I wish Google will highlight on the signing up process that there is no way going back to your personal once you “unlock”.

Anyway, many thanks to Google and their managers, engineers who went out of their way to help me. Now it's time to backup some data.
Parsing JSON with Node.js
Tags: javascript, node
Published: 2018-08-08 05:02:11

---
title: Parsing JSON with Node.js
published: true
tags: javascript, node, node.js, nodejs
canonical_url: https://flaviocopes.com/nodejs-parse-json/
---

If you have JSON data as part of a string, the best way to parse it is by using the `JSON.parse` method that’s part of the JavaScript standard since ECMAScript 5, and it’s provided by [V8](https://flaviocopes.com.com/v8/), the JavaScript engine that powers [Node.js](https://flaviocopes.com.com/nodejs/).

Example:

```
const data = '{ "name": "Flavio", "age": 35 }'
try {
  const user = JSON.parse(data)
} catch(err) {
  console.error(err)
}

```

Note that `JSON.parse` is synchronous, so the more the JSON file is big, the more time your program execution will be blocked until the JSON is finished parsing.

There is no way to parse a JSON file asynchronously.

If your JSON is in a file instead, you first have to read it.

A very simple way to do so is to use `require()`:

```
const data = require('./file.json')

```

Since you used the `.json` extension, `require()` is smart enough to understand that, and parse the JSON in the `data` object.

One caveat is that file reading is synchronous. Plus, the result of the require() call is cached, so if you call it again because you updated the file, you won’t get the new contents until the program exits.

This feature was provided to use a JSON file for the app configuration, and it’s a perfectly valid use case.

You can also read the file manually, using `fs.readFileSync`:

```
const fs = require('fs')
const fileContents = fs.readFileSync('./file.json', 'utf8')

try {
  const data = JSON.parse(fileContents)
} catch(err) {
  console.error(err)
}

```

This reads the file synchronously.

You can also read the file asynchronously using `fs.readFile`, and this is the best option. In this case, the file content is provided as a callback, and inside the callback you can process the JSON:

```
const fs = require('fs')

fs.readFile('/path/to/file.json', 'utf8', (err, fileContents) => {
  if (err) {
    console.error(err)
    return
  }
  try {
    const data = JSON.parse(fileContents)
  } catch(err) {
    console.error(err)
  }
})

```
A neat little trick with JavaScript's indexOf()
Tags: javascript, trick, tip
Published: 2018-08-07 12:31:54

---
title: A neat little trick with JavaScript's indexOf()
published: true
description: Nice to the eyes
tags: javascript, trick, tip
---

Here's a little trick I picked up while browsing through some plugins I had to edit or extend again

```js
var arr = [ 1, 2, 3, 'foo' ];

// old way
if (arr.indexOf('foo') > -1) {
    console.log('"foo" is in "arr"!');
}


// new way
if (~arr.indexOf('foo')) {
    console.log('"foo" is in "arr"!');
}

```

I wondered - _how does that work_? It's because of this little operator I never used or seen yet:

### The Bitwise NOT-Operator `~`

It flips all bits of a number, I'm not sure how it exactly works but it seems that `-1` is the only case of ending up with a falsy number, or rather a falsy expression: `0`

So that means, we can take advantage of it and use it in indexOf (haven't seen any other uses yet though).

```js
// you can also negate the statement, no separate parantheses needed
if (!~dailyRoutine.indexOf('☕️')) {
    console.log('Not a life worth living');
}
```

What do you think about this? I think it sure looks neat and saves up some characters in the code, but it could confuse people who read it afterwards (or look it up like me lol)
Composing View Controllers pt.4: Integration Tests vs. Contract Tests vs. UI Tests
Tags: testing, ios, swift, learning
Published: 2018-10-02 04:28:25

---
title: Composing View Controllers pt.4: Integration Tests vs. Contract Tests vs. UI Tests
published: true
tags: testing, ios, swift, learning
canonical_url: https://www.essentialdeveloper.com/articles/composing-view-controllers-part-4-integration-tests-vs-contract-tests-vs-ui-tests
cover_image: http://static1.squarespace.com/static/5891c5b8d1758ec68ef5dbc2/58921b5a6b8f5bd75e20b0f4/5b68afeeaa4a99da3bc15fbc/1533632732054/thumbnail_2.png?format=1000w
---

{% youtube K4cAAvmFHgM %} [Watch on YouTube](https://www.youtube.com/watch?v=K4cAAvmFHgM&list=PLyjgjmI1UzlSwSsQ4RK-z3XO2RXWASoah)

In this video, we're going to improve our `Swift View Controller Lifecycle Observers` framework by increasing the _test confidence_ with Integration Tests.

We’re going to discuss the difference between **UI Tests** , **Integration Tests** and **Contract Tests** (Unit Tests). We’ll also bring up some ideas on when to use one over the others.

The tests we wrote in [the previous episode](https://dev.to/essentialdeveloper/composing-view-controllers-pt3-lifecycle-observers-in-swift-b23-temp-slug-3595532) are usually called "Unit Tests" but, in the context of our framework, we like to call them “Contract Tests.” We call them “Contract Tests” because they ensure we’re using the UIViewController Container API correctly, as defined in Apple’s documentation (or the contract!).

You can find the [source code on GitHub.](https://github.com/essentialdevelopercom/view-controller-lifecycle-observers)

Learn more about [Implementing a Container View Controller from Apple Docs.](https://developer.apple.com/documentation/uikit/uiviewcontroller)

[Subscribe now to our Youtube channel](https://www.youtube.com/essentialdeveloper?sub_confirmation=1)and catch **free new episodes every week**.

* * *

Originally published at [www.essentialdeveloper.com](https://www.essentialdeveloper.com/articles/number-1-reason-why-you-dont-improve-as-a-software-developer).

We’ve been helping dedicated developers to get from low paying jobs to **high tier roles – sometimes in a matter of weeks!** To do so, we continuously run and share free market researches on how to improve your skills with **Empathy, Integrity, and Economics** in mind. If you want to step up in your career, [access now our latest research for free](https://www.essentialdeveloper.com/courses/career-and-market-strategy-for-professional-ios-developers).


## Let’s connect
If you enjoyed this article, visit us at [https://essentialdeveloper.com](https://essentialdeveloper.com) and get more in-depth tailored content like this.

Follow us on: [YouTube](https://youtube.com/essentialdeveloper) • [Twitter](https://twitter.com/essentialdevcom) • [Facebook](https://facebook.com/essentialdeveloper) • [GitHub](https://github.com/essentialdevelopercom)
Install SVN Plugin in Eclipse
Tags: java, code, svn, webdev
Published: 2018-08-07 08:23:12

---
title: Install SVN Plugin in Eclipse
published: true
description: Install SVN Plugin in Eclipse
tags: #java #code #svn #webdev
---

Post Link : https://www.skptricks.com/2018/08/install-svn-plugin-in-eclipse.html

This tutorial explains how to install SVN Plugin in Eclipse IDE. Eclipse does not support SVN repository browsing by default. For that you need to download several plugins.

<a href="https://www.skptricks.com/2018/08/install-svn-plugin-in-eclipse.html">Install SVN Plugin in Eclipse </a>

<img src="https://1.bp.blogspot.com/-vB5RyvyjkD0/W2lUfQym01I/AAAAAAAABwk/yAJdOrAJNeQOME74qBrrJl_ZEwfJjP4VwCLcBGAs/s320/sv.jpg" />

Follow the below steps to configure SVN plugins in eclipse IDE :

Step-1 :
First Open Eclipse IDE.



Step-2 :
Go to Help -> Install New Software


Step-3 :
Enter the Eclipse update site URL into the “Work with” field. If you use Eclipse KEPLER take version 1.10.x. For previous Eclipse versions I suggest you use the 1.6.x version. It is compatible with most SVN servers out there.

Link for 1.10.x Release: http://subclipse.tigris.org/update_1.10.x

Link for 1.8.x Release: http://subclipse.tigris.org/update_1.8.x

Link for 1.6.x Release: http://subclipse.tigris.org/update_1.6.x

Link for 1.4.x Release: http://subclipse.tigris.org/update_1.4.x




Step-4 :
you will now see a list of components to install. Select all the option and click on next button.


Step-5 :
On the next screen click “Next” again, agree with the  license agreement and click on “Finish” button

Step-6 :
Wait for a while until the packages are downloaded and installed. You will need to restart Eclipse for the changes to take effect.

Step-7 :
Click the “Open perspective” button it the upper right corner of Eclipse


Select  “SVN Repository Exploring” in this window




Step-8 :
Right-click in “SVN Repositories” view, and select New -> Repository Location



This is all about SVN plugin installation. Thank you for reading this article, and if you have any problem, have a another better useful solution about this article, please write message in the comment section.
200+ Crypto Currency Logo's in SVG Format
Tags: svg, logos, crypto
Published: 2018-08-07 07:01:36

---
title: 200+ Crypto Currency Logo's in SVG Format
published: true
description: 200+ Crypto Currency Logo's in SVG Format (including the Sketch file)
tags: svg, logos, crypto
cover_image: https://thepracticaldev.s3.amazonaws.com/i/9px6tkgy2tnijua0wqpk.jpg
---

Thought this might be useful to some folks here. Collected by the awesome [@rebellenoire](https://twitter.com/rebellenoire), these are all/most of the current Crypto Currency logos, in SVG format.

https://github.com/wondergryphon/cryptocurrency-logos

Busy building this resource into a site - kind of like iconmonster.com - to make them searchable & more easily usable. Probably also an `npm` module too... Watch this space 😉

(PS: This is my first time maintaining something like this. Would love some feedback on any ways I can make it better.)
Memory required for an Application/Program?
Tags: java, discuss
Published: 2018-08-07 06:42:00

---
title: Memory required for an Application/Program?
published: true
description: How do you measure the memory requirements (RAM, storage,etc) for your application/program?
tags: Java , discuss 
---

I have been developing a java application server for the past 2.5 years but struggle with calculating the optimum memory required for it.

_Am I missing out on something obvious?_

Can the great dev.to community teach me some tricks/softwares/calculations/anything that help me.! Thanks in advance :)
About
Published: 2018-10-16 05:57:32

---
title: About
published: true
tags: 
canonical_url: https://blog.nicolasmesa.co/about/
description: "About Nicolas Mesa"
---

![Nicolas, Amalia and Elisa](https://blog.nicolasmesa.co/about/nicolas_amalia_elisa.jpg)

Hi and welcome to my blog!

I am a Software Development Engineer working for Amazon on the [Amazon Go](https://www.amazon.com/go) and [Amazon Books](https://www.amazon.com/amazonbooks) team. Currently, I live in Seattle with my wife, Elisa, and my daughter, Amalia. My interests are in Web technologies, Javascript, Python, Networking, AWS, Docker, and Linux.

Before joining Amazon, I was in New York City pursuing my Master’s degree in Computer Science at [Columbia University](https://www.columbia.edu). Prior to that, I worked at [Alegra](https://alegra.com), a startup in Colombia to help small and medium-sized companies with their accounting and bookkeeping.

I am also a water skier and did it competitively for a while.

The purpose of this blog is to publish my notes about stuff that I find interesting or about something new that I learned. Hopefully, I’ll look back in a few years and will see how much I’ve learned.
Check Internet Connection using JavaScript and HTML
Published: 2018-08-07 06:14:38

---
title: Check Internet Connection using JavaScript and HTML
published: true
description: Check Internet Connection using JavaScript and HTML
tags: 
---

<a href="https://www.skptricks.com/2018/03/check-internet-connection-using-html-and-javascript.html">Check Internet Connection using JavaScript and HTML</a>

Today, We are going to learn how to check internet connection using html and javascript. We have used pure javascript to check offline and online status of internet connection. Nowadays these two new events supported by most of the browser: "online" and "offline".These two events are fired on the <body> of each page when the browser switches between online and offline mode. Additionally, the events bubble up from document.body, to document, ending at window.

You can register listeners for these events by following below steps :
1. Using addEventListener on the window, document, or document.body.
2. By setting the online or offline properties on document or document.body to a JavaScript Function object.

<img src="https://3.bp.blogspot.com/-Z4lpvlnLZ6g/WqeABpY6JxI/AAAAAAAABZk/DkUNGAYZ3KwqqRWtQmIE7eAgeT6XAhKiQCLcBGAs/s400/internet.jpg" />


Post Link : https://www.skptricks.com/2018/03/check-internet-connection-using-html-and-javascript.html


Joins us to get more updates :
https://twitter.com/skptricks
https://www.facebook.com/skptricks/
https://plus.google.com/u/0/b/106913300810490030003/106913300810490030003
https://www.instagram.com/skptricks/?hl=en
https://www.youtube.com/channel/UCvXz7_Ip_tAlhcwynrMOW9A
Crampus an Intelligent Driving Assistant
Tags: computervision, machinelearning, iot
Published: 2018-08-07 05:13:41

---
title: Crampus an Intelligent Driving Assistant
published: true
description: Crampus is an Intelligent Driving Assistant (known as I.D.A) that use the concept of predictive analytics to monitors the driver's driving activity such as driving lane and driver's condition.
tags: computer vision, machine learning, iot
---

Crampus is an Intelligent Driving Assistant (known as I.D.A) that use the concept of predictive analytics to monitors the driver's driving activity such as driving lane and driver's condition. Basically, the system using two cameras that monitors the front and the driver. Each of the cameras consists its own feature, which are lane detection and driver condition. The system that monitors the driver condition consists the feature such as driver facial recognition, expression, drowsiness, and heart rate. Further, on this blog, I shall tale my experience while developing Crampus.

I start working on Crampus back in September 2016, where I've writing its algorithm based on the fundamental elements of computer vision that commonly known as "vectors".
Table driven tests in Go
Tags: go, testing
Published: 2018-08-07 04:47:21

---
title: Table driven tests in Go
published: true
description: Table driven tests in Go
tags: go, testing
---
![Table driven tests in Go](https://thepracticaldev.s3.amazonaws.com/i/ez5kpn63di6xdcymvpn8.png)

In [practice-go](https://github.com/plutov/practice-go) we often use table driven testing to be able to test all function scenarios. For example the `FindAnagrams()` function returns us a list of anagrams found in the dictionary for given input. To be able to test this function properly we need to test multiple cases, like empty input, valid input, invalid input, etc. We could right different asserts to make it, but it's much more easier to use table tests.

Imagine we have this function:

```
FindAnagrams(string word) []string
```

Here is how our table may look like:

```
var tests = []struct {
	name string
	word string
	want []string
}{
	{"empty input string", "", []string{}},
	{"two anagrams", "Protectionism", []string{"Cite no imports", "Nice to imports"}},
	{"input with space", "Real fun", []string{"funeral"}},
}
```

Usually table is a slice of anonymous structs, however you may define struct first or use an existing one. Also we have a `name` property describing the particular test case.

After we have a table we can simply iterate over it and do an assertion:

```
func TestFindAnagrams(t *testing.T) {
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			got := FindAnagrams(tt.word)
			if !reflect.DeepEqual(got, tt.want) {
				t.Errorf("FindAnagrams(%s) got %v, want %v", tt.word, got, tt.want)
			}
		})
	}
}
```

You may use another function instead of `t.Errorf()`, `t.Errorf()` just logs the error and test continues.

The [testify](https://github.com/stretchr/testify) package is very popular Go assertion package to make unit tests clear, for example:

```
assert.Equal(t, got, tt.want, "they should be equal")
```

`t.Run()` will launch a subtest, and if you run tests in verbose mode (`go test -v`) you will see each subtest result:

```
=== RUN   TestFindAnagrams
=== RUN   TestFindAnagrams/empty_input_string
=== RUN   TestFindAnagrams/two_anagrams
=== RUN   TestFindAnagrams/input_with_space
```

Since Go 1.7 testing package enables to be able to parallelize the subtests by using `(*testing.T).Parallel()`. Please make sure that it makes sense to parallelize your tests!

```
t.Run(tt.name, func(subtest *testing.T) {
	subtest.Parallel()
	got := FindAnagrams(tt.word)
	// assertion
})
```

That's it, enjoy writing table driven tests in Go!
Release :: PHP to Ruby learning series
Tags: php, ruby, laravel, rails
Published: 2018-08-07 00:40:42

---
title: Release :: PHP to Ruby learning series
published: true
description: PHP to Ruby is a short learning series tailored for PHP developers interested in learning the Ruby language.
tags: PHP, Ruby, Laravel, Ruby on Rails
---

After months of writing and burning midnight oil [PHPtoRuby](https://phptoruby.io) is finally available for your viewing pleasure *for free*.

https://phptoruby.io

PHPtoRuby is the result of the lessons I've learned after transitioning to Ruby development after ~ 10 years of PHP development.

I was frustrated by the beginner focused Ruby books. I already had production PHP experience in several frameworks - including Laravel, Symfony, Lumen, Silex and of course vanilla PHP.

I wanted just someone to explain a Ruby concept with a PHP equivalent example. Since I couldn't find a decent resource, I decided to sit down and create it.

If you're interested in Ruby because you've heard great things about Ruby on Rails (which it does live up to it's name, trust me) - then you should give this short book a shot before heading over to the Rails Tutorial.

This book will give you a head start into understanding the philosophical and syntactical differences between PHP and Ruby. It will also explain some of the key differences in web hosting, namespacing, type hinting, and even touch on the IoC container debacle.

I wrote this for the PHP developer that has at least some OOP experience, but if you don't I explain the PHP concepts as well.

So check it out, it's the easiest way to become a server side ployglot if you've already learned the language that powers a third of the internet.


- Dylan
Author of [PHPtoRuby](https://phptoruby.io)
Configurer Linux pour utiliser une représentation de date logique (ISO 8601)
Tags: linux, blog, french
Published: 2018-10-08 02:11:22

---
title: Configurer Linux pour utiliser une représentation de date logique (ISO 8601)
published: true
tags: linux, blog, french
canonical_url: https://mayeu.me/blog/configurer-linux-pour-utiliser-une-representation-de-date-logique-iso-8601/
---

Durant l’une de mes nombreuses reconfigurations de Linux, je me suis demandé s’il était possible d’utiliser le standard [ISO 8601](https://fr.wikipedia.org/wiki/ISO_8601) pour l’affichage des dates. Il s’agit du standard définissant le format `2018-08-07` (et plein d’autres choses, comme l’heure en format 24 heures).

Pour configurer ce genre de choses sur Linux, on utilise le système de [paramètres régionaux](https://fr.wikipedia.org/wiki/Param%C3%A8tres_r%C3%A9gionaux) (« locale » en anglais). La plupart du temps, on s’arrête à configurer la variable `LANG` pour utiliser notre propre langage (`LANG=fr_FR.UTF-8`) et basta. Mais il y a bien d’autres variables (comme`LC_NUMERIC`, `LC_MONETARY`, `LC_PAPER`), et pour notre cas de figure on utilisera `LC_TIME`.

Il s’avère qu’il existe un paramètre régional `en_DK` (qui est vraiment un hack, puisque l’anglais n’est pas vraiment officiel au Danemark) qui utilise le standard ISO 8601 !

Avec ça on peut donc configurer son système avec `LC_TIME=en_DK.UTF-8` et atteindre le nirvana des dates :pray:

_Nota bene : comme son nom l’indique, le paramètre `en_DK` passe les dates en anglais. Utilisant mon système dans cette langue ça ne me pose pas de problème, malheureusement à ma connaissance il n’y a pas d’équivalent français pour ces paramètres :(_

*Cet article a été initialement publié sur [mayeu.me](https://mayeu.me/blog/configurer-linux-pour-utiliser-une-representation-de-date-logique-iso-8601/).*