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
| # very easy | |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... |
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
| ActionController::RoutingError (No route matches "/Aktuell.html" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/CMS/administrator/index.php" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/Engels/index_uk.html" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/Joomla/administrator/index.php" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/MSOffice/cltreq.asp" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/Site/administrator/index.php" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/Site_old/administrator/index.php" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/WP/wp-login.php" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/Wordpress/wp-login.php" with {:method=>:get}): | |
| ActionController::RoutingError (No route matches "/_vti_bin/_vti_aut/author.dll" with {:method=>:post}): |
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
| TermQuery termQuery = new TermQuery(new Term("title", "foo")); | |
| FieldScoreQuery scoreQuery = new FieldScoreQuery("agescore", FieldScoreQuery.Type.FLOAT); | |
| Query query = new CustomScoreQuery(termQuery, scoreQuery); |
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
| public class AgeFieldSource extends FieldCacheSource { | |
| private int now; | |
| public AgeFieldSource(String field) { | |
| super(field); | |
| now = (int)(System.currentTimeMillis() / 1000); | |
| } | |
| @Override | |
| public boolean cachedFieldSourceEquals(FieldCacheSource other) { | |
| return other.getClass() == MyFieldSource.class; |
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
| TermQuery termQuery = new TermQuery(new Term("title", "foo")); | |
| ValueSourceQuery valueQuery = new ValueSourceQuery(new AgeFieldSource("created")); | |
| CustomScoreQuery query = new CustomScoreQuery(termQuery, valueQuery); |
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
| require File.expand_path('../boot', __FILE__) | |
| require "action_controller/railtie" | |
| require "action_mailer/railtie" | |
| require "active_resource/railtie" | |
| require "rails/test_unit/railtie" | |
| # Auto-require default libraries and those for the current Rails environment. | |
| Bundler.require :default, Rails.env |
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
| require 'rails' | |
| # or | |
| require 'active_record/railtie' |
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
| collibri instanceof Bird |
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
| collibri.getClass().isAssignableTo(Bird.class) |
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
| Bird.class.isAssignableFrom(collibri.getClass()) |
OlderNewer