Mongodb aggregation pipeline how to limit a group push

Suppose the bottom left coordinates and the upper right coordinates are respectively [0, 0] and [100, 100]. From MongoDB 3.2 you can use the $slice operator to return a subset of an array which is what you want. db.collection.aggregate([ { “$match”: { “loc”: { “$geoWithin”: { “$box”: [ [0, 0], [100, 100] ] } }} … Read more

Remove the limit clause from MySQL Workbench

You can toggle the LIMIT clause added by MySQL Workbench via the SQL Editor tab within the application preferences (Edit menu -> Preferences…). Simply un-check the “Limit Rows” option within the Query Results section as pictured below. EDIT: In Workbench 6.0, the “Limit Rows” checkbox stands in “SQL Queries” tab (new tab of the same … Read more

How to set nginx max open files?

On CentOS (tested on 7.x): Create file /etc/systemd/system/nginx.service.d/override.conf with the following contents: [Service] LimitNOFILE=65536 Reload systemd daemon with: systemctl daemon-reload Add this to Nginx config file: worker_rlimit_nofile 16384; (has to be smaller or equal to LimitNOFILE set above) And finally restart Nginx: systemctl restart nginx You can verify that it works with cat /proc/<nginx-pid>/limits.

Limit on number of git branches

Yes, branches are free. Branching and merging is very easy. The scalability issues mentioned before comes only when synchronizing a vast amount of branches through the network (git fetch, git pull, git push). Locally you shouldn’t have any problem.

Limiting a doctrine query with a fetch-joined collection?

Paginate was merged with doctrine 2.2 And the new symfony2 release 2.0.10 is compatible with. Now use it like that //use Doctrine paginator use Doctrine\ORM\Tools\Pagination\Paginator; Write your query then call results like that. $query->setMaxResults($limit); $query->setFirstResult($offset); $results = new Paginator($query, $fetchJoin = true); Hope this will help you. Note: If you are using SF2 2.0.10, you … Read more

The maximum amount of memory any single process on Windows can address

Mark Russinovich published a multipart series on windows memory resources really covers this very well. You can find it here: http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspx He covers the reasons why the limits are what they are, as well as tests. The code for the tests are floating around in the tubes somewhere. If you want to know about memory … Read more

tech