View Program.cs
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
using System; | |
using MongoDB.Bson; | |
using MongoDB.Driver; | |
namespace MongoDBCRUDExample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
View Program.cs
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
using System; | |
using MongoDB.Bson; | |
using MongoDB.Driver; | |
namespace MongoDBCRUDExample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
View Program.cs
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
using System; | |
using MongoDB.Bson; | |
using MongoDB.Driver; | |
namespace MongoDBCRUDExample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
View app.py
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
from pymongo import MongoClient | |
import datetime | |
client = MongoClient('localhost', 27017) | |
db = client['advocacy-hub-db'] | |
collection = db['pyMongo'] |
View temp_sensor.py
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
from machine import ADC | |
adc = ADC(0) # assign to the analog to digital 0 pin | |
adc.read() # returns TMP 36 value | |
def temp(value): | |
return value/10 |
View mongodb_crud.py
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 pprint | |
from pymongo import MongoClient | |
__author__ = 'Ken W. Alger' | |
HOST = 'localhost' | |
PORT = 27017 |
View MongoJava.java
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.ErrorCategory; | |
import com.mongodb.MongoClient; | |
import com.mongodb.MongoClientURI; | |
import com.mongodb.MongoWriteException; | |
import com.mongodb.client.MongoCollection; | |
import com.mongodb.client.MongoCursor; | |
import com.mongodb.client.MongoDatabase; | |
import com.mongodb.client.model.Filters; | |
import org.bson.Document; |