The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
Download and install right version of ghostscript. In my case my PHP was x86 architecture, so I download Ghostscript 9.14 for Windows (32 bit).
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | 
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
| * Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php | |
| */ | |
| $args = array( | 
| // homework 5.1 | |
| db.posts.aggregate([ | |
| {$project: {"_id": 0, | |
| "comments.author": 1 | |
| }}, | |
| {$unwind: "$comments"}, | |
| {$group: {"_id": "$comments.author", | |
| sum: {"$sum": 1} | |
| }}, | |
| {$sort: {"sum": -1}}, |