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
def bind_alt_socket(alt_ip): | |
true_socket = socket.socket | |
def bound_socket(*a, **k): | |
sock = true_socket(*a, **k) | |
sock.bind((alt_ip, 0)) | |
return sock | |
socket.socket = bound_socket |
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
Scenario: Get List of My Hitchhiking Items via API | |
Given the existing things: | |
|name| | |
|The Guide (duh)| | |
|A towel| | |
|Sub-Etha Sens-O-Matic| | |
|Pan Galactic Gargle Blaster| | |
|Kill-o-Zap blaster pistol| | |
And the existing accounts: | |
|email|name|password| |
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
use enterprise | |
go | |
with events (exceptionInfo, eventMessageDate) as ( | |
select top 10000 | |
M.exceptionInfo, M.eventMessageDate | |
from serviceEvent E | |
inner join serviceEventMessage M on E.eventId = M.eventId | |
where username = 'john.mcgilberry' | |
--where eventMessageDate >= '8/15/2011' |
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
/*interface IGrade | |
{ | |
decimal Min{ get; set; } | |
decimal Max{ get; set; } | |
} | |
Grade grade0 = new Grade{ Min = 0, Max = 10000 }; | |
Grade grade1 = new Grade{ Min = 10000, Max = 50000 }; | |
Grade grade2 = new Grade{ Min = 50000, 100000 }; |
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
Scenario: landing page | |
When I am on the landing page | |
Then I should see "My E-Commerce Landing Page" | |
Scenario: no account | |
Given I do not have an account | |
When I go to the terms and conditions page | |
Then I should be redirected to the create account page | |
Scenario: not logged in |
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
<configuration> | |
<definitions> | |
<predicate-definition name="still-needs-demographics"> | |
<![CDATA[ | |
function (context, data) { | |
return context.requiresAdditionalInformation() && context.openInquiries().count === 0 && !data.hasDemographics(); | |
} | |
]]> | |
</predicate-definition> | |
</definitions> |
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
<ioc-config> | |
<service name="com.thinkfinance.es.data-acquisition.IDataAcquisitionService" class="com.thinkfinance.es.data-acquisition.LeadGenDataAcquisitionService"> | |
<constructor-args> | |
<arg> | |
<list> | |
<object class="com.thinkfinance.es.data-acquisition.providers.ClarityProvider"/> | |
</list> | |
</arg> | |
<arg> | |
<list> |
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 generateLead (lead, _callback) { | |
var _lead = { | |
id: lead.correlationId || generateCorrelationId(), | |
foo: 'foo', | |
bar: 'bar' | |
}; | |
var _respond = function (attrs) { | |
_callback($.extend(attrs, _lead)); //invoke the _callback provided by client | |
}; | |
clarity.inquireAsync(lead, function (_data) { |
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
ko.bindingHandlers.daterangepicker = { | |
_defaultStart: function () { | |
return moment().add('months', 1).startOf('month').toDate(); | |
}, | |
_defaultEnd: function () { | |
return moment().add('months', 1).startOf('month').add('years', 1).subtract('days', 1).toDate(); | |
}, | |
_deriveStartDate: function (_options) { |
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
ko.bindingHandlers.visualize = { | |
update: function (elem, acc, all, ctx, vm) { | |
vm.visualization.update(); | |
}, | |
init: function (elem, acc, all, ctx, vm) { | |
var _options = ko.utils.unwrapObservable(acc)(); | |
var _data = (_options.data() || []); | |
var _height = _options.height || 250; | |
var _width = _options.width || 506; | |
var _default_color_scheme = 'cool'; // other options: 'spectrum14', 'colorwheel', 'spectrum2000', 'spectrum2001', 'classic9' |
OlderNewer