Run the following command first to start the mongo servermongod run --config /usr/local/etc/mongod.confAssuming you installed mongo usingBrew.More inf...
分类:
数据库 时间:
2014-08-26 00:10:15
阅读次数:
554
node.js 中使用mongodb,首先 npm install mongodb 添加至 package.json。首先编写个测试demo:// mongodb 基本配置var mongodb = require('mongodb');var server = new mongodb.Server...
分类:
数据库 时间:
2014-08-25 18:39:24
阅读次数:
276
Centos 下安装MongoDB一、安装方法方法(一)1 配置包管理系统创建/etc/yum.repos.d/mongodb.repo文件,当然我们使用的是64位系统,32位的情况不再考虑。文件内容为:[mongodb]name=MongoDB Repositorybaseurl=http://d...
分类:
数据库 时间:
2014-08-25 16:50:54
阅读次数:
343
MongDB 下载:http://www.mongodb.org/下载后将安装包解压并放置在你希望的目录中。 如放置在G盘根目录并重命名为 mongdb。在《MongoDB权威》一书中提到,mongodb默认把 C:\data\db 作为数据目录。可以创建这个目录,或者在系统任意其他位置创建自己的目...
分类:
数据库 时间:
2014-08-25 16:45:04
阅读次数:
251
//二分法查询 Console.Write("请输入数据个数:"); int n = Convert.ToInt32(Console.ReadLine()); int[] no = new int[n]; ...
分类:
其他好文 时间:
2014-08-25 13:16:04
阅读次数:
201
1)、若启用Mongodb需要删除KEY分别为be90a668d9f2eb1950bae1bf6b0835ce939e64939c3f65cfb646e7948c5b80df58dc0a277a6abbb44f7c5c193a2936d8的三个值2)、若使用默认文件存储请删除data kvstore...
分类:
其他好文 时间:
2014-08-25 13:08:54
阅读次数:
137
缓冲的几个基本概念
缓冲的作用:减少系统read和write的次数。
全缓冲
系统标准I/O缓冲区被写满时才进行真正的I/O操作。
磁盘文件一般使用全缓冲
全缓冲使用malloc来分配缓冲区
行缓冲
系统遇到换行符时进行真正的I/O操作。
Te...
分类:
其他好文 时间:
2014-08-25 11:57:14
阅读次数:
214
这几天在看mongdb官网,然后经运行插入数据,突然发现这个数据确实很强大,这里用数据说话,我用的普通pc机,amd的双核 2.7GHz,4G内存,当然在测试的时候系统不是只作为数据库服务器的,还运行了myeclipse,qq,杀毒软件什么的,当然在测试的时候cpu大约是95%的负载
具体什么结果呢?
刚开始测的时候,没注意,一下启动了10个线程,每个线程插10000条数据,结果,系统不堪负载...
分类:
数据库 时间:
2014-08-25 01:13:23
阅读次数:
393
//降序排序 Console.Write("请输入数据的个数:"); int n = Convert.ToInt32(Console.ReadLine()); int []sz=new int[n]; ...
分类:
其他好文 时间:
2014-08-25 01:02:03
阅读次数:
267
namespace ConsoleAppSyncDownload{ class Program { static void Main(string[] args) { WebClient webClient = new WebClient(); //Console.Write("输入下载文件地址:"...
分类:
Web程序 时间:
2014-08-24 23:44:53
阅读次数:
309