const filterQuery = JSON.stringify({
from: fromDate,
to: toDate,
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
#!/bin/sh | |
GOOS=linux GOARCH=amd64 go build |
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 main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func handleFunc(w http.ResponseWriter, r *http.Request) { |
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
db.getCollection('person_report').aggregate([ | |
{ | |
$match: { | |
_id: {$in: [ObjectId("5995d36e61e71c54a042d859")]}, | |
roles: { | |
$elemMatch: { | |
roleId: {$in: [ObjectId("599586c861e71c54a042d84b")]}, | |
"production.eventDate": {$gte: ISODate("2019-01-02T17:00:00.000Z")}, | |
"production.eventDate": {$lte: ISODate("2017-01-02T17:00:00.000Z")}, | |
} |
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
/* 1 */ | |
{ | |
"_id" : ObjectId("5c1753e5031c3203d79eecd8"), | |
"firstName" : "Brenna", | |
"lastName" : "Schaffell", | |
"kind" : "freelancer", | |
"roles" : [ | |
{ | |
"productionId" : ObjectId("5bfc605e031c3203d79edab9"), | |
"roleId" : ObjectId("5995ff2061e71c54a042d86b"), |
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
db.getCollection('persons').aggregate([ | |
{ | |
$lookup: { | |
localField: "_id", | |
foreignField: "staffId", | |
from: "production_staff", | |
as: "staff_roles", | |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
using namespace std; | |
struct Seq | |
{ | |
char c; | |
long long length; |
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
const query = [ | |
{ | |
$lookup: { | |
localField: '_id', | |
foreignField: 'productionId', | |
from: 'production_lead', | |
as: 'production_lead' | |
} | |
}, | |
{ |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
struct Line | |
{ | |
long int a,b; | |
long long length; |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
struct Line | |
{ | |
long int a,b; | |
long long length; |