node-mongodb-native

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-16 23:28:14

软件介绍

这是 MongoDB 官方提供的 Node.js 的驱动包,示例代码:

var client = new Db('test', new Server("127.0.0.1", 27017, {})),
    test = function (err, collection) {
      collection.insert({a:2}, function(err, docs) {

        collection.count(function(err, count) {
          test.assertEquals(1, count);
        });

        // Locate all the entries using find
        collection.find().toArray(function(err, results) {
          test.assertEquals(1, results.length);
          test.assertTrue(results[0].a === 2);

          // Let's close the db
          client.close();
        });
      });
    };

client.open(function(err, p_client) {
  client.collection('test_insert', test);
});

本文地址:https://codercto.com/soft/d/3746.html

极简人工智能

极简人工智能

[英] 理查德·温 / 有道人工翻译、吴乔 / 电子工业出版社 / 2018-3-1 / 50

本书以通俗的语言和生动的案例带领你探索人工智能的世界,全面展示人工智能的概念、理论框架与应用价值,探讨人工智能的过去和将来,是一本深入浅出的人工智能通识书。从蚂蚁习性谈到股票市场,本书将带领你开启人工智能的奇幻之旅。一起来看看 《极简人工智能》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

SHA 加密
SHA 加密

SHA 加密工具