Skip to content

Instantly share code, notes, and snippets.

Document.find({user-id: 10, money: {$gt: 20}}, function() {
collection.on("add", function(item) {
console.log(item.money) //40
})
Document.create({user-id:10, money: 40}) //collection should call onAdd and contain the new document automagically
}
import java.awt.geom.Line2D;
import java.util.ArrayList;
import java.util.Random;
public class Polygon {
private ArrayList<Point> points = new ArrayList<Point>();
public static void main(String[] args) {
Polygon poly = new Polygon();
poly.randomPolygon();