teleren/devto huggingface dataset:
Google Maps releases the “Favorite locations” feature What does it consist of?
Tags: android
Published: 2019-10-26 21:42:36

The popularity of Google Maps has increased over the years thanks to the company's insistence on strengthening its navigation app. Many are the news that have officially reached an increasingly complete tool that has become the "all in one" they were looking for from Google.

The radar and speed limits , the location of public toilets , the option of safe route to avoid scam taxi drivers .. . Google Maps continues its search for innovation and now releases “Favorite Locals”, a tool very similar to TripAdvisor that allows users to know all the details of local businesses in the area. Don't miss it!

Google Maps wants to steal prominence from TripAdvisor


Normally, when we are going to try a new restaurant, the first thing we do is access to TripAdvisor to see what ratings it has and what its prices are. The letter, the friendliness of the employees and the availability are also important factors that can make us choose when deciding. Well, now Google Maps has decided to integrate a tool very similar to the one we all know that receives the name of "Favorite Locals". 

The Mountain View company has issued an official statement explaining all the news that will come to Google Maps by the hand of “Favorite Locations”. From now on, users will be able to locate the best places for leisure or gastronomy in their city. All this, consisting of a system of assessments, photographs and even small analyzes of the premises so that users who access the tool can know all the details of the place before attending.

Google Maps Samsung Galaxy Note 10

Another important point of "Favorite Locations" lies in the incorporation of a functionality with which different profiles can filter by city and type of restaurant. 

A novelty that can be found in the “Explore”> “Lists” tab of Google Maps and that can be very helpful to undecided people. 
At the moment, this new search tool is only available in Chicago, New York and Los Angeles, 
but everything seems to indicate that it will gradually reach the rest of the cities.

for more info : <a href="https://protube2.com/">protube2</a>
Can someone explain Dev.To credits to me?
Tags: meta
Published: 2019-10-26 21:05:14

[https://dev.to/settings/pro-membership](https://dev.to/settings/pro-membership) says I have 25 credits (and that "pro" membership is 5/mo.). But what are Dev.To credits? How do I get them? Why do I have 25?

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/hwco3oepztq82r8ad7i5.png)

Anyone know?

cc: @peter @ben @jess
Discovery how require a file in Clojure and group a list of maps by keyword
Tags: clojure, todayilearned
Published: 2019-10-26 20:26:34

## 👨‍💻👩‍💻
We have into our *namespace* **example** a `.clj` with **demands**, we need to **import** it **in another** `.clj` for handle the demands, like groupping by a keyword for example.

##### In clojure we define a namespace by  `(ns my-namespace)`

### db.clj:
```clojure
(ns example.db)  

(def demand {:user 15  
  :itens {:bag {:id :bag :quantity 3 :price 80}  
                     :t-shirt {:id :t-shirt :quantity 3 :price 40}  
                     :shoes {:id :shoes :quantity 3}}})  
(def demand2 {:user 15  
  :itens {:bag {:id :bag :quantity 3 :price 80}  
                     :t-shirt {:id :t-shirt :quantity 3 :price 40}  
                     :shoes {:id :shoes :quantity 3}}})  
(def demand3 {:user 15  
  :itens {:bag {:id :bag :quantity 3 :price 80}  
                     :t-shirt {:id :t-shirt :quantity 3 :price 40}  
                     :shoes {:id :shoes :quantity 3}}})  
(def demand4 {:user 11  
  :itens {:bag {:id :bag :quantity 2 :price 80}  
                     :t-shirt {:id :t-shirt :quantity 3 :price 40}  
                     :shoes {:id :shoes :quantity 7}}})  
  
(def demand5 {:user 11  
  :itens {:bag {:id :bag :quantity 5 :price 80}  
                      :t-shirt {:id :t-shirt :quantity 3 :price 40}  
                      :shoes {:id :shoes :quantity 30}}})  
  
(defn all-demands []  
  [demand, demand2, demand3, demand4, demand5])

```

### handle.clj:
For import another file, just pass in your local namespace the keyword `:require`  to import for the standard definition `namespace.file-name`, and if you want you can add an alias using `:as` keyword, good pratices  encourages us to follow same standard but abbreviated
```clojure
(ns example.handle  
  :require '[example.db :as e.db]) 
(println (group-by :user (l.db/all-demands))) ;group all demands by user

;if you want count total per user you can do something like that:
(defn total-per-user [[user demands]]  
  {:user-id user  
   :total (count demands)})  
  
(->> (l.db/all-demands)  
     (group-by :user)  
     (map total-per-user)  
     println)
```


Now you can "modularize" your Clojure project!

##### (println "until the next 🤗")

![](https://media2.giphy.com/media/g96QRNjWUvdKw/giphy.webp)
Cloud Security Management Starts with Security Policy Monitoring & Deployment of Appropriate Cloud Security Solutions
Tags: cloudsecuritytools, cloudsecuritymanagement, cloudsecuritysolutions
Published: 2019-10-26 20:09:01

Cloud security solutions providing automated policy auditing and enforcement are easy ways to manage the significant risk posed by policy deviations. Read more: https://helical-inc.com/blog/good-cloud-security-management-starts-with-security-policy-monitoring-and-deployment-of-appropriate-cloud-security-solutions/
The Right Way To Add Tailwind CSS to Gatsby with Purge CSS
Tags: javascript, react, css, tutorial
Published: 2019-10-26 19:59:23

---
title: The Right Way To Add Tailwind CSS to Gatsby with Purge CSS
published: true
description: The right way to add Tailwind CSS to a Gatsby.js React Application, using Post CSS and Purge CSS
tags: javascript, react, css, tutorial
canonical_url: https://codebushi.com/add-tailwindcss-to-gatsby-with-purge-css/
---

In this video, we look at the right way to add Tailwind CSS to a Gatsby site. First we install Tailwind CSS and make a button with its utility classes.

During the `gatsby build` and `gatsby serve` we view the page source to see that **all** the Tailwind CSS classes have been included, which is very bad!

We add `gatsby-plugin-purgecss` to our Gatsby site to remove any CSS that we aren't using, which keeps our final file size small and pretty!

After that's all in place, I explore how we can make a re-useable Button component by passing in Props and Tailwind CSS classes. 

{% youtube d0v_ouu5mqU %}

Subscribe if you liked this video!:
https://www.youtube.com/channel/UCS6lPt9btmTG3GkU82ELygA

Follow Me On:
https://twitter.com/HuntaroSan
Comparison of all NoSQL for Software Architects
Tags: database, nosql, webdev
Published: 2019-10-26 19:40:27


While SQL databases are insanely useful tools, their monopoly in the last decades is coming to an end. And it’s just time: I can’t even count the things that were forced into relational databases, but never really fitted them. (That being said, relational databases will always be the best for the stuff that has  _relations_.)

![](https://miro.medium.com/max/1447/1*mj7gK9gzUzNQJg6jV_E0Zw.png)

But, the differences between NoSQL databases are much bigger than ever was between one SQL database and another. This means that it is a bigger responsibility on  **software architects**  to choose the appropriate one for a project right at the beginning.

In this light, here is a comparison of Open Source NOSQL databases  [Cassandra](http://cassandra.apache.org/),  [Mongodb](http://www.mongodb.org/),  [CouchDB](http://couchdb.apache.org/),  [Redis](http://redis.io/),  [Riak](http://basho.com/riak/),  [RethinkDB](http://rethinkdb.com/),  [Couchbase (ex-Membase)](http://www.couchbase.org/membase),  [Hypertable](http://hypertable.org/),  [ElasticSearch](http://www.elasticsearch.org/),  [Accumulo](http://accumulo.apache.org/),  [VoltDB](http://voltdb.com/), [OrientDB](http://www.orientechnologies.com/),  [Aerospike](http://www.aerospike.com/),  [Neo4j](http://neo4j.org/)  and  [HBase](http://hbase.apache.org/)

**See the full article:**  [Comparison between all NoSQL Database](http://www.tellmehow.co/comparison-nosql-database/)
COMBINE INTERNET SPEED OF 10 MOBILE PHONES AS ONE...
Tags: tutorial, android, productivity
Published: 2019-10-26 19:02:29

I was surfing internet for alternatives to BOINC & Distri.js and found this. This is a very different software that I was searching but its worth to share. 

{% youtube UhBeD5fRAmY %}

I liked the idea of combining internet,  though app is since 2018. Hope Someone can list any opensource alternative to this in comment box.

ONE SOLUTION I KNOW !!! Can You help in finding other...


Like, tag and follow me.
How to use Vue Composition API using TypeScript - Part 3
Tags: vue, typescript
Published: 2019-10-26 16:29:34

As we saw in the previous part we settled our contract(interface) and builded a service to fetch our data, is this final part we are going to consume the service and display the information using the Composition API, let's begin!

##**Preparing Vue to use Composition API**#

In **main.ts** we need to add few lines to Vue to use the new API, for that just simple add these lines:

```js
import Vue from 'vue'
import App from './App.vue'
import VueCompositionApi from '@vue/composition-api' // <-- Make the import

Vue.config.productionTip = false

Vue.use(VueCompositionApi) // <-- Tell Vue to use it

new Vue({
  render: h => h(App)
}).$mount('#app')

```

After that we are ready to use the API.

##**Making the display component**#

Now go to **App.vue** and tell the script section to use TypeScript adding lang="ts", import **createComponent** and **ref** from @vue/composition-api and our interface and service:

```js
<script lang="ts">
  import { createComponent, ref } from '@vue/composition-api'
  import Character from './interfaces/Character'
  import CharacterService from './services/CharacterService'
  ...
```

With **createComponent** we are enabling TypeScript in the new API, and **ref** as out reactive manager, of course we can use **reactive** but  I feel using ref makes the code cleaner.

To make use of the API we need to declare and use the createComponent we extracted from the API and establish the export default with the createComponent to make use of TypeScript. After that we can now use the setup method to prepare and fetch out data from the service, so we can now do this:

```js
export default createComponent({
  setup () {
    const characterService = new CharacterService()
    const characters = ref<Character[]>([])

    const fetchData = async (): Promise<void> => {
      characters.value = await characterService.FetchCharacters()
    }
    fetchData()
    return {
      characters
    }
  }
})
```

As we can see to make a ref as a type just add `<TypeHere>` and your variable will be set as the desired type, make an async/await function to fetch our data, call it before the return and with this we can retrieve any information we need from an API, you can go to your Vue DevTool and check yourself we gathered the data.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/cbpj7zrhcex9j0d7dejk.png)

As you can see, using the new API with TypeScript is pretty simple, some new advantages with the Composition API is we can have cleaner and modular code, adding TyepScript will gain the typing superpower. I am excited to use Vue 3 with all this advantages.

Before we finish I want to make and apologise for making a 3 Part post, I did it just to avoid the TL:DR type post, I hope this can be useful to you. Thanks for reading and see the next time making Vue apps ✌
Export graphql schema to postman or insomnia collections
Tags: showdev, typescript, graphql
Published: 2019-10-26 18:12:54

I happened to have been assigned to work on a GraphQL project and I needed to make requests to the GraphQL server. The options were GraphQL playground and Altair GraphQL client which I seemed not to like for reasons I cannot particularly articulate so I decided to fall back on Insomnia or Postman which I am more familiar with. However, the support for GraphQL on those clients were not so good as they couldn't retrieve all the mutation and query schemas from the server, it's otherwise called schema introspection.

So I set out to build a tool that could get the schema and transform them into Postman and Insomnia collections, I also decided to use typescript as I wanted to learn it at that point and this was the available project.

The project lives at [here on github](https://github.com/oshosanya/graphql-export)

To use the tool;

```
yarn global add graphql-export

// For postman exports
graphql-export -u http://my-graph-ql-server-root -f postman

//For insomnia exports
graphql-export -u http://my-graph-ql-server-root -f insomnia
```

This creates a json file in the directory where you run the tool which you can import into Postman or Insomnia as the case may be.

Pull requests, code reviews and suggestions are all welcome.
What's the issue with the MockedProvider component?
Tags: help, testing, react, graphql
Published: 2019-10-26 17:15:25

Hey DEV community, I'm struggling with why the `react-dom` library is yelling at me in my tests. So much so, that I spun up a [git repo](https://github.com/skellas/mock-provider) in order to demonstrate what the issue is that I'm facing. 

If you pull down the repo, you can see the console warning, even though I'm getting passing tests.

Quick overview of the test:
 * Wrap a component in a <MockedProvider/>
 * Provide the MockedProvider with a mock query/response
 * Mount said component via enzyme
 * await the data to refresh and run my assertions

Every time that I run the tests, I get the following console warning, in bright red colors:

```
  Warning: An update to Query inside a test was not wrapped in act(...).

    When testing, code that causes React state updates should be wrapped into act(...):

    act(() => {
      /* fire events that update state */
    });
    /* assert on the output */

    This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
        in Query (at App.tsx:37)
        in div (at App.tsx:36)
        in App (at App.test.tsx:51)
        in ApolloProvider (created by MockedProvider)
        in MockedProvider (created by WrapperComponent)
        in WrapperComponent
```

I even followed the link and used the `act()` function referenced. I actually left that third test in there, because it throws the same warning. 

So, is it that I'm using Enzyme to mount instead of React Test Renderer? Anybody have some tips? I'm open to pull requests with best practices for testing.
(Not) Building a Decentralised Blog
Tags: decentralised, personal, blog
Published: 2019-10-26 17:04:45

---

title: (Not) Building a Decentralised Blog
published: true
description: journal is being shelved for now
tags: decentralised , personal , blog
 
---

[journal](https://github.com/lukebarnard1/journal) is exactly where I left it a few months ago, looking a bit dated and not being easy to use and not having the features I wanted in my blog site.

Meanwhile, the main purpose of journal remains unfulfilled. The work to expose a [matrix](https://matrix.org) room as a journal blog was never done as I haven’t had the time or the will to go and make it happen.

My original decision to replace the client-based version of journal was a little short-sighted. It’s true that it took a long time to load a blog, but it worked and had live updates and allowed posting of blogs and comments. In hindsight I could have enhanced this with a server that exposed a room as a set of markdown files to be consumed by the frontend.

But when you think about it, trying to optimise the bit that content management systems have already solved would also have been a bit short-sighted.

The other way of looking at it is that if the client-based journal could have avoided doing the main blog article bit, it might have actually been a useable solution and a widely compatible one. For example, it could have been embedded into a blog that was already deployed via a CMS.

Content management is a well developed area of open source, with a lot of different options (e.g. Ghost, Hugo, Jekyll), all that produce static content in a customisable way. Any solution for blogs on matrix should clearly make use of the work that has been done here.

Disqus is an example of a centralised discussion thread embed which I think is an obvious solution for the matrix community to clone. The matrix equivalent could be highly customisable and integrate with popular matrix clients via a “matrix.to” link (e.g. “Open discussion in Riot.im”).

For other features that I intended to implement with journal, there are existing solutions that are already widely used. For example, twitter, mastodon or email can be used to notify readers of a new blog (or a message in a matrix room, which could even be the start of the embedded discussion thread!).

Regardless of the direction I took journal in, I clearly didn’t have time to maintain such a project in it’s entirety. My current plan is to stop maintaining it, eventually replace my personal blog with Hugo and who knows, maybe I’ll have a go at making a Disqus clone for Matrix one day.

Thanks for reading and showing interest in this project.

Happy decentralising 😄
What (if any) is your preferred auto-formatter for Python?
Tags: python, programming, discuss
Published: 2019-10-26 16:46:06

---
title: What (if any) is your preferred auto-formatter for Python?
published: true
description: 
tags: Python, Programming, devdiscuss
---

This is more of a discussion poll than an actual post. I am writing a blog post about auto-formatting options for Python, and wanted to source a little bit of intel from the community itself.

I'd really love to know which one is your favorite and why. If you don't want to bother writing at length, I have a created a [Twitter poll](https://twitter.com/preslavrachev/status/1188112156044214274), where you can simply choose your fave.

Thanks!
Best way to learn HTML/CSS?

Published: 2019-10-26 16:44:32

I just graduated with a CS degree but know next to nothing about web development but feel pretty comfortable programming. Are there any good books for frond end development that aren't targeted towards complete beginners that spend too much time on tags, file types, etc...

https://openweb.vip/whatsapp-web/	https://19216801.onl/	https://routerlogin.uno/
How to use Vue Composition API using TypeScript - Part 1
Tags: vue, typescript
Published: 2019-10-26 16:28:59

As you know, Vue 3 comes with a new feature called Composition API and i'm guessing at this point we know about it, but if you want to test such feature there are some Vue Plugins that allows you to start using it right now.

At this example we are going to use these following tools:

- Vue 2.6.10
- VueCLI 4.0.5
- TypeScript 3.5.3
- @vue/composition-api
- Your favotire code editor (mine is VS Code ❤)

Let's the begin with this tutorial.


##**Setting up the project**#

In case you don't have VueCLI installed we procced to use the next command:
```
npm i -g @vue/cli
```
This will install the CLI we are using in this tutorial, to check if you have it installed use:
```
vue --version or vue -V
```

This may return with the latest build you have, in my case is: **4.0.5**

Now that we have the CLI installed, go to the directory of you preference and execute the next command:

```
vue create <give_any_name_you_want>
```

This will start the creation of the project, but before it's done we have to select few options.

Right after we entered the command, the CLI will ask us what preset we want to use, select **Manually select features** and press Enter.

After that will show up a menu with some options, we may select pressing the **Space Bar** the next options and press Enter:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ghe7e6leecn54r9brh8z.png)

**Use class-style component syntax? (Y/n)** n
According to the Vue document for Typescript, the ream recommens using the Vue.extend method instead of this one, so we select **No**

**Use Babel alongside TypeScript?** Y
We need to transpile our code to work on any browser

**Pick a linter / formatter config**: Choose the one of your preference, in my case: ESLint + Standard, but please, don't select TSLint, that one is deprecated! (https://medium.com/palantir/tslint-in-2019-1a144c2317a9).

**Additional lint features:**
Lint on save

**Placing config for Babel, Eslint, etc.?**
In dedicated config files

And if you want to save the setup, press Y and give a name to it, now we may wait until the CLI finish installing everything. After the CLI finished move into the folder, just before we start coding we need few more npm dependencies, let's move on with:

```
npm i -S axios @vue/composition-api
```

After the installation is done we are ready to begin the code!

In the next part we are preparing and coding our interface and service to be consumed in our Vue App, so be ready to code!
What's the value of x?
Tags: question, beginners, javascript
Published: 2019-10-26 16:28:15

---
title: What's the value of x?
published: true
tags: question, beginners, javascript
---

Hey, devs from all over the world. 😊

``` javascript
let x = 0;

x++;
x = x++;
x = ++x;

console.log(x);
```

What's the value of `x`? 🤔🤔
http redirect for golang http client
Published: 2019-10-26 16:14:53

I had a problem today. 

I wrote a program to send an http request to my server, and the debugger told me that the http server returned 302. However, my client program always got 400.

### today i learned

Finally, I found that golang http client ignoreed 301 and 302. The client redirected to the new location and returned the new response only.

Thanks, wireshark.

And we can prevent redirects by the following configuration:

```go
  client := &http.Client{
    CheckRedirect: func(req *http.Request, via []*http.Request) error {
      return http.ErrUseLastResponse
  } }

  resp, err := client.Get("http://www.jonathanmh.com")
```

### reference

[1] https://jonathanmh.com/tracing-preventing-http-redirects-golang/