Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
key updates.. hah.."KEY" updates? eh? getit? no?nvm
function main(dat){ camera = new THREE.PerspectiveCamera(70,dat.width/dat.height,0.1,500); scene = new THREE.Scene(); renderer = new THREE.WebGLRenderer({canvas:dat.canvas}); renderer.shadowMap.enabled = true; renderer.shadowMap.autoUpdate = false; renderer.shadowMap.type = THREE.PCFSoftShadowMap; rendere...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keyChange(newKey) {\n key = newKey;\n changeKey();\n}", "update(newKey) {\n this._key = newKey;\n }", "update(newKey) {\n this._key = newKey;\n }", "function Update(self){\n self.key.update(); //do not edit this line\n /********************************/\n /**PUT YO...
[ "0.76021594", "0.7498731", "0.7498731", "0.7445316", "0.7072449", "0.7027427", "0.68067324", "0.6754701", "0.6731612", "0.6682126", "0.66790634", "0.661179", "0.66082805", "0.6519346", "0.6476512", "0.6433544", "0.6425179", "0.6302236", "0.6285114", "0.62607336", "0.6252812",...
0.0
-1
fired when the mqtt server is ready
function setup() { if (DEBUG) { console.log('Mosca server is up and running'); console.log(`Publish rate: ${FREQ} Hz`) } countLinesInFile(dataFilename, (err, numLines) => { if (!err){ numberOfLines = numLines } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onConnect() {\t\n\t\tmqtt.subscribe(moisture_topic, {qos: 0});\n\t\t//$('#status').val('Connected to ' + host + ':' + port + path);\n\t}", "function onConnect() {\n console.log(\"MQTT Connect\");\n console.log(\"ready for receive, topic : \" + topic);\n client.subscribe(topic);\n // initPoly();\n}",...
[ "0.75878966", "0.7564518", "0.755764", "0.7536696", "0.75096244", "0.7429927", "0.73353505", "0.73281074", "0.7305502", "0.7300745", "0.729645", "0.7276787", "0.7272282", "0.72641677", "0.7262289", "0.7239619", "0.72341484", "0.7203002", "0.7199127", "0.71895957", "0.7161299"...
0.0
-1
Called when user submits changes to activity from edit activity dialog box
async onEditActivity() { let data = { ACT_CDE: this.state.activityInfo.ActivityCode, ACT_URL: this.state.tempActivityURL, ACT_BLURB: this.state.tempActivityBlurb, ACT_JOIN_INFO: this.state.tempActivityJoinInfo, }; await activity.editActivity(this.state.activityInfo.ActivityCode, data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editActivity() {\n\n // get the name of the activity\n // and check that it's not empty\n var name = view.activityName.val();\n if (name == '') {\n event.preventDefault();\n event.stopPropagation();\n view.activityNameErrorLabel.addClass('error'...
[ "0.6667829", "0.6392158", "0.6392158", "0.6296489", "0.62872136", "0.6260265", "0.62492186", "0.6039822", "0.5941827", "0.5940423", "0.5901086", "0.5895558", "0.58591807", "0.58541924", "0.58482337", "0.5824466", "0.5821983", "0.5797766", "0.5792313", "0.5782361", "0.57547176...
0.6006524
8
Called when confirm remove image from the alert remove image dialog box
async onRemoveImage() { await activity.resetImage(this.state.activityInfo.ActivityCode); this.onClose(); this.refresh(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindDeleteImageSelectedEvent() {\n $(\".delete-userimage-button\").click(function() {\n var imageid = $(this).data('imageid')\n\n swal({\n title: \"Are you sure?\",\n text: \"Do you want to delete this image\",\n type: \"warning\",\n animation: false,\n showCancelButton: tr...
[ "0.72154033", "0.6961844", "0.69383186", "0.6909133", "0.69041634", "0.68146056", "0.6803412", "0.67852414", "0.67084426", "0.6658304", "0.6641344", "0.6636857", "0.663624", "0.6578989", "0.6538646", "0.6512172", "0.65107113", "0.6481709", "0.6466212", "0.64467525", "0.641264...
0.68531024
5
Constructs a document fragment.
outputFragment () { const frag = document.createDocumentFragment() frag.appendChild(document.head.cloneNode(true)) frag.appendChild(this.rootEl.cloneNode(true)) return frag }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDocumentFragment() {\n return document.createDocumentFragment();\n }", "function createDocumentFragment() {\n return document.createDocumentFragment();\n }", "function createDocumentFragment() {\n return document.createDocumentFragment();\n }", "function createDocumentFragment() {\...
[ "0.65392596", "0.65392596", "0.65392596", "0.65392596", "0.65259624", "0.64472765", "0.64428675", "0.63326967", "0.632853", "0.632853", "0.63021874", "0.63021874", "0.63021874", "0.62971896", "0.629495", "0.6130426", "0.6080538", "0.60020787", "0.5880511", "0.5880511", "0.588...
0.5966909
18
clears the builder sections.
clear () { const tempSections = this.sections this.sections.forEach(section => section.destroy()) this.sections = [] return tempSections }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n this.sections = [];\n }", "clear() {\n const that = this;\n\n that.$.mainContainer.innerHTML = '';\n that._removeContainersInBody();\n that._menuItems = {};\n that._containers = [];\n that._containersInBody = [];\n that._openedContainers = []...
[ "0.72983307", "0.6672458", "0.6586145", "0.6455055", "0.64073026", "0.6397389", "0.6323576", "0.6317459", "0.63160485", "0.62825555", "0.62813085", "0.6242649", "0.62388825", "0.6229144", "0.62289286", "0.6220262", "0.6205329", "0.61617506", "0.6160882", "0.61561924", "0.6147...
0.70540327
1
Outputs a JSON representation of the builder that can be used for rendering with the renderer component.
toJSON () { return { title: this.title, sections: this.sections.map(s => ({ name: s.name, data: s.data })) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildJSON() {\n return JSON.stringify(this.toObject());\n }", "renderJSON() {\n if (!this.hasSetupRender()) {\n return;\n }\n\n // Finaly show parsed jSON in a textarea\n const textArea = document.createElement('textarea');\n textArea.className = `${this.classNamespace}__textarea`;\...
[ "0.68645394", "0.6239721", "0.60856277", "0.60592353", "0.60592353", "0.59658474", "0.5955423", "0.5941241", "0.5914037", "0.58578", "0.5854175", "0.58387387", "0.5816115", "0.57838434", "0.5781346", "0.5781346", "0.575059", "0.57383025", "0.5731897", "0.573032", "0.5708377",...
0.55150896
61
Previews the created page in a seperate tap/window.
preview () { const frag = this.outputFragment() const artboard = frag.querySelector('#artboard') const printPreview = window.open('about:blank', 'print_preview') const printDocument = printPreview.document cleanDOM(frag) let styles = this.getCss(frag) printDocument.open() printDocument.w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPage() {\n // Clear the preview div.\n $('#previewDiv').empty();\n \n // Add a new page.\n addPage(new Page());\n}", "function createPage() {\n\t\t\t\t// Request creating a toolbar when the page is created.\n\t\t\t\tfinder.once( 'page:create:MyPage', function() {\n\t\t\t\t\tfinder.r...
[ "0.68629074", "0.6446354", "0.62942374", "0.6147539", "0.6040036", "0.6032195", "0.59768176", "0.5949266", "0.5946379", "0.5946379", "0.59317994", "0.58915013", "0.5884322", "0.5872137", "0.587035", "0.5866564", "0.58618903", "0.5844795", "0.5829993", "0.5826633", "0.58209723...
0.0
-1
Update the user information
updateUserData() { if (this.form.subscribe == true) { this.form.subscribe = 1; } else { this.form.subscribe = 0; } this.form .post("/api/user-update", { headers: { Authorization: `Bearer ${localStorage.to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUser() {\n try {\n selectedUser.username = $usernameFld.val();\n selectedUser.password = $passwordFld.val();\n selectedUser.firstName = $firstNameFld.val();\n selectedUser.lastName = $lastNameFld.val();\n selectedUser.role = $roleFld.val(...
[ "0.7862489", "0.76994556", "0.7674209", "0.76698965", "0.7399136", "0.7399136", "0.7376033", "0.7371292", "0.7314315", "0.72942847", "0.72907555", "0.7275209", "0.72402495", "0.72358257", "0.7223321", "0.7222013", "0.720945", "0.72013164", "0.7199832", "0.7162888", "0.7148967...
0.6861129
40
Verify at Returns 1 if input message does not conatin any sentence. Returns 0 if input message contains at least one sentence which is to short. Returns 1 if input message is valid.
function containsValidSentences(message) { //first replace all emoji's to not confuse sentence mathcer let replacedMsg = message.replace(/\:(.*?)\:/g, "emoji"); // Enforce the syntactic of a sentence let sentences = replacedMsg.match(sentenceMatcher); // Enforce minimum word count in any matched sen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateSentence(sentence) {\n\tif (sentence == \"\") {\n \t$(\"status\").innerText = \"Missing input in the sentence field.\";\n \treturn false;\n } else if (sentence.length > 100) {\n $(\"status\").innerText = \"Please limit your description to 100 characters or less.\"\n return false;\n }\n r...
[ "0.67829365", "0.65644115", "0.63637054", "0.599937", "0.5904167", "0.58872825", "0.58487624", "0.5839868", "0.58084184", "0.5731613", "0.5723027", "0.5705259", "0.56941795", "0.5580529", "0.55078167", "0.54306495", "0.5416946", "0.53957886", "0.5384026", "0.53619456", "0.535...
0.7232425
0
4.Creates a slice of array with n elements dropped from the beginning.
function chunk(array, size) { const chunked_arr = []; if(size == 0) { chunked_arr.push(array) return chunked_arr; } else{ let index = size; chunked_arr.push(array.slice(index, size + index)); return chunked_arr; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function take(arr, n) { \n arr.splice(n)\n return arr\n}", "function take(arr, n) {\n return arr.splice(0,n);\n}", "drop2(array, n) {\n if (!n) {\n n = 1;\n }\n const droppedArray = array.slice(n);\n return droppedArray;\n }", "function func4(arr, n = 1) {\r\n return arr.slice(-n);\r\n...
[ "0.80744976", "0.79677206", "0.7883994", "0.78516287", "0.78203344", "0.78203344", "0.78203344", "0.78203344", "0.7750831", "0.76749355", "0.7600526", "0.7557199", "0.75079554", "0.737674", "0.73053926", "0.7281956", "0.72010183", "0.71976244", "0.70464116", "0.6946642", "0.6...
0.0
-1
5.Creates a slice of array with n elements dropped from the end
function chunk(array, size) { const chunked_arr = []; if(size == 0) { chunked_arr.push(array) return chunked_arr; } else{ let index = 0; chunked_arr.push(array.slice(index, (array.length-size))); return chunked_arr; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function take(arr, n) { \n arr.splice(n)\n return arr\n}", "drop2(array, n) {\n if (!n) {\n n = 1;\n }\n const droppedArray = array.slice(n);\n return droppedArray;\n }", "function take(arr, n) {\n return arr.splice(0,n);\n}", "function h$sliceArray(a, start, n) {\n return a.slice(star...
[ "0.8054905", "0.7934978", "0.7904824", "0.7793678", "0.7793678", "0.7793678", "0.7793678", "0.7786081", "0.7694529", "0.76507795", "0.7633775", "0.74817693", "0.7479368", "0.7456855", "0.72705334", "0.72237253", "0.7059757", "0.70358616", "0.69342", "0.687779", "0.6856222", ...
0.0
-1
IE11 only supports `Uint8ClampedArray` as of version [KB2929437](
function isUint8ClampedArraySupported() { return 'Uint8ClampedArray' in window; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isUint8ClampedArraySupported() {\n\t return 'Uint8ClampedArray' in window;\n\t}", "function isUint8ClampedArraySupported() {\n\t return 'Uint8ClampedArray' in window;\n\t}", "function _checkIsUint8ClampedImageData() {\n if (Uint8ClampedArray === undefined) {\n ...
[ "0.77063984", "0.77063984", "0.67691493", "0.6444237", "0.6301386", "0.611435", "0.61050403", "0.60756695", "0.6045987", "0.602544", "0.6018516", "0.58819526", "0.5859413", "0.5856645", "0.5848864", "0.5848864", "0.5848864", "0.5848864", "0.5848864", "0.5848864", "0.5848864",...
0.79019374
2
Some browsers or browser extensions block access to canvas data to prevent fingerprinting. Mapbox GL uses this API to load sprites and images in general.
function isCanvasGetImageDataSupported() { var canvas = document.createElement('canvas'); canvas.width = canvas.height = 1; var context = canvas.getContext('2d'); if (!context) { return false; } var imageData = context.getImageData(0, 0, 1, 1); return imageData && imageData.width ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onload()\n{\n console.log('Page loaded.');\n canvas = document.getElementById('canvas');\n canvas.addEventListener(\"click\", canvasClick, false);\n spritesheet = new Image();\n // spritesheet.src = 'spritesheet.png';\n // the image above has been turned into a data url\n // so that no external fil...
[ "0.6368605", "0.6194807", "0.6116311", "0.6079634", "0.60463494", "0.5960498", "0.59558594", "0.5943783", "0.5919507", "0.5898611", "0.5891832", "0.5891832", "0.5890445", "0.58848286", "0.5847877", "0.5844021", "0.58239424", "0.5813339", "0.58115554", "0.58115554", "0.5811555...
0.0
-1
Fonction qui lance le refresh de la liste des Todos
function doFetch() { setFetching(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshTodoList(){\n jsonOverHttp({uri: '/db/item', method: 'GET'}).then(function(response){\n var todos = response.body;\n element.empty();\n element.append(templateService.template(todoLayout, [elementObserver, creat...
[ "0.76621974", "0.7464375", "0.70745045", "0.70208323", "0.70105135", "0.7004424", "0.6867909", "0.68318224", "0.68216604", "0.67936695", "0.6769767", "0.674306", "0.67134714", "0.6663851", "0.66210294", "0.6607712", "0.6580469", "0.65790427", "0.65788907", "0.65691495", "0.65...
0.0
-1
Publish a message to the stream. Specify a topic to group messages for a specific topic.
async function PublishAmessage() { let streamService = new stream.StreamService(process.env.MICRO_API_TOKEN); let rsp = await streamService.publish({ message: { id: "1", type: "signup", user: "john", }, topic: "events", }); console.log(rsp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "publish(topic, payload) {\n const me = this;\n\n me.publisher.publish(`message`, {\n topic: topic,\n payload: payload,\n id: me.id\n });\n }", "sendMessage(topic) {\n this.mqttClient.publish(topic)\n }", "sendMessage(topic, message) {\n\t\tthis...
[ "0.7543187", "0.71351904", "0.69367474", "0.68783844", "0.6856086", "0.68302137", "0.6797579", "0.6797579", "0.6603022", "0.6580079", "0.6500716", "0.6439515", "0.6365079", "0.6362805", "0.6355971", "0.62477964", "0.6244692", "0.62244236", "0.61912596", "0.61740446", "0.61563...
0.6181698
19
create interface to update color speed and element center
function updateColorSpeedDistance(elem, baseColor, baseSpeed) { let elemCenter = $.center(elem); const setSpeed = createSpeedSetter(elem, baseColor); setSpeed(baseSpeed.distance, baseSpeed.time); return { updateColorSpeed({ coords }) { const distance = _.distance(coords, elemCenter); setSpeed(d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InstaRaspberry()\n{\n var colour = new Col();\n var size = {topNumCells : 20, numRings : Canvas.pctX(10)};\n\n Object.defineProperties(this, \n {\n //accessors\n \"hue\" : \n {\n configurable : false,\n writeable : false,\n enumerable : false,\n ...
[ "0.6485543", "0.64704317", "0.6328878", "0.62486404", "0.61793613", "0.6164591", "0.60579073", "0.6045206", "0.6028425", "0.60186934", "0.6002014", "0.5994984", "0.5983887", "0.59599334", "0.59573877", "0.5945553", "0.59436625", "0.59399354", "0.59309536", "0.5929746", "0.592...
0.6668907
0
currying functions restructures a function so it takes one argument, then returns another function that takes the next argument, and so on.
function unCurried(x, y) { return x + y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curryFunc(func,firstArg) {\n return function(secondArg) {\n return func(firstArg, secondArg)\n };\n}", "function curry() {\n var args = a2a(arguments); \n var fn = args.shift();\n\n return function() {\n return callWithArguments(fn, args.concat(a2a(arguments)));\n };\n}",...
[ "0.76247704", "0.75404334", "0.7538301", "0.7485325", "0.74726236", "0.7453658", "0.7396554", "0.737172", "0.72346574", "0.70814496", "0.7061038", "0.7042486", "0.7027688", "0.697204", "0.6939411", "0.693733", "0.6899752", "0.68965197", "0.6876211", "0.6854621", "0.6848016", ...
0.0
-1
User input is captured and stored into a datastore You should be able to add items to the list
function addItemToStore(object) { // Push new item object to datastore STORE.push(object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItem(){\n // Check to see if there is a value in the input textbox.\n if (inputText.value == \"\"){\n // If so, exit the function.\n return;\n }\n\n // If there is an input, add it to the list.\n // Create a date object.\n let timeStamp = new Date();\n\n // Make a new...
[ "0.71370333", "0.710166", "0.70720404", "0.6975266", "0.6950293", "0.69136286", "0.6900198", "0.68562686", "0.6833607", "0.6831974", "0.6796967", "0.6789511", "0.674585", "0.67377955", "0.6702562", "0.6658429", "0.6654564", "0.6650872", "0.66315526", "0.6619128", "0.6583818",...
0.0
-1
You should be able to delete items from the list
function handleDeleteItemClicked() { // input $('ul.shopping-list').on('click', '.shopping-item-delete', function(event) { // update store const index = retrieveItemIndexFromDOM($(event.target)); // Remove the array item at index removeItemFromStore(index); // rerender renderShoppingList(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteListItem() {\n item.remove();\n }", "deleteFromList() {\n list.splice((this.id), 1)\n }", "deleteList() {\n this.items = [];\n }", "function delFromList () {\n /* get rid of the button and bullet from our arrays before deleting it */\n listItems.splice(delBtns.indexOf...
[ "0.8043023", "0.7835402", "0.76014584", "0.75440824", "0.74555385", "0.7454187", "0.7452928", "0.73175186", "0.7307637", "0.7269851", "0.726368", "0.72557706", "0.7242916", "0.7138172", "0.7111251", "0.70888376", "0.7078741", "0.70711464", "0.70592874", "0.7022497", "0.702029...
0.0
-1
You should be able to check items on the list
function handleItemCheckClicked() { // Need to use event delegation Listen for when a user clicks the check button $('ul.shopping-list').on('click', '.shopping-item-toggle', function(event) { // Retrieve the item's index in STORE from ther data attr const index = retrieveItemIndexFromDOM($(event.target)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkList(){\n\n\n\n}", "static isValidItems(items = [TestQuestion.structure]){\n return ((items && items.length > 0) &&\n items.every(item => TestQuestion.isValidItem(item))\n );\n }", "function testMakeList() {\n const items = ['prime rib', 'fried goat cheese salad', 'fish tacos'];\n ...
[ "0.70094454", "0.66913116", "0.66719234", "0.6576637", "0.6529089", "0.6528816", "0.6525192", "0.6491917", "0.64888126", "0.6486875", "0.64714754", "0.6422623", "0.6419609", "0.63932794", "0.6388178", "0.6381723", "0.630154", "0.6299597", "0.6246511", "0.624512", "0.6215931",...
0.0
-1
Handle submit event listener
function handleAddItem() { // Listen for when users submit a new list item $('#js-shopping-list-form').submit(event => { event.preventDefault(); // Get the name of the new item from the text input const inputObject = $('.js-shopping-list-entry'); const newListItem = inputObject.val(); // Clear o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async handleSubmit(evt) {}", "onSubmit() {\n console.log(\"submit form\");\n }", "function formSubmitHandler(event) {\n event.preventDefault();\n buttonSubmitHandler(deck);\n }", "function addSubmitEventListener(handler) {\n $(\"#welcome-modal-form\").submit(handler);\n }", "fu...
[ "0.76162636", "0.7479562", "0.73669326", "0.7238854", "0.7238145", "0.71264315", "0.71198785", "0.71079415", "0.7096817", "0.7084954", "0.7073691", "0.7069192", "0.7019234", "0.70124906", "0.70087385", "0.6989281", "0.6976233", "0.6970171", "0.69666594", "0.69276303", "0.6900...
0.0
-1
Shopping list should be rendered to the page
function renderShoppingList() { // loop through store using map to generate html to be placed on page const items = STORE.map(listItemToHTML); // place html on page $('ul.shopping-list').html(items.join('')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleShoppingList() {\n renderShoppingList();\n handleNewItemSubmit();\n handleItemCheckClicked();\n handleDeleteItemChecked();\n }", "function handleShoppingList() {\n SL.renderShoppingList();\n SL.handleNewItemSubmit();\n SL.handleItemCheckClicked();\n SL.handleDeleteItemClicked();\n...
[ "0.70955205", "0.7008907", "0.69712883", "0.6957725", "0.6938895", "0.6897605", "0.68455654", "0.68228614", "0.6680723", "0.6633614", "0.6613155", "0.66113627", "0.6402629", "0.63312066", "0.6330697", "0.6263472", "0.624183", "0.6229654", "0.6228379", "0.62265235", "0.6225742...
0.8157323
0
function called on load to
function reset () { guessesLeft = 10; userGuesses = []; wordBlanks = []; startGame(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onLoad()\n{}", "function alwaysRunOnload () {\n\t\n\t}", "function loaded() {\n\taddElements();\n\tosScroll();\n\t// initiate tabs\n\t$('#tabs').tab();\n\t// set event listeners\n\tsetOneTimeEventListeners();\n\t//updateChecked();\n}", "onload() {\n this.init();\n }", "function s...
[ "0.7625117", "0.7373486", "0.72533846", "0.7163523", "0.7147941", "0.7147941", "0.7114772", "0.71050733", "0.71018684", "0.706331", "0.69786274", "0.6959097", "0.69314474", "0.6922503", "0.6920874", "0.69178456", "0.68780744", "0.6872841", "0.6847227", "0.6841323", "0.6819351...
0.0
-1
Simple array union with automatic creation if the arrays don't exist. This is a nice optimization which enables the event emitter to lazyinstantiate event callback arrays.
function union(arrayA, arrayB) { if (!arrayA) { return arrayB ? arrayB : []; } if (!arrayB) { return arrayA; } for (const item of arrayB) { if (arrayA.indexOf(item) === -1) { arrayA.push(item); } } return arrayA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function union(arrays) {\n\n}", "function union(arr1, arr2){\n return arr1.concat(arr2);\n}", "function buildNullArray() {\n return { __proto__: null };\n }", "function buildNullArray() {\n return { __proto__: null };\n }", "function buildNullArray() {\n return { __proto__: null }...
[ "0.6421696", "0.5954575", "0.59104043", "0.59104043", "0.5875816", "0.5798544", "0.5753659", "0.56806165", "0.56739414", "0.5671181", "0.56430584", "0.56247497", "0.5620127", "0.5620127", "0.55667984", "0.55667984", "0.55266994", "0.5508149", "0.5492206", "0.54888314", "0.548...
0.50942534
73
Simple array item removal with automatic creation if the array doesn't exist. This is a nice optimization which enables the event emitter to lazyinstantiate event callback arrays. DOES NOT REMOVE DUPLICATE VALUES!
function without(array, item) { if (!array) { return []; } const indexOfItem = array.indexOf(item); if (indexOfItem !== -1) { array.splice(indexOfItem, 1); } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListener(array, listener) {\n var pos = array.indexOf(listener);\n if ( pos > -1 ) {\n array.splice(pos,1);\n }\n }", "function unlistenArrayEvents(array, listener) {\n\t\t\tvar stub = array._chartjs;\n\t\t\tif (!stub) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar listeners = stub.listeners;\n\...
[ "0.6721239", "0.6689738", "0.66877073", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.665926", "0.6...
0.6215054
88
Evaluates each function synchronously, but waits for all to asynchronously complete before returning. TODO: Find a better name for this.
emitAndWaitForCompletion(event, ...args) { const promises = []; if (this.onListeners[event]) { for (const callback of this.onListeners[event]) { try { promises.push(Promise.resolve(callback.call(null, ...args))); } catch (e)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function executeParallelAsyncTasks() {\n const [valueA, valueB, valueC] = await Promise.all([functionA(), functionB(), functionC()])\n doSomethingWith(valueA)\n doSomethingElseWith(valueB)\n doAnotherThingWith(valueC)\n}", "function eachAsync(arr, func, cb) {\n var doneCounter = 0;\n var ...
[ "0.59443283", "0.5889232", "0.5864438", "0.5840163", "0.5831751", "0.5756971", "0.57196635", "0.56452703", "0.56343114", "0.56146294", "0.55984306", "0.55639046", "0.5558755", "0.55152917", "0.55026865", "0.55026865", "0.55026865", "0.54897267", "0.5484591", "0.5481873", "0.5...
0.0
-1
Create a Authless server instance
constructor(config) { this.botRouter = config.botRouter; this.domainPathRouter = config.domainPathRouter; this.puppeteerParams = config.puppeteerParams; this.puppeteerPlugins = config.puppeteerPlugins; this.proxy = config.proxy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "create () {\n this.server = https.createServer(\n Object.assign({\n IncomingMessage: CherryIncomingMessage,\n ServerResponse: CherryServerResponse\n }, this.options.httpsOptions),\n (req, res) => {\n this.bootstrap(req, res)\n }\n )\n }", "function createServer () ...
[ "0.61823684", "0.5940996", "0.5790191", "0.5713446", "0.56484723", "0.56090343", "0.55467165", "0.5535666", "0.5494993", "0.5489425", "0.543165", "0.54062605", "0.5390913", "0.53646785", "0.53646785", "0.53599554", "0.5359389", "0.533399", "0.53129375", "0.52757066", "0.52579...
0.0
-1
Returns an ArtifactPath for a file within this artifact. Output is in the form "::"
atPath(fileName) { return new ArtifactPath(this, fileName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getArtifactPathFromFullyQualifiedName(fullyQualifiedName) {\n const { sourceName, contractName } = (0, contract_names_1.parseFullyQualifiedName)(fullyQualifiedName);\n return path.join(this._artifactsPath, sourceName, `${contractName}.json`);\n }", "formArtifactPathFromFullyQualifiedName(fullyQ...
[ "0.69155854", "0.6663084", "0.6591135", "0.6509728", "0.6109335", "0.59601754", "0.58339435", "0.56920063", "0.56771463", "0.5609448", "0.5607457", "0.5593439", "0.55669546", "0.554719", "0.554719", "0.55263937", "0.55217403", "0.5473592", "0.5466409", "0.5439431", "0.5437621...
0.67494434
1
The artifact attribute for the name of the S3 bucket where the artifact is stored.
get bucketName() { return artifactAttribute(this, 'BucketName'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getS3Artifact(artifact) {\n return artifact.location.split(':')[5]\n}", "get url() {\n return artifactAttribute(this, 'URL');\n }", "* url (path) {\n return `https://${this.disk.bucket}.s3.amazonaws.com/${path}`\n }", "function getS3FilePath(env){\n var prefix = env + \"/RD013/\";\n ...
[ "0.702261", "0.59789395", "0.54566723", "0.53391445", "0.527009", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", "0.5226147", ...
0.7708908
0
The artifact attribute for The name of the .zip file that contains the artifact that is generated by AWS CodePipeline, such as 1ABCyZZ.zip.
get objectKey() { return artifactAttribute(this, 'ObjectKey'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getS3Artifact(artifact) {\n return artifact.location.split(':')[5]\n}", "async _getArtifactPath(name) {\n if ((0, contract_names_1.isFullyQualifiedName)(name)) {\n return this._getValidArtifactPathFromFullyQualifiedName(name);\n }\n const files = await this.getArtifactPa...
[ "0.6248831", "0.5708333", "0.56943554", "0.55144835", "0.54227406", "0.5398531", "0.5298045", "0.52711624", "0.52583325", "0.5248052", "0.51712567", "0.5169897", "0.51315314", "0.50730443", "0.5069263", "0.5030545", "0.49639374", "0.49596688", "0.4953571", "0.49356157", "0.49...
0.0
-1
The artifact attribute of the Amazon Simple Storage Service (Amazon S3) URL of the artifact, such as
get url() { return artifactAttribute(this, 'URL'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getS3Artifact(artifact) {\n return artifact.location.split(':')[5]\n}", "get bucketName() {\n return artifactAttribute(this, 'BucketName');\n }", "* url (path) {\n return `https://${this.disk.bucket}.s3.amazonaws.com/${path}`\n }", "function parseS3Url(url) {\n const [bucket, ...ke...
[ "0.8070746", "0.66122645", "0.6323084", "0.56154054", "0.55719745", "0.549504", "0.5480048", "0.5475087", "0.5419719", "0.5411931", "0.5366184", "0.5364981", "0.53481203", "0.53210694", "0.5318537", "0.5313999", "0.52806866", "0.5236993", "0.5198969", "0.5192332", "0.5175575"...
0.7006722
1
Returns a token for a value inside a JSON file within this artifact.
getParam(jsonFile, keyName) { return artifactGetParam(this, jsonFile, keyName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tokenValue () {\n return this.currentToken.value()\n }", "getValue() {\n return this.token;\n }", "function getToken() {\n return token;\n }", "getValue() {\n return this.token.access_token;\n }", "getToken() { return this.token.getToken(); }", "get token() {\n return t...
[ "0.59987754", "0.58948725", "0.5853601", "0.55726695", "0.5567918", "0.5441757", "0.5382531", "0.52802426", "0.5242911", "0.5212856", "0.5187868", "0.51512915", "0.51393694", "0.51349854", "0.51290315", "0.5114982", "0.51141375", "0.50320727", "0.49866986", "0.49658614", "0.4...
0.49602833
20
! The buffer module from node.js, for the browser.
function i(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function createBuffer() {\n var ptr = exports.hb_buffer_create();\n return {\n ptr: ptr,\n /**\n ...
[ "0.7284394", "0.7284394", "0.7284394", "0.7284394", "0.7284394", "0.7284394", "0.7243833", "0.7201511", "0.7110256", "0.7015921", "0.6898116", "0.6876876", "0.6801216", "0.6771929", "0.67586267", "0.67586267", "0.67586267", "0.67586267", "0.67586267", "0.67586267", "0.6758626...
0.0
-1
component used to display library items across search and recently played
function LibraryItem(props) { const dispatch = useDispatch(); const [isOnPlaylist, setIsOnPlaylist] = useState(false); // on + button click, add that game to the user's playlist const addToPlaylist = () => { console.log(props); dispatch({type:'ADD_PLAYLIST_GAME',payload: props}) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static displayBooks(){\n let books = Store.getBooks();\n const ui = new UI();\n\n // Add all books to list\n books.forEach(function(book){\n ui.addBookToLib(book);\n });\n }", "renderRow( library ) {\n return <ListItem library={ library }/>\n }", "function showLibrary() {\n\t$(\"...
[ "0.64444333", "0.6392368", "0.63280874", "0.6300538", "0.62625724", "0.61985576", "0.61470985", "0.6141375", "0.6141375", "0.61306125", "0.61122936", "0.6092221", "0.60847616", "0.6074088", "0.6059566", "0.6000456", "0.59785324", "0.59698063", "0.5935233", "0.5933842", "0.591...
0.55766195
80
execute only when doc.length != 0
function rejectChain() { Promise.reject("Account with this email already exists").catch(function( err ) { res.status(401).send({ error: err }); }); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _isDocValidToBeProcessed(options={}) {\n const { syncronisation, userId } = options\n const { filter } = syncronisation\n const doc = options.doc\n let returnValue = true\n if (!_.isUndefined(filter) && _.isFunction(filter)) {\n const filterResult = filter.call(this, doc, userId)\n ...
[ "0.63997006", "0.61374277", "0.61374277", "0.6106124", "0.5933887", "0.58849436", "0.57821506", "0.5628764", "0.5620305", "0.5620305", "0.5581241", "0.5491635", "0.54563504", "0.54563504", "0.54563504", "0.54546463", "0.544947", "0.5442594", "0.54051983", "0.54051983", "0.540...
0.0
-1
used for external asynchronous signal to trigger the next execution
async next() { this._executing = false; await this._execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "signal(executionId, inputData) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log('Action:signal ' + executionId + ' startedAt ');\n let token = null;\n this.appDelegate.executionStarted(this.executionContext);\n this.doExecutionEvent(__1.EXECUTI...
[ "0.6560701", "0.6175189", "0.61029214", "0.59697884", "0.5890202", "0.58623314", "0.58402675", "0.5823882", "0.5769449", "0.5769449", "0.57606614", "0.57566607", "0.57430154", "0.5713702", "0.56778574", "0.56732196", "0.56732196", "0.5668249", "0.5640954", "0.56343967", "0.56...
0.61182535
2
execute the function, and then wait for the asynchronous signal it won't execute while waiting
async _execute() { if (this._executing || !this._queue.length) { return; } else { this._executing = true; } // execute the function with highest priority this._sortQueue(); const entry = this._queue.pop(); await entry.func(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_executeAfterInitialWait(func) {\n this.initialWait();\n return this.__execute(func);\n }", "function wait(){}", "wait() {}", "async onFinished() {}", "async function myFn() {\n // wait\n}", "function callSyncFunction() {\n var deferred = Q.defer();\n notDeferred();\n return ...
[ "0.664733", "0.65561086", "0.64466304", "0.60735154", "0.6045709", "0.5922681", "0.58871514", "0.58624583", "0.5687289", "0.5647673", "0.56290334", "0.5622486", "0.56203514", "0.560497", "0.559547", "0.55836254", "0.55768335", "0.5564934", "0.555994", "0.55558336", "0.5553273...
0.55126673
23
sort the queue with priority if priority is the same ensure that the earlier function is executed before the later one
_sortQueue() { this._queue.sort((a, b) => { if (a.priority === b.priority) { return b.timestamp - a.timestamp; } else { return a.priority - b.priority; } }); // console.log(JSON.stringify(this._queue)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort () {\n this.queue.sort((a, b) => a.priority - b.priority)\n }", "sortPriority() {\n this.waitingQueue = this.waitingQueue.sort(function(jobA, jobB) {\n if(jobA.getPriorityLevel() > jobB.getPriorityLevel())\n return -1;\n if(jobA.getPriorityLevel() < jobB.getPr...
[ "0.79509896", "0.77552265", "0.70893216", "0.6752633", "0.66915625", "0.6660621", "0.66187984", "0.6611694", "0.65845335", "0.6547045", "0.65245247", "0.64521474", "0.6447374", "0.64183575", "0.63582206", "0.62443346", "0.61954254", "0.6182751", "0.61376613", "0.61145765", "0...
0.7367658
2
this must be 0
function setRefreshInterval() { refreshInterval = setInterval( moveRight, autoSlideChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zero(){ return 0;}", "value() {return 0}", "static set zero(value) {}", "sol() { return this.pos == 0; }", "isZero() {\n return this.value == 0;\n }", "empty() { return this.m == 0; }", "setZero() {\n _instance.setZero()\n }", "private public function m246() {}", "get negative ...
[ "0.6480064", "0.63948345", "0.61087316", "0.60206264", "0.60106874", "0.59023714", "0.589581", "0.5843198", "0.58167684", "0.5771589", "0.57707536", "0.57660043", "0.57545984", "0.57527465", "0.5726973", "0.5717264", "0.57127947", "0.5684847", "0.5678347", "0.56485206", "0.55...
0.0
-1
Before mount, set room, user, synonyms in state based on query string and inputed date.
componentWillMount() { let pathname = this.props.location.pathname.split('/'); let roomNum = (pathname[pathname.length-2]); let name = (pathname[pathname.length-1]); let syns = data.synonyms.map((synonym) => { return {word: synonym.syn, active: true}; }); this.setState({room: roomNum, user...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async componentDidMount(){\n this.setState({\n selectedDate: this.convertNewDateToDateType(new Date()) // converts today date to string format 'YYYY-MM-DD'\n }, ()=> {\n this.fetchAppointmentsByDoctorIdAndDate(this.state.selectedDate); // call function to retrieve appointments by doctorId an...
[ "0.5179361", "0.51403815", "0.50487804", "0.50448215", "0.504123", "0.50270045", "0.49915597", "0.49109814", "0.4880542", "0.4824429", "0.48004416", "0.47904485", "0.47863832", "0.47716495", "0.47578678", "0.4740477", "0.47300318", "0.47217584", "0.47181842", "0.47062775", "0...
0.59941775
0
Set up component to handle Socket.io events
componentDidMount() { //Iitialization let data; //commment this out later // this.interval = setInterval(this.tick, 1000); //set room socket.emit('join_room', {room: this.state.room }) //send user data socket.emit('init', {user: this.state.user, room: this.state.room}); //recieve m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupSocket() {\n this.socket = io('/gameroom');\n this.socket.on('connect', () => {\n this.socket.emit('setup_client')\n });\n this.socket.on('packet', this.handleSocketMessages)\n }", "init() {\n this.io.on('connection', function (socket) {\n /**\n * Triggered wh...
[ "0.7600254", "0.75588477", "0.71993387", "0.7159792", "0.7082774", "0.7008902", "0.6976454", "0.69733346", "0.68664616", "0.6861294", "0.6830711", "0.681593", "0.6815425", "0.6789965", "0.675219", "0.67486787", "0.6725861", "0.66938585", "0.6668196", "0.66186833", "0.6599905"...
0.0
-1
Cancels the timer; sets isMounted in state to false
componentWillUnmount() { this.setState({isMounted: false}); clearInterval(this.interval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {\n this._isMounted = false;\n clearTimeout(this.intervalID);\n\t}", "componentWillUnmount() {clearInterval(timerID)}", "async componentWillUnmount() {\n clearInterval(this.timeStatus);\n }", "componentWillUnmount() {\n this.timer && clearTimeout(this.timer)\n }",...
[ "0.6672753", "0.6563006", "0.6514877", "0.6407338", "0.635037", "0.63475126", "0.62750554", "0.6249507", "0.62405324", "0.62374866", "0.6229571", "0.6200068", "0.6199027", "0.6175011", "0.61734444", "0.61733407", "0.6170112", "0.6159877", "0.61529875", "0.61443883", "0.614415...
0.62886363
6
Handles updating state for Socket.io events
handleData(data) { this.setState(data, () => {console.log("added data", data)}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stateUpdate(socket) {\n let gameCode = Array.from(socket.rooms)[1]\n if(Object.keys(gameData).includes(gameCode)){\n io.in(gameCode).emit(\"stateUpdate\", gameData[gameCode].gamestate)\n }\n}", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n console.log(...
[ "0.70101666", "0.6888898", "0.68431985", "0.6782785", "0.6777829", "0.6752733", "0.6708527", "0.6669246", "0.6636194", "0.6589828", "0.6560959", "0.6524934", "0.6445162", "0.6401084", "0.6367133", "0.6364648", "0.6355973", "0.6335395", "0.6324295", "0.62927246", "0.6278389", ...
0.0
-1
Timer function decreases every second
tick() { this.setState({timeRemaining: this.state.timeRemaining - 1}); if (this.state.timeRemaining <= 0) { this.endGame(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timer() {\n intervalId = setInterval(decrement, 1000);\n }", "function stopTimer(){ clearInterval(interval)}", "function timer(){\n countStartGame -= 1;\n console.log(countStartGame);\n if (countStartGame === 0){\n console.log (\"time's up\");\n //need to clear interva...
[ "0.77285624", "0.7588325", "0.7557548", "0.74052876", "0.73959464", "0.73956203", "0.73805076", "0.737063", "0.73169905", "0.7297474", "0.72940516", "0.7282656", "0.72775644", "0.72649056", "0.7260573", "0.72487766", "0.72206724", "0.72009534", "0.71900225", "0.7179749", "0.7...
0.0
-1
Checks to see if a users guess is in the synonym dictionary, and sets that word to inactive if it hasn't been guessed
handleGuessEntry(g) { let correct = false; let remaining = 0; let mapped = this.state.synonyms.map((synonym) => { if (synonym.word === g && synonym.active) { correct = true; return {word: synonym.word, active: false}; } else if (synonym.active) { remaining ++ } return s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newGame(){\n answer_word = words[Math.floor(Math.random() * words.length)];\n guess_count = 7;\n masked_word = hideWord(answer_word);\n incorrect_letter_guesses = new Set();\n $(\".guess-title\").text(\"Your Guesses\");\n $(\".panel-title\").text(\"Guess the Word\");\n $(\".hint\").te...
[ "0.60220325", "0.5954479", "0.593397", "0.5923858", "0.5886668", "0.58632004", "0.58448404", "0.58361787", "0.58163285", "0.5815536", "0.58019245", "0.57763135", "0.57713157", "0.5766785", "0.5765671", "0.5755232", "0.5747786", "0.56960225", "0.56936383", "0.5678621", "0.5677...
0.6107752
0
Gives user an amount of points in relation to time for a correct guess
givePoints() { let points = Math.floor(2 * this.state.timeRemaining) + this.state.myScore; socket.emit('tell_points', {room: this.state.room, score: points}); this.setState({myScore: points}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHint() {\n\n if (userLives === 1) {\n $('.message').text(\"Not enough lives\");\n return setTimeout(function() {$('.message').text(\"\");},500)\n }\n\n userLives--;\n $('#lives').text(\"Lives: \" + userLives);\n \n for (var i=0; i<randomPath.length; i++) {\n $('#'+randomPath[i]).addClass('co...
[ "0.67828405", "0.67377806", "0.6607473", "0.6602423", "0.64174175", "0.62943655", "0.62166435", "0.62039924", "0.62011683", "0.61775506", "0.6173446", "0.61588436", "0.61576587", "0.6131586", "0.61181664", "0.61031204", "0.6094163", "0.60900575", "0.60820186", "0.6080813", "0...
0.0
-1
register success and error callbacks for testing purposes (these are normally populated by the runtime)
function onSuccess(ipAddress, userId, uniqueId, message) { console.log(" ipAddress : " + ipAddress); console.log(" userId : " + userId); console.log(" uniqueId : " + uniqueId); console.log(" message : " + message); process.exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mockCallBack() {\n}", "onSuccess() {}", "setupForSuccess(response, headers) {\n\t\tvar executeHeaders = (exe) => exe(response, headers);\n\t\tvar executeVanilla = (exe) => exe(response, HEADERS_SUCCESS);\n\t\tvar execute = (exe) => (headers ? executeHeaders(exe) : executeVanilla(exe));\n\n\t\tthis.get...
[ "0.6562118", "0.62488645", "0.6152046", "0.59662616", "0.5940969", "0.5925206", "0.5885111", "0.5884076", "0.5884076", "0.5849339", "0.58344394", "0.5817015", "0.58122724", "0.57833594", "0.5745085", "0.5666797", "0.56644624", "0.564074", "0.56235665", "0.5615809", "0.5595748...
0.0
-1
A example palette provider.
function ExamplePaletteProvider(create, elementFactory, lassoTool, palette) { this._create = create; this._elementFactory = elementFactory; this._lassoTool = lassoTool; this._palette = palette; palette.registerProvider(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool) {\n\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}", "function PaletteProvider(palette, create, elementFacto...
[ "0.69118786", "0.6880772", "0.6849507", "0.66644967", "0.66274303", "0.65305084", "0.6528701", "0.64704967", "0.64704967", "0.64264226", "0.6414223", "0.6412659", "0.63878906", "0.6294012", "0.6276311", "0.6219616", "0.6185391", "0.6151247", "0.61470044", "0.6137335", "0.6103...
0.7426922
0
Closes all bindings bound to this target.
closeBindings() { this.receiver_.closeBindings(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "closeAll() {\n const that = this;\n\n for (var i = that._instances.length - 1; i > -1; i--) {\n that._close(that._instances[i]);\n }\n }", "sockCloseAll() {\n Object.keys( this._socks ).forEach( id => this.sockClose( id ) );\n }", "closeAll() {\n this._openCloseAll...
[ "0.60705835", "0.58204263", "0.5808478", "0.57070166", "0.57070166", "0.57070166", "0.5705652", "0.5615122", "0.5567445", "0.55536616", "0.5498338", "0.5461992", "0.54584247", "0.534893", "0.5312128", "0.53005004", "0.5288806", "0.5271684", "0.52393824", "0.5219138", "0.51731...
0.7126728
34
Closes all bindings bound to this receiver. The receiver will not receive any further message message events unless rebound to one or more handles.
closeBindings() { this.receiver_.closeBindings(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sockCloseAll() {\n Object.keys( this._socks ).forEach( id => this.sockClose( id ) );\n }", "close() {\n this._observers = undefined;\n if (this.notificationQueue != null) {\n // Cancel the notification iterator\n this.notificationQueue.return(undefined).catch(err => {\n ...
[ "0.5921714", "0.5649499", "0.5628624", "0.55401254", "0.5503638", "0.54637456", "0.5444971", "0.54218686", "0.54218686", "0.53968334", "0.53574616", "0.53570956", "0.53439593", "0.53009135", "0.52378196", "0.52199537", "0.5218359", "0.5193964", "0.51506126", "0.51506126", "0....
0.7870667
35
console.log('') console.log('All Rules'); console.log(allRules); console.log('')
function buildRuleString(ruleId){ let rule = allRules[ruleId]; //console.log(rule); while(rule.match(/\d+/g)){ const otherRuleIds = rule.match(/\d+/g); otherRuleIds.forEach(otherRuleId => rule = rule.replace(otherRuleId, allRules[otherRuleId])); } allRules[ruleId] = rule; return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debug() {\n console.log(':::RULES:::');\n console.log(_rules);\n console.log(':::FUNCTIONS:::');\n console.log(_functions);\n console.log(':::VALIDATION PARTS:::');\n console.log(_validationParts);\n }", "function request_all_rules...
[ "0.66872966", "0.65574473", "0.62043995", "0.60974604", "0.60936385", "0.60896456", "0.6009891", "0.6002521", "0.59598583", "0.5944754", "0.5764564", "0.57129973", "0.57087094", "0.5696619", "0.5692075", "0.5636791", "0.5584958", "0.5572474", "0.5565391", "0.5541719", "0.5527...
0.0
-1
Portions of this code are from MochiKit, received by The Closure Authors under the MIT license. All other code is Copyright 20052009 The Closure Authors. All Rights Reserved.
function Dr(a){var b=Er;this.Ze=[];this.bg=b;this.Wf=a||null;this.xe=this.be=!1;this.Ad=void 0;this.Ef=this.ug=this.kf=!1;this.bf=0;this.dd=null;this.lf=0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "static final private internal function m106() {}", "protected internal function m252() {}", "transient private protected internal ...
[ "0.7014703", "0.68224555", "0.64723897", "0.6451386", "0.6362882", "0.6357157", "0.6283802", "0.6254263", "0.61810696", "0.6061107", "0.60061884", "0.5903291", "0.58774805", "0.5856822", "0.58260125", "0.58140063", "0.58090013", "0.57952607", "0.5783671", "0.57709396", "0.577...
0.0
-1
Do your state need to be put into props via MapState or can it be done though MapDispatchToState??
function MapStateToProps(state){ return{ SelectedClass :state.SelectedClass, SelectedName : state.Name, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapStateToProps() {\r\n return {\r\n };\r\n}", "function mapStateToPros(state){\n //So take state from store and pass to components as props\n return{\n trainers:state.trainers\n }\n}", "function mapPropsToState(state){\n return state.TodoReducer\n}", "function mapState (state) {\...
[ "0.64394873", "0.6406613", "0.6394957", "0.63409376", "0.63254225", "0.63122386", "0.63090205", "0.62747926", "0.6247655", "0.62394696", "0.62334436", "0.62212986", "0.620946", "0.6205103", "0.62019473", "0.6198657", "0.61912256", "0.61873996", "0.61835164", "0.6168121", "0.6...
0.0
-1
Create a function that will be called later upon click
function changeHSLColor() { // Randomly generate the 1st value of HSL code, hues can range from 0 to 360 let hue = Math.ceil(Math.random() * Math.floor(360)); // Randomly generate the 2nd value of HSL code, saturation can range from 0 to 100 let saturation = Math.ceil(Math.random() * Math.floor(100)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Click() {\n}", "click_extra() {\r\n }", "function click_on() {\n console.log('called click function');\n}", "function onClick() {\n}", "click() { }", "function fAppMeteo() {\n $(\"#bokm\").click(fAffMeteo);\n}", "handleClick() {}", "onAddButtonClick(fn) { this.onAddButtonClickFn = fn ...
[ "0.7203784", "0.6957849", "0.6911323", "0.6726818", "0.65763766", "0.65418136", "0.6519691", "0.65149444", "0.6483478", "0.64538896", "0.6425918", "0.6415653", "0.6363526", "0.63628125", "0.6353443", "0.6345929", "0.6332619", "0.6332005", "0.6327232", "0.6303626", "0.6289601"...
0.0
-1
Diametro del Fire Ball (m)
diameterMax() { let Dmax = 5.8 * Math.pow(this.mass, 1.0 / 3.0); return Dmax; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Fire() {\n return Math.round((this.fire) * this.Effects.Fire/modBase);\n }", "burningRate() {\n let m = this.mass / (0.888 * Math.PI * Math.pow(this.diameterMax(), 2) * this.durationFireBallCombustion())\n return m\n }", "function Ball() {\n // dimensões\n this.x = BALL_X;\n this....
[ "0.56022733", "0.55917615", "0.5571065", "0.5483834", "0.54834664", "0.5311093", "0.52961254", "0.5292917", "0.526793", "0.5266192", "0.52342725", "0.52268875", "0.5214169", "0.52048755", "0.5202344", "0.51829314", "0.517921", "0.517859", "0.514874", "0.51399124", "0.5131133"...
0.0
-1
Burning Rate (kg/m2s) KAKOSIMOS pp102
burningRate() { let m = this.mass / (0.888 * Math.PI * Math.pow(this.diameterMax(), 2) * this.durationFireBallCombustion()) return m }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upgrade_cost (k)\n {\n return 500.0 * (1 + k/(15-k)) * Math.pow(k, 1.5) * (1/(15-k));\n }", "function MK34_rate(GFDI) { return (0.13*GFDI); }", "function t_burn(met, bmr, cals){\n\treturn cals / (met * (bmr / 1440));\n}", "function getMilk(money){\r\nreturn money * 1.5;\r\n}", "function c_bur...
[ "0.644268", "0.63451076", "0.61546314", "0.6038392", "0.5978531", "0.59543186", "0.5946903", "0.58651", "0.5823185", "0.5819466", "0.5802071", "0.57510036", "0.5723785", "0.5654617", "0.56508225", "0.56450367", "0.56232375", "0.56142443", "0.56029266", "0.5601902", "0.5583733...
0.7196935
0
View Factor PointSource de Kakosimos 103 C2.44
fView(xnp) { let X = Math.sqrt(Math.pow(this.heigthFireBall(), 2) + Math.pow(xnp, 2)) return Math.pow((this.diameterMax() / 2) / (X), 2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Mode7point1() {}", "get Mode5point1() {}", "get point() {}", "function getPoints() {}", "function valueToPoint(value, factor) {\n var point = convertToPoint(value, factor);\n point.x -= btx;\n point.y -= bty;\n return point;\n }", ...
[ "0.62482613", "0.5962258", "0.5866827", "0.58285356", "0.5687338", "0.5680192", "0.5566209", "0.5511152", "0.5413508", "0.538008", "0.5377568", "0.53752995", "0.5336009", "0.5319503", "0.5299095", "0.5282555", "0.52649367", "0.52617496", "0.52334887", "0.5219018", "0.52118015...
0.56056577
6
CALCULO RADIACION TERMICA A UNA DISTANCIA DADA (kw/m2)
qTermToDistance(xnp) { return this.SEPmax() * this.fView(xnp) * this.ta(xnp) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculaDistancia(lat1, lon1, lat2, lon2){\n\trad = function(x) {\n\t\treturn x*Math.PI/180;\n\t}\n\tvar R = 6378.137;//Radio de la tierra en km\n\tvar dLat = rad( lat2 - lat1 );\n\tvar dLong = rad( lon2 - lon1 );\n\n\tvar a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(rad(lat1)) * Math.cos(rad(la...
[ "0.6465756", "0.6399877", "0.62807745", "0.6260191", "0.6207594", "0.6201983", "0.61970335", "0.6164678", "0.6161186", "0.61607146", "0.6158831", "0.61243", "0.6122531", "0.61162895", "0.6109302", "0.61072755", "0.6063827", "0.6039948", "0.60193676", "0.6018909", "0.6016526",...
0.0
-1
CALCULO DE LA DISTANCIA (m) A UNA RADIACION TERMICA DADA (KW/M2)
xDistanceToQTerm(radTermica) { //Tolerancia del cálculo const tolerance = 0.01; //Valor de inicio del calculo de dsitancia x; let x = 0; //Radiacion termica var qi = 60; //Calculo de la distancia por iteracion for (x = 1; qi > radTermica; x = x + tolerance) { qi = this.qTermTo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function distanceMeter(km)\n {\n var meters=km*1000;\n return meters;\n\n }", "function calculaDistancia(lat1, lon1, lat2, lon2){\n\trad = function(x) {\n\t\treturn x*Math.PI/180;\n\t}\n\tvar R = 6378.137;//Radio de la tierra en km\n\tvar dLat = rad( lat2 - lat1 );\n\tvar dLong = rad( lon2 - lon1 );\n\n...
[ "0.67468464", "0.6560605", "0.6508903", "0.6410129", "0.6385596", "0.63294774", "0.63287264", "0.6295372", "0.6248484", "0.62414414", "0.62402666", "0.6238315", "0.6226499", "0.6207753", "0.6206825", "0.6203341", "0.62029135", "0.62018037", "0.61706394", "0.61678606", "0.6166...
0.57836056
76
Fonction de gestion d'animation
function animationLoop(sceneThreeJs) { // Fonction JavaScript de demande d'image courante à afficher requestAnimationFrame( // La fonction (dite de callback) recoit en paramètre le temps courant function(timeStamp){ animate(sceneThreeJs,timeStamp); // appel de notre fonction d'anim...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "animation() {}", "function initAnimation() {\n}", "get importAnimation() {}", "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n easing:'easeInOutCirc',\n...
[ "0.8292257", "0.79418254", "0.76319146", "0.7429553", "0.7392633", "0.73704445", "0.7301883", "0.72483426", "0.72122675", "0.72018564", "0.7129694", "0.7015198", "0.70079434", "0.69942874", "0.69770557", "0.69581616", "0.69474506", "0.6926979", "0.69199306", "0.68600786", "0....
0.0
-1
var net = require('net');
function saveToDo() { var newToDo = Alloy.createModel("todo", { title: $.titoloTxt.value, location: $.locationTxt.value, alarm: $.alarmSw.value, duedate: $.dateBtn.title, }); //Ti.API.info(newToDo.toJSON()); if (newToDo.isValid()) { newToDo.save(); Alloy.Collections.todo.add(newToDo); Alloy.Globals.ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NetworkUtil(){}", "function NetworkUtil(){ \n}", "function Network() {}", "function Network() {}", "function Network() {}", "function Network() {}", "function Network() {}", "function Socket() {}", "function netConnection (port, callback){\n var nclient = net.createConnection(port);\n\n...
[ "0.7270612", "0.72004026", "0.66193074", "0.66193074", "0.66193074", "0.66193074", "0.66193074", "0.6143592", "0.59428674", "0.5842611", "0.5711096", "0.54767984", "0.5440005", "0.5436445", "0.5428536", "0.54213357", "0.535694", "0.5348125", "0.53267664", "0.5299976", "0.5264...
0.0
-1
How do you access page scripts from here? How do you make objects available to page scripts from here?
function createStatusWindow(launchData) { chrome.app.window.create("kiosk.html", { 'outerBounds': { 'width': 400, 'height': 500, 'left': 20, 'top': 20 } }, function(win) { win.contentWindow.launchData = launchData; statusWindow = win; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scriptMain() {\n pageSetup();\n\n}", "function loadInpage() {\n // check if already initialized - just in case these scripts were loaded multiple times\n var bootstrapper = new _bootstrap_bootstrap__WEBPACK_IMPORTED_MODULE_0__[\"BootstrapInPage\"]();\n bootstrapper.initialize();\n _quick_ed...
[ "0.6659649", "0.6556069", "0.65177774", "0.6224307", "0.6172741", "0.6149959", "0.60577625", "0.60351217", "0.600637", "0.59787476", "0.596649", "0.59385246", "0.5934691", "0.5900072", "0.58964944", "0.5872362", "0.5865845", "0.5859403", "0.5836101", "0.58148545", "0.58072245...
0.0
-1
Prevent scrolling when the useLayoutEffect hook is in effect.
function useBodyScrollLock() { useLayoutEffect(() => { // get original value of document.body.style.overflow const originalOverflow = window.getComputedStyle(document.body).overflow; document.body.style.overflow = 'hidden'; /** * * return function cleanup() * Function to be run when component is unmount...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preventScrolling(e) {\n e.preventDefault();\n }", "_preventUserScrollForDefaultBehavior() {\n return;\n }", "function preventScrolling(e) {\n e.preventDefault();\n }", "function preventScrolling(e) {\n e.preventDefault();\n }", "function ...
[ "0.6470058", "0.63476104", "0.63271344", "0.63271344", "0.62049705", "0.62049705", "0.619594", "0.6132764", "0.61112255", "0.6101917", "0.60983604", "0.5962807", "0.59399235", "0.58946836", "0.5888638", "0.5846887", "0.58258", "0.58209234", "0.58047456", "0.57979846", "0.5796...
0.7138569
0
takes care of country listing . Function buildRowToSelect creates needed html code (including selection buttons) if the number of countries is between 210. In the other scenarios when no further selection is required code is generated by a separate component listCountriesCont
function formatOutput () { // one country selected, either by search criteria or by clicking the buttob if(theCountry.name !== undefined ) { return ( <div> {ListCountryDetails(theCountry)} </div> ) } // no matches with the name if(foundCountries.length === 0 ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildRowToSelect (country) {\n return(\n <p key={country.alpha3Code}> {country.name} {country.alpha3Code} \n <button id = {country.alpha3Code} onClick = {buttonClickHandler} type=\"submit\">Select</button> </p>\n )\n }", "function populateCountrySelect() {\n\n let countriesInfo = c...
[ "0.71922356", "0.68012077", "0.6361457", "0.6250292", "0.6248162", "0.6228756", "0.62102383", "0.6174636", "0.60761255", "0.6075382", "0.5986016", "0.59657", "0.59650874", "0.5945103", "0.5936606", "0.5901069", "0.5891663", "0.5878408", "0.5872263", "0.5870069", "0.58600914",...
0.6086411
8
builds the html for the contry. alpha3Code (3 letter acronym for the country) is the unique identfied for the button (id) which will be used when clicked to identify the specific country
function buildRowToSelect (country) { return( <p key={country.alpha3Code}> {country.name} {country.alpha3Code} <button id = {country.alpha3Code} onClick = {buttonClickHandler} type="submit">Select</button> </p> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCountriesButtons(c){\n obj=''\n for(i=0;i<c.length;i++){\n obj +='<div id=\"country-'+i+'\" class=\"w3-light-grey countries w3-card-2\" title=\"'+c[i]+'\" onclick=\"fetchCountryRequestJourneyReviews(this)\"><span class=\"w3-text-blue menu-text pd-8\">'+c[i]+'</span></div>'\n }\n $('.count...
[ "0.7129575", "0.6233942", "0.6207984", "0.6121232", "0.61103946", "0.60791075", "0.6022691", "0.6004053", "0.5955977", "0.5906627", "0.5897479", "0.5887538", "0.58713335", "0.58551496", "0.582948", "0.578035", "0.5766518", "0.57474196", "0.57336104", "0.57268274", "0.5692761"...
0.6441172
1
update function checks if there are filters
function updateMap(airmeasurements){ // Before updating check the settings of the filters. var markers = []; googleMap.removeAllMarkers(); appViewModel.stationList(["-- Stations --"]); $.each(airmeasurements, function(key, measurement){ // create basic marker via position. v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateFilter () {\n upsertFilterForField(fieldName, filterEl.value);\n }", "function updateFilterChanged() {\n fillUpdateQuestions();\n fillUpdateForm();\n}", "function updateFilteredSearch(){\n \n if(typeof searchPnt != \"undefined\")\n findProviders(pro...
[ "0.7610477", "0.7200824", "0.69188327", "0.69027644", "0.685491", "0.67466867", "0.6728573", "0.6723593", "0.6711523", "0.66993475", "0.66673857", "0.6631373", "0.66193813", "0.6612587", "0.6601401", "0.6556644", "0.65527433", "0.6543556", "0.6427265", "0.64003664", "0.639742...
0.0
-1
Helper function to sort the station select list. The list has to be sorted by ending number.
function sortStationSelectList(unsortedList){ // Need a list with the amount of stations (1 is the -- Stations -- entry) var sortedList = [unsortedList.length-1]; // split the listitems in text and number. for(var index = 0; index < unsortedList.length; index++){ if(unsortedList[index] === '-- Stations...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sort(){\n var toSort = S('#sched-list').children;\n toSort = Array.prototype.slice.call(toSort, 0);\n\n toSort.sort(function(a, b) {\n var a_ord = +a.id.split('e')[1]; //id tags of the schedule items are timeINT the INT = the numeric time\n var b_ord = +b.id.spli...
[ "0.6137086", "0.5862646", "0.57148933", "0.5582472", "0.5562966", "0.5541361", "0.55305606", "0.55159295", "0.55110556", "0.5475046", "0.54279274", "0.54191047", "0.54108316", "0.5381597", "0.5377379", "0.5370639", "0.536511", "0.5357387", "0.5355979", "0.5340782", "0.5335728...
0.8312858
0
A function to color markers on the map according to the level of noxious substance in the air, there are three levels so far.
function checkFilters(airmeasurement, marker){ var level = ""; if(appViewModel.ozoneSet === true ){ var ozon = airmeasurement.getOzon(); level = airfilter.getOzoneLevel(ozon); googleMap.setMarkerIcon(marker, level); } if(appViewModel.no2Set === true ){ var no2 = airmeasurement.getN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorMarker (depth) {\n if (depth > 90 ) {\n return \"#3AB341\"\n }\n if (depth > 70) {\n return \"#00eede\"\n }\n if (depth > 50) {\n return \"#0073ee\"\n }\n if (depth > 30) {\n return \"#ee9c00\"\n }\n if (depth > 10) {\n return \"#d600ee\"\n }\n else {\n return \"#ea782c\"...
[ "0.73879653", "0.7317091", "0.7248718", "0.66964984", "0.64561975", "0.64500326", "0.6374296", "0.6338992", "0.63300365", "0.63261205", "0.6296971", "0.6291525", "0.62882197", "0.6185379", "0.61458904", "0.59588206", "0.59405094", "0.59187526", "0.5901389", "0.5831724", "0.58...
0.0
-1
store previous measurements for reference
function storePreviousMeasurements(){ previousMeasurements = airmeasurements.slice(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMeasuremetns() {\n\t\tvar newMeasurement = this.newValue;\n\t\tvar oldMeasurement = localStorage.getItem('measureValue');\n\n\t\treturn {new: newMeasurement, old: oldMeasurement};\n\t}", "__init() {this._measurements = {};}", "__init() {this._measurements = {};}", "__init() {this._measurements = {};}", ...
[ "0.6456795", "0.63890016", "0.63890016", "0.63890016", "0.6304827", "0.61790365", "0.6149419", "0.5979952", "0.5979442", "0.5835259", "0.57996476", "0.57945305", "0.577961", "0.57620174", "0.5717353", "0.5714345", "0.56519663", "0.564947", "0.5649025", "0.5641542", "0.5640701...
0.8492835
0
Failed to do this with ko.js it will not bind to span set display none
function closeHelp(){ $('#map').show(); $("#modal").slideUp("slow"); $('#controlMenu').show(); $('#help-btn').show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static set visible(value) {}", "setVisible() {\n element.removeClass('hidden');\n }", "setVisible() {\n element.removeClass('hidden');\n }", "hide () {\n this.showing = false\n this.element ? this.element.update(this) : null\n }", "changeDisplay() {\n this.displayMarkup = !this.displa...
[ "0.6056759", "0.6045352", "0.6045352", "0.60001063", "0.5930116", "0.5875007", "0.5847958", "0.58053523", "0.57120895", "0.57102835", "0.5653818", "0.56382495", "0.56353307", "0.56274986", "0.56181896", "0.56115204", "0.56113935", "0.5606392", "0.55862224", "0.5584255", "0.55...
0.0
-1
Make sure to remove the DOM listener when the component is unmounted.
componentWillUnmount() { window.removeEventListener("scroll",this.scrollNavigation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, tru...
[ "0.7633893", "0.75896627", "0.75309604", "0.74860066", "0.7478146", "0.74651057", "0.7461891", "0.7457235", "0.74252725", "0.74065685", "0.73787093", "0.73204577", "0.73193306", "0.72909427", "0.72887236", "0.7282852", "0.7269165", "0.72684735", "0.72662735", "0.72591466", "0...
0.0
-1
Ext defined for Sequelize ext
function Ext(_ref) { let { m, sequelize } = _ref; if (!(this instanceof Ext)) { return new Ext({}); } this.sequelize = sequelize; this.m = m || []; this.api = api.Api({ ext: this }); } // Register model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initSequelize () {\n return new Sequelize('vmail', config.postgresUser, config.postgresPass, {\n host: config.postgresHost,\n dialect: 'postgres',\n\n pool: {\n max: 5,\n min: 0,\n acquire: 30000,\n idle: 10000\n },\n\n // http://docs.sequelizejs.com/manual/t...
[ "0.6492779", "0.6275404", "0.60779214", "0.59811133", "0.5975257", "0.59160805", "0.58935046", "0.584575", "0.5834232", "0.5804402", "0.57291216", "0.56496257", "0.5605289", "0.5603019", "0.5591967", "0.5547054", "0.55344975", "0.5532962", "0.5531317", "0.55201733", "0.551671...
0.6981718
0
have hover over color changes for the buttons
function up(button) { console.log('button )up', arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hoverButtonColorOn(e) {\n e.target.style.background = '#c4941c';\n}", "function hoverButtonColorOff(e) {\n e.target.style.background = 'goldenrod';\n}", "function hover() {\n raycaster.setFromCamera( pointer, camera );\n const intersects = raycaster.intersectObjects( buttons ); // De objecte...
[ "0.8069716", "0.74553394", "0.72847366", "0.72403604", "0.7103481", "0.70641446", "0.69976944", "0.6995165", "0.69252354", "0.69161636", "0.68258685", "0.68235695", "0.6760446", "0.6736163", "0.6735139", "0.67290473", "0.67229486", "0.6678047", "0.6657912", "0.665716", "0.665...
0.0
-1
set links to other states for the buttons and reset variables
function actionOnClick(){ score = 0; health = 100; reach = 0; day = 1; game.state.start('brushing'); console.log('click'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetStates() {\n $(\"#connectBtn\").text(\"Connect\").prop('disabled',false);\n $(\"#publishBtn\").text(\"Start\").prop('disabled',true);\n $(\"#playBtn\").text(\"Start\").prop('disabled',true);\n $(\"#publishStatus\").text(\"\");\n $(\"#playStatus\").text(\"\");\n $(\"#publishStream\")...
[ "0.6717301", "0.66568226", "0.65466726", "0.65080315", "0.64570093", "0.64320976", "0.64209646", "0.6409817", "0.63963336", "0.63874173", "0.6381072", "0.6342562", "0.6301313", "0.6263042", "0.6212285", "0.62121093", "0.62072635", "0.61863637", "0.61762804", "0.6161722", "0.6...
0.0
-1
Display the countries after 1 second
function displayCountries() { setTimeout(function() { let html = '' countries.forEach(function(country){ html += `<li>${country} </li>` }) document.body.innerHTML = html },1000) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCountries(){\n\tsetTimeout(function(){\n\t\tlet html='';\n\t\tcountries.forEach(function(country){\n\t\t\thtml+=`<li>${country}</li>`\n\t\t})\n\t\tdocument.body.innerHTML=html;\n\t},1000);\n}", "async function showCountries() {\n try {\n const countries = await networkApi('GET', baseApi...
[ "0.7990914", "0.67421275", "0.65802735", "0.64314187", "0.6350826", "0.62859195", "0.6243723", "0.62293965", "0.6187955", "0.6182342", "0.61813605", "0.6135624", "0.6123473", "0.61084604", "0.609725", "0.60729593", "0.60714024", "0.6039742", "0.60222673", "0.5988713", "0.5972...
0.7869655
1
this is used for creating the collapsible section for abstracts
function activateCollapsible(id) { if (window.addEventListener) { window.addEventListener("load", function(){makeCollapsible(document.getElementById(id), 1);}, false); } else if (window.attachEvent) { window.attachEvent("onload", function(){makeCollapsible(document.getElementById(id), 1);}); } else { window....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapsibleStyling() {\n var coll = document.getElementsByClassName(\"collapsible\");\n \n var i;\n \n for (i = 0; i < coll.length; i++) {\n coll[i].addEventListener(\"click\", function() {\n this.classList.toggle(\"active\");\n var content = this.nextElementSibling;\n ...
[ "0.62325233", "0.6152901", "0.600781", "0.5973875", "0.59675795", "0.59396404", "0.5911231", "0.59043986", "0.5849476", "0.58434063", "0.5836832", "0.58233035", "0.58170563", "0.57703763", "0.5766933", "0.5752544", "0.5727227", "0.57032037", "0.5664705", "0.56641805", "0.5654...
0.0
-1
used to bold the author names in the citation
function bold_citation(count) { for (var i = 1; i <= count; i++) { citation = document.getElementById('citation' + i); citation.innerHTML = citation.innerHTML.replace(/([^0-9]+\([0-9]{4}\))/g, "<strong>$1</strong>"); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function authorNameComp (author) {\n const authorName = document.createElement('span')\n authorName.textContent =author\n\n return authorName\n}", "function getStringForAuthors (authors){\n let tempstr = '';\n authors.forEach((a, index) => { \n tempstr += `Author ${index + 1}: \\t ${a.firs...
[ "0.651948", "0.63021994", "0.626354", "0.61818606", "0.6093839", "0.6057772", "0.60149056", "0.59895504", "0.59623694", "0.59295976", "0.5874373", "0.5831302", "0.582197", "0.581058", "0.5807878", "0.57903594", "0.5778948", "0.57762206", "0.56873006", "0.5672314", "0.5666939"...
0.6865425
0
following methods are used for highlighting the keywords / This is the function that actually highlights a text string by adding HTML tags before and after all occurrences of the search term. You can pass your own tags if you'd like, or if the highlightStartTag or highlightEndTag parameters are omitted or are empty str...
function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) { // the highlightStartTag and highlightEndTag parameters are optional if ((!highlightStartTag) || (!highlightEndTag)) { highlightStartTag = "<font style='color:blue; background-color:yellow;'>"; highlightEndTag = "</font>"; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) \r\n{\r\n // the highlightStartTag and highlightEndTag parameters are optional\r\n if ((!highlightStartTag) || (!highlightEndTag)) {\r\n highlightStartTag = \"<font style='color:blue; background-color:#00B2EE;'>\";\r\n highlight...
[ "0.7600529", "0.7561013", "0.6991937", "0.6949374", "0.68639255", "0.68309164", "0.68253255", "0.6803858", "0.67112136", "0.66346645", "0.65604496", "0.6475288", "0.6374269", "0.6359349", "0.6300394", "0.623235", "0.6219538", "0.61685485", "0.61459255", "0.6111397", "0.610788...
0.7527262
2
This is sort of a wrapper function to the doHighlight function. It takes the searchText that you pass, optionally splits it into separate words, and transforms the text on the current web page. Only the "searchText" parameter is required; all other parameters are optional and can be omitted.
function highlightSearchTerms(searchText, highlightableArea, treatAsPhrase, warnOnFailure, highlightStartTag, highlightEndTag) { // if the treatAsPhrase parameter is true, then we should search for // the entire phrase that was entered; otherwise, we will split the // search string so that each word is searched ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightSearchTerms(searchText, treatAsPhrase, warnOnFailure, highlightStartTag, highlightEndTag)\r\n{\r\n // if the treatAsPhrase parameter is true, then we should search for \r\n // the entire phrase that was entered; otherwise, we will split the\r\n // search string so that each word is searched fo...
[ "0.7637805", "0.6782767", "0.66529626", "0.6627928", "0.6501368", "0.63504475", "0.61282533", "0.61173844", "0.60596156", "0.605178", "0.60259175", "0.5929649", "0.59290636", "0.58917636", "0.58889544", "0.5782172", "0.5779289", "0.57469255", "0.5708186", "0.5676266", "0.5672...
0.72421503
1
1 = show, 0 = hide / makeCollapsible makes a list have collapsible sublists listElement the element representing the list to make collapsible
function makeCollapsible(listElement,listState) { if(listState!=null) defaultState=listState; // removed list item bullets and the sapce they occupy listElement.style.listStyle='none'; listElement.style.marginLeft='0'; listElement.style.paddingLeft='0'; // loop over all child elements of the list var ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCollapsibleListItem() {\n return this.each(function () {\n var li = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);\n var ul = li.find('> ol, > ul').first();\n\n if (ul.length > 0) {\n var prev = li.clone();\n prev.find('ol, ul').remove();\n var listId = li.attr('id');\n\n...
[ "0.710117", "0.69072783", "0.6818219", "0.67908525", "0.67621404", "0.6499507", "0.6453155", "0.64200926", "0.63939095", "0.62957203", "0.6273335", "0.6261988", "0.6250503", "0.617639", "0.6150004", "0.6149756", "0.60626805", "0.6013717", "0.6009258", "0.5986468", "0.5980998"...
0.7875522
0
createToggleFunction returns a function that toggles the sublist display toggleElement the element representing the toggle gadget sublistElement an array of elements representing the sublists that should be opened or closed when the toggle gadget is clicked
function createToggleFunction(toggleElement,sublistElements) { return function() { // toggle status of toggle gadget if (toggleElement.getAttribute('class')=='collapsibleClosed'){ toggleElement.setAttribute('class','collapsibleOpen'); toggleElement.setAttribute('src',expandedImage); }else{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleList() {}", "function mc_sideListDetailToggle(element, expand) {\n var toggleIcon = element.getElementsByClassName(\"mc_sideListDetailToggleIcon\")[0];\n var liChildren = element.parentNode.children;\n var details = liChildren[1]; //div\n\n if (expand == undefined) {\n //toggle\n ...
[ "0.63642496", "0.63226086", "0.6243768", "0.62334335", "0.61565816", "0.6143133", "0.5895088", "0.5886282", "0.58830255", "0.58208126", "0.5721518", "0.57101905", "0.56642824", "0.5663093", "0.5661231", "0.56368005", "0.5624909", "0.56132", "0.5571342", "0.5503246", "0.550281...
0.82218754
0
Handle styling of the navbar.
function styleNavigation() { var bounds = [], ieScrollTop = document.documentElement.scrollTop, scrollTop = document.body.scrollTop == 0 ? ieScrollTop : document.body.scrollTop; $('.invert-navbar').each(function() { bounds.push([ $(this).offset().top, $(this).offset().top + $(this).heigh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderNavBar() {\n\t //if navBar, delete\n\t var oldNav = document.querySelector('.cat-nav-bar');\n\n\t if (oldNav) {\n\t oldNav.parentNode.removeChild(oldNav);\n\t }\n\n\t var newNavBar = createNavBar(cats);\n\n\t catHolderMaster.appendChild(newNavBar);\n\n\t}", "function style...
[ "0.6644177", "0.6453714", "0.6393141", "0.63463813", "0.6309544", "0.62785316", "0.62740856", "0.62335324", "0.6184276", "0.61604124", "0.6146559", "0.6146221", "0.610567", "0.61016786", "0.6059581", "0.60371846", "0.6018992", "0.6010777", "0.59912944", "0.59643435", "0.59069...
0.60471815
15
Add the list of boroughs to the dropdown menu
function addBoroughsToLineChartDropdown() { d3.select("#borough-dropdown-button") .text(common.boroughs[0].name); lineChart.selectedBorough = common.boroughs[0]; for (let i = 0; i<common.boroughs.length; i++) { d3.select("#borough-dropdown-menu") .append("a") .attr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadBrgys(event){\n\t\t\tselectBrgy.html('<option value=\"\">Select Barangay...</option>');\n\t\t\tfor (i in brgys) {\n\t\t\t\tif ( brgys[i].brgyCode.indexOf(event.target.value) == 0 ) {\n\t\t\t\t\tselectBrgy.append($('<option>', {\n\t\t\t\t\t value: brgys[i].brgyCode,\n\t\t\t\t\t text: brgys[i].brg...
[ "0.69293827", "0.67743963", "0.6762089", "0.67186415", "0.66092443", "0.6599452", "0.6598457", "0.6569213", "0.6559381", "0.65479296", "0.64688176", "0.6459411", "0.6455899", "0.64254993", "0.63983613", "0.63786155", "0.6346217", "0.6346174", "0.63425714", "0.63359225", "0.63...
0.71748674
0
A new borough was selected
function boroughSelected(boroughItem) { let boroughName = $(boroughItem).text(); d3.select("#borough-dropdown-button") .text(boroughName); lineChart.selectedBorough = common.boroughs.filter(borough => { return borough.name === boroughName; })[0]; updateLineChartVisualisation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectBun(bun) {\n\n if($scope.model.selectedBurger.bun) {\n $scope.model.selectedBurger.bun.selected = false;\n }\n\n $scope.model.selectedBurger.bun = bun;\n $scope.model.selectedBurger.bun.selected = true;\n\n selectStep('meat');\n }", "countySelected() {\n d...
[ "0.592045", "0.5916944", "0.57237047", "0.5677693", "0.5564267", "0.5559532", "0.55422735", "0.5512682", "0.54908466", "0.54698116", "0.54679066", "0.5359546", "0.5346324", "0.53455263", "0.5323482", "0.5320913", "0.5314204", "0.53115976", "0.52878857", "0.5282324", "0.527894...
0.70153344
0
Add onchange events for the mean and median buttons
function setupLineChartMeanMedianButtons() { d3.select("#mean") .attr("onchange", "meanMedianSelected(this)"); d3.select("#median") .attr("onchange", "meanMedianSelected(this)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function meanMedianSelected(item) {\n lineChart.selectedMode = $(item).attr(\"name\");\n updateLineChartVisualisation();\n}", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed in...
[ "0.6461564", "0.5827448", "0.5827448", "0.5804256", "0.57474566", "0.56056553", "0.55569994", "0.54934627", "0.5492049", "0.53610843", "0.5349209", "0.53337556", "0.5313885", "0.52939546", "0.52863806", "0.5281291", "0.52359265", "0.52347535", "0.5229622", "0.5217321", "0.519...
0.7997247
0
Selected a new mean/median option
function meanMedianSelected(item) { lineChart.selectedMode = $(item).attr("name"); updateLineChartVisualisation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupLineChartMeanMedianButtons() {\n d3.select(\"#mean\")\n .attr(\"onchange\", \"meanMedianSelected(this)\");\n\n d3.select(\"#median\")\n .attr(\"onchange\", \"meanMedianSelected(this)\");\n}", "function showSim() {\n var selectedMethod = document.getElementById(\"feature-vecto...
[ "0.69625485", "0.5975848", "0.5511031", "0.5507536", "0.549519", "0.54733664", "0.5470314", "0.5458857", "0.5442527", "0.54424125", "0.54383403", "0.5414571", "0.53984255", "0.5364085", "0.53553176", "0.53224945", "0.5286532", "0.52747935", "0.5229058", "0.5213708", "0.518441...
0.7490031
0
Creates and initialise visualisation to initial dummy data
function createLineChartVisualisation() { let mode = lineChart.selectedMode; let incomes = lineChart.selectedBorough[mode]; //Create (x, y) axes lineChart.xAxis = d3.scaleLinear() .domain(d3.extent(lineChart.years)) .range([0, lineChart.width]); lineChart.yAxis = d3.scaleLinear() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialize() {\n\t\t\n\t\tsvg = scope.selection.append(\"svg\").attr(\"id\", scope.id).style(\"overflow\", \"visible\").attr(\"class\", \"vizuly\");\n\t\tbackground = svg.append(\"rect\").attr(\"class\", \"vz-background\");\n\t\tdefs = vizuly2.util.getDefs(viz);\n\t\tplot = svg.append('g');\n\t\t\n\t\tsco...
[ "0.6981612", "0.6911304", "0.6827185", "0.6734231", "0.66743225", "0.65913683", "0.65568715", "0.6525968", "0.65082365", "0.64865535", "0.64753234", "0.6466619", "0.64348906", "0.64132977", "0.64077866", "0.6382984", "0.6348299", "0.63420683", "0.6328862", "0.6325104", "0.632...
0.0
-1
Update visualisation to show new data
function updateLineChartVisualisation() { let mode = lineChart.selectedMode; let incomes = lineChart.selectedBorough[mode]; lineChart.updatingVisualisation = true; // Update y axis values if a new mode was selected lineChart.yAxis = d3.scaleLinear() .domain([0, common.maxIncome[mode]]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n \n // data\n var key = Object.keys(ids).find( key => ids[key] == this.value) ;\n var newId = data.id[key];\n var newValue = data.value[key];\n var newDemo = data.demographics[key];\n \n // bar chart\n Plotly.restyle('bar', 'x', [newVa...
[ "0.7350457", "0.7209414", "0.71536463", "0.70371205", "0.702613", "0.6963736", "0.69492275", "0.69298613", "0.6867555", "0.6855158", "0.6850695", "0.68453306", "0.68374133", "0.6817379", "0.6764241", "0.6724217", "0.6708474", "0.66979533", "0.66710067", "0.66639316", "0.66613...
0.0
-1
Create vertical grid lines
function verticalGridlines() { return d3.axisBottom(lineChart.xAxis) .ticks(lineChart.years.length) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGrid() { \n\n//to clear the canvas\nctx.fillStyle = \"#37474F\";\nctx.fillRect(0, 0, w, h);\n\nfor(var i = 0;i<=h/box ;i++) {\n //vertical lines\n ctx.setLineDash([1, 0.5]); \n ctx.beginPath(); \n ctx.strokeStyle = \"#efefef\";\n ctx.moveTo(0,box*i); \n ctx.lineTo(w,box*i)...
[ "0.7302843", "0.7287606", "0.726391", "0.7208345", "0.7081565", "0.7078734", "0.7076155", "0.7039394", "0.70176774", "0.7003978", "0.69752985", "0.69582117", "0.68803215", "0.6842023", "0.67977536", "0.67748076", "0.67198634", "0.6682628", "0.6620375", "0.65924853", "0.657995...
0.6756995
16
Mouse entered the data point area
function mouseOverDataPoint(dataPoint) { // Apply transition if previous transition has finished if (!lineChart.updatingVisualisation) { dataPoint .transition() .ease(d3.easeElastic) .duration(800) .attr("r", 8) .style('stroke-width', '0px') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseDown(pt) {}", "mouseDown(pt) {}", "function mousePressed(){\n strokeWeight(controllers.pointStroke);\n stroke(255);\n current = createVector(mouseX, mouseY);\n point(mouseX, mouseY);\n}", "function mouseClicked() {\n // normalize point\n let x = map(mouseX, 0, width, 0, 1);\n let y = map(mo...
[ "0.68062806", "0.68062806", "0.67825645", "0.6717723", "0.6664526", "0.6623826", "0.6610042", "0.65896857", "0.65853816", "0.6577", "0.65452373", "0.65359914", "0.65359914", "0.653009", "0.6525574", "0.6521391", "0.6516922", "0.6515873", "0.6500574", "0.6461391", "0.6460697",...
0.0
-1
Mouse pointer left the data point area
function mouseOutDataPoint(dataPoint) { if (!lineChart.updatingVisualisation) { dataPoint .transition() .ease(d3.easeElastic) .duration(800) .attr("r", 7) .style('stroke-width', '3px') .style("fill", "var(--highlight-blue)"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseDown(x, y, _isLeftButton) {}", "mouseDown(pt) {}", "mouseDown(pt) {}", "mouseMove(prev, pt) {}", "mouseUp(x, y, _isLeftButton) {}", "mouseUp(pt) {}", "mouseUp(pt) {}", "mouseDrag(prev, pt) {}", "mouseDrag(prev, pt) {}", "function mousePressed() {y=1}", "function mysketchpad_mouseUp() {\n ...
[ "0.68913794", "0.67992795", "0.67992795", "0.6767874", "0.67516863", "0.67477137", "0.67477137", "0.65597546", "0.65597546", "0.65482163", "0.65130407", "0.6460092", "0.6449441", "0.6442913", "0.644119", "0.64375913", "0.6430551", "0.642384", "0.6393654", "0.6343031", "0.6283...
0.0
-1
The timebox accepts two attributes: "locale" which sets the default way the date is rendered "options", which corresponds to a DateTimeFormat object:
function populate_timebox() { var locale = global_configdata.boxes.timebox.hasOwnProperty("locale") ? global_configdata.boxes.timebox.locale : "en-US"; var options = global_configdata.boxes.timebox.hasOwnProperty("options") ? global_configdata.boxes.timebox.options : {}; document.getElementById("timetext")....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getTimeFormat() {\n const timeFormat = this.get('timeFormat.selected.format') || this.get('timeFormat.options').findBy('key', config.timeFormatDefault).format;\n // remove the milliseconds since the date control doesn't support that level of precision, and it causes issue with AM / PM in the picker.\n re...
[ "0.6368774", "0.6273667", "0.6187227", "0.60955614", "0.5896297", "0.5882433", "0.5879684", "0.5879218", "0.58585787", "0.5717902", "0.5693138", "0.5616647", "0.5603178", "0.5603178", "0.5603178", "0.5603178", "0.5569932", "0.5557402", "0.555439", "0.5536858", "0.55366886", ...
0.6979691
0
The following function is used to load remote services not hosted on the same domain. To disable a particular remote service, simply comment out the block of lines which dynamically load its script. The text on the page will continue to display the contents of the "placeholder" string from your user.json file.
function load_remote_services() { //Remote service: onion.to //Populates: ipbox, torbox //Rate limit: Not specified //Documentation: https://github.com/globaleaks/Tor2web/wiki/CheckTor /* var remote_service_ip = document.createElement("script"); remote_service_ip.setAttribute("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableautoserveraddress() {\n $(\"#fulladdress\").removeAttr(\"disabled\");\n $(\"#serverport\").removeAttr(\"disabled\");\n $(\"#altfulladdress\").removeAttr(\"disabled\");\n\n configdata[\"Connection\"][\"UseURLAddress\"] = false;\n}", "injectWidget(){\n var id = parseInt(this.state.id...
[ "0.55433875", "0.534075", "0.5311177", "0.5293223", "0.5216503", "0.5181309", "0.51518947", "0.51498467", "0.5142987", "0.5120883", "0.5087243", "0.50840783", "0.5082244", "0.5057268", "0.5046001", "0.5009778", "0.49951145", "0.49803787", "0.49792403", "0.497768", "0.49382576...
0.629876
0
First I created Routers folder in which I created 4 files i.e: home, about, contact, sign up in this sction i will clear how to navigate to other pages in react js what is Router ?? React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Applicatio...
function Routes(){ const history =useHistory(); return( <div> <button className =" btn btn-danger btn-large" onClick ={()=> history.push("/home")}>Home</button> <button className =" btn btn-warning btn-large" onClick ={()=> history.push("/about")}>About us</button> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function App() {\n return (\n <Router>\n <div className=\"App\">\n <h2>React Router</h2>\n <nav>\n <Link to={'/Home'}>Home</Link>\n <Link to={'/About'}>Form</Link>\n <Link to={'/COntact'}>Contact</Link>\n \n </nav>\n <hr/>\n <Switch>\n <Route path='/Home' ...
[ "0.7245146", "0.7087537", "0.70000136", "0.6947828", "0.6852013", "0.68229425", "0.67378163", "0.6654644", "0.6654232", "0.6649243", "0.6645559", "0.66406864", "0.662825", "0.6624722", "0.6616064", "0.6608052", "0.65753627", "0.65724975", "0.6557341", "0.6543125", "0.64964134...
0.78552014
0
This function is Path.prototype.draw with an arrow at the end of each contour.
function drawPathWithArrows(ctx, path) { var i, cmd, x1, y1, x2, y2; var arrows = []; ctx.beginPath(); for (i = 0; i < path.commands.length; i += 1) { cmd = path.commands[i]; if (cmd.type === 'M') { if(x1 !== undefined) { arrows...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n\n var canvas = document.getElementById( 'map_canvas' );\n var bgImg = new Image(); \n if( canvas.getContext ){\n\n var ctx = canvas.getContext('2d');\n bgImg.src = MAP_IMG;\n bgImg.onload = function() {\n \n ctx.clearRect( 0, 0, MAP_WIDTH, ...
[ "0.6431913", "0.6403394", "0.63121396", "0.62906444", "0.6282287", "0.62602645", "0.6207915", "0.6201244", "0.61966527", "0.6193794", "0.61913425", "0.61913425", "0.613362", "0.61177397", "0.6082592", "0.606565", "0.60642296", "0.60181737", "0.5961447", "0.5951172", "0.594380...
0.6353836
2
Smooth Scrolling of ID anchors
function filterPath(string) { return string .replace(/^\//,'') .replace(/(index|default).[a-zA-Z]{3,4}$/,'') .replace(/\/$/,''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smoothScroll() {\n let anchorList = document.querySelectorAll('a[href^=\"#\"]');\n anchorList.forEach(link => { \n link.addEventListener('click', function(e) { \n \n // Prevent default scrolling event\n e.preventDefault(); \n \n // Get the destin...
[ "0.7788601", "0.76331544", "0.76271343", "0.76268524", "0.75990856", "0.7577458", "0.75622135", "0.75474906", "0.7491506", "0.74849164", "0.74738175", "0.7433244", "0.7413021", "0.7398733", "0.7395639", "0.73778945", "0.73778945", "0.73778945", "0.73715705", "0.73715705", "0....
0.0
-1
use the first element that is "scrollable"
function scrollableElement(els) { for (var i = 0, argLength = arguments.length; i <argLength; i++) { var el = arguments[i], $scrollElement = $(el); if ($scrollElement.scrollTop()> 0) { return el; } else { $scrollElement.scrollTop(1); var isScrollable = $scrollElem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UltraGrid_SetFirstScroll(theObject)\n{\n\t//not yet done?\n\tif (!theObject.Paint.FirstScroll)\n\t{\n\t\t//iterate through the panels\n\t\tfor (var panels = theObject.Data.Panels, i = 0, c = panels.length; i < c; i++)\n\t\t{\n\t\t\t//get the panel (ease of use)\n\t\t\tvar panel = panels[i];\n\t\t\t//does ...
[ "0.6710313", "0.6677808", "0.6646264", "0.64326274", "0.63990724", "0.6396557", "0.6392368", "0.63844633", "0.63327396", "0.63312393", "0.63111025", "0.63064057", "0.62419415", "0.62419415", "0.62419415", "0.62419415", "0.62400675", "0.62400675", "0.62400675", "0.6230506", "0...
0.6503258
10
const client = new Telegraph('8ade475cc852e90ba88cc1bb38daf98b16a842149a168063d1f1d9c1bf06')
async function get(x) { // x = x || 5 // client.getPageList().then((pages) => { // let list = pages.pages // var items = list.filter((list,idx) => idx < x) // let recipes = items // .map(({ title, url }) => ( // "\n\n ["+title+"]("+url+")" // )) let re = await tgph(["50.4825,30.4887","FEEE FU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.client = new Client({\n auth: process.env.NOTION_TOKEN,\n });\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(cl...
[ "0.6272542", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106", "0.60291106",...
0.0
-1
Load User with API
function ExternalUsers (){ const [users, setUsers] = useState([]); useEffect(()=>{ fetch('https://jsonplaceholder.typicode.com/users') .then(res=> res.json()) .then(data => setUsers(data)) },[]); return( <div> <h3>External Users</h3> { users.map(user=> <User name = {user.na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadUser() {\r\n makeHTTPRequest(`/usuarios/${uId}`, 'GET', '', cbOk1);\r\n}", "function load (req, res, next, id) {\n User.get(id)\n .then((result) => {\n req.user = result;\n return next()\n })\n .catch(e => next(e))\n}", "function load(req, res, next, id) {\n User.ge...
[ "0.7770111", "0.7325968", "0.71406657", "0.70884115", "0.7087243", "0.70738196", "0.70611954", "0.7033659", "0.7030937", "0.7030937", "0.7030937", "0.7016316", "0.70049155", "0.69895345", "0.6952856", "0.6924227", "0.68891484", "0.6877715", "0.6861647", "0.682301", "0.6808326...
0.0
-1