我是 mongoDB 的新手并且有一个免费的 Atlas 帐户。但是,我在 mongo 导入方面遇到了问题。
系统:窗户
>mongo --version
MongoDB shell version v4.2.0
git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
allocator: tcmalloc
modules: none
build environment:
distmod: 2012plus
distarch: x86_64
target_arch: x86_64
Run Code Online (Sandbox Code Playgroud)
mongoimport 字符串:
mongoimport --host Cluster0-shard-0/cluster0-shard-00-00-MY.mongodb.net:27017,cluster0-shard-00-01-MY.mongodb.net:27017,cluster0-shard-00-02-MY.mongodb.net:27017 --ssl --username MYUSER --password MYPASS --authenticationDatabase admin --db db --collection coll --type json --file D:\downloads\records.json
Run Code Online (Sandbox Code Playgroud)
但我不断收到此错误:
2019-09-28T15:40:33.108-0600 WARNING: ignoring unsupported URI parameter 'replicaset'
2019-09-28T15:40:33.933-0600 connected to: mongodb://cluster...
2019-09-28T15:40:34.076-0600 Failed: cannot decode array into a D
2019-09-28T15:40:34.076-0600 0 document(s) imported successfully. 0 document(s) failed to import.
Run Code Online (Sandbox Code Playgroud) 字符串格式在命令行中格式正常,但在带有标签的gui中它完全关闭.我认为我的格式是正确的
例:
码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DisplayMultiplicationTableGUI
{
public partial class Form1 : Form
{
int i, j;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = String.Format("{0,3}", " ");
for (i = 1; i <= 10; i++)
label1.Text += String.Format(" {0,3}", (i).ToString());
for (i = 1; i <= 10; i++)
label2.Text += String.Format("\n{0,3} ", (i).ToString());
for (i = …
Run Code Online (Sandbox Code Playgroud) 我需要帮助,我已经厌倦了所有我可以打破循环,但它一直显示打印出来的else语句.我试图找出如何通过数组登录,我没有成功.伤心.
主要方法登录
import java.util.*;
public class LogIn {
public static void main(String[] args) {
Person [] people = new Person[2];
people[0] = new Person("Heather","Ward","Davis");
people[1] = new Person("Thomas","Cummings","Tomc84");
Scanner input = new Scanner(System.in);
String current_login = "";
String pass = "";
int login_count = 3;
//do{
System.out.print("Enter your name: ");
current_login = input.nextLine();
System.out.print("\nEnter your password: ");
pass = input.nextLine();
outerloop:
for (Person p: people){
if(current_login.equals(p.getF_name()) && pass.equals(p.getPassword())){
System.out.println("\nHello " + p.getF_name() + " " + p.getL_name());
break outerloop;
} …
Run Code Online (Sandbox Code Playgroud)