This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.ConnectionString; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import javax.net.ssl.SSLContext; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.function.Consumer; | |
public class ProgrammaticMongoClientSettingsConfiguration { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoCollection; | |
import com.mongodb.client.model.Filters; | |
import com.mongodb.client.model.Updates; | |
import com.mongodb.event.CommandListener; | |
import com.mongodb.event.CommandStartedEvent; | |
import org.bson.BsonArray; | |
import org.bson.BsonDocument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mongodb; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.connection.ClusterDescription; | |
import com.mongodb.event.ClusterDescriptionChangedEvent; | |
import com.mongodb.event.ClusterListener; | |
import org.bson.Document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.ConnectionString; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.connection.SocketSettings; | |
import com.mongodb.connection.SocketStreamFactory; | |
import com.mongodb.connection.SslSettings; | |
import com.mongodb.connection.StreamFactory; | |
import com.mongodb.connection.StreamFactoryFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2023 MongoDB, Inc. | |
*/ | |
import com.mongodb.AutoEncryptionSettings; | |
import com.mongodb.ClientEncryptionSettings; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoDatabase; | |
import com.mongodb.client.model.vault.EncryptOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.ConnectionString; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.MongoException; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoDatabase; | |
import org.bson.Document; | |
public class MongoClientConnectionExample { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.ConnectionString; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.MongoException; | |
import com.mongodb.ServerApi; | |
import com.mongodb.ServerApiVersion; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoDatabase; | |
import org.bson.Document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dictionary = open('/usr/share/dict/words') | |
letters = ['n', 'j', 'u', 'l', 'r', 'o', 'a'] | |
center = 'a' | |
def contains_bad_letters(word): | |
for letter in word: | |
if letter not in letters: | |
return True | |
return False |
NewerOlder