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 |
|---|---|---|---|---|---|---|
Control the page Toolbar Color function change the toolbar color of pages depends on the previous state and current state hangePageToolbarColor(state) | function changePageToolbarColor(state) {
switch (state) {
case "home.answered":
$rootScope.toolbar_color = "green-light-bg";
break;
// Home page
// from created polls tab
case "home.mypolls":
$rootScope.toolb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function changePageHeaderToolbarColor(state) {\n console.log(state);\n switch (state) {\n case \"tab.mypolls\":\n $rootScope.header_color = \"swift-project-blue-bg\";\n $rootScope.menubar_color = \"swift-project-blue-bg\";\n $rootScope.tabbar_co... | [
"0.7807544",
"0.5833658",
"0.58193266",
"0.5804545",
"0.5761107",
"0.57042664",
"0.5693648",
"0.56339955",
"0.558064",
"0.5558559",
"0.55087495",
"0.54981214",
"0.5457541",
"0.54535794",
"0.54512435",
"0.5426412",
"0.5412439",
"0.53806734",
"0.5377867",
"0.5370908",
"0.536827... | 0.837875 | 0 |
This is where it is saying that the app is mounted and setting it to True !this.state.hasLoaded reverses the hasLoaded state | componentDidMount() {
this.setState({ hasLoaded: !this.state.hasLoaded });
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"toggleLoaded() {\n this.setState({ hasLoaded: !this.state.hasLoaded });\n }",
"app_ready(bool) {\n this.setState({isReady: bool});\n }",
"_loading(isShow) {\n if(! this._mounted) return;\n\n this.setState({\n ...this.state,\n loadingVisible: isShow\n });... | [
"0.7067901",
"0.7023554",
"0.6781921",
"0.6763752",
"0.6718328",
"0.6635297",
"0.6581352",
"0.6540016",
"0.65329635",
"0.6492674",
"0.6481489",
"0.6441509",
"0.6440655",
"0.6396533",
"0.633386",
"0.6332017",
"0.6323875",
"0.63052356",
"0.63052356",
"0.6267915",
"0.6265396",
... | 0.7467041 | 0 |
checks that the chat isn't already in our state | checkDuplicate(chat) {
for (let i = 0; i < this.state.userChatRooms.length; i++) {
if (this.state.userChatRooms[i].recipientID === chat.recipientID) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function chatroom_already_opened(id) {\n if ($(\"#messages_container_\" + id).length == 0) {\n\treturn false\n }\n return true\n}",
"checkIfRoombaIsHere() {\n if (this.stringify(this.state.id) === this.stringify(this.props.roomba)) {\n this.setState({dirt: false, roomba: true})\n }\n ... | [
"0.6565425",
"0.65221107",
"0.6452237",
"0.6317106",
"0.59953934",
"0.5850617",
"0.58171135",
"0.5792327",
"0.5754967",
"0.57370186",
"0.5723111",
"0.5722988",
"0.57035106",
"0.5583773",
"0.55782455",
"0.55515915",
"0.5530961",
"0.5528631",
"0.54912496",
"0.5481879",
"0.54707... | 0.7056771 | 0 |
!TUTORIAL CHANGE 5 TUTORIAL CHANGE 6 Given a key/value object, reformat into a string like that desired by GeoServer SQL views for the viewparams entry. | function viewparamsToStr(obj) {
var str = '';
$.each(obj, function(k,v) {
str.length && (str += ';');
str += k + ':' + v;
});
return str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function format(value) {\n return Object.keys(value).map(function(token) {\n var paramsList = value[token];\n if (!util.isArray(paramsList)) {\n paramsList = [paramsList];\n }\n return paramsList.map(function(params) {\n return [token].concat(Object.keys(params).map(function(k) {\n va... | [
"0.5419635",
"0.5419635",
"0.5419635",
"0.5345688",
"0.5238476",
"0.51147234",
"0.5095164",
"0.5094782",
"0.5089077",
"0.5081926",
"0.50470626",
"0.5042045",
"0.5041222",
"0.5040284",
"0.5036736",
"0.501963",
"0.49700165",
"0.4961021",
"0.4959845",
"0.4946619",
"0.494378",
... | 0.65055597 | 0 |
!TUTORIAL CHANGE 6 TUTORIAL CHANGE 7 Accept a string from the address form and call the WFS service to get a list of candidate matches. Takes in strings like "100 main" and call the responseFunc with an array of possible match objects. | function addressSource( requestString, responseFunc ) {
// Strip crazy (non-alpha) characters from the input string.
var querystr = requestString.term.replace(/[^0-9a-zA-Z ]/g, "");
// If there's nothing left after stripping, just return null.
if ( querystr.length == 0 ) {
response([]);
return;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAdressMatches(matches,val, postcode) {\n\n var promise = getGeoCodeData(val,postcode);\n promise.then(function(result){\n matches = result.data.results.map(function (item) {\n return item.formatted_address;\n });\n })\n }",
"function getMatches(){\n //Third ajax cal... | [
"0.60758567",
"0.5675453",
"0.56236625",
"0.55200595",
"0.55041516",
"0.55013955",
"0.5489578",
"0.5470285",
"0.54581064",
"0.5385305",
"0.5378676",
"0.5323734",
"0.53072506",
"0.5289889",
"0.5286402",
"0.5283914",
"0.5280416",
"0.5276514",
"0.527528",
"0.5250622",
"0.5244494... | 0.61079943 | 0 |
Clears all buttons from the buttonContainer | function clearButtons() {
const childList = buttonContainer.getElementsByTagName("button");
for (let i = childList.length - 1; i >= 0; i--) {
buttonContainer.removeChild(childList[i]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ClearButtons() {\n\tControllerButtonsX = [];\n\tControllerButtonsY = [];\n}",
"function clear() {\n $(\"#buttons\").empty()\n}",
"function buttonsReset() {\n for (let i = 0; i < all_buttons.length; i++) {\n all_buttons[i].classList.remove(all_buttons[i].classList[1]);\n all_buttons[i].classL... | [
"0.7633287",
"0.74805176",
"0.7015407",
"0.69841564",
"0.68288416",
"0.68184966",
"0.6817609",
"0.6812738",
"0.6717481",
"0.67168665",
"0.6709066",
"0.6693643",
"0.6623457",
"0.66104424",
"0.65936226",
"0.65265137",
"0.6521766",
"0.6500772",
"0.6500253",
"0.6490388",
"0.64546... | 0.8554784 | 0 |
Define a 1 SEC TIMER BLOCK | function OneSecondTimerBlock()
{
this.objectName = "OneSecondTimer";
this.text="1 SEC TIMER";
//this.d=new Date();
this.isTiming = 0;
this.doneTiming=0;
this.startTime=0;
this.currentTime=0;
this.timerTime=0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function startTimer() {\r\n var gTime1 = Date.now();\r\n var gMyTime = setInterval(timeCycle, 1);\r\n}",
"function startTimer() {\r\n gTime1 = Date.now();\r\n gMyTime = setInterval(timeCycle, 1);\r\n}",
"function startClock(){\n\tt = getTime();\n\tsetNum(\"sec2\" ,t[\"s2\"]);\n\tsetNum(\"sec1\" ,t[... | [
"0.6676434",
"0.6648312",
"0.66265094",
"0.66124064",
"0.65973777",
"0.65973777",
"0.65856713",
"0.65118915",
"0.64775044",
"0.6450322",
"0.64498097",
"0.6448612",
"0.64415395",
"0.6434998",
"0.6420791",
"0.6401119",
"0.64005435",
"0.6395653",
"0.6394498",
"0.63812935",
"0.63... | 0.7793875 | 0 |
Define a SET/RESET BLOCK | function SetResetBlock()
{
this.objectName = "SetReset";
this.text="SR";
this.lastOutput=0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function blk() {\n prev = -1;\n flag3 = 0;\n type = 4; // For block type is equal to four\n}",
"Reset() {}",
"handleReset() {\n\n }",
"function block(){\n flag2=0;\nv=2;\n}",
"function reset() {\n generateBlocks();\n active = false;\n changeSpeed(speed_modes.NORMAL);\n}",
"async R... | [
"0.60728234",
"0.57646394",
"0.5759924",
"0.5564364",
"0.55411744",
"0.54701537",
"0.543955",
"0.540817",
"0.53482443",
"0.5320701",
"0.5305064",
"0.5280474",
"0.52648556",
"0.5239626",
"0.52276886",
"0.52261484",
"0.5209014",
"0.5197658",
"0.5197658",
"0.5197168",
"0.5188229... | 0.7524457 | 0 |
Define a Constant Block | function ConstantBlock()
{
this.objectName = "Constant";
this.divHeight=16;
this.divWidth=40;
this.temp=prompt("Enter value","0");
this.constantValue=parseInt(this.temp);
this.text = this.constantValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Constants() {\n if (currentToken() == \"constantes\") {\n nextToken();\n if (currentToken() == \"{\") {\n nextToken();\n ConstBody();\n if (currentToken() == \"}\") {\n nextToken();\n return;\n }\n }\n } else {\n let errorMessage = \"... | [
"0.68229926",
"0.6301021",
"0.6301021",
"0.607316",
"0.6049467",
"0.59216326",
"0.5851729",
"0.5712513",
"0.5675866",
"0.5628387",
"0.56228644",
"0.5622842",
"0.5569251",
"0.5558835",
"0.55307925",
"0.5489915",
"0.5480947",
"0.5478559",
"0.54644287",
"0.5435385",
"0.5431923",... | 0.7103761 | 0 |
Define a Variable Block | function VariableBlock()
{
this.objectName = "Variable";
this.divHeight=16;
this.divWidth=40;
this.variableValue=0;
this.text=0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function variableBlock(varName) {\n var newBlock = SpriteMorph.prototype.variableBlock(varName);\n newBlock.isDraggable = false;\n newBlock.isTemplate = true;\n return newBlock;\n }",
"function getVariableBlock(){ \n \nworkspacePlayground.updateToolbox(\"<category n... | [
"0.764754",
"0.7576448",
"0.75146216",
"0.6983418",
"0.6772254",
"0.67684793",
"0.67544466",
"0.6721979",
"0.67157775",
"0.67157775",
"0.67157775",
"0.67157775",
"0.67157775",
"0.67157775",
"0.67157775",
"0.6690313",
"0.64730114",
"0.63530487",
"0.63530487",
"0.63155407",
"0.... | 0.79838747 | 0 |
Define an AI Block | function AiBlock()
{
this.objectName = "Ai";
this.divHeight=16;
this.divWidth=120;
this.text=819;
this.rawValue=819;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Block(game) {\n console.debug(\"creating a Block!\", game);\n\n Phaser.Sprite.call(this, game, 50, 50, 'game_sprites', 1);\n\n game.add.existing(this);\n game.physics.enable(this, Phaser.Physics.ARCADE);\n\n}",
"function AinBlock()\r\n{\r\n this.objectName = \"Ain\";\r\n\tthis.text = \"AIN\"\r\n\... | [
"0.6668123",
"0.664698",
"0.66264397",
"0.6340612",
"0.6316894",
"0.63144994",
"0.6305578",
"0.6300761",
"0.6266037",
"0.6243179",
"0.6213729",
"0.62135917",
"0.61793745",
"0.6177513",
"0.6135737",
"0.6109445",
"0.609231",
"0.6080675",
"0.60548955",
"0.60515434",
"0.6049917",... | 0.7018836 | 0 |
Define an AIN Block | function AinBlock()
{
this.objectName = "Ain";
this.text = "AIN"
this.linearConstant=0.0;
this.scaledValue=0.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function AiBlock()\r\n{\r\n this.objectName = \"Ai\";\r\n\tthis.divHeight=16;\r\n\tthis.divWidth=120;\r\n\tthis.text=819;\r\n\tthis.rawValue=819;\r\n}",
"function Block (data) {\n extend(this, data);\n}",
"enterBlock(ctx) {\n\t}",
"constructor() { \n \n Block.initialize(this);\n }",
"f... | [
"0.70332444",
"0.59573996",
"0.5891128",
"0.5873665",
"0.57659185",
"0.57393575",
"0.56716156",
"0.56716156",
"0.56624",
"0.56301504",
"0.552827",
"0.55032194",
"0.54913276",
"0.5462418",
"0.54347163",
"0.5429952",
"0.5415442",
"0.536643",
"0.5366365",
"0.5347472",
"0.5339716... | 0.7623183 | 0 |
Define an Unpack 16 Block | function UnpackSixteenBlock()
{
this.objectName = "UnpackSixteen";
this.text="UNPACK 16";
this.divHeight=320;
this.inputNumber=0;
this.indexCounter=0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function PackSixteenBlock()\r\n{\r\n this.objectName = \"PackSixteen\";\r\n\tthis.text=\"PACK 16\";\r\n\tthis.divHeight=320;\r\n\tthis.outputNumber=0;\r\n\tthis.tempNumber=0;\r\n\tthis.indexCounter=0;\r\n}",
"static buildblockRef(blockRef) {\n return Buffer.concat([\n Bytes.padToDword(Bytes.numberToBu... | [
"0.7145225",
"0.6198902",
"0.590265",
"0.58619785",
"0.58358485",
"0.58358485",
"0.58358485",
"0.5769307",
"0.56147695",
"0.5593598",
"0.5590235",
"0.5572084",
"0.55185926",
"0.54645264",
"0.54041404",
"0.5387194",
"0.53824204",
"0.537348",
"0.536797",
"0.53568697",
"0.534807... | 0.80627877 | 0 |
Define a Pack 16 Block | function PackSixteenBlock()
{
this.objectName = "PackSixteen";
this.text="PACK 16";
this.divHeight=320;
this.outputNumber=0;
this.tempNumber=0;
this.indexCounter=0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function UnpackSixteenBlock()\r\n{\r\n this.objectName = \"UnpackSixteen\";\r\n\tthis.text=\"UNPACK 16\";\r\n\tthis.divHeight=320;\r\n\tthis.inputNumber=0;\r\n\tthis.indexCounter=0;\r\n}",
"static buildblockRef(blockRef) {\n return Buffer.concat([\n Bytes.padToDword(Bytes.numberToBuffer(blockRef.helix... | [
"0.72439224",
"0.59736055",
"0.57161105",
"0.5713594",
"0.5683728",
"0.5632559",
"0.5619608",
"0.5614562",
"0.55874586",
"0.55874586",
"0.55874586",
"0.558209",
"0.5563243",
"0.55030274",
"0.549424",
"0.546159",
"0.546159",
"0.5453994",
"0.5444418",
"0.54123694",
"0.53951895"... | 0.7657146 | 0 |
Define a First Order Lag Block | function FirstOrderLagBlock()
{
this.objectName = "FirstOrderLag";
this.text="1ST ORDER";
this.lastpv=0.0;
this.currentScan=0;
this.lastScan=0;
this.firstScan=1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function LT(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'LT[]', e2, e1);\n }\n\n stack.push(e1 < e2 ? 1 : 0);\n ... | [
"0.60266775",
"0.59082663",
"0.5871573",
"0.5652495",
"0.55405366",
"0.5451486",
"0.5430944",
"0.5411319",
"0.5338577",
"0.532409",
"0.5281012",
"0.5276873",
"0.52145165",
"0.51899385",
"0.5147919",
"0.5113155",
"0.5093714",
"0.5088187",
"0.5060251",
"0.5039114",
"0.50337064"... | 0.71230465 | 0 |
Define a Select Block | function SelectBlock()
{
this.objectName = "Select";
this.text="SELECT";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"select(select) {\r\n this.select = select;\r\n return this;\r\n }",
"select() {}",
"function selectBlocks(data,options) {\n\n\t$.each($(data).find(\"data\").children(), function() {\n\t\tvar id = (this).nodeName;\n\t\tvar status = $(this).attr(\"status\");\n\t\tvar signal = $(this).attr(\"sign... | [
"0.6617413",
"0.6211614",
"0.6201514",
"0.6166128",
"0.6122399",
"0.6122399",
"0.6014273",
"0.5991502",
"0.5979893",
"0.59268135",
"0.59268135",
"0.58875656",
"0.58553874",
"0.5845486",
"0.5841863",
"0.5823422",
"0.58227736",
"0.5816331",
"0.5815378",
"0.5815378",
"0.5803049"... | 0.7345521 | 0 |
on drag start, store the object's name to be retrieved when it is dropped | onDragStart(e, name){
console.log('now dragging',name);
e.dataTransfer.setData("name", name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"startDrag(event) {\n event.dataTransfer.setData(\"text\", event.target.id);\n }",
"function handleDragStart(e) {\n e.dataTransfer.setData(\"text\",e.target.id);\n}",
"function dragStart(e){\n\te.dataTransfer.setData('text', e.target.id);\n}",
"function start(ev) {\n //guardo el id del elemento ... | [
"0.699723",
"0.69722706",
"0.6923607",
"0.69191235",
"0.6907267",
"0.6898091",
"0.68653286",
"0.68518335",
"0.6723376",
"0.6646868",
"0.6646216",
"0.662704",
"0.6617976",
"0.65934044",
"0.65933555",
"0.6586982",
"0.65777147",
"0.6559529",
"0.6531038",
"0.65285814",
"0.6509035... | 0.759452 | 0 |
on drop, rebuild the internal list of items, updating the category of the moved item to the category it was moved to and relocating the moved item to the end of the array so that the moved item is always displayed after items already in the category that the item was moved to | onDrop(e, cat){
// retrieve name of object meing moved
let name = e.dataTransfer.getData("name");
/* construct first part of new array by retrieving all elements from old
array except the element being moved */
let arr1 = this.state.items.filter((item) => {
if(item.name !== name){
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function dropMove (event, item) {\n /* NOTE: there is definitely a more clever way of doing this\n involving the indexOf function\n these weird for loops basically find out where the item\n and dropzone is in their respective arrays */\n let bulletIndex\n let dropIndex\n event.preventDefault()\n f... | [
"0.65321124",
"0.64535195",
"0.6328856",
"0.61886704",
"0.6181623",
"0.61163425",
"0.60796213",
"0.60505307",
"0.60403734",
"0.6034077",
"0.601483",
"0.60010827",
"0.594929",
"0.5943711",
"0.59128445",
"0.5908257",
"0.5856515",
"0.5827872",
"0.5827486",
"0.581196",
"0.5796199... | 0.77966195 | 0 |
render balloon object render hitboxes | render()
{
if (this.alive)
{
ctx.drawImage(balloonImage, this.xPos, this.yPos, this.xSize, this.ySize);
if (player.weAreHit === 1)
{
balloonImage.setAttribute("src", "pictures/balloon/8bit-balloon-oneshot.png");
document.getElementB... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function renderBombs()\n{\n //for each bomb\n balloonAmmo.forEach(oneBomb =>\n {\n //if bomb has exploded\n if (oneBomb.exploded)\n {\n ctx.drawImage(explodedBombImage, oneBomb.x, oneBomb.y, bombSize, bombSize); \n }\n //if bomb has been fired\n else i... | [
"0.6706216",
"0.6476554",
"0.6391629",
"0.6238197",
"0.6143452",
"0.6054024",
"0.59970206",
"0.59951186",
"0.59905386",
"0.5983194",
"0.5972856",
"0.5970901",
"0.5952274",
"0.5951627",
"0.59373236",
"0.5937233",
"0.5898467",
"0.58839536",
"0.58783287",
"0.58663386",
"0.586096... | 0.70939875 | 0 |
render bunkers if alive | function renderBunkers()
{
//for each bunker
liveBunkers = 0;
manyBunkers.forEach(oneBunker =>
{
//if bunker is alive
if (oneBunker.alive)
{
liveBunkers++;
//draw the bunker
ctx.drawImage(bunkerImage, oneBunker.x, oneBunker.y, bunkerXSize, bunk... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onBecameVisible() {\n\n // Start rendering if needed\n if (!this.isRendering) {\n this.isRendering = true\n this.render()\n }\n\n }",
"renderBombRemaining(remainingBombs) {\n this.$bombRemaining.innerHTML = remainingBombs;\n }",
"render() {\n\t\tlet bomb = \"\"... | [
"0.58790004",
"0.58333945",
"0.58232796",
"0.58107257",
"0.5793943",
"0.57440794",
"0.56614864",
"0.5609888",
"0.5547273",
"0.55401844",
"0.5478323",
"0.5462383",
"0.54517716",
"0.544839",
"0.53785646",
"0.5352232",
"0.53337353",
"0.53129655",
"0.53071576",
"0.53018624",
"0.5... | 0.70672506 | 0 |
render bombs for balloon | function renderBombs()
{
//for each bomb
balloonAmmo.forEach(oneBomb =>
{
//if bomb has exploded
if (oneBomb.exploded)
{
ctx.drawImage(explodedBombImage, oneBomb.x, oneBomb.y, bombSize, bombSize);
}
//if bomb has been fired
else if (oneBomb.fired... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function drawBalloon(bln) {\n fill(bln.color)\n ellipse(bln.x, bln.y, bln.width, bln.height)\n}",
"function renderBalloons() {\n var strHTML = '';\n for (var i = 0; i < gBalloons.length; i++) {\n strHTML += `<div \n style=\"background-color: ${getRandomColor()}; left: ${i * 100}px;\" onmous... | [
"0.69036317",
"0.67717993",
"0.65407145",
"0.6406993",
"0.6372101",
"0.6367227",
"0.6148947",
"0.6135629",
"0.6063486",
"0.601503",
"0.5984235",
"0.58289737",
"0.5783097",
"0.57730895",
"0.57667166",
"0.5745608",
"0.5743903",
"0.57424784",
"0.57196",
"0.5684611",
"0.5681665",... | 0.6791951 | 1 |
move bombs according to gravity | function moveBombs()
{
//for each bomb
balloonAmmo.forEach(oneBomb =>
{
//if bomb has been fired
if (oneBomb.fired)
{
//move bomb down according to gravity
oneBomb.y += 0.98 * oneBomb.speed;
oneBomb.speed++;
//console.log(bombIndex);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function apply_gravity(){\r\n for (let b = 0; b < balls.length; b++){\r\n balls[b].vy += gravity * time_delta_s;\r\n }\r\n}",
"function updateBoatPosition() {\n switch (activeClass) {\n case 0:\n // no movement\n velocity = 0;\n break;\n case 1:\n // Boat is going right, m... | [
"0.7153948",
"0.6913865",
"0.6856867",
"0.6746321",
"0.6734316",
"0.6631501",
"0.6581801",
"0.6565334",
"0.65506864",
"0.6550315",
"0.6507549",
"0.6498057",
"0.64940137",
"0.64849025",
"0.6473243",
"0.6449718",
"0.6410016",
"0.63828796",
"0.6380559",
"0.6380512",
"0.6378656",... | 0.6974702 | 1 |
sets bomb fired to true | function bombFired()
{
let oneBomb = balloonAmmo[bombIndex];
if (oneBomb !== undefined && oneBomb !== null)
{
oneBomb.fired = true;
bombIndex++;
bombsLeft--;
}
else
{
console.log("You are out of bombs!!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"youreFired() {\n this.fired = false;\n this.stopBoss = true;\n this.boss.animations.stop(null, true);\n\n this.firedBubble = this.game.add.sprite(\n this.boss.body.position.x - 5,\n this.boss.body.position.y - 75,\n \"firedBubble\"\n );\n this.firedBubble.scale.setTo(0.7);\n\n /... | [
"0.73715186",
"0.7045759",
"0.6660445",
"0.6620889",
"0.6568646",
"0.6503331",
"0.6442205",
"0.6401677",
"0.6380995",
"0.63340384",
"0.63319916",
"0.6273271",
"0.62592226",
"0.6228813",
"0.622163",
"0.6216715",
"0.6185488",
"0.61832744",
"0.6102694",
"0.6070158",
"0.6060683",... | 0.78091305 | 0 |
Retrieve the current Counters from CounterStore | function getCountersState() {
return {
counters: store.getAll()
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getCounter() {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n\n let proxyResult;\n proxyResult = Module._vscr_ratchet_message_get_counter(this.ctxPtr);\n return proxyResult;\n }",
"componentDidMount() {\n try {\n const localCounters = localS... | [
"0.60005736",
"0.5617781",
"0.5604034",
"0.55795556",
"0.55481356",
"0.5468532",
"0.54629403",
"0.5459023",
"0.53938776",
"0.53166467",
"0.5313207",
"0.53031033",
"0.52869964",
"0.5249105",
"0.52455544",
"0.5222624",
"0.5216401",
"0.5190935",
"0.51898295",
"0.51898295",
"0.51... | 0.75450206 | 0 |
check language when start loading window | function checkLanguage() {
var code = localStorage.getItem("languageCode");
if (code == null) {
code = "en";
}
$(".language-code").val(code);
translate(code);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_loadWithCurrentLang() {\n i18n.changeLang(this.DOM.body, this.lang, this.DOM.domForTranslate, true);\n }",
"function initLanguage() {\n if(getLanguage()) return;\n setItem('language', 'sv');\n}",
"function setlanguage(){\r\n\tif (getRequestParam(\"lang\") == \"de\") {\r\n\t\tshowGer()\r\n\t}\r\n\telse {... | [
"0.6884226",
"0.6832926",
"0.6755702",
"0.66840863",
"0.6650057",
"0.66292006",
"0.6566298",
"0.6520625",
"0.6519556",
"0.64895076",
"0.64705086",
"0.64441484",
"0.6395555",
"0.6367066",
"0.63437295",
"0.6272665",
"0.6271684",
"0.62480116",
"0.62445414",
"0.62244296",
"0.6219... | 0.6959501 | 0 |
Publish zone current preset | function publishZonePreset(preset) {
mqtt.publish('devices/audio-zone/' + preset.zoneId + '/input/get', preset.getInput(), {retain: true});
mqtt.publish('devices/audio-zone/' + preset.zoneId + '/volume/get', preset.getVolumeDb().toString(10), {retain: true});
mqtt.publish('devices/audio-zone/' + preset.zoneId + '/ba... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function publishZendeskProject () {\n fs.readFile(path.join(global.project.getPath(), '.adxstudio', 'zendesk.json'), function (err, data) {\n let json = err ? '' : JSON.parse(data.toString());\n appSettings.getPreferences(function onReadPreferences (preferences){\n if (json !== '') {\n preferenc... | [
"0.5559367",
"0.55049294",
"0.54075694",
"0.5287534",
"0.5086002",
"0.49977785",
"0.49036625",
"0.48536432",
"0.48497123",
"0.47747397",
"0.47283202",
"0.4718082",
"0.4714209",
"0.46600363",
"0.46473527",
"0.4634699",
"0.46313867",
"0.4605167",
"0.45758596",
"0.45747137",
"0.... | 0.7483781 | 0 |
Returns the full game infos from player, see types/goat | async getGameInfos() {
await this.login(LOGIN_ACCOUNT_GAUTIER)
const game = await this.sendRequest({ rsn:'2ynbmhanlb',guide:{ login:{ language:1,platform:'gaotukc',ug:'' } } }, '699002934')
return game.a
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getGameInfo() {\n limiter.request({\n url: `https://global.api.pvp.net/api/lol/static-data/euw/v1.2/champion?champData=all&${api}`,\n method: 'GET',\n json: true,\n }, (error, response) => {\n if (!error && response.statusCode === 200) {\n champions = response.body.data;\n version ... | [
"0.73567605",
"0.6876873",
"0.67519736",
"0.66354805",
"0.6546519",
"0.6421563",
"0.63959444",
"0.63904774",
"0.637001",
"0.6338678",
"0.628366",
"0.6283539",
"0.6196125",
"0.61839604",
"0.6182289",
"0.61665374",
"0.6154234",
"0.61119866",
"0.6092738",
"0.6085794",
"0.6060126... | 0.7415836 | 0 |
CustomIntervalSelector for Custom Interval Selector group. It is a parent component of this group. | function CustomIntervalSelector(props) {
const {
modalOpen,
hasSubdailyLayers,
} = props;
let customIntervalWidget;
const customDelta = useSelector((state) => state.date.customDelta || 1);
const customInterval = useSelector((state) => state.date.customInterval || state.date.interval);
const dispa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getInterval() {\n return this._interval;\n }",
"changeInterval(interval){\n this.interval = interval;\n }",
"interval(ms) {\r\n intervalMode = true\r\n interval = ms\r\n return this\r\n }",
"function getIntervalOptions() {\n return getOptionsWithDe... | [
"0.53564805",
"0.5268263",
"0.52321446",
"0.520655",
"0.5141541",
"0.5049458",
"0.50176996",
"0.5002033",
"0.49643424",
"0.49367562",
"0.48702422",
"0.48492765",
"0.48449796",
"0.4824739",
"0.48143053",
"0.4810755",
"0.48100466",
"0.48100466",
"0.48100466",
"0.48100466",
"0.4... | 0.63430065 | 0 |
Change the status order | function changeOrderStatus(elem, prevStatus, newStatus){
//Get status_options
let status_options = getData('status_options');
//Change the class and innerHTML
elem.classList.remove(status_options[prevStatus-1].toLowerCase());
elem.classList.add(status_options[newStatus-1].toLowerCase());
el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateStatus(newStatus) {\n console.log(\"PX: UPDATE STATUS:\" + newStatus + \"\\n\");\n }",
"changeStatus(params) {\n var index = this.list.map(i => i.id).indexOf(params.id);\n this.list[index].open = params.status;\n ls.updateItem({id : params.id}, {open : params.status});\n t... | [
"0.6723103",
"0.67020494",
"0.66799253",
"0.6563147",
"0.6532145",
"0.6429928",
"0.6395526",
"0.637232",
"0.63575643",
"0.6317403",
"0.6285999",
"0.6273479",
"0.6240728",
"0.6147511",
"0.61039066",
"0.6069602",
"0.6059443",
"0.595147",
"0.5946564",
"0.59290814",
"0.5928677",
... | 0.6850596 | 0 |
Return the link to Order Number | function create_link(link, number) {
let a = document.createElement('a');
a.setAttribute('href', link);
a.setAttribute('target', 'blank');
a.innerHTML = `# ${number.toString().padStart(5, '0')}`;
return a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function orderUrl(req, orderId) {\n return selfUrl(req).replace(req.originalUrl, `/orders/${orderId}`);\n}",
"function get_order_url(db, ts, orderID) {\n \"use strict\";\n return [lnt_url_base, \"db_\" + db, \"v4\", ts, \"order\", orderID].join('/');\n}",
"pageLink(num) {\n let name;\n if(... | [
"0.61414194",
"0.5877528",
"0.57559353",
"0.55455434",
"0.55388814",
"0.5522092",
"0.5502088",
"0.548982",
"0.5401646",
"0.53987855",
"0.53823245",
"0.535459",
"0.53254205",
"0.5318288",
"0.53013486",
"0.52954775",
"0.5293183",
"0.5287775",
"0.5286919",
"0.5286919",
"0.528691... | 0.59519696 | 1 |
Return a span element to status order | function create_status(status) {
let elem = document.createElement('span');
elem.classList.add(status.toLowerCase(), 'status-order');
elem.textContent = status.toUpperCase();
return elem;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_createReadStatus() {\n const status = document.createElement('span');\n return status;\n }",
"formatSpan() {\n let span = document.createElement('span')\n span.id = `span${this.id}`\n\n let p = document.createElement('p')\n p.id = `name${this.id}`\n p.innerText = this.n... | [
"0.6607861",
"0.6158333",
"0.60553163",
"0.6031069",
"0.60203916",
"0.5852875",
"0.58322334",
"0.5793722",
"0.5789556",
"0.5787653",
"0.57543385",
"0.5672839",
"0.5670141",
"0.56542265",
"0.564307",
"0.5624413",
"0.56078464",
"0.55967766",
"0.55856586",
"0.558403",
"0.5579928... | 0.68588597 | 0 |
Delete the content of table body to avoid render the same data several times | function deleteTableContent(table){
table.tBodies[0].textContent = '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deleteAllRow(tableBodyId) {\n tableBodyId.innerHTML = \"\";\n}",
"function clear(){\n $(\"#table-body\").html(\"\")}",
"clearDataTableBody() {\n\t\tgetComponentElementById(this,\"DataTableBody\").html(\"\");\n\t}",
"function clearTable() {\n tbody.html(\"\");\n}",
"function clearTableBody... | [
"0.74229074",
"0.73893845",
"0.73327744",
"0.72279626",
"0.72180057",
"0.7116507",
"0.7087573",
"0.7086476",
"0.70780504",
"0.7057135",
"0.7022869",
"0.69343513",
"0.69333017",
"0.69187766",
"0.69031346",
"0.6887395",
"0.68637884",
"0.67847204",
"0.67639214",
"0.67639214",
"0... | 0.7693849 | 0 |
Hide all rows in table | function hideTable(table){
let rows = Array.from(table.rows).slice(1);
rows.map(hideRow);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showAllRows() {\n for(var i =0 ; i < rowsLength; i ++){\n tBody.rows[i].style.display = \"\";\n }\n }",
"hideAll() {\n\n\t\tthis._gridIterator( col => {\n\t\t\tcol.$elem.hide();\n\t\t});\n\t}",
"hideAllColumns(){\n\t\t\tthis.properties.forEach(function(entry){\n\t\t\t\tset(... | [
"0.771367",
"0.743633",
"0.71537465",
"0.6976238",
"0.6868738",
"0.6861155",
"0.6801109",
"0.6737119",
"0.6651758",
"0.66164595",
"0.65994966",
"0.65821767",
"0.6581083",
"0.65576243",
"0.65486485",
"0.65480244",
"0.6508384",
"0.6502179",
"0.648067",
"0.6463334",
"0.6463334",... | 0.81083035 | 0 |
Select the page of pagination. Return the current page selected. | function selectPagePagination(numPage) {
let page = numPage;
const pages = document.querySelectorAll('.pagination-page');
let maxpages = pages.length;
//Set the limit of page
if (page < 1) page=1;
if (page > maxpages) page = maxpages;
//Put the class 'pagination-selected' in the page s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getSelectedPageIndex() {\n return this.selectedPageIndex;\n }",
"function selectPage(target, step) {\n var state = $.data(target, 'combogrid');\n if (!state.grid) $(target).combo(\"panel\");\n var grid = state.grid;\n var gridopts = grid.datagrid(\"options\");\n if (!... | [
"0.70438474",
"0.6893572",
"0.6864761",
"0.66576564",
"0.6565589",
"0.65567124",
"0.6483989",
"0.64828914",
"0.63914293",
"0.6333083",
"0.6294142",
"0.6276554",
"0.62614316",
"0.6227891",
"0.6224221",
"0.61684555",
"0.6162794",
"0.61543185",
"0.61480945",
"0.6142463",
"0.6142... | 0.7225165 | 0 |
ClosePregunta > Esconde la pregunta y muestra el tablero | function closePregunta()
{
var tablero=document.getElementsByClassName("Tablero");
var pregunta=document.getElementsByClassName("Pregunta");
pregunta[0].className="Pregunta NoDisplay";
tablero[0].className="Tablero";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mostrarDescendente() {\n\n\n let listaCursos = getListaCursosActii();\n\n listaCursos.reverse(); // copiar esto abajo\n\n let cuerpoTabla = document.querySelector('#table tbody');\n cuerpoTabla.innerHTML = '';\n\n for (let i = 0; i < listaCursos.length; i++) {\n let fila = cuerpoTabl... | [
"0.6201714",
"0.61325353",
"0.60165465",
"0.59729975",
"0.59709966",
"0.59331524",
"0.5910437",
"0.5872043",
"0.58516246",
"0.58360034",
"0.5804559",
"0.5777886",
"0.57614136",
"0.5752614",
"0.5752329",
"0.5743769",
"0.5735857",
"0.57241136",
"0.5719106",
"0.56991833",
"0.569... | 0.70013195 | 0 |
chdir to working directory and read initial directory listing. | function init() {
elmDir = path.join(__dirname, '..', 'frontend', 'elm');
process.chdir(elmDir);
readDirectoryListing();
maxIndex = calculateMaxIndex();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function init()\r\n\t\t\t{ \r\n\t\t\t\tget_data('get_dir','','directory');\r\n\t\t\t\tget_data('read_dir','current_dir','file_folder');\r\n\t\t\t}",
"function stepIo(dir) {\n\n\tif (dir != \"..\")\n\t\tproperties.tree.push(dir);\n\telse if (properties.tree.length > 1)\n\t\tproperties.tree.pop();\n\n\tfetchDirect... | [
"0.61010575",
"0.59863126",
"0.58688456",
"0.5807152",
"0.559403",
"0.5577278",
"0.5516965",
"0.54749215",
"0.54299206",
"0.5413087",
"0.5390449",
"0.5354055",
"0.5301081",
"0.5299751",
"0.5299583",
"0.5273416",
"0.52716845",
"0.52693135",
"0.5248567",
"0.52447045",
"0.522255... | 0.6276445 | 0 |
Refresh users list depending group selected or not | function refreshUser(){
var urlUsers="/users.json";
if(parseInt(jQuery('#search-group').val())>0){
urlUsers=urlUsers+'?group_id='+jQuery('#search-group').val();
}
jQuery('#search-assigned').empty();
getJson(urlUsers,function(data){
jQuery('#search-assigned').append(jQuery('<option>').html(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function refresh() {\r\n users = [];\r\n groups = [];\r\n populateUsers(UsersGroupsRefresh.getUsers());\r\n populateGroups(UsersGroupsRefresh.getGroups());\r\n }",
"function refreshSelect() {\n if(selectedIndex == -1) {\n return;\n }\n\n if(selectFlag == \"ONE\") {\n selectUse... | [
"0.71063",
"0.7063662",
"0.6835792",
"0.6814255",
"0.6726307",
"0.6707434",
"0.6694726",
"0.66808355",
"0.6664938",
"0.66525126",
"0.6596886",
"0.6576155",
"0.6563597",
"0.6530742",
"0.6486426",
"0.64844346",
"0.647451",
"0.6408293",
"0.63992125",
"0.63861275",
"0.6371231",
... | 0.75838363 | 0 |
TODO: Extends from BaseCollection restrict this.collection into this._collection write new methods that replace this.collection usage Find usage of UserTransportationCollection.collection in other files and use the new methods Make a enum file for the allowed values Not urgent: add validation in get, set, etc methods | constructor() {
// The name of this collection.
this.name = 'UserTransportationCollection';
// Define the Mongo collection.
this.collection = new Mongo.Collection(this.name);
// Define the structure of each document in the collection.
this.schema = new SimpleSchema({
transport: {
t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get collection() {\n return this._collection;\n }",
"function Collection () {}",
"function Collection () {}",
"function Collection () {}",
"function Collection() {}",
"function Collection() {}",
"function Collection() {}",
"function Collection() {\n}",
"constructor(collection) {\n this... | [
"0.56673086",
"0.5594989",
"0.5594989",
"0.5594989",
"0.5557267",
"0.5557267",
"0.5557267",
"0.5323957",
"0.5315111",
"0.52719885",
"0.52664846",
"0.52313924",
"0.51197016",
"0.5081885",
"0.5049503",
"0.5045316",
"0.5024589",
"0.5009815",
"0.4959944",
"0.49434274",
"0.4938082... | 0.5875845 | 0 |
destination:'public/uploads/'+new Date().getFullYear() + (new Date().getMonth()+1) + new Date().getDate(), | destination(req, res, cb) {
cb(null, './upload/');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"destination(req, file, cb) {\n cb(null, './uploads/');\n }",
"destination(req, file, callback) {\n callback(null, \"uploads/\")\n }",
"static getPDFUploadPath(email,timeStamp){\n var pdfPath='uploads/'+email+'_'+timeStamp+'_PDF';\n return pdfPath;\n}",
"destination(req, file, cb) {\... | [
"0.61608154",
"0.6002254",
"0.58903325",
"0.5801544",
"0.56763",
"0.5457425",
"0.5424521",
"0.5424521",
"0.54072195",
"0.5396998",
"0.5391611",
"0.53682417",
"0.53595483",
"0.53364193",
"0.52972275",
"0.5283709",
"0.527432",
"0.527342",
"0.52377456",
"0.52249515",
"0.5222213"... | 0.60710484 | 1 |
add an 'objType' property to the Topic document | objType( self ){
return R_OBJ_TOPIC;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addObjectTypeProperty(objType, propName, propDesc, def){\n\tvar a = {\n\t\tname: propName,\n\t\tdescription: propDesc,\n\t\tdef: def\n\t};\n\t\n\tobjType.properties.push(a);\n\t\n\treturn a;\n}",
"static initialize(obj, type) { \n obj['type'] = type;\n }",
"static initialize(obj, type) { \n ... | [
"0.6243131",
"0.5885926",
"0.5885926",
"0.5885926",
"0.58725446",
"0.57360697",
"0.5698143",
"0.56729096",
"0.54864997",
"0.53970927",
"0.52706486",
"0.5135581",
"0.51226795",
"0.5105663",
"0.50809807",
"0.5079438",
"0.5057882",
"0.5029874",
"0.5029874",
"0.50130016",
"0.5012... | 0.65782046 | 0 |
Provides: caml_subarray_to_string Requires: raw_array_sub | function caml_subarray_to_string (a, i, len) {
var f = String.fromCharCode;
if (i == 0 && len <= 4096 && len == a.length) return f.apply (null, a);
var s = "";
for (; 0 < len; i += 1024,len-=1024)
s += f.apply (null, raw_array_sub(a,i, Math.min(len, 1024)));
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function arrayToString(a) {\n return \"[\" + a.join(\", \") + \"]\";\n}",
"function arrayToString(array) {\n var string = \"\";\n for (let j = 0; j < array.length; j++){\n var string = string + array[j] + '\\n';\n };\n return string = string.slice(0, -1);\n ... | [
"0.6444515",
"0.6380985",
"0.6367817",
"0.6272288",
"0.6269287",
"0.6216958",
"0.6189744",
"0.61550164",
"0.60713416",
"0.6028579",
"0.60052544",
"0.5981305",
"0.5961072",
"0.5959249",
"0.59049267",
"0.58725756",
"0.5847425",
"0.58449984",
"0.58449984",
"0.58449984",
"0.58313... | 0.76809037 | 1 |
Provides: caml_to_js_string Requires: caml_convert_string_to_bytes, caml_is_ascii, caml_utf16_of_utf8 | function caml_to_js_string(s) {
switch (s.t) {
case 9: /*BYTES | ASCII*/
return s.c;
default:
caml_convert_string_to_bytes(s);
case 0: /*BYTES | UNKOWN*/
if (caml_is_ascii(s.c)) {
s.t = 9; /*BYTES | ASCII*/
return s.c;
}
s.t = 8; /*BYTES | NOT_ASCII*/
case 8: /*BYTES | NOT_ASCI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_js_to_string (s) {\n var tag = 9 /* BYTES | ASCII */;\n if (!caml_is_ascii(s))\n tag = 8 /* BYTES | NOT_ASCII */, s = caml_utf8_of_utf16(s);\n return new MlString(tag, s, s.length);\n}",
"function caml_js_to_string(s) { return new MlWrappedString(s); }",
"function sc_string2jsstring(s) {\n ... | [
"0.79675585",
"0.76742667",
"0.7136977",
"0.6612243",
"0.63620484",
"0.6146598",
"0.5895304",
"0.5599358",
"0.558175",
"0.5521796",
"0.54745966",
"0.5311589",
"0.52764904",
"0.5273383",
"0.52526635",
"0.52316207",
"0.52316207",
"0.5225639",
"0.5182887",
"0.5182887",
"0.518288... | 0.82576096 | 0 |
Provides: caml_string_unsafe_set Requires: caml_convert_string_to_array | function caml_string_unsafe_set (s, i, c) {
// The OCaml compiler uses Char.unsafe_chr on integers larger than 255!
c &= 0xff;
if (s.t != 4 /* ARRAY */) {
if (i == s.c.length) {
s.c += String.fromCharCode (c);
if (i + 1 == s.l) s.t = 0; /*BYTES | UNKOWN*/
return 0;
}
caml_convert_str... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_set (s, i, c) {\n if (i >>> 0 >= s.l) caml_string_bound_error();\n return caml_string_unsafe_set (s, i, c);\n}",
"function parseSetsWithStrings(str) {\n var sets = str.match(/\\[[^\\[]+\\]/g) || [], i, j;\n\n for (i = 0; i < sets.length; i++) {\n // Splitting apart numbers/strin... | [
"0.6191932",
"0.5765093",
"0.56506103",
"0.55833036",
"0.5561509",
"0.5526376",
"0.54292685",
"0.5343066",
"0.53367245",
"0.5332996",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0.52957857",
"0... | 0.7054151 | 0 |
Provides: caml_string_bound_error Requires: caml_invalid_argument | function caml_string_bound_error () {
caml_invalid_argument ("index out of bounds");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_array_bound_error () {\n caml_invalid_argument(\"index out of bounds\");\n}",
"function caml_invalid_argument (msg) {\n caml_raise_with_string(caml_global_data[4], msg);\n}",
"function mustHaveStringAttributes(evt, attrs) {\n attrs.forEach(function(a) {\n let v = evt[a];\n if... | [
"0.6638459",
"0.5870997",
"0.545735",
"0.5419538",
"0.5301633",
"0.52691066",
"0.5199506",
"0.51920295",
"0.51810527",
"0.5161478",
"0.5103814",
"0.5085284",
"0.50687",
"0.506378",
"0.5058422",
"0.5046344",
"0.50352424",
"0.50236946",
"0.50121164",
"0.50055635",
"0.49931073",... | 0.86596656 | 0 |
Provides: caml_string_get Requires: caml_string_bound_error, caml_string_unsafe_get | function caml_string_get (s, i) {
if (i >>> 0 >= s.l) caml_string_bound_error();
return caml_string_unsafe_get (s, i);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get stringValue() {}",
"function getString (sId)\n{\n // If the string with the passed id can be found, return it\n if (typeof g_aStrings == \"object\" && g_aStrings[sId])\n {\n return g_aStrings[sId];\n }\n // Otherwise, return the id again.\n return sId;\n}",
"function getString(stringID){\n ... | [
"0.6492494",
"0.6077564",
"0.60370785",
"0.6032495",
"0.59850335",
"0.5953675",
"0.584278",
"0.57433033",
"0.5626644",
"0.56017447",
"0.5511366",
"0.54923075",
"0.5472693",
"0.5419623",
"0.5403198",
"0.5401072",
"0.53804797",
"0.53804797",
"0.5358003",
"0.53178465",
"0.526414... | 0.7043574 | 0 |
Provides: caml_string_set Requires: caml_string_bound_error, caml_string_unsafe_set | function caml_string_set (s, i, c) {
if (i >>> 0 >= s.l) caml_string_bound_error();
return caml_string_unsafe_set (s, i, c);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static SetString() {}",
"function caml_string_unsafe_set (s, i, c) {\n // The OCaml compiler uses Char.unsafe_chr on integers larger than 255!\n c &= 0xff;\n if (s.t != 4 /* ARRAY */) {\n if (i == s.c.length) {\n s.c += String.fromCharCode (c);\n if (i + 1 == s.l) s.t = 0; /*BYTES | UNKOWN*/\n ... | [
"0.6243449",
"0.61837316",
"0.6180628",
"0.57041216",
"0.55880487",
"0.5494258",
"0.5260707",
"0.5253466",
"0.5253466",
"0.5253466",
"0.5253466",
"0.5236532",
"0.52327144",
"0.5163777",
"0.5152192",
"0.5152192",
"0.5152192",
"0.5144673",
"0.51118374",
"0.5108547",
"0.51013637... | 0.65777373 | 0 |
Provides: caml_convert_string_to_bytes Requires: caml_str_repeat, caml_subarray_to_string | function caml_convert_string_to_bytes (s) {
/* Assumes not BYTES */
if (s.t == 2 /* PARTIAL */)
s.c += caml_str_repeat(s.l - s.c.length, '\0')
else
s.c = caml_subarray_to_string (s.c, 0, s.c.length);
s.t = 0; /*BYTES | UNKOWN*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_bytes_of_string (s) {\n if ((s.t & 6) != 0 /* BYTES */) caml_convert_string_to_bytes(s);\n return s.c;\n}",
"function caml_bytes_of_string (s) {\n if ((s.t & 6) != 0 /* BYTES */) caml_convert_string_to_bytes(s);\n return s.c;\n}",
"function stringToBytes(string) {\n var array = new... | [
"0.6634942",
"0.6634942",
"0.6386683",
"0.6117203",
"0.6113978",
"0.607746",
"0.5991345",
"0.5981382",
"0.5973178",
"0.59612",
"0.5893965",
"0.5884284",
"0.5833877",
"0.5818609",
"0.58161724",
"0.5794731",
"0.57937413",
"0.578954",
"0.5788272",
"0.5781022",
"0.57776016",
"0... | 0.8315429 | 1 |
Provides: caml_array_of_string mutable Requires: caml_convert_string_to_array | function caml_array_of_string (s) {
if (s.t != 4 /* ARRAY */) caml_convert_string_to_array(s);
return s.c;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_of_array (a) { return new MlString(4,a,a.length); }",
"get StringArray() {\n return this;\n }",
"function getStringLists(array){\n return [array].push(array)\n}",
"function Arr(){ return Literal.apply(this,arguments) }",
"function displayContentToArray(string){\n return string.... | [
"0.71385705",
"0.6616429",
"0.62982064",
"0.6228975",
"0.6167903",
"0.6150213",
"0.61175066",
"0.6082404",
"0.606441",
"0.60280967",
"0.6025273",
"0.6019731",
"0.5998461",
"0.59921527",
"0.5958718",
"0.59581554",
"0.59581065",
"0.5914473",
"0.58482796",
"0.58416826",
"0.57946... | 0.81770283 | 0 |
Provides: caml_bytes_of_string mutable Requires: caml_convert_string_to_bytes | function caml_bytes_of_string (s) {
if ((s.t & 6) != 0 /* BYTES */) caml_convert_string_to_bytes(s);
return s.c;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_convert_string_to_bytes (s) {\n /* Assumes not BYTES */\n if (s.t == 2 /* PARTIAL */)\n s.c += caml_str_repeat(s.l - s.c.length, '\\0')\n else\n s.c = caml_subarray_to_string (s.c, 0, s.c.length);\n s.t = 0; /*BYTES | UNKOWN*/\n}",
"function caml_convert_string_to_bytes (s) {\n /* Assume... | [
"0.7996473",
"0.7996473",
"0.661748",
"0.65151775",
"0.64057636",
"0.63345474",
"0.62880963",
"0.6179775",
"0.61098856",
"0.6054871",
"0.6028174",
"0.6028174",
"0.60110855",
"0.5901187",
"0.5819653",
"0.5799944",
"0.57904065",
"0.57682115",
"0.5733066",
"0.57285774",
"0.57150... | 0.80210173 | 1 |
Provides: caml_js_to_string const Requires: caml_is_ascii, caml_utf8_of_utf16, MlString | function caml_js_to_string (s) {
var tag = 9 /* BYTES | ASCII */;
if (!caml_is_ascii(s))
tag = 8 /* BYTES | NOT_ASCII */, s = caml_utf8_of_utf16(s);
return new MlString(tag, s, s.length);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_js_to_string(s) { return new MlWrappedString(s); }",
"function caml_to_js_string(s) {\n switch (s.t) {\n case 9: /*BYTES | ASCII*/\n return s.c;\n default:\n caml_convert_string_to_bytes(s);\n case 0: /*BYTES | UNKOWN*/\n if (caml_is_ascii(s.c)) {\n s.t = 9; /*BYTES | ASCII*/\n ... | [
"0.80953914",
"0.7791296",
"0.70785904",
"0.6669291",
"0.637294",
"0.62457347",
"0.60188323",
"0.5681121",
"0.56410503",
"0.56097966",
"0.56010145",
"0.56010145",
"0.56010145",
"0.559053",
"0.5552309",
"0.5453774",
"0.5344915",
"0.52623624",
"0.5229898",
"0.5229898",
"0.51680... | 0.82200205 | 0 |
Provides: caml_new_string Requires: MlString | function caml_new_string (s) { return new MlString(0,s,s.length); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_static_alloc (len) { return new MlMakeString (len); }",
"function caml_create_string(len) {\n if (len < 0) caml_invalid_argument(\"String.create\");\n return new MlMakeString(len);\n}",
"function NewString() {\r\n}",
"function caml_create_string(len) {\n if (len < 0) caml_invalid_argument(\"... | [
"0.7146645",
"0.7089138",
"0.70885175",
"0.6933596",
"0.6734146",
"0.66258234",
"0.6532595",
"0.6062166",
"0.58021903",
"0.57853425",
"0.574138",
"0.5674787",
"0.56531537",
"0.5554797",
"0.5531674",
"0.5423621",
"0.54150677",
"0.5348849",
"0.5293771",
"0.5238123",
"0.52206224... | 0.85071826 | 0 |
Provides: caml_string_of_array Requires: MlString | function caml_string_of_array (a) { return new MlString(4,a,a.length); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_array_of_string (s) {\n if (s.t != 4 /* ARRAY */) caml_convert_string_to_array(s);\n return s.c;\n}",
"function MlStringFromArray (a) {\n var len = a.length; this.array = a; this.len = this.last = len;\n}",
"function arrayFromString(sectionString){\n return sectionString.replace(/(?:\\r\\n|\\... | [
"0.79756516",
"0.6919364",
"0.5978903",
"0.5977463",
"0.57682925",
"0.5760109",
"0.56798136",
"0.567861",
"0.56057996",
"0.55979717",
"0.55979717",
"0.55692023",
"0.55559796",
"0.55524164",
"0.5529013",
"0.5523463",
"0.5493756",
"0.54790264",
"0.547506",
"0.54217815",
"0.5415... | 0.83754116 | 0 |
Provides: caml_string_compare mutable Requires: caml_convert_string_to_bytes | function caml_string_compare(s1, s2) {
(s1.t & 6) && caml_convert_string_to_bytes(s1);
(s2.t & 6) && caml_convert_string_to_bytes(s2);
return (s1.c < s2.c)?-1:(s1.c > s2.c)?1:0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_compare(s1, s2) { return s1.compare(s2); }",
"function caml_string_equal(s1, s2) {\n (s1.t & 6) && caml_convert_string_to_bytes(s1);\n (s2.t & 6) && caml_convert_string_to_bytes(s2);\n return (s1.c == s2.c)?1:0;\n}",
"function caml_string_equal(s1, s2) {\n var b1 = s1.fullBytes;\n var... | [
"0.7983616",
"0.7815569",
"0.75478894",
"0.7371969",
"0.72952205",
"0.7255896",
"0.7166182",
"0.711676",
"0.7082764",
"0.68956023",
"0.68956023",
"0.6850935",
"0.674355",
"0.67145807",
"0.6702141",
"0.6695053",
"0.6648466",
"0.66110116",
"0.6604909",
"0.658054",
"0.65741855",... | 0.8083142 | 0 |
Provides: caml_string_equal mutable (const, const) Requires: caml_convert_string_to_bytes | function caml_string_equal(s1, s2) {
(s1.t & 6) && caml_convert_string_to_bytes(s1);
(s2.t & 6) && caml_convert_string_to_bytes(s2);
return (s1.c == s2.c)?1:0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_equal(s1, s2) {\n var b1 = s1.fullBytes;\n var b2 = s2.fullBytes;\n if (b1 != null && b2 != null) return (b1 == b2)?1:0;\n return (s1.getFullBytes () == s2.getFullBytes ())?1:0;\n}",
"function sc_isStringEqual(s1, s2) {\n return s1 === s2;\n}",
"function caml_string_lessequal(s1, s2... | [
"0.81439745",
"0.7180174",
"0.71070945",
"0.70681745",
"0.6978327",
"0.6978327",
"0.686993",
"0.66657436",
"0.6646434",
"0.6580658",
"0.65582365",
"0.65237606",
"0.64699006",
"0.6459189",
"0.6414555",
"0.64094853",
"0.6350576",
"0.6328741",
"0.632054",
"0.632054",
"0.632054",... | 0.8261244 | 0 |
Provides: caml_string_notequal mutable (const, const) Requires: caml_string_equal | function caml_string_notequal(s1, s2) { return 1-caml_string_equal(s1, s2); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_lessequal(s1, s2) { return s1.lessEqual(s2); }",
"function doesNotMatch(str, str1) {\r\n if(str !== str1) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}",
"function test_false_string_case (){ assertFalse( compare.isValue( 'wa', 'Wa', false ) ); }",
"function caml... | [
"0.7134932",
"0.6708515",
"0.66338146",
"0.6609179",
"0.65693325",
"0.6523301",
"0.6503105",
"0.63412476",
"0.6310836",
"0.626771",
"0.62652546",
"0.6198072",
"0.6184256",
"0.61469626",
"0.613417",
"0.6127184",
"0.60937643",
"0.60922366",
"0.6071848",
"0.6042628",
"0.60316575... | 0.8428238 | 1 |
Provides: caml_string_lessequal mutable Requires: caml_convert_string_to_bytes | function caml_string_lessequal(s1, s2) {
(s1.t & 6) && caml_convert_string_to_bytes(s1);
(s2.t & 6) && caml_convert_string_to_bytes(s2);
return (s1.c <= s2.c)?1:0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_lessequal(s1, s2) { return s1.lessEqual(s2); }",
"function caml_string_equal(s1, s2) {\n var b1 = s1.fullBytes;\n var b2 = s2.fullBytes;\n if (b1 != null && b2 != null) return (b1 == b2)?1:0;\n return (s1.getFullBytes () == s2.getFullBytes ())?1:0;\n}",
"function caml_string_equal(s1, ... | [
"0.73140335",
"0.72194886",
"0.7189143",
"0.6685788",
"0.6679169",
"0.6679169",
"0.65197515",
"0.63563514",
"0.63292444",
"0.60670984",
"0.59899163",
"0.5961079",
"0.5848074",
"0.5841003",
"0.5841003",
"0.5806393",
"0.57894516",
"0.5742678",
"0.5611905",
"0.5554178",
"0.55184... | 0.74644375 | 0 |
Provides: caml_string_greaterequal Requires: caml_string_lessequal | function caml_string_greaterequal(s1, s2) {
return caml_string_lessequal(s2,s1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_greaterequal(s1, s2) { return s2.lessEqual(s1); }",
"function caml_string_lessequal(s1, s2) { return s1.lessEqual(s2); }",
"function caml_string_lessequal(s1, s2) {\n (s1.t & 6) && caml_convert_string_to_bytes(s1);\n (s2.t & 6) && caml_convert_string_to_bytes(s2);\n return (s1.c <= s2.c... | [
"0.83725834",
"0.7454351",
"0.7006384",
"0.6381821",
"0.6330357",
"0.6318457",
"0.6318457",
"0.61571586",
"0.61144507",
"0.6082039",
"0.606671",
"0.60551953",
"0.6011237",
"0.5929507",
"0.5908391",
"0.5898695",
"0.5890408",
"0.5863576",
"0.582999",
"0.57533765",
"0.56668025",... | 0.84616953 | 0 |
Provides: caml_string_greaterthan Requires: caml_string_lessthan | function caml_string_greaterthan(s1, s2) {
return caml_string_lessthan(s2, s1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_string_greaterthan(s1, s2) { return s2.lessThan(s1); }",
"function sc_isStringGreater(s1, s2) {\n return s1 > s2;\n}",
"function greaterThanOrLessThan(string) {\n /* DO SOMETHING HERE */\n}",
"function sc_isStringGreaterEqual(s1, s2) {\n return s1 >= s2;\n}",
"function caml_greaterthan... | [
"0.8424009",
"0.7603005",
"0.71875054",
"0.71637756",
"0.7159177",
"0.687989",
"0.67542183",
"0.6648054",
"0.66088134",
"0.6586622",
"0.6563067",
"0.633469",
"0.62717086",
"0.6268318",
"0.6256605",
"0.6245401",
"0.62431383",
"0.622203",
"0.6204184",
"0.6183816",
"0.6161939",
... | 0.8693247 | 0 |
Provides: caml_fill_string Requires: caml_str_repeat, caml_convert_string_to_array | function caml_fill_string(s, i, l, c) {
if (l > 0) {
if (i == 0 && (l >= s.l || (s.t == 2 /* PARTIAL */ && l >= s.c.length))) {
if (c == 0) {
s.c = "";
s.t = 2; /* PARTIAL */
} else {
s.c = caml_str_repeat (l, String.fromCharCode(c));
s.t = (l == s.l)?0 /* BYTES | UNKOW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_fill_string(s, i, l, c) { s.fill (i, l, c); }",
"function fillString(data,length,direction,fillChar){\n if(!fillChar){\n fillChar = \" \";\n }\n if(!direction){\n direction = 1; // fill at right\n }\n let str = data + \"\";\n while(str... | [
"0.8136757",
"0.68873984",
"0.68560714",
"0.6531847",
"0.6528715",
"0.6336282",
"0.61428636",
"0.60762393",
"0.5791356",
"0.57816666",
"0.5759119",
"0.5728262",
"0.568208",
"0.5615895",
"0.55925727",
"0.5492313",
"0.54705447",
"0.54673576",
"0.5457895",
"0.54283893",
"0.53799... | 0.7710335 | 1 |
Provides: caml_blit_string Requires: caml_subarray_to_string, caml_convert_string_to_array | function caml_blit_string(s1, i1, s2, i2, len) {
if (len == 0) return 0;
if ((i2 == 0) &&
(len >= s2.l || (s2.t == 2 /* PARTIAL */ && len >= s2.c.length))) {
s2.c = (s1.t == 4 /* ARRAY */)?
caml_subarray_to_string(s1.c, i1, len):
(i1 == 0 && s1.c.length == len)?s1.c:s1.c.substr(i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function caml_blit_string(s1, i1, s2, i2, len) {\n if (len === 0) return;\n if (i2 === s2.last && i1 === 0 && s1.last == len) {\n // s2.string and s2.array are null\n var s = s1.bytes;\n if (s !== null)\n s2.bytes += s1.bytes;\n else\n s2.bytes += s1.getBytes();\n s2.last += len;\n re... | [
"0.69358164",
"0.60158557",
"0.5887422",
"0.5887422",
"0.57065827",
"0.55236214",
"0.5405606",
"0.53754824",
"0.536344",
"0.536344",
"0.53077316",
"0.5297331",
"0.5274582",
"0.52196825",
"0.52080387",
"0.52001226",
"0.51837873",
"0.51372355",
"0.5136638",
"0.5136541",
"0.5126... | 0.70915645 | 0 |
Convert an array of String or RegExp or ESTree RegExpLiteral values into an array of String or RegExp values. Returns falsy if the input does not match expectations. | function processArrayOfStringOrRegExp(iv) {
if (!Array.isArray(iv)) {
return;
}
var rv = [];
var i = 0;
while (rv && (i < iv.length)) {
var elt = iv[i];
if (typeof elt === 'string') {
// string values OK
rv.push(elt);
} else if (elt instanceof ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function arrayToRegexp(paths, keys, options) {\n const parts = paths.map(path => toRegexp(path, keys, options).source);\n return new RegExp(`(?:${parts.join('|')})`, flags(options));\n}",
"_prepareRegexPattern(elementsArray = []) {\n\t\tconst regStr = elementsArray.map(current => {\n\t\t\treturn current.ch... | [
"0.6170715",
"0.60367614",
"0.5996422",
"0.59659624",
"0.5956679",
"0.59370553",
"0.592424",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5862669",
"0.5830728",
"0.5817909",
... | 0.7447543 | 0 |
Return undefined or the start of the unprefixed value. | function startAfterStringPrefix(value, prefix) {
var start = prefix.length;
if (start >= value.length) {
return;
}
if (value.substr(0, prefix.length) !== prefix) {
return;
}
return start;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"prefixed(prop, prefix) {\n let result = super.prefixed(prop, prefix)\n if (prefix === '-ms-') {\n result = result.replace('-start', '')\n }\n return result\n }",
"function startFrom(value) { }",
"static removePrefix(value) {\n if (value.includes(InitialPrefix) && value.includes(EndPrefix))... | [
"0.66762453",
"0.6525747",
"0.645561",
"0.64357406",
"0.6407939",
"0.6257361",
"0.6155905",
"0.60996723",
"0.60996723",
"0.6006334",
"0.59984016",
"0.59984016",
"0.5994976",
"0.59636986",
"0.5938532",
"0.58777666",
"0.5871421",
"0.58604",
"0.5858767",
"0.5855842",
"0.58251214... | 0.6795816 | 0 |
Return truthy iff the value matches the exception. | function matchException(value, exception) {
if (typeof exception === 'string') {
return (exception === value);
}
return exception.test(value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isInvalid(value) {\n return value === undefined || value !== value;\n}",
"function isInvalid(value) {\n return value === undefined || value !== value;\n}",
"function isInvalid(value) {\n return value === undefined || value !== value;\n}",
"function isInvalid(value) {\n return value === undefined... | [
"0.60924274",
"0.60924274",
"0.60924274",
"0.60924274",
"0.59936464",
"0.5941416",
"0.57937276",
"0.5585764",
"0.5568858",
"0.55544454",
"0.5434199",
"0.53916186",
"0.5315931",
"0.53152144",
"0.531102",
"0.5307731",
"0.53006494",
"0.52670234",
"0.5266245",
"0.5260095",
"0.525... | 0.75003004 | 0 |
Natural sort in ascending order. | function ascNatural(a, b) {
return naturalSort(a, b);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function orderNatural() {\n return order(crossfilter_identity);\n }",
"function orderNatural() {\n\t return order(crossfilter_identity);\n\t }",
"function naturalSort(a, b) {\n var ra = a.match(/\\D+|\\d+/g);\n var rb = b.match(/\\D+|\\d+/g);\n var r = 0;\n\n while(!r && ra.... | [
"0.7066935",
"0.70035034",
"0.6924302",
"0.6694231",
"0.6626293",
"0.66044986",
"0.66040385",
"0.64767087",
"0.6473519",
"0.645349",
"0.6409807",
"0.6379867",
"0.63542587",
"0.6320216",
"0.6286388",
"0.6278564",
"0.6132933",
"0.6132274",
"0.6095576",
"0.6061757",
"0.606071",
... | 0.8030362 | 0 |
Print all nodes in a Program.body. | function Program(node, print) {
print.sequence(node.body);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Program(node, print) {\n\t print.sequence(node.body);\n\t}",
"function Program(node, print) {\n\t print.sequence(node.body);\n\t}",
"printNodes() {\n console.log(\"Information about Nodes:\")\n for (var key in this.nodes) {\n this.log(\" NodeId: \" + key);\n ... | [
"0.7032599",
"0.7032599",
"0.70258874",
"0.66672516",
"0.66672516",
"0.61225045",
"0.59376705",
"0.5935489",
"0.59126437",
"0.5864031",
"0.58355314",
"0.5817652",
"0.57887626",
"0.5748597",
"0.56929934",
"0.5669782",
"0.5601364",
"0.5566872",
"0.55472374",
"0.55462056",
"0.55... | 0.70924157 | 0 |
Prints ComprehensionExpression, prints blocks, filter, and body. Handles generators. | function ComprehensionExpression(node, print) {
this.push(node.generator ? "(" : "[");
print.join(node.blocks, { separator: " " });
this.space();
if (node.filter) {
this.keyword("if");
this.push("(");
print.plain(node.filter);
this.push(")");
this.space();
}
print.plain(node.body);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ComprehensionExpression(node, print) {\n\t this.push(node.generator ? \"(\" : \"[\");\n\n\t print.join(node.blocks, { separator: \" \" });\n\t this.space();\n\n\t if (node.filter) {\n\t this.keyword(\"if\");\n\t this.push(\"(\");\n\t print.plain(node.filter);\n\t this.push(\")\");\n\t t... | [
"0.7186006",
"0.7186006",
"0.5598228",
"0.5598228",
"0.5507899",
"0.50520027",
"0.5006472",
"0.5006472",
"0.49350137",
"0.49294204",
"0.49167126",
"0.4887278",
"0.48138398",
"0.47933945",
"0.4783129",
"0.4706271",
"0.4705887",
"0.46787146",
"0.46748188",
"0.46740216",
"0.4671... | 0.72412586 | 0 |
Prints UnaryExpression, prints operator and argument. | function UnaryExpression(node, print) {
var needsSpace = /[a-z]$/.test(node.operator);
var arg = node.argument;
if (t.isUpdateExpression(arg) || t.isUnaryExpression(arg)) {
needsSpace = true;
}
if (t.isUnaryExpression(arg) && arg.operator === "!") {
needsSpace = false;
}
this.push(node.operator... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function UnaryExpression(node, print) {\n\t var needsSpace = /[a-z]$/.test(node.operator);\n\t var arg = node.argument;\n\n\t if (t.isUpdateExpression(arg) || t.isUnaryExpression(arg)) {\n\t needsSpace = true;\n\t }\n\n\t if (t.isUnaryExpression(arg) && arg.operator === \"!\") {\n\t needsSpace = false;\... | [
"0.7388239",
"0.7388239",
"0.6398728",
"0.60534966",
"0.6042826",
"0.6042826",
"0.59849364",
"0.59512806",
"0.5920261",
"0.591478",
"0.58890164",
"0.5880873",
"0.58472425",
"0.5803781",
"0.57924986",
"0.57924986",
"0.5761577",
"0.5704084",
"0.5700712",
"0.5662999",
"0.5625577... | 0.7458484 | 0 |
Prints DoExpression, prints body. | function DoExpression(node, print) {
this.push("do");
this.space();
print.plain(node.body);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function DoExpression(node, print) {\n\t this.push(\"do\");\n\t this.space();\n\t print.plain(node.body);\n\t}",
"function DoExpression(node, print) {\n\t this.push(\"do\");\n\t this.space();\n\t print.plain(node.body);\n\t}",
"function ExpressionStatement(node, print) {\n print.plain(node.expression);\... | [
"0.78439933",
"0.78439933",
"0.55471516",
"0.5406427",
"0.5406427",
"0.53362006",
"0.53362006",
"0.5325431",
"0.527821",
"0.522221",
"0.5158621",
"0.5158621",
"0.5145958",
"0.50427485",
"0.50381035",
"0.50099564",
"0.5001745",
"0.49967605",
"0.4993863",
"0.4988829",
"0.498882... | 0.7859573 | 0 |
Prints ParenthesizedExpression, prints expression. | function ParenthesizedExpression(node, print) {
this.push("(");
print.plain(node.expression);
this.push(")");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ParenthesizedExpression(node, print) {\n\t this.push(\"(\");\n\t print.plain(node.expression);\n\t this.push(\")\");\n\t}",
"function ParenthesizedExpression(node, print) {\n\t this.push(\"(\");\n\t print.plain(node.expression);\n\t this.push(\")\");\n\t}",
"function parse_PrintStatement() {\n ... | [
"0.7908611",
"0.7908611",
"0.6390306",
"0.6385291",
"0.6363062",
"0.6180221",
"0.6180221",
"0.6118675",
"0.610627",
"0.60884655",
"0.6079515",
"0.5963897",
"0.5914719",
"0.5914719",
"0.5900277",
"0.5843643",
"0.5843643",
"0.5790296",
"0.57804596",
"0.5748917",
"0.565815",
"... | 0.79453164 | 0 |
Prints ConditionalExpression, prints test, consequent, and alternate. | function ConditionalExpression(node, print) {
print.plain(node.test);
this.space();
this.push("?");
this.space();
print.plain(node.consequent);
this.space();
this.push(":");
this.space();
print.plain(node.alternate);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ConditionalExpression(node, print) {\n\t print.plain(node.test);\n\t this.space();\n\t this.push(\"?\");\n\t this.space();\n\t print.plain(node.consequent);\n\t this.space();\n\t this.push(\":\");\n\t this.space();\n\t print.plain(node.alternate);\n\t}",
"function ConditionalExpression(node, pr... | [
"0.7174708",
"0.7174708",
"0.550334",
"0.54982126",
"0.54982126",
"0.5484562",
"0.5344066",
"0.52144843",
"0.51993865",
"0.5155713",
"0.5155467",
"0.5122475",
"0.51193583",
"0.51100314",
"0.5098724",
"0.5098724",
"0.50743604",
"0.5050174",
"0.5041682",
"0.5028813",
"0.5014847... | 0.7294402 | 0 |
Prints NewExpression, prints callee and arguments. | function NewExpression(node, print) {
this.push("new ");
print.plain(node.callee);
this.push("(");
print.list(node.arguments);
this.push(")");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function NewExpression(node, print) {\n\t this.push(\"new \");\n\t print.plain(node.callee);\n\t this.push(\"(\");\n\t print.list(node.arguments);\n\t this.push(\")\");\n\t}",
"function NewExpression(node, print) {\n\t this.push(\"new \");\n\t print.plain(node.callee);\n\t this.push(\"(\");\n\t print.li... | [
"0.76691926",
"0.76691926",
"0.6921568",
"0.6921568",
"0.68008107",
"0.57025844",
"0.5680028",
"0.5680028",
"0.5668259",
"0.56554246",
"0.56554246",
"0.5631141",
"0.5631141",
"0.56291485",
"0.5623797",
"0.562039",
"0.56095654",
"0.557328",
"0.557328",
"0.5534306",
"0.5534306"... | 0.77473533 | 0 |
Prints ExpressionStatement, prints expression. | function ExpressionStatement(node, print) {
print.plain(node.expression);
this.semicolon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ExpressionStatement(node, print) {\n\t print.plain(node.expression);\n\t this.semicolon();\n\t}",
"function ExpressionStatement(node, print) {\n\t print.plain(node.expression);\n\t this.semicolon();\n\t}",
"function parse_PrintStatement() {\n tree.addNode('PrintStatement', 'branch');\n match... | [
"0.7727077",
"0.7727077",
"0.65583885",
"0.6346941",
"0.60112107",
"0.58713347",
"0.5760856",
"0.56279826",
"0.5576687",
"0.5533009",
"0.5509657",
"0.5503722",
"0.5503722",
"0.55006236",
"0.54813194",
"0.5471842",
"0.5450527",
"0.5450527",
"0.54504025",
"0.54504025",
"0.54291... | 0.7800218 | 0 |
Prints BindExpression, prints object and callee. | function BindExpression(node, print) {
print.plain(node.object);
this.push("::");
print.plain(node.callee);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function BindExpression(node, print) {\n\t print.plain(node.object);\n\t this.push(\"::\");\n\t print.plain(node.callee);\n\t}",
"function BindExpression(node, print) {\n\t print.plain(node.object);\n\t this.push(\"::\");\n\t print.plain(node.callee);\n\t}",
"function CallExpression(node, print) {\n pri... | [
"0.8072074",
"0.8072074",
"0.5482482",
"0.5421367",
"0.5421367",
"0.54099447",
"0.5398717",
"0.5392317",
"0.5368917",
"0.5320452",
"0.5243349",
"0.5238742",
"0.51900464",
"0.51780605",
"0.5162393",
"0.5138791",
"0.51377666",
"0.5126977",
"0.5117412",
"0.5096427",
"0.50870866"... | 0.810177 | 0 |
Prints ArrayTypeAnnotation, prints elementType. | function ArrayTypeAnnotation(node, print) {
print.plain(node.elementType);
this.push("[");
this.push("]");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ArrayTypeAnnotation(node, print) {\n\t print.plain(node.elementType);\n\t this.push(\"[\");\n\t this.push(\"]\");\n\t}",
"function ArrayTypeAnnotation(node, print) {\n\t print.plain(node.elementType);\n\t this.push(\"[\");\n\t this.push(\"]\");\n\t}",
"function IntersectionTypeAnnotation(node, p... | [
"0.821018",
"0.821018",
"0.6263868",
"0.6263868",
"0.6230886",
"0.6179069",
"0.6179069",
"0.61636144",
"0.60615206",
"0.58568656",
"0.5817399",
"0.5758664",
"0.5758664",
"0.5754073",
"0.5754073",
"0.56284356",
"0.55032456",
"0.5488617",
"0.5488617",
"0.54344004",
"0.54123116"... | 0.82991123 | 0 |
Prints DeclareFunction, prints id and id.typeAnnotation. | function DeclareFunction(node, print) {
this.push("declare function ");
print.plain(node.id);
print.plain(node.id.typeAnnotation.typeAnnotation);
this.semicolon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function DeclareFunction(node, print) {\n\t this.push(\"declare function \");\n\t print.plain(node.id);\n\t print.plain(node.id.typeAnnotation.typeAnnotation);\n\t this.semicolon();\n\t}",
"function DeclareFunction(node, print) {\n\t this.push(\"declare function \");\n\t print.plain(node.id);\n\t print.pl... | [
"0.78212464",
"0.78212464",
"0.64033514",
"0.6209755",
"0.61632055",
"0.61630076",
"0.61630076",
"0.6108535",
"0.6036186",
"0.5800009",
"0.57774687",
"0.57393265",
"0.57393265",
"0.57227856",
"0.56809866",
"0.5680297",
"0.5643705",
"0.560313",
"0.55847424",
"0.55456626",
"0.5... | 0.7903676 | 0 |
Prints DeclareVariable, prints id and id.typeAnnotation. | function DeclareVariable(node, print) {
this.push("declare var ");
print.plain(node.id);
print.plain(node.id.typeAnnotation);
this.semicolon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function DeclareVariable(node, print) {\n\t this.push(\"declare var \");\n\t print.plain(node.id);\n\t print.plain(node.id.typeAnnotation);\n\t this.semicolon();\n\t}",
"function DeclareVariable(node, print) {\n\t this.push(\"declare var \");\n\t print.plain(node.id);\n\t print.plain(node.id.typeAnnotatio... | [
"0.72819835",
"0.72819835",
"0.61651576",
"0.58916515",
"0.58916515",
"0.58249044",
"0.5765148",
"0.5765148",
"0.5659166",
"0.5574747",
"0.5574747",
"0.5558329",
"0.5521871",
"0.5456123",
"0.54035753",
"0.5352537",
"0.5352537",
"0.53384936",
"0.5321759",
"0.5301253",
"0.53012... | 0.7298862 | 0 |
Prints InterfaceExtends, prints id and typeParameters. | function InterfaceExtends(node, print) {
print.plain(node.id);
print.plain(node.typeParameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function InterfaceExtends(node, print) {\n\t print.plain(node.id);\n\t print.plain(node.typeParameters);\n\t}",
"function InterfaceExtends(node, print) {\n\t print.plain(node.id);\n\t print.plain(node.typeParameters);\n\t}",
"function _interfaceish(node, print) {\n\t print.plain(node.id);\n\t print.plain... | [
"0.82377714",
"0.82377714",
"0.7361511",
"0.7361511",
"0.72716504",
"0.56448656",
"0.5563112",
"0.5563112",
"0.55453026",
"0.51742995",
"0.51639134",
"0.51485467",
"0.51485467",
"0.51485467",
"0.51485467",
"0.5146895",
"0.5109101",
"0.5102612",
"0.5096647",
"0.5001837",
"0.49... | 0.8299291 | 0 |
Prints NullableTypeAnnotation, prints typeAnnotation. | function NullableTypeAnnotation(node, print) {
this.push("?");
print.plain(node.typeAnnotation);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function NullableTypeAnnotation(node, print) {\n\t this.push(\"?\");\n\t print.plain(node.typeAnnotation);\n\t}",
"function NullableTypeAnnotation(node, print) {\n\t this.push(\"?\");\n\t print.plain(node.typeAnnotation);\n\t}",
"function NullableTypeAnnotation(node, parent) {\n\t return t.isArrayTypeAnno... | [
"0.84891754",
"0.84891754",
"0.6475186",
"0.6475186",
"0.63782394",
"0.633453",
"0.6288916",
"0.6288916",
"0.6073845",
"0.59798455",
"0.5684337",
"0.5684337",
"0.5566266",
"0.5566266",
"0.55478895",
"0.5519295",
"0.5262292",
"0.5231063",
"0.5231063",
"0.52289903",
"0.52289903... | 0.85069656 | 0 |
Prints ThisTypeAnnotation, prints this. | function ThisTypeAnnotation() {
this.push("this");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"print() {\n console.log(this.toString())\n }",
"function printThis() {\n console.log(this);\n}",
"print() {\n console.log(this + \"\");\n }",
"print() {\n console.log(this) // here this means actually object\n }",
"toString() {\n return super.toString() + (this.type ? \":\" + this... | [
"0.6401597",
"0.63978654",
"0.62922025",
"0.6139126",
"0.59963894",
"0.58709055",
"0.5837409",
"0.58196604",
"0.58196604",
"0.5767951",
"0.57543516",
"0.570736",
"0.5706095",
"0.5684411",
"0.5662993",
"0.56446487",
"0.5609806",
"0.5604665",
"0.5585413",
"0.5552818",
"0.553668... | 0.6826327 | 0 |
Prints TupleTypeAnnotation, prints types. | function TupleTypeAnnotation(node, print) {
this.push("[");
print.join(node.types, { separator: ", " });
this.push("]");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TupleTypeAnnotation(node, print) {\n\t this.push(\"[\");\n\t print.join(node.types, { separator: \", \" });\n\t this.push(\"]\");\n\t}",
"function TupleTypeAnnotation(node, print) {\n\t this.push(\"[\");\n\t print.join(node.types, { separator: \", \" });\n\t this.push(\"]\");\n\t}",
"function Un... | [
"0.83206",
"0.83206",
"0.60645527",
"0.60645527",
"0.6024394",
"0.6019987",
"0.6019987",
"0.5946689",
"0.57896733",
"0.57896733",
"0.5774139",
"0.5774139",
"0.5770678",
"0.5723023",
"0.57198447",
"0.57198447",
"0.5712638",
"0.56634736",
"0.55996436",
"0.5542718",
"0.5524273",... | 0.83676606 | 0 |
Prints TypeofTypeAnnotation, prints argument. | function TypeofTypeAnnotation(node, print) {
this.push("typeof ");
print.plain(node.argument);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TypeofTypeAnnotation(node, print) {\n\t this.push(\"typeof \");\n\t print.plain(node.argument);\n\t}",
"function TypeofTypeAnnotation(node, print) {\n\t this.push(\"typeof \");\n\t print.plain(node.argument);\n\t}",
"function TypeAnnotation(node, print) {\n this.push(\":\");\n this.space();\n i... | [
"0.8366609",
"0.8366609",
"0.7239714",
"0.71873283",
"0.71873283",
"0.6748893",
"0.6515426",
"0.6515426",
"0.6488319",
"0.6391103",
"0.6116257",
"0.6116257",
"0.6109677",
"0.6056108",
"0.60315686",
"0.60315686",
"0.59870803",
"0.59870803",
"0.59705716",
"0.59659207",
"0.59659... | 0.8414244 | 0 |
Prints TypeAlias, prints id, typeParameters, and right. | function TypeAlias(node, print) {
this.push("type ");
print.plain(node.id);
print.plain(node.typeParameters);
this.space();
this.push("=");
this.space();
print.plain(node.right);
this.semicolon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TypeAlias(node, print) {\n\t this.push(\"type \");\n\t print.plain(node.id);\n\t print.plain(node.typeParameters);\n\t this.space();\n\t this.push(\"=\");\n\t this.space();\n\t print.plain(node.right);\n\t this.semicolon();\n\t}",
"function TypeAlias(node, print) {\n\t this.push(\"type \");\n\t... | [
"0.76134384",
"0.76134384",
"0.59241515",
"0.5611392",
"0.5503739",
"0.5503739",
"0.5406287",
"0.540078",
"0.540078",
"0.5362592",
"0.5340916",
"0.5340916",
"0.53383577",
"0.53370637",
"0.5326575",
"0.532096",
"0.53198737",
"0.5289507",
"0.5266307",
"0.5248506",
"0.5248506",
... | 0.7696443 | 0 |
Prints TypeAnnotation, prints typeAnnotation, handles optional. | function TypeAnnotation(node, print) {
this.push(":");
this.space();
if (node.optional) this.push("?");
print.plain(node.typeAnnotation);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TypeAnnotation(node, print) {\n\t this.push(\":\");\n\t this.space();\n\t if (node.optional) this.push(\"?\");\n\t print.plain(node.typeAnnotation);\n\t}",
"function TypeAnnotation(node, print) {\n\t this.push(\":\");\n\t this.space();\n\t if (node.optional) this.push(\"?\");\n\t print.plain(nod... | [
"0.76316464",
"0.76316464",
"0.73092103",
"0.6723065",
"0.6723065",
"0.66136825",
"0.66136825",
"0.65775895",
"0.65643424",
"0.65643424",
"0.6543258",
"0.64189374",
"0.63854754",
"0.6372253",
"0.6372253",
"0.6281112",
"0.6226054",
"0.6226054",
"0.5876222",
"0.57679033",
"0.56... | 0.76649535 | 0 |
Prints ObjectTypeAnnotation, prints properties, callProperties, and indexers. | function ObjectTypeAnnotation(node, print) {
// istanbul ignore next
var _this = this;
this.push("{");
var props = node.properties.concat(node.callProperties, node.indexers);
if (props.length) {
this.space();
print.list(props, {
separator: false,
indent: true,
iterator: function ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ObjectTypeAnnotation(node, print) {\n\t // istanbul ignore next\n\n\t var _this = this;\n\n\t this.push(\"{\");\n\t var props = node.properties.concat(node.callProperties, node.indexers);\n\n\t if (props.length) {\n\t this.space();\n\n\t print.list(props, {\n\t separator: false,\n\t i... | [
"0.81024766",
"0.81024766",
"0.61347413",
"0.6011506",
"0.5928159",
"0.58923715",
"0.58923715",
"0.58604217",
"0.58604217",
"0.5830797",
"0.58162045",
"0.5656159",
"0.5589819",
"0.55665493",
"0.5563916",
"0.5563916",
"0.5536136",
"0.5536136",
"0.5532813",
"0.55128103",
"0.546... | 0.81067806 | 0 |
Prints ObjectTypeProperty, prints static, key, and value. | function ObjectTypeProperty(node, print) {
if (node["static"]) this.push("static ");
print.plain(node.key);
if (node.optional) this.push("?");
if (!t.isFunctionTypeAnnotation(node.value)) {
this.push(":");
this.space();
}
print.plain(node.value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ObjectTypeProperty(node, print) {\n\t if (node[\"static\"]) this.push(\"static \");\n\t print.plain(node.key);\n\t if (node.optional) this.push(\"?\");\n\t if (!t.isFunctionTypeAnnotation(node.value)) {\n\t this.push(\":\");\n\t this.space();\n\t }\n\t print.plain(node.value);\n\t}",
"functi... | [
"0.78807247",
"0.78807247",
"0.7065694",
"0.7065694",
"0.7057185",
"0.67393667",
"0.6712607",
"0.66575146",
"0.66575146",
"0.6643157",
"0.6634869",
"0.6629071",
"0.6404336",
"0.6363888",
"0.6363376",
"0.6109131",
"0.60691863",
"0.60674274",
"0.6043464",
"0.6043464",
"0.593915... | 0.79237384 | 0 |
Prints QualifiedTypeIdentifier, prints qualification and id. | function QualifiedTypeIdentifier(node, print) {
print.plain(node.qualification);
this.push(".");
print.plain(node.id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function QualifiedTypeIdentifier(node, print) {\n\t print.plain(node.qualification);\n\t this.push(\".\");\n\t print.plain(node.id);\n\t}",
"function QualifiedTypeIdentifier(node, print) {\n\t print.plain(node.qualification);\n\t this.push(\".\");\n\t print.plain(node.id);\n\t}",
"function printTypeDecl(... | [
"0.78467035",
"0.78467035",
"0.60928005",
"0.5617815",
"0.54675865",
"0.54675865",
"0.52162457",
"0.52162457",
"0.5207696",
"0.51683575",
"0.51683575",
"0.5161773",
"0.5055507",
"0.5037166",
"0.50224465",
"0.49875996",
"0.49875996",
"0.49875996",
"0.498087",
"0.498087",
"0.49... | 0.7889874 | 0 |
Prints TypeCastExpression, prints expression and typeAnnotation. | function TypeCastExpression(node, print) {
this.push("(");
print.plain(node.expression);
print.plain(node.typeAnnotation);
this.push(")");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TypeCastExpression(node, print) {\n\t this.push(\"(\");\n\t print.plain(node.expression);\n\t print.plain(node.typeAnnotation);\n\t this.push(\")\");\n\t}",
"function TypeCastExpression(node, print) {\n\t this.push(\"(\");\n\t print.plain(node.expression);\n\t print.plain(node.typeAnnotation);\n\... | [
"0.79686564",
"0.79686564",
"0.67475295",
"0.6715054",
"0.6715054",
"0.56682146",
"0.56682146",
"0.5576064",
"0.546599",
"0.546599",
"0.54004264",
"0.54004264",
"0.54004264",
"0.53343105",
"0.5304603",
"0.53029084",
"0.53029084",
"0.5300399",
"0.5289434",
"0.52794576",
"0.522... | 0.7977732 | 0 |
Prints JSXAttribute, prints name and value. | function JSXAttribute(node, print) {
print.plain(node.name);
if (node.value) {
this.push("=");
print.plain(node.value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function JSXAttribute(node, print) {\n\t print.plain(node.name);\n\t if (node.value) {\n\t this.push(\"=\");\n\t print.plain(node.value);\n\t }\n\t}",
"function JSXAttribute(node, print) {\n\t print.plain(node.name);\n\t if (node.value) {\n\t this.push(\"=\");\n\t print.plain(node.value);\n\t }... | [
"0.79689664",
"0.79689664",
"0.7067953",
"0.658608",
"0.6424847",
"0.6424847",
"0.63457805",
"0.6117254",
"0.57859945",
"0.57639825",
"0.5744256",
"0.56300664",
"0.5603223",
"0.5584714",
"0.55546683",
"0.55499464",
"0.5517571",
"0.55022335",
"0.5440028",
"0.53864837",
"0.5375... | 0.8078799 | 0 |
Prints JSXIdentifier, prints name. | function JSXIdentifier(node) {
this.push(node.name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function JSXIdentifier(node) {\n\t this.push(node.name);\n\t}",
"function JSXIdentifier(node) {\n\t this.push(node.name);\n\t}",
"function jsxParseIdentifier() {\n nextJSXTagToken();\n}",
"function getQualifiedJSXName(object) {\n if (object.type === \"JSXIdentifier\") {\n return object.nam... | [
"0.70484245",
"0.70484245",
"0.65578246",
"0.65070575",
"0.6328661",
"0.6251666",
"0.6212583",
"0.620726",
"0.620726",
"0.61711067",
"0.6025616",
"0.5933334",
"0.5933334",
"0.5689264",
"0.55617714",
"0.555514",
"0.55209345",
"0.55209345",
"0.55113757",
"0.5492306",
"0.5492306... | 0.7141288 | 0 |
Prints JSXNamespacedName, prints namespace and name. | function JSXNamespacedName(node, print) {
print.plain(node.namespace);
this.push(":");
print.plain(node.name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function JSXNamespacedName(node, print) {\n\t print.plain(node.namespace);\n\t this.push(\":\");\n\t print.plain(node.name);\n\t}",
"function JSXNamespacedName(node, print) {\n\t print.plain(node.namespace);\n\t this.push(\":\");\n\t print.plain(node.name);\n\t}",
"function getQualifiedJSXName(object) {\... | [
"0.8283846",
"0.8283846",
"0.56452745",
"0.5515994",
"0.5515994",
"0.5488443",
"0.5488443",
"0.5488443",
"0.5488443",
"0.5488443",
"0.5488443",
"0.5488443",
"0.5435525",
"0.5435525",
"0.538472",
"0.5362014",
"0.5284533",
"0.5269164",
"0.5266078",
"0.5247381",
"0.5247381",
"... | 0.83181506 | 0 |
Prints JSXSpreadAttribute, prints argument. | function JSXSpreadAttribute(node, print) {
this.push("{...");
print.plain(node.argument);
this.push("}");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function JSXSpreadAttribute(node, print) {\n\t this.push(\"{...\");\n\t print.plain(node.argument);\n\t this.push(\"}\");\n\t}",
"function JSXSpreadAttribute(node, print) {\n\t this.push(\"{...\");\n\t print.plain(node.argument);\n\t this.push(\"}\");\n\t}",
"function JSXAttribute(node, print) {\n print... | [
"0.8154464",
"0.8154464",
"0.61413306",
"0.59685206",
"0.59685206",
"0.5640402",
"0.54406387",
"0.52527785",
"0.5150004",
"0.509316",
"0.5056654",
"0.5056139",
"0.50495625",
"0.50495625",
"0.50210446",
"0.49497527",
"0.49430075",
"0.49361542",
"0.4927093",
"0.48998222",
"0.48... | 0.81894606 | 0 |
Prints JSXExpressionContainer, prints expression. | function JSXExpressionContainer(node, print) {
this.push("{");
print.plain(node.expression);
this.push("}");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function JSXExpressionContainer(node, print) {\n\t this.push(\"{\");\n\t print.plain(node.expression);\n\t this.push(\"}\");\n\t}",
"function JSXExpressionContainer(node, print) {\n\t this.push(\"{\");\n\t print.plain(node.expression);\n\t this.push(\"}\");\n\t}",
"function printJSXElement(path$$1, optio... | [
"0.78512084",
"0.78512084",
"0.6057462",
"0.5864229",
"0.58232504",
"0.57001454",
"0.56682175",
"0.5640519",
"0.5640519",
"0.55917925",
"0.55385673",
"0.5532234",
"0.54901415",
"0.546352",
"0.5381914",
"0.53346545",
"0.5313572",
"0.5260666",
"0.5240245",
"0.5240245",
"0.52044... | 0.79549813 | 0 |
Prints JSXClosingElement, prints name. | function JSXClosingElement(node, print) {
this.push("</");
print.plain(node.name);
this.push(">");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function JSXClosingElement(node, print) {\n\t this.push(\"</\");\n\t print.plain(node.name);\n\t this.push(\">\");\n\t}",
"function JSXClosingElement(node, print) {\n\t this.push(\"</\");\n\t print.plain(node.name);\n\t this.push(\">\");\n\t}",
"function printJSXElement( path, options, print ) {\n\tconst... | [
"0.7501842",
"0.7501842",
"0.61951053",
"0.6139209",
"0.6123538",
"0.6105127",
"0.6105127",
"0.6057071",
"0.6055899",
"0.6055899",
"0.60323185",
"0.5876853",
"0.5810769",
"0.58018166",
"0.58018166",
"0.56032234",
"0.55710644",
"0.55425525",
"0.5538881",
"0.5525945",
"0.542112... | 0.7565458 | 0 |
Prints nodes with params, prints typeParameters, params, and returnType, handles optional params. | function _params(node, print) {
// istanbul ignore next
var _this = this;
print.plain(node.typeParameters);
this.push("(");
print.list(node.params, {
iterator: function iterator(node) {
if (node.optional) _this.push("?");
print.plain(node.typeAnnotation);
}
});
this.push(")");
if ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _params(node, print) {\n\t // istanbul ignore next\n\n\t var _this = this;\n\n\t print.plain(node.typeParameters);\n\t this.push(\"(\");\n\t print.list(node.params, {\n\t iterator: function iterator(node) {\n\t if (node.optional) _this.push(\"?\");\n\t print.plain(node.typeAnnotation);\n... | [
"0.7304197",
"0.7304197",
"0.6321365",
"0.62380457",
"0.5903253",
"0.5803255",
"0.5803255",
"0.5753407",
"0.5728345",
"0.57231647",
"0.56895673",
"0.5632502",
"0.55878085",
"0.55878085",
"0.54631406",
"0.5452806",
"0.52821016",
"0.5272904",
"0.52265584",
"0.50741774",
"0.5071... | 0.73416793 | 0 |
Prints ArrowFunctionExpression, prints params and body, handles async. Leaves out parentheses when single param. | function ArrowFunctionExpression(node, print) {
if (node.async) this.push("async ");
if (node.params.length === 1 && t.isIdentifier(node.params[0])) {
print.plain(node.params[0]);
} else {
this._params(node, print);
}
this.push(" => ");
var bodyNeedsParens = t.isObjectExpression(node.body);
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ArrowFunctionExpression(node, print) {\n\t if (node.async) this.push(\"async \");\n\n\t if (node.params.length === 1 && t.isIdentifier(node.params[0])) {\n\t print.plain(node.params[0]);\n\t } else {\n\t this._params(node, print);\n\t }\n\n\t this.push(\" => \");\n\n\t var bodyNeedsParens = t.... | [
"0.7606457",
"0.7606457",
"0.5686978",
"0.5686978",
"0.5677833",
"0.5574614",
"0.5508148",
"0.5486216",
"0.54706395",
"0.54024196",
"0.5377261",
"0.52837163",
"0.528168",
"0.525686",
"0.51441157",
"0.51363873",
"0.51324654",
"0.51137275",
"0.5069237",
"0.5059311",
"0.50552064... | 0.7743607 | 0 |
Prints ImportSpecifier, prints imported and local. | function ImportSpecifier(node, print) {
print.plain(node.imported);
if (node.local && node.local.name !== node.imported.name) {
this.push(" as ");
print.plain(node.local);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ImportSpecifier(node, print) {\n\t print.plain(node.imported);\n\t if (node.local && node.local.name !== node.imported.name) {\n\t this.push(\" as \");\n\t print.plain(node.local);\n\t }\n\t}",
"function ImportSpecifier(node, print) {\n\t print.plain(node.imported);\n\t if (node.local && node... | [
"0.80711836",
"0.80711836",
"0.7246542",
"0.71459866",
"0.71429634",
"0.71429634",
"0.70851594",
"0.70851594",
"0.66699284",
"0.6661463",
"0.6661463",
"0.6267769",
"0.6139893",
"0.6139893",
"0.5757179",
"0.57069796",
"0.56842697",
"0.5632007",
"0.5380599",
"0.5321865",
"0.531... | 0.8115456 | 0 |
Prints ImportDefaultSpecifier, prints local. | function ImportDefaultSpecifier(node, print) {
print.plain(node.local);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ImportDefaultSpecifier(node, print) {\n\t print.plain(node.local);\n\t}",
"function ImportDefaultSpecifier(node, print) {\n\t print.plain(node.local);\n\t}",
"function ImportSpecifier(node, print) {\n print.plain(node.imported);\n if (node.local && node.local.name !== node.imported.name) {\n th... | [
"0.8405819",
"0.8405819",
"0.6921701",
"0.692061",
"0.692061",
"0.6815718",
"0.68134123",
"0.6791463",
"0.6791463",
"0.6394413",
"0.63861936",
"0.63861936",
"0.6141618",
"0.6141618",
"0.6141618",
"0.6087399",
"0.59237254",
"0.59237254",
"0.5814117",
"0.5788537",
"0.5788537",
... | 0.84438026 | 0 |
Prints ImportDeclaration, prints specifiers and source, handles isType. | function ImportDeclaration(node, print) {
this.push("import ");
if (node.importKind === "type" || node.importKind === "typeof") {
this.push(node.importKind + " ");
}
var specfiers = node.specifiers;
if (specfiers && specfiers.length) {
var first = node.specifiers[0];
if (t.isImportDefaultSpecifi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ImportDeclaration(node, print) {\n\t this.push(\"import \");\n\n\t if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n\t this.push(node.importKind + \" \");\n\t }\n\n\t var specfiers = node.specifiers;\n\t if (specfiers && specfiers.length) {\n\t var first = node.specifiers[... | [
"0.7326149",
"0.7326149",
"0.6630567",
"0.66095537",
"0.66095537",
"0.64124423",
"0.60402185",
"0.59990466",
"0.59990466",
"0.59771866",
"0.592291",
"0.592291",
"0.5806791",
"0.56457347",
"0.5620403",
"0.5558803",
"0.55089146",
"0.5448369",
"0.5396989",
"0.5373606",
"0.529716... | 0.7360295 | 0 |
Prints ImportNamespaceSpecifier, prints local. | function ImportNamespaceSpecifier(node, print) {
this.push("* as ");
print.plain(node.local);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ImportNamespaceSpecifier(node, print) {\n\t this.push(\"* as \");\n\t print.plain(node.local);\n\t}",
"function ImportNamespaceSpecifier(node, print) {\n\t this.push(\"* as \");\n\t print.plain(node.local);\n\t}",
"function ImportSpecifier(node, print) {\n print.plain(node.imported);\n if (node.... | [
"0.81593865",
"0.81593865",
"0.7515172",
"0.75041324",
"0.75041324",
"0.7048032",
"0.69581836",
"0.69581836",
"0.6309258",
"0.6303014",
"0.6303014",
"0.62745893",
"0.6243818",
"0.6243818",
"0.60142696",
"0.5905463",
"0.5905463",
"0.53795826",
"0.534335",
"0.5329285",
"0.53251... | 0.8207549 | 0 |
Prints WithStatement, prints object and body. | function WithStatement(node, print) {
this.keyword("with");
this.push("(");
print.plain(node.object);
this.push(")");
print.block(node.body);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function WithStatement(node, print) {\n\t this.keyword(\"with\");\n\t this.push(\"(\");\n\t print.plain(node.object);\n\t this.push(\")\");\n\t print.block(node.body);\n\t}",
"function WithStatement(node, print) {\n\t this.keyword(\"with\");\n\t this.push(\"(\");\n\t print.plain(node.object);\n\t this.p... | [
"0.7412532",
"0.7412532",
"0.5881709",
"0.5631223",
"0.5621839",
"0.55672807",
"0.55577755",
"0.55577755",
"0.55577755",
"0.55577755",
"0.55577755",
"0.5543423",
"0.5523193",
"0.55042475",
"0.55042475",
"0.55042475",
"0.55042475",
"0.5493531",
"0.54862267",
"0.54862267",
"0.5... | 0.74783146 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.