, guess./mongod can start the server, but naturally we will first focus on such a few issues.1 The default listening port is how much, if set my own want to use the port number2 run log where to see3 where is the persisted data file4 whether there is a configuration file to support more details of the configuration
Start command
./mongod--port 27017--dbpath/mongodb/data--logpath/logs/mongodb.log-f/mongodb/s
Original: http://www.open-open.com/code/view/1456919325625ImportJava.util.Iterator;ImportJava.util.Map;ImportJava.util.Set;ImportJava.util.TreeMap;/** Count the number of occurrences of each letter in the ABACBACDADBC, the output format is: A (4) B (3) C (3) d (2) * * The reason for selecting TreeMap is: Key is not duplicated and sorted out in order * idea: * 1.
("5198c286c686eb50e2c843b5"), "name": "user3", "age": 3}
{"_ Id": ObjectId ("5198c286c686eb50e2c843b6"), "name": "user4", "age": 4}
$ Type query by Data type
Each data type in mongodb has corresponding numbers. We need to use these numbers when using $ type. The document provides the following representation:
Type Number
Double Precision 1
String 2
Object
only browsing a document is OK. N: Direct position return. Millis: Look at this time really can't believe, seconds seconds to kill. By this example, I believe you have a sensory understanding of the index. Three: Unique index As with SQL Server, you can create a unique index, and duplicate key values cannot be inserted naturally, and the use in MongoDB is as follows: Db.person.ensureIndex ({"Name": 1},{"unique": true}). Four: Combined index Somet
:> Use blog switched to DB blogInsert a collection and document:> Db.post.insert ({"Geeting": 3}); Writeresult ({"ninserted": 1})To view the databases and collections created:> Show DBS admin (empty) blog 0.078GB local 0.078GB > show Collections Post system.indexesDeleting a database> Db.dropdatabase (); {"Dropped": "blog", "OK": 1} > Show DBS admin (empty) Local 0.078GBThis article is from the "Margin with Wish" blog, please be sure to keep this sour
operations.
Backup: it is also the bin command mongodump, which is relatively simple:
Parameter description:
-H: Specifies the IP address of the Database Host.
-U: Specifies the database user name.
-P: Specifies the Database Password.
-D: Specifies the database name.
-C: Specifies the collection name.
-O: Specifies the file name to be exported.
-Q: specify the criteria for filtering the exported data.
Restore: The command mongorestore in bin
Parameter descriptio
Tags: ISP roo operation command SRC Database administration authorization min backup restore1. First download the MongoDB installation package on the Internet, I use the 3.2 version on this side; 2. Install the MongoDB Setup program, set the environment variables after installation, the installation path of my side is: "C:\Program files\mongodb\server\3.2\bin",
How to convert the format to 3 4 4 when filling in the phone number:A: When filling the mobile phone number, in the KeyUp event to determine the length, when eligible to insert a space after the value$ (' #username '). On (' KeyUp ', function (e) {var val = $ (this). Val ();//The key is deleted to perform the following judgment, otherwise deleted to the third an
1. There are 4 Threads a,B,C,D, print separately 1,2,3,4, please start them at the same time, but require to follow The sequential output of the 1234. public class TestABCThread3 {Private Object lock = new Object ();private int count;public static void Main (string[] args) {TESTABCTHREAD3 ABC = new TESTABCTHREAD3 ();New Thread (Abc.new Run ("C", 3)). Start ();New Thread (Abc.new Run ("D",
types. The following describes the mongoDB types:
1. null indicates a null value or a field that does not exist, for example, {"one": null}
2. The boolean type has two upper values: 'true' and 'false', for example, {"one": true}
3. 32-bit integers are automatically escaped because the mongoDB console uses the JS engine for input and JS only supports 64-bit float
/*************************************** ************************Computer report 1: accumulated (c)AUTHOR: liuyongshuiDATE :************************************************ ***********************//*Question 4: f = 1! -2! + 3! -4! +... + 9!
*/
# Include
# Define N 9
Void f (int m); // original function declaration
Int main (){F (N );
Return 0;}
// F () function
client for the previously active node, so it is a good way to establish a fencing command that can kill the namenode process.3) The command-line InterfaceA) You can type Hadoop fs-help to get detailed help on every command.You can use Hadoop fs–help on every command to get detailed help.b) Let's copy the file back to the local filesystem and check whether it ' s the same:% hadoop fs -copyToLocal quangle.txt quangle.copy.txt% md5 input/docs/quangle.tx
Title: There are 1, 2, 3, 4 of these 4 digits, can be composed of a number of different and no repeat number of three digits? How much are they?
Program Analysis: Can be filled in hundreds, 10 digits, single-digit numbers are 1, 2, 3, 4. Form all permutations and then remov
public class Test {public static void Main (string[] args) {Int[] A = new int[400];Int[] B = new INT[50];for (int i = 0; i A[i] = (int) (Math.random () * 50);}System.out.println ("Randomly generated array is:");for (int i:a) {System.out.print (i+ "");}for (int i = 0; i for (int j = i + 1; j > 0; j--) {if (A[j] int temp = A[j];A[J] = a[j-1];A[J-1] = temp;}}}System.out.println ("\ n the sorted array is:");for (int i:a) {System.out.print (i+ "");}for (int i = 0; I int temp = 0;for (int j = 0 + temp
1, the stack area (stacksegment)-Automatically allocated by the compiler release, stored function parameters value, local variable value, etc., the system automatically releases the JVM memory resources after the execution of the method is completed.2. Heap area (heapsegment)-typically released by programmers, storing objects and arrays created by new, the JVM does not periodically view this object, and if no reference points to the object, it is recycled3. Static zone (datasegment)-holds global
Spring 4 + jpa (hibernate 3/4) + spring mvc multi-data source configuration (2) + Druid connection pool, mvcdruid
Pick up a blog post (http://www.loveweir.com/html/18.html), no database connection pool, purely using the official link of jpa.
Therefore, we need to add the connection pool. In this article, we use the Druid connection pool to configure multiple data
Generates a random numeric password of the specified lengthGenerates a random letter password of the specified lengthGenerates a mix of random numbers and letters of a specified length#encoding =utf-8Import RandomImport stringClass Password_generator:Password_time=0def __init__ (self,length):Self.length=lengthdef digital_password (self):Password_generator.password_time+=1S= ""For I in Range (self.length):S+=str (Random.randint (0,9))return s@classmethoddef letter_password (cls,length):Password_g
Next to a blog post, there is no database connection pool, purely with the official JPA link. So this time we're going to add a connection pool. This article uses Druid Connection pool to implement multi-data source configuration. Persistence.xml This file can be omitted, all configured in Applicationcontext.xml: other places do not need to be changed by the last configuration. That's good. reprinted from: Http://www.loveweir.com/html/19.htmlSpring 4
Regular Expression of phone number (mobile phone number, 3-4 area code, 7-8 live video number, 1-4 extension code)
(\ D {11}) | ^ (\ d {7, 8}) | (\ d {4} | \ d {3})-(\ d {7, 8 }) | (\ d {4} | \ d {
2 GB, the 64-bit platform does not have this restriction. If this error is also reported on the 64-bit platform, it is generally caused by insufficient virtual memory. You can edit the/etc/profile file and add it to ulimit-v unlimited. Use source/etc/profile to make the setting take effect or restart it to take effect.
2. The oplog size does not have much to do with the memory. The oplogSize is equivalent to the binlog of the mysql database. The data copied from the database is read from the o
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.