Getting a wider array of fonts into your website is a pretty simple task these days. There’s quite a selection of fonts that you can use offered on the web. Just take a look at Google’s repository to see what I’m talking about.
Once you’ve selected the font that’s right for your application, you can import it to pages using the following directive:
A quick reminder post to myself to go and look at Flat Assembler. Interest was sparked initially from a article that was more of an x86 assembly tutorial here
Testing is a large component of any software development done, sometimes though - you don’t want to go through a full unit test suite just to see what a REST service is doing. I’ve come across some interesting concepts with cURL that will certainly be a shortcut benefit to seeing what responses your REST services are returning.
Requests
You can simulate all of the different HTTP verbs against any URL you’d like using cURL with the following syntax at the console:
# Retrieve person (id: 1)$ curl -i-X GET http://localhost/service/people/1
# Retrieve all people$ curl -i-X GET http://localhost/service/people
# Delete person (id: 1)$ curl -i-X DELETE http://localhost/service/people/1
# Create a new person$ curl -i-X POST -H'Content-Type: application/json'-d'{"first_name": "John", "last_name": "Smith"}' http://localhost/service/people
# Modify a person (id: 1)$ curl -i-X PUT -H'Content-Type: application/json'-d'{"first_name": "Jane", "last_name": "Smith"}' http://localhost/service/people/1
Sometimes having the power of MapReduce at your fingertips and applying this technology to simpler aggregate queries can be more hassle than it needs to be. MongoDB provides a simpler solution (for a simpler class of problems) in the form of the Aggregation framework. This framework allows you to develop queries within the mongo environment that are analogous to GROUP BY, HAVING, COUNT, SUM, etc. that you would normally use in “relational land”.
Today’s post, I want to walk through a couple of simple queries on using this framework to maximise productivity when pivoting data.
Marrying the old with the new
As a bit of a cheat’s reference, the following table provides the some examples of aggregate queries in a relational database and how they transpose over to the Mongo aggregation environment.