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
# the big picture... what data we're getting from where and its destination | |
@data_binding_hash = { | |
:@pSMSR_GRGR_ID=> [ :GRGR_ID, 'facets_field', DataType.STRING, DataSource.FACETS, '@pSMSR_GRGR_ID=""' , nil ], | |
:@pSMSR_SBSB_ID=> [ :SBSB_ID, 'facets_field', DataType.STRING, DataSource.FACETS, '@pSMSR_SBSB_ID=""' , nil ], | |
:@pSMSR_REL=> [ :patient_rel_code, 'rel_code', DataType.STRING, DataSource.LOOKUP, '@pSMSR_REL=""' , nil ], | |
:@pSMSR_SSN=> [ :MEME_SSN, 'facets_field', DataType.STRING, DataSource.FACETS, '@pSMSR_SSN=""' , nil ], | |
:@pSMSR_LNAME=> [ :SBSB_LAST_NAME, 'facets_field', DataType.STRING, DataSource.FACETS, '@pSMSR_LNAME=""' , nil ], | |
:@pSMSR_FNAME=> [ :SBSB_FIRST_NAME, 'facets_field', |
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
def current_club | |
club_id = current_member ? current_member.club_id : 1 | |
@club ||= Club.find(club_id) | |
end |
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
// jQuery no-double-tap-zoom plugin | |
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy! | |
(function($) { | |
var IS_IOS = /iphone|ipad/i.test(navigator.userAgent); | |
$.fn.nodoubletapzoom = function() { | |
if (IS_IOS) | |
$(this).bind('touchstart', function preventZoom(e) { | |
var t2 = e.timeStamp |
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
params = {} | |
params[:to] = "[email protected]" | |
params[:subject] = "xxx" | |
params[:from] = "" | |
@@params = params | |
# need to add gem smoke_monster for this | |
items = [:to, :team, :from_email].to_objects { | |
[:blue, :red, :white, :black, :orange, :green, :yellow, :pink, :test].map do |color| |
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 FindPotentiallyMatchingExamsForCompletionSignOffQuery : Query<IEnumerable<ExamResult>> | |
{ | |
public override IEnumerable<ExamResult> Execute() | |
{ | |
ExamResult er = null; | |
Component c = null; | |
VibrationPoint vp = null; | |
ExamMethod m = null; | |
var matchingCodeSectionIds = QueryOver.Of(() => er) | |
.Where(() => er.Surveillance.Id == Surveillance) |
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
using AutoMoq; | |
using NUnit.Framework; | |
namespace TestProject1 | |
{ | |
[TestFixture] | |
public class UnitTest1 | |
{ | |
private AutoMoqer mocker; | |
private SomeController controller; |
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
//First the usage | |
//Would be cool to use it for taking out parameters from a table, when I only use a few parameters and don't have a real class | |
[Given(@"the following Dealer exists")] | |
public void GivenTheFollowingDealerExists(DynamicItems people) | |
{ | |
var person = people.First(); | |
string Id = Convert.ToInt32(person.Id); | |
string Name = person.Name; | |
// do your stuff |
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 ObjectUnderTest | |
{ | |
private readonly MappingEngine mappingEngine; | |
public ObjectUnderTest(string prefix) | |
{ | |
var configuration = new Configuration(new TypeMapFactory(), MapperRegistry.AllMappers()); | |
configuration.CreateMap<Person, PersonModel>() | |
.ForMember(x => x.Name, y => y.MapFrom(orig => prefix + orig.Name)); |
NewerOlder