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 |
|---|---|---|---|---|---|---|
Creates a new ``AWS::Lambda::EventSourceMapping``. | constructor(parent, name, properties) {
super(parent, name, { type: EventSourceMappingResource.resourceTypeName, properties });
cdk.requireProperty(properties, 'eventSourceArn', this);
cdk.requireProperty(properties, 'functionName', this);
this.eventSourceMappingName = th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"constructor(parent, name, properties) {\n super(parent, name, { type: CfnEventSourceMapping.resourceTypeName, properties });\n cdk.requireProperty(properties, 'eventSourceArn', this);\n cdk.requireProperty(properties, 'functionName', this);\n this.eventSourceMappingName = this.ref.toStr... | [
"0.58941615",
"0.5454681",
"0.5419051",
"0.53131086",
"0.5256173",
"0.5076962",
"0.49344844",
"0.4920132",
"0.49071157",
"0.4900797",
"0.48360637",
"0.48190355",
"0.48144877",
"0.48105374",
"0.4805183",
"0.47465837",
"0.47456533",
"0.47455457",
"0.47414133",
"0.47414133",
"0.... | 0.5767313 | 1 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.Code`` resource | function cfnFunctionCodePropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnFunction_CodePropertyValidator(properties).assertSuccess();
return {
S3Bucket: cdk.stringToCloudFormation(properties.s3Bucket),
S3Key: cdk.stringToCloudFormat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function functionResourceCodePropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n FunctionResource_CodePropertyValidator(properties).assertSuccess();\n return {\n S3Bucket: cdk.stringToCloudFormation(properties.s3Bu... | [
"0.67373985",
"0.625641",
"0.62491345",
"0.5850556",
"0.5703482",
"0.5589966",
"0.5589966",
"0.55889064",
"0.55889064",
"0.5535177",
"0.55177134",
"0.5501963",
"0.54826105",
"0.54826105",
"0.5481842",
"0.5434617",
"0.53798366",
"0.5349074",
"0.5324064",
"0.53153723",
"0.53124... | 0.65540665 | 1 |
Determine whether the given properties match those of a ``DeadLetterConfigProperty`` | function CfnFunction_DeadLetterConfigPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('targetArn', cdk.validateString)(properties.targetArn));
return errors.wra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FunctionResource_DeadLetterConfigPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('targetArn', cdk.validateString)(properties... | [
"0.6953942",
"0.67808086",
"0.61072165",
"0.6082233",
"0.6077218",
"0.59332955",
"0.5929329",
"0.5927807",
"0.584187",
"0.58258915",
"0.5822756",
"0.58201355",
"0.5758683",
"0.57124686",
"0.5706429",
"0.56873226",
"0.5624867",
"0.55948675",
"0.5592845",
"0.5592294",
"0.558991... | 0.69586945 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.DeadLetterConfig`` resource | function cfnFunctionDeadLetterConfigPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnFunction_DeadLetterConfigPropertyValidator(properties).assertSuccess();
return {
TargetArn: cdk.stringToCloudFormation(properties.targetArn),
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function functionResourceDeadLetterConfigPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n FunctionResource_DeadLetterConfigPropertyValidator(properties).assertSuccess();\n return {\n TargetArn: cdk.stringToCloud... | [
"0.67562497",
"0.61415005",
"0.61183995",
"0.5769516",
"0.5769516",
"0.49101081",
"0.4880994",
"0.48682243",
"0.4815941",
"0.47877568",
"0.47555578",
"0.47043398",
"0.47031903",
"0.47030735",
"0.46831465",
"0.46198595",
"0.45758808",
"0.4553361",
"0.45524353",
"0.4529574",
"0... | 0.67312723 | 1 |
Determine whether the given properties match those of a ``EnvironmentProperty`` | function CfnFunction_EnvironmentPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('variables', cdk.hashValidator(cdk.validateString))(properties.variables));
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FunctionResource_EnvironmentPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('variables', cdk.hashValidator(cdk.validateStrin... | [
"0.70045197",
"0.69467306",
"0.6105944",
"0.6038032",
"0.59839106",
"0.59185785",
"0.58956134",
"0.58307695",
"0.57524854",
"0.5740963",
"0.57350475",
"0.57218677",
"0.5699411",
"0.5699411",
"0.55792576",
"0.5471995",
"0.5447118",
"0.54401165",
"0.5368954",
"0.52989125",
"0.5... | 0.6952866 | 1 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.Environment`` resource | function cfnFunctionEnvironmentPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnFunction_EnvironmentPropertyValidator(properties).assertSuccess();
return {
Variables: cdk.hashMapper(cdk.stringToCloudFormation)(properties.variables),
};... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function functionResourceEnvironmentPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n FunctionResource_EnvironmentPropertyValidator(properties).assertSuccess();\n return {\n Variables: cdk.hashMapper(cdk.stringTo... | [
"0.6504908",
"0.5983347",
"0.5983347",
"0.58737266",
"0.5562456",
"0.5468503",
"0.54325575",
"0.52894515",
"0.52171093",
"0.51378316",
"0.51378316",
"0.5047403",
"0.5041139",
"0.5041139",
"0.49963126",
"0.49914467",
"0.4981828",
"0.49815378",
"0.4970541",
"0.49553415",
"0.491... | 0.6079456 | 1 |
Determine whether the given properties match those of a ``TracingConfigProperty`` | function CfnFunction_TracingConfigPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('mode', cdk.validateString)(properties.mode));
return errors.wrap('supplied p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FunctionResource_TracingConfigPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('mode', cdk.validateString)(properties.mode));... | [
"0.6670962",
"0.6520648",
"0.5988794",
"0.57896864",
"0.57886446",
"0.57457393",
"0.56479126",
"0.56415117",
"0.5640198",
"0.5584856",
"0.5584856",
"0.55619043",
"0.5541706",
"0.5447444",
"0.5445027",
"0.54424226",
"0.5433466",
"0.5393196",
"0.53871423",
"0.5377002",
"0.53713... | 0.6654248 | 1 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.TracingConfig`` resource | function cfnFunctionTracingConfigPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnFunction_TracingConfigPropertyValidator(properties).assertSuccess();
return {
Mode: cdk.stringToCloudFormation(properties.mode),
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function functionResourceTracingConfigPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n FunctionResource_TracingConfigPropertyValidator(properties).assertSuccess();\n return {\n Mode: cdk.stringToCloudFormation(p... | [
"0.66018087",
"0.5448709",
"0.5405699",
"0.5335301",
"0.5335301",
"0.52961886",
"0.52832747",
"0.5273517",
"0.52521384",
"0.52521384",
"0.52324456",
"0.5200744",
"0.5200744",
"0.5165923",
"0.51584953",
"0.5153408",
"0.5148746",
"0.5148746",
"0.5148118",
"0.51446325",
"0.51429... | 0.6129187 | 1 |
Determine whether the given properties match those of a ``FunctionResourceProps`` | function FunctionResourcePropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('code', cdk.requiredValidator)(properties.code));
errors.collect(... | {
"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.64662254",
"0.6237261",
"0.6212986",
"0.61861056",
"0.61402994",
"0.613468",
"0.6041425",
"0.59917456",
"0.59917456",
"0.5984952",
"0.59655553",
"0.5941598",
"0.58848697",
"0.58841705",
"0.5845127",
"0.5810055",
"0.5809587",
"0.5794892",
"0.57803684",
"0.5777892",
"0.57335... | 0.6453756 | 1 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function`` resource | function functionResourcePropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
FunctionResourcePropsValidator(properties).assertSuccess();
return {
Code: functionResourceCodePropertyToCloudFormation(properties.code),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function versionResourcePropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n VersionResourcePropsValidator(properties).assertSuccess();\n return {\n FunctionName: cdk.stringToCloudFormation(properties.functionName),\n ... | [
"0.64321315",
"0.64170295",
"0.64170295",
"0.6383664",
"0.63490117",
"0.6331945",
"0.6211825",
"0.61785984",
"0.61785984",
"0.61705786",
"0.6132365",
"0.61149293",
"0.60752577",
"0.6028279",
"0.60100514",
"0.6002892",
"0.60023093",
"0.59703594",
"0.59703594",
"0.5966861",
"0.... | 0.68862617 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.Code`` resource | function functionResourceCodePropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
FunctionResource_CodePropertyValidator(properties).assertSuccess();
return {
S3Bucket: cdk.stringToCloudFormation(properties.s3Bucket),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cfnFunctionCodePropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_CodePropertyValidator(properties).assertSuccess();\n return {\n S3Bucket: cdk.stringToCloudFormation(properties.s3Bucket),\n S3Key: cdk.stringT... | [
"0.655534",
"0.6258323",
"0.62498236",
"0.58517444",
"0.5703869",
"0.55901957",
"0.55901957",
"0.55899704",
"0.55899704",
"0.5535831",
"0.5518376",
"0.5501967",
"0.54831505",
"0.548205",
"0.548205",
"0.5435494",
"0.53810847",
"0.53501666",
"0.53238714",
"0.53169787",
"0.53131... | 0.6739018 | 0 |
Determine whether the given properties match those of a ``DeadLetterConfigProperty`` | function FunctionResource_DeadLetterConfigPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('targetArn', cdk.validateString)(properties.targetArn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CfnFunction_DeadLetterConfigPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('targetArn', cdk.validateString)(properties.targetArn));\n return... | [
"0.69586945",
"0.67808086",
"0.61072165",
"0.6082233",
"0.6077218",
"0.59332955",
"0.5929329",
"0.5927807",
"0.584187",
"0.58258915",
"0.5822756",
"0.58201355",
"0.5758683",
"0.57124686",
"0.5706429",
"0.56873226",
"0.5624867",
"0.55948675",
"0.5592845",
"0.5592294",
"0.55899... | 0.6953942 | 1 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.DeadLetterConfig`` resource | function functionResourceDeadLetterConfigPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
FunctionResource_DeadLetterConfigPropertyValidator(properties).assertSuccess();
return {
TargetArn: cdk.stringToCloudFormation(p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cfnFunctionDeadLetterConfigPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_DeadLetterConfigPropertyValidator(properties).assertSuccess();\n return {\n TargetArn: cdk.stringToCloudFormation(properties.targetArn),\n... | [
"0.67312723",
"0.61415005",
"0.61183995",
"0.5769516",
"0.5769516",
"0.49101081",
"0.4880994",
"0.48682243",
"0.4815941",
"0.47877568",
"0.47555578",
"0.47043398",
"0.47031903",
"0.47030735",
"0.46831465",
"0.46198595",
"0.45758808",
"0.4553361",
"0.45524353",
"0.4529574",
"0... | 0.67562497 | 0 |
Determine whether the given properties match those of a ``EnvironmentProperty`` | function FunctionResource_EnvironmentPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('variables', cdk.hashValidator(cdk.validateString))(proper... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CfnFunction_EnvironmentPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('variables', cdk.hashValidator(cdk.validateString))(properties.variables)... | [
"0.6950811",
"0.69501424",
"0.61105347",
"0.6036151",
"0.5982218",
"0.59220374",
"0.589954",
"0.5833782",
"0.5756146",
"0.57403624",
"0.573723",
"0.5724155",
"0.57011324",
"0.57011324",
"0.55823463",
"0.547483",
"0.5451806",
"0.5441675",
"0.5371148",
"0.5301497",
"0.5287005",... | 0.7002661 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.Environment`` resource | function functionResourceEnvironmentPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
FunctionResource_EnvironmentPropertyValidator(properties).assertSuccess();
return {
Variables: cdk.hashMapper(cdk.stringToCloudFormat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cfnFunctionEnvironmentPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_EnvironmentPropertyValidator(properties).assertSuccess();\n return {\n Variables: cdk.hashMapper(cdk.stringToCloudFormation)(properties.variabl... | [
"0.6081017",
"0.598447",
"0.598447",
"0.5875693",
"0.5565542",
"0.5470381",
"0.5434255",
"0.5290875",
"0.52200323",
"0.51388794",
"0.51388794",
"0.50468725",
"0.5041935",
"0.5041935",
"0.49991563",
"0.499212",
"0.49839318",
"0.49838355",
"0.4972208",
"0.49574688",
"0.49198467... | 0.6506903 | 0 |
Determine whether the given properties match those of a ``TracingConfigProperty`` | function FunctionResource_TracingConfigPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('mode', cdk.validateString)(properties.mode));
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CfnFunction_TracingConfigPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('mode', cdk.validateString)(properties.mode));\n return errors.wrap(... | [
"0.6654248",
"0.6520648",
"0.5988794",
"0.57896864",
"0.57886446",
"0.57457393",
"0.56479126",
"0.56415117",
"0.5640198",
"0.5584856",
"0.5584856",
"0.55619043",
"0.5541706",
"0.5447444",
"0.5445027",
"0.54424226",
"0.5433466",
"0.5393196",
"0.53871423",
"0.5377002",
"0.53713... | 0.6670962 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.TracingConfig`` resource | function functionResourceTracingConfigPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
FunctionResource_TracingConfigPropertyValidator(properties).assertSuccess();
return {
Mode: cdk.stringToCloudFormation(properties.m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cfnFunctionTracingConfigPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_TracingConfigPropertyValidator(properties).assertSuccess();\n return {\n Mode: cdk.stringToCloudFormation(properties.mode),\n };\n}",
"i... | [
"0.6129187",
"0.5448709",
"0.5405699",
"0.5335301",
"0.5335301",
"0.52961886",
"0.52832747",
"0.5273517",
"0.52521384",
"0.52521384",
"0.52324456",
"0.5200744",
"0.5200744",
"0.5165923",
"0.51584953",
"0.5153408",
"0.5148746",
"0.5148746",
"0.5148118",
"0.51446325",
"0.514293... | 0.66018087 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Function.VpcConfig`` resource | function functionResourceVpcConfigPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
FunctionResource_VpcConfigPropertyValidator(properties).assertSuccess();
return {
SecurityGroupIds: cdk.listMapper(cdk.stringToCloudFor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cfnFunctionVpcConfigPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_VpcConfigPropertyValidator(properties).assertSuccess();\n return {\n SecurityGroupIds: cdk.listMapper(cdk.stringToCloudFormation)(properties.secu... | [
"0.5869367",
"0.5869367",
"0.5869367",
"0.5619296",
"0.5615998",
"0.55770665",
"0.5481506",
"0.54777414",
"0.54446775",
"0.54428965",
"0.5395085",
"0.52980715",
"0.52883476",
"0.52802885",
"0.52795833",
"0.52631783",
"0.5240992",
"0.51906693",
"0.51906693",
"0.51883894",
"0.5... | 0.61460733 | 0 |
Determine whether the given properties match those of a ``CfnPermissionProps`` | function CfnPermissionPropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('action', cdk.requiredValidator)(properties.action));
errors.collect(cdk.propertyValidator('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CfnPermissionPropsValidator(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 received: '... | [
"0.7146903",
"0.69203657",
"0.6604554",
"0.6601434",
"0.6419819",
"0.62404233",
"0.6238093",
"0.6202983",
"0.61211824",
"0.6083189",
"0.6008936",
"0.60066044",
"0.5986621",
"0.58658373",
"0.58571947",
"0.5812262",
"0.5807317",
"0.58068687",
"0.580372",
"0.58008546",
"0.580065... | 0.7054416 | 1 |
Determine whether the given properties match those of a ``PermissionResourceProps`` | function PermissionResourcePropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('action', cdk.requiredValidator)(properties.action));
errors.co... | {
"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.6350086",
"0.62251395",
"0.61757255",
"0.6060115",
"0.6041245",
"0.60124594",
"0.598051",
"0.5974098",
"0.59713185",
"0.59688044",
"0.5944625",
"0.58943295",
"0.58913934",
"0.58629596",
"0.58053786",
"0.5745637",
"0.5648403",
"0.5612315",
"0.5570025",
"0.5564891",
"0.55487... | 0.70778364 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Permission`` resource | function permissionResourcePropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
PermissionResourcePropsValidator(properties).assertSuccess();
return {
Action: cdk.stringToCloudFormation(properties.action),
Functio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cfnPermissionPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPermissionPropsValidator(properties).assertSuccess();\n return {\n Actions: cdk.listMapper(cdk.stringToCloudFormation)(properties.actions),\n CertificateAuth... | [
"0.615054",
"0.61468995",
"0.6129004",
"0.57469434",
"0.5688821",
"0.56855077",
"0.54633176",
"0.535269",
"0.53268784",
"0.532198",
"0.52807516",
"0.52807516",
"0.526881",
"0.52381134",
"0.52159053",
"0.5198074",
"0.51718277",
"0.5166537",
"0.51639825",
"0.51330125",
"0.50466... | 0.68766385 | 0 |
Determine whether the given properties match those of a ``CfnVersionProps`` | function CfnVersionPropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('codeSha256', cdk.validateString)(properties.codeSha256));
errors.collect(cdk.propertyValidator... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CfnLayerVersionPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('compatibleRuntimes', cdk.listValidator(cdk.validateString))(properties.compatibleRu... | [
"0.70497096",
"0.7010352",
"0.6829054",
"0.6503107",
"0.632343",
"0.61951816",
"0.6133886",
"0.6063496",
"0.6006008",
"0.59774584",
"0.59242684",
"0.59191966",
"0.59191775",
"0.5893978",
"0.5887455",
"0.5884924",
"0.58818567",
"0.58804953",
"0.58652276",
"0.58641696",
"0.5862... | 0.7310202 | 0 |
Determine whether the given properties match those of a ``VersionResourceProps`` | function VersionResourcePropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
errors.collect(cdk.propertyValidator('codeSha256', cdk.validateString)(properties.codeSha256));
errors.... | {
"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.6689264",
"0.62441796",
"0.6178139",
"0.61323446",
"0.5868649",
"0.5862887",
"0.58480525",
"0.5848",
"0.5804333",
"0.5769974",
"0.5767684",
"0.5758266",
"0.5750558",
"0.57228273",
"0.5713188",
"0.5686577",
"0.5661011",
"0.5597026",
"0.55775756",
"0.55594",
"0.55594",
"0.... | 0.7135862 | 0 |
Renders the AWS CloudFormation properties of an ``AWS::Lambda::Version`` resource | function versionResourcePropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
VersionResourcePropsValidator(properties).assertSuccess();
return {
FunctionName: cdk.stringToCloudFormation(properties.functionName),
C... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"constructor(parent, name, properties) {\n super(parent, name, { type: VersionResource.resourceTypeName, properties });\n cdk.requireProperty(properties, 'functionName', this);\n this.version = this.getAtt('Version').toString();\n this.versionArn = this.ref.toString();\n ... | [
"0.6259791",
"0.6134855",
"0.58993137",
"0.58856285",
"0.58536446",
"0.5613935",
"0.55053645",
"0.54929197",
"0.54761016",
"0.540568",
"0.539509",
"0.53010404",
"0.5296117",
"0.52702063",
"0.51648283",
"0.5154939",
"0.5154939",
"0.5137414",
"0.50069815",
"0.49816498",
"0.4971... | 0.6812964 | 0 |
Function to display initial message and input vehicle name field. | function vehicleDetails(){
document.getElementById('employeeRegistrationForm').style.display = "none";
messageField.innerHTML = "Your employee id = 1. Please enter vehicle name."
document.getElementById('employeeId').style.display = "block";
document.getElementById("vehicleName").style.display="block";
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function carTxt(field, extra) {\n // Text to use for the resource type of 'car'\n var txt;\n if (!extra) {\n extra = '';\n }\n switch(field) {\n case 'modalTitle':\n txt = 'ClinGen Allele Registry';\n break;\n case 'inputLabel':\n txt = 'Enter CA... | [
"0.61245555",
"0.6000766",
"0.58783114",
"0.57531387",
"0.57404065",
"0.5666698",
"0.56184363",
"0.56124866",
"0.55824906",
"0.5564225",
"0.55493236",
"0.55303055",
"0.5522984",
"0.54887784",
"0.54860795",
"0.5474563",
"0.54482985",
"0.54482377",
"0.5439674",
"0.54174423",
"0... | 0.6945852 | 0 |
function to display pass details | function passDetails(){
document.getElementById('vehicleRegistrationForm').style.display ="none";
messageField.innerHTML = "Choose Pass";
document.getElementById("passForm").style.display="block";
document.getElementById("getPass").style.display="block";
inputField = "passChoice";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"drawPass(passName : string) {\n }",
"function showPass() {\n if($scope.checkPass)\n $scope.typeInputPass = 'text';\n else\n $scope.typeInputPass = 'password';\n }",
"function priv_info() {\n var retv = \"<div style=\\\"font-size:12px\\\">\";\n ... | [
"0.6507186",
"0.614741",
"0.599723",
"0.596285",
"0.5884767",
"0.5852024",
"0.5827992",
"0.5738136",
"0.57086086",
"0.56958973",
"0.56935847",
"0.5677776",
"0.5670091",
"0.56300426",
"0.56264883",
"0.55918896",
"0.55562705",
"0.5553364",
"0.55313224",
"0.5494595",
"0.5490161"... | 0.61881393 | 1 |
validating vehicle type selected | function validateVehicleType(){
var vehicle = document.getElementById('vehicleType');
var dailyValue, monthlyValue, yearlyValue;
selectedOption = vehicle.options[vehicle.selectedIndex].value;
if ((selectedOption != 'cycle') && (selectedOption != 'motorcycle') && (selectedOption != 'fourwheeler')) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function instanceAddCheckType() {\n var instanceType = $(instanceAddPage.typeFilter).val();\n var validInstanceTypes = $(instanceAddPage.typeSelect + ' option').map(function() { return $(this).val(); });\n\n if($.inArray(instanceType, validInstanceTypes) === -1) {\n instanceAddDisplayErrorMsg... | [
"0.6525713",
"0.64276487",
"0.6270909",
"0.6116266",
"0.6080873",
"0.600125",
"0.59372777",
"0.5900775",
"0.5896692",
"0.58845943",
"0.5873576",
"0.5864934",
"0.5849774",
"0.58295316",
"0.58188283",
"0.5800487",
"0.57807165",
"0.57769644",
"0.57687545",
"0.5686756",
"0.567761... | 0.6653657 | 0 |
Account currently only handles a single accounts and is limited by the object's ledger only storing date, amount, and balance for each transaction. Doesn't really make sense to have separate objects for each account as it seems to only complicate the interoperation of transactions. This should be rewritten to handle al... | function ledger(accounts){
this.accounts = accounts;
this.ledgerData = {}; //ledgerData is an object with properties named [getTime()] corresponding to dates when account activity occurs.
//XXXXX.transactions = [{description: blah, accounts: [account 1 change, account 2 change, ... , acc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Account() {\n\treturn {\n\t\taccountName: '',\n\t\tdomElement: $,\n\t\tbalance: 0,\n\t\tdeposit: function(amt) {\n\t\t\tthis.balance += amt;\n\t\t\tthis.refreshBalance();\n\t\t\tthis.logTransaction(amt, 'deposit');\n\t\t},\n\t\twithdraw: function(amt, type) {\n\t\t\tthis.balance -= amt;\n\t\t\tthis.refres... | [
"0.6517306",
"0.64322054",
"0.63476837",
"0.6314311",
"0.61131203",
"0.6102393",
"0.6014664",
"0.6010988",
"0.59200025",
"0.5896398",
"0.577238",
"0.5762613",
"0.5756733",
"0.56931704",
"0.5672897",
"0.5618787",
"0.5608679",
"0.5594589",
"0.55890125",
"0.55630636",
"0.5512497... | 0.71173394 | 0 |
Reducer for the postedit form | function postToBeEdited(state = initialEditPost, action) {
switch(action.type) {
case WRITE_EDIT_POST:
const { post } = action;
return {
"id": post.id,
"title": post.title,
"body": post.body,
"category": post.category,
}
case RESET_EDIT_POST:
return ini... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function postReducer(state = posts, action) {\r\n switch (action.type) {\r\n case \"REMOVE_POST\":\r\n return [\r\n ...state.slice(0, action.index),\r\n ...state.slice(action.index + 1),\r\n ];\r\n case \"ADD_POST\":\r\n return [...state, action.post];\r\n default:\r\n r... | [
"0.65157586",
"0.64032274",
"0.60903984",
"0.6062849",
"0.58724695",
"0.58476084",
"0.5769417",
"0.5748058",
"0.57382786",
"0.5720206",
"0.5719076",
"0.5715806",
"0.57076263",
"0.5702863",
"0.567119",
"0.56685823",
"0.56628686",
"0.56479913",
"0.56478727",
"0.5644148",
"0.564... | 0.64142907 | 1 |
Reducer for commentedit form | function commentToBeEdited(state = initialEditComment, action) {
switch(action.type) {
case WRITE_EDIT_COMMENT:
const { comment } = action;
return {
"id": comment.id,
"body": comment.body
}
case RESET_EDIT_COMMENT:
return initialEditComment;
default:
return s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function EditDeleteComment({ comment, post }) {\n\n // Constantes useState\n const [isAuthor, setIsAuthor] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n const [edit, setEdit] = useState(false);\n const [content, setContent] = useState('');\n\n // Constante permettant d... | [
"0.64351577",
"0.62198734",
"0.6193731",
"0.6120799",
"0.61191916",
"0.60853726",
"0.60370904",
"0.5998788",
"0.5988354",
"0.5975559",
"0.5850536",
"0.58236337",
"0.58199793",
"0.5805553",
"0.57779825",
"0.5729897",
"0.571482",
"0.56930846",
"0.5689494",
"0.5671182",
"0.56333... | 0.6370571 | 1 |
Reducer for switching visibility of the addcomment form | function commentFormVisible(state = false, action) {
const { visible } = action;
switch(action.type) {
case SWITCH_FORM_VISIBILITY:
return visible;
default:
return state;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"toggleAddShareForm({ commit, state }) {\n let visibility = !state.shareFormIsVisible;\n commit(\"TOGGLE_SHARE_FORM\", visibility);\n }",
"onAddSuppliesClick() {\n const edit = this.state.editing;\n const visible = this.state.inputsVisible;\n this.setState({\n editing: !edit,\n ... | [
"0.5959792",
"0.58291763",
"0.5722681",
"0.5674971",
"0.56164473",
"0.55882704",
"0.5572675",
"0.55541295",
"0.55488265",
"0.55355734",
"0.5532109",
"0.5462898",
"0.5457841",
"0.54513836",
"0.54382575",
"0.5414297",
"0.5414014",
"0.5401487",
"0.5396184",
"0.5366505",
"0.53435... | 0.6604261 | 0 |
sync entities from OData to local database | function sync() {
return northwindRemote.Categories.toArray()
.then(function (categories) {
northwind.Categories.addMany(categories);
})
.then(function () {
return northwindRemote.Products.toArray()
.then(function (products)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateEntityStore() {\n var storageString = JSON.stringify(entities)\n database.put('entities',storageString)\n }",
"function sync() {\n showStatus('good', 'Syncing...');\n localDB.replicate.to(remoteDB);\n localDB.replicate.from(remoteDB);\n }",
"function sync() {\n syncDom.setAt... | [
"0.6333496",
"0.60011446",
"0.5748527",
"0.5607598",
"0.56057584",
"0.55680525",
"0.55680525",
"0.55574685",
"0.55393606",
"0.54989696",
"0.548241",
"0.5479871",
"0.54679763",
"0.54603255",
"0.54535913",
"0.545277",
"0.5434755",
"0.5333406",
"0.5332254",
"0.5330954",
"0.53109... | 0.6681732 | 0 |
Get the file system | function getFileSystem() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
function (fileSystem) {
root = fileSystem.root;
console.log('fileSystem: ' + root.toURL());
listDownloadDir(root);
}, function (err) {
console.error('Failed to get a fil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFileSystem() {\n var deferred = $q.defer();\n if (angular.isUndefined(fileSystem))\n {\n $window.PersistentStorage.requestQuota(FSConfig.Size,\n function(grantedBytes) {\n if (grantedBytes < FSConfig.Size)\n ... | [
"0.6907508",
"0.6618735",
"0.65547514",
"0.64916664",
"0.5963854",
"0.5935766",
"0.5926077",
"0.5900342",
"0.5895636",
"0.5882784",
"0.5811122",
"0.5779321",
"0.5725678",
"0.5706777",
"0.5701269",
"0.5696638",
"0.56831354",
"0.568071",
"0.56715643",
"0.56528306",
"0.5629959",... | 0.7077839 | 0 |
on component mount checks if page exists | componentWillMount() {
this.checkIfPageExists();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"componentDidMount() {\n this.handleCurrentPageCheck();\n }",
"prePage(){\n if(this.pageContent === null){\n return (\n <div className='center'>\n loading...\n </div>\n )\n }else if(this.pageContent === true){\n return... | [
"0.67306995",
"0.65387255",
"0.6282984",
"0.609402",
"0.60646415",
"0.60542107",
"0.6043956",
"0.6037149",
"0.6000039",
"0.59090614",
"0.59090614",
"0.590556",
"0.590556",
"0.58905756",
"0.5832391",
"0.5807181",
"0.5787671",
"0.5784758",
"0.5784529",
"0.57683355",
"0.57073706... | 0.81868184 | 0 |
reg host and run fn | function PROC(item) {
if (host.indexOf(item.host) !== -1) {
item.fn();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function run(func, params) { window[func](params); }",
"function run(func, params) { window[func](params); }",
"function run() {}",
"static RegisterHost() {}",
"function run(fun) {\n fun(); // Executa a funcao passada como parametro\n}",
"function run (fun) {\n fun() \n}",
"function run(fun){\n ... | [
"0.6120893",
"0.6120893",
"0.60436875",
"0.59741145",
"0.58662254",
"0.5863099",
"0.5821598",
"0.5821598",
"0.5821598",
"0.5819109",
"0.5807216",
"0.5755803",
"0.5755803",
"0.5755803",
"0.56683755",
"0.55159247",
"0.5508275",
"0.5497626",
"0.5492463",
"0.548361",
"0.5451199",... | 0.6176723 | 0 |
inicializar la lista de chats | function initChatList() {
// elemento ul
var elListaChats = document.getElementById("lista-chats");
for (var i in listChats){
var htmlChatItem =
'<li><div class="avatar">'+
'<img src="'+ listChats[i].imageURL +'" alt="" class="wh-44">'+
'<h4 class="w... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function initChatList() {\n messenger.getChats().forEach(function (chat) {\n addChatElement(chat);\n });\n}",
"function init() {\n \n initChatList();\n}",
"function openOldChats() {\n let roomArray = JSON.parse(sessionStorage.getItem(\"rommies\"));\n\n let room = '';\n let destino =... | [
"0.83633584",
"0.71467584",
"0.6435496",
"0.6304493",
"0.62981087",
"0.62568706",
"0.6203979",
"0.6179827",
"0.61639357",
"0.6160971",
"0.6121896",
"0.6096738",
"0.6049259",
"0.5995801",
"0.5965765",
"0.5960323",
"0.59141654",
"0.5836882",
"0.5825593",
"0.5814238",
"0.5793569... | 0.7319951 | 1 |
x and y axes | function drawAxes() {
//Create the Scale we will use for the XAxis
var axisScale = d3.scale.linear()
.range([0 - outerRadius + radiusWidth, outerRadius - radiusWidth]);
//Create the Axis
var axis = d3.svg.axis()
.scale(axisScale)
.tickFormat("");
var xAxisGroup = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function axis(ctx, color, axisx, axisy, px, d1,py, d2) {\n var w = ctx.canvas.width;\n var h = ctx.canvas.height;\n\n ctx.strokeStyle = color;\n\n //if axis function is below grid function\n // and grid is dotted this removes the axis from\n // dotted back to normal line\n ctx.setLineDash([0, 0]);\n\n //if... | [
"0.67217517",
"0.65334",
"0.64788884",
"0.643537",
"0.64028543",
"0.6383001",
"0.63582593",
"0.63055706",
"0.62889224",
"0.6264557",
"0.6254446",
"0.625013",
"0.6240147",
"0.62293667",
"0.62241125",
"0.62241125",
"0.62237775",
"0.62196267",
"0.6197998",
"0.61930424",
"0.61848... | 0.6604156 | 1 |
setting wins and losses HTML | function winsAndLosses() {
document.getElementById("winning").innerHTML = "You've won " + win + " times";
document.getElementById("losing").innerHTML = "You've lost " + loss + " times";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function winner() {\n userWins++; //ups the win score by one\n $('#win').text(userWins); //updates the HTML with the win\n $('#winLossAlert').text(\"You Won!!!\") //update the HTML with a WIN message\n reset();\n }",
"winner() {\r\n this.state = STATES.win;\r\n this.htmlOverl... | [
"0.70090264",
"0.6939426",
"0.69270694",
"0.68659323",
"0.68574953",
"0.6855745",
"0.68314844",
"0.6803715",
"0.6736826",
"0.67200524",
"0.67111623",
"0.6635484",
"0.66298074",
"0.6618067",
"0.65901095",
"0.65840274",
"0.6575215",
"0.65704644",
"0.656569",
"0.65577185",
"0.65... | 0.69972295 | 1 |
checks for blanks in the word and counts down for each one that goes away | function checkWord() {
for (i = 0; i < answer.length; i++) {
if (guess === answer[i] && letterInWord === false) {
emptyWord[i] = String.fromCharCode(event.keyCode).toLowerCase();
document.getElementById("empty-word").innerHTML = emptyWord.join(" ");
co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cnt(textField){\r\n\tif(textField.value !== null && textField.value.trim().length > 0){\r\n\t\tvar y = textField.value;\r\n\t\tvar count = 0;\r\n\t\ttext = y.replace(/\\s/g,' ');\r\n\t \ttext = text.split(' ');\r\n\t\t\r\n\t\tfor (i=0; i < text.length; i++) {\r\n\t\t\tif (text[i].length > 0) count++;\r\n\... | [
"0.67727935",
"0.6649853",
"0.6628755",
"0.6604723",
"0.64497846",
"0.63821685",
"0.6340509",
"0.6307576",
"0.62653464",
"0.6228822",
"0.6143992",
"0.6143843",
"0.6136872",
"0.6133584",
"0.60972244",
"0.60550314",
"0.6025495",
"0.60144013",
"0.6009707",
"0.59883463",
"0.59622... | 0.69147635 | 0 |
Trying to get the text form the textfield (secret) and add it to the list array | function getText() {
var str = document.getElementById("txt");
list.push(str.value);
str.value = "";
str.focus();
var area = document.getElementById("txtArea");
area.value = "";
for (var i = 0; i < list.length; i++) {
area.value += list[i] + "\n";
console.log(list[i]);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkPassword() {\r\n\r\nvar pw = document.getElementBy(\"pw\").value.toLowerCase();\r\n\r\n\r\nfor (i = 0; i < wordsList.length; i++){\r\n if(pw == wordsList[0])\r\n { var pw = document.getElementBy break; \r\n }\r\n text += \"\"\r\n\r\n }\r\n\r\n\r\n}",
"function joinPassword() {\n va... | [
"0.6169874",
"0.6021183",
"0.5946183",
"0.5833499",
"0.5824382",
"0.58185464",
"0.5808206",
"0.57636136",
"0.57583094",
"0.5741725",
"0.57372534",
"0.57340044",
"0.5715292",
"0.5701164",
"0.56683236",
"0.56281346",
"0.5615636",
"0.5614653",
"0.5594544",
"0.5592287",
"0.557735... | 0.6344464 | 0 |
Return the sound item with given name. | getRandomSound(name) {
var randomSoundList = this.getNSounds(1, -1);
return randomSoundList[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAudioElement(name) {\n if (sounds[name]) {\n for (var i = 0, n = sounds[name].length; i < n; i++) {\n if (sounds[name][i].ended) {\n return sounds[name][i];\n }\n }\n }\n return createAudio(name);\n }",
"fu... | [
"0.7498072",
"0.74376184",
"0.72999877",
"0.7299103",
"0.71726674",
"0.7148712",
"0.7104277",
"0.7085202",
"0.70823056",
"0.7077939",
"0.7047586",
"0.7047586",
"0.7047586",
"0.7047586",
"0.7047586",
"0.7047586",
"0.7047586",
"0.7040857",
"0.7029519",
"0.7023174",
"0.7015092",... | 0.77319515 | 0 |
Return whether or not the sound exists in the sound library. | has(soundName) {
return this._titleCase(soundName) in this.dict;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IsPlaying(name) {\n let result = false;\n this.playingSounds.forEach( (sound)=>{\n if(sound.name == name) result = true;\n });\n return result;\n }",
"checkSound(car) {\n\n this.extensions.carSound.bool = car.scripts.find((e) => {\n return (undefined != e[2].find((f) => {\n ... | [
"0.67005867",
"0.64496547",
"0.6435674",
"0.6280741",
"0.6156466",
"0.6084031",
"0.59769464",
"0.59673935",
"0.59192854",
"0.5911304",
"0.5900945",
"0.58613956",
"0.58613956",
"0.5843967",
"0.5839551",
"0.58305174",
"0.57976073",
"0.57777405",
"0.5703705",
"0.5686678",
"0.567... | 0.72348094 | 0 |
Get a list of sounds with given tag. | getSoundsTagged(tag) {
if (this.getSoundTags().has(tag)) {
var taggedSounds = Object.values(this.dict).filter((soundItem) => {return soundItem.tags.includes(tag)});
return taggedSounds.map((sound) => sound.name);
}
return [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GetArtworksByTagsList(tag){\n var result = [];\n var tagArray = tag.split(':');\n\n /* Loop all the artwork */\n for(var i = 0; i < ArtworkArray.length; i++){\n /* Initialize trigger */\n var CanBeAdd = false;\n\n /* Loop all tag request */\n for(var j = 0; j < tagA... | [
"0.6126562",
"0.59449756",
"0.575653",
"0.57379496",
"0.5669325",
"0.5651839",
"0.5615769",
"0.56030226",
"0.55183196",
"0.5462381",
"0.5430986",
"0.54117084",
"0.53758997",
"0.5349327",
"0.5337193",
"0.5328372",
"0.5312105",
"0.5288054",
"0.5237905",
"0.522986",
"0.52287513"... | 0.79667205 | 0 |
Search the sound library and return candidates for sounds. | search(query) {
this.lastQuery = query;
var soundList = Object.keys(this.dict)
if (this.has(query)) {
return this.get(query)
} else {
// Conduct a substring search among the sound names
var candidates = soundList.filter((soundName) => soundName.toLowerCase().includes(query.toLowerCase(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadSounds(sounds, callback) {\n\tlet name,\n\t\tresult = {},\n\t\tcount = sounds.length;\n\tlet canplay = function () {\n\t\tcount--;\n\t\tif (count == 0) {\n\t\t\tcallback(result);\n\t\t}\n\t};\n\n\tfor (let i = 0; i < sounds.length; i++) {\n\t\tname = sounds[i];\n\t\tresult[name] = new Audio();\n\t\tre... | [
"0.6323386",
"0.62380344",
"0.61365837",
"0.6072137",
"0.6027923",
"0.59393245",
"0.58422905",
"0.572025",
"0.5667184",
"0.5658699",
"0.5652244",
"0.5615895",
"0.55463743",
"0.54994994",
"0.54821926",
"0.54570997",
"0.54452544",
"0.5408303",
"0.53941333",
"0.53557944",
"0.533... | 0.68425536 | 0 |
Change how many beats per measure. | updateNumBeats(beats) {
this.numBeats = beats;
this.positions = this.calcSizeAndPosition();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"fillBeats() {\n let prevBeat, nextBeat, currentInterval, beats;\n prevBeat = 0;\n if (this.events.length > 2) {\n prevBeat = this.events[0];\n }\n\n for (let i = 0; i < this.events.length; i++) {\n nextBeat = this.events[i];\n beats = Math.round((nextBeat - prevBeat) / this.beatInterv... | [
"0.59055",
"0.588964",
"0.5886104",
"0.57261044",
"0.56032574",
"0.5583316",
"0.55219775",
"0.5509536",
"0.5506463",
"0.55052894",
"0.54954803",
"0.5491369",
"0.5467203",
"0.54178894",
"0.5417676",
"0.53794855",
"0.53728527",
"0.53545177",
"0.53333694",
"0.5316154",
"0.530902... | 0.68301487 | 0 |
Set min date to startDate and endDate picker | function setMinDate(startDate, endDate) {
startDate.setAttribute("min", currentDateString);
startDate.addEventListener("change", () => {
endDate.setAttribute("min", startDate.value);
})
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setMin(min) {\n self.datePicker.min = new Date(min);\n }",
"setRange(min, max) {\n self.datePicker.min = new Date(min);\n self.datePicker.max = new Date(max);\n }",
"function setMinDate(val) {\n searchObj.minDate = val;\n }",
"function startChange(that) {\n var start = $(\"#\" +... | [
"0.78568053",
"0.77654296",
"0.7399909",
"0.73841286",
"0.73628086",
"0.7319345",
"0.72832257",
"0.70823437",
"0.70759475",
"0.7027438",
"0.7014206",
"0.69291073",
"0.69291073",
"0.69291073",
"0.69291073",
"0.69291073",
"0.69291073",
"0.69291073",
"0.69291073",
"0.6896616",
"... | 0.79693234 | 0 |
Get properties of clicked event | function getProps(clickedEvent) {
const properties = [];
for (let property in clickedEvent) {
if (clickedEvent.hasOwnProperty(property)) {
properties.push(clickedEvent[property]);
}
}
return properties;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getButtonDetails(e) {\n let eventId, splitId, type, id;\n eventId = e.target.id;\n if (eventId) {\n splitId = eventId.split('-');\n type = splitId[0];\n id = parseInt(splitId[1]);\n buttonAction(type, id);\n }\n}",
"function handleClick() {\nconsole.log(props)\n}"... | [
"0.6289656",
"0.6208674",
"0.61146426",
"0.6000896",
"0.5987067",
"0.5890164",
"0.58352923",
"0.58303875",
"0.58130485",
"0.5764077",
"0.5759494",
"0.5628164",
"0.56273544",
"0.56115586",
"0.56115586",
"0.56096566",
"0.56082803",
"0.55876863",
"0.55779916",
"0.55766666",
"0.5... | 0.7153336 | 0 |
For every field, change it's contents to each specific key and property of the event | function changeFieldContent(keysList, propsList) {
for (let i = 0; i < keysList.length; i++) {
keyFields[i].textContent = keysList[i];
}
for (let i = 0; i < viewFields.length; i++) {
// If event property is empty, write "Not specified"
if (propsList[i] === "" || propsList[i][0] === "... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateData(event) {\n const domainMeta = PROPERTIES[event.type];\n for (const property in domainMeta) {\n let propertyMeta = domainMeta[property];\n propertyMeta.displayElem.textContent = propertyMeta.fxn(event);\n }\n}",
"function inputHandling(e) {\n setInputFields((input) => ({ ...input, ... | [
"0.61925876",
"0.6171014",
"0.61074734",
"0.6021031",
"0.6010457",
"0.5984165",
"0.598287",
"0.59394306",
"0.59306324",
"0.5914133",
"0.59036255",
"0.58926356",
"0.5868639",
"0.5861766",
"0.5858296",
"0.5838547",
"0.5830064",
"0.5812635",
"0.58025086",
"0.5778689",
"0.5774926... | 0.6652488 | 0 |
function to create the memory display table | function createMemoryDisplay() {
var table = document.getElementById("memoryTable");
// remove all current entries in the table
while(table.hasChildNodes()) {
table.removeChild(table.lastChild);
}
// go through and generate each row and cell
for(var i = 0; i < 96; i++) {
// calculate the hex value... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateMemoryDisplay() {\n var table = document.getElementById(\"memoryTable\");\n\n var memory = _MemoryManager.getMemory();\n\n // remove all current entries in the table\n while(table.hasChildNodes()) {\n table.removeChild(table.lastChild);\n }\n\n var memoryIndex = 0;\n\n // go through and ... | [
"0.74262685",
"0.7173104",
"0.666733",
"0.659663",
"0.6551444",
"0.6507309",
"0.6416088",
"0.63386476",
"0.6304134",
"0.6279019",
"0.62269413",
"0.6224536",
"0.6217526",
"0.6099236",
"0.6092133",
"0.60409284",
"0.60146767",
"0.59884864",
"0.59884864",
"0.59884864",
"0.5974763... | 0.78715193 | 0 |
function to update the memory display given a memory array | function updateMemoryDisplay() {
var table = document.getElementById("memoryTable");
var memory = _MemoryManager.getMemory();
// remove all current entries in the table
while(table.hasChildNodes()) {
table.removeChild(table.lastChild);
}
var memoryIndex = 0;
// go through and generate each row a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"updateMemTable(memoryArray) {\n\t\tmemoryArray.forEach((value, index) => {\n\t\t\tthis.memoryCells[index].innerHTML = value;\n\t\t\tthis.memoryCells[index].classList.remove(\"hlon\");\n\t\t});\n\t\tthis.memoryCells[Computer.programCounter].classList.add(\"hlon\");\n\t}",
"refresh() {\n for (let offset = 0... | [
"0.73319167",
"0.6752066",
"0.63849723",
"0.6277974",
"0.62236416",
"0.60202193",
"0.5991956",
"0.596213",
"0.5940745",
"0.5792599",
"0.57796264",
"0.57550156",
"0.5751315",
"0.5733921",
"0.5722893",
"0.5705552",
"0.568033",
"0.5661694",
"0.566038",
"0.5659741",
"0.56219655",... | 0.6929224 | 1 |
function to update the cpu display | function updateCpuDisplay() {
var programCounter = _CPU.PC;
var hexString = programCounter.toString(16);
//var pad = "000";
//hexString = "$" + pad.substring(0, pad.length - hexString.length) + hexString;
document.getElementById("tdProgramCounter").innerHTML = toHexOutput(hexString, 3);
document.getEleme... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_onUpdateDisplay() {}",
"function updateOutput() { //\n\tfor (var i = 1; i <= numMonitors; i++) { //updates all output for only the monitors that are show\n\t\tcheckIfCustom(i);\n\t\tupdateResolution(i);\n\t\tdrawMonitor(i); //with animation\n\t\tdisplaySize(i);\n\t\tdisplayHeight(i);\n\t\tdisplayWidth(i);\n\t\t... | [
"0.71706116",
"0.6950578",
"0.69491243",
"0.69344914",
"0.68769604",
"0.68292755",
"0.68054533",
"0.67301846",
"0.66763306",
"0.6649834",
"0.66430765",
"0.664263",
"0.66161966",
"0.6608814",
"0.66011816",
"0.65512943",
"0.6545183",
"0.6526094",
"0.6517649",
"0.6502387",
"0.64... | 0.7998687 | 0 |
function to update the ready queue display | function updateReadyQueue () {
var table = document.getElementById("readyQueueTable");
// remove all current entries in the table
while(table.hasChildNodes()) {
table.removeChild(table.lastChild);
}
// go through and generate each row and cell
for(var i = 0; i < 4; i++) {
var row = table.insertRo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function publishQueued() {\n publish.initModal(true);\n publish.displayQueueList();\n }",
"async function updateQueueFunctions() {\n // Go ahead and fade out our content and display our loader\n // while new data is being loaded.\n hidePanel(panel.elements.content, panel.ele... | [
"0.69921595",
"0.6811422",
"0.6643356",
"0.6614712",
"0.66105795",
"0.65917706",
"0.657842",
"0.6428892",
"0.64132714",
"0.6407106",
"0.6395649",
"0.6383333",
"0.6383333",
"0.63623476",
"0.63416433",
"0.6326365",
"0.6325505",
"0.6301613",
"0.6284889",
"0.6240036",
"0.62301785... | 0.6839156 | 1 |
function to toggle between memory display and file system display | function toggleMemoryFileSystemView() {
var divMem = document.getElementById("divMemViewSelected");
var divMemDisplay = document.getElementById("divMemoryDisplay");
var divFS = document.getElementById("divFileSystemViewSelected");
var divFSDisplay = document.getElementById("divFileSystemDisplay");
if(divMem.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"changeDisplay() {\n this.displayMarkup = !this.displayMarkup;\n }",
"static toggleFS(){\n win.setFullScreen(!win.isFullScreen());\n win.setMenuBarVisibility(!win.isFullScreen());\n }",
"function showSaveToMemorySection() {\n for (var i = 0; i < saveToMemory.length; i++) {\n ... | [
"0.6451149",
"0.6392329",
"0.63635826",
"0.63628423",
"0.6346743",
"0.6199318",
"0.61088216",
"0.6096819",
"0.60043937",
"0.60015124",
"0.59429467",
"0.589509",
"0.58891696",
"0.5869744",
"0.5860774",
"0.5860466",
"0.58585984",
"0.58491623",
"0.5845674",
"0.584134",
"0.584078... | 0.79068786 | 0 |
private fns takes in entityTypes as either strings or entityTypes or arrays of either and returns either an entityType or an array of entityTypes or throws an error | function checkEntityTypes(em, entityTypes) {
assertParam(entityTypes, "entityTypes").isString().isOptional().or().isNonEmptyArray().isString()
.or().isInstanceOf(EntityType).or().isNonEmptyArray().isInstanceOf(EntityType).check();
if (typeof entityTypes === "string") {
entityTypes = em.metadataSto... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildEntities(type, entitySet1, entitySet2) {\n entities[type] = [];\n\n var set1_length = entitySet1.length;\n var set2_length = entitySet2.length;\n var commonEntityIndicesInSet2 = [];\n\n for (var i = 0; i < set1_length; i ++) {\n if (entitySet2[i]) {\n var isCommon = false;\... | [
"0.6019164",
"0.5675671",
"0.5449996",
"0.5420929",
"0.5313039",
"0.52942955",
"0.52565926",
"0.49918914",
"0.49730384",
"0.49528837",
"0.48879552",
"0.4867871",
"0.4861752",
"0.4861752",
"0.4827911",
"0.4827911",
"0.48162568",
"0.4790028",
"0.4787297",
"0.4787297",
"0.475913... | 0.7519611 | 0 |
Register a data type with dataTypeConfigurations map. The map is keyed by data type, and contains a map of "componentConfigs", which control the component type, the component element, and any action operations associated with that data/component type. | __registerDataType(dataType, componentMap) {
const componentTypes = Object.keys(componentMap);
this.dataTypeConfigurations[dataType] = {
dataType,
[COMPONENT_CONFIGS]: zipObject(
componentTypes,
componentTypes.map(componentType => {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"addType(id, data) {\n this.types[id] = new TypeData(data);\n }",
"function add (type, config, fn) {\n var r = phoenix.registry[type]\n if (!r) r = phoenix.registry[type] = []\n if (typeof config == 'function') {\n fn = config\n config = {}\n }\n config.id = r.length\n r.push({ config: config, fn:... | [
"0.60031104",
"0.506303",
"0.48147833",
"0.46920493",
"0.46875328",
"0.4681991",
"0.4624992",
"0.4618999",
"0.46034",
"0.45939285",
"0.4576181",
"0.4540961",
"0.45408183",
"0.45237935",
"0.4517631",
"0.4510585",
"0.44791013",
"0.4461806",
"0.44549355",
"0.44380423",
"0.440702... | 0.84069824 | 0 |
:: then: (onFulfilled: Function, onRejected: Function) => Thenable; | constructor (promise /* : Promise */) {
this.then = function (onFulfilled/* : Function */, onRejected /* : Function */) /* : Thenable */ {
const Promise = require('./promise')
const next = new Promise()
promise.chain.push({
onFulfilled,
onRejected,
promise: next
})
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"then(onFulfilled) {\n const promise = privateProps.promise.get(this);\n return promise.then(onFulfilled);\n }",
"then(onFulfilled) {\n const promise = privateProps.promise.get(this);\n return promise.then(onFulfilled);\n }",
"then(onFulfilled) {\n const promise1 = _privatePropsJsDefa... | [
"0.7121392",
"0.68915486",
"0.683579",
"0.64288193",
"0.63858235",
"0.6344416",
"0.62029487",
"0.6147139",
"0.60974824",
"0.60974824",
"0.60974824",
"0.60974824",
"0.60974824",
"0.60974824",
"0.60974824",
"0.60974824",
"0.60974824",
"0.607994",
"0.6077523",
"0.60020703",
"0.5... | 0.7158568 | 0 |
resolver function to query all or specified experiences based on the location or state | experiences(parent, args, { prisma }, info) {
const opArgs = {
skip: args.skip,
first: args.first,
orderBy: args.orderBy,
after: args.after,
};
if(args.query){
opArgs.where = {
OR: [
{
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"[FETCH_EXPERIENCE_ID](state, {experience}) {\n state.experience = experience\n }",
"function GeoLocQuery(){}",
"[FETCH_EXPERIENCES_SUCCESS](state, {experiences}) {\n state.experiences = experiences\n }",
"function search(){\n let query;\n if(searchLocation===\"location\"){\n sea... | [
"0.52023005",
"0.5170013",
"0.5146081",
"0.5069446",
"0.5067426",
"0.49130994",
"0.48864347",
"0.48377508",
"0.48351145",
"0.4813284",
"0.47989532",
"0.47836822",
"0.47824663",
"0.4781591",
"0.47794926",
"0.47535405",
"0.47394687",
"0.4733291",
"0.47227857",
"0.4719901",
"0.4... | 0.64899355 | 0 |
resolver function to query all cars depending on operation arguements passed; | cars(parent, args, { prisma }, info) {
const opArgs = {
skip: args.skip,
first: args.first,
orderBy: args.orderBy,
after: args.after,
};
if(args.query){
opArgs.where = {
OR: [
{
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getAllCars(req, res) {\n CarsModel.getAllCarsModel(req, res);\n }",
"function getCars(req, res) {\n return Car.find({}).exec()\n .then(respondWithResult(res))\n .catch(handleError(res));\n}",
"function getCarsNearBy(lat, lng){\r\n\t\r\n\t// lat and lng variables in this call object are sha... | [
"0.5977738",
"0.5785247",
"0.5644348",
"0.5590323",
"0.5565502",
"0.5539784",
"0.54756516",
"0.54023093",
"0.5377389",
"0.53430676",
"0.5312103",
"0.5271292",
"0.5255718",
"0.5252899",
"0.52331156",
"0.521151",
"0.5208703",
"0.51872945",
"0.5157127",
"0.5156517",
"0.51518804"... | 0.64851683 | 0 |
resolver to query all tips | tips(parent, args, { prisma }, info) {
const opArgs = {
skip: args.skip,
first: args.first,
orderBy: args.orderBy,
after: args.after,
};
return prisma.query.tips(opArgs, info);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async findTips() {\n\t\tconst { client } = this;\n\t\t// @NB if @mention starts the tweet text, in_reply_to_user_id_str will not be\n\t\t// null\n\n\t\tconst params = {\n\t\t\tquery: '$woke OR $wokens OR $WOKE OR $WOKENS OR WOKENS',\n\t\t\tresult_type: 'recent',\n\t\t\tentities: 'false',\n\t\t\tcount: 100,\n\t\t\t... | [
"0.6424168",
"0.5580048",
"0.5526679",
"0.545217",
"0.5448595",
"0.51327306",
"0.5125778",
"0.50947165",
"0.50550836",
"0.50509083",
"0.49212506",
"0.491985",
"0.49118",
"0.49092603",
"0.48933232",
"0.48817927",
"0.4863602",
"0.4858633",
"0.48383325",
"0.48299477",
"0.4822834... | 0.55889493 | 1 |
adds spinning gears & fade in of getData results | function loading() {
$("#container").hide(function() {
$("body").append("<i id='gear' class='fa fa-gear fa-spin' style='font-size: 500px; color: #023a8c;'></i>");
})
.delay(200).fadeIn(200);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function animateData(){\n //Add logic here to animate the data\n\n}",
"function getBusData(latitude, longitude, direction) {\n $.ajax({\n type: \"GET\",\n url: 'app/prediction.php?latitude=' + latitude + '&longitude=' + longitude + '&direction=' + direction,\n async: true,\n dat... | [
"0.64498115",
"0.6145771",
"0.60640657",
"0.60494256",
"0.6018012",
"0.6018012",
"0.60157156",
"0.6015418",
"0.59631896",
"0.59404945",
"0.59345645",
"0.59232026",
"0.5896338",
"0.58882725",
"0.58556986",
"0.5843445",
"0.5841543",
"0.58387744",
"0.58361584",
"0.5835661",
"0.5... | 0.6370347 | 1 |
Set date now to updated field | function fnSetUpdatedDate(next){
/*jshint validthis:true */
this.updatedDate = Date.now();
next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get updateDate() {\n return new Date(this._data.updated_at);\n }",
"get updateDate() {\n return new Date(this._data.updated_at);\n }",
"setLastUpdated(){\n\t\tthis.lastUpdated = Date.now();\n\t}",
"function DateUpdater() { }",
"get dateUpdated() {\n return this.getStringAttribute... | [
"0.7022454",
"0.7022454",
"0.69984585",
"0.68053114",
"0.6716916",
"0.6640556",
"0.66091776",
"0.65861696",
"0.64975196",
"0.6444526",
"0.64273244",
"0.6423132",
"0.6343943",
"0.6304542",
"0.6286371",
"0.6206952",
"0.6193278",
"0.6183926",
"0.6161238",
"0.6161238",
"0.6161238... | 0.7558833 | 0 |
Adopt position on resize | adoptPositionOnResize() {
if (this.adoptOnResize) {
/**
* Get app event manager
* @type {ApplicationEventManager|{subscribe, eventList}}
*/
const appEventManager = this.view.controller.root().eventManager;
appEventManager.subscribe({
event: {name: appEventManager.eve... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"resized() {\n\t\tthis.position.y = this.halfSize.y;\n\t}",
"function onResize() {\n positionContainer();\n}",
"function resize() {}",
"_resizeCallback () {\n this.resizePreserveCenter()\n }",
"_resizeCallback() {\n this.resizePreserveCenter()\n }",
"notifyResize(){super.notifyResize()}",
"func... | [
"0.7785044",
"0.75989133",
"0.7247509",
"0.7052123",
"0.70335484",
"0.6979309",
"0.69735783",
"0.6972713",
"0.69626105",
"0.6933448",
"0.6899969",
"0.6873141",
"0.6795269",
"0.6790105",
"0.6735025",
"0.67149377",
"0.6691534",
"0.668953",
"0.6667271",
"0.6658541",
"0.66498244"... | 0.76870203 | 1 |
Advanced: Since the constructor only runs on new installation + activation and fetch runs before that a 'from cache first' cache strategy usually lags behind current content with one page load BUT: by checking the version from the fetch method (see above) we can get around this and serve the current content directly af... | async getVersion() {
// Only check the version if at least 3 seconds since last request
let requestTime = Date.now();
if (requestTime - this.lastRequestTime < 3000) {
return;
}
// Check the version by loading this file as text
// and extracting the version number using a reg exp
this.l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cache() {\n document.documentElement.dataset.cached = true;\n var data = document.documentElement.outerHTML;\n fetch('./render-store/', { method: 'PUT', body: data }).then(function() {\n console.log('Page cached');\n });\n}",
"function ContentLoader()\n{\n this.cache = true;\n}",
"async func... | [
"0.63818467",
"0.6290106",
"0.6194301",
"0.58736163",
"0.586825",
"0.5862844",
"0.58207315",
"0.577993",
"0.57687926",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
"0.5732253",
... | 0.68010634 | 0 |
Remove element from the badges list and add in element list | removeBadge_(badge) {
this.dataItems.push(badge.text);
this.dataItems = this.dataItems;
this.badges.splice(this.badges.indexOf(badge), 1);
this.badges = this.badges;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function remove (){\n match_list.pop();\n match_list.pop();\n }",
"removeFavorite(singleElement){\n singleElement.remove();\n }",
"function nullifyListElement(list: Array<?Node>, element: Node, patcher: Patcher) {\n const index = list.indexOf(element);\n patcher.remove(element.start, e... | [
"0.5830709",
"0.5738925",
"0.5662031",
"0.56453747",
"0.56163514",
"0.5595831",
"0.55922985",
"0.5580791",
"0.55804634",
"0.5557839",
"0.55350405",
"0.55241805",
"0.55203056",
"0.55190843",
"0.5518433",
"0.5493176",
"0.54471105",
"0.54314",
"0.5428556",
"0.53822154",
"0.53802... | 0.64307404 | 0 |
Handles Badge Item KeyDown event | onBadgeKeyDown_(event) {
const badgesElements = this.refs.badges.children;
const selectedBadge = event.delegateTarget;
const selectedIndex = +selectedBadge.getAttribute('data-index');
switch (event.keyCode) {
case KEY_CODE_LEFT_ARROW :
if (selectedIndex > 0) {
badgesElements[selectedIndex - 1].foc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"HandleKeyDown(event) {}",
"_handleKeydown(event) {\n // We don't handle any key bindings with a modifier key.\n if (Object(_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_14__[\"hasModifierKey\"])(event)) {\n return;\n }\n switch (event.keyCode) {\n case _angular_... | [
"0.64132583",
"0.63258934",
"0.63229835",
"0.63021606",
"0.629951",
"0.61520004",
"0.61277163",
"0.6119636",
"0.6091595",
"0.6088725",
"0.60760236",
"0.607357",
"0.6064467",
"0.60532486",
"0.60525584",
"0.60500956",
"0.6048759",
"0.6043623",
"0.60208863",
"0.6015155",
"0.6011... | 0.7676896 | 0 |
The Transaction model. Since we're going to have at least two swappable backends (inmemory + db), this model will abstract the user manipulations by wrapping the actual data in a higher level, nice API. params: storage this will be assumed to be a promisedbased storage (save), accepting dot notation for setting and get... | function Transaction(storage) {
if (!storage){
throw new RangeError("Cannot instantiate Transaction with no underlying storage");
}
// save to the database
this.save = function() {
return storage.save().then(function() {
return this;
}.bind(this));
}
// get... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Transaction() {\n if (!(this instanceof Transaction)) {\n return new Transaction();\n }\n this.Type = DEFAULT_TYPE;\n this.PayloadVer = PAYLOAD_VERSION;\n this.LockTime = DEFAULT_NLOCKTIME;\n this.Attributes = [];\n this.UTXOInputs = [];\n this.Outputs = [];\n this.CrossChainAsset = [];\n thi... | [
"0.6418382",
"0.6074318",
"0.5933973",
"0.58848345",
"0.58757347",
"0.5735231",
"0.5671778",
"0.56160295",
"0.5594086",
"0.5582325",
"0.5576354",
"0.5545283",
"0.54688907",
"0.53930676",
"0.5361381",
"0.5356963",
"0.5324884",
"0.5316245",
"0.5302374",
"0.5273318",
"0.52063656... | 0.80850965 | 0 |
clicking any btn except showAll hides the projects without that technology | hideBtn(id) {
// make sure all projects are present and accounted for first
this.showBtn();
// loop through projects and set all included to false
for (let i=0; i<this.state.projects.length; i++){
const included = this.state.projects;
included[i].inc = false;
// loop through the tech... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hideProject() {\n //remove the added dom elements\n img.remove();\n hr.remove();\n p.remove();\n linkContainer.remove();\n\n //change the styles back to the originals\n styles.width = 50 + 'px';\n styles.height = 50 + 'px';\n styles.top = top;\n styles.lef... | [
"0.6949866",
"0.6932443",
"0.68878746",
"0.6866931",
"0.6515991",
"0.6402244",
"0.63760793",
"0.6360378",
"0.6328137",
"0.63179165",
"0.62874115",
"0.6285689",
"0.62667865",
"0.6257684",
"0.62434405",
"0.6240806",
"0.62376046",
"0.6235958",
"0.62337774",
"0.62285656",
"0.6218... | 0.6985615 | 0 |
Return the timezone of the browser, return null if none could be determined | function timezone() {
if (typeof Intl === "object" && typeof Intl.DateTimeFormat === "function") {
let options = Intl.DateTimeFormat().resolvedOptions();
if (typeof options === "object" && options.timeZone) {
return options.timeZone;
}
}
if (typeof window.jstz === "object... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTimezone() {\n\tvar timezone = jstz.determine();\n\treturn timezone.name();\n}",
"function getTimezone() {\n\tvar timezone = jstz.determine();\n\treturn timezone.name();\n}",
"function timezone_info() {\n return {\n cookie: getCookie(\"z.tz\"),\n user_agent: timezone()\n };\n}",... | [
"0.736837",
"0.736837",
"0.7041125",
"0.7010765",
"0.6962666",
"0.6944551",
"0.6688249",
"0.665621",
"0.6630407",
"0.650692",
"0.64865816",
"0.6485006",
"0.6382156",
"0.6316158",
"0.63132477",
"0.62777305",
"0.6224647",
"0.6180943",
"0.6175804",
"0.60806704",
"0.6071233",
"... | 0.7957764 | 0 |
Inputs a key, removes the hold key flag if set | inputKey(key) {
if (CHIP8.KH > 0x0) {
CHIP8.r.V[CHIP8.KH - 1] = key;
CHIP8.KH = 0x0;
}
CHIP8.KEYS[key] = 0x1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function keyUp(event){\n\tkeyboard[event.keyCode] = false;\n}",
"function keyPressed() {\n if (keyIsDown(32)) {\n ball.reset()\n \n }\n return false;\n}",
"function key_up(){\n\n\tdrag_manager.active_key=null;\n\n}",
"function keysUp(e)\n{\n keys[e.keyCode] = false;\n}",
"function setKeyUp() {\n... | [
"0.7290664",
"0.6989732",
"0.6958152",
"0.69537175",
"0.6939389",
"0.6895751",
"0.687646",
"0.68658876",
"0.683914",
"0.6827518",
"0.6825284",
"0.6787655",
"0.67857355",
"0.6770592",
"0.6685325",
"0.6660841",
"0.66330713",
"0.6630952",
"0.66205776",
"0.66144514",
"0.6604593",... | 0.6995797 | 1 |
Loads in bytes from PRGMBUFFER onto 0x200. | memLoad(prgmBuffer) {
console.log("Loading program buffer into memory.")
CHIP8.r.I = 0;
CHIP8.r.PC = 0x200;
CHIP8.r.V = new Uint8Array(new ArrayBuffer(16));
prgm = new Uint8Array(prgmBuffer);
for (let i = 0; i < prgm.length; i++) {
CHIP8_MEM[i + 0x200] = pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadBuffer(url) {\n if(typeof document !== 'undefined') {\n buffer = new Uint8Array([30]);\n } else {\n buffer = fs.readFileSync(url);\n }\n}",
"loadBrushtipImageData(tgt,data){\n\t\tif(tgt.type!=\"RAMBuf8\"){\n\t\t\tLOGGING&&console.warn(\"Not RAMBuf8 brushtip imagedata!\");\n\t\... | [
"0.5955953",
"0.5895881",
"0.57652915",
"0.5429174",
"0.5382258",
"0.53383505",
"0.53383505",
"0.5251399",
"0.5203792",
"0.51938796",
"0.5191686",
"0.51812875",
"0.51679325",
"0.51679325",
"0.51440156",
"0.51390177",
"0.5135994",
"0.50960684",
"0.50345296",
"0.50338686",
"0.5... | 0.6644373 | 0 |
setting the icon onclick function | function iconSetting() {
var icon = document.getElementsByClassName("icon")[0];
EventUtil.addHandler(icon, "click", randomOrder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_onClick({x,y,object}) {\n console.log(\"Clicked icon:\",object);\n }",
"function navBarIconClick(icon) {\n changeIcon(icon);\n openCloseNavBar();\n}",
"setIcon(i) {\n this.icon = i;\n }",
"setIcon(icon){\r\n\t\tvar c = this.vc()\r\n\t\tthis.icon = icon\r\n\t\tc.innerHTML = this.inner_html()\r\... | [
"0.7674916",
"0.732325",
"0.71224517",
"0.70937777",
"0.698569",
"0.69633245",
"0.6906094",
"0.6868274",
"0.6746102",
"0.6745083",
"0.6744905",
"0.66874534",
"0.6660494",
"0.66027695",
"0.65989196",
"0.6596133",
"0.65263146",
"0.64336675",
"0.6428119",
"0.6378612",
"0.6371716... | 0.7582263 | 1 |
check whether all the five buttons have been clicked | function checkAllClicked() {
var buttons = document.getElementsByTagName("li"),
flag = 1;
for (var i = 0; i < buttons.length; i++) {
if (buttons[i].className.indexOf("clicked") == -1) {
flag = 0;
}
}
return flag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkIfAllClicked() {\n for (let i = 0; i < squares.length; i++) {\n if (squares[i].dataset.clicked == \"-1\") {\n return false;\n }\n }\n return true;\n}",
"function checkBtn(clickval){\r\n\tif (clickval == randBtnIndex[prevIndexClick]){\r\n\t\tprevIndexClick ++;\r\n\t\tconsole.log(\"Corr... | [
"0.6969574",
"0.68759763",
"0.68261063",
"0.6812715",
"0.67594016",
"0.66014946",
"0.63889915",
"0.6318194",
"0.6288475",
"0.62728095",
"0.62645",
"0.6252505",
"0.6230962",
"0.6229454",
"0.6109944",
"0.60875994",
"0.6045588",
"0.60405064",
"0.6027264",
"0.60211086",
"0.599255... | 0.7448342 | 0 |
check and motivate the info Bar(the big big bubble) +_+ | function MotivateInfoBar() {
if (checkAllClicked()) {
EventUtil.addHandler(document.getElementsByClassName("info")[0], "click", clickToSum);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"showInfo() {\n let saturnInfo;\n if (!this.visible) {\n if(scorebox.score >= this.totalStars) {\n push();\n // Saturn infos\n saturnInfo = createGraphics(280, 250);\n saturnInfo.fill(green.r, green.g, green.b);\n saturnInfo.background(20, 220);\n saturnInfo.text... | [
"0.61745584",
"0.6129584",
"0.61102074",
"0.6105288",
"0.5963078",
"0.5963063",
"0.59506524",
"0.59423196",
"0.5928776",
"0.5927735",
"0.5904576",
"0.58967257",
"0.58939135",
"0.5890408",
"0.5841716",
"0.58200777",
"0.58060956",
"0.5795181",
"0.5787495",
"0.57810926",
"0.5762... | 0.6258665 | 0 |
Moving final k to public folder Move all sources from build to public directory handler | function move_build_to_public(typ) {
let outputDir;
if (typ === 'maps') {
outputDir = config.mapsDir;
}
else {
outputDir = config.client[typ].outputDir;
}
let stream = gulp.src(outputDir + '/**/*.*', {base: outputDir});
let durationMsg = 'moving build' + typ + ' files to public\'s ' + typ;
let cacheTyp =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function copy_public() {\n gulp.src('public/*.*')\n .pipe(gulp.dest('./dist/public'));\n}",
"function deploy() {\n const publisher = gulpAwspublish.create({\n params: {\n Bucket: config.bucketName,\n },\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey... | [
"0.6594373",
"0.65163296",
"0.5910919",
"0.5708199",
"0.56538075",
"0.5535853",
"0.5478047",
"0.5464119",
"0.54575974",
"0.54571587",
"0.54473144",
"0.54320765",
"0.5393649",
"0.53524333",
"0.5326396",
"0.52907556",
"0.52837634",
"0.52768975",
"0.5252063",
"0.52503556",
"0.52... | 0.70682955 | 0 |
Ruler can be attached to any FloorPlanObject | function Ruler(layer, scale, a, aRef, aOn, b, bRef, bOn, anchObj, anchRef, anchOffset){
var that = this;
this.layer = layer;
this.group = new Kinetic.Group();
this.objA = a;
this.objB = b;
this.refA = aRef;
this.refB = bRef;
this.aOn = aOn;
this.bOn = bOn;
this.anchObj = anchObj;
th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"constructor(plan){\n\t\tthis.width = plan[0].length;\n\t\tthis.height = plan.length;\n\t\tthis.grid = [];\n\t\tthis.actors = [];\n\t\tfor (var y = 0; y < this.height; y++) {\n\t\t\tvar line = plan[y], gridLine = [];\n\t\t\tfor (var x = 0; x < this.width; x++) {\n\t\t\t\tvar ch = line[x], fieldType = null;\n\t\t\t\... | [
"0.56884754",
"0.5579319",
"0.5361381",
"0.53562105",
"0.5332277",
"0.523195",
"0.5140774",
"0.51195973",
"0.50758725",
"0.50677603",
"0.50600624",
"0.5035839",
"0.49495456",
"0.49461672",
"0.49430454",
"0.4923796",
"0.4917011",
"0.48865718",
"0.48669508",
"0.48661408",
"0.48... | 0.6525159 | 0 |
Method to write queue in JSON to db.json file | function backup(queueArray) {
fs.writeFile('./db.json', JSON.stringify({queue: queueArray}));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function backup(queueArray) {\n // write the queue array to file\n fs.writeFile('./db.json', JSON.stringify({queue: queueArray}), (err) => {\n if(err) console.log('queue backup unsuccessful');\n });\n}",
"async _write() {\n if (this._writing) return;\n\n // Loop because items may get pushed onto queu... | [
"0.70411545",
"0.6644872",
"0.6599128",
"0.65664417",
"0.6525222",
"0.64911085",
"0.6353891",
"0.6257913",
"0.62332326",
"0.61809206",
"0.6119661",
"0.6095045",
"0.60474664",
"0.60381764",
"0.6028715",
"0.60140723",
"0.60007054",
"0.5990294",
"0.5928014",
"0.5906205",
"0.5892... | 0.7172581 | 0 |
Method to write attendance record in attendance.json file along with the secret word | function backupAttendance(presentArray,secretWord){
fs.writeFile('./attendance-db.json',JSON.stringify({present: presentArray,secret: secretWord}));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function writeJson() {\n fs.writeFileSync(__dirname + '/animes.json', JSON.stringify(anime))\n console.log(\"Arquivo JSON atualizado!\")\n}",
"saveDocData(){\n var json = JSON.stringify(this.dfile,null,2);\n fs.writeFileSync('./JSON/Doctors.json',json);\n }",
"function saveSchedule() {\n fs... | [
"0.6598325",
"0.59894556",
"0.59132963",
"0.5837668",
"0.5769892",
"0.57496023",
"0.56874615",
"0.5654963",
"0.5653059",
"0.564203",
"0.56405896",
"0.5593241",
"0.5587607",
"0.55729",
"0.5569846",
"0.55463356",
"0.55434245",
"0.5538404",
"0.5532726",
"0.5526581",
"0.548838",
... | 0.7187492 | 0 |
function to check if a schedule id matches any key in local storage | function check(sched_id){
var flag=0;
for (i=0; i<=localStorage.length-1; i++)
{
key = localStorage.key(i);
if(key===sched_id){
flag=1;
break;
}
}
if(flag==1){
return t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkActivity(btnID) {\n\n var currentActivity = $('#activity-' + btnID).val();\n //console.log (currentActivity)\n\n if (localStorage.getItem(\"daySchedule\") !== null) {\n var scheduleCheck = JSON.parse(localStorage.getItem(\"daySchedule\"));\n scheduleCheck[btnID].activity = curr... | [
"0.6517449",
"0.63327074",
"0.6145331",
"0.6073827",
"0.60362095",
"0.59273624",
"0.5848356",
"0.5820384",
"0.57319725",
"0.569895",
"0.566902",
"0.56657785",
"0.56407636",
"0.5584576",
"0.55430496",
"0.5535692",
"0.5505418",
"0.5429761",
"0.54284203",
"0.5424461",
"0.5424189... | 0.7778352 | 0 |
Function to parse the GML feature info | function gmlFeatureInfo(event, requestId, featureInfo, layer, queryLayer, forceInfoPopup) {
let layerTitle = layer.values_.title;
let features = new WMSGetFeatureInfo().readFeatures(featureInfo);
let fieldSet = layer.values_.fields !== undefined ? layer.values_.fields[queryLayer] : [];
let fieldKeys = [... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"parse() {\n /**\n * The first two bytes are a bitmask which states which features are present in the mapFile\n * The second two bytes are.. something?\n */\n const featureFlags = this.take(2, \"featureFlags\").readUInt16LE(0);\n this.take(2, \"unknown01\");\n if ... | [
"0.57707345",
"0.57306904",
"0.5726372",
"0.57229793",
"0.56847703",
"0.56828415",
"0.55925053",
"0.5583208",
"0.5579848",
"0.5569856",
"0.55215734",
"0.55098444",
"0.54963475",
"0.5487082",
"0.5481731",
"0.54733837",
"0.54724544",
"0.54503566",
"0.5444046",
"0.54318476",
"0.... | 0.6336714 | 0 |
function for norris jokes | function norrisJoke(e) {
const numberOfJokes = document.querySelector('#No_jokes').value;
const displayJokes = document.querySelector('#displayJokes');
const xhr = new XMLHttpRequest();
xhr.open('GET', `http://api.icndb.com/jokes/random/${numberOfJokes}`, true);
xhr.onload = function() {
if (this.status =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Komunalne() {}",
"function resetJoke(){\n activatedJoke = unrated_jokes.shift()\n if (unrated_jokes.length < 2) {getJoke()}\n prepare_joke_for_rating(activatedJoke)\n}",
"function tellJoke() {\n var joke = randomPick(jokes);\n if (typeof joke == 'undefined') { // If there are no jokes left\... | [
"0.5993999",
"0.5717128",
"0.5668645",
"0.56027377",
"0.548088",
"0.5398115",
"0.5351048",
"0.53467995",
"0.53213465",
"0.53084534",
"0.5273772",
"0.527124",
"0.5257758",
"0.52368814",
"0.52298546",
"0.52127373",
"0.5209111",
"0.5186005",
"0.51440984",
"0.5139064",
"0.5136756... | 0.5797194 | 1 |
Helper function to find values by key recursively. | function findValues(obj, key) {
return findValuesHelper(obj, key, []);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function recursiveSearch(node, key, value) {\n if (node[key] === value) {\n return node;\n } else if (node.children !== undefined) {\n let result = null;\n for (let child of node.children) {\n result = recursiveSearch(child, key,... | [
"0.7335539",
"0.67277527",
"0.671445",
"0.6649213",
"0.65642357",
"0.65598375",
"0.6383205",
"0.6357613",
"0.6236744",
"0.6230021",
"0.62008756",
"0.6199265",
"0.5931512",
"0.5927112",
"0.5923855",
"0.59158975",
"0.58540756",
"0.5853939",
"0.5846935",
"0.58272564",
"0.5779254... | 0.737522 | 0 |
Helper function to make an array unique | function makeArrayUnique(arr) {
var u = {},
a = [];
for (var i = 0, l = arr.length; i < l; ++i) {
if (!u.hasOwnProperty(arr[i])) {
a.push(arr[i]);
u[arr[i]] = 1;
}
}
return a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function toUnique(a) { //array,placeholder,placeholder\n var b = a.length;\n var c\n while (c = --b) {\n while (c--) {\n a[b] !== a[c] || a.splice(c, 1);\n }\n }\n }",
"function unique(arr) {\n\treturn Array.from(new Set(arr)); //makes an array ... | [
"0.80055624",
"0.79355705",
"0.78817946",
"0.78810805",
"0.7833107",
"0.773213",
"0.7674551",
"0.76734877",
"0.7669597",
"0.761333",
"0.7596826",
"0.7582956",
"0.75785536",
"0.7574855",
"0.75656646",
"0.75636864",
"0.7556836",
"0.75531346",
"0.7551291",
"0.75496894",
"0.75439... | 0.8102247 | 0 |
Saves the images for each staff found in the piece. | function saveStaffs(image, staffBoundaries) {
for (var _i = 0, staffBoundaries_1 = staffBoundaries; _i < staffBoundaries_1.length; _i++) {
var boundary = staffBoundaries_1[_i];
var boundaryOffset = (boundary.end - boundary.start) * constant_1.STAFF_PADDING; // Pixels to go up and down staff;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function saveImages() {\n var doc = app.activeDocument;\n var imgLocation = doc.path+'/img';\n var imgFolder = new Folder(imgLocation);\n imgFolder.create();\n var expOptions = new ExportOptionsPNG24();\n\n for(var i=0; i<doc.layers.length; i++) doc.layers[i].visible = false;\n\n for(var i=0; i<doc.layers.l... | [
"0.62086654",
"0.61519265",
"0.58950394",
"0.5806724",
"0.5675959",
"0.5598602",
"0.55141073",
"0.5483162",
"0.54814553",
"0.5473666",
"0.5442297",
"0.5437264",
"0.54192114",
"0.5401116",
"0.53804696",
"0.5323064",
"0.5319633",
"0.52760553",
"0.52431387",
"0.5242258",
"0.5214... | 0.68692595 | 0 |
endregion private variables region private functions Checks if there are any unread mails and shows a desktop notification if so | function _checkForUnreadMails() {
const query = document.querySelectorAll('._unread_MailFolderTreeNodeView2Mouse_Wa');
// TODO: Maybe improve shown body text by showing the names of the folders with unread mail and the unread
// mail count...
if (query.length) {
_notify();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function notifyUnread() {\r\n\tif (label == 'Inbox') {\r\n\t\tunread_count = 0;\r\n\t} else {\r\n\t\tvar search_results = label.match(/\\((\\d*)\\)/);\r\n\t\tif (search_results) {\r\n\t\t\tvar new_unread_count = search_results[1];\r\n\t\t\tif (new_unread_count > unread_count) {\r\n\t\t\t\twindow.fluid.showGrowlNot... | [
"0.75385386",
"0.6999126",
"0.6897944",
"0.6526573",
"0.6519408",
"0.6519408",
"0.6475372",
"0.63999903",
"0.6330897",
"0.62904775",
"0.62426424",
"0.62400144",
"0.6197643",
"0.6088724",
"0.6070361",
"0.6037149",
"0.6022322",
"0.60098404",
"0.60081637",
"0.59965086",
"0.59930... | 0.87294704 | 0 |
This method is invoked when user presses submit on shortAnseditmodal , it reads all the values entered by user and creates a POST request to backend , for updating a particular short Answer widget in form | function EditShortAnsWidgetForForm() {
let obj;
let url = "http://localhost:8080/form/"+formid+"/widget/"+WidgetIdToBeEdited+"/edit";
let widgetName = $('#edit-inputName-1').val(),title = $('#edit-inputTitle-1').val();
let bookmark = $('#edit-bookmark').val();
if (bookmark==null) bookmark="";
C... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onSubmit(state) {\n this.status = 'answered';\n var choice = this.opt.choices.where({ value: state.value })[0];\n this.answer = choice.short || choice.name;\n\n // Re-render prompt\n this.render();\n this.screen.done();\n this.done(state.value);\n }",
"onSubmit(state) {\n this.status = '... | [
"0.61956203",
"0.61956203",
"0.618606",
"0.6135016",
"0.61278474",
"0.6042478",
"0.6013751",
"0.5978886",
"0.59775513",
"0.5960642",
"0.5953885",
"0.59420824",
"0.59357816",
"0.59332544",
"0.59146243",
"0.59124863",
"0.5904712",
"0.5870708",
"0.58636165",
"0.5816791",
"0.5803... | 0.6563322 | 0 |
The cxIcon directive is bound to the icon type. You can feed the `ICON_TYPE` to accomplish a configurable button in the UI. | set cxIcon(type) {
this.setIcon(type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set type(type) {\n this.setIcon(type);\n }",
"addIconLiteral(type, literal) {\n const [_, namespace] = getNameAndNamespace(type);\n if (!namespace) {\n throw NameSpaceIsNotSpecifyError();\n }\n this.addIcon({ name: type, icon: literal });\n }",
"function Icon... | [
"0.6393392",
"0.6298743",
"0.62329334",
"0.62105125",
"0.6178349",
"0.6129771",
"0.6053806",
"0.6038281",
"0.59882563",
"0.59632266",
"0.595918",
"0.5937842",
"0.59291923",
"0.59190565",
"0.5914444",
"0.5861406",
"0.58567965",
"0.57888937",
"0.57719195",
"0.57685596",
"0.5767... | 0.76641697 | 0 |
The type input parameter is bound to the icon type. You can feed the `ICON_TYPE` to accomplish a configurable button in the UI. | set type(type) {
this.setIcon(type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set cxIcon(type) {\n this.setIcon(type);\n }",
"addIconLiteral(type, literal) {\n const [_, namespace] = getNameAndNamespace(type);\n if (!namespace) {\n throw NameSpaceIsNotSpecifyError();\n }\n this.addIcon({ name: type, icon: literal });\n }",
"_createButt... | [
"0.69652915",
"0.6903574",
"0.686517",
"0.6762912",
"0.6577825",
"0.6370425",
"0.62597305",
"0.621066",
"0.61453074",
"0.6091558",
"0.6051533",
"0.6030117",
"0.59976894",
"0.598173",
"0.59755766",
"0.58892095",
"0.58608025",
"0.5848971",
"0.580875",
"0.5802985",
"0.5777523",
... | 0.7746013 | 0 |
The icons supports flipping for some icons to support rtl and ltr directions. | flipIcon(type) {
// TODO: this can be dropped with the next major release.
if (!this.iconLoader.getFlipDirection) {
return;
}
const iconDirection = this.iconLoader.getFlipDirection(type);
this.flipAtLtr = iconDirection === DirectionMode.LTR;
this.flipAtRtl = i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reverse() {\r\n dir = -dir;\r\n\t\tif(dir > 0) {\r\n\t\t $('#direction').css({'background-image' : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_reverse.png)'});\r\n\t\t}\r\n\t\t\r\n\t\tif(dir < 0) {\r\n\t\t $('#direction').css({'background-image' : 'url(./assets/imag... | [
"0.6354581",
"0.62501",
"0.61358833",
"0.5994972",
"0.59340096",
"0.59120363",
"0.5826686",
"0.5770368",
"0.5718902",
"0.5678413",
"0.5619904",
"0.56118053",
"0.55934894",
"0.55876017",
"0.55787724",
"0.5535522",
"0.55297196",
"0.5503519",
"0.54334927",
"0.54334563",
"0.54280... | 0.7404317 | 0 |
5. Declare a function that depending upon which virtual 'door' was entered tells the user they've received a different 'prize' in an alert. After declaring the function, try running it with different options. There must be at least 3 doors. | function prize(door){
if(door === 1){
return alert('You won vacation to Hawaii!');
}else if(door === 2){
return alert('You won a new car!');
}else if(door === 3){
return alert('You won a $100,000.00!');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function doorPrize(doorNumber) {\n if(doorNumber == 1) {\n alert(\"Your prize is coal\")\n } else if(doorNumber == 2) {\n alert(\"Your prize is a table\")\n } else if(doorNumber == 3) {\n alert(\"Your prize is $5000\")\n } else {\n alert(\"Nothing for you\")\n }\n}",
"function prizes() {\n ... | [
"0.7569636",
"0.7420392",
"0.7349628",
"0.7154657",
"0.671153",
"0.6622349",
"0.6365151",
"0.6325538",
"0.6251282",
"0.61695296",
"0.61447614",
"0.61164206",
"0.5982872",
"0.5948254",
"0.59309644",
"0.5911751",
"0.58514005",
"0.58419913",
"0.57784003",
"0.575899",
"0.57427466... | 0.7728925 | 0 |
This function after mapStateToProps then push more items to component or change load session mode | componentWillReceiveProps(nextProps) {
if (!this.state.mode && this.props.mode) {
this.setState({mode: nextProps.mode});
}
if (!this.state.items.length && nextProps.currentSession) {
this.addItems([nextProps.currentSession]);
}
if (!this.isModeChange(nextP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"componentWillReceiveProps(nextProps) {\n if (!this.state.mode && this.props.mode) {\n this.setState({mode: nextProps.mode});\n }\n if (!this.isModeChange(nextProps)) {\n if (nextProps.products.length === 0) {\n this.setState({\n scanningB... | [
"0.599582",
"0.5876014",
"0.5777286",
"0.57366735",
"0.56710726",
"0.5649406",
"0.56343454",
"0.5608454",
"0.5582895",
"0.5565977",
"0.555443",
"0.5518786",
"0.55141777",
"0.5513551",
"0.5496557",
"0.5483662",
"0.54823595",
"0.54766226",
"0.54451644",
"0.54051185",
"0.5396750... | 0.70365727 | 0 |
update list session after sync session | updateListAfterSync(sessions = []) {
if (sessions && sessions.length) {
let items = this.state.items;
let selectSession = null;
let lastSessionOpenedDate;
items.map((item, index) => {
let session = sessions.find(x => item.shift_increment_id === x.s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateLocalStorage(){\n localStorageService.set(listKey, this.acListP);\n }",
"function updateLocalStorage() {\n localStorage.setItem(\"sessions\", JSON.stringify(sessions));\n}",
"function updatePlaylist(){\n\tvar songs = JSON.parse(sessionStorage.getItem(\"songs\"));\n\t$(renderPlaylist(s... | [
"0.68641543",
"0.6585384",
"0.6566154",
"0.65178937",
"0.65085316",
"0.6433393",
"0.63289607",
"0.63237834",
"0.62230486",
"0.621319",
"0.62107366",
"0.61406314",
"0.6131842",
"0.6078244",
"0.60757804",
"0.6057881",
"0.6057469",
"0.60456395",
"0.6039479",
"0.6026458",
"0.5992... | 0.72045267 | 0 |
update list order after sync deleted | updateListAfterSyncDeleted(ids = []) {
if (ids && ids.length) {
let items = this.state.items;
let isDeleteCurrentSession = false;
ids.map(id => {
let index = items.findIndex(item => item.shift_increment_id === id);
if (index >= 0) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reorderUpdate(){\n var toUpdate = [];\n var now = new Date();\n $j(\".js-announcement-list .js-announcement\").each(function(index){\n var ref = $j(this).data(\"ref\");\n var ann = refMap[ref];\n if(ann.endDateTime && ann.endDateTime > now){\n ... | [
"0.6419078",
"0.6331494",
"0.6328412",
"0.631883",
"0.62558097",
"0.62121844",
"0.6175806",
"0.61664313",
"0.61517924",
"0.61470544",
"0.61318624",
"0.6040513",
"0.6024303",
"0.601104",
"0.59727657",
"0.59582126",
"0.5931424",
"0.5903725",
"0.5901784",
"0.5854124",
"0.5833138... | 0.65880734 | 0 |
load more sessions when user scroll to last of session list | lazyload(event) {
if (this.canLoad() === true) {
this.startLoading();
this.loadSession(
SessionConstant.PAGE_SIZE,
this.props.search_criteria.current_page + 1
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"loadMoreSearchResult(event){\n Session.set(\"limit\",Session.get(\"limit\")+6)\n }",
"function loadMore() {\n listService.getList(vm.query, vm.limit, vm.offset).then(function (data) {\n if(data.length) {\n vm.offset += vm.limit;\n vm.list = vm.list.concat(data)... | [
"0.7276506",
"0.65743464",
"0.635326",
"0.6282716",
"0.628061",
"0.62761265",
"0.62622243",
"0.62455606",
"0.61249274",
"0.612339",
"0.609653",
"0.6055994",
"0.6037598",
"0.6024284",
"0.6005151",
"0.59854424",
"0.5963532",
"0.5962861",
"0.58817464",
"0.5873583",
"0.58598167",... | 0.66293204 | 1 |
Load session by props action.getListSession which was mapped in | loadSession(pageSize = SessionConstant.PAGE_SIZE, currentPage = 1) {
let queryService = QueryService.reset();
queryService.setOrder('opened_at', 'DESC').setPageSize(pageSize).setCurrentPage(currentPage);
if (!Permission.isAllowed(PermissionConstant.PERMISSION_VIEW_SESSIONS_CREATED_BY_OTHER_STAFF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async listSessions(session, params) {\n var sessionList = [];\n for (var i in this.sessions) {\n sessionList.push(this.sessions[i].serialize());\n }\n return sessionList;\n }",
"componentWillReceiveProps(nextProps) {\n if (!this.state.mode && this.props.mode) {\n ... | [
"0.6200745",
"0.6011225",
"0.58312976",
"0.5801223",
"0.57966334",
"0.5785346",
"0.57337916",
"0.5712239",
"0.5596549",
"0.55895215",
"0.553323",
"0.5498907",
"0.54204965",
"0.53964454",
"0.53778106",
"0.52949744",
"0.5261899",
"0.5233725",
"0.52170724",
"0.5204982",
"0.51882... | 0.6094312 | 1 |
Filters out current holdings (as defined by `unrealizedDf`) that are not eligible for tax loss harvesting because their ticker has been purchased within the tax loss harvesting window. | static removeIneligibleHoldings(realizedDf, unrealizedDf, activityWindow) {
this.checkSchema(realizedDf, ['ticker', 'dateAcquired']);
this.checkSchema(unrealizedDf, ['ticker', 'date']);
const recentTransactions =
unrealizedDf.filter(row => row.get('date') > this.daysAgo(activityWindow)).select('ticke... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static findLossesToHarvest(realizedDf, unrealizedDf, minLossToHarvest, activityWindow) {\n this.checkSchema(realizedDf, ['ticker', 'dateAcquired']);\n this.checkSchema(unrealizedDf, ['ticker', 'date', 'gainOrLoss']);\n const eligibleHoldings = this.removeIneligibleHoldings(realizedDf, unrealizedDf, activi... | [
"0.6088103",
"0.5205153",
"0.5009531",
"0.50041866",
"0.49975625",
"0.49712706",
"0.49132934",
"0.48835316",
"0.4857408",
"0.48215973",
"0.48108765",
"0.4763454",
"0.47506577",
"0.47370705",
"0.4726271",
"0.4707488",
"0.470256",
"0.46665376",
"0.4666383",
"0.46635848",
"0.465... | 0.7330475 | 0 |
Choose the ticker to buy for each category. For each category, choose the ticker appearing first in the portfolio's list of tickers that has not been sold for a loss in the last 30 days (to avoid the wash sale rule). Tickers that are currently held at a loss but not yet eligible for tax lost harvesting are also avoided... | static chooseTickersToBuy(categoriesToBuy, portfolio, unrealizedDf, realizedDf, minLossToHarvest) {
this.checkSchema(categoriesToBuy, ['category', 'delta']);
this.checkSchema(realizedDf, REALIZED_COLS);
const recentLosses = this.addTotalLoss(realizedDf
.filter(r => r.get('dateSold') > this.daysAgo(TAX... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static chooseHoldingsToSell(categoriesToSell, unrealizedMinusLosses, portfolio) {\n this.checkSchema(unrealizedMinusLosses, UNREALIZED_COLS);\n this.checkSchema(categoriesToSell, ['category', 'delta']);\n\n const withHoldingType = unrealizedMinusLosses\n .withColumn('preference', r => {\n if (... | [
"0.686005",
"0.5356662",
"0.5304472",
"0.50729316",
"0.49231088",
"0.49096316",
"0.47659078",
"0.47169188",
"0.47109488",
"0.46960944",
"0.46792915",
"0.465302",
"0.46450323",
"0.46120209",
"0.46074277",
"0.46018302",
"0.45732284",
"0.4539157",
"0.451665",
"0.4511314",
"0.449... | 0.75933194 | 0 |
Choose the holdings to sell for each category. Prefers long term holdings Returns a list of shares to sell | static chooseHoldingsToSell(categoriesToSell, unrealizedMinusLosses, portfolio) {
this.checkSchema(unrealizedMinusLosses, UNREALIZED_COLS);
this.checkSchema(categoriesToSell, ['category', 'delta']);
const withHoldingType = unrealizedMinusLosses
.withColumn('preference', r => {
if (r.get('shor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static chooseTickersToBuy(categoriesToBuy, portfolio, unrealizedDf, realizedDf, minLossToHarvest) {\n this.checkSchema(categoriesToBuy, ['category', 'delta']);\n this.checkSchema(realizedDf, REALIZED_COLS);\n const recentLosses = this.addTotalLoss(realizedDf\n .filter(r => r.get('dateSold') > this.da... | [
"0.5867631",
"0.5862725",
"0.55308646",
"0.5519599",
"0.53375983",
"0.52577025",
"0.5176187",
"0.5108876",
"0.49711755",
"0.4967649",
"0.49210426",
"0.48973897",
"0.48501906",
"0.48287922",
"0.4822521",
"0.47902793",
"0.4776521",
"0.47712868",
"0.47599882",
"0.47585478",
"0.4... | 0.68919563 | 0 |
returns cardRank parsed into capital letters for face cards and Ace. | function parseCardValues(cardRank) {
if (cardRank === 1) {
cardRank = "A";
}
if (cardRank === 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10) {
cardRank = cardRank;
}
if (cardRank === 11) {
cardRank = "J";
}
if (cardRank === 12) {
cardRank = "Q";
}
if (cardRank ==... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function rankCard(card) {\n switch (card.value) {\n case \"jack\":\n return 11;\n break;\n case \"queen\":\n return 12;\n break;\n case \"king\":\n return 13;\n break;\n case \"ace\":\n return 14;\n break;\n default:\n return card.value;\n }\n}",
"fun... | [
"0.7113261",
"0.6556794",
"0.6283025",
"0.62654245",
"0.6135986",
"0.610893",
"0.58938986",
"0.5882713",
"0.58754885",
"0.57970613",
"0.57910573",
"0.57737446",
"0.5772494",
"0.5763205",
"0.57438976",
"0.56722546",
"0.56721604",
"0.56374943",
"0.55872285",
"0.55863845",
"0.55... | 0.7109875 | 1 |
clears players hand, to be used before refreshing players hand | function clearPlayerHand() {
$('#player-hand').empty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clearOpponentsHand() {\n $('.opponent-hand').empty();\n }",
"reset() {\n this.playerContainer.players.forEach(x => x.clearHand())\n this.winner = undefined;\n this.incrementState();\n this.clearSpread();\n this.deck = new Deck();\n this.clearPot();\n this.clearFolded();\n }",
... | [
"0.858912",
"0.8021415",
"0.79432636",
"0.76764685",
"0.763203",
"0.7460321",
"0.7430609",
"0.7324744",
"0.73176116",
"0.7203475",
"0.7155036",
"0.7140986",
"0.70475835",
"0.70356584",
"0.7015368",
"0.7014482",
"0.70111495",
"0.6992325",
"0.6990963",
"0.69902605",
"0.69797856... | 0.8945705 | 0 |
clears opponents hand, to be used before refreshing players hand | function clearOpponentsHand() {
$('.opponent-hand').empty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clearPlayerHand() {\n $('#player-hand').empty();\n }",
"reset() {\n this.playerContainer.players.forEach(x => x.clearHand())\n this.winner = undefined;\n this.incrementState();\n this.clearSpread();\n this.deck = new Deck();\n this.clearPot();\n this.clearFolded();\n }",
"fun... | [
"0.8490995",
"0.7870613",
"0.75510526",
"0.73895776",
"0.73173094",
"0.7286538",
"0.7220552",
"0.7168407",
"0.71541005",
"0.70693463",
"0.69925684",
"0.69807667",
"0.6969231",
"0.695551",
"0.694946",
"0.6948905",
"0.6931073",
"0.69202775",
"0.6920112",
"0.6913996",
"0.6886276... | 0.8869723 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.