This file contains hidden or 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
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 | |
} |
This file contains hidden or 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
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(); |
NewerOlder