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 |
|---|---|---|---|---|---|---|
Callback for chooseFolder action. Just changes the ViewModel's self.selected observable to the selected folder. | function onPickFolder(evt, item) {
evt.preventDefault();
self.selected({
name: item.data.name,
id: item.data.id
});
return false; // Prevent event propagation
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setSelected(folder) {\n _selected = folder;\n}",
"SetSelectedFolder(folder) {\n console.debug(`ContaplusModel::SetSelectedFolder(${folder})`)\n // Remove companies if folder is being changed or cleared\n let config = this.config\n let currentFolder = this.GetSelectedFolder()... | [
"0.71684235",
"0.66493404",
"0.6496825",
"0.62891614",
"0.6200363",
"0.5981684",
"0.5871168",
"0.584286",
"0.58156097",
"0.5746488",
"0.56616473",
"0.56264573",
"0.5621133",
"0.5581094",
"0.55688345",
"0.55441743",
"0.5513593",
"0.5484506",
"0.5434646",
"0.5375905",
"0.537583... | 0.7044286 | 1 |
Returns all payments from db. | async getAllPayments (req, res) {
try {
const payment = await Payment.findAll()
res.send(payment)
} catch (err) {
res.status(500).send({
error: 'An error has occured during fetch'
})
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getListOfPayments() {\n return this.httpClient.get(this.paymentsrUrl);\n }",
"async actionGetAll() {\n const self = this;\n\n let payments;\n let error = null;\n try {\n let where = { householdId: self.param('hid') };\n\n if (self.param('start') && self... | [
"0.70671237",
"0.6957417",
"0.6180951",
"0.6109283",
"0.5987826",
"0.5956715",
"0.59159684",
"0.59016347",
"0.5894327",
"0.5882246",
"0.582614",
"0.5805197",
"0.57787937",
"0.5758992",
"0.57415",
"0.5736531",
"0.5732132",
"0.5713286",
"0.57036066",
"0.5682922",
"0.56741315",
... | 0.73828316 | 0 |
Deletes payment by given id. | async deletePayment (req, res) {
try {
const {paymentId} = req.body
Payment.destroy({
where: {
id: paymentId
}
})
} catch (err) {
res.status(500).send({
error: 'An error has occured during deleting'
})
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"removePayment(paymentId, loanId) {\n removePaymentFromLoan(paymentId, loanId);\n }",
"function deleteTransaction(id) {\n transaction.deleteTransaction(id)\n .then(res => loadTransactions())\n .catch(err => console.log(err));\n }",
"delete(id) {\n if (!id) {\n return Promise.... | [
"0.64099944",
"0.6302484",
"0.6227388",
"0.61206245",
"0.60534525",
"0.605089",
"0.6016179",
"0.5984485",
"0.59519804",
"0.594515",
"0.5863007",
"0.58612764",
"0.58522683",
"0.58481854",
"0.5834604",
"0.58290476",
"0.58255196",
"0.58032674",
"0.5757799",
"0.57353306",
"0.5719... | 0.74143314 | 0 |
Function that determines the answer based on current state of the system Performs the active operation on the calculation using the input Is called whenever the "equals" button or any of the operator buttons are pressed | function equate() {
switch (activeOperator) {
case "add":
calculation += input;
break;
case "subtract":
calculation -= input;
break;
case "multiply":
calculation = calculation*input;
break;
case "divide":
calculation = calculation/input;
break;
defa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function input_equal(){\n console.log(\"Evaluating current expression\");\n const {curr_display, prev_val, bracket_used} = calculator;\n let res = \"\";\n // if the current display has something in it, evaluate it. However, if its empty (only when you just did a\n // calculation, just show the previ... | [
"0.737914",
"0.7339338",
"0.73308253",
"0.7314917",
"0.7242462",
"0.7215699",
"0.7163455",
"0.7145343",
"0.7140117",
"0.71256804",
"0.7115926",
"0.7071701",
"0.70535684",
"0.70373976",
"0.70334107",
"0.7017658",
"0.7016898",
"0.70110154",
"0.70056134",
"0.70032483",
"0.700289... | 0.7698377 | 0 |
Opportunities Integration callbacks ends here storeOpportunityDetails() This function is used to store corresponding opportunity data in local storage before redirecting to the Details page. inputs: | function storeOpportunityDetails(opportunityObj){
localStorage.konyOpportunityDetails = opportunityObj; //storing the corresponding opportunity details in localstorage
changePage('opportunitydetailspage','');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function storeOpportunityDetails(opportunityObj){\n\tlocalStorage.konyOpportunityDetails = JSON.stringify(opportunityObj); //storing the corresponding opportunity details in localstorage\n\twindow.location.href = \"opportunityDetails.html\"; //redirecting to details page\n}",
"function saveReportDetailsLocally(m... | [
"0.8086625",
"0.5958094",
"0.5817338",
"0.57296336",
"0.5724201",
"0.56645733",
"0.5631617",
"0.5620501",
"0.5614526",
"0.55428797",
"0.55335504",
"0.55285037",
"0.5526111",
"0.5517086",
"0.55162495",
"0.5488363",
"0.545297",
"0.54529256",
"0.54456",
"0.54206437",
"0.53980696... | 0.8281567 | 0 |
channel form facebook auto share (callback of checkCriticalPerm) | function handleAutoSharePerm(hasCriticalPerm, authResponse) {
if (hasCriticalPerm && authResponse && authResponse.userID && authResponse.accessToken) {
$.unblockUI();
$common.showProcessingOverlay();
var parameter = {
userId: authResponse.userID,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Share_trip(Share_id)\n{\n console.log(\"share tour\");\n \n var link =\"http://wms-dev.com/xplore/index.php/site/Shared?Tour_Id=\";\n \n if(typeof Share_id !== 'undefined')\n {\n link =link + Share_id;\n }\n else\n {\n return;\n }\n \n link=encodeURI(link)... | [
"0.6653881",
"0.663536",
"0.65705425",
"0.6498984",
"0.64260906",
"0.6422618",
"0.63982946",
"0.6286933",
"0.6257706",
"0.61698097",
"0.61678165",
"0.61624265",
"0.6125191",
"0.61042476",
"0.6100168",
"0.60245305",
"0.60233593",
"0.601515",
"0.5988014",
"0.5977405",
"0.591254... | 0.6944653 | 0 |
When the page loads, make a 'GET' request to fetch all the toy objects. Step 2 | function fetchAllToys(){
fetch('http://localhost:3000/toys')
.then(response => response.json())
.then(allToys => {
allToys.forEach((toy) => render(toy))
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getToys(){\n fetch('http://localhost:3000/toys')\n .then(resp => resp.json())\n .then(toys => renderToys(toys));\n }",
"function fetchToys() {\n const divCol = document.getElementById(\"toy-collection\")\n divCol.innerText = \"\"\n console.log(\"Toys Fetched\")\n fetch(\"http://localhost:3... | [
"0.71962404",
"0.7081694",
"0.69893223",
"0.68327713",
"0.6832263",
"0.67132705",
"0.6643666",
"0.6503361",
"0.6489624",
"0.64720625",
"0.6452299",
"0.6442479",
"0.64138216",
"0.6413576",
"0.6336986",
"0.6327355",
"0.626289",
"0.62568897",
"0.62035394",
"0.6180075",
"0.614559... | 0.72131747 | 0 |
Search for hotels in the selected city, within the viewport of the map. | function search() {
var search = {
bounds: map.getBounds(),
types: ['lodging']
};
places.nearbySearch(search, function(results, status) {
if (status === google.maps.places.PlacesServiceStatus.OK) {
clearMarkers();
// Create a marker for each hotel found, and
// assign a letter of t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function search() {\n var search = {\n bounds: map.getBounds(),\n types: [\"restaurant\"]\n }\n\n places.nearbySearch(search, function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n clearResults()\n clearMarkers()\n // Create a marker for each hotel fo... | [
"0.6400537",
"0.63235646",
"0.62405443",
"0.6195636",
"0.6174431",
"0.61717135",
"0.61664283",
"0.6154173",
"0.6147012",
"0.61306167",
"0.61153364",
"0.6051813",
"0.6050709",
"0.6027818",
"0.60190874",
"0.6018852",
"0.6018852",
"0.60097444",
"0.5999473",
"0.5993395",
"0.59515... | 0.6405848 | 0 |
issuer computed: true, optional: false, required: false | get issuer() {
return this.getStringAttribute('issuer');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"issuerInfo(domain) {\r\n if (this.config.debug) {\r\n console.log(\"WalletBF.issuerInfo \"+domain);\r\n }\r\n return new Promise((resolve,reject) => {\r\n this.issuer(\"info\", {}, { domain }).then((response) => {\r\n if (\"deferInfo\" in response) {\r\n return reject(response);\... | [
"0.6677451",
"0.66599905",
"0.62013984",
"0.6133809",
"0.6020527",
"0.6020527",
"0.6020527",
"0.5981526",
"0.5840674",
"0.58161366",
"0.5791506",
"0.5618046",
"0.5572712",
"0.5519223",
"0.5519223",
"0.5514548",
"0.54645175",
"0.54287565",
"0.5419884",
"0.5419884",
"0.5404951"... | 0.67110676 | 0 |
oidc computed: true, optional: false, required: false | get oidc() {
return this.interpolationForAttribute('oidc');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Oo(){}",
"function oc(a){this.radius=a}",
"static get ORTHOGRAPHIC() { return 1; }",
"function Oi(a) {\n this.O = a\n}",
"makeIdentity() {\n this.$obj.idKey = new Ref(this.$obj.entity, this.$obj.name);\n this.$obj.indexed = this.$obj.identity = this.$obj.identity_ = true;\n }",
"functi... | [
"0.50715536",
"0.50478745",
"0.4890115",
"0.48846647",
"0.4857283",
"0.47936204",
"0.47853544",
"0.47766393",
"0.4774145",
"0.4763027",
"0.47281227",
"0.47134215",
"0.47027013",
"0.47017545",
"0.46777663",
"0.46558985",
"0.46514797",
"0.46484783",
"0.46410167",
"0.46341288",
... | 0.61855775 | 0 |
platform_version computed: true, optional: false, required: false | get platformVersion() {
return this.getStringAttribute('platform_version');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getProductVersion() {\n return \"8.5.0.9167\";\n}",
"function getProductVersion() {\n return \"7.4.0.9058\";\n}",
"_computeNewVersion() {\n const { version } = this.active.releaseCandidate;\n return semver.parse(`${version.major}.${version.minor}.${version.patch}`);\n }",
"get... | [
"0.6596583",
"0.65692216",
"0.6565119",
"0.64625967",
"0.6346318",
"0.63334405",
"0.6270737",
"0.6251749",
"0.59783745",
"0.5935902",
"0.5931313",
"0.5905481",
"0.58565927",
"0.58486575",
"0.5842414",
"0.58331615",
"0.5796463",
"0.57958823",
"0.5795712",
"0.5764296",
"0.57642... | 0.7153497 | 0 |
authenticate Invokes the library method doAuthentication, with callback method to handle the data. | function authenticate (data){
doAuthentication(AM_HOST, data, handleAuthenticationCallBack);
showAuthnViewBasedOnHint();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"authenticate(callback) {\n this.lock.show();\n this.lock.on('authenticated', authResult => this.doAuthentication(authResult, callback));\n }",
"function doAuthenticate (req, res, callback) {\n authMethodApi.authenticate(req, res, function(err, data) {\n callback(err, data);\n });\n}",
"auth... | [
"0.7306511",
"0.70915055",
"0.70605844",
"0.6621971",
"0.65509635",
"0.64376795",
"0.64120966",
"0.6243937",
"0.6189732",
"0.6186294",
"0.618115",
"0.60709363",
"0.60520744",
"0.603663",
"0.60337985",
"0.60148394",
"0.6005061",
"0.5962535",
"0.5951254",
"0.59473205",
"0.59433... | 0.71624446 | 1 |
showAuthnViewBasedOnHint : displays HTML content is displayed based on hints Supported Hints : SHOW_LOGIN,SHOW_DEVICE_REGISTRATION,SHOW_QR,SHOW_OTP,CALL_AUTHORIZE,ERROR | function showAuthnViewBasedOnHint() {
var pageContent = "";
switch (hintToShowPage) {
case "SHOW_LOGIN":
pageContent = '<form onsubmit="return false;"><div class="form-group"><input class="form-control" name="User Name:" id="username" ,="" placeholder="User Name:" type="text"></div><div clas... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showAuthzViewBasedOnHint(){\n\tvar authnData = {};\n switch (hintToShowPage) {\n case \"SHOW_CONSENT\":\n pageContent = generateAuthorizeHTMLBasedOnData();\n $(\"#showConsent\").html(pageContent);\n $(\"#consent\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n... | [
"0.844576",
"0.64287835",
"0.6296553",
"0.62065864",
"0.6011178",
"0.59296006",
"0.57496065",
"0.5621627",
"0.55668783",
"0.5560611",
"0.5520488",
"0.5490737",
"0.5453964",
"0.54493076",
"0.54225504",
"0.5379189",
"0.53663903",
"0.5349845",
"0.53360164",
"0.5305437",
"0.52814... | 0.75806224 | 1 |
handleAuthenticationCallBack : Callback method with business logic to return appropriate hints and data | function handleAuthenticationCallBack(authResponse) {
var authnDataObj = {};
var authnData = [];
if (authResponse && authResponse.status === "success") {
hintToShowPage = authResponse.content.hint;
if(authResponse.content.hint == "SHOW_SERVER_OTP"){
authnData = authResponse.content.data;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function authenticate (data){\n doAuthentication(AM_HOST, data, handleAuthenticationCallBack);\n showAuthnViewBasedOnHint();\n}",
"checkAuthentication()\n {\n axios.get(\"/DropBox/rest/authenticate\")\n .then(\n function (response)\n {\n ... | [
"0.73694897",
"0.69046396",
"0.6823288",
"0.67687434",
"0.67029554",
"0.6631168",
"0.6533048",
"0.650845",
"0.6480028",
"0.6441298",
"0.64306414",
"0.6398013",
"0.6379823",
"0.6369377",
"0.63149625",
"0.6308687",
"0.63000715",
"0.6291748",
"0.62895906",
"0.62725544",
"0.62725... | 0.7877867 | 0 |
continueAuthentication : on clicking 'login' button, this method invokes the API to authenticate the credentials | function continueAuthentication() {
// Collect any user inputs for next authentication stage
var authnData = {
"loginId": document.getElementById('username').value,
"password": document.getElementById('password').value,
"authId": AUTH_ID,
"hint": "VAL_CRED" //dont change this val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function onButtonAuthenticate() {\n try {\n authenticationContext.issueCredentials(\n configuration.userName,\n configuration.password,\n configuration.extraParameters,\n configuration.markAsManualConnect);\n WinJS.log && WinJ... | [
"0.73334545",
"0.7145569",
"0.69741285",
"0.6898129",
"0.6660925",
"0.6657105",
"0.64277244",
"0.6383282",
"0.6373926",
"0.6304949",
"0.62528694",
"0.6214767",
"0.6212645",
"0.6204046",
"0.6190454",
"0.6155774",
"0.6151314",
"0.6130508",
"0.6098936",
"0.6079168",
"0.6065768",... | 0.7363797 | 0 |
registerDevice : on clicking 'register device' button, this method invokes the API to get the OTP shared secret | function registerDevice() {
var authnData = {
"authId": AUTH_ID,
"hint": "GET_QR" //dont change this value.
};
authenticate(authnData);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function registerDevice() {\n // Register device\n var registerPromise = provision.register();\n\n registerPromise.then((result) => {\n console.log(`connectionString: ${result}`);\n connectionString = result;\n\n deviceStart();\n\n // save connection string to file \n connectionStringInfo.save(re... | [
"0.7096536",
"0.68863314",
"0.6679983",
"0.65976983",
"0.65208167",
"0.64620227",
"0.63820624",
"0.6351801",
"0.63208866",
"0.62991077",
"0.6292508",
"0.61879534",
"0.6183496",
"0.61583245",
"0.614593",
"0.6137811",
"0.6132727",
"0.6113646",
"0.609731",
"0.6009003",
"0.597106... | 0.70470124 | 1 |
verifyQRSharedSecret : on clicking 'login using verification code' button, this method invokes the API to get show the OTP screen | function verifyQRSharedSecret(){
var authnData = {
"authId": AUTH_ID,
"qr": QR_SHAREDSECRET,
"hint": "SAVE_QR" //dont change this value.
};
authenticate(authnData);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async function generateSecretAndQR() {\n\t//Generate a secret key that will need to be inputted to Google Authenticator\n\tvar secret = speakeasy.generateSecret({\n\t\tlength: KEYLENGTH,\n\t\tname: \"Team-Complex\",\n\t});\n\n\tvar data_url = await QRcode.toDataURL(secret.otpauth_url);\n\n\treturn {\n\t\t//\"secre... | [
"0.6642711",
"0.6570052",
"0.65411913",
"0.637736",
"0.6113774",
"0.6023885",
"0.6020438",
"0.59382814",
"0.5925966",
"0.58724856",
"0.58627164",
"0.5852129",
"0.58482075",
"0.5846309",
"0.58347255",
"0.5822344",
"0.58189106",
"0.57896954",
"0.57828695",
"0.5761543",
"0.57461... | 0.8054473 | 0 |
verifyOTP : on clicking 'Submit OTP' button, this method invokes the API to validate the OTP and login | function verifyOTP() {
var authnData = {
"authId": AUTH_ID,
"otp": document.getElementById('otp').value,
"hint": "VALIDATE_OTP", //dont change this value.
"trustDevice": "0"
};
var trustDeviceCheckbox = document.getElementById("trustDevice");
if (trustDeviceCheckbox.chec... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verifyOTP ( otp, callback ) {\n\n var verificationFlow = $.ajax( {\n url: \"http://dasta.omega.lazaro.in/user-verify-otp\",\n data: { otp: otp, otpSessionId: __OMEGA__.user.otpSessionId }\n } );\n\n verificationFlow.done( function ( response ) {\n if ( response.Status.toLower... | [
"0.7739095",
"0.762783",
"0.709235",
"0.70722437",
"0.6992949",
"0.6915729",
"0.68422395",
"0.6841774",
"0.68168664",
"0.66748106",
"0.65415233",
"0.6416036",
"0.63417935",
"0.62652844",
"0.62113893",
"0.6206491",
"0.61361355",
"0.6134869",
"0.6096374",
"0.60525846",
"0.59920... | 0.76819575 | 1 |
verifyServerOTP : on clicking 'Submit OTP' button, this method invokes the API to validate the OTP and login | function verifyServerOTP() {
var authnData = {
"authId": AUTH_ID,
"otp": document.getElementById('otp').value,
"hint": "VALIDATE_SERVER_OTP", //dont change this value.
"trustDevice": "0"
};
var trustDeviceCheckbox = document.getElementById("trustDevice");
if (trustDeviceChe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getServerOTP() {\n var authnData = {\n \"authId\": AUTH_ID,\n \"hint\": \"GET_SERVER_OTP\" //dont change this value.\n };\n authenticate(authnData);\n}",
"function submitOTP(){\n\n\tif(isValid()){\n\t\tvar OTP = document.getElementById(\"OTP\").value;\n\n\t\tvar body = {\n\t\t\t\"... | [
"0.74891335",
"0.73141193",
"0.712015",
"0.7102659",
"0.7060164",
"0.65799916",
"0.6458554",
"0.63380265",
"0.62113523",
"0.60833937",
"0.6038674",
"0.60286057",
"0.5969295",
"0.5897631",
"0.5883804",
"0.5857312",
"0.5848722",
"0.58346736",
"0.5732293",
"0.57024693",
"0.56887... | 0.7671122 | 0 |
getServerOTP : on clicking 'Resend OTP' button, this method invokes the API to get the OTP | function getServerOTP() {
var authnData = {
"authId": AUTH_ID,
"hint": "GET_SERVER_OTP" //dont change this value.
};
authenticate(authnData);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDataForResendUserOTP(inputMobileNumber) {\r\n var response = null;\r\n dataFactoryCall(\"services/start/start_resend_method\",\"GET\",\"mobile=\"+inputMobileNumber,function(returndata){\r\n response = returndata;\r\n console.log(response);\r\n if(response.... | [
"0.6991239",
"0.69129413",
"0.6688675",
"0.65259707",
"0.63798803",
"0.633899",
"0.62889415",
"0.6275391",
"0.61845636",
"0.615854",
"0.61438465",
"0.61227316",
"0.60858524",
"0.6072418",
"0.60621417",
"0.5979722",
"0.59554",
"0.5931898",
"0.5892121",
"0.5870308",
"0.5835798"... | 0.7841791 | 0 |
showConsentForAuthz Invoke GET /authorize/ui/authorize API for authorization Invoke callback method with data returned within response | function showConsentForAuthz(){
var pageContent = "";
doAuthorization(AM_HOST,CLIENT_ID, REDIRECT_URI,SCOPES,handleAuthzCallBack);
showAuthzViewBasedOnHint();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showAuthzViewBasedOnHint(){\n\tvar authnData = {};\n switch (hintToShowPage) {\n case \"SHOW_CONSENT\":\n pageContent = generateAuthorizeHTMLBasedOnData();\n $(\"#showConsent\").html(pageContent);\n $(\"#consent\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n... | [
"0.68672794",
"0.6613467",
"0.63815117",
"0.62915504",
"0.6269272",
"0.61550784",
"0.60447353",
"0.60305536",
"0.59728885",
"0.5952707",
"0.5842901",
"0.58313924",
"0.57952505",
"0.57862115",
"0.5769428",
"0.57676464",
"0.5732646",
"0.5730434",
"0.571302",
"0.5686124",
"0.559... | 0.82097954 | 0 |
showAuthzViewBasedOnHint displays HTML content is displayed based on hints (for authorization consent) Supported Hints : SHOW_CONSENT,SHOW_LOGIN,ERROR or successful redirection | function showAuthzViewBasedOnHint(){
var authnData = {};
switch (hintToShowPage) {
case "SHOW_CONSENT":
pageContent = generateAuthorizeHTMLBasedOnData();
$("#showConsent").html(pageContent);
$("#consent").collapse("show");
$("#login").collapse("hide");
$("#qr").collapse(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showConsentForAuthz(){\n var pageContent = \"\";\n doAuthorization(AM_HOST,CLIENT_ID, REDIRECT_URI,SCOPES,handleAuthzCallBack);\n showAuthzViewBasedOnHint();\n}",
"function showAuthnViewBasedOnHint() {\n var pageContent = \"\";\n switch (hintToShowPage) {\n case \"SHOW_LOGIN\":\n ... | [
"0.7542123",
"0.68082577",
"0.61855805",
"0.59405005",
"0.5930001",
"0.5576065",
"0.55350614",
"0.5530717",
"0.5468645",
"0.5450693",
"0.54388213",
"0.54003304",
"0.5332234",
"0.52895045",
"0.52375126",
"0.5211363",
"0.52038443",
"0.51957035",
"0.5186029",
"0.5183607",
"0.518... | 0.882559 | 0 |
handleAuthzCallBack : Callback method with business logic to return appropriate hints and data | function handleAuthzCallBack(authzResponse){
if (authzResponse && authzResponse.status === "success") {
hintToShowPage = authzResponse.content.hint;
if(hintToShowPage === "SHOW_CONSENT"){
authzData = authzResponse.content.oauth2Data;
}
else {
authzData = au... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleAuthenticationCallBack(authResponse) {\n var authnDataObj = {};\n var authnData = [];\n if (authResponse && authResponse.status === \"success\") {\n hintToShowPage = authResponse.content.hint;\n\t\t\tif(authResponse.content.hint == \"SHOW_SERVER_OTP\"){\n\t\t\t\tauthnData = authR... | [
"0.75203025",
"0.64842105",
"0.6458851",
"0.636827",
"0.6262733",
"0.62349826",
"0.6186878",
"0.61722434",
"0.6167643",
"0.6117428",
"0.5984971",
"0.5941318",
"0.594124",
"0.5940335",
"0.58677655",
"0.5841092",
"0.5834171",
"0.5814584",
"0.58067304",
"0.58067304",
"0.58067304... | 0.7798188 | 0 |
allowConsent on clicking 'Allow' button in consent page, this method invokes the API to check for authorization. | function allowConsent(){
var saveConsentCheckbox = document.getElementById("saveConsent");
var data = {
"decision": "allow",
"csrf": document.getElementById("csrf").value
}
if (saveConsentCheckbox.checked === true) {
data.save_consent = "on";
}
continueAuthori... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function control_consent() {\n if (refUser.get('state').get('consentResponse') == 'agree'){\n // The user already gave his consent\n return true;\n } else{\n // Get user's consent or remind him that we need it\n ... | [
"0.7062307",
"0.68699104",
"0.6595429",
"0.61984503",
"0.6112465",
"0.6055736",
"0.5893934",
"0.58919907",
"0.587708",
"0.57831424",
"0.57061404",
"0.5649028",
"0.56145555",
"0.55750537",
"0.54954946",
"0.5462683",
"0.5451395",
"0.54500055",
"0.54360396",
"0.5427255",
"0.5419... | 0.782574 | 0 |
denyConsent on clicking 'Deny' button in consent page, this method invokes the API to deny authorization. | function denyConsent(){
var saveConsentCheckbox = document.getElementById("saveConsent");
var data = {
"decision": "deny",
"csrf": document.getElementById("csrf").value
}
if (saveConsentCheckbox.checked === true) {
data.save_consent = "on";
}
continueAuthoriza... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function allowConsent(){\n var saveConsentCheckbox = document.getElementById(\"saveConsent\");\n var data = {\n \"decision\": \"allow\",\n \"csrf\": document.getElementById(\"csrf\").value\n }\n if (saveConsentCheckbox.checked === true) {\n data.save_consent = \"on\";\n... | [
"0.6681855",
"0.6349514",
"0.6270654",
"0.6092356",
"0.5919432",
"0.5918545",
"0.58693314",
"0.5674566",
"0.53717864",
"0.5350312",
"0.5348828",
"0.5305854",
"0.5230312",
"0.51680917",
"0.5116618",
"0.510952",
"0.50868845",
"0.5086745",
"0.5054243",
"0.5035113",
"0.50339764",... | 0.79788536 | 0 |
generateAuthorizeHTMLBasedOnData Prepares the HTML content to display consent page using data returned by showConsentForAuthz method | function generateAuthorizeHTMLBasedOnData(){
var pageContent = '<div class="container font-color-white"><div class="page-header wordwrap"><h1 class="text-center">'+authzData.displayName+'</h1></div><div><p>This application is requesting the following private information:</p><p>You are signed in as: <span class="tex... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showConsentForAuthz(){\n var pageContent = \"\";\n doAuthorization(AM_HOST,CLIENT_ID, REDIRECT_URI,SCOPES,handleAuthzCallBack);\n showAuthzViewBasedOnHint();\n}",
"function showAuthzViewBasedOnHint(){\n\tvar authnData = {};\n switch (hintToShowPage) {\n case \"SHOW_CONSENT\":\n pag... | [
"0.66523683",
"0.6380851",
"0.5572831",
"0.5342933",
"0.5327722",
"0.52993286",
"0.5264682",
"0.5256616",
"0.5240082",
"0.5117631",
"0.50968957",
"0.5080795",
"0.50724447",
"0.5040422",
"0.49877027",
"0.49810055",
"0.4953891",
"0.49345815",
"0.4924923",
"0.48734587",
"0.48729... | 0.84111917 | 0 |
collectDeviceInfo collects the device details, this method invokes the API to match device | function collectDeviceInfo() {
var deviceDetails = getDeviceInfo();
var authnData = {
"authId": AUTH_ID,
"deviceDetails": deviceDetails,
"hint": "MATCH_DEVICE_INFO" //dont change this value.
};
console.log("Collecting device information : "+authnData)
authenticate(authnData);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _collectDeviceInfo() {\n _device.deviceClass = \"Handset\";\n _device.id = DeviceInfo.getUniqueID(); // Installation ID\n _device.model = DeviceInfo.getModel();\n }",
"function innerCollectDeviceData(infoToCache) {\n var defered = q.defer();... | [
"0.66000444",
"0.6294863",
"0.60580736",
"0.59534115",
"0.59429145",
"0.5870361",
"0.58187777",
"0.5735521",
"0.57042795",
"0.5671319",
"0.5664763",
"0.5651606",
"0.56315166",
"0.5524314",
"0.5511083",
"0.549609",
"0.5473004",
"0.5449076",
"0.5415635",
"0.54152375",
"0.535463... | 0.80374503 | 0 |
obtain new Friend value from input field... set up onChange to track input | updateNewFriend(e) {
this.setState({
newFriend: e.target.value
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"handleFriendChange(event){\n this.setState({friend: event.target.value});\n }",
"updateNewFriend (e) {\n\t//remember that calling setState triggers a re-render if the data on screen changes\n\t//It is an incremental change so it's only the stuff that actually changed.\n this.setState({ newFriend: e.target... | [
"0.6915537",
"0.67488676",
"0.61619663",
"0.59811157",
"0.5945242",
"0.5906267",
"0.58889234",
"0.5876588",
"0.5863712",
"0.5855351",
"0.58502066",
"0.58421844",
"0.58236855",
"0.581205",
"0.58011806",
"0.57999504",
"0.57969546",
"0.5795901",
"0.5786614",
"0.5772468",
"0.5767... | 0.6964741 | 0 |
get ago string for the given seconds | function getAgo( seconds ) {
if ( seconds === 1 ) {
return seconds + ' second';
} else if ( seconds < 45 ) { // 45s
return seconds + ' seconds';
} else if ( seconds < 90 ) { // 1m 30s
return 'a minute';
} else if ( seconds < m2s( 45 ) ) { // 45m
return Math.round( seconds / 60 ) + ' minutes';
} el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ago(start, end = Date.now(), withoutSuffix = false) {\n\t// The start time in milliseconds.\n\tstart = new Date(start).getTime();\n\t// The end time in milliseconds.\n\tend = end === null ? Date.now() : new Date(end).getTime();\n\t// Ensure that the times were valid.\n\tif(isNaN(start) || isNaN(end)) {\n\... | [
"0.7063797",
"0.7019597",
"0.6889137",
"0.6878394",
"0.6857906",
"0.6857906",
"0.6857906",
"0.6857906",
"0.68464637",
"0.68358505",
"0.6744049",
"0.6736986",
"0.6719002",
"0.6654492",
"0.6630951",
"0.6624531",
"0.6624531",
"0.6624531",
"0.6624531",
"0.6624531",
"0.6624531",
... | 0.7735737 | 0 |
get ago string with optional suffix for the given timestamp | function agoNumber( timestamp, suffix ) {
var seconds = Math.floor( ( Date.now() - timestamp ) / 1000 );
return getAgo( seconds ) + ( ( suffix === undefined || suffix ) ? ' ago' : '' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}",
"function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}",
"function substitu... | [
"0.7492052",
"0.7492052",
"0.7492052",
"0.7492052",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
"0.74895006",
... | 0.7588116 | 0 |
An autobinding function execution scope. See autorun for details. | function Scope(fn, context, priority, name, onExecuteCb, onExecuteContext) {
_.extend(this, {
fn: fn,
context: context,
priority: priority,
'Name': name,
onExecuteCb: onExecuteCb,
onExecuteContext: onExecuteContext,
subScopes: []
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function simpleBind(context,fn){return function(value){fn.call(context,value);};}",
"function BindAndRun() {\r\n}",
"function bindScope(env, scope) {\n env.scope = scope;\n}",
"wrap(fn) {\n if (!this.active) {\n return fn;\n }\n const namespace = this.contextManager;\n ... | [
"0.59969896",
"0.5817954",
"0.58078486",
"0.5789417",
"0.5758923",
"0.5726596",
"0.5711356",
"0.5694555",
"0.5618433",
"0.5616888",
"0.5600995",
"0.5597145",
"0.55838156",
"0.55780846",
"0.554585",
"0.5504181",
"0.54987556",
"0.54987556",
"0.54987556",
"0.54987556",
"0.549875... | 0.6021523 | 0 |
Middleware Find Region by ID | async findRegion(req, res, next) {
let region = await Region.findOne({
where: { regionID: req.params.id },
include: [
{
model: Country,
attributes: [
"countryID",
"countryName"
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async getRegionByID(req, res) {\n res.status(200).json({\n region: req.region,\n status: 200,\n ok: true,\n title: 'Successful request',\n message: 'Region Found',\n });\n }",
"static getAllRegionsById(region_id) {\n const url = `${... | [
"0.77477026",
"0.6602634",
"0.64124",
"0.63376415",
"0.6291142",
"0.60851175",
"0.59418195",
"0.59383756",
"0.59383756",
"0.5882676",
"0.5849011",
"0.5841857",
"0.5807109",
"0.56959057",
"0.55865175",
"0.5576732",
"0.55427533",
"0.5534401",
"0.55342466",
"0.5511833",
"0.55018... | 0.7168528 | 1 |
Get Region by ID | async getRegionByID(req, res) {
res.status(200).json({
region: req.region,
status: 200,
ok: true,
title: 'Successful request',
message: 'Region Found',
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getRegionFromCurrData(id) {\n\t// If the id is less than 1,000 then it's a state code. Convert to 5-digit FIPS\n\tid = (currData.resolution === \"state\") ? id * 1000: id;\n\treturn currData.regions[currData.regions_idx[id]];\n}",
"static getAllRegionsById(region_id) {\n const url = `${API_URL}/... | [
"0.6988043",
"0.68030876",
"0.67851853",
"0.6541091",
"0.6541091",
"0.65239584",
"0.62042856",
"0.61404204",
"0.61285555",
"0.6127423",
"0.5989071",
"0.5948869",
"0.5860527",
"0.5849929",
"0.5794052",
"0.5781051",
"0.5775288",
"0.57613665",
"0.5745737",
"0.57237333",
"0.57160... | 0.70570654 | 0 |
Getter for content element | getContentElement() {
return this.contentEl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get content_element() {\n return this.element;\n }",
"getContentElement() {\n return this.contentEl;\n }",
"get content() {\n return this.#content;\n }",
"get contents() {\n return this.#content;\n }",
"get content() {\n return this._content;\n }",
"get content... | [
"0.84470844",
"0.81021434",
"0.8026265",
"0.78110856",
"0.778375",
"0.7778902",
"0.77564204",
"0.77355176",
"0.77355176",
"0.7560821",
"0.74063736",
"0.73453575",
"0.71130323",
"0.70577836",
"0.70063937",
"0.6974673",
"0.6964005",
"0.69279104",
"0.6757949",
"0.6710458",
"0.66... | 0.82514226 | 1 |
UnMount mutation observer and delete SimpleBar instance from DOM element | unMount() {
this.removeListeners();
SimpleBar.instances.delete(this.el);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }",
"unmount() {\n let me = this;\n\n Neo.currentWorker.promiseMessage('main', {\n action : 'updateDom',\n appName: me.appName,\n deltas : [{\n action: 'removeNode',... | [
"0.8443397",
"0.69574165",
"0.6861401",
"0.6831783",
"0.68226564",
"0.6715667",
"0.6700448",
"0.665561",
"0.66122454",
"0.66064817",
"0.6587015",
"0.6581064",
"0.65470105",
"0.65470105",
"0.65470105",
"0.65470105",
"0.65470105",
"0.65470105",
"0.65470105",
"0.65470105",
"0.65... | 0.83815825 | 1 |
This function plots the bar plot with new data for the selected Country | function CountryChanged(newcountry) {
// Fetch new data each time a new sample is selected
barplot(newcountry);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updatebar(data1, country, year1, x, y, remove) {\n // remove old chart\n d3.selectAll(\".yaxis\").remove()\n d3.selectAll(\".bar\").remove()\n d3.selectAll(\".xaxis\").remove()\n // append the x values and y values to lists\n dataPilars = []\n dataList = []\n dataEstimates = []\n dataAbr = [\"Lac... | [
"0.69447",
"0.69238156",
"0.6884555",
"0.6750872",
"0.6730159",
"0.6712082",
"0.6650687",
"0.6613515",
"0.65744716",
"0.6519064",
"0.645929",
"0.64430225",
"0.6409215",
"0.6358584",
"0.6330136",
"0.631432",
"0.6306413",
"0.6293477",
"0.62644523",
"0.62373185",
"0.6235679",
... | 0.7742069 | 0 |
add p1 to p0 | function add( p0, p1 ) {
return {x: p0.x + p1.x, y: p0.y + p1.y};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function append$4(prim, prim$1) {\n return prim + prim$1 | 0;\n }",
"function append$3(prim, prim$1) {\n return prim + prim$1;\n }",
"function addNums(p1, p2)\r\n{\r\n //p1 and p2 are sent to addNums... to do this:\r\n return p1+p2;\r\n}",
"function reduceAdd(p, v) {\n ++p.count;\n\n ... | [
"0.62572914",
"0.6192017",
"0.61594296",
"0.60843337",
"0.6024456",
"0.5972493",
"0.59199464",
"0.59199464",
"0.59199464",
"0.59199464",
"0.59199464",
"0.59199464",
"0.59199464",
"0.5820723",
"0.5763463",
"0.5762005",
"0.5756699",
"0.5756699",
"0.5756699",
"0.5756699",
"0.575... | 0.72118396 | 0 |
multiply p1 & p0 | function mul( p0, p1 ) {
return {x: p0.x * p1.x, y: p0.y * p1.y};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function multiplication(p1, p2) {\n return p1 * p2\n}",
"mul(a, b) {\n\t\tthis.registers[a] *= this.get(b);\n\t}",
"function ip(v0, v1){\r\n return v0.x*v1.x+v0.y*v1.y+v0.z*v1.z;\r\n}",
"function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i<y.t;++i)r[i+x... | [
"0.6665647",
"0.6507131",
"0.6416396",
"0.6321763",
"0.6317581",
"0.6298809",
"0.62865674",
"0.6271799",
"0.62622833",
"0.6223638",
"0.62070715",
"0.61871034",
"0.61625075",
"0.61553156",
"0.61214155",
"0.6104805",
"0.6104805",
"0.6104805",
"0.6104805",
"0.6104805",
"0.610480... | 0.7159939 | 0 |
If cache else network. For images and assets that are not critical to be fully uptodate. developers.google.com/web/fundamentals/instantandoffline/offlinecookbook/ cachefallingbacktonetwork | function cacheElseNetwork (event) {
return caches.match(event.request).then(response => {
function fetchAndCache () {
return fetch(event.request).then(response => {
// Update cache.
caches.open(VERSION).then(cache => cache.put(event.request, response.clone()));
return response;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cacheNetwork(event) {\n const url = new URL(event.request.url);\n //console.log('cacheNetwork:', url);\n event.respondWith(\n caches.open(CACHE).then(function (cache) {\n return cache.match(event.request).then(function (response) {\n var fetchPromise = fetch(event.request).then(function ... | [
"0.7100884",
"0.7024537",
"0.69586587",
"0.66769224",
"0.65143794",
"0.6385505",
"0.6376575",
"0.6318953",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"0.63114935",
"... | 0.7053384 | 1 |
enemyaction = 0 feint enemy action = 1 attack enemy action = 2 defend random enemyAction attack function | function randomAttack() {
let enemyAction = Math.floor(Math.random() * 3);
showEnemyAction(enemyAction);
if (enemyAction === 0 && myAction === 1) {
attackVsFeint();
} else if (enemyAction === 2 && myAction === 2 || enemyAction === 1 && myAction === 1 || enemyAction === 0 && myAction === 0) {
tie();
}... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"enemyChooseAttack(animal,attacker,attackee,ally,enemy){return attackee}",
"attack (enemy) {\n\n this.moraleBuff ();\n\n var atkRoll = this.atk * Math.random();\n var defRoll = enemy.def * Math.random();\n var dmg = (atkRoll - defRoll);\n\n if (dmg > 0) {\n var rndDmg = Math.floor(dmg);\n ... | [
"0.758727",
"0.73849595",
"0.72635734",
"0.7133771",
"0.7050488",
"0.69965595",
"0.6966044",
"0.688313",
"0.6826227",
"0.68198323",
"0.6806117",
"0.67964107",
"0.67766744",
"0.67294097",
"0.6717265",
"0.6714005",
"0.67034423",
"0.66974276",
"0.66645885",
"0.6663778",
"0.66262... | 0.8100949 | 0 |
ifHit checks to see if the ball comes in contact with the paddle's coordinates and changes its direction accordingly. | function ifHit(){
if(x == xPos + paddleWidth){ //checks if the ball is in the paddle's range of x coordinates
if(y >= yPos && y <= yPos+paddleHeight){ //checks if the ball is also in the paddle's y coordinates and if so deflects it.
dx = -dx; //ball x direction is reversed
}
}
if(x == arrowXPos){... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ballPaddleCollision() {\n if (ball.x < paddle.x + paddle.width && ball.x > paddle.x && paddle.y < paddle.y + paddle.height && ball.y > paddle.y) {\n\n // JOUER LE SON\n PADDLE_HIT.play();\n\n // CHECK WHERE THE BALL HIT THE PADDLE\n let collidePoint = ball.x - (paddle.x + paddle.width / 2);\n... | [
"0.7200259",
"0.71936876",
"0.71750444",
"0.71615523",
"0.71237826",
"0.70562154",
"0.70343995",
"0.7031868",
"0.7023925",
"0.69783777",
"0.69178265",
"0.6876795",
"0.6820572",
"0.68099564",
"0.6808815",
"0.6785558",
"0.67716277",
"0.6771611",
"0.6761004",
"0.67273366",
"0.66... | 0.7800166 | 0 |
key_func() is used to get the position of a line in the whole tree | function key_func(d) {
return d.line_index;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function keyFunction(d, i) {\n\t return d.source + i;\n\t }",
"key(i) { return this.#offset + this.#key[i]; }",
"findNodeByKey (key) {\n return Tree.findEntry2 (key, this.rootEntry);\n }",
"getMinKey () {\n return this.getMinKeyDescendant().key\n }",
"key() { }",
"function KeyCheck(e, t... | [
"0.642448",
"0.61214304",
"0.6036794",
"0.60316974",
"0.59577835",
"0.5843945",
"0.57818633",
"0.5770547",
"0.5733466",
"0.571154",
"0.56584615",
"0.5656467",
"0.562407",
"0.5615771",
"0.5613263",
"0.5613263",
"0.5580361",
"0.5580361",
"0.5568366",
"0.55401146",
"0.5533319",
... | 0.78489923 | 0 |
What happens when "Project Editor" is clicked on | projectEditorTabClick() {
this.projectEditorTab.className = "HVACApplication_ProjectEditorTab selected";
this.wallEditorTab.className = "HVACApplication_WallEditorTab";
this.roomEditorTab.className = "HVACApplication_RoomEditorTab";
this.viewEditorTab.className = "HVACApplication_ViewEdi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static projectClickHandler(e) {\n func.updateStateObject(e.target.textContent)\n this.highlightProject();\n this.displayTasks();\n }",
"handleEvents() {\n this.disposables.add(atom.commands.add('atom-workspace', {\n 'project-viewer-plus:toggle-visibility': () => {\n this.projectViewer.to... | [
"0.67425543",
"0.6221337",
"0.61882055",
"0.6163099",
"0.6117341",
"0.6108971",
"0.60964346",
"0.60490626",
"0.60288906",
"0.60143524",
"0.6005579",
"0.59477955",
"0.5908021",
"0.5908021",
"0.5877007",
"0.58671486",
"0.58660287",
"0.5863185",
"0.5820999",
"0.5798369",
"0.5761... | 0.67113054 | 1 |
What happens when "Wall Editor" is clicked on | wallEditorTabClick() {
this.projectEditorTab.className = "HVACApplication_ProjectEditorTab";
this.wallEditorTab.className = "HVACApplication_WallEditorTab selected";
this.roomEditorTab.className = "HVACApplication_RoomEditorTab";
this.viewEditorTab.className = "HVACApplication_ViewEditor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clickNoteEditor(e){\n self.focus_manager.setFocusObject(self.focus_manager.NOTE_EDITOR);\n }",
"function Editor() { }",
"function Editor() { }",
"'click #editor1'( e, t ) {\n e.preventDefault();\n $( '#cb-title-toolbar' ).hide();\n $( '#cb-media-toolbar' ).hide();\n $( '#cb-t... | [
"0.6279616",
"0.61265796",
"0.61265796",
"0.6099428",
"0.5835422",
"0.58063143",
"0.578676",
"0.57769734",
"0.5754834",
"0.5739786",
"0.570123",
"0.5682827",
"0.56764406",
"0.5603225",
"0.55888593",
"0.5585439",
"0.5574444",
"0.55676067",
"0.5551977",
"0.55214036",
"0.5520955... | 0.67112106 | 0 |
What happens when "Room Editor" is clicked on | roomEditorTabClick() {
this.projectEditorTab.className = "HVACApplication_ProjectEditorTab";
this.wallEditorTab.className = "HVACApplication_WallEditorTab";
this.roomEditorTab.className = "HVACApplication_RoomEditorTab selected";
this.viewEditorTab.className = "HVACApplication_ViewEditor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"onClickEditMode() {\n\t\teventEmitter.emit(EVENTS.ToggleEditMode, this.Controls.EDIT_MODE);\n\t}",
"edit() {\n this._enterEditMode();\n }",
"doEditMode() {\n\n }",
"function onEdit() {\n transition(EDIT);\n }",
"function toEDITOR() {\n if (SUBMODE == \"ASSOCIATE\") {\n resetParamsP... | [
"0.65824026",
"0.6502682",
"0.64924663",
"0.6411339",
"0.619222",
"0.61775464",
"0.6121806",
"0.6090678",
"0.6086679",
"0.6057052",
"0.59866744",
"0.59608877",
"0.5940032",
"0.5911869",
"0.587141",
"0.5870551",
"0.5849479",
"0.5826774",
"0.5826774",
"0.5824494",
"0.5823445",
... | 0.67109144 | 0 |
What happens when "View Editor" is clicked on | viewEditorTabClick() {
this.projectEditorTab.className = "HVACApplication_ProjectEditorTab";
this.wallEditorTab.className = "HVACApplication_WallEditorTab";
this.roomEditorTab.className = "HVACApplication_RoomEditorTab";
this.viewEditorTab.className = "HVACApplication_ViewEditorTab selec... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Editor() { }",
"function Editor() { }",
"'click #editor1'( e, t ) {\n e.preventDefault();\n $( '#cb-title-toolbar' ).hide();\n $( '#cb-media-toolbar' ).hide();\n $( '#cb-text-toolbar' ).show();\n $( '.js-cb-text-edit' ).hide();\n $( '.js-cb-text-delete' ).hide();\n $... | [
"0.6707744",
"0.6707744",
"0.67051136",
"0.6618038",
"0.6551365",
"0.6494005",
"0.63507414",
"0.63468164",
"0.6345046",
"0.6328733",
"0.631393",
"0.6298894",
"0.628826",
"0.62180513",
"0.6173736",
"0.61635834",
"0.61635834",
"0.6149654",
"0.6136883",
"0.6132273",
"0.612942",
... | 0.6719427 | 0 |
Loads in the HVACData and gets a list of all current buildings | loadData() {
this.hvacData = HVACDataLoader.getHVACData(this);
if (this.hvacData.getBuildingList().length > 0) this.selectBuilding(this.hvacData.getBuildingList()[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"loadBuildings() {\n var _a;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function* () {\n const building_list = yield Object(_placeos_ts_client__WEBPACK_IMPORTED_MODULE_2__[\"queryZones\"])({\n tags: 'building',\n li... | [
"0.68913835",
"0.63535774",
"0.63143855",
"0.6236468",
"0.6182248",
"0.60356826",
"0.5936179",
"0.58439",
"0.5829229",
"0.57888865",
"0.56843704",
"0.5671916",
"0.5570787",
"0.5507779",
"0.5479664",
"0.54790497",
"0.5464101",
"0.54213595",
"0.54189056",
"0.5411479",
"0.541088... | 0.7076296 | 0 |
Saves the HVACData to a JSON object for mapping | saveData() {
window.localStorage.setItem("HVACData", JSON.stringify(this.hvacData.getHashmap()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"save(){\n\t\tvar dataString = JSON.stringify(this.getData());\n\t\tfs.writeFile('app/json/saveData.txt', dataString);\n\t}",
"function saveDataToBrowserStorage(){\n\tsaveJsonToBrowserStorage(convertCriteriaToJSON());\n}",
"function saveData() {\n fs.writeFileSync('./data/data.json', JSON.stringify(data, nul... | [
"0.65064746",
"0.6349604",
"0.6225372",
"0.62200546",
"0.6170013",
"0.60551167",
"0.6039364",
"0.6011798",
"0.59905416",
"0.598529",
"0.5974544",
"0.59537935",
"0.5949174",
"0.5934869",
"0.59262294",
"0.5908313",
"0.5868156",
"0.5867553",
"0.58592975",
"0.58396894",
"0.582311... | 0.71684057 | 0 |
Hides the Floor Picker when Project Editor/Simulator are selected | hideFloorPicker() {
this.floorPickerWindow.getDiv().style.display = "none";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"showFloorPicker() {\n this.floorPickerWindow.getDiv().style.display = \"\";\n this.floorPickerWindow.loadFloors();\n }",
"function hide() {\n colorPickerStroke.style.display = \"none\";\n}",
"hide() {\n this.backgroundDiv.remove();\n this.BasementFloorDiv.remove();\n }",
... | [
"0.7597873",
"0.6311646",
"0.62809736",
"0.62762743",
"0.6206801",
"0.6173713",
"0.61694694",
"0.61021703",
"0.6099676",
"0.6076197",
"0.6063885",
"0.6053258",
"0.6037302",
"0.6037302",
"0.60121614",
"0.59990555",
"0.59990555",
"0.5987629",
"0.5985336",
"0.5971172",
"0.596565... | 0.82166713 | 0 |
Shows the Floor Picker when Wall Editor, Room Editor, or View are selected | showFloorPicker() {
this.floorPickerWindow.getDiv().style.display = "";
this.floorPickerWindow.loadFloors();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"hideFloorPicker() {\n this.floorPickerWindow.getDiv().style.display = \"none\";\n }",
"selectFloor(floor) {\n this.selectedFloor = floor;\n }",
"function Picker( ){}",
"function onSelectDivision(){\n var divisionGrid = View.panels.get('divisionGrid');\n divisionId = divisionGrid.row... | [
"0.69695145",
"0.67194057",
"0.6116231",
"0.6087396",
"0.59048855",
"0.5861657",
"0.58525866",
"0.56882185",
"0.5685879",
"0.56357026",
"0.56269914",
"0.56127405",
"0.5611912",
"0.55713266",
"0.55713266",
"0.54964453",
"0.54832095",
"0.54770756",
"0.54755986",
"0.54659337",
"... | 0.815188 | 0 |
Gets a list of the current walls that have been created | getCurrentWallList() {
if (this.selectedFloor == null) return null;
return this.selectedFloor.getWallList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeWalls(){\n\tvar walls = [];\n\tfor (var i = 0; i < totalRows; i++){\n\t\tvar row = [];\n\t\tfor (var j = 0; j < totalCols; j++){\n\t\t\trow.push(true);\n\t\t}\n\t\twalls.push(row);\n\t}\n\treturn walls;\n}",
"function createWalls()\n{\n\tvar myWalls = [];\n\n\tfor (var i = 0; i < dimX; i++)\n\t{\n\t... | [
"0.6505559",
"0.64864707",
"0.6302834",
"0.62153035",
"0.618363",
"0.6123995",
"0.6041403",
"0.6028493",
"0.6023693",
"0.5976603",
"0.5958525",
"0.5924946",
"0.5834081",
"0.5824012",
"0.582302",
"0.5814034",
"0.578508",
"0.5746205",
"0.5740312",
"0.57199055",
"0.5704959",
"... | 0.70214015 | 0 |
Accesses the current Floor Plan | getCurrentFloorPlan() {
return this.selectedFloor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get plan() {\n\t\treturn this.__plan;\n\t}",
"getFloor() {\n\t\t// This returns the VALUE returned from the class object's \"get floor()\" method\n\t\treturn this.elevatorFloor.getFloor();\n\t}",
"function ParseFloorPlan(floorPlan) {\n var merakiLatLngCorners = _.get(floorPlan, 'merakiCorners');\n var ma... | [
"0.64355344",
"0.6423467",
"0.62914026",
"0.61482686",
"0.6101856",
"0.6088936",
"0.6022756",
"0.5999202",
"0.59090453",
"0.5903257",
"0.5798331",
"0.5779939",
"0.56533945",
"0.564626",
"0.5620682",
"0.5616238",
"0.5603157",
"0.56029487",
"0.5536429",
"0.55292434",
"0.5523988... | 0.809181 | 0 |
Accesses the current Building | getCurrentBuilding() {
return this.selectedBuilding;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get Build() {\n return build;\n }",
"get build() {\n return this.metadata['build']\n }",
"get buildings() {\n return this._org.buildings;\n }",
"get building_settings() {\n return this._building_settings;\n }",
"get buildings() {\n return this.buildings_subject.... | [
"0.7072306",
"0.6848225",
"0.66658735",
"0.6623316",
"0.64197516",
"0.6387305",
"0.62797",
"0.6260871",
"0.6064813",
"0.5971088",
"0.5827282",
"0.5712949",
"0.56063646",
"0.56008214",
"0.5597608",
"0.55495703",
"0.5540312",
"0.5506304",
"0.5493337",
"0.5469564",
"0.5463262",
... | 0.75208277 | 0 |
Accesses the Logic function inside of the current Editor | logic() {
if (this.currentEditor != null) {
this.currentEditor.logic();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getLogic(){ \n workspacePlayground.updateToolbox(\"<category name='%{BKY_CATLOGIC}' colour='%{BKY_LOGIC_HUE}'><block type='controls_if'></block> <block type='logic_compare'></block> <block type='logic_operation'></block> <block type='logic_negate'></block> <block type='logic_boolean'... | [
"0.6315031",
"0.6280314",
"0.61118823",
"0.61118823",
"0.6085217",
"0.5981962",
"0.5847689",
"0.577159",
"0.5764335",
"0.5700243",
"0.5678372",
"0.56535727",
"0.5647601",
"0.5644457",
"0.5607311",
"0.55916405",
"0.55553335",
"0.5553533",
"0.5549872",
"0.5511133",
"0.5489235",... | 0.7922715 | 0 |
Constructs a new DeprecatedWorkflow. Details about a workflow. | constructor() {
DeprecatedWorkflow.initialize(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createWorkflow() {\n reinitNodeCache();\n}",
"function createWorkflow(workflow, meta, cb) {\n if (typeof (meta) === 'function') {\n cb = meta;\n meta = {};\n }\n var multi = client.multi();\n var p;\n\n for (p in workflow) {\n if (type... | [
"0.49813202",
"0.4950523",
"0.49497473",
"0.49444523",
"0.49271333",
"0.49243698",
"0.4697349",
"0.46019694",
"0.46019694",
"0.46019694",
"0.4591483",
"0.45881888",
"0.45194134",
"0.4517091",
"0.44883275",
"0.44883275",
"0.4480269",
"0.4480269",
"0.4480269",
"0.4480269",
"0.4... | 0.7638006 | 0 |
Trains the network with data from the file | function trainTheNetwork () {
if (isNotTrained) {
/*
=============================================================
TRAINING OF NETWORK
=============================================================
*/
createDataSet();
// DEBUG
// alert(finalDataSet)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static trainNetwork(network, dataArray, jsonTrainedPath) {\n const before = new Date();\n //console.log('before train = ' + before);\n network.train(dataArray, {\n iterations: config.TRAINING_ITERATION,\n log: true,\n learningRate: config.LEANRING_RATE,\n ... | [
"0.6203735",
"0.5868952",
"0.5532352",
"0.5458983",
"0.5375562",
"0.53462183",
"0.5330316",
"0.53002286",
"0.527721",
"0.526712",
"0.5264034",
"0.52118486",
"0.5181514",
"0.5124834",
"0.5063231",
"0.50234675",
"0.4943518",
"0.49268797",
"0.4925949",
"0.49238792",
"0.4922914",... | 0.59780866 | 1 |
This function outputs the Lat/Long/Elev to the Console. | function output_latlong(){
//generate the output content
type=document.getElementById('latlngType').value
var content='';
for (var i=0; i<saved_address_array.length; i++) {
if (type=='Latitude'){
content=content+latitude[saved_address_array[i]]+'<br>';
}else if (t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printLatLong(lat, long) {\n document.getElementById(\"lat\").innerHTML += lat + \"<br/>\";\n document.getElementById(\"long\").innerHTML += long + \"<br/>\";\n}",
"function drawCoords(currentLat, currentLon) {\n html += \"Latitude: \" + currentLat;\n html += \"<br>Longitude: \" + currentLon;... | [
"0.67502946",
"0.6347872",
"0.6291161",
"0.6242952",
"0.5951696",
"0.5949162",
"0.5907321",
"0.58539504",
"0.584924",
"0.5799918",
"0.5787542",
"0.57872504",
"0.57738656",
"0.5772838",
"0.5743818",
"0.5733629",
"0.57222027",
"0.5704495",
"0.569656",
"0.5662391",
"0.56570375",... | 0.6773095 | 0 |
This is the AJAX function which produces the list of terms below each input box. It takes as input: 1) the ontology select box id 2) the query string 3) the input box id 4) the txt box below input id | function showResult(ont_id,str,inputbox_id,txt_id)
{
// If the substring length is empty, then do nothing
if (str.length==0)
{
return;
}
// If the substring is at least one in length, then search for similar terms
// in the ontologies selected. This is where we can set the length to sta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generateResult(){\r\n var selectedOntologies = []; //creating an empty array to hold selected ontologies\r\n var annotateText=document.getElementById(\"typeArea\").value; //get the text value\r\n\r\n //selectedOntologies = [\"Adaptor1\", \"Adaptor2\"]; //testing: hardcoding the selected ontologie... | [
"0.65792495",
"0.6552659",
"0.6537389",
"0.6295279",
"0.6102192",
"0.6048862",
"0.60418993",
"0.602355",
"0.60167956",
"0.599272",
"0.5989797",
"0.59726816",
"0.5968665",
"0.5965159",
"0.59504133",
"0.5930899",
"0.59016603",
"0.58960146",
"0.5892203",
"0.5836825",
"0.58323765... | 0.71398973 | 0 |
This is the AJAX function which validates the terms in each input box. It takes as input: 1) the ontology select box id 2) the initial list of ontology terms from user 3) the table where all results should be written 4) whether this is the first call of this function 5) whether this is an export call | function validateInput(ont_id,ont_term_list,table_id,new_data,export_data)
{
//if no data is input produce an alert
if (ont_term_list.length==0){
alert("Paste some data in the input box!");
return;
}
//get the list of ontologies using the ontology id
ontologies=document.getEleme... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showResult(ont_id,str,inputbox_id,txt_id)\n{\n // If the substring length is empty, then do nothing\n if (str.length==0)\n {\n return;\n } \n // If the substring is at least one in length, then search for similar terms\n // in the ontologies selected. This is where we can set the ... | [
"0.68444175",
"0.66570956",
"0.61834306",
"0.6068244",
"0.60507977",
"0.60062486",
"0.58631957",
"0.58590466",
"0.58101857",
"0.57766145",
"0.5769483",
"0.57418454",
"0.5730982",
"0.56652707",
"0.56618327",
"0.5644251",
"0.56388825",
"0.5628591",
"0.56253815",
"0.5618814",
"0... | 0.79230815 | 0 |
This function checks to see if all input boxes are valid, updates the original list of terms from the user, with the corrected terms, then calls the function to write the data to the new window | function write_data_to_new_window(original_ont_term_array, original_unique_terms, updated_unique_terms){
//Determine that all terms are valid
for (var i=0;i<original_unique_terms.length;i++){
if (original_unique_terms[i]!=''){
validity=document.getElementById('validtxtbox'+(i)).innerHTML
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validateInput(ont_id,ont_term_list,table_id,new_data,export_data)\n{\n //if no data is input produce an alert\n if (ont_term_list.length==0){\n alert(\"Paste some data in the input box!\");\n return;\n }\n \n //get the list of ontologies using the ontology id\n ontologies=d... | [
"0.7341073",
"0.647262",
"0.63526386",
"0.6250922",
"0.5926124",
"0.59062624",
"0.5819031",
"0.5740723",
"0.57370573",
"0.56986564",
"0.5677631",
"0.5657033",
"0.56389457",
"0.56363887",
"0.56234175",
"0.5618226",
"0.5534609",
"0.5500655",
"0.5485894",
"0.5484647",
"0.5469299... | 0.8180249 | 0 |
This function creates a new console window and writes an html page containing the corrected list of terms | function writeConsole(content)
{
//open new window
top.consoleRef=window.open('','myconsole','width=350,height=400,menubar=0,toolbar=1,status=0,scrollbars=1,resizable=1')
//write page
top.consoleRef.document.writeln('<html><head><title>Console</title></head><body bgcolor=white onLoad="self.focus()">'+c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function write_data_to_new_window(original_ont_term_array, original_unique_terms, updated_unique_terms){\n\n //Determine that all terms are valid\n for (var i=0;i<original_unique_terms.length;i++){\n if (original_unique_terms[i]!=''){\n validity=document.getElementById('validtxtbox'+(i)).in... | [
"0.70254445",
"0.58256155",
"0.5743425",
"0.5740874",
"0.5740297",
"0.5594916",
"0.5583947",
"0.5469609",
"0.5458027",
"0.5441499",
"0.54193497",
"0.5418986",
"0.54082906",
"0.5404199",
"0.53993434",
"0.5397855",
"0.5352596",
"0.53263146",
"0.53033775",
"0.5289888",
"0.528727... | 0.59047085 | 1 |
This function writes the input boxes into the results table. Each input box has 4 fields that are created as follows: ================== ====================== inputboxvalidity inputbox empty field listofontologyterms ================== ====================== ... | function write_input_boxes(ont_term_array,table_id){
//create the header fields in the table (2 columns)
unique_ont_array=unique(ont_term_array);
var otable = document.getElementById(table_id);
var row1 = document.createElement("TR");
var th1 = document.createElement("TH");
th1.appendChild(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validateInput(ont_id,ont_term_list,table_id,new_data,export_data)\n{\n //if no data is input produce an alert\n if (ont_term_list.length==0){\n alert(\"Paste some data in the input box!\");\n return;\n }\n \n //get the list of ontologies using the ontology id\n ontologies=d... | [
"0.67772645",
"0.621288",
"0.60913646",
"0.5813611",
"0.57811946",
"0.576404",
"0.57554525",
"0.57255584",
"0.5722583",
"0.57205456",
"0.5687546",
"0.5650038",
"0.5638113",
"0.5607434",
"0.5587332",
"0.5578781",
"0.5561862",
"0.5548027",
"0.5531925",
"0.5530265",
"0.5516427",... | 0.77876097 | 0 |
initialize the puzzle, add 15 squares and set the blank | function initPuzzle() {
var tmp, that, top, left;
for (var i = 0; i < squares.length; i++) {
that = squares[i];
if (that) {
top = Math.floor(i / 4) * 90;
left = (i % 4) * 90;
tmp = document.createElement("div");
tmp.className = "tile";
tmp.id = "square_" + i;
tmp.style.left = left + "px"; //set... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setupPuzzle() {\n\t\tvar puzzle = document.getElementById(\"puzzlearea\");\n\t\tsetupPieces(puzzle);\n\t\tsetupBackgrounds(puzzle.childNodes);\n\t\tsetupSelect();\n\t\tempty = 16;\n\t}",
"function setupPieces(puzzle) {\n\t\tpuzzle.innerHTML = \"\";\n\t\tfor (var i = 1; i <= 15; i++) {\n\t\t\tvar piece =... | [
"0.7335654",
"0.6847561",
"0.6808643",
"0.67212194",
"0.671233",
"0.66848123",
"0.66780823",
"0.66448355",
"0.66162056",
"0.65991503",
"0.6571279",
"0.6567151",
"0.6565078",
"0.6519615",
"0.6509998",
"0.64942205",
"0.6462264",
"0.6447963",
"0.64446145",
"0.64273804",
"0.64125... | 0.72211367 | 1 |
Runs when a country stops being hovered over | function onHoverEnd(layer) {
//Deactivates the hovered country's targetting
if (!layer.feature.properties.clicked){
layer.setStyle({
weight: 1,
fillOpacity: 0.7,
dashArray: '3'
});
geojson.bringToBack(layer);
}
//Removes the data of the hovered country from the hover display box
doc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function onCountryMouseOut(e) {\n C.geojson.resetStyle(e.target);\n //\t$(\"#countryHighlighted\").text(\"No selection\");\n\n var countryName = e.target.feature.properties.name;\n var countryCode = e.target.feature.properties.iso_a2;\n //callback when mouse exits a country polygon goes here, for additional a... | [
"0.6375403",
"0.6357861",
"0.63270885",
"0.61522025",
"0.6150214",
"0.61320424",
"0.6115682",
"0.608531",
"0.60849416",
"0.6039004",
"0.6035407",
"0.6021647",
"0.60112494",
"0.5980441",
"0.59465474",
"0.5930984",
"0.59047645",
"0.58867455",
"0.5867922",
"0.58481663",
"0.58452... | 0.7094524 | 0 |
function that iterates an array and outputs each element | function outputArray(arr){
for(i=0; i<arr.length; i++)
console.log(arr[i]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printArray ( array ) {\n\n\tfor ( var i = 0; i < array.length; i++ ) {\n\t\t\n\t\tconsole.log( array[i] );\n\n\t};\n\n}",
"function outputArray(arr) {\n\t// Output each element to the console\n\tfor (var j = 0; j < arr.length; j++) {\n\t\tconsole.log(arr[j]);\n\t}\n}",
"function arrayOutput(a) {\n\t\t... | [
"0.70830464",
"0.7021246",
"0.7018005",
"0.7014544",
"0.6970571",
"0.6965725",
"0.6962217",
"0.69295913",
"0.6918898",
"0.6851627",
"0.68256074",
"0.68225",
"0.68116295",
"0.67611486",
"0.673331",
"0.66952574",
"0.6680315",
"0.66792077",
"0.66791207",
"0.66764617",
"0.6673279... | 0.7586991 | 0 |
Task : Will delete given file Resolve : 200 > Delete file operation success Reject : error object if error occur. | deleteFile(fname) {
return new Promise( (resolve, reject) => {
fs.unlink(fname, (err) => {
if(err) {
reject(err);
}
else {
resolve(200);
}
});
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"delete(fileId, callback){\n throw new Error('delete is not implemented');\n }",
"deleteFile(filename, folder) {\n let filePath = path_1.default.join(process.cwd(), folder, filename);\n return new Promise((resolve, reject) => {\n fs_1.default.unlink(filePath, (err) => {\n ... | [
"0.70465237",
"0.691932",
"0.66537076",
"0.66389984",
"0.66223305",
"0.6593291",
"0.65338826",
"0.65193415",
"0.6495948",
"0.64261144",
"0.64240706",
"0.64206094",
"0.6401284",
"0.63649803",
"0.6358483",
"0.6343911",
"0.63274235",
"0.6309885",
"0.6301968",
"0.6295094",
"0.626... | 0.74248004 | 0 |
Task : Will delete given user if it is not a super admin user Return : user > deleteUser operation success 401 > You are trying to delete a super admin user | deleteUser(user) {
if(user.privilege === global.SUPER_ADMIN) {
console.log("Errr! You are trying to delete a super admin user");
return 401;
}
user = null;
return user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async deleteUser(parent, {\n id\n }, context, info) {\n try {\n const deletedUser = await context.prisma.user.delete({\n where: {\n id\n }\n }); // console.log(deletedUser)\n\n return \"user deleted successfully\";\n } catch (error) {\n r... | [
"0.7310735",
"0.7265665",
"0.72265816",
"0.718795",
"0.7142872",
"0.70478976",
"0.7025518",
"0.69710755",
"0.6941537",
"0.6929464",
"0.6903873",
"0.6899066",
"0.68287885",
"0.6817633",
"0.6772492",
"0.67699796",
"0.67255044",
"0.672057",
"0.6717859",
"0.67090917",
"0.67006654... | 0.81046814 | 0 |
Destroy the Phaser game instance | async destroy() {
if (this.hasInitialized()) {
this.game.instance.destroy(true);
this.game.instance = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"destroy()\n {\n this.#gameObject = null;\n }",
"function Start () \n{\n\tDestroy(gameObject, time);\n}",
"destroy() {\n window.removeEventListener('gamepadconnected', this._ongamepadconnectedHandler, false);\n window.removeEventListener('gamepaddisconnected', this._ongamepaddisconnec... | [
"0.7811517",
"0.7432416",
"0.7415969",
"0.72995156",
"0.72992146",
"0.7277972",
"0.72595817",
"0.71475035",
"0.7085937",
"0.7084805",
"0.7035895",
"0.7017471",
"0.7016636",
"0.6988232",
"0.69740057",
"0.69568646",
"0.6943574",
"0.6930046",
"0.6913821",
"0.6913821",
"0.6908484... | 0.8416186 | 0 |
Supprimer tous les articles ajoutes | function suppr_art(){
var nb=document.querySelectorAll('.article').length; //ie8 ne supporte pas getElementsByClassName, on utilise querySelectorAll à la place
if (confirm ('Voulez vous supprimer ces '+nb+' article(s) ?')){
for (var i=0;i<nb;i++){
document.getElementById('tabArticle').deleteRow(-1);
}
ajout... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deleteArticles() {\n\tvar articles = document.getElementsByTagName(\"article\");\n\n\tfor (i = articles.length - 1; i >= 0; i--) {\n\t\tarticles[i].parentNode.removeChild(articles[i]);\n\t}\n}",
"function suppr_un_art(){\n\tdocument.getElementById('tabArticle').deleteRow(-1);\n\tif(document.querySelecto... | [
"0.72468734",
"0.6780345",
"0.67762226",
"0.6684343",
"0.6622564",
"0.65780604",
"0.65431106",
"0.6516179",
"0.64198625",
"0.632388",
"0.63061106",
"0.6247187",
"0.6227338",
"0.62006336",
"0.61954325",
"0.6183981",
"0.6179654",
"0.6038416",
"0.60179347",
"0.6010199",
"0.60011... | 0.73168486 | 0 |
Supprimer le dernier articles ajoutes | function suppr_un_art(){
document.getElementById('tabArticle').deleteRow(-1);
if(document.querySelectorAll('.article').length ==0)
ajout_article();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function suppr_art(){\n\tvar nb=document.querySelectorAll('.article').length; //ie8 ne supporte pas getElementsByClassName, on utilise querySelectorAll à la place\n\n\tif (confirm ('Voulez vous supprimer ces '+nb+' article(s) ?')){\n\t\tfor (var i=0;i<nb;i++){\n\t\t\tdocument.getElementById('tabArticle').deleteRow... | [
"0.74751645",
"0.6734314",
"0.6734015",
"0.6584246",
"0.65501404",
"0.64806986",
"0.6429648",
"0.6407744",
"0.63272405",
"0.6323173",
"0.6315061",
"0.62324226",
"0.62112635",
"0.61866456",
"0.6179227",
"0.616477",
"0.61629975",
"0.6144496",
"0.61354864",
"0.61199844",
"0.6110... | 0.69252497 | 1 |
select 1 random. delete when selected from array names | function selectRandom() {
let n1 = Math.floor(Math.random() * names.length);
console.log("n1", n1);
let name = names[n1];
console.log("name", name);
names.splice(n1, 1);
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function selectMarble(arry) {\n\t\treturn arry.splice((Math.floor(Math.random() * (arry.length))), 1)[0];\n\t}",
"function delRandomOption(vec){\r\n vec.splice(Math.ceil(Math.random() * (vec.length-1)),1);\r\n return vec;\r\n ... | [
"0.72514606",
"0.72237986",
"0.71012443",
"0.70582473",
"0.69990563",
"0.6966072",
"0.6891547",
"0.68869877",
"0.6835865",
"0.6830004",
"0.68048096",
"0.6799772",
"0.6793986",
"0.6783189",
"0.67678124",
"0.6764028",
"0.67640007",
"0.67238104",
"0.6631777",
"0.6534755",
"0.652... | 0.74252874 | 0 |
factory absFiles : absolute files path of the archive | static create (absFilesPath) {
if (absFilesPath.length === 0) {
throw new Error('an archive can not be empty')
}
const filesPath = absFilesPath.map(Archive.relative)
return new Archive(filesPath)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function serverlessZip(args) {\n const { artifactFilePath, directory, files } = args;\n\n const zip = archiver.create('zip');\n const output = fs.createWriteStream(artifactFilePath);\n\n return new BbPromise((resolve, reject) => {\n output.on('close', () => resolve(artifactFilePath));\n output.on('error'... | [
"0.5575765",
"0.5531909",
"0.52282697",
"0.51858336",
"0.5185075",
"0.51012594",
"0.5082462",
"0.5072421",
"0.5070524",
"0.5050512",
"0.5041102",
"0.5036315",
"0.50036263",
"0.49927458",
"0.49611837",
"0.4948912",
"0.4942523",
"0.49331656",
"0.49303868",
"0.49290723",
"0.4914... | 0.7421345 | 0 |
authorize the request for the current user | async authorize () {
// user must be an admin for the "everyone" team for the company
this.company = await this.data.companies.getById(this.request.params.id.toLowerCase());
if (!this.company || this.company.get('deactivated')) {
throw this.errorHandler.error('notFound', { info: 'company' });
}
const every... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function authorize() {\n console.log(\"[Re]authorizing user.\");\n app.getToken().then(\n function(token) {\n //Our new access token for API calls\n access_token = token.access_token;\n //console.log(\"Your access token is \" + access_token);\n\n //Check aga... | [
"0.68228984",
"0.6604923",
"0.6435365",
"0.6364524",
"0.6348296",
"0.6291501",
"0.62692505",
"0.626512",
"0.6249138",
"0.6091236",
"0.6081233",
"0.6075901",
"0.6013896",
"0.59735096",
"0.59688073",
"0.5966927",
"0.59629965",
"0.59591985",
"0.590603",
"0.5894495",
"0.5876775",... | 0.66413623 | 1 |
PRIVATE METHODS //////////////////////// Initialization function. Detects if the browser supports DOM Storage or userData behavior and behaves accordingly. | function _init(){
/* Check if browser supports localStorage */
var localStorageReallyWorks = false;
if("localStorage" in window){
try {
window.localStorage.setItem("_tmptest", "tmpval");
localStorageReallyWorks = true;
window.localStora... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _init(){\n /* Check if browser supports localStorage */\n var localStorageReallyWorks = false;\n if(\"localStorage\" in window){\n try {\n window.localStorage.setItem('_tmptest', 'tmpval');\n localStorageReallyWorks = true;\n win... | [
"0.79969245",
"0.6785932",
"0.66572905",
"0.66025656",
"0.65702033",
"0.65689135",
"0.65342706",
"0.65109825",
"0.65098447",
"0.65098447",
"0.6505919",
"0.64760655",
"0.64611393",
"0.6435306",
"0.6394577",
"0.6381168",
"0.63492894",
"0.62870336",
"0.6236713",
"0.6226937",
"0.... | 0.79524106 | 1 |
Reload data from storage when needed | function _reloadData(){
var data = "{}";
if(_backend == "userDataBehavior"){
_storage_elm.load("jStorage");
try{
data = _storage_elm.getAttribute("jStorage");
}catch(E5){}
try{
_observer_update = _storage_elm.getAttribute... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reloadData() {\n if (typeof (CPData) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataSoon) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataDownloaded) != \"undefined\") { CPData.regenerate(); }\n loadInfo();\n ... | [
"0.7367035",
"0.7116742",
"0.6947394",
"0.68959326",
"0.68722034",
"0.66881686",
"0.66586614",
"0.66066915",
"0.65480673",
"0.65140694",
"0.6480001",
"0.64578974",
"0.64461136",
"0.64461136",
"0.6425452",
"0.64134437",
"0.6395185",
"0.6392163",
"0.6385332",
"0.63845915",
"0.6... | 0.766708 | 0 |
Sets up a storage change observer | function _setupObserver(){
if(_backend == "localStorage" || _backend == "globalStorage"){
if("addEventListener" in window){
window.addEventListener("storage", _storageObserver, false);
}else{
document.attachEvent("onstorage", _storageObserver);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _storageObserver(){\n var updateTime;\n // cumulate change notifications with timeout\n clearTimeout(_observer_timeout);\n _observer_timeout = setTimeout(function(){\n\n if(_backend == \"localStorage\" || _backend == \"globalStorage\"){\n updateTime = ... | [
"0.7208311",
"0.7126403",
"0.7017445",
"0.69176626",
"0.6754916",
"0.6424139",
"0.6404103",
"0.6331968",
"0.61532",
"0.61390626",
"0.6046143",
"0.6007903",
"0.5968301",
"0.5968301",
"0.5968301",
"0.59198076",
"0.5918795",
"0.5891791",
"0.5890576",
"0.5880266",
"0.58593196",
... | 0.7567034 | 0 |
Loads the data from the storage based on the supported mechanism | function _load_storage(){
/* if jStorage string is retrieved, then decode it */
if(_storage_service.jStorage){
try{
_storage = JSON.parse(String(_storage_service.jStorage));
}catch(E6){_storage_service.jStorage = "{}";}
}else{
_storage_service.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"loadData() {\r\n\t\t// load the current tracker type data from localStorage\r\n\t\tlet currentData = localStorage.getItem( this.type );\r\n\r\n\t\t// parse it into an object if it exists\r\n\t\tif ( currentData ) {\r\n\t\t\tthis.data = JSON.parse(currentData);\r\n\t\t} else {\r\n\t\t\tthis.data = {};\r\n\t\t}\r\n\... | [
"0.65210575",
"0.6441253",
"0.6402747",
"0.631495",
"0.629452",
"0.61823916",
"0.61011374",
"0.6033492",
"0.6019758",
"0.6005976",
"0.5959103",
"0.5896601",
"0.5882574",
"0.5860759",
"0.58369577",
"0.583666",
"0.58229595",
"0.5816659",
"0.5812074",
"0.58051956",
"0.57978445",... | 0.6663017 | 0 |
This functions provides the "save" mechanism to store the jStorage object | function _save(){
_dropOldEvents(); // remove expired events
try{
_storage_service.jStorage = JSON.stringify(_storage);
// If userData is used as the storage engine, additional
if(_storage_elm) {
_storage_elm.setAttribute("jStorage",_storage_service.jS... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _save(){\n try{\n _storage_service.jStorage = json_encode(_storage);\n // If userData is used as the storage engine, additional\n if(_storage_elm) {\n _storage_elm.setAttribute(\"jStorage\",_storage_service.jStorage);\n _storage_elm.sav... | [
"0.81779784",
"0.72344244",
"0.69658566",
"0.69612336",
"0.6929749",
"0.68993753",
"0.6829497",
"0.6743768",
"0.6722146",
"0.66980785",
"0.6656578",
"0.66483814",
"0.66443354",
"0.6631472",
"0.6631306",
"0.65823215",
"0.655419",
"0.6511032",
"0.6511032",
"0.6510683",
"0.65106... | 0.7974238 | 1 |
Remove old events from the publish stream (at least 2sec old) | function _dropOldEvents(){
if(!_storage.__jstorage_meta.PubSub){
return;
}
var retire = +new Date() - 2000;
for(var i=0, len = _storage.__jstorage_meta.PubSub.length; i<len; i++){
if(_storage.__jstorage_meta.PubSub[i][0] <= retire){
// deleteCoun... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function freeOldEvents(){\n\twhile (USED_EVENTS.length > 0) {\n\t\tvar ev = USED_EVENTS.pop();\n\t\tvar e = EVENT_RESULTS[ev];\n\t\tdelete EVENT_RESULTS[ev];\n\t\tif (e) {\n\t\t\tfor (var key in e) {\n\t\t\t\tdelete e[key];\n\t\t\t}\n\t\t\tEVENT_POOL.push(e);\n\t\t}\n\t}\n\tUSED_EVENTS_TIMEOUT = -1;\n}",
"funct... | [
"0.68761426",
"0.6716867",
"0.6557568",
"0.61613256",
"0.615021",
"0.6066828",
"0.6014295",
"0.60059375",
"0.60010636",
"0.5994676",
"0.5987256",
"0.5941354",
"0.5848779",
"0.5848779",
"0.5830211",
"0.5807621",
"0.57821375",
"0.57661283",
"0.57590353",
"0.57222176",
"0.571788... | 0.76308876 | 0 |
this function compute the fuel needing | computeRefuel() {
return ((100 - this._fuelLevel) / 100) * this._capacity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function fuelRequired(mass){\n\tlet fuel = Math.floor(mass/3);\n\tfuel = fuel - 2;\n\treturn fuel;\n}",
"function fuelRequired(value){\n\n return (Math.floor(value/3)) - 2;\n}",
"function fuel(mass) {\n return Math.floor(mass / 3) - 2;\n}",
"function calculateRequiredFuel({ mass } = {}) {\n if (!mass)... | [
"0.68211293",
"0.673387",
"0.6596992",
"0.6591831",
"0.65520805",
"0.63922364",
"0.63528883",
"0.6336567",
"0.6312983",
"0.62653315",
"0.6243063",
"0.62387",
"0.6173922",
"0.61075675",
"0.60953647",
"0.6052171",
"0.60473824",
"0.60256505",
"0.60010654",
"0.59988284",
"0.59850... | 0.73355466 | 0 |
this function decrease the percentage of fuel level of 1 | decreaseFuelLevel() {
this._fuelLevel--;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"computeRefuel() {\n return ((100 - this._fuelLevel) / 100) * this._capacity;\n }",
"energyUp()\n {\n if(this.energy > 0 && this.energy < this.maxEnergy)//if the energy is between 1 and 100 increase\n {\n if(this.energy > 90)\n {\n var left = 100 - t... | [
"0.647596",
"0.641092",
"0.62778974",
"0.62532043",
"0.62453395",
"0.6199105",
"0.6194973",
"0.61339957",
"0.6119539",
"0.6097568",
"0.60758305",
"0.60544837",
"0.5991827",
"0.5981627",
"0.5959851",
"0.59593904",
"0.59590584",
"0.59561384",
"0.59520495",
"0.5949413",
"0.59476... | 0.79986095 | 0 |
This function change the tag of the plane into "_LANDED_" | land() {
this._tag = "_LANDED_";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function DummyPlane(){}",
"removePlane(plane) {\n if(plane.type === \"PingPongPlane\") {\n this.stacks.pingPong = this.stacks.pingPong.filter(el => el.uuid !== plane.uuid);\n }\n else if(plane.target) {\n this.stacks.renderTargets = this.stacks.renderTargets.filter(el =... | [
"0.58232474",
"0.5771841",
"0.5717479",
"0.5707359",
"0.56206906",
"0.5615302",
"0.55495805",
"0.5497495",
"0.5471338",
"0.54706603",
"0.5430055",
"0.53723353",
"0.5365874",
"0.5327047",
"0.52779245",
"0.52642024",
"0.52603793",
"0.52556276",
"0.52556276",
"0.52555877",
"0.52... | 0.7247104 | 0 |
For each mass in the model, zero the mass's force accumulator. | function _clearForces()
{
MODEL.instance.masses.forEach(function(mass) {
mass.f.set(0, 0);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ClearForces() {\n for (let body = this.m_bodyList; body; body = body.m_next) {\n body.m_force.SetZero();\n body.m_torque = 0;\n }\n }",
"clearForces() {\n this.forces = [];\n }",
"function resetZeroValues() {\n for (i = 0; i < self.flowCategories.length; ... | [
"0.69102985",
"0.6421796",
"0.6023691",
"0.5967957",
"0.5933342",
"0.5763117",
"0.57355464",
"0.5646369",
"0.56056243",
"0.55575484",
"0.5539988",
"0.5507827",
"0.5502149",
"0.54935855",
"0.543397",
"0.54197043",
"0.5275562",
"0.52737397",
"0.52185136",
"0.51945233",
"0.51911... | 0.78474706 | 0 |
For each mass in the model, apply friction. | function _fForce()
{
MODEL.instance.masses.forEach(function(mass) {
// "f"riction (damping) opposes velocity
mass.f.add(VECTOR.mul(mass.v, -1 * MODEL.instance.f()));
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"forces() {\n // Initialize all force vectors\n for (let mass of this.masses) {\n // Frictional force; if friction == 0, this will just\n // zero out the vectors.\n mass.force[0] = -this.friction * mass.velocity[0];\n mass.force[1] = -this.friction * mass.ve... | [
"0.69316953",
"0.6890894",
"0.68509424",
"0.68330234",
"0.67434263",
"0.67239016",
"0.65938336",
"0.6587356",
"0.6439793",
"0.64251846",
"0.6364515",
"0.634022",
"0.62644076",
"0.61324006",
"0.60938966",
"0.6082507",
"0.60043937",
"0.5997933",
"0.599727",
"0.5993994",
"0.5991... | 0.73672664 | 0 |
For each mass, check whether the mass has collided with the model boundary, and update its position and velocity to make it bounce off. If colliding with the left and right walls, perform autoreverse. | function _collide()
{
MODEL.instance.masses.forEach(function(mass) {
// floor and ceiling
if(mass.s.y() < 0 || mass.s.y() > MODEL.instance.height())
{
mass.s.y((mass.s.y() < 0)? 0 : MODEL.instance.height());
// hack: "friction" directly aff... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"update() {\n // check against walls and reverse direction if necessary\n if (this.body.touching.right || this.body.blocked.right) {\n this.body.velocity.x = -this.fSpeed; // turn left\n }\n else if (this.body.touching.left || this.body.blocked.left) {\n this.body.v... | [
"0.6441382",
"0.642908",
"0.64084435",
"0.6371089",
"0.62474346",
"0.62474346",
"0.6217898",
"0.6172589",
"0.6171764",
"0.61075985",
"0.61018157",
"0.60407466",
"0.6032991",
"0.59978",
"0.5979586",
"0.5953115",
"0.5951396",
"0.59488094",
"0.5942706",
"0.5934394",
"0.5921131",... | 0.80756676 | 0 |
==== CLASS FOR ARROWS ==== // 1. Direction of arrows 2. jQuery img that links to direction bottom 3. Destroy when it arrow gets to the 4. Explode when arrow gets to the bottom Class Arrow | function Arrow(direction) {
// CSS spacings for the arrows //
var xPos = null;
switch(direction) {
case "left_mini_bob_ross" : xPos = "115px";
break;
case "up_pog_champ" : xPos = "182";
break;
case "down_resident_sleeper" : xPos = "252px";
break;
case "right_bible_thump" : xPos = "322p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addArrow(obj){\r\n\tif(obj.hasClass('add_arrow')){\r\n\t\treturn false;\r\n\t}else{\r\n\t\tobj.addClass('add_arrow').children('ul').prepend('<li class=\"left_arrow\"><img src=\"../JHSoft.UI.Lib/images/blank.gif\"/></li><li class=\"right_arrow\"><img src=\"../JHSoft.UI.Lib/images/blank.gif\"/></li>')\r\n\t... | [
"0.64553213",
"0.6386092",
"0.63070476",
"0.63049626",
"0.63029224",
"0.62722635",
"0.61568826",
"0.61025065",
"0.60578156",
"0.60252017",
"0.60252017",
"0.60010123",
"0.60010123",
"0.60010123",
"0.59839445",
"0.5981302",
"0.59782434",
"0.5942573",
"0.59206957",
"0.5920326",
... | 0.6574217 | 0 |
new DB spooled up using id from dev profile and chosen db name | function createDevDB(req, res, next) {
var query = {
userName: req.body.userName,
'database.name': req.body.dbName
};
console.log('in createDB', req.body);
Devs.findOne(query, function(err, dev){
console.log('dev null is good: ', dev);
if(!dev){
var devDB = mongoose.createConnection(uri + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static createNewDatabase() {\n idb.open(IdbHelper.dbName, idbVersion, function (upgradeDb) {\n if (!upgradeDb.objectStoreNames.contains(IdbHelper.restaurants)) {\n upgradeDb.createObjectStore(IdbHelper.restaurants, { keypath: 'id', autoIncrement: true });\n upgradeDb... | [
"0.6355984",
"0.59815085",
"0.59797275",
"0.59699184",
"0.59655946",
"0.5936679",
"0.59338963",
"0.5912316",
"0.5900067",
"0.58980787",
"0.58972055",
"0.5893797",
"0.58878374",
"0.5859364",
"0.58124304",
"0.571449",
"0.56944925",
"0.5688032",
"0.5655998",
"0.56203747",
"0.561... | 0.606492 | 1 |
Search for users based on oid. | function searchUsers(id, name) {
$('#user').attr('data-id', id).attr('data-name', name);
$('#results').html('<p class="message">Searching...</p>');
$.ajax({
url: "scripts/read.php",
type: "POST",
data: {
data: [{
oid: id
}
],
script: 'userAccessSites.sql'
},
dataType: "json",
success: ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function search(data) { \r\n for (var i=0 ; i < users.length ; i++) {\r\n if (users[i]._id == data) { \r\n return users[i]; // 5 le return \r\n }\r\n }\r\n }",
"searchUser(id) {\n cy.searchUser(id)\n }",
"function findUserById(req,... | [
"0.66166717",
"0.6376843",
"0.628822",
"0.62763506",
"0.62763506",
"0.6235598",
"0.61819375",
"0.6075334",
"0.6048766",
"0.6022522",
"0.59977365",
"0.59920716",
"0.5989491",
"0.5956083",
"0.5945168",
"0.5937833",
"0.5937582",
"0.5910531",
"0.5898687",
"0.588035",
"0.58760196"... | 0.64690167 | 1 |
Run when selecting a site to edit. | function selectSite(e, ui) {
var id = ui.item.id,
name = ui.item.value;
if (id) {
searchSites(id, name);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleEditSite() {\n\n\t\t//log that we were called\n\t\tosFtpCommon.consoleDebug('handleEditSite()');\n\n\t\t//radio button site name\n\t\tvar RADIO_SITE_NAME = 'site';\n\n\t\t//show dialog\n\t\tvar selectDialog = osFtpDialog.showSiteSelectDialog(osFtpSitesManager.getSitesArray(), RADIO_SITE_NAME);\n\n\t... | [
"0.7296141",
"0.633043",
"0.6182156",
"0.60648155",
"0.60338616",
"0.6028319",
"0.5928118",
"0.5928118",
"0.5927702",
"0.5902835",
"0.58878314",
"0.5789133",
"0.57600045",
"0.5747187",
"0.5715048",
"0.56997687",
"0.5676416",
"0.565914",
"0.556007",
"0.55311817",
"0.55282307",... | 0.66380996 | 1 |
Search for sites based on site id. | function searchSites(id, name) {
$('#site').attr('data-id', id).attr('data-name', name);
$('#results').html('<p class="message">Searching...</p>');
$.ajax({
url: "scripts/read.php",
type: "POST",
data: {
data: [{
id: id
}
],
script: 'siteAccessUsers.sql'
},
dataType: "json",
success: fu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function selectSite(e, ui) {\n\tvar id = ui.item.id,\n\tname = ui.item.value;\n\tif (id) {\n\t\tsearchSites(id, name);\n\t}\n}",
"findSiteId(db, place_id) {\n return db.select(\"id\").from(\"site\").where({\n place_id: place_id,\n });\n }",
"getById(id) {\r\n return new HubSite(this, `GetByI... | [
"0.63166136",
"0.6252054",
"0.6240312",
"0.5797723",
"0.5767932",
"0.575669",
"0.5575397",
"0.5548793",
"0.554477",
"0.5495598",
"0.54895884",
"0.5485798",
"0.54225314",
"0.54166746",
"0.5403197",
"0.5357848",
"0.53568393",
"0.52688426",
"0.52598643",
"0.52493525",
"0.5233702... | 0.70743316 | 0 |
Run when searching for a site failed. | function siteResultsFailed() {
$('#results').html('<p class="message">There was an issue retrieving information for the site.</p>');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handle_search_failure(xhr, textStatus, errorThrown) {\n handle_search_asyn_counter(0);\n }",
"function searchError() {\n\talert(\"Unable to search using location. Please allow the site to know your location, or try to search by criteria instead.\");\n}",
"function page_failed_catch(doc,url,res... | [
"0.7016945",
"0.66562164",
"0.64531356",
"0.64357257",
"0.6344648",
"0.62273765",
"0.621154",
"0.60973465",
"0.60224366",
"0.601654",
"0.60099804",
"0.59421825",
"0.58827174",
"0.5819161",
"0.5813007",
"0.5794233",
"0.5693647",
"0.5638487",
"0.55900276",
"0.55685556",
"0.5563... | 0.6783307 | 1 |
Run when the Edit button is selected for a single site or user. | function singleEdit() {
var button = $(this),
type = button.attr('data-type'),
siteID = button.attr('data-siteid'),
siteName = button.attr('data-sitename'),
userOID = button.attr('data-userid'),
userName = button.attr('data-username');
if (siteID && userOID) {
$.ajax({
url: "scripts/read.php"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleEditButtonPress() {\n var listItemData = $(this).parent(\"td\").parent(\"tr\").data(\"review\");\n var id = listItemData.id;\n // Edit the review via the cms form\n inputReview(id);\n }",
"function handleEditSite() {\n\n\t\t//log that we were called\n\t\tosFtpCommon.consoleDebug('hand... | [
"0.69985193",
"0.6845397",
"0.68449605",
"0.6755401",
"0.67306435",
"0.66409636",
"0.66356075",
"0.66241026",
"0.65953934",
"0.6589116",
"0.65651155",
"0.6557667",
"0.65189874",
"0.65145946",
"0.65131146",
"0.65131146",
"0.6496275",
"0.64786077",
"0.64651895",
"0.6427319",
"0... | 0.69381255 | 1 |
Open single edit dialog. | function openSingleEditDialog(type, siteID, siteName, userOID, userName, access) {
$('#dialog').dialog({
width: '30%',
modal: true,
show: 'fade',
hide: 'fade',
resizable: false,
position: {
my: "center",
at: "top",
of: $('body')
},
open: function () {
var dialog = $(this),
accessOptions ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function openEditFileDialog(){\r\n\t\tvar item = getSelectedSingleItem();\r\n\r\n\t\tvar objDialog = jQuery(\"#uc_dialog_edit_file\");\r\n\r\n\t\tvar buttonOpts = {};\r\n\t\t\r\n\t\tbuttonOpts[g_uctext.close] = function(){\r\n\t\t\tobjDialog.dialog(\"close\");\r\n\t\t};\r\n\r\n\t\tbuttonOpts[g_uctext.save] = funct... | [
"0.77445984",
"0.7149731",
"0.7138642",
"0.70035726",
"0.69674546",
"0.6888938",
"0.6888576",
"0.68534863",
"0.67950964",
"0.67842466",
"0.6759991",
"0.6759991",
"0.6759991",
"0.6759991",
"0.6759991",
"0.6759991",
"0.6759991",
"0.673297",
"0.6698569",
"0.6683255",
"0.664641",... | 0.71653485 | 1 |
Build html for access options. | function buildAccessOptions(selections) {
var options = [['wzde_write', 'WZDE Write'], ['wzde_publish', 'WZDE Publish'], ['wzde_commit', 'WZDE Commit'], ['wzde_read', 'WZDE Read'], ['wzde_checkout', 'WZDE Checkout'], ['wzde_git', 'WZDE Git']],
html = '<p>';
for (var i = 0; i < options.length; i++) {
var option = o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static splash_screen_tutorial_options_html(){\n let result = \"\"\n let labels = persistent_get(\"splash_screen_tutorial_labels\") //might have checkmarks in them.\n for(let name_and_tooltip of this.splash_screen_tutorial_names_and_tooltips){\n let name = name_and_tooltip[0]\n ... | [
"0.61527157",
"0.5803588",
"0.5635946",
"0.56090695",
"0.55545145",
"0.5526894",
"0.5526894",
"0.5526894",
"0.5522977",
"0.5477449",
"0.547407",
"0.54570127",
"0.54569286",
"0.54569286",
"0.54521286",
"0.54239845",
"0.5423578",
"0.52925014",
"0.52579325",
"0.5238002",
"0.5217... | 0.73162806 | 0 |
Run when editing access for single site or user is finished. | function accessEdited(info,type,siteID,userOID,siteName,userName) {
if (info["status"].indexOf('ERROR') >= 0) {
$('#dialogMessage').html('<p>There was an issue editing access.<br />Please try again.</p>');
$('#dialogButtons').show();
} else {
cancelDialog();
// Reload search results to visually see change in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateEditPage () {\n\n var nameMap = table.makePermissionMap(true);\n\n // todo: refactor these doubled 4 lines of code.\n // todo: refactor this doubled line of comments.\n var viewSummaryDiv = $(\"#permissions-view-summary\");\n var viewNames = [].concat(nameMap.group... | [
"0.63287824",
"0.63287824",
"0.62090486",
"0.6209024",
"0.61762583",
"0.6093877",
"0.6079135",
"0.6028495",
"0.59975034",
"0.596173",
"0.5943895",
"0.59252685",
"0.59252685",
"0.58686614",
"0.58555996",
"0.58264136",
"0.58187705",
"0.58187705",
"0.57902795",
"0.57871735",
"0.... | 0.6764535 | 0 |
Open delete site dialog. | function openMassDeleteSiteDialog(id, name) {
$('#dialog').dialog({
width: '30%',
modal: true,
show: 'fade',
hide: 'fade',
resizable: false,
position: {
my: "center",
at: "top",
of: $('body')
},
open: function () {
var dialog = $(this),
html = '';
html += '<p>You are about to delete t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function DeleteFromDialogOpen(){\n\t\n\tvar dlg = document.querySelector('div[jscontroller=\"N5Lqpc\"]');\n\tif(!dlg) { return; }\n\tvar btns = dlg.querySelectorAll('div[role=\"button\"]');\n\tfor(i=0; i<btns.length;i++){\n\n\t\tif (btns[i].textContent == \"Delete\") {\n\t\t\tbtns[i].click();\n\t\t\twait_time = _D... | [
"0.68210757",
"0.65621686",
"0.6320403",
"0.628113",
"0.62564474",
"0.62036467",
"0.6187269",
"0.6142308",
"0.61318696",
"0.610637",
"0.61052835",
"0.6087573",
"0.60640603",
"0.605265",
"0.6033297",
"0.60151654",
"0.5984251",
"0.59830815",
"0.59699357",
"0.5969673",
"0.596630... | 0.6666024 | 1 |
Run when deleting users from site is finished. | function usersDeletedFromSite(data,users) {
if (data["status"].indexOf('ERROR') >= 0) {
$('#dialogMessage').html('<p>There was an issue deleting the users.<br />Please try again.</p>');
$('#dialogButtons').show();
} else {
cancelDialog();
if (users.length > 0) {
for (var i = 0; i < users.length; i++) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function erase_users(options, completed, failed) {\n db.users.erase_db(function(removed_data){\n // console.log(removed_data);\n completed(removed_data);\n });\n}",
"function deleteUsersFromSite() {\n\tvar siteID = $(this).attr('data-id'),\n\tcheckboxes = $('#searchResults').find($('.selection')),\n\tuse... | [
"0.6704823",
"0.6510531",
"0.645278",
"0.628701",
"0.62861186",
"0.6237559",
"0.62196165",
"0.62146074",
"0.6199167",
"0.61886555",
"0.6157115",
"0.61388993",
"0.61285925",
"0.6072138",
"0.60483444",
"0.6048144",
"0.60269636",
"0.59977216",
"0.59853476",
"0.59843826",
"0.5970... | 0.69037545 | 0 |
Open mass delete user dialog. | function openMassDeleteUserDialog(id, name) {
$('#dialog').dialog({
width: '30%',
modal: true,
show: 'fade',
hide: 'fade',
resizable: false,
position: {
my: "center",
at: "top",
of: $('body')
},
open: function () {
var dialog = $(this),
html = '';
html += '<p>You are about to delete t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function massDelete() {\n\tvar button = $(this),\n\ttype = button.attr('data-type'),\n\tid = button.attr('data-id'),\n\tname = button.attr('data-name'),\n\ttable = $('#searchResults'),\n\tcheckboxes = table.find($('.selection')),\n\tcnt = 0;\n\t// Check if there are selections.\n\tcheckboxes.each(function () {\n\t... | [
"0.7355423",
"0.7221353",
"0.68975693",
"0.6834996",
"0.68321085",
"0.6735713",
"0.6672941",
"0.6550881",
"0.65464425",
"0.65053695",
"0.6485061",
"0.64420456",
"0.64349914",
"0.64317924",
"0.6411101",
"0.63929075",
"0.6356696",
"0.6297372",
"0.6289894",
"0.6257073",
"0.62347... | 0.7548795 | 0 |
Run when confirming deletion of sites from user. | function deleteSitesFromUser() {
var userOID = $(this).attr('data-id'),
checkboxes = $('#searchResults').find($('.selection')),
sites = [];
checkboxes.each(function () {
var checkbox = $(this),
checked = checkbox.prop('checked'),
siteID = checkbox.attr('data-id');
if (checked) {
sites.push(siteID);
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sitesDeletedFromUser(data,sites) {\n\tif (data[\"status\"].indexOf('ERROR') >= 0) {\n\t\t$('#dialogMessage').html('<p>There was an issue deleting the sites.<br />Please try again.</p>');\n\t\t$('#dialogButtons').show();\n\t} else {\n\t\tcancelDialog();\n\t\tif (sites.length > 0) {\n\t\t\tfor (var i = 0; i... | [
"0.7681379",
"0.65644443",
"0.65572983",
"0.64049363",
"0.6376155",
"0.6344592",
"0.63153344",
"0.6300487",
"0.6298837",
"0.62071604",
"0.6199312",
"0.6189198",
"0.61005485",
"0.6088348",
"0.6078985",
"0.6078985",
"0.6074268",
"0.6067133",
"0.6062288",
"0.60488987",
"0.603136... | 0.674044 | 1 |
Run when deleting sites from user is finished. | function sitesDeletedFromUser(data,sites) {
if (data["status"].indexOf('ERROR') >= 0) {
$('#dialogMessage').html('<p>There was an issue deleting the sites.<br />Please try again.</p>');
$('#dialogButtons').show();
} else {
cancelDialog();
if (sites.length > 0) {
for (var i = 0; i < sites.length; i++) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deleteSitesFromUser() {\n\tvar userOID = $(this).attr('data-id'),\n\tcheckboxes = $('#searchResults').find($('.selection')),\n\tsites = [];\n\tcheckboxes.each(function () {\n\t\tvar checkbox = $(this),\n\t\tchecked = checkbox.prop('checked'),\n\t\tsiteID = checkbox.attr('data-id');\n\t\tif (checked) {\n\t... | [
"0.6558405",
"0.6332261",
"0.6191353",
"0.6178341",
"0.60020363",
"0.5940493",
"0.59216416",
"0.5871288",
"0.58687043",
"0.5837806",
"0.5817404",
"0.5798375",
"0.57698876",
"0.57360613",
"0.57283574",
"0.5688759",
"0.5688445",
"0.56746787",
"0.5669191",
"0.56646657",
"0.56358... | 0.70204985 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.