This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
class Solution { | |
public: | |
bool validTree(int n, vector<pair<int, int>>& edges) { | |
vector<int> group(n + 1, -1); | |
for(auto e : edges){ | |
int x = find(group, e.first); | |
int y = find(group, e.second); | |
if (x == y) return false; | |
group[x] = y; |
#include <iostream> | |
#include <string> | |
using namespace std; | |
string trim(string& str) | |
{ | |
size_t first = str.find_first_not_of(' '); | |
size_t last = str.find_last_not_of(' '); | |
return str.substr(first, (last-first+1)); |
#include <string> | |
#include <sstream> | |
#include <iostream> | |
#include <vector> | |
std::vector<std::string> split(const std::string &s, char delim) { | |
std::vector<std::string> elems; | |
std::stringstream ss; | |
ss.str(s); | |
std::string item; |
nc -zv my.nfs.server.ip 111 2049 |
// Change mydb.mycollection to your target ns | |
var result = db.currentOp(); | |
result.inprog.filter(function(p){return p.ns === 'mydb.mycollection';}).map(function(p){return p.opid >= 0 ? p.opid : Math.pow(2,32) + p.opid;}).forEach(function(pid){ db.killOp(pid);}); |