mongorestore --db mydb mydb.dump.2016-08-27_12:44/mydb --drop --gzip
This command will first drop your current 'mydb' database and then restore your gzipped bson dump from the 'mydb mydb.dump.2016-08-27_12:44/mydb' archive dump file.
Installing typescript, typings and webpack globally
npm install -g typescript typings webpack
Installing loaders and linking typescript
npm install --save-dev ts-loader source-map-loader npm link typescript
Linking TypeScript allows ts-loader to use your global installation of TypeScript inste...
1.Download font-awesome from here.
2.Copy the font-awesome directory into your project.
3.In the of your html, reference the location to your font-awesome.min.css.
<link rel="stylesheet" href="path/to/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet"...
Suppose we want to have the following behaviour - We have a heading (say h3 element) and on clicking it, we want it to become an input box so that we can modify heading name. React makes this highly simple and intuitive using component states and if else statements. (Code explanation below)
// I ha...
When you are getting started with ElasticSearch (ES) it might be good to have a graphical tool that helps you explore your data. A plugin called elasticsearch-head does just that. To install it, do the following:
Find out in which folder ES is installed: ls -l $(which elasticsearch)
cd into this...
ElasticSearch has a well-documented JSON API, but you'll probably want to use some libraries that handle that for you:
Elasticsearch - the official low level wrapper for the HTTP API
Elasticsearch-rails - the official high level Rails integration that helps you to connect your Rails models...
FOR XML PATH and STUFF to concatenate the multiple rows into a single row:
select distinct t1.id,
STUFF(
(SELECT ', ' + convert(varchar(10), t2.date, 120)
FROM yourtable t2
where t1.id = t2.id
FOR XML PATH (''))
, 1,...
Navs available in Bootstrap have shared markup, starting with the base .nav class, as well as shared states. Swap modifier classes to switch between each style.
Tabs
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#&quo...
ML Transformers now generates org.apache.spark.ml.linalg.VectorUDT instead of org.apache.spark.mllib.linalg.VectorUDT.
They are also mapped locally to subclasses of org.apache.spark.ml.linalg.Vector. These are not compatible with old MLLib API which is moving towards deprecation in Spark 2.0.0.
//...
The Firebase auth system is the source of a users uid, displayName, photoURL, and maybe email. Password based accounts set these persistent values in the auth system via the .updateProfile method. Storing these values in the Realtime Database, rDB, users node poses the issue of stale data. Displa...