query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Renders the AWS CloudFormation properties of an `AWS::SSM::PatchBaseline.PatchFilter` resource
function cfnPatchBaselinePatchFilterPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnPatchBaseline_PatchFilterPropertyValidator(properties).assertSuccess(); return { Key: cdk.stringToCloudFormation(properties.key), Values: cdk.list...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnPatchBaselinePatchFilterGroupPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPatchBaseline_PatchFilterGroupPropertyValidator(properties).assertSuccess();\n return {\n PatchFilters: cdk.listMapper(cfnPatchBaselinePatchFi...
[ "0.6444766", "0.5983722", "0.58676684", "0.5676693", "0.5635412", "0.5478934", "0.5436316", "0.5405397", "0.527792", "0.514782", "0.5141636", "0.5121969", "0.5091399", "0.505865", "0.50141007", "0.5005157", "0.49863932", "0.49788535", "0.4972083", "0.49691775", "0.49423605", ...
0.6766576
0
Determine whether the given properties match those of a `PatchFilterGroupProperty`
function CfnPatchBaseline_PatchFilterGroupPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filtersMatched( properties, filters )\n {\n var count, required_count, prop, filter;\n for ( prop in properties )\n {\n if ( isInheritedProperty( properties, prop ) ||\n in_object( prop, __ignored_props ) ){ continue; }\n count = required_count = 0;\n for ( filter in fil...
[ "0.7196867", "0.6911294", "0.6484475", "0.642308", "0.6304438", "0.62355685", "0.62093246", "0.6182649", "0.61069834", "0.60978", "0.60200876", "0.60131377", "0.59553707", "0.5928189", "0.58916867", "0.58766365", "0.5875187", "0.58726424", "0.58630645", "0.58033085", "0.57444...
0.73942447
0
Renders the AWS CloudFormation properties of an `AWS::SSM::PatchBaseline.PatchFilterGroup` resource
function cfnPatchBaselinePatchFilterGroupPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnPatchBaseline_PatchFilterGroupPropertyValidator(properties).assertSuccess(); return { PatchFilters: cdk.listMapper(cfnPatchBaselinePatchFilterPropert...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CfnPatchBaseline_PatchFilterGroupPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an ...
[ "0.63097304", "0.61942947", "0.61791867", "0.5444004", "0.5409214", "0.531237", "0.53065294", "0.5251262", "0.5117123", "0.51151896", "0.5113753", "0.51054", "0.50897515", "0.50813204", "0.5002653", "0.49683568", "0.49675032", "0.49588937", "0.49499997", "0.49425784", "0.4937...
0.7135217
0
Determine whether the given properties match those of a `PatchSourceProperty`
function CfnPatchBaseline_PatchSourcePropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but rece...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(properties) {\n for (const type in properties) {\n const component = this.component(type);\n if (!component.exists())\n return false;\n for (const key in properties[type]) {\n const value = properties[type][key];\n if (component.property(ke...
[ "0.66594124", "0.6427689", "0.62502587", "0.60950696", "0.6074552", "0.5941925", "0.59243095", "0.5862595", "0.5823264", "0.58191943", "0.581693", "0.57809126", "0.5780644", "0.57696056", "0.57696056", "0.5742215", "0.57010496", "0.56790465", "0.56478375", "0.56047934", "0.55...
0.71448445
0
Renders the AWS CloudFormation properties of an `AWS::SSM::PatchBaseline.PatchSource` resource
function cfnPatchBaselinePatchSourcePropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnPatchBaseline_PatchSourcePropertyValidator(properties).assertSuccess(); return { Configuration: cdk.stringToCloudFormation(properties.configuration), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnPatchBaselinePropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPatchBaselinePropsValidator(properties).assertSuccess();\n return {\n Name: cdk.stringToCloudFormation(properties.name),\n ApprovalRules: cfnPatchBaseline...
[ "0.6312672", "0.5715447", "0.57125306", "0.56681967", "0.54731923", "0.5386205", "0.5350355", "0.53047997", "0.5253002", "0.5236902", "0.5233181", "0.50974524", "0.50348496", "0.4964477", "0.4870211", "0.48466742", "0.48391214", "0.48391214", "0.47943008", "0.4780767", "0.475...
0.6848646
0
Renders the AWS CloudFormation properties of an `AWS::SSM::PatchBaseline.Rule` resource
function cfnPatchBaselineRulePropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnPatchBaseline_RulePropertyValidator(properties).assertSuccess(); return { ApproveAfterDays: cdk.numberToCloudFormation(properties.approveAfterDays), Appr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnPatchBaselineRuleGroupPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPatchBaseline_RuleGroupPropertyValidator(properties).assertSuccess();\n return {\n PatchRules: cdk.listMapper(cfnPatchBaselineRulePropertyToCloudForm...
[ "0.63935304", "0.6328693", "0.5886296", "0.5665393", "0.5564079", "0.55632955", "0.55300486", "0.5520147", "0.53004795", "0.5095711", "0.50652915", "0.5054047", "0.49492678", "0.49324703", "0.48975584", "0.48628208", "0.48465285", "0.48465285", "0.4840554", "0.48358682", "0.4...
0.6529778
0
Renders the AWS CloudFormation properties of an `AWS::SSM::PatchBaseline.RuleGroup` resource
function cfnPatchBaselineRuleGroupPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnPatchBaseline_RuleGroupPropertyValidator(properties).assertSuccess(); return { PatchRules: cdk.listMapper(cfnPatchBaselineRulePropertyToCloudFormation)(prop...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CfnPatchBaseline_RuleGroupPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object,...
[ "0.656438", "0.60784596", "0.59184974", "0.57488173", "0.57237273", "0.57062036", "0.56461936", "0.5636548", "0.5591642", "0.5589164", "0.55563277", "0.549622", "0.54606444", "0.54268956", "0.5403806", "0.53453356", "0.5317745", "0.5311908", "0.52750707", "0.52029204", "0.519...
0.7063731
0
Determine whether the given properties match those of a `CfnResourceDataSyncProps`
function CfnResourceDataSyncPropsValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(properties) {\n for (const type in properties) {\n const component = this.component(type);\n if (!component.exists())\n return false;\n for (const key in properties[type]) {\n const value = properties[type][key];\n if (component.property(ke...
[ "0.67282856", "0.63398415", "0.60389644", "0.59674746", "0.5911603", "0.5869306", "0.57977754", "0.5787819", "0.5781507", "0.57529694", "0.5735075", "0.57333803", "0.56973743", "0.5674771", "0.5674771", "0.565868", "0.5644771", "0.56414086", "0.560679", "0.56025565", "0.55990...
0.7152759
0
Renders the AWS CloudFormation properties of an `AWS::SSM::ResourceDataSync` resource
function cfnResourceDataSyncPropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnResourceDataSyncPropsValidator(properties).assertSuccess(); return { SyncName: cdk.stringToCloudFormation(properties.syncName), BucketName: cdk.stringToCloud...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnResourceDataSyncS3DestinationPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnResourceDataSync_S3DestinationPropertyValidator(properties).assertSuccess();\n return {\n BucketName: cdk.stringToCloudFormation(properties.bu...
[ "0.5593651", "0.54960775", "0.545355", "0.5430199", "0.5378027", "0.5315027", "0.5288321", "0.5232643", "0.52291936", "0.5224713", "0.5152095", "0.5047804", "0.5020165", "0.50135446", "0.4989844", "0.49732384", "0.49669123", "0.495703", "0.49473605", "0.4878493", "0.4875376",...
0.645351
0
Create a new `AWS::SSM::ResourceDataSync`.
constructor(scope, id, props) { super(scope, id, { type: CfnResourceDataSync.CFN_RESOURCE_TYPE_NAME, properties: props }); try { jsiiDeprecationWarnings.aws_cdk_lib_aws_ssm_CfnResourceDataSyncProps(props); } catch (error) { if (process.env.JSII_DEBUG !== "1" && er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _fromCloudFormation(scope, id, resourceAttributes, options) {\n resourceAttributes = resourceAttributes || {};\n const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);\n const propsResult = CfnResourceDataSyncPropsFromCloudFormation(resourceProperties);\n ...
[ "0.6228799", "0.5663824", "0.542935", "0.5369071", "0.5265135", "0.52301383", "0.52295107", "0.5165744", "0.509854", "0.5039174", "0.49746764", "0.49549368", "0.49402833", "0.48951837", "0.48712072", "0.4865156", "0.48552305", "0.48513383", "0.482691", "0.4811337", "0.479633"...
0.66337156
0
Determine whether the given properties match those of a `AwsOrganizationsSourceProperty`
function CfnResourceDataSync_AwsOrganizationsSourcePropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CfnResourceDataSync_SyncSourcePropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an obj...
[ "0.6267162", "0.624675", "0.60919917", "0.58651435", "0.58247626", "0.5680218", "0.5679398", "0.564735", "0.56463015", "0.56149197", "0.5606694", "0.5583362", "0.557849", "0.55670524", "0.5564442", "0.55473274", "0.55455154", "0.5532176", "0.55240583", "0.55084676", "0.550707...
0.7459903
0
Renders the AWS CloudFormation properties of an `AWS::SSM::ResourceDataSync.AwsOrganizationsSource` resource
function cfnResourceDataSyncAwsOrganizationsSourcePropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnResourceDataSync_AwsOrganizationsSourcePropertyValidator(properties).assertSuccess(); return { OrganizationSourceType: cdk.stringToCloudForm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CfnResourceDataSync_AwsOrganizationsSourcePropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Exp...
[ "0.6252605", "0.5771656", "0.5079568", "0.50056314", "0.49516603", "0.48959625", "0.48660082", "0.4801908", "0.48018622", "0.47910747", "0.47780085", "0.47627166", "0.47559553", "0.47011024", "0.468271", "0.46655935", "0.46160698", "0.45998397", "0.45916986", "0.4580801", "0....
0.70730263
0
Determine whether the given properties match those of a `S3DestinationProperty`
function CfnResourceDataSync_S3DestinationPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(properties) {\n for (const type in properties) {\n const component = this.component(type);\n if (!component.exists())\n return false;\n for (const key in properties[type]) {\n const value = properties[type][key];\n if (component.property(ke...
[ "0.68597794", "0.67175", "0.6348018", "0.62861216", "0.62783885", "0.62346035", "0.6225633", "0.6223544", "0.6222013", "0.6211815", "0.6205549", "0.6197266", "0.6190386", "0.61555076", "0.61366224", "0.61339957", "0.6129119", "0.61084473", "0.60852975", "0.60809517", "0.60754...
0.70545894
0
Renders the AWS CloudFormation properties of an `AWS::SSM::ResourceDataSync.S3Destination` resource
function cfnResourceDataSyncS3DestinationPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnResourceDataSync_S3DestinationPropertyValidator(properties).assertSuccess(); return { BucketName: cdk.stringToCloudFormation(properties.bucketName), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnDatasetS3DestinationConfigurationPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnDataset_S3DestinationConfigurationPropertyValidator(properties).assertSuccess();\n return {\n Bucket: cdk.stringToCloudFormation(propertie...
[ "0.6541517", "0.6004915", "0.5855926", "0.58139217", "0.57883394", "0.56895804", "0.56895804", "0.5678712", "0.5664344", "0.5604462", "0.55564386", "0.55481434", "0.55481434", "0.55304945", "0.5473639", "0.5469361", "0.5467719", "0.5450878", "0.5446742", "0.5444274", "0.54296...
0.70005465
0
Determine whether the given properties match those of a `SyncSourceProperty`
function CfnResourceDataSync_SyncSourcePropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matches(properties) {\n for (const type in properties) {\n const component = this.component(type);\n if (!component.exists())\n return false;\n for (const key in properties[type]) {\n const value = properties[type][key];\n if (component.property(ke...
[ "0.689513", "0.6311772", "0.61115384", "0.5923666", "0.569759", "0.56925666", "0.5649935", "0.5649935", "0.56344736", "0.5627829", "0.5613946", "0.5607927", "0.55698913", "0.55411696", "0.5538283", "0.5495424", "0.5495424", "0.54847044", "0.54823303", "0.5451805", "0.54144263...
0.69530225
0
Renders the AWS CloudFormation properties of an `AWS::SSM::ResourceDataSync.SyncSource` resource
function cfnResourceDataSyncSyncSourcePropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnResourceDataSync_SyncSourcePropertyValidator(properties).assertSuccess(); return { AwsOrganizationsSource: cfnResourceDataSyncAwsOrganizationsSourceProp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnResourceDataSyncPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnResourceDataSyncPropsValidator(properties).assertSuccess();\n return {\n SyncName: cdk.stringToCloudFormation(properties.syncName),\n BucketName: cdk.s...
[ "0.6113623", "0.5582693", "0.5507272", "0.54900235", "0.5367259", "0.5287174", "0.52380335", "0.5164277", "0.50450647", "0.50427336", "0.5013116", "0.50034803", "0.5001372", "0.48723832", "0.4870675", "0.48595655", "0.48308417", "0.48141646", "0.48127156", "0.4782983", "0.477...
0.6842194
0
Determine whether the given properties match those of a `CfnResourcePolicyProps`
function CfnResourcePolicyPropsValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CfnResourcePolicyPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but receive...
[ "0.72730124", "0.65940887", "0.6584383", "0.6408877", "0.639082", "0.61774933", "0.61358464", "0.61316544", "0.60946274", "0.60791606", "0.6065487", "0.60623807", "0.60216546", "0.5996976", "0.597415", "0.59646523", "0.59627634", "0.595775", "0.5935473", "0.59287125", "0.5921...
0.72981936
0
Renders the AWS CloudFormation properties of an `AWS::SSM::ResourcePolicy` resource
function cfnResourcePolicyPropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnResourcePolicyPropsValidator(properties).assertSuccess(); return { Policy: cdk.objectToCloudFormation(properties.policy), ResourceArn: cdk.stringToCloudFormati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfnResourcePolicyPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnResourcePolicyPropsValidator(properties).assertSuccess();\n return {\n ResourceArn: cdk.stringToCloudFormation(properties.resourceArn),\n ResourcePolicy:...
[ "0.6085204", "0.5989691", "0.57511073", "0.56207746", "0.56207746", "0.56165105", "0.5586813", "0.55219823", "0.5424391", "0.53965276", "0.5323966", "0.52886593", "0.5232963", "0.52277035", "0.5192059", "0.51450837", "0.514111", "0.51199317", "0.51056504", "0.507998", "0.5046...
0.6198233
0
Reloads the config from disk, checking to make sure it exists, if not copy's backup
reload() { try { this.data = JSON.parse(fs.readFileSync(this.filepath, "utf8")); } catch (error) { if ("ENOENT" === error.code) { try { this.data = fs.readFileSync(this.exampleFilepath, "utf8"); } catch (err) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configReloader() {\n that.getConfigFromDb(function configReloader_pullDbConfig(err, new_config) {\n //console.log(new_config)\n if (check.assigned(new_config)) {\n //console.log(new_config);\n //console.log(JSON.parse(JSONX.stringify(gc())));\n ...
[ "0.73628443", "0.6356854", "0.6316148", "0.625375", "0.6229521", "0.6079782", "0.60021037", "0.5928178", "0.5894048", "0.5835594", "0.5706805", "0.56971234", "0.56959826", "0.5693556", "0.5684614", "0.5647457", "0.55874985", "0.55871236", "0.5552442", "0.5526885", "0.5524865"...
0.65475297
1
ASYNC run the correct function order
async function runOrder() { fillArrays(); cleanseDetails(); meetingObjects(); api(); jsonNotation(); addToMongo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inOrder(callback){\n \n}", "function async_io_normal(cb) {\n\n}", "async function asyncCall() {\n result = await resolveAfter2Seconds();\n result.forEach((indItem) =>\n printItem(\n indItem.title,\n indItem.tkt,\n indItem.desc,\n ...
[ "0.66128707", "0.6350471", "0.62238723", "0.6141097", "0.61171323", "0.6115024", "0.61083394", "0.60566205", "0.6032916", "0.60313696", "0.6026902", "0.599839", "0.5980064", "0.5979872", "0.59756994", "0.596626", "0.5910382", "0.5906322", "0.5896522", "0.5892438", "0.5891509"...
0.6937218
0
DATA CLEANSE clean up the text in the meeting details to (1) allow for an easy split, (2) wheelchair details even if undefined, (3) notes even if undefined
function cleanseDetails() { for (i in leftCol) { leftCol[i] = leftCol[i].split(' // ') if (leftCol[i][5] == 'Wheelchair access') { leftCol[i][5] = 'Wheelchair available' } else { leftCol[i][5] = 'Wheelchair unavailable'} if (leftCol[i][4] == 'Wheelchair acces...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processData(allText) {\n var allTextLines = allText.split(/\\r\\n|\\n/);\n var headers = allTextLines[0].split(',');\n var lines = [];\n var apartments = [];\n\n for (var i = 1; i < allTextLines.length; i++) {\n var data = allTextLines[i].split(',');\n if (data.length == heade...
[ "0.5854", "0.58443713", "0.5826138", "0.55941087", "0.5592616", "0.55536824", "0.5530824", "0.5490981", "0.5483427", "0.5441472", "0.541236", "0.5390891", "0.5390506", "0.5377368", "0.5362064", "0.5358321", "0.5300917", "0.5269134", "0.5243936", "0.52423954", "0.5228521", "...
0.69465965
0
JSON NOTATION create the final JSON notation with meeting array, location, and other details
function jsonNotation() { var addressData = fs.readFileSync('addressdata.txt'); var addressDataParsed = JSON.parse(addressData); for (i=0; i<22; i++) { var thisLocation = new Object; thisLocation.groupName = leftCol[i][1]; thisLocation.address = address[i]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function meetingObjects() {\n for (i=0; i<details.length; i++) {\n details[i] = jsonMeetingNotation(details[i]);\n }\n console.log(details)\n\n function jsonMeetingNotation(input) {\n var output=[];\n for (var j in input) {\n var thisMeeting = new Object\n thi...
[ "0.651262", "0.6343752", "0.6174144", "0.5998606", "0.5734108", "0.5579244", "0.55653775", "0.5533225", "0.54795694", "0.54746115", "0.5472634", "0.547012", "0.54610157", "0.5449586", "0.5447863", "0.5438806", "0.54308206", "0.5419023", "0.5389994", "0.53745025", "0.5352794",...
0.65356195
0
MONGO add the compiled json objects to mongo db
function addToMongo() { var dbName = 'aa_group_meetings'; // var groupNamesColl = 'group_names'; var meetingsColl = 'meetings'; request(jsonMeetings, function(error, response, body) { var url = 'mongodb://' + process.env.IP + ':27017/' + dbName; var MongoClient = require('mongodb').Mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertRetrivedData(json){\n MongoClient.connect(\"mongodb://localhost:27017\", function(err, db) {\n if(!err) {\n console.log(\"We are connected\");\n\n var collection = db.collection('dumpCollection');\n\n json.forEach(\n function(row) {\n collection.insert(row);\n ...
[ "0.5850051", "0.5563849", "0.5487193", "0.5445902", "0.54349345", "0.5396003", "0.5366349", "0.53620577", "0.53541815", "0.5297645", "0.52510077", "0.52118343", "0.5189573", "0.5184901", "0.5153375", "0.5132754", "0.51233965", "0.51031035", "0.5091776", "0.5073035", "0.506508...
0.58334035
1
5. API to retrieve the list of musicians for a specified music album sorted by musician's Name in ascending order.
async function getMusiciansByAlbum(data) { try { let result = await musicAlbumModel .findOne({ albumName: { $regex: data.albumName, $options: "i" }, }) .populate({ model: "musicians", path: "sungOrPlayedByMusicians", options: { sort: "name" }, }) .lean...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAlbums() {\n let results = [];\n\n if (!this.currentArtistName) {\n for (let i=0; i < this.albums.length; ++i) {\n results.push(this.albums[i].title);\n }\n\n return results;\n }\n else {\n let artistId = this._getArtistId();\n\n for (let i = 0; i < this.albums.length...
[ "0.7092466", "0.6937004", "0.6878837", "0.67320114", "0.65789133", "0.6577471", "0.6576334", "0.65604883", "0.6487348", "0.64073616", "0.6394215", "0.6389685", "0.63003725", "0.628276", "0.62757427", "0.62420774", "0.6190992", "0.61813396", "0.6138453", "0.6137328", "0.609054...
0.7068928
1
Make new hexomino object and move it.
function Hexomino(key, squares) { this.key = key; this.squares = squares.map(function(square) { return new Square(square[0], square[1]); }); this.move = function(row, column) { var hexomino = new Hexomino(this.key, []); hexomino.squares = this.squares.map(function(square) { return square.move(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMove(which){\t\t\n\tmover = which;\n\t//get the last position of the thing... (NOW through the transform=translate(x,y))\n\txy=getTransform(which);\n\n\tmyX=xy[0];\n\tmyY=xy[1];\n\t//get the object then re-append it to the document so it is on top!\n\tgetPiece(which).putOnTop(which);\n}", "_createSpr...
[ "0.58139247", "0.5809377", "0.5809071", "0.57807845", "0.5702551", "0.5701855", "0.56392384", "0.56392384", "0.5477833", "0.5464042", "0.5415516", "0.5408699", "0.5398175", "0.5397075", "0.53868806", "0.53846896", "0.53734165", "0.5348567", "0.5291903", "0.527767", "0.5274988...
0.6181144
0
Cordinates of Hexomino figures (rotation, flip)
function Hexominos() { this.shapes = [ [ // #14 = 8 4 rotation, flip new Hexomino( 0, [[0,1],[1,1],[1,2],[2,1],[3,1],[3,0]]), new Hexomino( 0, [[0,0],[1,0],[1,1],[1,2],[2,2],[1,3]]), new Hexomino( 0, [[0,1],[0,2],[1,1],[2,1],[2,0],[3,1]]), new Hexomino( 0, [[0,1],[1,0],[1,1],[1,2],[1,3],[2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHexCornerCoord( center, i ) {\n // KEY pointy or flat\n\n // flat\n // let angleDeg = 60 * i\n\n // pointy\n let angleDeg = 60 * i + 30\n\n let angleRad = Math.PI / 180 * angleDeg\n let x = center.x + this.state.hexSize * Math.cos( angleRad )\n let y = cen...
[ "0.6645144", "0.6206691", "0.61532205", "0.6089201", "0.60141164", "0.5978484", "0.5924267", "0.5769766", "0.5728581", "0.56837523", "0.56556106", "0.56556106", "0.5645466", "0.5636141", "0.5633857", "0.56275046", "0.56217366", "0.55650246", "0.5564469", "0.5562805", "0.55245...
0.6721599
0
Helper function for printing the workstation
toString() { return "Workstation >" + this.name + "< at >" + this.host + "<"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deviceprint_display ()\n\t{\n\t\tt = \"\";\n\t\tif (self.screen)\n\t\t{\n\t\t\tt += screen.colorDepth +SEP+ screen.width +SEP+ screen.height +SEP+ screen.availHeight;\n\t\t}\n\t\treturn t;\n\t}", "function displayComputer(computer) {\r return computer.cpu+ \" \" + computer.screenSize;\r}", "functio...
[ "0.6205811", "0.61756766", "0.6061902", "0.6022022", "0.5970025", "0.5943214", "0.5916671", "0.5887223", "0.58641726", "0.5821294", "0.5792005", "0.57693315", "0.57648283", "0.5764724", "0.5731283", "0.5705656", "0.5682109", "0.5656117", "0.56407523", "0.5637399", "0.5599282"...
0.7253383
0
copy one canvas to another, grayscale
function gray_copy(source, target) { var pixels = source.getImageData(0,0,w,h); target.putImageData(grayscale(pixels),0,0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gray_copy(source, target) {\n var pixels = source.getImageData(0,0,w,h);\n target.putImageData(grayscale(pixels),0,0);\n}", "function copyImgFromCanvasToCanvas(canvasA, canvasB, topLeft, bottomRight){\n \n var originContext = canvasA.getContext('2d');\n var newContext = canvasB.getContext('2...
[ "0.68952817", "0.6632288", "0.63448733", "0.62702775", "0.6145517", "0.61432576", "0.6101996", "0.60981625", "0.60944825", "0.6091471", "0.60640955", "0.5988462", "0.5967553", "0.59177935", "0.59016556", "0.5883138", "0.5869697", "0.5865493", "0.580858", "0.5796372", "0.57938...
0.68831146
1
Exclude selected from the dataset
function exclude_data() { new_data = _.difference(data, actives()); if (new_data.length == 0) { alert("I don't mean to be rude, but I can't let you remove all the data.\n\nTry selecting just a few data points then clicking 'Exclude'."); return false; } data = new_data; rescale(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exclude_data() {\n new_data = _.difference(data, actives());\n if (new_data.length == 0) {\n alert(\"I don't mean to be rude, but I can't let you remove all the data.\\n\\nTry selecting just a few data points then clicking 'Exclude'.\");\n return false;\n }\n data = new_data;\n ...
[ "0.7400329", "0.6616451", "0.6590186", "0.6554688", "0.64142203", "0.63983524", "0.637476", "0.63700026", "0.63663566", "0.62810045", "0.62810045", "0.62810045", "0.62585515", "0.6245423", "0.62066436", "0.60772693", "0.60415804", "0.60223824", "0.6020825", "0.60189956", "0.6...
0.7497769
0
Sets current pomo variable to a given pomo Id, used for starting and cancelling pomo
function setPomo(pomoId) { currentPomoID = pomoId; savePomoData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setid(v){\n id = v;\n}", "function startPomo(pomoId) {\n let mainpage = document.getElementById(\"main-page\");\n let timerpage = document.getElementById(\"timer-page\");\n mainpage.style.display = \"none\";\n timerpage.style.display = \"\";\n setPomo(pomoId);\n setCurrentPomo(pomoId);\n let d...
[ "0.60393184", "0.5974291", "0.58738273", "0.5792672", "0.57897985", "0.57736135", "0.55910915", "0.5569633", "0.5553598", "0.5530356", "0.552197", "0.550384", "0.54635006", "0.54402196", "0.5419649", "0.53912455", "0.53448653", "0.533868", "0.533868", "0.5264456", "0.52401894...
0.78215945
0
Recover pomoData from localStorage
function recoverPomoData() { if (localStorage.getItem("cpid") !== null) { // Do not change these to getters and setters currentPomoID = parseInt(localStorage.getItem("cpid")); pomoData = JSON.parse(localStorage.getItem("pomoData")); } updateTable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function savePomoData() {\n localStorage.setItem(\"cpid\", currentPomoID);\n localStorage.setItem(\"pomoData\", JSON.stringify(pomoData));\n}", "function obtenerPreciosDelLocalStorage(){\n\tlet precios;\n\tif (localStorage.getItem(\"Precios\") === null) {\n\t\tprecios = []\n\t}\n\telse{\n\t\tprecios = JSON.par...
[ "0.78709275", "0.70954406", "0.7029304", "0.7016088", "0.69653463", "0.6894683", "0.68897873", "0.68554085", "0.68502223", "0.6817207", "0.6803795", "0.67903614", "0.67817307", "0.67772067", "0.6750061", "0.6749038", "0.67366076", "0.6734147", "0.67239", "0.669438", "0.667661...
0.85924137
0
Reset the pomo data. Currently for development purposes only, but we should probably add a button to reset somewhere
function resetPomoData() { currentPomoID = INVALID_POMOID; pomoData = []; updateTable(); savePomoData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n BaseAPI.reset.call(_self);\n\n // Data Model\n _self.cmi = new CMI(_self);\n }", "function pomoReset() {\n stopAmbientSound();\n stopTimer();\n Vars.PomoSetCounter = 0; //Reset Pomo set Count\n}", "function reset() {\n BaseAPI.reset.call(_self);\n\n // ...
[ "0.73280346", "0.72651464", "0.7215618", "0.7080818", "0.70621973", "0.70466524", "0.70025337", "0.69969845", "0.699607", "0.68978447", "0.68869656", "0.6866414", "0.68047273", "0.6779105", "0.6772552", "0.6764452", "0.6714614", "0.66758", "0.6661054", "0.66500205", "0.664956...
0.8707157
0
Save pomoData to localStorage
function savePomoData() { localStorage.setItem("cpid", currentPomoID); localStorage.setItem("pomoData", JSON.stringify(pomoData)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save() {\n localStorage && localStorage.setItem(key, Y.JSON.stringify(data));\n }", "function saveData() {\n localStorage.setItem(SAVE_LOCATION, JSON.stringify(data));\n}", "saveData() {\n window.localStorage.setItem(\"HVACData\", JSON.stringify(this.hvacData.getHashmap()))...
[ "0.7869548", "0.7556316", "0.7475834", "0.74575996", "0.7427462", "0.7419562", "0.7256347", "0.7166657", "0.716385", "0.7155485", "0.71524775", "0.7123528", "0.70549464", "0.7051656", "0.7032142", "0.7023876", "0.7020859", "0.7001225", "0.6993075", "0.6972786", "0.69701177", ...
0.89041257
0
Called when user presses start pomo, loads that pomo and goes to the timer page
function startPomo(pomoId) { let mainpage = document.getElementById("main-page"); let timerpage = document.getElementById("timer-page"); mainpage.style.display = "none"; timerpage.style.display = ""; setPomo(pomoId); setCurrentPomo(pomoId); let desc = document.getElementById("task"); desc.innerHTML = "C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startPomoTimer() {\n time = Date.now();\n timerEnd = time + WORK_DURATION;\n setTimeout(refreshPomoTimer, UPDATE_TIMER_EVERY);\n}", "function startTimerForQA() {\n renderQuestionForUI();\n renderTimerForUI();\n renderQuestionListNavigationForUI();\n switchModeOfTimerControlButton(START);\...
[ "0.66170454", "0.6561556", "0.6351198", "0.6343388", "0.6243446", "0.6199257", "0.6094099", "0.6083481", "0.6069216", "0.6029621", "0.5989095", "0.5982225", "0.5955134", "0.59204763", "0.59132177", "0.5901928", "0.58881885", "0.58874863", "0.5884158", "0.5877775", "0.5862524"...
0.7671862
0
Cancels the currently running pomo TODO: for now this only stops the timer, needs to call the UI functions too
function cancelPomo() { let panel = document.getElementById("cancel-button-dialog"); timerEnd = time - 1; setPomoById(currentPomoID, previousState); cancelTimerFlag = 1; closeCancelDialog(); if (getPomoById(currentPomoID).actualPomos == 0) { getPomoById(currentPomoID).sessionStatus = SESSION_STATUS.inco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancel() {\n cancel();\n }", "cancel() {\n\t\tif (!this.state.executing) {\n\t\t\tthis.opts.cancel && this.opts.cancel();\n\t\t}\n\t}", "cancel() {\n\t\tif (!this.state.executing) {\n\t\t\tthis.opts.cancel && this.opts.cancel();\n\t\t}\n\t}", "function cancelstehenbleiben(){...
[ "0.7350054", "0.71215355", "0.71215355", "0.7100453", "0.7069423", "0.7003831", "0.6902442", "0.6894021", "0.6890463", "0.6877459", "0.6868777", "0.6830425", "0.6775048", "0.6743477", "0.66930956", "0.6635475", "0.6633091", "0.66265184", "0.65920234", "0.65620166", "0.6555400...
0.8082689
0
Refreshes the pomo timer, checks how much time is left, and if we are finished
function refreshPomoTimer() { time = Date.now(); if (time >= timerEnd) { setPomoTimer("00:00"); finishPomo(); } else { let dTime = new Date(timerEnd - time); setPomoTimer(getTimeString(dTime)); setTimeout(refreshPomoTimer, UPDATE_TIMER_EVERY); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startPomoTimer() {\n time = Date.now();\n timerEnd = time + WORK_DURATION;\n setTimeout(refreshPomoTimer, UPDATE_TIMER_EVERY);\n}", "function endOfPomo() {\n\t\twindow.clearInterval(pomoSecInterval);\n\t\t// console.log(\"End of pomo\");\n\t\t// console.log(pomo.startMinutes);\n\t\t// Innitialize the...
[ "0.7216771", "0.6574614", "0.6352456", "0.62867546", "0.61567354", "0.6130304", "0.6111041", "0.61045533", "0.6103743", "0.6087275", "0.60482556", "0.60458434", "0.6044632", "0.6027784", "0.6024876", "0.6024876", "0.6020115", "0.601749", "0.60010517", "0.59933156", "0.5964680...
0.7629213
0
Refreshes the break timer, checks how much time is left, and if we are finished
function refreshBreakTimer() { time = Date.now(); if (time >= timerEnd) { setBreakTimer("00:00"); finishBreak(); } else { let dTime = new Date(timerEnd - time); setBreakTimer(getTimeString(dTime)); setTimeout(refreshBreakTimer, UPDATE_TIMER_EVERY); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function breakDone() {\n clearInterval(timerInterval);\n started = false;\n startWork();\n }", "function startBreak() {\n isWork = false;\n timerVal.textContent = break_time.textContent;\n runInterval();\n }", "function breakStage() {\r\n\t\ttimePassed = 0;\r\n\t\t$(\"#timeDisplay\").html($...
[ "0.78134227", "0.7395926", "0.7360072", "0.7297561", "0.72318566", "0.720964", "0.7177439", "0.7167863", "0.7116797", "0.7055182", "0.6972322", "0.6965457", "0.69557315", "0.6827462", "0.6768803", "0.67070454", "0.66535985", "0.6653371", "0.6648311", "0.6636472", "0.6610975",...
0.76992905
1
UI Log the distractions for the currently running pomo
function logDistraction(pomoId) { logDistractionForPomo(pomoId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printMenu(){\n console.log(\"1 - Insert a new task\");\n console.log(\"2 - Remove a task by description\");\n console.log(\"3 - Remove a task by deadline\");\n console.log(\"4 - Print tasks\");\n console.log(\"5 - exit\");\n}", "actioned(){\n this.$applog('actioned: MyTaskPaneEntit...
[ "0.53794545", "0.53436726", "0.5312602", "0.51506823", "0.5142262", "0.51411074", "0.5052914", "0.50352424", "0.5035151", "0.5022573", "0.5019239", "0.5018114", "0.49980333", "0.4996598", "0.49918947", "0.49857652", "0.498544", "0.49446952", "0.4939597", "0.49233174", "0.4892...
0.66747725
0
hides html element of break timer on the page
function hideBreakTimer() { document.getElementById("break-screen").style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchTimerOff() {\n\tdocument.getElementById(\"notification\").style.visibility = \"hidden\"; \n document.getElementById(\"counter\").innerHTML= \"\";\n\t\t\tdocument.getElementById(\"text1\").innerHTML= \"\";\n document.getElementById(\"text2\").innerHTML= \"Minutes Left On Break!\...
[ "0.74262244", "0.74066967", "0.74066967", "0.74066967", "0.74066967", "0.74066967", "0.699568", "0.6876755", "0.68189347", "0.6777954", "0.6766513", "0.6761861", "0.6736396", "0.6715716", "0.66988516", "0.6634729", "0.6623809", "0.66185856", "0.6617816", "0.6586027", "0.65824...
0.8425351
0
Page number validation for text box
function validateText(textBox) { var max = eval($("span.totalPages").html()); var pageindex = eval($("input.txtPageIndex").val()); var value = textBox.val(); var orignalValue = value; val = value.replace(/[0-9]*/g, ""); var msg = "Only Integer Values allowed."; var $pagenobox = $("i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validatePageNumbers() {\r\n var pageNum = document.getElementById('numerical_input').value;\r\n if ((pageNum < 1 || 5 < pageNum) && pageNum !== '') {\r\n alert('Invalid number entered. ' +\r\n 'Please enter a number between 1 and 5, inclusive.');\r\n }\r\n}", "function validatePagination(s...
[ "0.7754322", "0.74481803", "0.72201467", "0.67185694", "0.6548414", "0.6455975", "0.59556985", "0.5945715", "0.5945261", "0.59098023", "0.59067965", "0.58779097", "0.58692724", "0.5860805", "0.5844856", "0.5836884", "0.5836884", "0.5776096", "0.577461", "0.57712626", "0.57683...
0.77771455
0
Run this function to check if an address has a balance
async function hasBalance(GCI, address) { if (await loadBalance(GCI, address) > 0) { return true } else { return false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async isAddressUsed (address) {\n address = String(address)\n const data = await this.getAddressBalance(address)\n\n return data.received !== 0\n }", "checkBalance(walletAddress){\r\n var balance = 0;\r\n for(var i = 0; i < this.bc.length; i++){\r\n for(var j = 0; j < this.bc[i].data.length;...
[ "0.7253039", "0.71976", "0.71723825", "0.7048836", "0.69391465", "0.6916654", "0.6827435", "0.6813384", "0.6707211", "0.6700839", "0.66649014", "0.66320133", "0.6506953", "0.6506486", "0.6504275", "0.649221", "0.64529693", "0.63733363", "0.633687", "0.6310318", "0.6301508", ...
0.75796986
0
Run this function to create a new address for a new cookie. FOLDERCOUNT is a name or number to uniquely identify the new folder Returns a path to a new folder that contains a new Secret Key If a secret key already exists in FOLDERCOUNT, then return the same path Will be depricated after wallet.js can support buffers fo...
async function newVisitorSecretKeyFolder(GCI, folderCount) { pathNewFolder = join(home, folderCount) let client = await lotion.connect(GCI) let wallet = coins.wallet(pathNewFolder,client) secret = fs.readFileSync(pathNewFolder+'/secret', 'utf8') //Can remove this line return pathNewFolder }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrCreateClientFolder(baseFolder) {\n var folderIterator = baseFolder.getFolders();\n var regExp = new RegExp(AdWordsApp.currentAccount().getCustomerId());\n while (folderIterator.hasNext()) {\n var folder = folderIterator.next();\n if (folder.getName().match(regExp)) return folde...
[ "0.55462825", "0.5430803", "0.5086157", "0.50281113", "0.50173753", "0.5002416", "0.4966303", "0.4926138", "0.48806986", "0.48460683", "0.4824827", "0.48014492", "0.47882184", "0.47676182", "0.47070247", "0.46904287", "0.46697453", "0.46688962", "0.46681964", "0.46435654", "0...
0.66002077
0
Run this function to return the address from a secret key path May be depricated after wallet.js can support buffers for secret key rathern than paths
async function getAddressFromSecretKeyPath(GCI, pathFolder) { let client = await lotion.connect(GCI) let wallet = coins.wallet(pathNewFolder,client) return wallet.address() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async retrieveAddress(path) {\n // this.connectedOrThrow(this);\n // console.log(this.app);\n const pk = await this.app.publicKey(path);\n if (pk.return_code !== 0x9000) {\n this.lastError = pk.error_message;\n throw new Error(pk.error_message);\n }\n return {\n pk: pk.compressed_p...
[ "0.7103569", "0.6939049", "0.6348437", "0.6223041", "0.6097318", "0.60628694", "0.6008504", "0.59757227", "0.5938859", "0.5938859", "0.5888454", "0.58372813", "0.58362114", "0.5819766", "0.5816655", "0.57874084", "0.5773719", "0.57636946", "0.5756442", "0.57340163", "0.573231...
0.7683206
0
Run this function to connect to the testnet make a transaction of AMOUNT from a secret key using its PATHFOLDER to an ADDRESS Returns the transaction hash
async function runTrasaction(GCI, pathFolder, address, amount) { let client = await lotion.connect(GCI) let wallet = coins.wallet(pathNewFolder,client) return await wallet.send(address, amount) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function createTransaction() {\n // Get a fee estimate from Smart Fee:\n const smartFeeResponse = await request({\n url: `https://api.smartfee.live/latest`,\n headers: {\n 'X-API-KEY': smartFeeApiKey\n }\n })\n const smartFeeResponseObject = JSON.parse(smartFeeResp...
[ "0.6610246", "0.6519584", "0.63997877", "0.63838077", "0.62889284", "0.62498164", "0.622293", "0.61743486", "0.6126393", "0.610575", "0.6105305", "0.60407263", "0.6032385", "0.5972077", "0.5960063", "0.5947067", "0.5944443", "0.5923344", "0.5917794", "0.5880894", "0.5860309",...
0.6565469
1
DOM node that will contain the rendered expression. Setting this will add the base markup necessary for rendering the expression, and set the `svgcontainer` class
set container(cont) { this._container = cont; this._container.innerHTML = [ document.querySelector('#svg-container-base').innerHTML, this.options.keepContent ? this.container.innerHTML : '', ].join(''); this._addClass('svg-container'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createSVG() {\n\t\t\treturn d3.select(this._container)\n\t\t\t\t.append('svg');\n\t\t}", "function JSXExpressionContainer(node, print) {\n\t this.push(\"{\");\n\t print.plain(node.expression);\n\t this.push(\"}\");\n\t}", "function JSXExpressionContainer(node, print) {\n\t this.push(\"{\");\n\t print.pla...
[ "0.63093054", "0.60246885", "0.60246885", "0.5936289", "0.5773263", "0.5761653", "0.57594806", "0.5687984", "0.5673618", "0.5650753", "0.55283237", "0.55143636", "0.5508428", "0.54992837", "0.5498352", "0.54875606", "0.5477695", "0.54674226", "0.5464962", "0.5452411", "0.5452...
0.6076622
1
Helper method to simplify adding classes to the container.
_addClass(className) { this.container.className = this.container.className.split(' ') .concat(className) .join(' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addC(item, className) { item.classList.add(className) }", "function addC(item, className) { item.classList.add(className) }", "addClasses(){\n\t\tif(!this.visible) return;\n\t\t\n\t\tif(this.classes){\n\t\t\tthis.appliedClasses = this.classes;\n\t\t\tthis.element.classList.add(...this.appliedClasses);...
[ "0.69097066", "0.69097066", "0.6871766", "0.6538705", "0.6520039", "0.65182424", "0.6460545", "0.6433176", "0.6433176", "0.64299136", "0.64299136", "0.6366294", "0.6366294", "0.63395685", "0.6337324", "0.63163865", "0.630522", "0.6291374", "0.6282185", "0.62610227", "0.624189...
0.7718209
0
Helper method to simplify removing classes from the container.
_removeClass(className) { this.container.className = this.container.className.split(' ') .filter(c => c !== className) .join(' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _cleanupClasses(target) {\n\t for (var i = 0; i < this._dirtyClasses.length; i++) target.classList.remove(this._dirtyClasses[i]);\n\t this._dirtyClasses = [];\n\t }", "function _cleanupClasses(target) {\n for (var i = 0; i < this._dirtyClasses.length; i++) target.classList.remove...
[ "0.7172145", "0.70872986", "0.70487386", "0.70151126", "0.69890684", "0.69890684", "0.6914589", "0.6914589", "0.6914589", "0.6914589", "0.6914589", "0.6892578", "0.68630236", "0.6776276", "0.66857487", "0.6643067", "0.6556722", "0.6554403", "0.6528064", "0.6504761", "0.648691...
0.7639525
0
Render the parsed expression to an SVG.
async render() { const svg = Snap(this.container.querySelector('svg')); const result = await this.parsed.render(svg.group()); // Once rendering is complete, the rendered expression is positioned and // the SVG resized to create some padding around the image contents. const box = result.getBBox(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawSvg() {\n \n\t}", "function renderSVG(options) {\n // Unpack the options.\n var host = options.host, source = options.source, trusted = options.trusted, resolver = options.resolver, linkHandler = options.linkHandler, shouldTypeset = options.shouldTypeset, latexTypesetter = options.latexTypesette...
[ "0.6328708", "0.61748564", "0.6071269", "0.60528845", "0.6004951", "0.59328735", "0.5818243", "0.57892257", "0.57688105", "0.5689926", "0.56671494", "0.56591254", "0.56197554", "0.55816644", "0.5578771", "0.5576629", "0.55622077", "0.55558354", "0.553439", "0.553439", "0.5534...
0.63396704
0
Return true if the given value is a helper "group"
function isHelperGroup(helpers) { if (!helpers) return false; if (helpers.isGroup) { return true; } if (typeof helpers === 'function' || isObject(helpers)) { var keys = Object.keys(helpers).filter(function(name) { return ['async', 'sync', 'displayName'].indexOf(name) === -1; }); return key...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function l$1(e){return e&&\"group\"===e.type}", "function l(e) {\n return e && \"group\" === e.type;\n }", "function is_this_collection_a_group(collection_str)\n {\n if(collection_str === \"groups\")\n return true;\n\n else\n return false;\n }", "function isGroup(activity)\n{\n ...
[ "0.64159715", "0.63473934", "0.62031907", "0.61291504", "0.596241", "0.593256", "0.5923461", "0.5606281", "0.554671", "0.552154", "0.5517539", "0.5502049", "0.5502049", "0.547307", "0.5441974", "0.5441974", "0.5382565", "0.5373724", "0.5340345", "0.52538925", "0.52175015", ...
0.705829
0
Function to calculate which slide to move the thumbs to
function slideThumbs(currentSlideNumber, visibleThumbs) { // Calculate the first number and ignore the remainder var m = Math.floor(currentSlideNumber / visibleThumbs); // Multiply by the number of visible slides to calculate the exact slide we need to move to var slideTo = m * visibleThumbs; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideThumbs(currentSlideNumber, visibleThumbs) {\n\n // Calculate the first number and ignore the remainder\n var m = Math.floor(currentSlideNumber / visibleThumbs);\n\n // Multiply by the number of visible slides to calculate the exact slide we need to move to\n ...
[ "0.7155835", "0.6844125", "0.66761476", "0.6544134", "0.6528071", "0.65192133", "0.6501047", "0.6489501", "0.64780825", "0.643718", "0.64005035", "0.63464373", "0.63289285", "0.62784576", "0.6261721", "0.6215356", "0.6215356", "0.6215356", "0.6172978", "0.6171689", "0.6157191...
0.7381908
0
Return an array of events for the given badgeid's criteria or an error message string, if something was wrong.
function localListCriteriaEvents(userid, badgeid, handler) { if (badgeid && badgeid == "" && userid) { db.get().query('SELECT rolename from users left join user_roles on users.id = user_roles.personid left join roles on user_roles.roleid = roles.id where users.id=? AND roles.rolename IN ("super","admin","issuer")'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBadgeCriteriaOpenBadgeJSON(badgeid, row, handler) {\n\n\tif (!badgeid || badgeid == \"\" || badgeid == null) {\n\t\thandler(new Error(\"You must include the id for the badge you want to get the criteria for\"));\n\t} else {\n\n\t\tvar criteria = {}\n\t\tcriteria[\"@context\"] = new Array();\n\t\tcriter...
[ "0.5950945", "0.54928976", "0.5456887", "0.53961", "0.5350775", "0.53155625", "0.5294254", "0.51412827", "0.51292133", "0.51281476", "0.5084292", "0.50608087", "0.50225025", "0.4971367", "0.49480352", "0.4875706", "0.48526368", "0.48201513", "0.48184672", "0.4809853", "0.4793...
0.66331804
0
check if val is a readableStream or not
function isReadableStream(val) { return val && (typeof val.pipe == "function") && (typeof val.on== "function"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStream (val) {\n return val && typeof val.pipe === 'function' && val.readable\n}", "function isReadableStream(obj) {\n return obj instanceof stream.Stream &&\n typeof obj._read === 'function' &&\n typeof obj._readableState === 'object';\n}", "_is_readable_stream(obj) {\n if ...
[ "0.8414514", "0.76223016", "0.7570411", "0.7077626", "0.6879947", "0.66158986", "0.6533745", "0.6533745", "0.6510956", "0.6500919", "0.6500919", "0.64367354", "0.6358146", "0.62933815", "0.6287253", "0.6287253", "0.6110907", "0.6066791", "0.6058371", "0.5958266", "0.594969", ...
0.85164684
0
check if val is a writableStream or not (currently, unused)
function isWritableStream(val) { return val && (typeof val.write == "function") && (typeof val.on== "function"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStream (val) {\n return val && typeof val.pipe === 'function' && val.readable\n}", "function isReadableStream(val) {\n return val && (typeof val.pipe == \"function\")\n && (typeof val.on== \"function\");\n}", "get writable() {\n if (!IsTransformStream(this)) {\n throw...
[ "0.74131185", "0.73875433", "0.6362631", "0.62546855", "0.62546855", "0.6223338", "0.61148816", "0.6075785", "0.5904609", "0.58579487", "0.5837698", "0.58094054", "0.5785472", "0.5719564", "0.5701114", "0.5701114", "0.56930864", "0.5679849", "0.5679849", "0.5679849", "0.56798...
0.8094335
0
Function to read the output of pbpaste command
function pbpaste() { return new Promise((resolve, reject) => { const child = child_process.spawn('pbpaste'); // listen on child process stdout let response = ""; child.stdout.on("data", (chunk) => { response += chunk; }); child.on("close", (code) => { if (code != 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pasteFromClipboard() {\n let text = atom.clipboard.read();\n this.onPaste(text);\n //this.pty.write(text);\n this.writeToPty(text);\n }", "function stdout(buffer){\n console.log(buffer.toString('utf-8'))\n}", "function readCommander(){\n\tstdin.pause();\n\tconsole.log(\"\");\n\t\t\n\tstdout.write...
[ "0.59456885", "0.5513456", "0.5267258", "0.5245182", "0.5213449", "0.52109647", "0.5124646", "0.50877875", "0.50283176", "0.5021527", "0.50014323", "0.4993426", "0.4973669", "0.49454108", "0.48945814", "0.48927054", "0.48916012", "0.48811135", "0.48777777", "0.48583496", "0.4...
0.6564013
0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common function. (for File Retrieve, Upload, Download) ref : grdData_FileA, row click event, processRetrieveComplete, msg_openedDialogue, msg_closeDialogue ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
function processFileList(param) { // called by processRetrieveComplete var dataType = (param.data_tp == undefined) ? "SrmOpenSrc" : param.data_tp; // Set File Data Type var objID = (param.obj_id == undefined) ? "grdData_FileA" : param.obj_id; // Set File Data Type var args = { source: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HandleDocumentDownloadFile(evt, row) {\n debugger;\n //var filePath = row.original[\"HBL#\"];\n }", "handleUploadFileResponseValue(event){ \n this.totalRec = (this.totalRec.length == 1 && this.totalRec[0].folderSetup == true) ? [...event.detail.fileRecord] : [...event.detail.fileRecord,...this.totalRec...
[ "0.6175664", "0.5925891", "0.5795612", "0.57736164", "0.5721054", "0.5506953", "0.5506449", "0.5502702", "0.54846495", "0.54425144", "0.5441083", "0.5419707", "0.5413249", "0.54108125", "0.54077166", "0.5372513", "0.5361396", "0.53587157", "0.53486615", "0.5343153", "0.532608...
0.64258677
0
Reviews all combinations of moving (or not) then attacking to determine all tiles that can be targeted by an attack. Returns: Set object
getAllTargetTiles() { let moveTiles = this.getMoveTiles(); let attackTiles; let targetTiles; let tiles = new Set(); let i, j, k; moveTiles.unshift(this.assignment); for (i = 0; i < moveTiles.length; i++) { attackTiles = this.getAttackTiles(moveTiles[i]); for (j = 0; j < attack...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getPossibleMoves() {\n return [].concat(... // flatten the list\n this.getMyUsableTiles()\n .map((start: Tile) =>\n this.gameState.getAdjacentTiles(start) // All possible places to move to\n .filter((end) => !end.isMountain()) // Can't move to mountains\n .map((end: Ti...
[ "0.63091844", "0.62444466", "0.6091954", "0.58509517", "0.58346945", "0.565552", "0.56361866", "0.56029844", "0.5571494", "0.5539477", "0.55385315", "0.5507882", "0.5505317", "0.54995614", "0.5468864", "0.54676515", "0.54088867", "0.53983295", "0.53957385", "0.5361297", "0.53...
0.74770194
0
This method calculates what might happen if this unit attacked a target unit. This helps bots make a decision on the best choice to make.
calcAttack(targetUnit, from, target) { if (!from) from = this.assignment; if (!target) target = targetUnit.assignment; let calc = {}; let power = Math.max(0, this.power + this.mPower); let armor = Math.max(0, Math.min(100, targetUnit.armor + targetUnit.mArmor)); let blocki...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAttackResult(action, unit, calc) {\n const result = { unit };\n calc ??= this.calcAttack(unit, this.assignment, action.target);\n\n if (calc.miss === 'immune') {\n result.miss = 'immune';\n\n return result;\n }\n\n let random;\n\n // This metric is used to determine which actions req...
[ "0.6910555", "0.68115526", "0.62290305", "0.6209016", "0.60766214", "0.6003802", "0.5951707", "0.5915323", "0.58672404", "0.58580077", "0.5856773", "0.58522", "0.5819987", "0.57934874", "0.5770687", "0.5762032", "0.57551587", "0.57239914", "0.57129854", "0.57097083", "0.57035...
0.7889478
0
Apply subresults that are aftereffects of certain results.
getAttackSubResults(result) { if (result.miss) return; const board = this.board; const unit = result.unit; const changes = result.changes; const subResults = result.results || []; // Most attacks break the focus of focusing units. if (unit.focusing) { if ( this.aType === 'hea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processResults (results, items, cb) {\n\n if (!items) return cb(null, results)\n\n var resultIds = results.map(function (item) { return item._id })\n\n async.mapSeries(items, function (item, cb) {\n\n if (item.isCustom) return cb(null)\n\n // if an overridden item, need to check if its ...
[ "0.5268002", "0.49125552", "0.4894773", "0.4809154", "0.48016745", "0.47262886", "0.47160512", "0.46869695", "0.4645673", "0.46310243", "0.46278206", "0.46254772", "0.45994842", "0.4546078", "0.4539718", "0.45241052", "0.45234352", "0.45199728", "0.45132083", "0.44959223", "0...
0.5066782
1
A hook for changing a frame before it is rendered.
fixupFrame() { // stub, used by Chaos Dragon }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "beginFrame() { }", "function setOpenFrame(frame) {\n if (openFrame) {\n removeFrameClasses(openFrame);\n }\n\n openFrame = frame;\n }", "toggleFrame(currentFrame) {\n this.setState({\n currentFrame: currentFrame\n });\n }", "function newFrame() {\n \n\n }", "function reloadFr...
[ "0.6564605", "0.63985056", "0.6397307", "0.6396227", "0.6383588", "0.6342346", "0.6274092", "0.6269143", "0.62258065", "0.62087697", "0.61914164", "0.6163305", "0.6142136", "0.61234", "0.6089853", "0.6043584", "0.5991491", "0.5988754", "0.59763616", "0.5976279", "0.5974723", ...
0.69936883
0
Certain actions can break certain status effects.
getBreakAction(action) { const breakAction = { type:'break', unit:this, results:[] }; // Any action will break focus. if (this.focusing) breakAction.results.push(this.getBreakFocusResult()); // Any action except turning will break barrier. if (this.barriered && action.type !== 'turn') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finallyActions () {\n status_.responded = new Date().getTime();\n status_.totalWaiting += (status_.responded - status_.requested);\n }", "break(action) {\n return Promise.resolve();\n }", "async apply_effects(action, ability, effect) {\n let effect_result;\n for (...
[ "0.61816096", "0.5869482", "0.5867081", "0.5835913", "0.57908034", "0.5769055", "0.57480776", "0.57413954", "0.5722539", "0.57152367", "0.56794614", "0.55783564", "0.5572249", "0.5503048", "0.54780143", "0.5463413", "0.5433789", "0.5418149", "0.537762", "0.5360512", "0.534573...
0.62427586
0
To a a search in replace on the files
function doSearchAndReplace() { console.info("Search and replace...".cyan); // now do a search and replace // first replace IN files var replaceObj = { "_AppName_": promptResult.appName, "_AuthorName_" : promptResult.authorName, "_AppDescription_" : promptResult.appDescription, "_namespace_": promptResult...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function repFile(file, inString, outString) {\n replace({\n regex: inString,\n replacement: outString,\n paths: [file,],\n recursive: true,\n silent: true,\n })\n}", "function replaceInSingleFile(filePath, findThis, cb) {\n fs.readFile(filePath, 'utf8', function(error, contents) {\n if (err...
[ "0.64027035", "0.63764447", "0.6368954", "0.6118714", "0.59467083", "0.58942723", "0.58495885", "0.58468276", "0.5777386", "0.57331246", "0.5712384", "0.57041556", "0.5675754", "0.5675754", "0.5675754", "0.56516874", "0.56448925", "0.5639046", "0.5611057", "0.55431885", "0.54...
0.735635
0
Utility Functions rand Generates random number from 1 to n, inclusive
function rand ( n ) { return ( Math.floor ( Math.random ( ) * n + 1 ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random(n) {\n return Math.floor(Math.random()*n);\n}", "function random(n) {\n\treturn Math.floor(n*Math.random());\n}", "function random(n)\n{\n\treturn Math.floor((Math.random()*n)+1);\n}", "function random(n) {\n\treturn Math.floor(Math.random() * n + 1)\n}", "function randN(n){\r\n\t\treturn ...
[ "0.8631259", "0.8626997", "0.86007494", "0.8598887", "0.85982996", "0.85956097", "0.8558272", "0.84850144", "0.8479669", "0.84630716", "0.84541", "0.84471816", "0.8445354", "0.84437865", "0.8435418", "0.8407461", "0.83354753", "0.8307074", "0.8246219", "0.822401", "0.822401",...
0.8860317
0
return a hex color based on a score according to our gradient
function getScoreColor(score) { var gradient = Array(); gradient[0] = [223, 68, 51]; gradient[1] = [235, 237, 129]; gradient[2] = [173, 228, 108]; gradient[3] = [78, 173, 66]; if (score < 55) return getBlendedColor(gradient[0], gradient[1], score/0.55); else if (score < 75) return getBlendedColor(gradie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorAt(score) {\n if (score > 4.5)\n // to deeper green #2e7d32 hsl(123, 46%, 34%)\n return hsllg(122,39,49, 123,46,34, 4.5,5,score)\n if (score > 4.0)\n // to brighter green #4caf50 hsl(122, 39%, 49%)\n return hsllg(88,50,53, 122,39,49, 4,4.5,score)\n if (score > 3.5)\n // to lighter g...
[ "0.76328504", "0.7111762", "0.702448", "0.694464", "0.6830309", "0.6825521", "0.6633819", "0.66129935", "0.66120946", "0.65851074", "0.65851074", "0.656351", "0.65404224", "0.6529921", "0.6529695", "0.65195173", "0.6487677", "0.64725524", "0.6469187", "0.64687735", "0.6467807...
0.80349326
0
convert a number from 024 into a time formatted string, hours and minutes only, with am or pm appended
function convertToTime(num) { var hours = Math.floor(num); var minutes = String(extractMinutes(num)); if (minutes.length == 1) minutes = "0" + minutes; var label = (hours >= 12) ? "pm" : "am"; if (hours == 24) { hours = 12; label="am"; } else if (hours == 0) hours = 12; else if (hours > 12) hours -= 12...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function converTime(t){\n t = Number(t); //cast to number\n if (t > 0 && t < 12){\n return t + ':00 am'\n } else if(t === 0) {\n return \"12:00 am\"\n } else if(t === 12) {\n return '12:00 pm'\n } else if(t > 12){\n return (t-12) + ':00...
[ "0.76769936", "0.74680233", "0.74316984", "0.74009556", "0.73255277", "0.732365", "0.7320854", "0.73118496", "0.72600204", "0.7251637", "0.72456187", "0.72396535", "0.7226224", "0.7222837", "0.72214437", "0.7198987", "0.7194971", "0.7182125", "0.7178148", "0.715709", "0.71519...
0.7545148
1
convert paths to an svg file mostly formatting into svgxml
function pathsToSvgFile(paths, opt = {}) { opt = opt || {}; var width = opt.width; var height = opt.height; var computeBounds = typeof width === 'undefined' || typeof height === 'undefined'; if (computeBounds) { throw new Error('Must specify "width" and "height" options'); } var units = opt.uni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatSvgFile(svgPaths, opt = {}) {\n opt = opt || {};\n\n var width = opt.width;\n var height = opt.height;\n\n var computeBounds =\n typeof width === 'undefined' || typeof height === 'undefined';\n if (computeBounds) {\n throw new Error('Must specify \"width\" and \"height\" options');\n }\n...
[ "0.6885999", "0.6778526", "0.66444784", "0.6626065", "0.6623266", "0.6598335", "0.6596231", "0.65661496", "0.64986944", "0.63166195", "0.6306562", "0.62747926", "0.6201142", "0.61808604", "0.6179496", "0.6168604", "0.61531365", "0.6120667", "0.6119231", "0.6113752", "0.608783...
0.7329635
0
convert paths to an svg file mostly formatting into svgxml
function formatSvgFile(svgPaths, opt = {}) { opt = opt || {}; var width = opt.width; var height = opt.height; var computeBounds = typeof width === 'undefined' || typeof height === 'undefined'; if (computeBounds) { throw new Error('Must specify "width" and "height" options'); } var units = opt.u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pathsToSvgFile(paths, opt = {}) {\n opt = opt || {};\n\n var width = opt.width;\n var height = opt.height;\n\n var computeBounds =\n typeof width === 'undefined' || typeof height === 'undefined';\n if (computeBounds) {\n throw new Error('Must specify \"width\" and \"height\" options');\n }\n\n...
[ "0.7329608", "0.6778114", "0.66449183", "0.6625757", "0.6622787", "0.6598271", "0.6595427", "0.6565677", "0.64979076", "0.63161594", "0.6306472", "0.62745345", "0.62014574", "0.61807895", "0.6178929", "0.61680895", "0.6152948", "0.6121177", "0.6118721", "0.61138064", "0.60872...
0.6885575
1
...the following methods all return promises, since their results are not synchronously ascertainable... ...get current time (secs)
getCurrentTime() { return new Promise(res => { switch (this.source) { case 'vimeo': this.player.getCurrentTime().then(secs => res(Math.floor(secs))); break; case 'yt': res(Math.floor(this.player.getCurrentTime())); case 'n': res(Math.floor(this.player.currentTime)); break; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_time() {\n return Date.now();\n}", "async getNow() {\n const calculateNowViaServerTime$ = this.serverTime$.pipe(map(reference => this.calculateNow(reference)), first());\n return await this.serverSupportsTime$.pipe(timeout(5000), first(supportsServerTime => supportsServerTime !== 'unk...
[ "0.74506503", "0.73794407", "0.72841674", "0.72814447", "0.72110873", "0.71940154", "0.7183098", "0.7183098", "0.71257985", "0.7119608", "0.7080283", "0.70672405", "0.70672405", "0.703401", "0.700509", "0.6992085", "0.69677967", "0.6966495", "0.69461536", "0.69461536", "0.694...
0.7689187
0
Creates a new MapFileParserResult. The result of parsing a map file.
function MapFileParserResult() { this.mapFiles = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createGameFromMap (mapFilePath) {\r\n let buffer = fs.readFileSync(mapFilePath),\r\n Game = this.getGame(),\r\n game;\r\n let map = buffer.toString('utf8');\r\n map = map.split('\\n');\r\n for (let i = 0; i < map.length; i++) {\r\n map[i] = map[i].split(...
[ "0.5204688", "0.5028504", "0.49633154", "0.49171332", "0.48983577", "0.48792705", "0.48476547", "0.47797844", "0.47670734", "0.47633383", "0.47400787", "0.4727911", "0.47250217", "0.46878457", "0.46701565", "0.45965126", "0.45925838", "0.4584333", "0.45682234", "0.45652062", ...
0.7652669
0
Private Functions Moves the 'currentLog' file from the folder 'ActivityTracker' to the subfolder 'toUpload'. The file will be renamed with the current timestamp. IMPORTANT: This function needs to stay in this service, to ensure that adding a log and moving the logfile are never executed at the same time.
function moveLog() { if (running) { // Wait on the current operation to finish before executing this one. currentOperationPromise = $q.when(currentOperationPromise) // Wathever the outcome of the previous action is, intercept the catch and carry on. .catch(_.noop) .then...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveFile(newFilePath, newFileParentPath, oldFilePath, oldFileParentPath, timestamp) {\n\n //if this should be ignored due to the st-ignore.json file\n if(!ignoreThisFileOrDir(newFilePath)) {\n \n //get the id of the moved file\n var fileId = getIdFromFilePath(oldFilePath);\n\n ...
[ "0.5681995", "0.5378909", "0.52712756", "0.5248335", "0.5225349", "0.51601744", "0.5077413", "0.4983514", "0.4972081", "0.4927316", "0.49023768", "0.48951656", "0.48826054", "0.48742503", "0.4867756", "0.48592544", "0.48302686", "0.48280627", "0.4799225", "0.47720015", "0.476...
0.67977387
0
Increment the log counter. If the log limit has been reached, the current log is moved in the upload folder.
function incrementCounter() { logCount += 1; $log.log(TAG + 'Iterating log counter', logCount); logCount >= logLimit && moveLog(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function log() {\n const percent = Math.floor((finished / total) * 1000) / 10;\n if (percent - lastLogged >= 20) {\n lastLogged = percent - (percent % 20);\n console.log(` Uploaded ${percent}% of files`);\n }\n }", "function moveLog() {\n if (running) {\n // Wait on the current o...
[ "0.6351685", "0.6251664", "0.5822281", "0.569101", "0.56738895", "0.5509516", "0.5374063", "0.5303849", "0.52583134", "0.5223361", "0.521514", "0.52106", "0.5184898", "0.5176034", "0.51559967", "0.5155243", "0.5150714", "0.51456976", "0.5095778", "0.50789464", "0.50787395", ...
0.75791484
0
Set the 'running' private variable to 'true', so that the service will continue adding logs and moving files.
function startService() { $log.log(TAG + 'starting'); running = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startService() {\n $log.log(TAG + 'starting.');\n running = true;\n }", "start() {\n this.running = true;\n }", "function isRunning() {\n return running;\n }", "start() {\n this.isRunning = true;\n }", "handleFileUploadStarted() {\n this.isWorking = true\n }", "i...
[ "0.6853844", "0.6680657", "0.65427095", "0.6462108", "0.6273885", "0.62686497", "0.6199508", "0.6189632", "0.61691797", "0.6163624", "0.60790455", "0.60426986", "0.59102803", "0.58597475", "0.5817283", "0.580502", "0.5776529", "0.5716544", "0.5689418", "0.56583035", "0.554495...
0.682543
1
This sample demonstrates how to Gets the manager metrics
async function managersListMetrics() { const subscriptionId = "9eb689cd-7243-43b4-b6f6-5c65cb296641"; const resourceGroupName = "ResourceGroupForSDKTest"; const managerName = "hAzureSDKOperations"; const filter = "startTime%20ge%20'2018-08-04T18:30:00Z'%20and%20endTime%20le%20'2018-08-11T18:30:00Z'"; cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getMetricForMetadata() {\n const subscriptionId =\n process.env[\"MONITOR_SUBSCRIPTION_ID\"] || \"00000000-0000-0000-0000-000000000000\";\n const resourceUri =\n \"subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/...
[ "0.6265418", "0.62499285", "0.622971", "0.61968154", "0.6122415", "0.61176306", "0.6095958", "0.6084865", "0.6058116", "0.6051838", "0.59986883", "0.5986363", "0.5959269", "0.595817", "0.5949934", "0.5919973", "0.5906449", "0.58182484", "0.5767533", "0.5644046", "0.5638402", ...
0.6845842
0
getHeaderView Get the view for the header on Details and Description tab
function getHeaderView() { logger.info('base getHeaderView called'); $.pdp_header_controller = Alloy.createController('product/components/detailHeader'); $.pdp_header_controller.init(); return $.pdp_header_controller.getView(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get viewMoreStewardsTab_MenuHeader() {return browser.element(\"//android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.widget.TextView[1]\");}", "function setHeader () {\n\t\theaderLabel.text='Summary';\n\t\tleftBtn...
[ "0.6734138", "0.659107", "0.6341885", "0.61868197", "0.6136397", "0.60328513", "0.5859134", "0.5795486", "0.5795206", "0.5761555", "0.5749778", "0.5598885", "0.55943614", "0.559231", "0.55816185", "0.55766565", "0.5574363", "0.5574363", "0.5565264", "0.5562627", "0.5557036", ...
0.6952645
0
FUNCTIONS initializeElements Initializes the UI elements of PDP depending on product and configurations
function initializeElements() { logger.info('base initializeElements'); var associatedSeparator; if (!Alloy.CFG.product.recommendations.enabled) { $.recommendations_button.hide(); $.recommendations_button.setWidth(0); associatedSeparator = $.recommendations_button.associatedSeparat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeElements() {\n interestDiv = document.getElementById('interest');\n placeHeading = document.getElementById('Place');\n information = document.getElementById('information');\n events = document.getElementById('events');\n sights = document.getElementById('sights');\n sightsUl = document.get...
[ "0.6460978", "0.6453528", "0.64362735", "0.63751364", "0.6350505", "0.61995023", "0.6192434", "0.6071781", "0.6050136", "0.60283864", "0.60143614", "0.60106885", "0.5993249", "0.59778285", "0.5953191", "0.5951647", "0.5948798", "0.59459245", "0.59268653", "0.59027696", "0.588...
0.822559
0
UI EVENT HANDLER FUNCTIONS pdpTabButtonsClickEventHandler Event handler for tabs on PDP have been clicked
function pdpTabButtonsClickEventHandler(event) { logger.info('pdpTabButtonsClickEventHandler called'); if (!event.source.associatedView) { return; } var i = 0, button, associatedView = event.source.associatedView, includeHeader, headerView = $.pdp_header_controll...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preapare_tabs_interface( tabs_code ) {\n\n var copy_bt = tabs_code.closest('#app-tb-save-sheet');\n var tabs = tabs_code.find( 'li' );\n var close_bt = tabs_code.find( '.close-sheet-button' );\n\n // EVENTS\n tabs\n .click( change_sheet );\n\n clos...
[ "0.6479458", "0.6398886", "0.6294553", "0.62458813", "0.6220359", "0.6185823", "0.61775124", "0.6160589", "0.61152714", "0.6101331", "0.6082789", "0.60500413", "0.60430527", "0.60419655", "0.6037198", "0.60362875", "0.6029763", "0.6001738", "0.5996571", "0.59583515", "0.59583...
0.72405523
0
breadcrumbsBackButtonClickEventHandler Event handler for back button click
function breadcrumbsBackButtonClickEventHandler() { eaUtils.returnToLastSearchOrProduct(historyCursor, $.currentProduct.getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleBackButtonClick() {\n if (this.state.breadcrumbs.length > 1) {\n const currentIndex = this.state.breadcrumbs.length - 1;\n const prevIndex = currentIndex - 1;\n\n this.handleBreadcrumbClick(this.state.breadcrumbs[prevIndex], prevIndex);\n }\n }", "function ...
[ "0.827699", "0.7867541", "0.6954829", "0.69128394", "0.6845567", "0.6820194", "0.67810655", "0.6773351", "0.6769561", "0.6744498", "0.67254263", "0.66961515", "0.6687491", "0.66564065", "0.66564065", "0.66564065", "0.66564065", "0.66564065", "0.66564065", "0.6656229", "0.6609...
0.83647484
0
selectionsHandler Product has been selected and need to update inventory and product id
function selectionsHandler() { logger.info('selection handler'); if ($.currentProduct.isProductSelected()) { $.store_availability_button.setColor(Alloy.Styles.color.text.mediumdark); } else { $.store_availability_button.setColor(Alloy.Styles.color.text.light); } $.pdp_header_contro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleProductSelected(productId) {\n this.recordId = productId;\n }", "handleProductSelected(productId) {\n this.recordId = productId;\n this.orderItem = null;\n }", "updateProduct(index){\n this.selectedVariant = index\n //console.log(index)\n }", "pro...
[ "0.73297125", "0.7057", "0.67300665", "0.6724296", "0.6683134", "0.66284674", "0.66157305", "0.64779", "0.6462749", "0.64575434", "0.6398949", "0.6397592", "0.63892424", "0.6351192", "0.63391304", "0.63327813", "0.6331037", "0.6283316", "0.6271306", "0.62612134", "0.62428397"...
0.72835857
1
Add unique id's and parent URL's plus parent URI parameters to resources
function _addRaml2htmlProperties(ramlObj, parentUrl, allUriParameters) { // Add unique id's to top level documentation chapters if (ramlObj.documentation) { ramlObj.documentation.forEach((docSection) => { docSection.uniqueId = _makeUniqueId(docSection.title); }); } if (!ramlObj.resources) { r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function post(req, res, next) {\n const prop = toProp(req.params.resource)\n req.body[prop] = toId(req.params.id)\n req.url = `/${req.params.nested}`\n next()\n }", "function addIDandSelfLink(req, item){\n item.id = item[Datastore.KEY].id;\n item.self = \"https://\" + req.get(\...
[ "0.5740308", "0.56868833", "0.5647232", "0.5624972", "0.5613991", "0.5567114", "0.556579", "0.55047333", "0.5486846", "0.5484382", "0.54630315", "0.5437998", "0.5435174", "0.5412459", "0.54061276", "0.5366795", "0.5359142", "0.5298899", "0.5261839", "0.5255543", "0.52498233",...
0.5925682
0
This uses the datatypeexpansion library to expand all the root type to their canonical expanded form
function _expandRootTypes(types) { if (!types) { return types; } Object.keys(types).forEach((key) => { tools.expandedForm(types[key], types, (err, expanded) => { if (expanded) { tools.canonicalForm(expanded, (err2, canonical) => { if (canonical) { types[key] = canonica...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TypeRecursion() {}", "function expandTree(tree) {\n\t\ttraverseTree(tree, function(tree, char, i) {\n\t\t\ttree[i] = expandChar(char);\n\t\t});\n\t\treturn tree;\n\t}", "function inferSchema(value){\n \n // we have no way of infering type names for objects\n // therefore we simply assign an increme...
[ "0.5623846", "0.55925906", "0.5445032", "0.5408154", "0.53838825", "0.52553517", "0.5243824", "0.51840794", "0.51840794", "0.51427984", "0.50181156", "0.49522236", "0.49467883", "0.49277946", "0.49259377", "0.49162585", "0.48577073", "0.48509052", "0.4846418", "0.4838908", "0...
0.758444
0
Get offset of an element
function getOffset(el) { const rect = el.getBoundingClientRect(); return { left: rect.left, top: rect.top }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOffset(el) {\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + rect.width / 2\n };\n}", "getElementOffset(el) {\n const rect = el.getBoundingClientRect();\n return {\n left: rect.left + window.scrollX,\n top: rect.top + window.scrollY\n ...
[ "0.7950492", "0.7735216", "0.7676191", "0.75918245", "0.75910723", "0.7567207", "0.75289637", "0.7507635", "0.7475498", "0.7462818", "0.7456668", "0.74542934", "0.74353355", "0.74203396", "0.74094266", "0.73694974", "0.7365432", "0.7365432", "0.73553926", "0.7339837", "0.7299...
0.78850883
1
Creates a welcome page. Shrinks the title of page and allows user to choice how many questions they would like to see in the subsequent session. Also adds button listeners to detect how many questions are going to be used.
function createWelcomePage(language) { shrinkTitle(language); introduceTest(language); addTestSpecificationsListeners(language); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInitialsPage() {\n // Hides both nav buttons and the choices\n homeBtn.addClass(\"hide\");\n highscoresBtn.addClass(\"hide\");\n btnGroup.addClass(\"hide\");\n\n // Changes the header\n $(\"#header\").text(\"You got a highscore!\");\n\n // Displays th...
[ "0.68915975", "0.67121416", "0.6296646", "0.62420404", "0.6050448", "0.60015815", "0.5979078", "0.58930385", "0.588608", "0.58609724", "0.58423716", "0.5841231", "0.5834841", "0.5824451", "0.5808246", "0.57987136", "0.5747302", "0.57428294", "0.5741729", "0.57410556", "0.5727...
0.67378104
1
The Player is a wrapper for a VRenabled canvas, plus its controls. It is implemented as an html5 element with a describing the VR scene. It also stores the last known style of its canvas, for loop updates. Note: Renderer must have a canvas element to use.
function WebVRPagePlayer(renderer, params, buttonTypes) { // CSS classes. this.playerClasses = { player: 'player', //player suffix caption: 'caption', //<figcaption> suffix canvas: 'canvas', //canvas suffix }; this.dom = null; this.buttons = []; this.caption = null; // Save params. t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Player(selector, params) {\n // Create a VR View iframe depending on the parameters.\n var iframe = this.createIframe_(params);\n this.iframe = iframe;\n\n var parentEl = document.querySelector(selector);\n parentEl.appendChild(iframe);\n\n // Make a sender as well, for relying commands to the child...
[ "0.66997916", "0.62570614", "0.6199104", "0.6142823", "0.606893", "0.5984081", "0.5924609", "0.58589005", "0.5807404", "0.5796447", "0.5796447", "0.5783894", "0.5783894", "0.57717925", "0.5762689", "0.5753851", "0.5733281", "0.5694281", "0.56913537", "0.56336474", "0.5629321"...
0.66873
1
This method should wrap the entry point of the whole app, so we handle telemetry and error reporting properly
runApp(appName, appVersion, error, reporter, codeToRun, extProps) { try { telemetry_1.Telemetry.init(appName, appVersion, reporter); return this.runFunction(appName, error, codeToRun, true, extProps); } catch (error) { this.logger.error(error); thr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n setReqURL()\n startMicroservice()\n registerWithCommMgr()\n}", "_installNativeHandler() {\n // We are only called by the frontend if the SDK is enabled and a valid DSN\n // has been configured. If no DSN is present, this indicates a programming\n // error.\n ...
[ "0.626143", "0.6099264", "0.609214", "0.6001321", "0.5975122", "0.5971871", "0.5955088", "0.59474754", "0.59408784", "0.59249705", "0.59215677", "0.5918407", "0.5888939", "0.5872179", "0.5848051", "0.5841279", "0.5836366", "0.5803048", "0.57692534", "0.5761178", "0.5757314", ...
0.6327078
0
Change payment method image on hover
function hoverInImage() { var gateway = $(this).attr('data-gateway'); var paymentId = this.id; var labelImg = Drupal.settings.fundraiser[gateway].selected_image; $(this).attr('src', labelImg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rccalcIconHover() {\n\tvar x = document.getElementById('rccalcIcon');\n\tx.setAttribute(\"src\", \"media/w95_calc_inv.png\");\n}", "function hoverOutImage() {\n var gateway = $(this).attr('data-gateway');\n var parentLabel = $(this).parent();\n var labelParent = parentLabel.attr('for');\n...
[ "0.6814036", "0.6654855", "0.64601165", "0.64176184", "0.63442385", "0.63441074", "0.6278382", "0.62182564", "0.6213679", "0.6179901", "0.6130493", "0.59041953", "0.58832526", "0.5867611", "0.5805978", "0.57059616", "0.56809574", "0.5675369", "0.5616862", "0.55903524", "0.558...
0.8408908
0
Change payment method image after hover to selected default.
function hoverOutImage() { var gateway = $(this).attr('data-gateway'); var parentLabel = $(this).parent(); var labelParent = parentLabel.attr('for'); var checked = $('#' + labelParent).is(':checked'); if (!checked) { var labelImg = Drupal.settings.fundraiser[gateway].unselected_ima...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hoverInImage() {\n var gateway = $(this).attr('data-gateway');\n var paymentId = this.id;\n var labelImg = Drupal.settings.fundraiser[gateway].selected_image;\n $(this).attr('src', labelImg);\n }", "function paymentImages() {\n var gateway = $(this).val();\n var paymentI...
[ "0.8003891", "0.66407454", "0.64119667", "0.6215083", "0.61662006", "0.60889494", "0.5876803", "0.58005756", "0.5790546", "0.5777532", "0.57651615", "0.57509875", "0.57493794", "0.5739032", "0.57343185", "0.57331574", "0.5723463", "0.5720005", "0.5669573", "0.5649003", "0.564...
0.6978774
1
populates the number of adults dropdowns
function populateNumberOfAdults() { var select = $(".numberOfAdults"), i; for (i = 1; i <= 10; i++) { select.append($('<option></option>').val(i).html(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static addOptions() {\n let num = 1;\n let date = new Date();\n let years = document.getElementsByTagName('select')[2];\n for (let i = date.getFullYear(); i >= 1900; i--) {\n let optionYears = document.createElement(\"option\");\n optionYears.text = i;\n ...
[ "0.64716434", "0.6268186", "0.62046623", "0.61964613", "0.609123", "0.6018337", "0.5970221", "0.59701276", "0.59502655", "0.5903835", "0.58972263", "0.57814455", "0.5777771", "0.57585484", "0.5748667", "0.5700557", "0.56756306", "0.5641442", "0.5634633", "0.5616918", "0.56115...
0.81721973
0
Retorno de una funcion utilizando el ejemplo anterior vamos a retornar 1 aunque le mandemos por referencia diferentes valores
function saludarArgumentos2(referencia){ // retorna 1 porque asi se designo el return 1; return 1; // Algo que va despues de un return jamas se va a ejecutar }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retorno1(){\n var numero = 10;\n return numero;\n}", "function fun1(){} //toda a função de js retorna alguma coisa", "function retorno2(num1){\n return num1;\n}", "function funcion() {\n return numeracion;\n}", "function nombreFuncion(parametro){\n return \"regresan algo\"\n}", "fun...
[ "0.6400047", "0.62373185", "0.6123883", "0.6057501", "0.59723866", "0.5944832", "0.5870537", "0.583658", "0.5833427", "0.58156043", "0.5752935", "0.5719958", "0.57145804", "0.57145804", "0.57144797", "0.568857", "0.5644554", "0.56300753", "0.5619362", "0.5599165", "0.55908704...
0.65894955
0
AtlasMaker Packer.js Base class for an AtlasMaker Packing techniques. Author: Richard Dare
function Packer(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BinaryPacker() {\n}", "function Package(name, description1, description2, price, img1, img2, img3, img4) {\r\n this.name = name,\r\n this.description1 = description1,\r\n this.description2 = description2,\r\n this.price = price,\r\n this.img1 = img1,\r\n this.img2 = img2,\r\n this.img3 = img3,\r\...
[ "0.62148", "0.5645842", "0.5560461", "0.5526104", "0.54364437", "0.54364437", "0.54364437", "0.5353344", "0.5309439", "0.5301712", "0.52636594", "0.52636594", "0.5252539", "0.5252539", "0.5252539", "0.5252539", "0.52406114", "0.5236303", "0.5193685", "0.5183926", "0.51796335"...
0.7623995
0
Nome: DisabledAllRecording Objetivo: Disabilita todos os resgistros Paramentros: Retorno: Exemplo: DisabledAllRecording()
function DisabledAllRecording() { var controls = Xrm.Page.ui.controls.get(); for (var i in controls) { var control = controls[i]; if (!control.getDisabled()) { control.setDisabled(true); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnabledAllRecording() {\n var controls = Xrm.Page.ui.controls.get();\n for (var i in controls) {\n var control = controls[i];\n if (control.getDisabled()) {\n control.setDisabled(false);\n }\n }\n}", "isRecording() {\n return false;\n }", "function st...
[ "0.685435", "0.6558116", "0.62031", "0.5961961", "0.59363705", "0.5933812", "0.5919979", "0.58174694", "0.5764222", "0.57327425", "0.568752", "0.5654868", "0.56527793", "0.5615701", "0.559753", "0.55926174", "0.55916107", "0.55873567", "0.5563618", "0.55635315", "0.5553932", ...
0.701574
0
Nome: updateColorField Objetivo: Altera a cor do Campo Paramentros: filtd (Nome do Campo) color (Cor) Retorno: Exemplo: updateColorField('new_name', 'red')
function updateColorField(filel, color) { document.getElementById(filel).style.backgroundColor = color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateColor(color) {\n this.colorName = color;\n }", "function updateFieldColor(color) {\n if (lostRounds > maxLossCount) return;\n if (attempt >= maxAttemptCount) return;\n if (currentField === 'leftField') {\n setLeftFieldStyle({ backgroundColor: color });\n } else {\n setRightFie...
[ "0.6960866", "0.63288933", "0.62893665", "0.6248521", "0.6198345", "0.6176114", "0.616266", "0.61525124", "0.6141115", "0.6119856", "0.60592514", "0.60268605", "0.60192317", "0.60079294", "0.59935087", "0.5985358", "0.59778374", "0.5971436", "0.5962965", "0.5962965", "0.59608...
0.71672285
0
Nome: EnabledAllRecording Objetivo: Habilita todos os resgistros Paramentros: Retorno: Exemplo: EnabledAllRecording()
function EnabledAllRecording() { var controls = Xrm.Page.ui.controls.get(); for (var i in controls) { var control = controls[i]; if (control.getDisabled()) { control.setDisabled(false); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isRecording() {\n return false;\n }", "isRecording() {\n return this.recording;\n }", "get isRecording() {\n return this._isRecording;\n }", "function DisabledAllRecording() {\n var controls = Xrm.Page.ui.controls.get();\n for (var i in controls) {\n var control = controls[i];\...
[ "0.6703546", "0.63631654", "0.6329502", "0.60726404", "0.5987828", "0.5889565", "0.5869559", "0.57641834", "0.57210493", "0.5704869", "0.5681098", "0.56200284", "0.55990154", "0.5557084", "0.5543055", "0.55426073", "0.54653335", "0.54536617", "0.5452813", "0.54468244", "0.537...
0.66588366
1
Setar Link em um Iframe "IFRAME_Inadimplente",(" + Xrm.Page.getAttribute('accountnumber').getValue())
function setLinkIframe(iframe, value) { var pageElement = Xrm.Page.getControl(iframe); if ((value == null) || (statusForm() == 1) || (statusForm() == 5)) { pageElement.setSrc("about:blank"); } else { pageElement.setSrc(value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyLink() {\n\tvar object = document.getElementById(\"Radicado\");\n\tvar ticket = document.getElementById(\"Ticket\");\n\tticket.value = \"http://jvargas:8080/LabelGenerator/view/rotuloFrames.jsp?params=Radicado=\"\n\t\t\t+ object.value;\n\tdocument.getElementById(\"LINK_Ticket\").href = ticket.value;...
[ "0.6108932", "0.56459635", "0.5346427", "0.5294723", "0.5284612", "0.526533", "0.52110744", "0.52081406", "0.5195236", "0.5113482", "0.51110554", "0.5064271", "0.50625205", "0.5050574", "0.5043674", "0.5036588", "0.50195", "0.5016498", "0.500343", "0.4987448", "0.49853924", ...
0.6647571
0
Atribuir Valores Automaticos Preencidos Exemplo: "totalallotments",0 "firstname",Xrm.Page.getAttribute('companyname').getValue() "new_dataehorasaidareal", "new_dataehorasaidaprevista"
function assignValorsesFull(attribut, value) { Xrm.Page.getAttribute(attribut).setValue(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aumentarData(attribute, campoData, valor, diaMesAno) {\n if ((valor != null) && (Xrm.Page.getAttribute(campoData).getValue() != null)) {\n var primeiradata = Xrm.Page.getAttribute(campoData).getValue();\n if (diaMesAno == 'Dia') {\n primeiradata.setDate(primeiradata.getDate() +...
[ "0.6273731", "0.5943129", "0.5733678", "0.55900323", "0.5516378", "0.5499613", "0.5489238", "0.54815805", "0.5461504", "0.54569435", "0.5454002", "0.5433245", "0.5431326", "0.542899", "0.5411006", "0.5357603", "0.5350551", "0.533866", "0.53361464", "0.5334161", "0.5328256", ...
0.63769364
0
Acrescentar Data Exemplo "expireson","new_datadeemissao",Xrm.Page.getAttribute('new_vigenciameses').getValue(),"Mes"
function aumentarData(attribute, campoData, valor, diaMesAno) { if ((valor != null) && (Xrm.Page.getAttribute(campoData).getValue() != null)) { var primeiradata = Xrm.Page.getAttribute(campoData).getValue(); if (diaMesAno == 'Dia') { primeiradata.setDate(primeiradata.getDate() + valor); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDiaMesData(campoDia, campoMes, campoData) {\n if (Xrm.Page.getAttribute(campoData).getValue() != null) {\n var data = Xrm.Page.getAttribute(campoData).getValue();\n Xrm.Page.getAttribute(campoDia).setValue(data.getDate());\n Xrm.Page.getAttribute(campoMes).setValue(data.getMonth...
[ "0.6064544", "0.5791574", "0.5784845", "0.57106805", "0.5563524", "0.55226314", "0.5374908", "0.53464395", "0.53404397", "0.52712995", "0.52525014", "0.5245545", "0.5213338", "0.5211504", "0.5211263", "0.5211022", "0.5204486", "0.519281", "0.51730925", "0.5169021", "0.5157597...
0.6892346
0
Nome: expandedCollapsed Objetivo: Expandir ou Minimizar uma Tab Paramentros: tab (numero da tab a ser alterada) acao (expanded collapsed) Retorno: Exemplo: 1, 'expanded'
function expandedCollapsed(tab, acao) { Xrm.Page.ui.tabs.get(tab).setDisplayState(acao); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeExpanded(testCase) {\n testCase.expanded = !testCase.expanded;\n }", "expand() {\n const that = this;\n\n if (!that.collapsible || !that.collapsed) {\n return;\n }\n\n that.collapsed = false;\n }", "static expandData () {\n $('tb...
[ "0.65073097", "0.6299731", "0.62423754", "0.609445", "0.60504556", "0.60239303", "0.6017202", "0.60167766", "0.5990826", "0.59436095", "0.59342515", "0.58870065", "0.58784354", "0.5853406", "0.5848289", "0.58469045", "0.5841041", "0.5841041", "0.58233756", "0.5779684", "0.577...
0.78598535
0
Delivery Confirmation Event This event is sent to confirm the delivery of a message. Read more about these fields at
function receivedDeliveryConfirmation(event) { //var senderID = event.sender.id //var recipientID = event.recipient.id var delivery = event.delivery var messageIDs = delivery.mids //var watermark = delivery.watermark //var sequenceNumber = delivery.seq if (messageIDs) { messageIDs.forEach(function(messageID) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receivedDeliveryConfirmation(event) {\n messageHandler.receivedDeliveryConfirmation(event);\n }", "function receivedDeliveryConfirmation(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var delivery = event.delivery;\n var messageIDs = delivery.mids;\n...
[ "0.8390071", "0.8130265", "0.812501", "0.812501", "0.80516815", "0.80516815", "0.80401784", "0.80337596", "0.80337596", "0.799462", "0.7975876", "0.7835079", "0.7815411", "0.7759389", "0.60306174", "0.5970343", "0.5787451", "0.5775653", "0.55429745", "0.53768295", "0.534313",...
0.83274627
1
Get every region in a particular island
function getIslandRegions (island, db = connection) { if (island === 'all') { island = '%' } return db('regions') .where(db.raw('LOWER(island)'), 'like', island.toLowerCase()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRegionsInView()\n {\n var bottomLeftPos = this.screenToWorldPos(0, window.innerHeight);\n var bottomLeftRegion = WORLD.getRegionPositionFromWorldPosition(bottomLeftPos.x, bottomLeftPos.y);\n\n var xRegionMax = Math.floor(((bottomLeftRegion.x + window.innerWidth) / REGION_WIDTH) / this.zo...
[ "0.6846231", "0.683186", "0.6703581", "0.6688492", "0.6620921", "0.65233696", "0.6498039", "0.64069784", "0.6370782", "0.63667256", "0.6230282", "0.62182415", "0.61285627", "0.60503775", "0.5993195", "0.5938009", "0.59199077", "0.5906761", "0.5905611", "0.58994335", "0.588286...
0.7859369
0
GitHub has a nasty habit of stripping whitespace from messages and losing the timezone. This information is required to make our hashes match up, so we guess it by mutating the value till the hash matches. If we're unable to match, we will just force the hash when saving to the cache.
function fixDate(type, value, hash) { if (type !== "commit" && type !== "tag") return; // Add up to 3 extra newlines and try all 30-minutes timezone offsets. var clone = JSON.parse(JSON.stringify(value)); for (var x = 0; x < 3; x++) { for (var i = -720; i < 720; i += 30) { if (type === "commit") { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hashTimestamp() {\n randSuffix = 1000000000;\n // removing vowels reduces chance of bad words and numerical confusion\n var charDict = {\n '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n A: 'B',\n ...
[ "0.5412964", "0.53027725", "0.52220106", "0.51415133", "0.5136568", "0.50622857", "0.49650228", "0.49507752", "0.4859328", "0.48553795", "0.48536104", "0.48330188", "0.48106822", "0.4808107", "0.4793779", "0.47594988", "0.47577536", "0.47528765", "0.47493073", "0.4748756", "0...
0.6269227
0
Init Databases (called on profile creation?)
function initDatabases(callback) { db = {}; db.games = new Datastore({ filename: './databases/games.db', autoload: true }); db.achievements = new Datastore({ filename: './databases/achievements.db', autoload: true }); db.activities = new Datastore({ fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeDatabase() {\n //Drop collections\n mTools.dropCollection(GlobalAttributes, \"GlobalAttributes\", {}, function(cbParams) { console.log(\"[Info] Collection GlobalAttributes dropped!\"); });\n try {\n mTools.dropCollection(User, \"Users\", {}, function(cbParams) { console.log(\"[Info] Colle...
[ "0.77158177", "0.7708143", "0.76250654", "0.75525105", "0.7336638", "0.7283556", "0.72591686", "0.7242141", "0.72238326", "0.69969773", "0.69613385", "0.69605374", "0.69465435", "0.6923708", "0.69203925", "0.69172347", "0.6887652", "0.6880737", "0.6879998", "0.68563485", "0.6...
0.7742738
0
Store activity for /Network relay
function storeActivity(nsp, activity) { db.activities.insert(doc, function(err, doc){ if (err) { console.log("[!] Error storing activity: "+err); } else { nsp.emit('network', {activity: doc}); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_outgoing() {\n // Try to fill in the displayName from contacts.\n const contacts = this.app.state.contacts.contacts\n let displayName = ''\n for (const id of Object.keys(contacts)) {\n if (contacts[id].number === parseInt(this.number)) {\n displayName = contac...
[ "0.53202415", "0.5307171", "0.53007865", "0.5235851", "0.51830155", "0.5181092", "0.50814486", "0.5070719", "0.5057776", "0.50524306", "0.504515", "0.50267255", "0.5020938", "0.4992689", "0.4990941", "0.49861777", "0.49818927", "0.49674955", "0.49666452", "0.49484915", "0.492...
0.59071034
0