All examples use the Stretcher ruby gem
- An Information Retrieval (IR) System
- A way to search your data in terms of natural language, and so much more
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os" | |
| "time" | |
| "github.com/dustin/go-humanize" | |
| ) |
| # Change Java Runtime: | |
| sudo update-alternatives --config java | |
| # Delete Open-JDK | |
| sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
| # Change fonts - remove hinting: | |
| http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
| # Change RubyMine AntiAliasing first: |
| <?php | |
| class DogsController extends BaseController { | |
| protected $db; | |
| // Let the db-layer be injected. Don't worry... | |
| // Laravel will automatically inject the dependencies for you. | |
| function __construct(DogInterface $db) { | |
| $this->db = $db; | |
| } |
| <?php namespace DAO; | |
| class StorageException extends \Exception {} | |
| class DuplicateRecordException extends \Exception {} | |
| interface DAO { | |
| /** | |
| * Checks if an Entity exists in the datastore. | |
| * |
WARNING
This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!
An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.
<header>
| # First attempting to use Capybara directly, you will ran into issues when trying to set HTTP header. | |
| # Using Basic HTTP Authentication requires that we needed to set the header. | |
| # Also we need to set the Content-Type and Accept headers to ensure that Rails handles the input and output correctly. | |
| # When using Rack, Capybara delegates request and response handling down to Rack::Test. | |
| # So I used Rack::Test directly in my step definitions, and it works. | |
| # Rack::Test has a module called Rack::Test::Methods that can be mixed into a class to provide it | |
| # with methods for get, post, put, delete as well as last_request, last_response, header and more. | |
| # I mixed Rack::Test::Methods into the Cucumber world at the top of our API steps file like so: | |
| ############################## |
| //------------------------------------------------------------- | |
| // | |
| // Hypothesis: | |
| // | |
| // Promises/A is a Monad | |
| // | |
| // To be a Monad, it must provide at least: | |
| // - A unit (aka return or mreturn) operation that creates a corresponding | |
| // monadic value from a non-monadic value. | |
| // - A bind operation that applies a function to a monadic value |
| <?php | |
| class Create_Country_Codes_Table { | |
| /** | |
| * Make changes to the database. | |
| * | |
| * @return void | |
| */ | |
| public function up() |