This will guide you through setting up a replica set in a docker environment using.
- Docker Compose
- MongoDB Replica Sets
- Mongoose
- Mongoose Transactions
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
This will guide you through setting up a replica set in a docker environment using.
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
| import math | |
| import json | |
| # data.json content | |
| # [ | |
| # { | |
| # "Row": 196, | |
| # "SpecialUnitOwner": "متن تست(0.02) متن تست بیشتر (0.98)", | |
| # "DateKey": "20220626" | |
| # }, |
| // Json Input | |
| { | |
| "num": 1.3990102E7 | |
| } | |
| // Jolt Spec | |
| [ | |
| { | |
| "operation": "modify-overwrite-beta", | |
| "spec": { |
| services: | |
| selenium: | |
| image: selenium/standalone-chrome | |
| container_name: selenium | |
| ports: | |
| - 4444:4444 | |
| networks: | |
| - share-network | |
| environment: | |
| - SE_NODE_MAX_SESSIONS=10 |
| import time | |
| from bs4 import BeautifulSoup | |
| from selenium import webdriver | |
| from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.common.keys import Keys | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.support.ui import Select | |
| remote_driver_url = r'http://127.0.0.1:4444/wd/hub' # remote selenium driver |
| def get_guery(is_add, db, schema, table, columns): | |
| query = f"USE {db}" | |
| func_type = "add" if is_add == True else "update" | |
| # Table description | |
| query += f"\n\nEXEC sp_{func_type}extendedproperty" | |
| query += f"\n @name = N'MS_Description', @value = '{table[1]}'," | |
| query += f"\n @level0type = N'Schema', @level0name = '{schema}'," | |
| query += f"\n @level1type = N'Table', @level1name = '{table[0]}';" |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
| const downloadPdfFromBlob = blobData => { | |
| const file = new Blob([blobData], { type: 'application/pdf' }) | |
| const fileURL = URL.createObjectURL(file) | |
| window.URL.revokeObjectURL(fileURL) | |
| } |
| [ | |
| {name: "تهران", englishName: "Tehran", icaoCode: "OIII", iataCode: "THR"}, | |
| {name: "مشهد", englishName: "Mashhad", icaoCode: "OIMM", iataCode: "MHD"}, | |
| {name: "اهواز", englishName: "Ahvaz", icaoCode: "", iataCode: "AWZ"}, | |
| {name: "گرگان", englishName: "Gorgan", icaoCode: "OING", iataCode: "GBT"}, | |
| {name: "جزیره کیش", englishName: "Kish Island", icaoCode: "OIBK", iataCode: "KIH"}, | |
| {name: "شیراز", englishName: "Shiraz", icaoCode: "OISS", iataCode: "SYZ"}, | |
| {name: "آبادان", englishName: "Abadan", icaoCode: "OIAA", iataCode: "ABD"}, | |
| {name: "جزیره ابوموسی", englishName: "Abu Musa Island", icaoCode: "", iataCode: "AEU"}, | |
| {name: "اراک", englishName: "Arak", icaoCode: "", iataCode: "AJK"}, |