using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
#MongoDB 3.2.x Replica Sets on AWS EC2 A MongoDB replica set provides a mechanism to allow for a reliable database services. The basic replica set consists of three servers, a primary, a secondary and an arbitrator. The primary and secondary both hold a copy of the data. The arbitrator is normally a low spec server which just monitors the other servers and help with the failover process. In production, there can be more than three servers.
To setup mongo as a replica set on Amazon Web Services EC2 you need to first setup a security group with ssh on port 22 and mongodb on port 27017. You then need to create three servers. Select Ubuntu 14.04 LTS x64 and a micro (or bigger depending on your database size, ideally you should have enough memory to match your database size) instance for the primary and secondary and a nano instance for the arbitrator.
##Adjust the File System on each Server The operating system by default will update the last access time on a file. In a high data throughput database application
Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
package main | |
import "fmt" | |
func main() { | |
var n int | |
fmt.Scan(&n) | |
for i := 1; i <= n; i++ { | |
for j := 0; j < n-i; j++ { |
m1 = Matrix([[1,1],[2,2]]) | |
# | |
print m1 | |
#result: | |
# | |
#| 1 1 | | |
#| 2 2 | | |
m2 = Matrix([[1,1],[1,1]]) |
- diojarn.go => Main file. It detects databases, checks URL is valid, make connection between other files.
- database.go => Database file. It creates/deletes databases, adds columns to them.
- ping.go => Ping file. It sends ping (ICMP) packet to target URL and returns datas like response time, response code, date, URL status (up or down)
- server.go => Server file. It opens a web server in local network, displays websites and their data in their databases.
- Main file (diojarn.go)