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
Helper to get a typed SimpleDbStore from a transaction.
function getStore(txn, store) { if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__["b" /* SimpleDbTransaction */]) { return txn.store(store); } else { return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__["b" /* fail */])('Invalid transaction object provided!'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n ...
[ "0.7466413", "0.74564534", "0.74564534", "0.61653066", "0.61631215", "0.61071676", "0.6064398", "0.60449195", "0.59897435", "0.59415454", "0.59046936", "0.59046936", "0.58402526", "0.58193004", "0.57512337", "0.5748315", "0.5721725", "0.568615", "0.56702965", "0.5669603", "0....
0.7461985
1
Helper to get a typed SimpleDbStore from a transaction.
function getStore(txn, store) { if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__["b" /* SimpleDbTransaction */]) { return txn.store(store); } else { return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__["b" /* fail */])('Invalid transaction object provided!'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n ...
[ "0.7461985", "0.74564534", "0.74564534", "0.61653066", "0.61631215", "0.61071676", "0.6064398", "0.60449195", "0.59897435", "0.59415454", "0.59046936", "0.59046936", "0.58402526", "0.58193004", "0.57512337", "0.5748315", "0.5721725", "0.568615", "0.56702965", "0.5669603", "0....
0.7466413
0
Builds a CredentialsProvider depending on the type of the credentials passed in.
function makeCredentialsProvider(credentials) { if (!credentials) { return new EmptyCredentialsProvider(); } switch (credentials.type) { case 'gapi': return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0'); case 'provider': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'google-auth':\n return new GoogleCredentialsProvider(credentials.client);\n case 'gapi':\n return new FirstPar...
[ "0.77927476", "0.7311586", "0.72677827", "0.51712173", "0.5105372", "0.50962424", "0.50297946", "0.49579585", "0.49048534", "0.4626985", "0.46207523", "0.46207523", "0.46015263", "0.45626885", "0.45359737", "0.45220223", "0.45140168", "0.44948643", "0.44676694", "0.44676694", ...
0.75386995
1
Returns true if obj is an object and contains at least one of the specified methods.
function implementsAnyMethods(obj, methods) { if (typeof obj !== 'object' || obj === null) { return false; } var object = obj; for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) { var method = methods_1[_i]; if (method in object && typeof object[method] === 'funct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n var object = obj;\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in object && typeof object[method] === 'functio...
[ "0.8035468", "0.80102223", "0.80102223", "0.80102223", "0.80102223", "0.80102223", "0.80102223", "0.80102223", "0.80102223", "0.80102223", "0.80040514", "0.80040514", "0.80040514", "0.80040514", "0.80040514", "0.80040514", "0.80040514", "0.80040514", "0.80040514", "0.80040514",...
0.8044386
1
Wraps fromDotSeparatedString with an error message about the method that was thrown.
function fieldPathFromDotSeparatedString(methodName, path) { try { return Object(__WEBPACK_IMPORTED_MODULE_12__field_path__["b" /* fromDotSeparatedString */])(path)._internalPath; } catch (e) { var message = errorMessage(e); throw new __WEBPACK_IMPORTED_MODULE_5__util_error__["b" /* ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "testError (tokens, messageRe) {\n parser.init(tokens);\n expect(parseFn).toThrow(messageRe);\n }", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return field_path_1.fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n ...
[ "0.5440737", "0.5426141", "0.5406805", "0.5406769", "0.53880477", "0.5369378", "0.5368322", "0.53276235", "0.5233668", "0.5225455", "0.5180997", "0.51547396", "0.51244354", "0.50927156", "0.50897765", "0.50732106", "0.5048158", "0.50236034", "0.50236034", "0.5018306", "0.5012...
0.5539112
0
var pool = new JedisPool(new JedisPoolConfig(), "localhost"); public JedisPool(org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig, String host, int port, int timeout, String password, int database) Create a new Redis connection
function Redis(config) { config = config || {}; config = decaf.extend({ host : 'localhost', port : 6379, timeout : 0, db : 0, password: '' }, config); var key = config.host + '-' + config.port + '-' + config.db; if (!pools[key]) { // pool...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getConnection() {\n\n return pool\n}", "function redisDAL(redis_host, redis_port){\n\tvar self = this;\n\tthis.redis_host = redis_host || config.localhost;\n\tthis.redis_port = redis_port || config.redis_default_port;\n\tthis.client = redis.createClient();\n\n\tthis.client.on('error', function (err) {\...
[ "0.69052064", "0.67452556", "0.6738546", "0.64337945", "0.63897276", "0.63726544", "0.62915504", "0.62609315", "0.6226037", "0.62227166", "0.62195355", "0.6188383", "0.6188383", "0.6175959", "0.6153429", "0.6152588", "0.61384505", "0.61031824", "0.609479", "0.6039587", "0.602...
0.8193148
0
function will return the breed of Dog.
getBreed() { return this.breed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Dog(){ this.getBreed = function(){return this.breed;} }", "function selectBreedList() {\n if(pet.animal == \"Dog\") {\n return dogBreedsArray;\n }\n else if(pet.animal == \"Cat\") {\n return catBreedsArray;\n }\n else {\n return null;\n...
[ "0.7367825", "0.7138952", "0.69490296", "0.68682057", "0.6646205", "0.6606252", "0.6549125", "0.6549125", "0.6519471", "0.64934", "0.6470678", "0.6426579", "0.6410297", "0.6404918", "0.6364398", "0.6330328", "0.6291338", "0.6261016", "0.6242202", "0.62058353", "0.61528665", ...
0.7683888
0
Gets a new donate token every time the user changes donation value
function setDonateAmount() { var donate = jQuery('#donate_val').val(); if (!donate) { alert('Invalid Donation Amount'); return; } console.log('setDonateAmount', donate); getDonationTokenAjaxCall(donate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDonationTokenAjaxCall(donate) {\n jQuery.getJSON(transact_params.ajaxurl, { 'action' : 'get_donation_token', 'post_id' : transact_params.post_id, 'price' : donate, 'affiliate_id' : transact_params.affiliate_id })\n .success(function(data) {\n console.log('got donate_token: '+ data....
[ "0.6437208", "0.5932149", "0.5726949", "0.565112", "0.5613529", "0.5519747", "0.54098654", "0.5392593", "0.5330107", "0.5312022", "0.5274425", "0.5269785", "0.5268935", "0.52075183", "0.52036375", "0.51820666", "0.5161045", "0.51492643", "0.5146213", "0.5135164", "0.5133735",...
0.6352714
1
AJAX call responsible of donation token
function getDonationTokenAjaxCall(donate) { jQuery.getJSON(transact_params.ajaxurl, { 'action' : 'get_donation_token', 'post_id' : transact_params.post_id, 'price' : donate, 'affiliate_id' : transact_params.affiliate_id }) .success(function(data) { console.log('got donate_token: '+ data.token); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BuyToken()\n{\n var token = document.getElementById(\"token\");\n var nbToken = token.value;\n\n var xmlhttp = new XMLHttpRequest();\n\n xmlhttp.open(\"POST\", \"/Client/AddToken\", true);\n xmlhttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xmlhttp.send...
[ "0.70403206", "0.6979793", "0.68099225", "0.67904", "0.678297", "0.65540177", "0.65347767", "0.64988947", "0.6492956", "0.6477151", "0.64608127", "0.63947916", "0.63323855", "0.63270664", "0.6283938", "0.62831694", "0.6277263", "0.62534714", "0.6230539", "0.61947453", "0.6171...
0.7951411
0
onclick for purchase button Will set up purchase token on transact and get the callback
function doPurchase() { console.log('doPurchase'); console.log('Setting Purchase token'); transactApi.setToken(purchase_token); // Call authorize() which will load the popup, // passing in callback function (PurchasePopUpClosed) transactApi.authorize(PurchasePopUpClosed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doSubscription() {\n console.log('doSubscription');\n console.log('Setting Subscription token');\n console.log(subscribe_token);\n transactApi.setToken(subscribe_token);\n // Call authorize() which will load the popup,\n // passing in callback function (PurchasePopUpClosed)\n transact...
[ "0.7349844", "0.6790341", "0.67254275", "0.6655908", "0.65217215", "0.6480104", "0.6454755", "0.640757", "0.637125", "0.6324518", "0.62793607", "0.6243292", "0.6192667", "0.61426693", "0.61377347", "0.60654086", "0.60602975", "0.60528797", "0.6006423", "0.60030323", "0.599434...
0.8578365
0
onclick for purchase button Will set up subscription token on transact and get the callback
function doSubscription() { console.log('doSubscription'); console.log('Setting Subscription token'); console.log(subscribe_token); transactApi.setToken(subscribe_token); // Call authorize() which will load the popup, // passing in callback function (PurchasePopUpClosed) transactApi.authoriz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPurchase() {\n console.log('doPurchase');\n console.log('Setting Purchase token');\n transactApi.setToken(purchase_token);\n // Call authorize() which will load the popup,\n // passing in callback function (PurchasePopUpClosed)\n transactApi.authorize(PurchasePopUpClosed);\n}", "asyn...
[ "0.8265928", "0.6615134", "0.65272295", "0.6526652", "0.6340519", "0.6285703", "0.6283365", "0.6281036", "0.62245363", "0.6218707", "0.6144166", "0.61223215", "0.60354227", "0.6030058", "0.6028384", "0.6003464", "0.5992499", "0.59551495", "0.5947597", "0.5930011", "0.591619",...
0.8323134
0
/ Reply button / Save draft
function initSaveDraft() { $form.find('[aria-click="save-draft"]').on('click', function () { $.ajax({ url: '/mail_boxes/send_mail', method: 'POST', data: $form.serialize() + '&draft', dataType: 'JSON' }).done(function (data) { if (data.status == 0) { alert('OK') } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveDraft() {\n showNotification('The draft is saved.');\n draftIsSaved = true;\n}", "function saveDraft() \n{\n RMPApplication.debug(\"begin saveDraft\");\n c_debug(debug.process_btn, \"=> saveDraft\");\n\n\tid_state.setValue(\"draft\");\n\t// validate data before continuing the process or savi...
[ "0.7549081", "0.6921197", "0.6814674", "0.67231554", "0.66940343", "0.6511957", "0.6364939", "0.6332291", "0.6329842", "0.62675756", "0.6239903", "0.622506", "0.6180385", "0.6129767", "0.61131436", "0.60758", "0.6072211", "0.6067309", "0.60456616", "0.6037002", "0.6030626", ...
0.7114952
1
group all way by road name
function groupRoadWay(roadsInfos,waysInfos){ var groupedWaysInfos = {}; for(var i = 0; i < waysInfos.features.length; i++){ pushWayInfo(groupedWaysInfos,waysInfos.features[i]); } return groupedWaysInfos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupBy (xs, key) {\n return xs.reduce(function (rv, x) {\n let lst = (rv[x[key]] = rv[x[key]] || [])\n // lst.push(x[\"Waypoint Longitude\"]); lst.push(x[\"Waypoint Latitude\"]);\n lst.push([x[\"Waypoint Longitude\"], x[\"Waypoint Latitude\"]]);\n\n return rv;\n }, {});\...
[ "0.6173592", "0.5577859", "0.5537015", "0.5444763", "0.5442385", "0.53706074", "0.52863955", "0.5257436", "0.5106823", "0.5024431", "0.5008403", "0.4995343", "0.4928866", "0.48958716", "0.48413825", "0.48317227", "0.4830576", "0.48240662", "0.48172355", "0.48096937", "0.47798...
0.7514513
0
update the bounds when the body is modified
onBodyUpdate() { this.updateBounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateBounds() {\n console.log(\"updating bounds\");\n\n var bounds = getBounds(people);\n\n map.fitBounds(bounds);\n\n console.log(\"finished fitting bounds\");\n}", "updateBB() {\n this.lastWorldBB = this.worldBB;\n this.worldBB = this.makeDefaultBoundingBox();\n }", "fu...
[ "0.73017585", "0.72563034", "0.7142124", "0.7139824", "0.7073517", "0.6952636", "0.68980074", "0.68917674", "0.6877168", "0.6820332", "0.67524624", "0.6680504", "0.6568504", "0.65445334", "0.65066296", "0.65021694", "0.6478223", "0.6422115", "0.6387181", "0.633659", "0.633659...
0.86653817
0
get window scrollbar width
function scrollbarWidth() { return window.innerWidth - document.body.clientWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnScrollbarWidth() {\n let scrollbarWidth = innerWindowWidth() - doc.querySelector('html').clientWidth;\n \n return scrollbarWidth;\n}", "function getBrowserScrollBarWidth() {\n\tvar innerElement = new Element('p', {styles: {width:'100%', height:200}});\n\tvar outerElement = new Element('di...
[ "0.84600776", "0.79575616", "0.772814", "0.772814", "0.77017033", "0.7695363", "0.7695363", "0.7695363", "0.7645927", "0.76197517", "0.75847286", "0.75729406", "0.752814", "0.7514027", "0.74800354", "0.74800354", "0.74800354", "0.74800354", "0.74796116", "0.74796116", "0.7477...
0.8514109
0
Disabling different components for step 2.
disableStep2(type) { var result = this.state.student <= 2; switch (type) { case 'text': return result ? "true" : null; break; case 'btn': default: return result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deactivateSteps() {\n const steps = this.getSteps();\n steps.forEach(step => {\n step.style.display = 'none';\n });\n }", "function verifManagerDisable(){\n if((dataTagToJsonArray[0].end_step_id == -1) && (dataTagToJsonArray[0].curr_step_id == 10)){\n $('#blk-verif').hide()...
[ "0.7113968", "0.6697816", "0.6492415", "0.6492415", "0.6456575", "0.64512753", "0.6448992", "0.64117044", "0.6410692", "0.64063275", "0.64063275", "0.64063275", "0.64063275", "0.64063275", "0.64063275", "0.64063275", "0.64063275", "0.64063275", "0.63783246", "0.6372222", "0.6...
0.6758317
1
Gets reports from the API based on a pagination.
async getReports({ commit }, { limit, page }) { let offset = limit * (page - 1); let response = await reportAPI.getReports({ limit, offset }); if (response.status === 200 && response.data.length > 0) { commit('set_reports', { reports: response.data }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function get() {\n try {\n // const res = await client.getPayAutherizations({customer: '123'})\n // // const res = await client.get({ from: \"2022-01-02\", to: \"2022-05-01\" });\n // // console.log(\"GOOD\", res);\n // // const nextpage = await res.nextPage();\n // // await res.delete();\n ...
[ "0.6367785", "0.6360566", "0.63588077", "0.6356192", "0.6303543", "0.6299006", "0.62100834", "0.615036", "0.61453855", "0.60777664", "0.60068494", "0.59231967", "0.589782", "0.58966213", "0.5873166", "0.5852428", "0.57962656", "0.5793027", "0.5770404", "0.5747935", "0.5716342...
0.7584926
0
Gets the total report count from the API.
async getReportCount({ commit }) { let response = await reportAPI.getReportCount(); if (response.status === 200) { commit('set_report_count', { reportCount: response.data.count }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTotalCount(data) {\n return parseInt(data['values'][0]['totalCount']);\n }", "function ProbeTotalCountAPIResource($resource, JAVA_API_URL) {\n\t\treturn $resource(JAVA_API_URL + 'probe/getObjectCount', {}, {\n\t\t\t'getObjectCount': { method: 'JSONP' } \n\t\t});\n\t}", "function GxdIndexTotalCo...
[ "0.6903212", "0.6791953", "0.6704839", "0.6641592", "0.65640503", "0.6515549", "0.64715564", "0.64600056", "0.6360641", "0.6360462", "0.6301105", "0.6230195", "0.6157843", "0.6122215", "0.6113078", "0.60565996", "0.60357434", "0.593187", "0.5921605", "0.59076685", "0.590566",...
0.6918494
0
for CTCP VERSION string, semirequired by some IRC networks, e.g. freenode
static get version() { return `SphereIRC ${version} / ${Sphere.Engine}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strToSemver(versionStr) {\n let semver = versionStr.toString().split('.').map(x => +x);\n if (semver.length !== 1 && semver.length !== 3) {\n util.debug.log('Malformed current version string. Found:', versionStr);\n return null;\n }\n // If only one component was found, it's the PATC...
[ "0.6100152", "0.5885091", "0.58762467", "0.58398694", "0.5828223", "0.5803619", "0.57999784", "0.5747527", "0.57136375", "0.56811976", "0.5662633", "0.5651724", "0.5640746", "0.5619846", "0.5619846", "0.56167966", "0.5572187", "0.5559203", "0.5526936", "0.5512701", "0.548291"...
0.63349247
0
Change saving throws to npc styled saving throws ('dexterity_save' => 'dex_save')
function npcSave(attr) { if (attr.indexOf("_save") != -1) { attr = attr.replace('ength',''); attr = attr.replace('terity',''); attr = attr.replace('stitution',''); attr = attr.replace('elligence','...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save(){\n \n }", "function onSave(){\n \n\tif (modelCurrentAction == ANNOTATE){\n\t modelUndoClicked = false;\n\t modelSaveDataLoadNext();\n\t}\n\n\tif (modelCurrentAction == BROWSEANNOTATED){\n modelLoadNextAnnotatedAlignment();\n\t}\n \n\n /*\n // if in s...
[ "0.6098368", "0.5719479", "0.5674179", "0.56456745", "0.56096774", "0.56094974", "0.5584697", "0.5493663", "0.5493663", "0.5493663", "0.5484099", "0.54825187", "0.5478253", "0.5459271", "0.5447525", "0.5435682", "0.5407386", "0.5400081", "0.5392196", "0.53818804", "0.53692764...
0.62094396
0
Update stock using patch to update only one property
updateStock(id, qtd) { api.patch(`/${id}`, { quantity: qtd }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function updateProductCurrentQuantity(stock) {\n const product = await Product.update({\n currentQuantity: stock.current_quantity\n }, {\n where: {\n id: stock.productId\n }\n }).then(async (rsp_product) => {\n console.log('#################...
[ "0.66394705", "0.658605", "0.65621924", "0.64094436", "0.6356387", "0.63064927", "0.6286824", "0.62834984", "0.62415075", "0.61516327", "0.60395527", "0.60205734", "0.6018442", "0.59632325", "0.59613323", "0.5959509", "0.59481525", "0.59481525", "0.59481525", "0.5914561", "0....
0.67911273
0
Show the correct logo according to brand property of product
setBrand(brand) { let logo = ''; switch (brand) { case 'Motorola': logo = moto; break; case 'LG': logo = lg; break; case 'Samsung': logo = samsung; break; case 'Lenovo': logo = lenovo; break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "brand(brand, title) {\n if (brand) {\n return <Image style={{ maxWidth: '120px' }} src={`${brand}`} />;\n } else {\n return title;\n }\n }", "function RenderPageBrandingElements() {\n let appName = ApplicationName;\n let html = 'BlocklyProp<br><strong>' + ApplicationName + '</strong>';\...
[ "0.77009475", "0.71602654", "0.67588925", "0.6640565", "0.65179914", "0.6466066", "0.63386476", "0.62363094", "0.6156041", "0.6106511", "0.60747313", "0.6015388", "0.60087657", "0.6004379", "0.598749", "0.5982725", "0.59307724", "0.59040236", "0.58586806", "0.58558637", "0.58...
0.78407454
0
Close order button, but there's no checkout in this project
closeOrder() { // Close order and Go to Checkout console.log('CHECKOUT!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cancelCheckout() {\n const cancelElement = await this.components.cancelButton()\n await cancelElement.click()\n }", "GetCloseButton() {\r\n return cy.get(\"#root > div > div.float-cart__close-btn\");\r\n }", "showCancel () {\n const order = this.order\n const page = this....
[ "0.72150123", "0.6758734", "0.6697128", "0.6669347", "0.66301763", "0.6585443", "0.65457237", "0.64786476", "0.64218086", "0.6403376", "0.6394897", "0.6374486", "0.63551223", "0.62968963", "0.62843704", "0.6276374", "0.62187976", "0.6182794", "0.61723995", "0.61690664", "0.61...
0.78173316
0
Input: name, flight and seat work output What do I wanto this fuction to do? Imputs: name, flight and seat Work a "comfirmation statement" with their name, flight number, seat and that 6 digits Output: a "comfirmation statement" Assumtiom: code external to the funtion prompt the user for their name, flightNumber, and S...
function makeFlightConfirmation(name, flightNumber, seatNumber) { var ticket = name +", you have booked" + flightNumber + "seat" seatNumber + '.' return ticket; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roShamBoInput(){\n \n let userInputInt;\n let userInput = promptUser().toString().toLowerCase();\n \n const randomNum = Math.ceil(Math.random() * 3);\n\n if (userInput === \"rock\") {userInputInt = 1;}\n else if (userInput === \"paper\") {userInputInt = 2;}\n else if (userInput ==...
[ "0.57548296", "0.57500815", "0.57341105", "0.5730545", "0.56874925", "0.56317914", "0.56204444", "0.5594332", "0.5591276", "0.5574799", "0.556978", "0.55512446", "0.55502355", "0.5533523", "0.5523543", "0.54794365", "0.5474375", "0.5459703", "0.5456078", "0.54516125", "0.5441...
0.726854
0
javascript gdb wrapper What you need on your system: gdbserver (^7.7.1) gdb (^7.7.1) You MUST add this to your ~/.gdbinit file: set pagination off set nonstop on set targetasync on This sets gdb in nonstop mode (see and allows 'execinterrupt' to actually work!
function gdb(execAdapter) { //---------------------------------------------------------------------------- // // make this an event emitter // //---------------------------------------------------------------------------- var me = this; events.EventEmitter.call(me); Object.setPrototypeOf(gdb.prototyp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startGlobalDebugger(args, item, trans_id) {\n // Initialize the target and create asynchronous connection and unique transaction ID\n let self = this;\n let t = this.pgBrowser.tree,\n i = item || t.selected(),\n d = i ? t.itemData(i) : undefined,\n tree_data = this.pgBrowser.tree.translateT...
[ "0.56002957", "0.55004936", "0.54876435", "0.53404963", "0.5316078", "0.5316078", "0.5224464", "0.519017", "0.51577055", "0.5109606", "0.5041189", "0.5039942", "0.50142217", "0.50105995", "0.50105995", "0.49333116", "0.4904275", "0.4903231", "0.4902229", "0.48694775", "0.4840...
0.7023358
0
ADVANCED USE: send any one command to gdb
function sendCommand(command, args, callback) { if (debuggerState == 'idle') { callback({ error: 'You cannot issue a command if you are not debugging' }); return; } command(command, args, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeMain(command) {\n debuggerClient.evaluate(command);\n}", "function gdb(execAdapter) {\n\n //----------------------------------------------------------------------------\n // \n // make this an event emitter\n // \n //--------------------------------------------------------------------------...
[ "0.5690571", "0.558664", "0.53059727", "0.5255787", "0.5250103", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0.521363", "0....
0.57021284
0
loads the debug session for the specified program
function load(programName, programArgs, callback) { // debug one program at a time! if (debuggerState == 'active') { callback({ error: 'Already debugging a program' }); return; } debuggerState = 'active'; avail = false; gdbExecInstance = new gdbExec(execAdapter, { programN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debugFunctional() {\n background.mixpanelTrack('CE-Selenium debug and edit');\n webextension_polyfill_ts_1.browser.windows\n .getCurrent()\n .then(function (currentWindows) {\n webextension_polyfill_ts_1.browser.runtime.sendMessage({ command: 'setReplayWindow...
[ "0.55393755", "0.54963183", "0.54924744", "0.5380617", "0.51982415", "0.51928276", "0.5179487", "0.50340426", "0.501926", "0.5014398", "0.49988967", "0.49988967", "0.4995624", "0.49814564", "0.49720758", "0.49584487", "0.49306276", "0.4923978", "0.4911061", "0.48852518", "0.4...
0.6248589
0
point: Bound(name, collides, offset_x, offset_y) circ: Bound(name, collides, offset_x, offset_y, radius) rect: Bound(name, collides, offset_x, offset_y, width, height)
constructor(name, collides, offset_x, offset_y, width_or_radius, height) { this.name = name; this.collides = collides; this.colliding = []; this.offset = { x: offset_x, y: offset_y, }; if (!width_or_radius) { this.type = 'point'; } else if (!height) { this.type = 'circle'; this.radius = w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collide() {\r\n for(currentWorld.p of currentWorld.points) {\r\n let p = currentWorld.p;\r\n // Continues if the point recieved is outside of a \"bounding box\"\r\n if (p.x + p.radius < this.x - this.bounds ||\r\n p.x - p.radius > this.x + this.bounds ||\r\n ...
[ "0.6374399", "0.6342348", "0.6208351", "0.61117053", "0.6102506", "0.61003196", "0.6088303", "0.5912413", "0.5866718", "0.586371", "0.5836007", "0.5821782", "0.5813864", "0.5795671", "0.5795421", "0.579406", "0.57773715", "0.5768792", "0.57659864", "0.57609594", "0.57357913",...
0.6561628
0
fire cb once this frame if delta is greater than remaining
check(delta) { if (this.stopped) { return; } if (delta > this.remaining) { if (this.cb && 'function' === typeof this.cb) { this.cb(); } } if (this.stopped) { return; } this.remaining -= delta; this.percent.remaining = this.remaining / this.duration; this.percent.complete = 1 - this.per...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "multi_check(delta) {\n\t\twhile (delta > this.remaining) {\n\t\t\tif (this.stopped) {\n\t\t\t\tconsole.log('timer stopped during delta while loop, aborting multi_check');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta -= this.remaining;\n\t\t\tif (this.cb && 'function' === typeof this.cb) {\n\t\t\t\tthis.cb(this);\n\t\t\t...
[ "0.61324424", "0.60190576", "0.59991133", "0.59991133", "0.59949034", "0.589621", "0.5895141", "0.58427674", "0.57281536", "0.57114124", "0.56588525", "0.56451386", "0.55595046", "0.5545961", "0.55394214", "0.5535608", "0.55281484", "0.5500657", "0.5497041", "0.5496773", "0.5...
0.728353
0
fire cb for each time that duration would've elapsed during delta time
multi_check(delta) { while (delta > this.remaining) { if (this.stopped) { console.log('timer stopped during delta while loop, aborting multi_check'); return; } delta -= this.remaining; if (this.cb && 'function' === typeof this.cb) { this.cb(this); } if (0 == this.duration) { console....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "check(delta) {\n\t\tif (this.stopped) {\n\t\t\treturn;\n\t\t}\n\t\tif (delta > this.remaining) {\n\t\t\tif (this.cb && 'function' === typeof this.cb) {\n\t\t\t\tthis.cb();\n\t\t\t}\n\t\t}\n\t\tif (this.stopped) {\n\t\t\treturn;\n\t\t}\n\t\tthis.remaining -= delta;\n\t\tthis.percent.remaining = this.remaining / thi...
[ "0.6384993", "0.6380711", "0.62844485", "0.6168859", "0.6130799", "0.61270696", "0.6111892", "0.6037756", "0.5998324", "0.5954438", "0.5913571", "0.58846235", "0.5776782", "0.57395285", "0.5738783", "0.5710932", "0.57084566", "0.5689542", "0.5684372", "0.5684185", "0.56533027...
0.670168
0
Sprite(image, origin_x, origin_y) Sprite(spritesheet, origin_x, origin_y, sx, sy, width, height)
constructor(image_or_spritesheet, origin_x, origin_y, sx, sy, width, height) { super(); this.image; this.width; this.height; this.set_image(image_or_spritesheet, sx, sy, width, height); this.origin = { x: origin_x || 0, y: origin_y || 0, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sprite(image, sx, sy, sWidth, sHeight, width, height, scale) {\n this.image = image;\n\n this.sx = sx;\n this.sy = sy;\n this.sWidth = sWidth;\n this.sHeight = sHeight;\n this.width = width;\n this.height = height;\n this.scale = scale || 1;\n}", "function Sprite(img, x, y, width...
[ "0.8097009", "0.7795168", "0.7415087", "0.74116063", "0.7303792", "0.727369", "0.717603", "0.7116585", "0.7093217", "0.7053475", "0.7048943", "0.7041798", "0.6976662", "0.69746083", "0.6955311", "0.69454664", "0.68917197", "0.6890734", "0.68788636", "0.6878843", "0.68782294",...
0.86246896
0
Delay and Duration are in milliseconds Add height transition to existing transitions.
addHeightTransition(parsedTransition, heightTransition) { let transitions = parsedTransition.map(t => { return `${t.name} ${t.duration}ms ${t.timingFunction} ${t.delay}ms` }) this.$el.style.transition = [...transitions, heightTransition].join(',') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fAnimateHeight (elem, eHeight) {\n tMx.to (elem, animTym, {css: {height: eHeight}, ease: easePower});\n }", "slideDown(projectBodyClone){\n const height = projectBodyClone.offsetHeight\n projectBodyClone.style.height = \"0px\"\n projectBodyClone.style.transition = \"height 0.5s\...
[ "0.7172444", "0.642505", "0.62954396", "0.6189797", "0.61497545", "0.6084201", "0.59121627", "0.57608557", "0.57533747", "0.57266724", "0.57018787", "0.56969285", "0.5684727", "0.56768167", "0.56710416", "0.56294596", "0.55943584", "0.55939853", "0.5560217", "0.55478615", "0....
0.7407895
0
simple check if market is open. Only checks if outside 9301600 and if on weekends
function isMarketOpen() { //console.log('called twice?'); //13:30 UTC = 9:30 EST //20:00 UTC = 16:00 EST var openHour = 13; var openMin = 30; var closeHour = 20; var satDay = 6; var sunDay = 0; var date = new Date(); var hour = date.getUTCMinutes() == 0 ? 0 : 1 var closes = ''; var textAppend = document.cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCurrentlyOpen(times) {\n var date = new Date();\n var advMinutes = (date.getMinutes() < 10 ? '0' : '') + date.getMinutes();\n var currentTime = date.getHours() + '' + (advMinutes);\n\n // 9:00 AM to 4:00 PM --> [900, (400 + 1200)]\n // Add 12 hours for PM times; if current time is in between MIN ...
[ "0.6861893", "0.6403689", "0.63461095", "0.6041705", "0.6021708", "0.59546876", "0.58846694", "0.5870434", "0.58576554", "0.5849635", "0.5806689", "0.5786896", "0.5778323", "0.57591754", "0.57304585", "0.56809753", "0.5670607", "0.5661001", "0.5655706", "0.56380373", "0.56060...
0.7314274
0
Returns true if the text is valid for our purposes (it is a string, and it is not blank). We check text.trim() to screen out blank text that has characters, such as " " or "\n\n" Check isString && text.trim() in that order so we don't try to call .trim() on nonstrings. (The expression will short circuit if `isString` i...
function validateText(text) { const isString = typeof text === "string" || text instanceof String; return !!(isString && text.trim()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValid(text) {\n return text !== \"\";\n}", "function isString(text) {\n return typeof text === \"string\";\n }", "function isString(text) {\n return typeof text === \"string\";\n }", "function checkString(str){\n if(typeof str !== 'string' || ( typeof str === 'string'...
[ "0.74595976", "0.7079886", "0.70783836", "0.6801444", "0.6603304", "0.6469206", "0.6357685", "0.63518476", "0.628416", "0.6252857", "0.6209028", "0.61950475", "0.61864185", "0.61813563", "0.6180524", "0.6134992", "0.6117011", "0.61109847", "0.6099148", "0.6087169", "0.6079173...
0.80929726
0
1. try to log user in standard NB account using their details if success, we can get their NBId from the href from 'Your account'
function tryToLoginToNB() { console.log('tryToLoginToNB function called'); exec(casperCmd1 , {}, function (e, stdout, stderr) { if (e) { return res.send({'error': 'summoning failed to log you in'}); //return res.send({'e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LoginPageLoad() {\r\n apiServices.User.getOrCreate(\"asdas3\", \"n.s@gmail.com\", \"AMITAB\", \"Bachhan\").then(function (resp2) {\r\n console.log(resp2);\r\n console.log(JSON.stringify(resp2));\r\n $('#accNo').text(resp2.user.AccountNumber);\r\n });\r\n}", "function login() {...
[ "0.684078", "0.60941875", "0.60366005", "0.6009948", "0.5967663", "0.5965219", "0.59566504", "0.5903283", "0.5894226", "0.58895797", "0.58302516", "0.5801732", "0.5793237", "0.5793237", "0.5791246", "0.57844454", "0.5777982", "0.57746094", "0.5773216", "0.5772696", "0.5772329...
0.76654947
0
Claim a taskId/runId, returns 'conflict' if already claimed, and 'tasknotfound' or 'tasknotfound' if not found. If claim works out this returns a claim structure.
async claimTask(taskId, runId, workerGroup, workerId, task = null, hintId = null) { // Load task, if not given if (!task) { task = await this._Task.load({taskId}, true); if (!task) { return 'task-not-found'; } } // Set takenUntil to now + claimTimeout let takenUntil = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tryClaimJob(amount, query) {\n let job = this.findJob(query);\n\n if(job) {\n if(this.roomMgr.jobManager.claim(this.creep, job, amount)) {\n return job.id;\n }\n }\n }", "async function completeTask(taskId){\n\tif (typeof taskId !== 'string')\n\t\t//If...
[ "0.51587605", "0.48050994", "0.47381008", "0.46979418", "0.4680369", "0.46555185", "0.4638296", "0.46194646", "0.45951235", "0.45492858", "0.45276788", "0.44886005", "0.44578362", "0.43732387", "0.43302488", "0.43194795", "0.42990193", "0.42029503", "0.4166859", "0.41599825", ...
0.7568886
0
chama a API para cadastrar o email e avisa no callback
function chamaAPI(email, callback) { // FAKE finge que chama uma API // (você pode trocar por uma chamada Ajax a sua API se quiser) console.log('Email cadatrado com sucesso na newsletter', email); setTimeout(callback, 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function composeMail(e) { \n e.preventDefault();\n\n const recipients = document.getElementById('compose-recipients').value;\n const subject = document.getElementById('compose-subject').value;\n const body = document.getElementById('compose-body').value;\n\n fetch('/emails', { \n method: 'POST',\n body:...
[ "0.65766823", "0.65747756", "0.6488869", "0.6441678", "0.64302534", "0.63618386", "0.63040584", "0.62928945", "0.6248748", "0.62287235", "0.6194452", "0.61378884", "0.612403", "0.61231637", "0.61191064", "0.61188966", "0.6115275", "0.61084646", "0.6107473", "0.60958356", "0.6...
0.7451419
0
_Client_ handles all our stuff, but really shouldn't be directly instantiated unless you know what you're doing (i.e. have a cached OAUTH token from a previous session, and you know it's good).
function Client ( // #### Parameters // `oauth_token` _string_: OAUTH token provided by `Client.authenticate` oauth_token, // `options` _object_: options map in the format of `Client.defaults` // (other options are ignored) options ) { this.oauth_token = oauth_token; this.options = _.merge({}, Cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(client) {\r\n this.client = client;\r\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client...
[ "0.70619273", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.7025635", "0.6979218", "0.681298", "0.6808548", "0.66405606", "0.6628841", "0.6591986", "0.65587604", ...
0.73023105
0
The function should check if name is an actual contact's firstName and the given property (prop) is a property of that contact. If both are true, then return the "value" of that property. If name does not correspond to any contacts then return "No such contact". If prop does not correspond to any valid properties of a ...
function lookUpProfile(name, prop){ //again very complicated for (let x = 0; x < contacts.length; x++) { if (contacts[x].firstName === name) { if (contacts[x].hasOwnProperty(prop)) { return contacts[x][prop]; } else { return "No such property"; } } } return "No such...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstName(contact)\n {\n return contact.firstName.includes(\"Swaraj\")\n }", "function getByName( properties, name ) {\n for (let i = 0; i < properties.length; i++) {\n if (properties[ i ].name === name)\n return properties[ i ];\n }\n throw new ModelError( 'noProperty', prop...
[ "0.6086996", "0.5779332", "0.56428546", "0.55757624", "0.5501958", "0.54924333", "0.54921377", "0.5485966", "0.54271644", "0.53903085", "0.53412133", "0.53412133", "0.5317143", "0.53111726", "0.5283566", "0.5271129", "0.5270694", "0.5255632", "0.5228684", "0.5228539", "0.5228...
0.7939659
0
Attach Buttons (Previous, Next) into panel that lets user navigate through fire charts.
attachButtonHandlers() { let parent = this; let btnTitles = ["Area Burned", "Structures", "Cost"] let prevBtn = d3.select("#vis-1-prev") .on("click", function(event) { parent.currentIndex -= 1; //Change Info display: parent.currentPage ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupButtons() {\r\n d3.select('#toolbar')\r\n .selectAll('.slider')\r\n .on('click', function () {\r\n // Remove active class from all buttons\r\n d3.selectAll('.slider').classed('active', false);\r\n // Find the button just clicked\r\n var button = d3.select(this);\r\n\r\n ...
[ "0.6233841", "0.6220289", "0.6203406", "0.59996074", "0.5947223", "0.5932392", "0.5847712", "0.58288443", "0.5814372", "0.58004665", "0.5790747", "0.57883567", "0.57868606", "0.57648104", "0.57644093", "0.5756082", "0.5748127", "0.57349855", "0.5729036", "0.5721191", "0.57172...
0.691805
0
Function to attach Dropdown filter by causes
attachDropdownHandlers() { let parent = this; let dropdownSelect = d3.select("select#cause-dropdown") .on("change", function(event) { let causeTag = this.value; if (causeTag.toLowerCase() === "all") parent.showingData = [...parent.datapoint...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterOptions(event) {\n const searchText = event.target.value.toLowerCase();\n \n options.forEach(option => {\n const value = option.textContent.toLowerCase();\n const display = value.indexOf(searchText) === -1 ? 'none' : 'block';\n ...
[ "0.65859795", "0.6490885", "0.64499736", "0.6428353", "0.63391006", "0.6271946", "0.62648356", "0.6249186", "0.62296003", "0.62293875", "0.6192364", "0.6182569", "0.61246336", "0.6102096", "0.60825014", "0.6008931", "0.59829885", "0.597047", "0.5965153", "0.5953611", "0.59454...
0.66760844
0
helper function: Unhighlight bars
unhighlightAllBars() { let allGSelect = d3.selectAll(".barGroup").data(this.showingData); allGSelect.selectAll(".barRect").data(d => [d]) .classed("stroke-bold", false) .style("fill", d => `rgb(${this.colorScaleRed(d.properties[this.currentPage])}, 0,0)`); allGSelect.sele...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unhighlight(i) {\r\n document.getElementById('bar' + i).style.backgroundColor = '#ff478d'; //normal color (pink)\r\n}", "function deHighlightBar(bar, onComplete) {\n\t\tvar listItem = bar.parent();\n\t\tlistItem.removeClass(\"highlight\");\n\t \t$(\".bar-graph-info .content\").fadeOut(TRANSITION_FADE...
[ "0.8126219", "0.7500679", "0.7430884", "0.7265119", "0.7170809", "0.71057326", "0.70840555", "0.7018117", "0.70153403", "0.6886445", "0.6866437", "0.6790777", "0.6766784", "0.6748354", "0.674728", "0.6742218", "0.67356455", "0.6729265", "0.67240745", "0.6713771", "0.67025465"...
0.8101973
1
display row input product order
function rowProductOrder() { return "<tr>" + "<td>" + "<input type='hidden' name='quantity[]' value=''>" + "<input type='hidden' name='products_id[]' value=''>" + "</td>" + "</tr>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayOrder(){\n // setOrderHeader();\n // setOrderHeader2();\n //setOrderBody();\n showHistoric();\n //addOrderValue(Value);\n // Value.forEach(addOrderHeader);\n }", "function orderedProducts(){\r\n\tvar value = document.getElementById(\"quantity\").value;\r\n\tdocument.getElem...
[ "0.67434937", "0.6517318", "0.631949", "0.6261465", "0.62238026", "0.6197669", "0.61742276", "0.6172597", "0.6166709", "0.6164327", "0.61555314", "0.60952914", "0.60926574", "0.6089266", "0.6069754", "0.605918", "0.605732", "0.6050649", "0.6037077", "0.60338706", "0.6033246",...
0.70853966
0
display row input product info
function rowProductInfo(index, name, quantity) { return "<tr>" + "<td>" + "<span>" + index + "</span>" + "</td>" + "<td>" + "<span>" + name + "</span>" + "</td>" + "<td>" + "<span>" + quantity + "</span>" + "</td>" + "</tr>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayItem() {\n\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\tvar rows = [];\n\t\tdbResults = res;\n\t\tfor (i = 0; i < res.length; i++) {\n\t\t\trows.push([res[i].itemID, res[i].productName, res[i].price, res[i].stockQuantity]);\n\t\t}\n\n\t\tvar t2 = Table(header,rows,\n\t\t{...
[ "0.67891765", "0.6694751", "0.6646215", "0.66444135", "0.6638321", "0.6610031", "0.65101355", "0.64884317", "0.64391255", "0.64380187", "0.6381384", "0.63486844", "0.63324904", "0.63237596", "0.6313068", "0.6268076", "0.62234056", "0.6216773", "0.62153125", "0.6213281", "0.62...
0.6830213
0
message swal create success
function swalCreateSuccess() { return Swal.fire( 'Thành công!', 'Thêm mới thành công!', 'success' ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alertAddSucess() {\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle : \"\",\n\t\t\t\t\t\t\ttext : \"Add successfully.\",\n\t\t\t\t\t\t\ttype : \"success\",\n\t\t\t\t\t\t\ttimer : 2000,\n\t\t\t\t\t\t\tshowConfirmButton : false\n\t\t\t\t\t\t});\n\t\t\t\t\t}", "function sended() {\r\n swal( {\r\n title: \"Enviad...
[ "0.77660656", "0.7537803", "0.7429979", "0.73690534", "0.7271654", "0.70294935", "0.69594455", "0.6959045", "0.6957091", "0.69034916", "0.6898465", "0.6852888", "0.6852089", "0.68515056", "0.6841884", "0.68359804", "0.683318", "0.6824654", "0.6811061", "0.6805419", "0.6763696...
0.8585464
0
message swal update success
function swalUpdateSuccess() { return Swal.fire( 'Thành công!', 'Cập nhật thành công!', 'success' ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_unsuccess_info(data){\n if(!data)\n data = \" The Update couldn't be successful!!\";\n swal(\"Update Process Failed !!\", data, 'error');\n}", "function update_success_info(data){\n if(!data)\n data = \" the data\";\n swal({\n title:'Successfully Updated!',\n ...
[ "0.82056653", "0.8092938", "0.8006721", "0.77042854", "0.7675316", "0.76273423", "0.7579072", "0.7562444", "0.7436767", "0.73834586", "0.7344071", "0.7283231", "0.7281967", "0.7265322", "0.72261626", "0.72085017", "0.71142596", "0.7096684", "0.70078945", "0.7001254", "0.69739...
0.86807096
0
message swal delete success
function swalDeleteSuccess() { return Swal.fire( 'Thành công!', 'Dữ liệu đã được xóa thành công!', 'success' ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alertDeleteSucess() {\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle : \"\",\n\t\t\t\t\t\t\ttext : \"Delete successfully.\",\n\t\t\t\t\t\t\ttype : \"success\",\n\t\t\t\t\t\t\ttimer : alertDuration,\n\t\t\t\t\t\t\tshowConfirmButton : false\n\t\t\t\t\t\t});\n\t\t\t\t\t}", "function delete_success_info(data){\n ...
[ "0.8640865", "0.8077084", "0.7736654", "0.770076", "0.76934266", "0.76547474", "0.7648741", "0.7625732", "0.75489545", "0.7514585", "0.75010896", "0.7499922", "0.74961394", "0.7468418", "0.74444216", "0.7384634", "0.73718214", "0.73716", "0.7345057", "0.7344985", "0.73432064"...
0.8546152
1
Determine the hex codes for the requested swing mode and send the IR signals to execute it. hexData: hex codes for swing modes from the config file NOTE: This handler is designed to keep the plugin backwards compatible while also allowing for combined fan speed and swing mode hex codes. This handler function is called ...
async setSwingMode (hexData) { const { data, log, state } = this; const currSpeed = state['fanSpeed']; const fanSpeedObj = currSpeed ? data["fanSpeed" + currSpeed] : undefined; // config.swingOn: "on" and config.swingOff: "off" to support combined // speed + swing values if (hexData === "off") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wsData(data,id){\n const fs = require('fs');\n switch(data.type) {\n case \"sendtoPHclient\":\n case \"sendtoPHserver\":\n ph.sendtoPH(data)\n break;\n case \"canvas\":\n\n ph.sendCanvasImage(data.data)\n\n break;\n\n ca...
[ "0.51950175", "0.49405", "0.4572639", "0.4546171", "0.4538871", "0.4520383", "0.45191267", "0.44259766", "0.44213933", "0.44157332", "0.43961853", "0.43851432", "0.4374077", "0.43481496", "0.43461624", "0.43145308", "0.4292425", "0.42888546", "0.42883962", "0.4280106", "0.426...
0.7254787
0
It loads all test. It will trigger when no test is specified in the command
function loadAllTest() { var testPathVar = []; for (var p in conf.test) { var testObj = [p]; conf.test[p].forEach(item => { item.path = conf.endPoint .replace('<type>', p) .replace('<label>', item.label); item.master = p.toLowerCase(); testObj.push(item); }); if (te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerTests() {}", "function startTests() {\n describe('All Tests', function() {\n describe('START', function() {\n runTests([new Test(\n 'Enable test mode', '~`RUN UNIT TESTS`~',\n ['~`UNIT TEST MODE ENABLED`~'])]);\n });\n describe('SpikeyBot', function() {\n describe('M...
[ "0.6082838", "0.6077463", "0.6073622", "0.606656", "0.6043969", "0.5986179", "0.5945781", "0.59324527", "0.5895387", "0.58374774", "0.58245826", "0.5768061", "0.5767756", "0.5766381", "0.57650995", "0.57478386", "0.5744584", "0.5734503", "0.57325256", "0.57275015", "0.5679561...
0.61338234
0
It loads specific tests only.
function loadSpecificTests(testNames) { testArr = testNames.split(',').map(s => s.trim().toLowerCase()); for (var p in conf.test) { var testObj = [p]; let addAll = false; if (testArr.indexOf(p.toLowerCase()) > -1) addAll = true; conf.test[p].forEach(item => { for (var testItem of testArr) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async loadTests () {\n const saved = await fetch('/saved.json');\n this.items = await saved.json();\n this.render();\n }", "function run_tests(tests) {\n var names = [];\n\n for (var name in tests) {\n names.push(name);\n include_js('test/'+ tests[name] + '_test');\n }\n\n windo...
[ "0.6457189", "0.64427304", "0.63490725", "0.63245267", "0.6244703", "0.62278235", "0.619002", "0.6084588", "0.608391", "0.60666746", "0.60174346", "0.5938587", "0.5879792", "0.5860997", "0.5858965", "0.57935035", "0.57151455", "0.5672519", "0.565114", "0.5649436", "0.5613682"...
0.6648505
0
getImage returns image of aircraft having registration number of regNum. If no image available returns avatar image placeholder
async function getImage(regNum) { let URL = `https://api.planespotters.net/pub/photos/reg/${regNum}`; const result = await axios.get(URL); if (result.data.photos.length === 0) return avatar; return result.data.photos[0].thumbnail_large.src; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImage() {\n return image\n}", "function getImage() {\n // Retrieve image file location from specified source\n \n\tnavigator.camera.getPicture(abrirProfFotoSubir, function(message) {\n\t\t\tnavigator.notification.alert('Error al recuperar una imagen',okAlert,'MIA','Cerrar');\n },...
[ "0.6474207", "0.6289091", "0.6130707", "0.603358", "0.6008202", "0.59892845", "0.5979425", "0.5972943", "0.5918502", "0.5911145", "0.59021753", "0.58964837", "0.5883359", "0.5865356", "0.58644253", "0.5839436", "0.5833744", "0.58041817", "0.58040154", "0.5790567", "0.578963",...
0.72793376
0
Regexp of all possible ways to write extensions, for use when parsing. This will be run as a caseinsensitive regexp match. Wide character versions are also provided after each ASCII version. There are three regular expressions here. The first covers RFC 3966 format, where the extension is added using ';ext='. The secon...
function create_extension_pattern(purpose) { // One-character symbols that can be used to indicate an extension. var single_extension_characters = "x\uFF58#\uFF03~\uFF5E"; switch (purpose) { // For parsing, we are slightly more lenient in our interpretation than for matching. Here we // allow "comma" and...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_extension_pattern(purpose) {\n\t// One-character symbols that can be used to indicate an extension.\n\tvar single_extension_characters = 'x\\uFF58#\\uFF03~\\uFF5E';\n\n\tswitch (purpose) {\n\t\t// For parsing, we are slightly more lenient in our interpretation than for matching. Here we\n\t\t// all...
[ "0.66778535", "0.657679", "0.65607905", "0.65607905", "0.65145004", "0.5728492", "0.5631262", "0.5630568", "0.56203544", "0.55672675", "0.5509034", "0.54681337", "0.54047483", "0.53903514", "0.53804344", "0.5299468", "0.5269301", "0.5219861", "0.5107612", "0.5107612", "0.5107...
0.6638285
1
Strips any extension (as in, the part of the number dialled after the call is connected, usually indicated with extn, ext, x or similar) from the end of the number, and returns it.
function extractExtension(number) { var start = number.search(EXTN_PATTERN); if (start < 0) { return {}; } // If we find a potential extension, and the number preceding this is a viable // number, we assume it is an extension. var number_without_extension = number.slice(0, start); var matches = numbe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strip_extension(number) {\n\tvar start = number.search(EXTN_PATTERN);\n\tif (start < 0) {\n\t\treturn {};\n\t}\n\n\t// If we find a potential extension, and the number preceding this is a viable\n\t// number, we assume it is an extension.\n\tvar number_without_extension = number.slice(0, start);\n\t/* ist...
[ "0.68069553", "0.68069553", "0.67914575", "0.6770884", "0.67202353", "0.6627925", "0.6627925", "0.6627925", "0.6627925", "0.61090755", "0.6099122", "0.60599285", "0.60313416", "0.58224875", "0.5809656", "0.5802159", "0.5776195", "0.5660524", "0.56487185", "0.5607859", "0.5569...
0.69014484
0
Finds out national phone number type (fixed line, mobile, etc)
function getNumberType(input, options, metadata) { // If assigning the `{}` default value is moved to the arguments above, // code coverage would decrease for some weird reason. options = options || {}; // When `parse()` returned `{}` // meaning that the phone number is not a valid one. if (!input.country) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNumberType(input) {\n\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\tvar metadata = arguments[2];\n\n\t// When `parse()` returned `{}`\n\t// meaning that the phone number is not a valid one.\n\tif (!input.country) {\n\t\treturn;\n\t}\n\n\tmetadata = new Metada...
[ "0.73949647", "0.7360678", "0.71304744", "0.71104044", "0.70631963", "0.70631963", "0.7050011", "0.667651", "0.66529447", "0.6332997", "0.62609255", "0.62585664", "0.6248691", "0.622401", "0.6175689", "0.6175689", "0.6175689", "0.6110203", "0.6110203", "0.60522485", "0.603821...
0.7419242
0
Deprecated. Use `libphonenumberjs/min` or `libphonenumberjs/max` or `libphonenumberjs/core` instead. Importing from `.json.js` a workaround for a bug in web browsers' "native" ES6 importing system which is uncapable of importing ".json" files. Deprecated Deprecated: remove DIGITS export in 2.0.0. (it was used in `react...
function parsePhoneNumber() { var parameters = Array.prototype.slice.call(arguments) parameters.push(_metadata_min_json_js__WEBPACK_IMPORTED_MODULE_0__["default"]) return _es6_parsePhoneNumber__WEBPACK_IMPORTED_MODULE_1__["default"].apply(this, parameters) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPhoneNumbers() {\n\tvar _normalizeArguments = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__parsePhoneNumber__[\"b\" /* normalizeArguments */])(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\tre...
[ "0.6091075", "0.5918299", "0.5918299", "0.5634727", "0.56061226", "0.5553182", "0.55457467", "0.55214673", "0.54595166", "0.54595166", "0.54595166", "0.54595166", "0.5442694", "0.5442694", "0.54219437", "0.5331486", "0.5287393", "0.527426", "0.527426", "0.52677846", "0.521400...
0.66756266
0
`getPhoneCode` name is deprecated, use `getCountryCallingCode` instead.
function getPhoneCode(country) { return getCountryCallingCode(country) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhoneCode(country)\r\n{\r\n\treturn getCountryCallingCode(country)\r\n}", "function getPhoneCodeCustom(country, metadata)\r\n{\r\n\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__es6_getCountryCallingCode__[\"a\" /* default */])(country, metadata)\r\n}", "function getPhoneCodeCustom(cou...
[ "0.73480433", "0.69509417", "0.67694974", "0.64278334", "0.60075355", "0.59922564", "0.5855874", "0.5855874", "0.5822481", "0.57575136", "0.56783676", "0.55551577", "0.55410206", "0.55099064", "0.54208845", "0.5402386", "0.5385288", "0.5358698", "0.5324213", "0.52966934", "0....
0.72427183
1
`getPhoneCodeCustom` name is deprecated, use `getCountryCallingCodeCustom` instead.
function getPhoneCodeCustom(country, metadata) { return Object(_es6_getCountryCallingCode__WEBPACK_IMPORTED_MODULE_18__["default"])(country, metadata) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhoneCodeCustom(country, metadata)\r\n{\r\n\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__es6_getCountryCallingCode__[\"a\" /* default */])(country, metadata)\r\n}", "function getPhoneCode(country)\r\n{\r\n\treturn getCountryCallingCode(country)\r\n}", "function getPhoneCode(country)\...
[ "0.7836787", "0.69070464", "0.6782856", "0.6363737", "0.6266795", "0.6266795", "0.59548926", "0.59425336", "0.59024835", "0.5487767", "0.54430467", "0.542759", "0.54077756", "0.5404913", "0.54019547", "0.53647757", "0.5362664", "0.5298751", "0.52531695", "0.5215055", "0.52071...
0.7839571
0
Guards from extension violations.
function guardExtend(name, validator) { if (isCallable(validator)) { return; } if (isCallable(validator.validate)) { return; } if (RuleContainer.getRuleDefinition(name)) { return; } throw new Error("Extension Error: The validator '" + name + "' mus...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateCompatibility() {\n // validate project has the correct db type\n if (_.toLower(this.databaseType) !== 'sql') {\n this.error('This module currently only supports SQL DB types\\n');\n }\n\n // validate project has the correct angular version\n ...
[ "0.55160016", "0.5475709", "0.5475709", "0.5475709", "0.5475709", "0.5475709", "0.5456012", "0.54034007", "0.5400393", "0.5379345", "0.53752595", "0.5277451", "0.5252341", "0.5239203", "0.5222811", "0.5222683", "0.52123857", "0.5120116", "0.51003456", "0.5080449", "0.5074976"...
0.55992895
0
Normalizes the given rules expression.
function normalizeRules(rules) { // if falsy value return an empty object. var acc = {}; Object.defineProperty(acc, '_$$isNormalized', { value: true, writable: false, enumerable: false, configurable: false }); if (!rules) { return acc; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeRules(rules) {\n const acc = {};\n Object.defineProperty(acc, '_$$isNormalized', {\n value: true,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n if (!rules) {\n return acc;\n }\n // Object is already normalized, skip.\n ...
[ "0.650034", "0.62456304", "0.62401843", "0.6231791", "0.6231791", "0.6231791", "0.6231791", "0.53407604", "0.51848125", "0.5058259", "0.4989423", "0.4925013", "0.48450822", "0.48322535", "0.4815888", "0.4793291", "0.47916576", "0.47794697", "0.47733265", "0.47643152", "0.4764...
0.62863785
1
Tests a single input value against a rule.
function _test(field, value, rule) { return __awaiter(this, void 0, void 0, function () { var ruleSchema, normalizedValue, params, result, values_1; return __generator(this, function (_a) { switch (_a.label) { case 0: ruleSchema = RuleConta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _test(field, value, rule) {\n return __awaiter(this, void 0, void 0, function () {\n var ruleSchema, normalizedValue, params, result, values_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ruleSchema = RuleContai...
[ "0.66005135", "0.66005135", "0.66005135", "0.66005135", "0.66005135", "0.6587978", "0.6437078", "0.60101587", "0.60101587", "0.59246695", "0.5901454", "0.5817786", "0.58058083", "0.5777804", "0.5764996", "0.5764996", "0.5764996", "0.5764996", "0.5764996", "0.5764996", "0.5764...
0.67537016
0
Resolves vmodel config if exists.
function findModelConfig(vnode) { /* istanbul ignore next */ if (!vnode.componentOptions) return null; // This is also not typed in the standard Vue TS. return vnode.componentOptions.Ctor.options.model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findModelConfig(vnode) {\n /* istanbul ignore next */\n if (!vnode.componentOptions)\n return null;\n // This is also not typed in the standard Vue TS.\n return vnode.componentOptions.Ctor.options.model;\n}", "function findModelConfig(vnode) {\n /* istanbul ignore next */\n if (...
[ "0.61946124", "0.61946124", "0.61946124", "0.61946124", "0.61946124", "0.6165355", "0.612126", "0.612126", "0.612126", "0.612126", "0.612126", "0.52706385", "0.5225978", "0.5192819", "0.5174827", "0.50723886", "0.50592667", "0.5020658", "0.50095326", "0.49540663", "0.49333254...
0.6247038
0
Adds a listener to a native HTML vnode.
function addNativeNodeListener(node, eventName, handler) { /* istanbul ignore next */ if (!node.data) { node.data = {}; } if (isNullOrUndefined(node.data.on)) { node.data.on = {}; } mergeVNodeListeners(node.data.on, eventName, handler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNativeNodeListener (node, eventName, handler) {\n if (isNullOrUndefined(node.data.on)) {\n node.data.on = {};\n }\n\n mergeVNodeListeners(node.data.on, eventName, handler);\n}", "function addNativeNodeListener (node, eventName, handler) {\n if (isNullOrUndefined(node.data.on)) {\n node.data...
[ "0.67450154", "0.67450154", "0.67450154", "0.67450154", "0.67450154", "0.66297513", "0.66297513", "0.66297513", "0.66297513", "0.66297513", "0.66150945", "0.6501687", "0.6501687", "0.6453676", "0.6364493", "0.63381433", "0.6333791", "0.6309824", "0.63071835", "0.6246892", "0....
0.6810058
0
Creates a modified version of validation flags
function createObserverFlags() { return __assign(__assign({}, createFlags()), { valid: true, invalid: false }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createObserverFlags() {\n return __assign(__assign({}, createFlags()), { valid: true, invalid: false });\n}", "function createObserverFlags() {\n return __assign(__assign({}, createFlags()), { valid: true, invalid: false });\n}", "function createObserverFlags() {\n return __assign(__assign({}...
[ "0.66442883", "0.66442883", "0.66442883", "0.66442883", "0.66442883", "0.62744945", "0.6049909", "0.6015875", "0.6005502", "0.6005502", "0.6005502", "0.6005502", "0.6005502", "0.6005502", "0.6005502", "0.5774601", "0.5724544", "0.5675164", "0.5495745", "0.54782784", "0.546717...
0.6719411
0
function create3DTranslationMatrix(v) konvertiert einen Vektor in eine Translationsmatrix
function create3DTranslationMatrix(v){ if (v.elements.length != 3) { throw "Invalid vector length"; } var Mtrans = Matrix.I(4); //Einheitsmatrix anlegen Mtrans.elements[0][3] = v.elements[0]; Mtrans.elements[1][3] = v.elements[1]; Mtrans.elements[2][3] = v.elements[2]; return(Mtrans); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeV3D(v) {\n return new Vector3d(scale * v[0], scale * v[1], scale * v[2]);\n}", "function mvTranslate(v,gContext) {\n mvMultMatrix(Matrix.Translation($V([v[0], v[1], v[2]])).ensure4x4(),gContext);\n}", "translate(x,y,z){\n this.mMatrix=m4.translate(this.mMatrix,x,y,z); \n }", "tra...
[ "0.70045114", "0.6974157", "0.69022584", "0.69022584", "0.6853876", "0.68355954", "0.68132156", "0.68024474", "0.67567897", "0.67431927", "0.66776514", "0.6635429", "0.65712345", "0.6543818", "0.6428927", "0.63657415", "0.6354283", "0.6334818", "0.62704045", "0.6214067", "0.6...
0.8943182
0
using Normal Way / var inchi = 156; var feet = inchi/12; console.log(feet); using functions
function inchiTofeet(inchi) { var feet = inchi/12; return feet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fTc(feet) {\n return feet * 30.48\n}", "function InchToFeets() {\n var inn = document.getElementById(\"i2f\").value\n var a = inn * 0.08334\n document.getElementById(\"p8\").innerHTML = a;\n}", "function fahrenheitToKelvin(fahrenheit)\r\n{\r\n var fahrenheit;\r\n const kelvin = (fahr...
[ "0.6533164", "0.65089434", "0.6445571", "0.6421599", "0.64024454", "0.6309156", "0.6307543", "0.6298515", "0.6265272", "0.62446666", "0.6224817", "0.6206992", "0.61910456", "0.61596715", "0.6151971", "0.6148144", "0.6110515", "0.6060026", "0.6057834", "0.6052133", "0.60513717...
0.8271445
0
Requests the content of requestURL by making a GET or POST request depending on the parameters getParams and postParams. Upon receipt of the answer, the function callback will be called
function makeRequest(requestURL, callback, getParams, postParams) { var request = getNewXMLHttpRequest(); if(getParams != null) requestURL += "?" + getParams; request.onreadystatechange = function () { if (request.readyState == 4 && callback != null) { // alert("Answer: " + request.responseText); callba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function request(url, params, callback, context) {\n var paramString = serialize(params);\n var httpRequest = createRequest(callback, context);\n var requestLength = (url + '?' + paramString).length;\n\n // ie10/11 require the request be opened before a timeout is applied\n if (requestLength <= 2000...
[ "0.6686987", "0.66761905", "0.6389211", "0.6376089", "0.6333519", "0.63295865", "0.6325914", "0.6303343", "0.62810886", "0.6273677", "0.62537855", "0.62528497", "0.6241526", "0.6210805", "0.6209589", "0.62069863", "0.6202125", "0.6200343", "0.6199917", "0.6179773", "0.6177944...
0.74855316
0
reloads the current page and appends the name=value url parameters of the object
function updateSiteParam(object) { href = window.location.href; href += href.indexOf('?') == -1 ? '?' : '&'; href += object.name; href += '='; href += object.value; window.location.href = href; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recreateURL ()\n{\n var url = document.URL;\n \n // Break it off at the question mark\n url = url.split( \"?\" );\n url = url[0];\n \n url += \"?name=\" + options.name;\n \n if (options.autoRef)\n url += \"&autoRef=on\";\n if (options.hhmm)\n url += \"&hhmm=on\";\n if (options.verbose)\n ...
[ "0.6553631", "0.6449806", "0.6449806", "0.6232142", "0.61092794", "0.60529244", "0.60282683", "0.6017181", "0.59631526", "0.59389657", "0.59261936", "0.5919023", "0.5903929", "0.5894174", "0.5890035", "0.5870513", "0.586966", "0.58537704", "0.58506274", "0.5846095", "0.583409...
0.6664119
0
symmetric en/decryption using the Rivest Cipher 4
function rc4Crypt(key, pt) { s = new Array(); for (var i=0; i<256; i++) { s[i] = i; } var j = 0; var x; for (i=0; i<256; i++) { j = (j + s[i] + key.charCodeAt(i % key.length)) % 256; x = s[i]; s[i] = s[j]; s[j] = x; } i = 0; j = 0; var ct = ''; for (var y=0; y<pt.length; y++) { i = (i + 1) % 256;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function VigenèreCipher(key, abc) {\n // var key = \"password\";\n // var abc = \"abcdefghijklmnopqrstuvwxyz\";\n var alphabetArr = abc.split('');\n var NtoAobject = alphabetArr.reduce((p, c, i) => {\n p[i] = c;\n return p;\n }, {});\n var AtoNobject = alphabetArr.reduce((p, c, i) =...
[ "0.6846969", "0.65287787", "0.65287787", "0.64662653", "0.6374709", "0.63653356", "0.6340919", "0.6299918", "0.6206582", "0.6206582", "0.6198448", "0.61979294", "0.61979294", "0.61979294", "0.61979294", "0.61979294", "0.61979294", "0.61979294", "0.61979294", "0.61979294", "0....
0.6531206
1
decodes Base64 formated data
function base64Decode(data){ data = data.replace(/[^a-z0-9\+\/=]/ig, '');// strip none base64 characters if (typeof(atob) == 'function') return atob(data);//use internal base64 functions if available (gecko only) var b64_map = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; var byte1, byte2, by...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function base64Decode(data){\n\tdata = data.replace(/[^a-z0-9\\+\\/=]/ig, '');// strip none base64 characters\n\tif (typeof(atob) == 'function') return atob(data);//use internal base64 functions if available (gecko only)\n\tvar b64_map = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\tvar b...
[ "0.81367797", "0.8051893", "0.7952635", "0.7901298", "0.78159606", "0.77725875", "0.775174", "0.7645171", "0.75476086", "0.7468738", "0.7418315", "0.7392281", "0.737832", "0.73608685", "0.73608685", "0.73608685", "0.73608685", "0.73497874", "0.73408824", "0.7324056", "0.73140...
0.8113943
1
Process change of track id in form
handleTrackIdChange(e) { this.setState({trackId: e.target.value}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onTrackEditSubmit (event) {\n event.preventDefault()\n\n\t\tconst { playlistId, playlistName } = this.state\n\n Meteor.call('openwhyd.profile.tracks.update', this.props.track, playlistId, playlistName, document.cookie)\n\n this.props.closeModal()\n }", "handleTrackIdSubmit(e) {\n e.preventDefaul...
[ "0.6548907", "0.63369983", "0.6211581", "0.5901816", "0.57852846", "0.573482", "0.57019794", "0.56769097", "0.55953425", "0.55778223", "0.5566724", "0.5558788", "0.5556553", "0.55285466", "0.5525273", "0.548811", "0.546316", "0.5435646", "0.54184836", "0.54138726", "0.5391907...
0.6501466
1
Process track form submit event Call ontrackid callback
handleTrackIdSubmit(e) { e.preventDefault(); let trackId = this.state.trackId.trim(); if(trackId) { this.props.ontrackid(trackId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function track(e) {\n\t\t if (e.type === \"mousedown\" || e.which === 13) {\n\t\t $this = $(this);\n\t\t $this.unbind(\"keydown mousedown\", track);\n\t\t var $form = $this.is(\"form\") ? $this : $this.closest(\"form\");\n\t\t var form_id = $form.attr('id') || $form.attr('name') || $...
[ "0.6496834", "0.6213471", "0.61667925", "0.61590165", "0.6156327", "0.6149286", "0.599453", "0.59696996", "0.58958286", "0.58896995", "0.5883145", "0.5876787", "0.58583456", "0.5804742", "0.580263", "0.57941985", "0.57941985", "0.57890415", "0.57681537", "0.57625854", "0.5760...
0.6957752
0
given a server type ('API', 'DB', etc) allocate a new server and return the name of the server (e.g. 'API1', 'API2', 'DB5')
allocate(serverType) { let count = this.findAvailableIndex(serverType) const serverName = serverType + count console.log('Adding server ' + serverName) this.servers.push(serverName) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSelf (req, id, type) {\r\n if(req.hostname === 'localhost') {\r\n return req.protocol + '://' + req.hostname + ':' + req.socket.localPort + '/' + type + '/' + id.toString(10);\r\n }\r\n \r\n else {\r\n return 'https://' + req.hostname + '/' + type + '/' + id.toStrin...
[ "0.60672504", "0.5691436", "0.56421536", "0.56355965", "0.56229377", "0.5579783", "0.5549605", "0.5544358", "0.55115813", "0.5442312", "0.54406506", "0.5422894", "0.54217994", "0.541678", "0.5412834", "0.5405799", "0.5376295", "0.53487897", "0.52756745", "0.5271984", "0.52377...
0.7222845
0
given a server name, remove the server from the pool
deallocate(serverName) { console.log('Removing server ' + serverName) this.servers = this.servers.filter(e => e !== serverName) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeAServer() {\n if (servers.length > 1) {\n let index = servers.findIndex((server) => server.task === -1);\n if (index === -1) {\n setRemoveServerFlag(true);\n } else {\n let serversClone = [...servers];\n serversClon...
[ "0.7204635", "0.6351337", "0.6141389", "0.613541", "0.58427256", "0.5808067", "0.580037", "0.57474035", "0.56930625", "0.5658461", "0.5645455", "0.5635996", "0.5633116", "0.557371", "0.55513406", "0.5542332", "0.5527915", "0.54843765", "0.5472569", "0.5466607", "0.5394182", ...
0.7617855
0
Q2: Write a function called `longer` that has two String parameters and returns the String that is longer.
function longer(stringOne, stringTwo) { var a = stringOne.length; var b = stringTwo.length; if (a > b) { console.log(stringOne); } else if (a === b) { console.log("It's a draw!"); } else { console.log(stringTwo); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longer(stringOne, stringTwo) {\n\treturn stringOne.length > stringTwo.length ? stringOne : stringTwo;\n}", "function larger(str1, str2){\nif (str1.length>str2.length){\n\treturn str1;\n}\nreturn str2;\n}", "function larger(str1, str2){\n\tif (str1.length > str2.length){\n\t\treturn str1;\n\t}\n\t\tret...
[ "0.81059206", "0.7379433", "0.7309725", "0.7210473", "0.70857966", "0.7077342", "0.7057416", "0.7017448", "0.70024633", "0.68891853", "0.6786334", "0.67851037", "0.67505276", "0.6723142", "0.6548788", "0.65005547", "0.6421611", "0.63919836", "0.6390356", "0.638374", "0.637839...
0.76086754
1
Deleta um lojista no banco de dados
static delete(lojista, callback) { let connection = LojistaDB.connect() let sql = "delete from lojista where id = ?"; let id = lojista.id; let query = connection.query(sql, id, function (error, results, fields) { if(error) throw error; callback(lojista) })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n\t\tthis.dados = new ListaDuplamenteLigada();\n\t}", "function excluir(id){\n //limpa os registros do controle de acesso\n limpaControleAcesso(id);\n //deleta o registro\n deletar(id);\n //captura a linha informada\n var linha = document.getElementById(\"linha\"+id);\n //remove a ...
[ "0.61363095", "0.6013709", "0.5989113", "0.59176755", "0.59016323", "0.58509827", "0.58362836", "0.5797999", "0.5779462", "0.5762465", "0.57011855", "0.5680962", "0.5676623", "0.56645215", "0.56591463", "0.5651271", "0.5650748", "0.5640101", "0.5636123", "0.563441", "0.561985...
0.60662585
1
load saved moves into board;
function loadInBoard(dataToSave){ board = dataToSave['board']; //draw the board; drawBoard(board); return board; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadBoard() {\n\tfor(var i=0; i<pieces.length; i++) {\n\t\tvar piece = pieces[i];\n\t\tcells[piece.initRow][piece.initCol].textContent = piece.code;\n\t\tcells[piece.initRow][piece.initCol].classList.replace(\"empty\", \"pieces[\"+i+\"]\");\n\t\tcells[piece.initRow][piece.initCol].classList.add(piece.team...
[ "0.6657202", "0.6272236", "0.6171214", "0.6123479", "0.61204714", "0.6077406", "0.6062326", "0.6050046", "0.6029145", "0.58666474", "0.58621836", "0.5827651", "0.5827651", "0.5801984", "0.5790888", "0.5775117", "0.5762718", "0.5761376", "0.5750181", "0.5743049", "0.5718923", ...
0.6893618
0
get a move order from player, player either give row col, or type Q to quit.
function getMove(player, symbol){ //flag = true; while(true){ let move = readlineSync.question(player + '(' + symbol + '): '); // get a move if(move === 'Q'){ return move; } else{ result = move.split(' '); let r = Number(result[0]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getMove(player) {\n await inquirer.prompt({\n type: \"input\",\n name: \"move\",\n message: \"Enter where you want to move. Ex. The top square would be 1.1:\",\n validate: (val, hash) => {\n const splitted = val.split(\".\");\n\n if (splitted.length !== 2) return...
[ "0.6297518", "0.5918327", "0.588075", "0.5814245", "0.5814245", "0.5808001", "0.57182264", "0.5668308", "0.5662377", "0.5661365", "0.5657285", "0.5651851", "0.56393105", "0.55934644", "0.55706275", "0.55570173", "0.5556098", "0.5545844", "0.5523588", "0.55201304", "0.55184925...
0.59434927
1
fill in a symbol into the game board. row and column indices match the inputs, zero index is padded off.
function fillInSpot(row, col, symbol){ board[row][col] = symbol; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fill(targetX, targetY, symbol) {\n this.checkInitialised();\n this.checkSymbolValid(symbol);\n this.checkTargetValid(targetX, targetY);\n this.checkTargetOccupied(targetX, targetY);\n const height = this.matrix.length;\n const width = this.matrix[0].length;\n const visited = createMatrix(width...
[ "0.6271296", "0.6243125", "0.6137196", "0.6047225", "0.59439147", "0.5926617", "0.59250534", "0.59129286", "0.58991593", "0.58936423", "0.5874592", "0.57975876", "0.5785832", "0.57215923", "0.56552356", "0.5649624", "0.5604816", "0.55883896", "0.55879426", "0.55395174", "0.55...
0.81937456
0
ask players if they want to save the unfinished game if yes, ask filename; calls saveData to save game data into a json file named as filename.
function askSave(filepath, numPlayers, playerName, nameToSymbol, winNumber, boardSize, totalMoves){ console.log('\x1b[36m%s\x1b[0m', "Do you want to save this unfinished game[y/n]?\n"); let saveGame = readlineSync.question('>> '); switch (saveGame){ case 'y': console.log('\x1b[36m%s\x1b[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function continueSave(){\n //TODO: stringify and parse game save data to be able to load games\n $.ajax({\n type: \"GET\",\n url: '/saveFiles/getSave',\n success: function (data){loadGame(data)},\n error: function(XMLHttpRequest, textStatus, errorThrown){console.lo...
[ "0.71030575", "0.7048592", "0.6887891", "0.6834963", "0.6777937", "0.66727275", "0.6499612", "0.64518213", "0.6426574", "0.6412902", "0.63971925", "0.63767254", "0.6327803", "0.63110524", "0.62682855", "0.62598115", "0.6230806", "0.62242746", "0.61344963", "0.61303437", "0.61...
0.79879093
0
save all related parameters and existing moves into a json file under the folder 'saved_games'.
function saveData(filepath, filename, numPlayers, playerName, nameToSymbol, winNumber, boardSize, totalMoves){ dataToSave = {}; dataToSave['numPlayers'] = numPlayers; dataToSave['boardSize'] = boardSize; dataToSave['names'] = playerName; dataToSave['winNumber'] = winNumber; dataToSave['playerTo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_game() {\n\t\tvar save_file = {\n\t\t\tdirt: dirt,\n\t\t\twood: wood,\n\t\t\tstone: stone,\n\t\t\tmetal: metal,\n\t\t\tstudents: students,\n\t\t\tplayer_statistics: player_stats,\n\t\t\tupgrade_costs: upgrade_costs,\n\t\t}\n\t\tlocalStorage.setItem(\"save\",JSON.stringify(save_file));\n\t}", "funct...
[ "0.74965", "0.7194314", "0.7145747", "0.69892174", "0.6913088", "0.69045216", "0.6877649", "0.6803972", "0.6791503", "0.67684805", "0.67413926", "0.6649304", "0.6595125", "0.6575009", "0.6565215", "0.6539042", "0.652615", "0.65254974", "0.64700234", "0.64447856", "0.63914806"...
0.72076654
1
draw cushion seperating lines of board;
function drawCushion(board){ var cushion = ' '; for(var i = 1; i < board.length; i++){ cushion += '---+'; } console.log(cushion.substr(0,cushion.length - 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawBoard(){\n // Draw the lines on x axis\n for (var x = 0; x <= bw; x += gridX) {\n context.moveTo(0.5 + x + p, p);\n context.lineTo(0.5 + x + p, bh + p);\n }\n\n //draw line on y axis\n for (var x = 0; x <= bh ; x += gridY) {\n context.moveTo(p, 0.5 + x + p);\n ...
[ "0.7207732", "0.70201844", "0.6985958", "0.6977065", "0.6780867", "0.6694564", "0.6670925", "0.66670156", "0.66377336", "0.6613314", "0.65898657", "0.6563546", "0.6546769", "0.65439534", "0.65338814", "0.6531623", "0.6527994", "0.65166396", "0.65139544", "0.65101796", "0.6487...
0.7023885
1
Checks for a collision with a tree Returns the index of the collision in tree_array
function checkCollision (tree_array, xcoord, ycoord) { for (var i = 0; i < tree_array.length; i++) { if (tree_array[i].x == xcoord && tree_array[i].y == ycoord) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function treeChecker(horizontalChange, verticalChange) {\n let numberOfRows = arrayOfRows.length;\n let lengthOfRow = arrayOfRows[0].length;\n\n let count = 0;\n let treeTracker = 0;\n let tree = `#`;\n \n positionTracker = 1\n\n while (count < numberOfRows) {\n if (positionTrack...
[ "0.6009821", "0.5787007", "0.5787007", "0.5765251", "0.57419205", "0.5726548", "0.57199544", "0.568397", "0.5666909", "0.56663877", "0.56299704", "0.56292456", "0.55987024", "0.55736494", "0.5555105", "0.55339575", "0.55004936", "0.5468951", "0.54634804", "0.5451933", "0.5404...
0.81131476
0
Moves the lumberjack Moves the lumberjack
function move(){ if(d == "right" && lumberjack.x < board_array_width && board_array[lumberjack.x+1][lumberjack.y].obj == "grass") lumberjack.x ++; else if(d == "left" && lumberjack.x > 0&& board_array[lumberjack.x-1][lumberjack.y].obj == "grass") lumberjack.x --; else if(d == "up" && lumberjack.y > 0&& board_arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToMove(ply) {\n /*gameHistory = game.history({verbose: true});\n if (ply > gameHistory.length - 1) \n {\n ply = gameHistory.length - 1;\n }\n game.reset();\n for (var i = 0; i <= ply; i++) {\n game.move(gameHistory[i].san);\n }\n current...
[ "0.70535904", "0.67040205", "0.666135", "0.6633286", "0.66214263", "0.64434934", "0.64044124", "0.63547826", "0.63541484", "0.6345961", "0.6343149", "0.6301182", "0.6268834", "0.62687373", "0.6268534", "0.6259131", "0.6246931", "0.62270147", "0.6210544", "0.619327", "0.614175...
0.7413396
0
changes the content of the input to display the name of the file loadad and a new icon to signal it. (shooth transition included)
function displayFileIsLoaded(e) { // Extract the name of the file from the input let fileName; try { fileName = e.target.value.match(/[^\\/:*?"<>|\r\n]+$/); } catch (error) { fileName = e.target.value.match(/[\/\\]([\w\d\s\.\-\(\)]+)$/)[1]; } //change the style of the input to show the file is loade...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeIcon(e) {\n e.preventDefault();\n\n const fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.jpg, .jpeg, .png, .bmp, .gif';\n // fileInput.onchange = iconHandler();\n fileInput.click();\n\n fileInput.addEventListener('change', iconHand...
[ "0.64252454", "0.62951", "0.62621754", "0.6182532", "0.6146301", "0.61456764", "0.60284096", "0.60225785", "0.5969504", "0.59646076", "0.5956065", "0.5950767", "0.5825669", "0.57601655", "0.5736093", "0.5718497", "0.56988937", "0.56780154", "0.5668748", "0.5650048", "0.564857...
0.63015497
1
validates user login token returns user id
async function authUser(token) { if (token.startsWith("Bearer ")) token = token.substr(7); const tok = await db.queryProm("SELECT userId, authTokenExpiration<NOW() exp FROM authTokens WHERE authToken=?", [token], true); if (tok instanceof Error) throw tok; if (!tok[0]) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserId(user) {\n if (user.length > 1) {\n const token = user.split(' ')[1];\n try {\n const decodedToken = jwt.verify(token, 'RANDOM_TOKEN_SECRET');\n userId = decodedToken.id;\n return userId;\n } catch (err) {\n return err;\n }\n }\n}", "function getUserIdFromToken...
[ "0.6979341", "0.6859554", "0.68256533", "0.6763798", "0.67401826", "0.672043", "0.6706151", "0.6688119", "0.66368294", "0.66140574", "0.66001827", "0.6582591", "0.6547322", "0.65399575", "0.6518221", "0.65112036", "0.6485907", "0.6419444", "0.6397552", "0.636042", "0.63584787...
0.6973958
1
adding the clickobjects that were identified.
function addNewElement(clickObject) { //checking whether the element is window or not if (clickObject.element === window) { return; } let tag = clickObject.element.tagName; if (tag && (tag.toLowerCase() === "body" || tag.toLowerCase() === "document" || tag.toLowerCase() === "window" || tag....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addClicks(id) {\n for (var i = 0; i < surveyImagesArray.length; i++) {\n if (surveyImagesArray[i].name == id) {\n surveyImagesArray[i].timesClicked ++;\n totalClicks ++;\n console.log('total clicks: ' + totalClicks);\n break;\n }\n }\n}", "itemAddClick() {\n const itemList...
[ "0.5992372", "0.58997303", "0.57020897", "0.568737", "0.5643554", "0.5587766", "0.5568946", "0.55646795", "0.5537639", "0.54987854", "0.5497636", "0.54962987", "0.54555625", "0.5437034", "0.542933", "0.54125243", "0.54115427", "0.5399583", "0.5362921", "0.5361471", "0.5354709...
0.61172336
0
_encryptToken returns signed xclienttoken for SSE connections.
_encryptToken () { if (!this.authToken || !this.authSessionID) { return; } // Combine a session and the current timestamp. let time = +new Date(); let token = { SessionID: this.authSessionID, Time: time }; let text = JSON.stringify(token); // Sign them as JSON using the auth token. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createToken() {\n\tvar epoch = new Date().getTime().toString();\n\tvar cipher = crypto.createCipher(config.tokenCipherAlgorithm, config.tokenCipherKey);\n\tvar crypted = cipher.update(epoch, config.encoding, config.tokenCipherFormat);\n\tcrypted += cipher.final(config.tokenCipherFormat);\n\tlogger.debug(\...
[ "0.58193797", "0.5516725", "0.54888225", "0.54824907", "0.53389263", "0.519683", "0.5163535", "0.5157931", "0.5121464", "0.50599426", "0.50506806", "0.5003795", "0.49879432", "0.49195132", "0.4911207", "0.4882959", "0.48656785", "0.48604208", "0.48590112", "0.48398963", "0.48...
0.6641702
0
Initialise Player based on stored data or a newly shuffled playlist
initPlayer (playlistLength = null) { let usingRetrievedPlaylist = true let playlist = this.store.retrievePlaylist() if (playlist === null) { usingRetrievedPlaylist = false playlist = (new Shuffler(audioData.fragments)).shuffle(playlistLength || audioData.playlistLength) } const blocks ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializePlaylists() {\n\n //If the playlist data is not yet in session storage, make it here and add it to session\n //storage\n if(sessionStorage.getItem(\"playlistList\") == null) {\n let block01 = new Block(\"shuffle\", [songList[2], songList[3], songList[4]]);\n let block02 = ...
[ "0.6889212", "0.67594576", "0.67393833", "0.66672075", "0.6488942", "0.6445734", "0.63738155", "0.6224999", "0.62153774", "0.617182", "0.6123118", "0.6093885", "0.60810363", "0.606739", "0.6034306", "0.60205615", "0.6005571", "0.59730005", "0.5966769", "0.59336996", "0.592279...
0.7954332
0
Submit report return txId
submitReport(hashRoot, reviewers) { var self = this; return new Promise((resolve, reject) => { self.DATABASE.INSTANCE.submitReport(hashRoot, reviewers, { from: self.web3.eth.coinbase }, (er, txId) => { if (er) return reject(er); return resolve(txId); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleSubmit() {\n const formData = this.reportForm.getData()\n this.setState({ requestingReport: true })\n this.generateReport({\n data_type: formData.dataType,\n state_id: formData.selectedStateIdx !== -1 ? formData.selectedStateIdx.toString() : \"\",\n city_id: formData.selectedCityIdx !...
[ "0.5726505", "0.56972504", "0.5527756", "0.5525825", "0.5509014", "0.550796", "0.5494112", "0.5438461", "0.5438461", "0.5399967", "0.5368212", "0.5363187", "0.52286255", "0.5219322", "0.5218576", "0.517582", "0.5154967", "0.5149131", "0.5125502", "0.5113783", "0.50960636", ...
0.6765981
0
Score report return txId
scoreReport(hashRoot, completeness, importance) { var self = this; return new Promise((resolve, reject) => { self.DATABASE.INSTANCE.scoreReport(hashRoot, completeness, importance, { from: self.web3.eth.coinbase }, (er, txId) => { if (er) return reject(er); return resolve(txId); }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recordScore() {\n\n}", "getTxStatus (txId) {\n const txMeta = this.getTx(txId)\n return txMeta.status\n }", "commitInfo() {\n const\n info = this.reporter.getInfo(),\n score = Math.round(info.globalScore * 100),\n time = this.getTimeExpression(info.tTime);\n\n this.setValue...
[ "0.5540615", "0.53091794", "0.52585053", "0.5220788", "0.52129936", "0.51806426", "0.5165237", "0.51505035", "0.5056708", "0.5048742", "0.5048742", "0.50372875", "0.5023272", "0.5022266", "0.50194615", "0.49969745", "0.49842057", "0.49755895", "0.4971028", "0.49662405", "0.49...
0.55312765
1
Close report return txId
closeReport(hashRoot) { var self = this; return new Promise((resolve, reject) => { self.DATABASE.INSTANCE.closeReport(hashRoot, { from: self.web3.eth.coinbase }, (er, txId) => { if (er) return reject(er); return resolve(txId); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close(){\n return Shared.close(this.ticket)\n }", "exitReportClause(ctx) {\n\t}", "exitCloseReelUnitStatement(ctx) {\n\t}", "exitTransactionStatement(ctx) {\n\t}", "exitOpenStatement(ctx) {\n\t}", "complete() {\n\t this.target.txClose();\n\t }", "exitReportName(ctx) {\n\t}", "exit...
[ "0.5735525", "0.5584858", "0.55157", "0.5514257", "0.54564536", "0.54430586", "0.5416885", "0.53320533", "0.530608", "0.5264013", "0.52434856", "0.5240664", "0.5218937", "0.52179444", "0.51729006", "0.5170464", "0.5150223", "0.5133415", "0.51296073", "0.51208234", "0.5111442"...
0.7053206
0
Get explorer return result
getExplorer(index) { var self = this; return new Promise((resolve, reject) => { self.DATABASE.INSTANCE.getExplorer(index, (er, re) => { if (er) return reject(er); return resolve(re); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayFolderContentsInExplorer(folderId){\r\n\r\n\t\t$('#objectTab').trigger('click');\r\n\t\t\r\n //document.getElementById(\"folderContentDiv\").style.display='block';\r\n $(\"#folderContentDiv\").show(1000);\r\n\t\r\n\t\tvar url=\"/GloreeJava2/jsp/Folder/displayRequirementsInExplorer.jsp...
[ "0.5688645", "0.56108505", "0.5544982", "0.55177474", "0.54028666", "0.5370951", "0.5358121", "0.5348717", "0.53013563", "0.5298576", "0.52646613", "0.5253037", "0.5194268", "0.5193123", "0.517261", "0.5045699", "0.5037294", "0.50313854", "0.50313854", "0.50313854", "0.502209...
0.6236395
0
Repositions screen to quad
function toQuad() { $(window).scrollTop(1200 - window.innerHeight / 2); $(window).scrollLeft(1900 - window.innerWidth / 2 + 250); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_grid( quad_x, quad_y ){\n var zero_x = grid_pos[0] + parseInt(grid_size[0]/2);\n var zero_y = grid_pos[1] + parseInt(grid_size[1]/2);\n var dx = parseInt(grid_size[0]/2);\n var dy = parseInt(grid_size[1]/2);\n var remap = [-1,0,0];\n quad_x += 1;\n quad_y += 1;\n quad_x = re...
[ "0.6573295", "0.6514676", "0.6323113", "0.6087783", "0.60855395", "0.60202456", "0.60013413", "0.59559", "0.58761275", "0.5868198", "0.583531", "0.58224547", "0.57962555", "0.57937336", "0.569667", "0.56739056", "0.567379", "0.56496435", "0.5646089", "0.56343484", "0.5610771"...
0.66093206
0
Function to get input id and initcap it and return
function getInputId(input) { return input.id.toUpperCase().charAt(0) + input.id.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get inputId() { return `${this.id || this._uniqueId}-input`; }", "get inputId() { return `${this.id || this._uniqueId}-input`; }", "get inputId() { return `${this.id || this._uniqueId}-input`; }", "get inputId() { return `${this.id || this._uniqueId}-input`; }", "inputId() {\n return this.id ? this.id...
[ "0.70734924", "0.70734924", "0.70734924", "0.70734924", "0.6865355", "0.64745164", "0.63802767", "0.6348043", "0.63325405", "0.6329211", "0.63161033", "0.627972", "0.62672544", "0.62221694", "0.6160296", "0.61255556", "0.6091671", "0.6070171", "0.60517347", "0.60517347", "0.6...
0.72718203
0
Controller for the torrent table view
function TorrentTableCtrl($scope, $rootScope, $timeout, $http, $window) { $scope.errors = []; $scope.destroyed = false; $scope.$on("$destroy", function(e){ console.log("Destroy called for TorrentTableCtrl"); $scope.destroyed = true; if ( $scope.currentPageIndex ){ $rootScope.torrentTableCurrent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTableTorrentData($scope) {\n if ( ! $scope.torrents )\n return;\n\n if ( ! $scope.torrentsForTable ) {\n $scope.torrentsForTable = {};\n }\n \n for (var key in $scope.torrents) {\n if ($scope.torrents.hasOwnProperty(key)) {\n torrent = $scope.torrents[key];\n if ( ! (key in $...
[ "0.5552898", "0.5547902", "0.55429256", "0.5486099", "0.5459694", "0.5436815", "0.54218286", "0.53440243", "0.5317774", "0.5313675", "0.52630806", "0.5246589", "0.5137839", "0.5123519", "0.50712925", "0.50533867", "0.5026888", "0.5025915", "0.5005192", "0.50035864", "0.499735...
0.5876445
0
Controller for the torrent details view
function TorrentDetailsCtrl($scope, $rootScope, $timeout, $routeParams, $http, $window) { $scope.destroyed = false; $scope.errors = []; $scope.torrent = null; $scope.$on("$destroy", function(e){ console.log("Destroy called for TorrentDetailsCtrl"); $scope.destroyed = true; }); $scope.stateForDispl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detailView() {\n\t\tajaxCall(httpMethod=\"GET\", \n\t\t\t\t\t\turi=\"${def:actionroot}/detail/view\",\n\t\t\t\t\t\tdivResponse=\"detail\", \n\t\t\t\t\t\tdivProgress=\"status\", \n\t\t\t\t\t\tformName=null, \n\t\t\t\t\t\tafterResponseFn=null, \n\t\t\t\t\t\tonErrorFn=null);\t\n}", "async show({ params, re...
[ "0.5758799", "0.5752038", "0.5752038", "0.5624611", "0.5624611", "0.5624611", "0.5624611", "0.5624611", "0.5624611", "0.548777", "0.531951", "0.5298798", "0.52248186", "0.52075267", "0.5168364", "0.5139792", "0.51275456", "0.505378", "0.5002832", "0.49770364", "0.4976769", ...
0.6490416
0
Helper used to update the $scope's list of torrent data shown in the table from the full data retrieved from the server. One of the useful effects of this function is that the table model is only changed if the data from the server is different. This means AngularJs won't need to keep updating the view with the same da...
function updateTableTorrentData($scope) { if ( ! $scope.torrents ) return; if ( ! $scope.torrentsForTable ) { $scope.torrentsForTable = {}; } for (var key in $scope.torrents) { if ($scope.torrents.hasOwnProperty(key)) { torrent = $scope.torrents[key]; if ( ! (key in $scope.torrentsFo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TorrentTableCtrl($scope, $rootScope, $timeout, $http, $window) {\n $scope.errors = [];\n $scope.destroyed = false;\n\n $scope.$on(\"$destroy\", function(e){\n console.log(\"Destroy called for TorrentTableCtrl\");\n $scope.destroyed = true;\n if ( $scope.currentPageIndex ){\n $rootScope.to...
[ "0.61608833", "0.61317647", "0.59815764", "0.57236224", "0.56582355", "0.5557954", "0.5538586", "0.5530385", "0.5524417", "0.55031306", "0.54933804", "0.5490387", "0.5451527", "0.5433082", "0.54175293", "0.5376269", "0.53576773", "0.5322078", "0.5302818", "0.5302818", "0.5301...
0.74488026
0
srcTorrent should be a JSON object representing torrent data retrieved from the server.
function updateTorrentData(srcTorrent, dstTorrent){ for (var prop in srcTorrent) { if (srcTorrent.hasOwnProperty(prop)) { if (dstTorrent[prop] != srcTorrent[prop] && !torrentPropsNotToUpdate[prop]) dstTorrent[prop] = srcTorrent[prop]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseSrc(src) {\n if (typeof src === \"object\") {\n return src;\n }\n\n try {\n return JSON.parse(src);\n } catch (e) {\n // Try construct an absolute URL from the src URL\n var srcUrl = new URL(src, window.location.href);\n return srcUrl.toString();\n }\n }", "...
[ "0.55291563", "0.524032", "0.5064465", "0.49615777", "0.49531823", "0.48573995", "0.48022792", "0.477305", "0.47078884", "0.47030523", "0.4685256", "0.4685256", "0.46292698", "0.4604843", "0.4559522", "0.4518122", "0.45031467", "0.4454862", "0.44437236", "0.44390345", "0.4367...
0.5674468
0
phaser requires you to load phaserJS externally first to use it with catamaranJS. Represents PhaserJS integration into Catamaran window.CATAMARAN.ui.tow.PhaserJS for use requires orginal constructor to have usesPhaser enabled. Requires Phaser to be included and loaded before this can be intialized. The goal of this is ...
constructor() { this.game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, 'phaser-stage', { preload: self.preload, create: self.create, update: self.update }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n //super() calls the Phaser.Scene constructor\n super('SceneMain'); \n //Note: The parameter has to match the class name\n }", "constructor() {\n // Create the LoadScene just like any Phaser scene.\n super('LoadScene');\n }", "constructor() {\n // Round the pi...
[ "0.70317155", "0.6977277", "0.6905802", "0.68001735", "0.6603001", "0.6567517", "0.65432435", "0.653453", "0.6486087", "0.6486087", "0.6395631", "0.62751377", "0.6267066", "0.62219554", "0.614786", "0.6135933", "0.6077726", "0.6044691", "0.6024562", "0.60035086", "0.60012597"...
0.72518444
0
Check if the specified calendar is writable. This is the case when it is not marked readOnly, we are not offline, or we are offline and the calendar is local.
isCalendarWritable(aCalendar) { return ( !aCalendar.getProperty("disabled") && !aCalendar.readOnly && (!Services.io.offline || aCalendar.getProperty("cache.enabled") || aCalendar.getProperty("cache.always") || aCalendar.getProperty("requiresNetwork") === false) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "userCanAddItemsToCalendar(aCalendar) {\n let aclEntry = aCalendar.aclEntry;\n return (\n !aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanAddItems\n );\n }", "isEqual(calendar) {\n if (calendar) {\n return this.year === calendar.year && this.mont...
[ "0.5585077", "0.5297171", "0.5289979", "0.5097845", "0.50410885", "0.49922064", "0.4895807", "0.48613864", "0.48178062", "0.48034194", "0.48016337", "0.4769149", "0.46560934", "0.46182042", "0.4590693", "0.45884478", "0.45591426", "0.4554547", "0.45539463", "0.45093507", "0.4...
0.83775604
0