Most Useful Google Chrome Browser chrome:// Commands

















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


React for beginners


Quick Crash Course is here..
View story at
View story at

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:{"firstName":"Alvin", "lastName":"Alexander"})

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


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

>{"firstName":"Alvin", "lastName":"Alexander"})

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

> db

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: <>
PREFIX wds: <>
PREFIX wdv: <>
PREFIX wdt: <>
PREFIX wikibase: <>
PREFIX p: <>
PREFIX ps: <>
PREFIX pq: <>
PREFIX rdfs: <>
PREFIX bd: <>

# 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 .
     ?s rdfs:label ?desc filter (lang(?desc) = "en").



Label service

You can fetch the label, alias, or description of entities you query, with language fallback, using the specialized service with the URI <>. 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: <>
 SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .