Most Useful Google Chrome Browser chrome:// Commands

chrome://flags

chrome://dns

chrome://memory

chrome://net-internals

chrome://quota-internals

chrome://sync-internals

chrome://sessions

chrome://settings

chrome://downloads

chrome://extensions

chrome://bookmarks

chrome://history

chrome://version/

chrome://about/

 

Finally, to view all the available chrome:// commands, type chrome://about/ in your chrome browser URL as shown below.

Advertisements

React for beginners

Lifecycle:

Quick Crash Course is here..

https://medium.freecodecamp.org/rock-solid-react-js-foundations-a-beginners-guide-c45c93f5a923

https://engineering.opsgenie.com/i-wish-i-knew-these-before-diving-into-react-301e0ee2e488
https://medium.freecodecamp.org/rock-solid-react-js-foundations-a-beginners-guide-c45c93f5a923
View story at Medium.com
View story at Medium.com

How to create a MongoDB database and collection

MongoDB FAQ: How do I create a MongoDB database?

To create a MongoDB database, follow these steps:

  1. “Use” the database.
  2. Create a collection in the database.
  3. Verify that you got what you wanted.

Short example

For example, to “use” a database named pizzas, start your mongo client and then issue this command:

use pizzas

Next, create a collection in this database. For instance, create a document in a customers collection like this:

db.customers.save({"firstName":"Alvin", "lastName":"Alexander"})

Next, verify that your document was created with this command:

db.customers.find()

You should see output from MongoDB showing that your document was created.

Complete example

Here’s what this looks like when I try it with my own MongoDB installation, including my commands and the output from MongoDB:

> use pizzas
switched to db pizzas

> db
pizzas

> db.customers.save({"firstName":"Alvin", "lastName":"Alexander"})

> db.customers.find()
{ "_id" : ObjectId("520e3cebf2b2417375cbc438"), "firstName" : "Alvin", "lastName" : "Alexander" }

> db
pizzas

Notice that I used the db command twice, and it showed I am in the pizzas database. After issuing these commands I can also issue the MongoDB show dbs command, and it shows my new pizzas database:

> show dbs
finance	0.203125GB
local	(empty)
pizzas	0.203125GB   <== the new 'pizzas' database
test	0.203125GB

If you needed to create a new MongoDB database, I hope these examples have been helpful.

Source: alvinalexander

Wikidata Sparql Query Tutorial

What is SPARQL?

SPARQL, pronounced ‘sparkle’, is the standard query language and protocol for Linked Open Data on the web or in a semantic graph database (also called RDF triplestore). Eg: Wikipedia is a linked open data

SPARQL, short for “SPARQL Protocol and RDF Query Language”, enables users to query information from databases or any data source that can be mapped to RDF.

Basics – Understanding Prefixes

Wikidata Query Service (WDQS) is a software package and public service designed to provide a SPARQL endpoint which allows you to query against the Wikidata data set.

WDQS understands many shortcut abbreviations, known as prefixes.

Some are internal to Wikidata

wd, wdt, p, ps, bd, etc.

and many others are commonly used external prefixes, like

rdf, skos, owl, schema, etc.

?s is a prefix for a statement, or triple, or you could even think of it as the subject in an spo triple.

In the following query, we are asking for items where there is a statement of “P279 = Q7725634” or in fuller terms, selecting subjects that have a predicate of “subclass of” with an object of = “literary work”.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wdv: <http://www.wikidata.org/value/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>

# The below SELECT query does the following:
# Selects all the items(?s subjects) and their descriptions(?desc)
# that have(WHERE) the statement(?s subject) has a direct property(wdt:) = P279 <subclasses of>
# with a value of entity(wd:) = Q7725634 <Literary Work>
# and Optionally return the label and description using the Wikidata label service

SELECT ?s ?desc WHERE {
  ?s wdt:P279 wd:Q7725634 .
  OPTIONAL {
     ?s rdfs:label ?desc filter (lang(?desc) = "en").
   }
 }

 

More: https://en.wikibooks.org/wiki/SPARQL/Prefixes

https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual

Label service

You can fetch the label, alias, or description of entities you query, with language fallback, using the specialized service with the URI <http://wikiba.se/ontology#label>. The service is very helpful when you want to retrieve labels, as it reduces the complexity of SPARQL queries that you would otherwise need to achieve the same effect.

The service can be used in one of the two modes: manual and automatic.

In automatic mode, you only need to specify the service template, e.g.:

 PREFIX wikibase: <http://wikiba.se/ontology#>
 SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
 }