Purpose : To show how to display the statistics for a particular database.

db_stats.js

mongo=new Mongo(“localhost”);

myDB=mongo.getDB(“admin”);

stats=myDB.stats();

printjson(stats);

Purpose : How to create new Collection.

collection_create.js

mongo=new Mongo(“localhost”);

newDB=mongo.getDB(“newDB”);

collections=newDB.getCollectionNames();

print(“Initial Collections: “);

printjson(collections);

newDB.createCollection(“newCollectionA”);

newDB.createCollection(“newCollectionB”);

print(“After Collection Creation:”);

collections=newDB.getCollectionNames();

printjson(collections);

**Purpose**: To show you how to create User and Database Administrator accounts and enable authentication on your MOngoDB server.

For create Administrator account

Step:1 Create file name :add_admin_account.js

mongo=new Mongo(“localhost”);

db=mongo.getDB(“admin”);

db.addUser({

user:”dbadmin”,

pwd:”test”,

roles:[“readWriteAnyDatabase”,

“dbAdminAnyDatabase”,

“clusterAdmin”]

});

db.addUser({

user:”useradmin”,

pwd:”test”,

roles:[“userAdminAnyDatabase”]

})

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Now allow only authenticate user,

Create file with name : mongod_config_auth.txt

verbose=true

port=27017

dbpath=I:\mongo\

auth=true

After config the file write below command in shell

It will show error msg which indicate you have not permission to access user detail.

Now we add authentication using username and password using

db.auth(“<username>”,”<password>”)

Step 1:

Write this code in add_user.js file

mongo = new Mongo(“localhost”);

db = mongo.getDB(“test”)

db.addUser({

user : “tsetAdmin” ,

pwd : “test” ,

roles : [“dbadmin”]

});

db.addUser({

user : “tsetWriter” ,

pwd : “test” ,

roles : [“readWrite”]

});

db.addUser({

user : “tsetReader” ,

pwd : “test” ,

roles : [“read”]

});

db = mongo.getDB(“admin”)

db.addUser({

user : “tsetUser”,

userSource:”test”,

roles:[“read”],

otherDBRoles:{test:[“readWrite”]}

});

Step 2:

Create running environment of mongodb. [Previous Tutorial]

Step 3:

Step 1:

set path using command [Tutorial 1]

Step 2:

write in shell : mongo.exe in path of bin folder

for use specific user databse write use <username>

Make one javascript file : shell_script.js

print(“Host Name”);

print(“\t”+hostname());

print(“Date”);

print(“\t”+Date());

db=connect(“localhost/admin”);

print(“Amdin Collections: “);

printjson(db.getCollectionNames());

Save in DBpath directory

Practical 1 : Show Host name , Date and Total no of collection in database

Second Method to execute .js file

Four category of Design Pattern:

- Creational Pattern
- Structural Pattern
- Behavior Pattern : Used for Communication between object
- J2EE Pattern

Method:1

Download “Lunch4j.exe” from internet and install it

https://www.youtube.com/watch?v=XITTQGD8V1s

Method:2

Download Advanced Installer from site

http://blog.capterra.com/free-open-source-project-management-software/

http://www.capterra.com/project-management-software/spotlight/56808/Basecamp/Basecamp

http://www.capterra.com/project-management-software/spotlight/74048/RationalPlan/Stand%20By%20Soft

http://www.creativebloq.com/software/best-project-management-71515632

http://computer.howstuffworks.com/bios.htm

http://computer.howstuffworks.com/internet/tips/information-about-me-online-.htm

https://docs.oracle.com/cd/E19269-01/820-5830-13/app_bios.html

http://www.bcot1.com/bios1.html

http://www.howtogeek.com/howto/the-geek-blog/building-a-new-computer-part-3-setting-it-up/

http://www.wikihow.com/Change-Computer-BIOS-Settings

https://developers.google.com/speed/pagespeed/?hl=en

http://www.websiteoptimization.com/services/analyze/

One trick is Using Cache,

http://www.webdesignerdepot.com/2015/11/dynamic-sites-at-static-speed-the-art-of-website-caching/

https://kinsta.com/learn/page-speed/

https://moz.com/blog/15-tips-to-speed-up-your-website

http://conversionxl.com/11-low-hanging-fruits-for-increasing-website-speed-and-conversions/

Check your download folder

http://www.sitepoint.com/top-5-material-design-frameworks-use-2015/

http://www.cssauthor.com/material-design-resources/

http://www.sketchappsources.com/free-source/874-material-design-google-sketch-freebie-resource.html

Try download this

https://polymerthemes.com/golden-goose/

http://materialdesignblog.com/5-free-material-design-templates-that-will-grab-their-attention/

http://materialdesignthemes.com/

http://responsivetemplates.co/material-design-html5-templates-free-download/

Is A??

Ask this is a this ? or not

Example:

Is a Dog an Animal???

Is a Dog a Cat??

Has A??

Ask this has a this ? or not

Example:

Dog has a Height??

There are broadly 4 ways in which classification of algorithms can be done.

__Classification by purpose__

Each algorithm has a goal, for example, the purpose of the Quick Sort algorithm is to sort data in ascending or descending order. But the number of goals is infinite, and we have to group them by kind of purposes.

2. __Classification by implementation__

**Recursive**or**iterative**

A recursive algorithm is one that calls itself repeatedly until a certain condition matches. It is a method common to functional programming.

For example, the towers of hanoi problem is well understood in recursive implementation. Every recursive version has an iterative equivalent iterative, and vice versa.

**Logical**or**procedural**

An algorithm may be viewed as controlled logical deduction.

A logic component expresses the axioms which may be used in the computation and a control component determines the way in which deduction is applied to the axioms.**Serial**or**parallel**Algorithms are usually discussed with the assumption that computers execute one instruction of an algorithm at a time. This is a serial algorithm, as opposed to parallel algorithms, which take advantage of computer architectures to process several instructions at once.**Sorting algorithms**can be parallelized efficiently.

**Deterministic**or**non-deterministic**

Deterministic algorithms solve the problem with a predefined process whereas non-deterministic algorithm must perform guesses of best solution at each step through the use of heuristics.

3. __Classification by design paradigm__

**Divide and conquer**

A divide and conquer algorithm repeatedly reduces an instance of a problem to one or more smaller instances of the same problem (usually recursively), until the instances are small enough to solve easily. One such example of divide and conquer is merge sorting. The binary search algorithm is an example of a variant of divide and conquer called**decrease and conquer algorithm**, that solves an identical subproblem and uses the solution of this subproblem to solve the bigger problem.**Dynamic programming**

The shortest path in a weighted graph can be found by using the shortest path to the goal from all adjacent vertices.

When the optimal solution to a problem can be constructed from optimal solutions to subproblems, using**dynamic programming avoids recomputing solutions**that have already been computed.

– The main difference with the “divide and conquer” approach is, subproblems are independent in divide and conquer, where as the overlap of subproblems occur in dynamic programming.

– Dynamic programming and**memoization**go together. The difference with straightforward recursion is in caching or memoization of recursive calls. Where subproblems are independent, this is useless. By using memoization or maintaining a table of subproblems already solved, dynamic programming reduces the exponential nature of many problems to polynomial complexity.**The greedy method**

A greedy algorithm is similar to a dynamic programming algorithm, but the difference is that solutions to the subproblems do not have to be known at each stage. Instead a “greedy” choice can be made of what looks the best solution for the moment.

The most popular greedy algorithm is finding the minimal spanning tree as given by**Kruskal**.**Linear programming**

The problem is expressed as a set of linear inequalities and then an attempt is made to maximize or minimize the inputs. This can solve many problems such as the maximum flow for directed graphs, notably by using the simplex algorithm.

A complex variant of linear programming is called**integer programming**, where the solution space is restricted to all integers.**Reduction**also called**transform and conquer**

Solve a problem by transforming it into another problem. A simple example:**finding the median**in an unsorted list is first translating this problem into sorting problem and finding the middle element in sorted list. The main goal of reduction is finding the simplest transformation possible.**Using graphs**

Many problems, such as playing chess, can be modeled as problems on graphs. A graph exploration algorithms are used.

This category also includes the search algorithms and backtracking.**The probabilistic and heuristic paradigm**

**Probabilistic**

Those that make some choices randomly.**Genetic**

Attempt to find solutions to problems by mimicking biological evolutionary processes, with a cycle of random mutations yielding successive generations of “solutions”. Thus, they emulate reproduction and “survival of the fittest”.**Heuristic**

Whose general purpose is not to find an optimal solution, but an approximate solution where the time or resources to find a perfect solution are not practical.

__________________________________________________________________

You can look at Algorithms Repository

1. **Searching and sorting algorithms** –

Sorting algorithms include Quicksort , Merge sort, Heapsort, Bubble sort,Insertion sort, Radix sort. Other imp soting algorithms are Topological sort, Counting sort, Shell sort

A comprehensive list can be found here.

Important searching algorithms include breadth/ depth first search, binary search etc.

2. **Dynamic Programming** — To name a few DP problems, Longest Common Subsequence problem, Knapsack, travelling salesman problem etc. A list of dynamic programming algorithms can be found here.

3. **Graph algorithms** — Important graph algorithms are Dijkstra,

daqwest.com

Prim, Kruskal, Bellman-Ford. A comprehensive list can be found here.

Step:1

Download Gradle ZIP file from this site.

https://services.gradle.org/distributions

Step: 2

Set “Project” view in android Studio.

Step: 3

Expand gradle (do not expand .gradle)

Step: 4

Paste your Gradle ZIP file in Wrapper folder

Step: 5

Change “distributionUrl” to your gradle zip text

```
#Sun Jan 11 01:47:43 CST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=gradle-2.2.1-all.zip
Step: 6
Rebuild the Project . It will solve your Problem.
```

https://github.com/PhilJay/MPAndroidChart

https://github.com/vdesmet93/holo-calendar-sample

https://github.com/roomorama/Caldroid

https://github.com/antonyt/InfiniteViewPager

https://github.com/roomorama/Caldroid/releases/tag/eclipse_project

Site for Library for Android app

https://android-arsenal.com/details/3/2731 http://alamkanak.github.io/android-libraries-and-resources/