query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Uses a datetime formatted date, and creates a javascript Date object from it
function _datetime_to_date( datetime ) { //function parses mysql datetime string and returns javascript Date object //input has to be in this format: 2007-06-05 15:26:02 var regex = /^([0-9]{2,4})-([0-1][0-9])-([0-3][0-9]) (?:([0-2][0-9]):([0-5][0-9]):([0-5][0-9]))?$/; var parts = datetime.replace( regex, '$1 $2 $3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildDateFromDate(date){\r\n\tvar year = date.getFullYear();\r\n\tvar month = date.getMonth();\r\n\tvar day = date.getDate();\r\n\tvar hour = date.getHours();\r\n\t\t\r\n\tvar dDate = new Date(year, month, day, hour);\r\n\tvar sDate = Date.parse(dDate);\r\n\treturn sDate;\r\n}", "function buildDateFromD...
[ "0.67986006", "0.67986006", "0.67983484", "0.67150766", "0.66674197", "0.66415715", "0.6599296", "0.6554833", "0.65357083", "0.65170085", "0.6491959", "0.6460074", "0.6455366", "0.6359326", "0.6321846", "0.62926114", "0.6292502", "0.6272686", "0.6261518", "0.6237667", "0.6215...
0.68567085
0
Returns an array of 100,000 objects containing a letter and number property. Letter is a random letter Number is a random number between 1 and 1,000,000
function generateRandomData() { window.performance.mark('mark_data_generation_started'); var garbageArray = []; for (var i = 0; i < 10000; i++){ garbageArray.push( { letter: String.fromCharCode(97 + Math.floor(Math.random() * 26)), number: Math.floor(Math.random() * 1000000) } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateLetterDistribution(json) {\n let distri = [];\n for (var i = 0; i < 27; i++) {\n for (var j = 0; j < json.pieces[i].amount; j++) {\n distri.push(json.pieces[i].letter);\n }\n }\n return distri;\n }", "function createData(){\n\t\...
[ "0.6337029", "0.6318208", "0.62848216", "0.6225203", "0.616702", "0.61606205", "0.6128052", "0.6121492", "0.6064104", "0.60441023", "0.59970874", "0.5986098", "0.5957904", "0.59550846", "0.59309655", "0.5929664", "0.59133625", "0.5907258", "0.59023756", "0.5880431", "0.584744...
0.69604236
0
Based on pseudocode from Wikipedia and SHA1.java time to digest 930M file: real 0m39.278s user 0m39.152s sys 0m0.043s sha1sum: real 0m41.311s user 0m26.689s sys 0m1.266s
function SHA1(input) { // Initialize variables: let h0 = 0x67452301; let h1 = 0xEFCDAB89; let h2 = 0x98BADCFE; let h3 = 0x10325476; let h4 = 0xC3D2E1F0; const w = new Int32Array(80); let a, b, c, d, e; let f, k, temp; /** Currently only works for messages length < 2^32 bits. */ function addDig...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function core_sha1(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (24 - len % 32);\n x[((len + 64 >> 9) << 4) + 15] = len;\n var w = Array(80);\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n var e = -1009589776;\n for (var i = 0; i < x.length; i += 16) {\n var...
[ "0.71405035", "0.71095705", "0.7095562", "0.70723987", "0.7059939", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7026006", "0.7014931", "0.7007373", "0.7007373", "0.6967896", "0.692521", ...
0.7310988
0
function to check for only integer or decimal
function isIntDecimal(value) { //var res = value.match(/^\d+(\.\d+)?$/); if(!value.match(/^\d+(\.\d+)?$/)) return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isWholeOrDecimal(num){\n if (parseInt(num) === num){\n return \"whole num\";\n }else {\n return \"decimal num\";\n }\n}", "function isdecimal(num) {\n return (/^\\d+(\\.\\d+)?$/.test(num + \"\"));\n}", "function numericTypeCheck(input) {\r\n return /^-?[0-9]\\d*(\\.\\d+)?$...
[ "0.7668818", "0.753534", "0.7207073", "0.7164408", "0.7032505", "0.69986695", "0.6984328", "0.697666", "0.69546443", "0.6889486", "0.68786645", "0.68473154", "0.6844044", "0.68322265", "0.68305814", "0.68272", "0.6825772", "0.6819524", "0.6816345", "0.68132037", "0.68038934",...
0.7984001
0
Opens the inspector window for this mailbox
handleInspect () { mailboxDispatch.openDevTools(this.props.mailbox_id) this.setState({ popover: false }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "openConsoleWindow() {\n EnigmailWindows.openWin(\n \"enigmail:console\",\n \"chrome://openpgp/content/ui/enigmailConsole.xhtml\",\n \"resizable,centerscreen\"\n );\n }", "openCardDetails() {\n EnigmailWindows.openWin(\n \"enigmail:cardDetails\",\n \"chrome://openpgp/content/ui/...
[ "0.6466793", "0.61733913", "0.5910477", "0.5785567", "0.57804847", "0.5737296", "0.57211256", "0.558969", "0.5567525", "0.5516026", "0.547418", "0.5466361", "0.5444889", "0.54252744", "0.5414113", "0.54090697", "0.5391963", "0.53671813", "0.5356993", "0.5341541", "0.53404623"...
0.6533786
0
Rendering / Updates the css styles for the mailbox
updateCssStyles (mailbox) { this.cssElement.innerHTML = ` .mailbox-list .list-item[data-id="${mailbox.id}"] .mailbox.active { border-color: ${mailbox.color}; } .mailbox-list .list-item[data-id="${mailbox.id}"] .mailbox:hover { border-color: ${mailbox.color}; } .mailbox-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_updateStyles() {\n if (this.$element) {\n const cssText = createCssText(createDOMStyles(this.state, this.attributes));\n if (cssText !== this._lastCssText) {\n this.$element.style.cssText = cssText;\n this._lastCssText = cssText;\n }\n }\n }", "function user_style() {\r\n\tre...
[ "0.6110168", "0.60623574", "0.5833093", "0.5824091", "0.5818151", "0.5779374", "0.5750137", "0.5695943", "0.566527", "0.5571332", "0.5549988", "0.55301845", "0.5527134", "0.5525454", "0.5524517", "0.5523141", "0.546745", "0.5461468", "0.5459399", "0.54520303", "0.5427703", ...
0.77968174
0
Checks if the properties given are correct, otherwise throws an error.
ValidateProperties(properties) { //All changed exists Object.keys(properties).forEach((key) => { if (!Object.keys(ExpirePageProperties).includes(key)) { throw Error("Key : " + key + " does not exist"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventSourceMappingResourcePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('batchSize', cdk.validateNumber)(properties.batchSize...
[ "0.6715474", "0.66281235", "0.66200364", "0.6591", "0.655855", "0.6540915", "0.6521806", "0.650848", "0.6472821", "0.6448066", "0.6422913", "0.64193285", "0.6411809", "0.6404429", "0.64021707", "0.6400568", "0.63824314", "0.6374271", "0.6370889", "0.6366392", "0.6344358", "...
0.6990914
0
Ativar eventos para o limite de textarea.
function eventoLimiteTextarea() { if( $(textarea).length === 0 ) return false; $(contador).text(limite); verificaLimite( textarea, limite, contador ); $(textarea).on('input propertychange', function() { verificaLimite( textarea, limite, contador ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commentSetLimit() {\n $('#cambox-chat-form textarea').keyup(commentTextLimit).change(commentTextLimit).keydown(commentTextLimit);\n}", "function LimitTextAreaMaxLength() {\n $(function () {\n $(\"textarea\").bind('input propertychange', function () {\n if ($(this).val().length > MA...
[ "0.696159", "0.6779676", "0.64691806", "0.6441048", "0.6421593", "0.63942176", "0.6321589", "0.6303936", "0.6202727", "0.6176991", "0.61342573", "0.6033389", "0.5950128", "0.5866434", "0.58170664", "0.58028036", "0.576462", "0.5764524", "0.57622737", "0.5707533", "0.57057583"...
0.78163105
0
Changes state according to event transition rules.
trigger(event) { var temp = this.config.states[this.state].transitions[event]; this.changeState(temp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trigger(event) {\r\n const { transitions } = this.states[this.currentState];\r\n const state = transitions[event];\r\n if (!state) {\r\n throw new Error(\"Transition event not found\");\r\n }\r\n \r\n this.updateState(state);\r\n }", "trigger(event) { // stackOperations = 0\r\...
[ "0.68004465", "0.6783169", "0.6698445", "0.66774946", "0.66234887", "0.6620487", "0.6605654", "0.6602098", "0.6591841", "0.65396005", "0.65286577", "0.643505", "0.6431377", "0.6380881", "0.63585645", "0.6349833", "0.6345618", "0.63342553", "0.6324217", "0.6322354", "0.6315580...
0.7025858
0
Build the quad shader.
function buildShader() { uniforms = { t: {value: 0.}, mousePosition: {value: new THREE.Vector2(mouseX, mouseY)}, planeSize: {value: new THREE.Vector2(0.5 / window.innerWidth, 0.5 / window.innerHeight)}, aspectRatio: {value: window.innerHei...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Shader()\n {\n var program_;\n var uniforms_;\n var attributes_;\n var samplerSlots_;\n }", "fragment_glsl_code() {\n return this.shared_glsl_code() + `\n varying vec2 f_tex_coord;\n uniform sampler2D texture;\n uniform float anim...
[ "0.6246749", "0.61315835", "0.6117244", "0.6103707", "0.6101692", "0.6097374", "0.60811293", "0.606755", "0.60050815", "0.60050815", "0.5985195", "0.59690684", "0.59677243", "0.59553", "0.5940175", "0.59227264", "0.5888669", "0.5848347", "0.58343935", "0.5833714", "0.583144",...
0.78468364
0
Custom output of CSS modules JSON files to the `_cssmodulesjson` if not using `combinedJson`. If using `combinedJson` the results are combined into a single `modules.json` file generated in the `css_folder`. Excludes CSS modules from the global "pcss" directory.
function getJSON( cssFileName, json ) { const directory = path.relative( config.theme_path, cssFileName ).replace( /\\/g, '/' ) + '/'; // Exclude global pcss directory. if ( 'pcss' === directory.substring( 0, 4 ) ) { return; } const jsonModules = new JsonModules( directory, path.basename( cssFileName, '.css...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "combinedJson() {\n\t\tconst combined = distFolder + '/' + combinedName;\n\t\tlet content = {};\n\t\ttry {\n\t\t\tcontent = fse.readJsonSync( combined ) ?? {};\n\t\t} catch ( e ) {\n\t\t}\n\t\tcontent[ this.directory.replace( this.cssName + '/', '' ) + this.cssName ] = this.json;\n\t\tfse.outputJsonSync( combined, ...
[ "0.62727183", "0.6122258", "0.50827533", "0.5039333", "0.48134768", "0.47754082", "0.4765706", "0.46988434", "0.4662755", "0.4613214", "0.45928228", "0.45866364", "0.45664847", "0.45121685", "0.44313908", "0.4423104", "0.43875146", "0.43805203", "0.4350584", "0.43377587", "0....
0.67463005
0
Generate a single combined.json file for use with reading once for every file. Faster reading via PHP.
combinedJson() { const combined = distFolder + '/' + combinedName; let content = {}; try { content = fse.readJsonSync( combined ) ?? {}; } catch ( e ) { } content[ this.directory.replace( this.cssName + '/', '' ) + this.cssName ] = this.json; fse.outputJsonSync( combined, content ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatJson(userOptions, callback) {\n \n // options\n var options =Object.assign({\n src: process.cwd(),\n dest: \"./concat.json\",\n middleware: false,\n reuseDB: false,\n isJsonFile: isJSONDB //Test function, deterring which files to include\n },userOptions);\n // ensur...
[ "0.64898044", "0.6309376", "0.61908454", "0.61279273", "0.5851613", "0.5847084", "0.57990664", "0.575417", "0.57393897", "0.56408405", "0.56353015", "0.5593971", "0.5482748", "0.54823905", "0.54749644", "0.5440383", "0.5372848", "0.5319354", "0.5306593", "0.5292178", "0.52620...
0.7845883
0
Generate a .json file for each module in a separate file, which matches the location of the origin module.
moduleFile() { const jsonFileName = config.theme_path.replace( /\\/g, '/' ) + modulesFolder + this.directory.replace( this.cssName + '/', '' ) + this.cssName + '.json'; fse.outputJsonSync( jsonFileName, this.json ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPackageJsonFiles() {\n const distPath = path.resolve(__dirname, '../dist');\n const esmPath = path.join(distPath, 'esm');\n\n const directories = [];\n const esmModulesDirectories = fs.readdirSync(esmPath);\n\n for (const file of esmModulesDirectories) {\n const fileStat = fs.statSync(path.join...
[ "0.69078815", "0.5943346", "0.59295285", "0.58481336", "0.5847262", "0.5824364", "0.56909996", "0.56672186", "0.5621694", "0.5619843", "0.56070256", "0.5595935", "0.55826765", "0.5577311", "0.5569562", "0.5553408", "0.5535245", "0.55348885", "0.5521769", "0.55195385", "0.5508...
0.69837415
0
Convert WAV to Speex and stream it to Houndify backend
function compressAndStreamWAV() { var voiceRequest; var reader = new wav.Reader(); reader.on('format', function (format) { voiceRequest = new Houndify.VoiceRequest({ clientId: config.clientId, clientKey: config.clientKey, sampleRate: format.sampleRate, enableVAD: true, //REQU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function streamAudio() {\n rec.stop();\n rec.exportWAV(getAudioStream);\n rec.record();\n}", "playStream(stream) {\n self.decoder = new lame.Decoder();\n self.speaker = new Speaker(audioOptions);\n return stream.pipe(self.decoder).once('format', function() {\n self.decoder.pipe(self.spea...
[ "0.6375817", "0.62731445", "0.6138035", "0.6129636", "0.6043166", "0.59039164", "0.58787566", "0.58636594", "0.584184", "0.58351344", "0.583187", "0.58165735", "0.5814212", "0.581113", "0.57756716", "0.5772376", "0.57579356", "0.57440627", "0.56861055", "0.5680039", "0.567713...
0.6492565
0
Stream full WAV/Opus/Speex audio file to Houndify backend
function streamAudioFile(file) { var voiceRequest = new Houndify.VoiceRequest({ clientId: config.clientId, clientKey: config.clientKey, convertAudioToSpeex: false, enableVAD: true, //REQUEST INFO JSON //see https://houndify.com/reference/RequestInfo requestInfo: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compressAndStreamWAV() {\n var voiceRequest;\n var reader = new wav.Reader();\n\n reader.on('format', function (format) {\n voiceRequest = new Houndify.VoiceRequest({\n clientId: config.clientId,\n clientKey: config.clientKey,\n\n sampleRate: format.sampleRate,\n enableVAD: true...
[ "0.6993329", "0.6659488", "0.62960696", "0.6182449", "0.61576307", "0.6154631", "0.61387974", "0.6134961", "0.60925895", "0.60595053", "0.5991424", "0.59241664", "0.5920017", "0.5878063", "0.58640015", "0.58093596", "0.5772201", "0.5771317", "0.5730784", "0.57299066", "0.5687...
0.6720193
1
load images carga imagenes cuya carga es por css (background)
function loadImagesBackgroundCSS ( contenedor, clase ) { var html = '<div class="'+clase+'"></div>'; contenedor.prepend($(html)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderizarImagen() {\r\n $imagen.style.backgroundImage = `url(${IMAGENES[posicionActual]})`;\r\n }", "function renderizarImagen() {\n $imagen.style.backgroundImage = `url(${imagenes[posicionActual]})`\n }", "function loadImages(images, string) {\n images.forEach((image, index) =...
[ "0.7392497", "0.7383809", "0.6916763", "0.6835336", "0.68218094", "0.6802627", "0.6800168", "0.6790913", "0.67839295", "0.67641395", "0.6728729", "0.6674237", "0.66499645", "0.66420627", "0.664179", "0.66387266", "0.66182756", "0.6603033", "0.65976095", "0.65405536", "0.65251...
0.75000745
0
Calculator app that persists data in the local storage so that the user can continue seeing previous calculations made. The state properties are majorly to pass to its child props to display it except "displayingEqusls" which is used to monitor whether the calculator is displaying a value after the equal to button was ...
constructor(props) { super(props); this.state = { expression: "", // The expression to be evaluated. result: "", // The expression shown at the auxillary display // in order to see the calculator work as you // begin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleDisplayOperator(value){\n if(this.state.mode != \"operator\")\n {\n this.setOperation(value);\n if(this.state.operation != \"\"){\n let answer=this.calculateOperation();\n this.setState({\n result:answer,\n temp:answer\n })\n }\n } \n //If the...
[ "0.68040556", "0.66728425", "0.65572155", "0.6460316", "0.6383643", "0.6383253", "0.6345065", "0.6282672", "0.6273817", "0.6268267", "0.61910576", "0.6189757", "0.61881566", "0.6175094", "0.61458963", "0.6122302", "0.6101787", "0.6101179", "0.6096546", "0.60851204", "0.607737...
0.69829684
0
Toggle the history panel from displaying to hide and viceversa
function toggleHistory() { return isDisplaying ? toggleDisplay(false) : toggleDisplay(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleHistory(){\r\n\tvar x = document.getElementById(\"historyContainer\");\r\n \tif (x.style.display === \"none\") {\r\n x.style.display = \"block\";\r\n \t} else {\r\n x.style.display = \"none\";\r\n \t}\r\n}", "function showHistory() {\n $(\"#left-side .history\").addClass(\"active\");\n ...
[ "0.82074934", "0.7475459", "0.72499985", "0.71574163", "0.7103718", "0.70435274", "0.6891698", "0.66290003", "0.66167134", "0.65299696", "0.64707834", "0.6462153", "0.6458992", "0.64194655", "0.6416171", "0.64074653", "0.6388321", "0.63730085", "0.6369878", "0.62906134", "0.6...
0.83424705
0
Linear mapping of the given "value" of range "from" into range "to" for example: rangeMapping(127, [0, 127], [0, 255]) > 255
rangeMapping(value, from, to) { return Math.floor(to[0] + (value - from[0]) * (to[1] - to[0]) / (from[1] - from[0])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapValueInRange(value, fromLow, fromHigh, toLow, toHigh) {\n var fromRangeSize = fromHigh - fromLow;\n var toRangeSize = toHigh - toLow;\n var valueScale = (value - fromLow) / fromRangeSize;\n return toLow + valueScale * toRangeSize;\n}", "function map(value, fromRangeMin, fromRangeMax, toRangeMin, ...
[ "0.81062156", "0.79752725", "0.7636664", "0.7636664", "0.7636664", "0.7636664", "0.7636664", "0.75465745", "0.74576104", "0.73396367", "0.7327802", "0.72524863", "0.7136336", "0.7129243", "0.711281", "0.7096233", "0.7068047", "0.6845734", "0.6805503", "0.66359246", "0.655117"...
0.8484493
0
Trigger this function when we click a playlist in the PlaylistsList This will set the current playlist Called with the dom element and the playlist model
@action handlePlaylistClick(dom, playlist) { // we need to set the activePlaylistItem as well // todo: this will probably break if we have an empty playlist const activePlaylistItem = playlist.items[0]; UIStore.get().updateControlPanelState({ activePlaylist: playlist, activePlaylistItem: ac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPlaylist() {\n var size = playlist = findAll('.playlist li');\n itemOnClick = function () {\n currentTrackID = this.getAttribute('data-trackid');\n find('h1').innerHTML = find('strong', this).textContent;\n find('h2').innerHTML = find('span', this).textCont...
[ "0.7164884", "0.71056575", "0.70012707", "0.6906411", "0.6723059", "0.6712797", "0.66738695", "0.6623111", "0.6623111", "0.6498033", "0.6372192", "0.6311882", "0.6292879", "0.62904644", "0.62410665", "0.6226601", "0.621058", "0.61458564", "0.61172163", "0.6101675", "0.607316"...
0.7713028
0
Triggered when we click the 'loop scene' button
@action handleLoopSceneButtonClick() { this.currentPlayState = PlaylistModel.playState.LOOP_SCENE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseClicked(){\n\tloop()\n}", "runGame(){\n\t\t\tthis.scene.runGame();\n\t\t}", "lerpClicked () {\n this.SceneManager.switchTo('Lerp/Level1')\n }", "function initScene1() {\n if (currentScene === 1) {\n\n $('#game1').show(\"fast\");\n\n //clique sur une porte\n $('.dungeon0Doo...
[ "0.70964026", "0.6847115", "0.6808346", "0.67783666", "0.67569864", "0.6675171", "0.6601731", "0.65635383", "0.65590537", "0.65276915", "0.6502814", "0.6475556", "0.64546484", "0.6449207", "0.6447668", "0.6423387", "0.6419523", "0.641666", "0.6414495", "0.64114666", "0.639016...
0.803358
0
New Task button displayed on the DOM gets the project name argument in order to create the coresponding localStorage, taskManager is a Map() object, id is a global, localy stored , variable in order to enumerate local storage inserstions
function addTask(id, taskManager, projectName) { //content HTML parent const content = document.getElementById("content"); //the container const addNewTaskDiv = document.createElement("div"); addNewTaskDiv.id = "add-new"; //contains the form with display-none const hiddenContainer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNewTask() {\r\n let textInput = document.querySelector(\"#taskInput\");\r\n let allTasksFromMemory = JSON.parse(localStorage.getItem(\"tasks\"));\r\n\r\n if (textInput.value == \"\") {\r\n return;\r\n }\r\n\r\n // dio za kreiranje novog taska:\r\n let newLi = document.createElement(\"li\");\r\...
[ "0.71915734", "0.7171853", "0.7119572", "0.7096235", "0.69872373", "0.6963923", "0.6942656", "0.6915435", "0.69131196", "0.6858652", "0.6830265", "0.6810787", "0.67813927", "0.67284304", "0.6723889", "0.66597193", "0.6639966", "0.6631913", "0.6617313", "0.6612691", "0.6609108...
0.77956027
0
TicTacToeController function must contain everything for the controller
function TicTacToeController ($firebaseObject) { // variable capture var self = this; // gets boxes array from firebase and attaches it to the controller self.gameBoard = (function(){ var ref = new Firebase('https://tictactoekate.firebaseio.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GameController() {\n // Add circles that represents players to HTML\n GameController.prototype.createPlayers = function (num) {\n var template = '<div id=\"player-%d\" class=\"player\">%d</div>';\n\n for (var lop = 0; lop < num; lop++) {\n $(\"#hideout\").append($(sprintf(te...
[ "0.64023626", "0.63282", "0.6233934", "0.6188854", "0.59589165", "0.5899215", "0.5855321", "0.5837383", "0.58119667", "0.57759255", "0.5765261", "0.57277286", "0.57175887", "0.569063", "0.56747895", "0.565475", "0.56518775", "0.56518334", "0.56397074", "0.56397074", "0.563280...
0.6334167
1
Find the nearest of a given word.
function findNearest(word, n=10) { let nearest = wordVectors.nearest(word, n); if (!nearest) { return 'No word vector found'; } let output = ''; for (let i = 0; i < nearest.length; i++) { output += nearest[i].vector + '<br/>'; } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getNearestNeighbors(word, k=5) {\n\t\tvar vector = this._getVector(word);\n\t\treturn await this._getNearestNeighbors(vector, k);\n\t}", "function findClosestElement(elements, text, direction) {\n text = text.toLowerCase();\n let matchingElement = elements.find(element => element.text.toLowerCase().s...
[ "0.67190117", "0.6322012", "0.61211896", "0.60111153", "0.58363193", "0.5829572", "0.5802977", "0.579129", "0.5789479", "0.57861644", "0.57848233", "0.5755483", "0.5719296", "0.5714987", "0.5714855", "0.5712254", "0.570767", "0.57067245", "0.56990933", "0.5675038", "0.5655372...
0.76251674
0
clear textbox in modal Register ticket
function clearTextBoxTicket() { $('.help-block').remove(); $('.form-control').css('border-color', 'lightgrey'); var date = loadDateNow(); var test = date.split('/'); $('#IdTK').val(""); $('#CusNameTK').val(""); $('#IdentityCardTK').val(""); $('#PhoneTK').val(""); $('#EmailTK').val(""...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearTextBox() {\n\n /* Mengganti Judul Utility Modal */\n $(\"#modalTitle\").text(\"Formulir Penambahan Data Master BatchFile\");\n\n /* Mengosongkan Field Id */\n $(\"#id\").val(\"\");\n\n /* Mengosongkan Field Nama */\n $(\"#name\").val(\"\");\n\n /* Menghilangkan Tombol Update */\...
[ "0.7609569", "0.72519934", "0.72317123", "0.7198959", "0.7198959", "0.71824753", "0.71799403", "0.71370494", "0.7121768", "0.71177393", "0.7064834", "0.70334077", "0.70303863", "0.7027871", "0.70161504", "0.6931931", "0.69110316", "0.69063467", "0.68981504", "0.6888858", "0.6...
0.7441326
1
get ticket by id to fill modal EditTicket
function getTicketByIDEdit(MonthlyTicketID) { $('.help-block').remove(); $('.form-control').css('border-color', 'lightgrey'); $.ajax({ url: "/ManageTicket/TicketDetails/" + MonthlyTicketID, type: "GET", contentType: "application/json", dataType: "json", success: funct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTicketById(ticketId)\n {\n // return ticketDataList.find((ticket => ticket.id === ticketId))\n return this.searchResult.content.find((ticket => ticket.data.id === ticketId))\n }", "function editRequirement( id )\n{\n $('#editRequirementModal .modal-title').text(\"Edit Requirement\")\n ...
[ "0.67875594", "0.6495154", "0.6459953", "0.6412566", "0.6371485", "0.6367816", "0.6362928", "0.634485", "0.6342849", "0.63337713", "0.6323994", "0.62237287", "0.61309266", "0.60611916", "0.60411", "0.60344124", "0.60180324", "0.6017798", "0.59876513", "0.59755415", "0.5972528...
0.71492404
0
get ticket by id to fill modal Re Register Contract ticket
function getTicketReRegister(MonthlyTicketID) { $('.help-block').remove(); $('.form-control').css('border-color', 'lightgrey'); $.ajax({ url: "/ManageTicket/TicketDetails/" + MonthlyTicketID, type: "GET", contentType: "application/json", dataType: "json", success: fun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTicketByIDEdit(MonthlyTicketID) {\n $('.help-block').remove();\n $('.form-control').css('border-color', 'lightgrey');\n $.ajax({\n url: \"/ManageTicket/TicketDetails/\" + MonthlyTicketID,\n type: \"GET\",\n contentType: \"application/json\",\n dataType: \"json\",\n ...
[ "0.6812478", "0.64034814", "0.62610424", "0.6105026", "0.60973805", "0.6052449", "0.59179443", "0.5871993", "0.58508825", "0.5846316", "0.57127446", "0.5652771", "0.5644317", "0.5639655", "0.5638683", "0.56360435", "0.56355727", "0.5628024", "0.561185", "0.5605363", "0.559239...
0.65161186
1
Example For s1 = "aabcc" and s2 = "adcaa", the output should be commonCharacterCount(s1, s2) = 3. Strings have 3 common characters 2 "a"s and 1 "c". Initialize a count map for str1 Initialize a commonCount Loop over string 1 and add a count of each character to the count map. Loop over string 2, if the current letter i...
function commonCharacterCount(s1, s2) { let letterObj = {}; let commonCount = 0; for (let i = 0; i < s1.length; i++) { let currentLetter = s1[i] if (!(currentLetter in letterObj)) { letterObj[currentLetter] = 1 } else { letterObj[currentLetter]++ } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commonCharacterCount(s1, s2) {\n \n // find lesser of two lengths\n let len = Math.min(s1.length, s2.length)\n \n // set count to zero\n let count = 0\n \n let s1Dict = {}\n \n // create dictionary of letter counts in s1\n for (let i = 0; i < s1.length; i++){\n // i...
[ "0.9002882", "0.8263047", "0.7422764", "0.74048233", "0.7362783", "0.72636247", "0.7090453", "0.70416135", "0.70092493", "0.6914661", "0.6911367", "0.6884886", "0.6868216", "0.6851752", "0.68320334", "0.67909884", "0.67262715", "0.67007625", "0.66999155", "0.6569043", "0.6568...
0.88283235
1
7. Write a function with switch statement to count the number of / occurrences of any two vowels in succession in a line of text. / For example, in the sentence
function findOccurrences() { var str = "Pleases read this application and give me gratuity"; var count = 0; switch (str) { case 'a': count++; case 'A': count++ case 'e': case 'E': case 'i': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findOccurrences() {\n var str = \"Pleases read this application and give me gratuity\";\n var count = 0;\n let haveSeenVowel = false;\n \n for (const letter of str.toLowerCase()) {\n switch (letter) {\n case 'a':\n case 'e':\n case 'i':\n case 'o':\n ca...
[ "0.8022696", "0.7513594", "0.749312", "0.7304848", "0.7256458", "0.72509295", "0.7241314", "0.72351015", "0.7231589", "0.7230691", "0.72220933", "0.72158426", "0.7195321", "0.71820706", "0.7178959", "0.71780354", "0.7171723", "0.7158797", "0.71522415", "0.71499795", "0.714413...
0.7615511
1
. A cashier has currency notes of denominations 10, 50 and / 100. If the amount to be withdrawn is input through the / keyboard in hundreds, find the total number of currency notes / of each denomination the cashier will have to give to the / withdrawer.
function currencyDenomination() { var cash = +prompt("Enter cash (in hundreds): "); var hundred = cash / 100; var fifty = cash / 50; var ten = cash / 10; console.log(hundred) console.log(fifty) console.log(ten) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currencyNotes() {\n var amount = prompt(\"Enter amount to withdraw\");\n var hundred = Math.floor(amount / 100);\n var fifty = Math.floor((amount % 100) / 50);\n var ten = Math.floor((amount % 100) % 50) / 10;\n var remaining = Math.floor(((amount % 100) % 50) % 10);\n document.write(\"Y...
[ "0.71983993", "0.6872888", "0.683056", "0.67945707", "0.6734736", "0.6682182", "0.6680063", "0.6638858", "0.66338253", "0.66322106", "0.6617856", "0.66086537", "0.6601678", "0.65847623", "0.6572583", "0.6566804", "0.6536609", "0.6524657", "0.65230936", "0.6519608", "0.6517413...
0.7175054
1
Determines which language definition to use and returns it. With no parameters, it will return the global language. If you pass in a language key, such as 'en', it will return the definition for 'en', so long as 'en' has already been loaded using moment.lang.
function getLangDefinition(key) { if (!key) { return moment.fn._lang; } if (!languages[key] && hasModule) { try { require('./lang/' + key); } catch (e) { // call with no params to set to default return moment.fn....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLangDefinition(key) {\n if (!key) {\n return moment.fn._lang;\n }\n if (!languages[key] && hasModule) {\n try {\n __webpack_require__(43)(\"./\" + key);\n } catch (e) {\n // call with no params to set to default\n ...
[ "0.81669253", "0.81196016", "0.81196016", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78410304", "0.78045785", "0.78045785", "0.78045785", "0.78045785"...
0.82581544
0
The picker constructor that creates a blank picker.
function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { // If there’s no element, return the picker constructor. if ( !ELEMENT ) return PickerConstructor var // The state of the picker. STATE = { id: Math.abs( ~~( Math.random() * 1e9 ) ) }, // Merge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Picker( ){}", "function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {\n\n // If there’s no element, return the picker constructor.\n if ( !ELEMENT ) return PickerConstructor\n\n\n var\n // The state of the picker.\n STATE = {\n id: Math.abs( ~~( Math.random()...
[ "0.73652464", "0.733834", "0.72291243", "0.7190669", "0.7190669", "0.71753526", "0.71554184", "0.7155207", "0.7155207", "0.7155207", "0.7155207", "0.7155207", "0.71462065", "0.71462065", "0.71462065", "0.6974518", "0.6730516", "0.67022836", "0.6507825", "0.63868845", "0.63779...
0.73643976
1
Handles a server environment set up request
async function handleEnvironmentSetup(request, h) { logger(`Test environment setup request recerived from: ${request.info.remoteAddress}:${request.info.remotePort}`); let reply; let success; if(request.payload && request.payload.code) { const code = request.payload.code; switch(code) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupEnvironment() {}", "function setupEnvironment() {\n\tconsole.log(\"Setting up Suspend Application\");\n\thideTemplates();\n\tstartClock();\n\tsetupStorage();\n\trender();\n\tattachListeners();\n\tcheckFileAPI();\n}", "function init(){\n let vcap = {};\n vcap.services = config.VCAP_SERVICES;\n vcap.name...
[ "0.69017464", "0.6357234", "0.62969846", "0.6167575", "0.6032254", "0.6002961", "0.59991163", "0.5963608", "0.5954966", "0.594524", "0.58908904", "0.58897865", "0.58623296", "0.58383507", "0.5790968", "0.5770138", "0.5751546", "0.57472026", "0.5715755", "0.5712108", "0.569498...
0.6844178
1
DELETE MemberURI (///atom/entry/) params: options: (required) id: entry id. (required) returns: Promise
deleteEntry(id) { if (id == null) { return this._rejectRequired('deleteEntry', 'id'); } let method = 'delete'; let path = `/${this._userName}/${this._blogId}/atom/entry/${id}`; let statusCode = 200; return this._request({ method, path, statusCode }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function deleteEntry() {\n\n\t\t// 1) Delete the entry from the database by title\n\t\tawait Snapshot.destroy({\n\t\t\twhere: {\n\t\t\t\tTitle: req.params.title\n\t\t\t}\n\t\t});\n\n\t\tres.sendStatus(200).end()\n\t}", "async function deleteMember (req, res) {\n await service.deleteMember(\n req.authUs...
[ "0.63788855", "0.62468326", "0.6228665", "0.6217244", "0.61945444", "0.60228735", "0.6013812", "0.597698", "0.59602195", "0.5915643", "0.58702165", "0.586884", "0.5868553", "0.586478", "0.58595544", "0.5838456", "0.5808885", "0.579639", "0.5778836", "0.573194", "0.5717027", ...
0.703467
0
GET MemberURI (///atom/entry/) returns: Promise
getEntry(id) { if (id == null) { return this._rejectRequired('getEntry', 'id'); } let method = 'get'; let path = `/${this._userName}/${this._blogId}/atom/entry/${id}`; let statusCode = 200; return this._request({ method, path, statusCode }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getMangaFromURI( uri ) {\n return this.fetchDOM( uri.href, 'div.card h6.card-header span.mx-1', 3 )\n .then( data => {\n let id = uri.pathname.match( /\\/(\\d+)\\/?/ )[1];\n let title = data[0].innerText.trim();\n return Promise.resolve( new Manga( th...
[ "0.5681779", "0.53646404", "0.5267634", "0.52587444", "0.52078104", "0.5047755", "0.50436264", "0.5019529", "0.5015326", "0.49970683", "0.49850485", "0.49616084", "0.49606284", "0.49436608", "0.49284375", "0.48955724", "0.4890585", "0.4884955", "0.48553112", "0.485443", "0.48...
0.54899615
1
GET CollectionURI (///atom/entry) returns: Promise
getEntries(page) { const method = 'get'; const pathWithoutQuery = `/${this._userName}/${this._blogId}/atom/entry`; const query = page ? `?page=${page}` : ''; const path = pathWithoutQuery + query; const statusCode = 200; return this._request({ method, path, statusCode }) .then(res => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEntry(id) {\n if (id == null) { return this._rejectRequired('getEntry', 'id'); }\n let method = 'get';\n let path = `/${this._userName}/${this._blogId}/atom/entry/${id}`;\n let statusCode = 200;\n return this._request({ method, path, statusCode });\n }", "function getEntriesWithCollectionID(co...
[ "0.5880579", "0.5760064", "0.56455314", "0.5488762", "0.5472548", "0.53268707", "0.5307832", "0.5307832", "0.53048116", "0.53001887", "0.52837694", "0.52389884", "0.5237777", "0.5227601", "0.5203958", "0.5184697", "0.517519", "0.5170255", "0.51668805", "0.5135911", "0.5134552...
0.59017295
0
draw a quarter sphere
function drawQuarterSphere(radius, widthSegments, heightSegments, opacity, color, position, rotation){ var sphere = new THREE.SphereGeometry(radius, widthSegments, heightSegments, 0, Math.PI/2., 0, Math.PI/2.) var circle1 = new THREE.CircleGeometry(radius, widthSegments, 0., Math.PI/2.) var circle2 = new THREE.Circl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSphere(gl) {\n\tdrawCircle(gl);\n\tdrawMarks(gl);\n}", "function drawSphere() {\n setMV();\n Sphere.draw();\n}", "function drawSphere() {\n setMV();\n Sphere.draw();\n}", "function _drawSphere(pos, r, color) {\n var p = new Primitive();\n p.color = toColor(color);\n\n ...
[ "0.736252", "0.72848296", "0.72848296", "0.7050535", "0.6959214", "0.6760134", "0.66878265", "0.6582868", "0.65579575", "0.6545309", "0.65252316", "0.6470089", "0.64016455", "0.63636637", "0.63526285", "0.6345227", "0.63331884", "0.6332282", "0.6308698", "0.62994707", "0.6297...
0.7551242
0
keep the light coming from the camera location
function updateLights(){ params.lights.forEach(function(l){ l.position.copy(params.camera.position ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function movelight(){\n\tif (lightType === 'Far'){\n\t\tlightDir = lightPath(millis()/20);\n\t} else if (lightType === 'Close'){\n\t\tlightPos = mp[0].p3;\n\t}\n}", "function realLight(){\n pntLight = true;\n}", "function fakeLight(){\n pntLight = false;\n}", "function light(){\n\n console.log('SHOW...
[ "0.67976135", "0.67878455", "0.67567897", "0.67160153", "0.66464955", "0.65397185", "0.6460706", "0.644286", "0.64163226", "0.6355995", "0.6347136", "0.63456464", "0.63311064", "0.63305944", "0.6299383", "0.62930584", "0.6266019", "0.6198387", "0.6195495", "0.6176554", "0.617...
0.6856041
0
Flag for setting the builtin rotation mode to 2angle rotation meaning looking to the left and right manipulates one angle and looking up and down the other one.
static get TWO_ANGLE_ROTATION() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "rightTurn() {\r\n this.fltire.rotateY(-16);\r\n this.frtire.rotateY(-16);\r\n }", "static get FREE_ROTATION() { return 1; }", "isRotateSupported() {\n return true;\n }", "turnRight(){\n this.orientation++;\n if(this.orientation > 3){\n this.orientation = 0;\n }...
[ "0.64270747", "0.64039665", "0.63416135", "0.6174257", "0.6154045", "0.6101296", "0.5952767", "0.594133", "0.5937649", "0.5923484", "0.59159917", "0.5848159", "0.58230597", "0.5813253", "0.57707804", "0.5764967", "0.5760761", "0.57536125", "0.5740173", "0.57304704", "0.571390...
0.78909224
0
Flag for the builtin rotation mode to free rotation meaning that the camera will always rotate and move with respect to its current rotation, which can be counterintuitive
static get FREE_ROTATION() { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preventRotation() {\n setRotation(null);\n }", "isRotateSupported() {\n return true;\n }", "function setOrientation(orientation){\n if(orientation)\n camera.rotation.z=Math.PI/2; ///=+\n else\n camera.rotation.z=0;\n}", "set allowRotation(value) {\n if (this....
[ "0.68047416", "0.67597836", "0.6754572", "0.67314446", "0.66387314", "0.6506982", "0.64417404", "0.64375156", "0.6364304", "0.6301534", "0.62965834", "0.62761116", "0.62653863", "0.62592274", "0.6253635", "0.62442887", "0.61926013", "0.61855114", "0.61840004", "0.61618817", "...
0.7144022
0
Used internally to reset the rotation matrices
resetRotMatrices() { this.angleX = 0.0; this.angleY = 0.0; this.angleXRotation = mat4.create(); this.angleYRotation = mat4.create(); mat4.identity(this.cameraRotation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reiniciar(){\n mat4.set(this.inicial,this.matrix);\n }", "reset()\n {\n const matrix = [\n 1, 0, 0, 0, 0,\n 0, 1, 0, 0, 0,\n 0, 0, 1, 0, 0,\n 0, 0, 0, 1, 0,\n ];\n\n this._loadMatrix(matrix, false);\n }", "reset() {\n var...
[ "0.74106246", "0.7333554", "0.732527", "0.7271129", "0.7261091", "0.7205688", "0.71028066", "0.69422174", "0.68946", "0.6836939", "0.67550427", "0.6665007", "0.6653777", "0.6572997", "0.65701395", "0.6561744", "0.65329945", "0.6460457", "0.6433493", "0.6400033", "0.6400033", ...
0.85896075
0
Used internally to adapt the looking angles to the camera and look at position
updateLookingAngles() { this.resetRotMatrices(); if (this.rotationMode === MFWebGLCamera.TWO_ANGLE_ROTATION) { if (this.lookAt[1] != this.position[1]) { let cdir = vec3.create(); vec3.sub(cdir, this.lookAt, this.position); let angle = Math.abs(vec3.angle(cdir, [0, 1, 0])) - Math.PI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcLookat(){\n let radiansX = lookAtRadians.x\n ,radiansY = lookAtRadians.y\n ,sinY = Math.sin(radiansY)\n\n lookAtVec3[0] = lookAtRadius*Math.sin(radiansX)*sinY\n lookAtVec3[2] = lookAtRadius*Math.cos(radiansX)*sinY\n lookAtVec3[1] = lookAtRadius*Math.cos(radiansY)\n addUniformChange('lookAt'...
[ "0.7249946", "0.6829807", "0.681733", "0.6766633", "0.67184246", "0.6605447", "0.65036786", "0.6490021", "0.64558506", "0.6454419", "0.6368054", "0.63423693", "0.633626", "0.63278043", "0.6289452", "0.6226789", "0.6223273", "0.6212905", "0.61892515", "0.61892515", "0.61786073...
0.7341491
0
The purpose of this command is to take a project that has been "skeletonized" and convert the skeleton to it's own project that has all of the fields it needs populated properly filled in and set up with it's own unique repo.
async function run() { const projectPath = path.resolve("."); const files = getAllFiles(projectPath, [], new Set(["node_modules", "dts", ".git"])); const filesWithOptions = []; // Read in the entire skeleton project's files and process each as text, // searching for template options based on the option synta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateStructure(project) {\n\treturn fs.copyAsync(path.resolve(__dirname, 'structure'), project)\n\t\t.then(function(err) {\n\t\t\tif(err) return console.error(err);\n\t\t});\n}", "git() {\r\n this.fs.copyTpl(\r\n this.templatePath('_gitignore'),\r\n this.destinationPath('.git...
[ "0.6292111", "0.57009715", "0.544499", "0.54023814", "0.5305771", "0.5291858", "0.5283825", "0.5278425", "0.5197304", "0.5194134", "0.51804113", "0.5066835", "0.50328565", "0.50303495", "0.5025193", "0.5022274", "0.49996316", "0.497209", "0.49720156", "0.49606583", "0.4943877...
0.6268308
1
Add a set of activites to the dashboard. Only updates if there are new activites.
activities(acts) { this.activityStream.add(acts) const newActivities = this.activityStream.since() _.each(newActivities, act => { const timestamp = act.modified.format("YYYY-MM-DD hh:mm") const lineColor = colorUtils.colorForState(act.state) this.log.log(lineColor(`${timestamp} - ${act.st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateActivities() {\n vm.updateResponse = \"\";\n if (!vm.isConnected()) {\n alert(\"Connect to Strava to update the local DB.\");\n return;\n }\n vm.updateResponse = \"Update in progress...\";\n $http.get('updateactivities').then((response) => {\n...
[ "0.60660857", "0.5698464", "0.55357647", "0.5459314", "0.5415273", "0.5350148", "0.53457934", "0.5295249", "0.52814174", "0.527934", "0.52170074", "0.5202718", "0.51660997", "0.51646113", "0.50896406", "0.5067641", "0.50571823", "0.50477123", "0.5017166", "0.50164527", "0.498...
0.60249376
1
Set header information on the screen
header(name, info) { this.headingName.setContent(name) this.headingInfo.setContent(info) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHeader () {\n\t\theaderLabel.text='Summary';\n\t\tleftBtn.title='Back';\n\t\trightBtn.title='Email';\n\t\trightBtn.width=Ti.Platform.osname =='android'?'27%':'23%',\n\t\trightBtn.font=Ti.Platform.osname =='android'?{fontSize:'17dp'}:{fontSize:'15%'};\n\t\theaderView.add(leftBtn);\t\n\t\theaderView.add(...
[ "0.7722066", "0.7502243", "0.71282464", "0.7115543", "0.7089978", "0.6997368", "0.69028634", "0.6879603", "0.6879603", "0.6879603", "0.6879603", "0.6879603", "0.6879603", "0.6835604", "0.6822596", "0.68202704", "0.67899823", "0.6738146", "0.67096573", "0.6680257", "0.66797143...
0.7767883
0
Write new review modal
function showWriteReviewModal() { $ionicModal.fromTemplateUrl('templates/modals/write-review-modal.html', function($ionicModal) { $scope.modal = $ionicModal; }, { scope: $scope, animation: 'slide-in-up' }).then(function(modal) { $scope.modal = modal; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeReview(event) {\n event.preventDefault()\n content = document.getElementById('review-content').value\n\n fetch(URL + `/${currentShoe.id}/reviews`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Accepts': 'application/json'\n },\n body: JSON.stringif...
[ "0.6999309", "0.69774204", "0.67131656", "0.6674257", "0.66083753", "0.6583104", "0.6577431", "0.6574916", "0.6539503", "0.64629656", "0.6336444", "0.6301982", "0.62427956", "0.6203833", "0.61805165", "0.61589795", "0.61467355", "0.61133575", "0.6091175", "0.60883325", "0.607...
0.7332258
0
List of all of the tracked items
function getListOfTrackedItems() { $log.info("inside getListOfTrackedItems"); return DataCollectorService.retrieveLocal("usage_item_list"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "list() {\n const listings = this._listings.all();\n return Object.keys(listings).map(key => listings[key]);\n }", "function getItemList(){\n\t\tfirebase.database().ref(\"items/\" + firebase.auth().currentUser.uid).on('value', function(snapshot){\n\t\t\t$rootScope.itemList.length = 0;\n\t\t\tsnap...
[ "0.68356", "0.6742033", "0.66482484", "0.65048355", "0.64846784", "0.64764374", "0.6420766", "0.6414706", "0.6414706", "0.6412983", "0.63607955", "0.63445735", "0.6325565", "0.631838", "0.6292406", "0.62823164", "0.6198148", "0.6186525", "0.6186525", "0.6186525", "0.6161443",...
0.80567616
0
Get a tracked item
function getTrackedItem(key) { return DataCollectorService.retrieveLocal(key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grabItem(id) {\n\n return new TotoAPI().fetch('/supermarket/currentList/items/' + id, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({grabbed: true})\n });\n }", "function getItem(itemUid) {\n return loadData()\n ...
[ "0.645636", "0.64433074", "0.6440986", "0.6434948", "0.6433304", "0.6421206", "0.6374726", "0.6357707", "0.62996966", "0.6297176", "0.6282967", "0.6223941", "0.6141831", "0.6109696", "0.6089972", "0.60585856", "0.6026707", "0.6024668", "0.6020576", "0.6020204", "0.6018773", ...
0.72464126
0
This function returns true or false, true if the connection is at least 3G
function isAcceptable() { // Local variables var acceptableConnection = false; var devConnection = $cordovaNetwork.getNetwork(); // Check to determine the type of connection available if (window.Connection) { if (navigator.connection.type == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasGoodConnection() {\n\n var is_good = true;\n\n switch (navigator.connection.type) {\n\n case Connection.NONE:\n console.log('no internet connection');\n is_good = false;\n break;\n\n case Connection.UNKNOWN:\n ...
[ "0.65358746", "0.6099802", "0.6026934", "0.6019013", "0.6013896", "0.59571207", "0.59194374", "0.5913596", "0.5827687", "0.58189994", "0.58083266", "0.5784118", "0.57727987", "0.57727987", "0.5746478", "0.5738382", "0.57211465", "0.571387", "0.5712733", "0.5691848", "0.563182...
0.6336682
1
parses a line of text as a BED line with the loaded autoSql schema
parseLine(line, opts = {}) { const { autoSql } = this const { uniqueId } = opts let fields = line if (!Array.isArray(line)) { if (line.startsWith('track') || line.startsWith('browser')) { throw new Error( `track and browser line parsing is not supported, please filter:\n${line}`,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readAutoSQL(cb) {\n if (bbi.asOffset === 0) {\n cb(); // no autoSQL present\n } else {\n // autoSQL present, need to parse\n getData(bbi.asOffset, 2048, function (d) {\n var ba = new Uint8Array(d);\n var s = '';\n\n for (var i = 0; i < ba.length; ...
[ "0.64994067", "0.53341794", "0.52711844", "0.5204697", "0.51544666", "0.5102125", "0.50708836", "0.50640583", "0.5057188", "0.5050462", "0.5050462", "0.5050462", "0.5040599", "0.50260776", "0.5006426", "0.5006426", "0.5006426", "0.4943942", "0.49379125", "0.49345487", "0.4934...
0.5824484
1
When the user scrolls down 50px from the top of the document, resize the header's size
function resizeHeaderOnScroll() { const distanceY = window.pageYOffset || document.documentElement.scrollTop, shrinkOn = 50, headerEl = document.getElementById("header"); if (distanceY > shrinkOn) { headerEl.classList.add("shrink"); } else { headerEl.classList.remove("shrink"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function windowResizeHeader() {\n $('header').css('width', document.querySelector('main').scrollWidth);\n $('main').css('marginTop', document.querySelector('header').offsetHeight + 25);\n $('footer').css('top', document.querySelector('header').offsetHeight);\n $('#grid')...
[ "0.7365645", "0.72920966", "0.7206255", "0.71013534", "0.7058861", "0.7052377", "0.70397985", "0.69975305", "0.6948431", "0.6903477", "0.68777806", "0.68758863", "0.68383", "0.68345004", "0.68178886", "0.68127", "0.6801332", "0.6793737", "0.67839885", "0.6781814", "0.6736959"...
0.75982344
0
Finds the public keys for the Cognito User Pool. These are used to verify the JWT. The header of the JWT has a key id (kid) that should be present in the resulting map.
async function getPublicKeys() { const url = `${ISSUER}/.well-known/jwks.json`; const publicKeys = await axios.get(url); return publicKeys.data.keys.reduce((agg, current) => { const pem = jwkToPem(current); // eslint-disable-next-line no-param-reassign agg[current.kid] = { instance: current, pem }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function publicKeys(uid) {\n\tvar user = findUser(uid);\n\tif ( !user )\n\t\treturn null;\n\telse\n\t\treturn user.publicKeys;\n}", "static getPublicKeys(appInterfaceOrTransport, paths) {\n const results = []\n\n let interfacePromise\n if (appInterfaceOrTransport.create) {\n interfacePromise = appI...
[ "0.6216468", "0.60670686", "0.56725246", "0.5421048", "0.5388302", "0.5311302", "0.52668047", "0.52407384", "0.5233965", "0.5202716", "0.5171486", "0.5125022", "0.5108212", "0.51000184", "0.5077955", "0.50771075", "0.5047142", "0.50074124", "0.5001105", "0.5000154", "0.499874...
0.692391
0
Get all html from ngincludes and concatenate with main source
function getNgIncludes() { $log.debug('getNgIncludes'); var ngIncludes = vm.session.source.match(/ngInclude:\s?["|'](.*?)["|']/igm); var includes = []; angular.forEach(ngIncludes, function(include) { include = include.replace(/:\s|\"|\'|ngInclude|{{|}}/g, '').trim(); if (!$f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function injectToHTML() {\n\n\tlet sources = [\n\t\tconfig.injectSourceCSS, config.injectSourceJS\n\t];\n\n\tconst d = \"?\" + Date.now();\n\n\treturn gulp.src(basePages)\n\t\t.pipe(gulpif(config.settings.fileVersion, \n\t\t\tinject(gulp.src(sources, {read: false}), {\n\t\t\taddRootSlash: false,\n\t\t\tignorePath:...
[ "0.6955639", "0.68519", "0.65252185", "0.6502457", "0.64188135", "0.64126045", "0.64102715", "0.6400455", "0.63382304", "0.62812394", "0.62812394", "0.6268049", "0.6249005", "0.61748147", "0.61692107", "0.6119054", "0.6118284", "0.61092687", "0.6093707", "0.6089596", "0.60018...
0.74331284
0
Get all data bind to suggest on assertions
function getAllDataBind() { $log.debug('getAllDataBind'); var dataBind = vm.session.source.match(/\{{2}(.*?)\}{2}|ng-bind=["|'](.*?)["|']/igm); angular.forEach(dataBind, function(data) { data = data.replace(/\"|\'|ng-bind=|{{|}}/g, '').trim(); if (!$filter('filter')(vm.dataBind, d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allBindings() {\n return ko.utils.objectMap(bindingsUpdater ? bindingsUpdater() : bindings, evaluateValueAccessor);\n }", "function allBindings() {\n\t return ko.utils.objectMap(bindingsUpdater ? bindingsUpdater() : bindings, evaluateValue...
[ "0.5685612", "0.56804067", "0.56804067", "0.56804067", "0.56724495", "0.56724495", "0.56724495", "0.56724495", "0.56724495", "0.56724495", "0.56724495", "0.56724495", "0.55698717", "0.55526334", "0.54577756", "0.5208465", "0.51095897", "0.5045488", "0.50054777", "0.49978215", ...
0.6525236
0
the easy keypress menu scrolling
function menuScroll(arr=[]){ // up key if(keysPressed["38"] && !up){ up = true; if(currentPos <= 0){ currentPos = arr.length - 1; } else currentPos--; playBeep(); } else if(!keysPressed["38"] && up){ up = false; } // down key i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onKeyDown() {\n ctrl.selectedIndex = (ctrl.selectedIndex + 1) % ctrl.items.length;\n updateView();\n }", "function keymenu(e) {\n e = e || window.event\n if (e.keyCode == '37' && !keysLocked) { //Left arrow\n prevPage();\n }\n else if (e.keyCode == '38' &&...
[ "0.6672825", "0.655706", "0.6544831", "0.6509319", "0.6504872", "0.64236975", "0.6418161", "0.63650876", "0.63268405", "0.63249695", "0.6310057", "0.6289234", "0.6288213", "0.6286983", "0.6274689", "0.62557864", "0.62469155", "0.6235145", "0.6227747", "0.6225192", "0.621934",...
0.6814225
0
drawing the song select
function drawSongSelectScreen(ctx,screenWidth,screenHeight){ menuScroll(songButtons); let x = 75, y = screenHeight/2; ctx.fillStyle = "white"; ctx.fillRect(0,0,screenWidth,screenHeight); drawBackgroundImage(ctx); let drawPos = 0; let btnNum = currentPos; drawPos = -2; for(let...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function musicPicker(){\n push();\n clear();\n background(0);\n\n // add heading\n push();\n fill(120, 120, 120, 90);\n rect(0,0,width, height/6);\n textSize(40);\n fill(255, 90, 90);\n stroke(10,70,190);\n strokeWeight(5);\n text('Stage One : Choose Music ', width/4, height/10...
[ "0.6724729", "0.66195905", "0.6338158", "0.6199543", "0.61980253", "0.6153914", "0.6118679", "0.61103284", "0.6094497", "0.6060207", "0.602221", "0.6014626", "0.59998995", "0.59617406", "0.5938345", "0.5934662", "0.5904111", "0.5903026", "0.58874637", "0.58589184", "0.5852428...
0.66292953
1
drawing the song select text
function drawSongSelectText(ctx,screenWidth,screenHeight) { ctx.save(); ctx.fillStyle = "black"; ctx.font = "70px Anton"; ctx.fillText("Select a song:",screenWidth/50,100); ctx.restore(); // info ctx.save(); ctx.fillStyle = "black"; ctx.font = "30px Anton"; ctx.fillText("Current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawText()\n\t{\n\t\t// Figure out the correct text\n\t\tvar text = getText();\n\n\t\twid = that.add('text', {\n\t\t\ttext: text,\n\t\t\tcolor: style.color,\n\t\t\tfont: style.font,\n\t\t\tcursor: 'pointer'\n\t\t});\n\n\t\t// Set the width of the widget\n\t\tthat.w = wid.width();\n\n\t\t// Assign a toggle...
[ "0.6523235", "0.64588344", "0.64252263", "0.6403457", "0.6374371", "0.6206639", "0.6150868", "0.6114917", "0.60764045", "0.605008", "0.5971285", "0.5895572", "0.58762765", "0.5868324", "0.58663905", "0.58638644", "0.58367074", "0.58255357", "0.58200514", "0.58075994", "0.5799...
0.730453
0
get favourite blogs based on user id
getFavouriteBlogs() { this.message = 'Getting your favourite blogs...'; this.authService.getCurrentUserId() .then((userId) => { this.blogService.getFavourites(userId) .then((response) => { this.blogs = response; this.message = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFavoritesByUserID(userid){\n return db('yfusers as y')\n .join('favorites as f', 'f.user_id', 'y.id')\n .join('livereviews as m', 'f.review_id', 'm.id')\n .select('y.id as loggedInUser', 'y.username', 'm.id as favoriteID', 'm.business_name', 'm.address', 'm.city', 'm.state', 'm....
[ "0.70582145", "0.6736223", "0.663875", "0.6510545", "0.6497467", "0.639669", "0.6390901", "0.6323874", "0.6303406", "0.62963265", "0.62880886", "0.62863123", "0.62567914", "0.6253042", "0.6243062", "0.6241409", "0.6222478", "0.62092066", "0.61883485", "0.61822563", "0.6170991...
0.728104
0
Initialize the recovery instance or the execution context, if recovery is initialized, the execution context will not be initialized until the execution if finished and the cleanup type is set.
async initialize() { if (this.recoverExecution) { await this._initializeRecovery(); return; } await this._initializeExecution(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async init () {\r\n debug.log('called init');\r\n return;\r\n }", "_preInit() {\n if (this.context) {\n throw new Error(`${this.debugTag} has assigned a context in the wrong place. Make sure to only assign context in shared function.`);\n }\n\n // run shared\n try {\n const...
[ "0.52434635", "0.5099012", "0.5093095", "0.50523466", "0.50348055", "0.50137246", "0.50137246", "0.49970073", "0.49674496", "0.4958503", "0.4958503", "0.49118784", "0.4905058", "0.48866177", "0.48810545", "0.48805696", "0.48718643", "0.4862631", "0.4862631", "0.4862631", "0.4...
0.74997836
0
Called when the 'notifcount' event is received.
onNotifCount (event, count, badgeDataUrl) { log('on renderer notif-count', count, !!badgeDataUrl || null); this.notifManager.unreadCount = count; // Set icon badge if (prefs.get('show-notifications-badge')) { if (platform.isWindows) { if (count) { const image = nativeImage.creat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessageNotificationCount() {\n sidebarDataLayer.getNotificationCount()\n .then(function (success) {\n vm.messageCount = success.data.msg_count;\n }, function (error) {\n notificationService.error(\"message notification count...
[ "0.7104012", "0.68175524", "0.6815846", "0.65888673", "0.64803684", "0.6468668", "0.6461336", "0.63562286", "0.6315667", "0.62785184", "0.6269246", "0.6255818", "0.62458056", "0.6242578", "0.6163388", "0.6130771", "0.60127324", "0.60078824", "0.59948343", "0.594525", "0.59362...
0.78689754
0
Called when the 'openurl' event is received.
onOpenUrl (event, url, options) { if (prefs.get('links-in-browser')) { log('on renderer open-url, externally', url); shell.openExternal(url); } else { log('on renderer open-url, new window', url); const newWindow = new BrowserWindow(options); newWindow.loadURL(url); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleOpenURL(url) {\n setTimeout(function() {\n alert(\"received url outside: \" + url);\n }, 0);\n}", "_handleOpenURL(event) {\n //if(__DEV__) {\n console.log('[deeplink] Updated url in IOS is: ' + event.url);\n //}\n }", "onOpen() {\n\t\t}", "onOpen() { }", "function handleVisi...
[ "0.7432266", "0.6878867", "0.6639782", "0.6581674", "0.652188", "0.6484255", "0.6420495", "0.6339481", "0.6328884", "0.6328642", "0.6252137", "0.61454886", "0.61343545", "0.6087686", "0.6081942", "0.6075571", "0.6022456", "0.6016783", "0.6007649", "0.60053796", "0.5949909", ...
0.6952587
1
END getCustomFloRecords Retrieves all deployed script deployments in the account
function getSearchArray(activeRecords, byScriptIDRecords,lastInternalId){ var internalidColumn = search.createColumn({ name: 'internalid', sort: search.Sort.ASC }); var scriptInternalIDColumn = search.createColumn({ name: 'internalid', join: 'script' }); var searchObj = search.cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomFloRecords(activeRecords, deploymentsByScriptID, lastIndex, starttime){\r\n var internalidColumn = search.createColumn({ name: 'internalid', sort: search.Sort.ASC });\r\n var scriptInternalIDColumn = search.createColumn({ name: 'custrecord_flo_int_id', join: 'custrecord_flo_...
[ "0.62568223", "0.55525106", "0.5306865", "0.5256084", "0.5143359", "0.50999814", "0.50645167", "0.5017739", "0.4971034", "0.4896688", "0.4846361", "0.48256946", "0.47679982", "0.47196501", "0.4711016", "0.46791187", "0.46593416", "0.46480685", "0.46431243", "0.46362174", "0.4...
0.57110393
1
END isJobTobeRescheduled Creates new task and reschedule the job
function rescheduleJob(internalId){ var scheduledScriptTask = task.create({ taskType: task.TaskType.SCHEDULED_SCRIPT }); scheduledScriptTask.scriptId = runtime.getCurrentScript().id; scheduledScriptTask.deploymentId = runtime.getCurrentScript().deploymentId; scheduledScriptTask.params = { cu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ScheduleJob() {\n\t\tvar oJobId,\n\t\t\toJob;\n\n\t\toJob = new $.jobs.Job({\n\t\t\turi: gvJobUri\n\t\t});\n\n\t\t//Create Schedules based on Daily Frequency and Time\n\t\tif (gvFrequency === \"Daily\") {\n\t\t\tif (gvFrequencyTime) {\n\t\t\t var lvHour = gvFrequencyTime.substring(0, 2);\n\t\t\t var...
[ "0.654011", "0.64906704", "0.63723665", "0.62452227", "0.612009", "0.6066678", "0.5944777", "0.58504915", "0.58276767", "0.5773925", "0.57558024", "0.5755499", "0.5746113", "0.5670271", "0.56177187", "0.5606751", "0.55138654", "0.55077684", "0.54967624", "0.5433552", "0.54084...
0.72362566
0
END rescheduleJob Checks whether the current time is within the time window set in config record
function isWithinTimeWindow(starttime, endtime) { //Dummy Record to get current timeof day var dummyConfig = record.create({type: "customrecord_flo_spider_configuration", isDynamic: true}); currenttime = dummyConfig.getValue({fieldId: 'custrecord_flo_conf_current_tod'}) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isJobTobeRescheduled(starttime,ctr){\r\n\t\t\tvar reschedule=false;\r\n\t\t\t// testing only\t\t\t\r\n\t\t\t/*if (ctr >0 && ctr % 25 == 0){\r\n\t\t\t\treschedule=true;\r\n\t\t\t \tlog.audit('isJobTobeRescheduled modulo 25');\r\n\t\t\t}else { */\r\n var runningTime = (new Date().getTime() - ...
[ "0.6380089", "0.61788315", "0.5967579", "0.58046335", "0.5740991", "0.5740156", "0.56979537", "0.56940943", "0.56871235", "0.5677379", "0.56327313", "0.56189394", "0.56163514", "0.5615747", "0.56000227", "0.5556441", "0.55004627", "0.55002975", "0.5466427", "0.54636943", "0.5...
0.6708116
0
Returns file paths based on the include_paths values in config file
function withIncludes(include_paths) { return buildFiles(include_paths); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBasePaths(path, includes, useCaseSensitiveFileNames) {\n // Storage for our results in the form of literal paths (e.g. the paths as written by the user).\n var basePaths = [path];\n if (includes) {\n // Storage for literal base paths amongst the include patterns.\n ...
[ "0.6852303", "0.6131271", "0.61003953", "0.6028405", "0.588232", "0.58709455", "0.5773229", "0.5761934", "0.5727422", "0.5704345", "0.5697759", "0.56576544", "0.5635837", "0.55986077", "0.55963093", "0.5503337", "0.5501292", "0.5499213", "0.54810613", "0.5425567", "0.5407427"...
0.64757216
1
Returns file paths based on the exclude_paths values in config file
function withExcludes(exclude_paths) { var allFiles = glob.sync("/code/**/**", {}); var excludedFiles = buildFiles(exclude_paths); return diff(allFiles, excludedFiles); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getExcludedPaths() {\n let workspaceIgnorePaths = [];\n \n if (FUNCTIONS.isWorkspace()) {\n workspaceIgnorePaths = nova.workspace.config.get(\"todo.workspace-ignore-paths\");\n workspaceIgnorePaths = workspaceIgnorePaths.split(\",\");\n workspaceIgnorePaths = workspaceIgnorePaths.map(functi...
[ "0.69303507", "0.6474806", "0.61840993", "0.61823696", "0.59988594", "0.5966717", "0.58129615", "0.578923", "0.5739656", "0.56256056", "0.5607579", "0.5605982", "0.56059486", "0.55894065", "0.557419", "0.55475575", "0.55314416", "0.5496295", "0.5479844", "0.5472148", "0.54370...
0.65259093
1
Filters the directory paths out
function filterFiles(paths) { return paths.filter(function(file) { return !fs.lstatSync(file).isDirectory(); }); return analysisFiles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listValidDirectories(path) {\n const filesAndDirectories = this.listFileNames(path);\n const directories = filesAndDirectories.filter((fileOrDirectory) => {\n const itemPath = `${path}/${fileOrDirectory}`;\n return (this.isDirectory(itemPath) &&\n !this.isEmpty(it...
[ "0.6580215", "0.6469391", "0.64573324", "0.6387715", "0.63507384", "0.63058853", "0.61720604", "0.6168529", "0.6162446", "0.6148637", "0.6103671", "0.6103671", "0.6103671", "0.6103671", "0.6082928", "0.6008399", "0.59943396", "0.59732616", "0.59610647", "0.5813373", "0.581082...
0.6474096
1
Method adds follower's specific to contract.
addFollowerSpecific() { this.definition.extendedType = NSmartContract.SmartContractType.FOLLOWER1; let ownerLink = new roles.RoleLink("owner_link", "owner"); this.registerRole(ownerLink); let fieldsMap = {}; fieldsMap["action"] = null; fieldsMap["/expires_at"] = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async handleFollowers (attributes, options) {\n\t\t// get the stream, if this is a codemark for a CodeStream team\n\t\tlet stream;\n\t\tif (!attributes.providerType && attributes.streamId) {\n\t\t\tstream = options.stream || await this.request.data.streams.getById(attributes.streamId);\n\t\t}\n\n\t\t// get user pr...
[ "0.6834797", "0.6469312", "0.634945", "0.6292885", "0.62777036", "0.61895496", "0.6051502", "0.5958353", "0.58579546", "0.58219707", "0.58064127", "0.5676509", "0.5674673", "0.56385314", "0.562793", "0.55488396", "0.550159", "0.5462083", "0.5458103", "0.54532915", "0.5448395"...
0.7973084
0
Extract values from deserialized object for follower fields.
deserializeForFollower() { // extract paided U this.paidU = t.getOrDefault(this.state.data, FollowerContract.PAID_U_FIELD_NAME, 0); // extract saved rate of callback price for current revision this.callbackRate = this.state.data[FollowerContract.CALLBACK_RATE_FIELD_NAME]; // ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getFollowings() {\n console.log('Getting users which are followed by you')\n let hash = 'd04b0a864b4b54837c0d870b0e77e076'\n let body = await rp.get({\n url: 'https://www.instagram.com/graphql/query/',\n headers: {\n 'cookie': `sessionid=${sessionId};`\n },\n...
[ "0.5523094", "0.5442215", "0.5396398", "0.52814966", "0.5245693", "0.5244675", "0.5107359", "0.505532", "0.5024515", "0.49875903", "0.49712244", "0.4964646", "0.4962342", "0.4944113", "0.48970288", "0.48840788", "0.48722684", "0.48629916", "0.4861326", "0.4843138", "0.4842721...
0.6720673
0
Deletes userplan from db, gets updated plan list then updates context state
function deleteProject(planId) { console.log('deleting plan with id: ', planId); const idsToDelete = [planId]; const planToDelete = contextState.plans.find(({id}) => id === planId) console.log(planToDelete); const findSubPlanIds = (plan) => { const returnArr = [] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteUserPlan(){\n\tvar datePlanUser = new Object();\n\tdatePlanUser.DatePlanID = exitBut.value;\n\tdatePlanUser.UserID = user.UserID;\n\n\t$.ajax({\n type: 'DELETE',\n \turl: 'api/index.php/deleteDatePlan',\n \tcontent: 'application/json',\n \tdata: JSON.stringify(datePlanUser),\n\...
[ "0.58444303", "0.58306736", "0.5588766", "0.55682206", "0.55029684", "0.5482842", "0.5445667", "0.54386276", "0.54352766", "0.5423037", "0.5417581", "0.53894377", "0.53673136", "0.5315763", "0.5292758", "0.5288273", "0.5281885", "0.52661633", "0.5254645", "0.5230098", "0.5224...
0.62772864
0
var endOfCreateTablePool = 5;
function checkEndOfDropTablePool() { if (endOfDropTablePool === 0) { buildTable(); //console.log("Completed"); } else { //console.log("This was client number " + endOfDropTablePool + " that finished"); endOfDropTablePool--; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTable() {\n\n db.transaction(function (tx) { tx.executeSql(createStatement, [], showRecords, onError); });\n\n}", "function theEnd(err) {\n if (err) {\n closed = 1;\n return closed ? null : reply(boom.badRequest(err));\n }\n s...
[ "0.620277", "0.5970302", "0.57884586", "0.57713044", "0.5756369", "0.5677932", "0.5643745", "0.56382054", "0.56288093", "0.55522966", "0.5524658", "0.5521926", "0.549525", "0.547682", "0.54578424", "0.54547", "0.5421888", "0.54092944", "0.5403083", "0.5398691", "0.5394025", ...
0.6903627
0
Helper function to add UID search
function addUIDSearch() { /* * Searching Identites by UID */ // Create a form var enclosingForm = document.createElement("form"); enclosingForm.style.display= "inline"; enclosingForm.action = "#"; // On submit, perform validation and send enclosingForm.onsubmit = function () { var customUID = docu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchUser() {\n var WINDOW_LOCATION_SEARCH = \"?search={search}\"\n var term = $('#search').val().trim();\n if (term.length > 3) {\n var bySearchTermUrl = GET_USERS + WINDOW_LOCATION_SEARCH.replace('{search}', term)\n fetchUsers(bySearchTermUrl)\n }\n}", "function solrFieldNam...
[ "0.59078103", "0.5877692", "0.5822768", "0.57152414", "0.56979114", "0.5695214", "0.5633467", "0.5626136", "0.55035824", "0.5490441", "0.5458792", "0.5448992", "0.54014945", "0.53974897", "0.53840184", "0.5371555", "0.53651094", "0.5359213", "0.5355723", "0.5351406", "0.53457...
0.75199103
0
Get a duration string from a track
function GetTrackTime(track) { var secs = track.LengthInSeconds % 60, mins = (track.LengthInSeconds - secs) / 60; if (secs < 10) secs = '0' + secs; return ' (' + mins + ':' + secs + ')'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateDuration(milliseconds) { //function invoked programmatically when processing the Spotify server's response to a request for an artist's popular tracks\n let seconds = Math.round(milliseconds/1000); //let the 'seconds' variable represent the rounded result of the 'milliseconds' argument divided...
[ "0.64817554", "0.64718753", "0.63595665", "0.6323843", "0.6293947", "0.6123787", "0.60796154", "0.60549885", "0.6016602", "0.60123914", "0.5839503", "0.5835035", "0.5824994", "0.5779424", "0.5778789", "0.57704234", "0.5761394", "0.5737534", "0.56991345", "0.5696825", "0.56745...
0.7139923
0
Runs the CPM algorithm, assigning early start (es), early finish (ef), late start (ls), late finish (lf), total float (tf), free float (ff), and critical (boolean) properties to each activity in the activities array. The activites are sorted in ascending order based on latest finishing time.
run() { this.root = this.getRoot(); this.earlyFinish = this.forwardPass(this.root, this.activities); this.backwardPass(this.root, this.activities, this.earlyFinish); this.activitySort(this.activities); this.retrieveImmmediateSuccessors(this.root, this.activities); this.calculateFloat(); retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateFloat() {\n for (const currentActivity of this.activities) {\n currentActivity.tf = currentActivity.lf - currentActivity.ef;\n /* Since all successors should have the same early start,\n we can grab a successor of the current activity. */\n const aSuccessor = this.activities.find(\...
[ "0.5250167", "0.52247745", "0.5205696", "0.51601374", "0.51021576", "0.50626993", "0.5012059", "0.5012059", "0.4965006", "0.49635625", "0.4911061", "0.48936766", "0.48888436", "0.487514", "0.48199344", "0.47928527", "0.47914055", "0.47788745", "0.47727743", "0.47727743", "0.4...
0.5817797
0
Retrieves the root activity for a project, defined as the activity for which there are no further successors.
getRoot() { const uniquepredecessor = this.activities.reduce( (accumulator, activity) => { activity.predecessor.forEach((predecessor) => { accumulator.add(predecessor); }); return accumulator; }, new Set() ); const root = this.activities.find((activity) =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getcurrentprojects() { }", "function getProjectActivity(projectList, maxActivity) {\n if (projectList.length > 400) {\n console.log(\"Are you CRAZY?!? That's too many projects.\")\n return;\n }\n var activityPerProject = [];\n for (var i = 0; i < projectList.length; i++) {\n var...
[ "0.54950845", "0.536033", "0.503446", "0.5003426", "0.49041235", "0.48776248", "0.48227465", "0.48156738", "0.48024306", "0.4712659", "0.4702299", "0.4673612", "0.46468395", "0.46233344", "0.4550932", "0.45480233", "0.45392978", "0.4536877", "0.45262927", "0.45231938", "0.451...
0.638004
0
For each activity, calculate the total float (tf), free float (ff), and whether or the activity falls on the critical path (boolean). Assign these values to their respective activities. Modifies the activity array inplace.
calculateFloat() { for (const currentActivity of this.activities) { currentActivity.tf = currentActivity.lf - currentActivity.ef; /* Since all successors should have the same early start, we can grab a successor of the current activity. */ const aSuccessor = this.activities.find( (a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "run() {\n this.root = this.getRoot();\n this.earlyFinish = this.forwardPass(this.root, this.activities);\n this.backwardPass(this.root, this.activities, this.earlyFinish);\n this.activitySort(this.activities);\n this.retrieveImmmediateSuccessors(this.root, this.activities);\n this.calculateFloat(...
[ "0.5218022", "0.50786567", "0.5076821", "0.49598294", "0.47942314", "0.47896254", "0.47701213", "0.47302532", "0.47042066", "0.46816015", "0.46754125", "0.4659454", "0.4629377", "0.46168423", "0.46049744", "0.46049744", "0.4600224", "0.45943886", "0.4593754", "0.4564273", "0....
0.6919492
0
Determine is menu item should be include for projectId
function include(item, projectId) { const { include, exclude } = item; return (include == null && exclude == null) || (include != null && include.indexOf(projectId) !== -1) || (exclude != null && exclude.indexOf(projectId) === -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shouldShowProject(data) {\n return data.title && !(\"hidden\" in data);\n}", "function checkMenu(){\n var locationItem = $location.search().ss;\n var locationSection = $location.search().s;\n var item = _.findWhere(service.parts.items[locationSection], {name: locationIt...
[ "0.6250647", "0.5625529", "0.5531065", "0.5450655", "0.54476", "0.54028183", "0.5399269", "0.53976905", "0.5389841", "0.53819484", "0.53811145", "0.5376622", "0.535207", "0.5307186", "0.5306991", "0.53051966", "0.5281604", "0.52810043", "0.5274405", "0.52722025", "0.5260835",...
0.6811645
0
We want build tree with keys as translations and values as original texts. For better performance for searching elements.
getTranslationsTree(){ //Debug given texts var debugText = []; //Build translates tree for ( var key in this.allTranslates ) { var translate = this.domPreparer.prepareTranslateHTML(this.allTranslates[key][0]||key); /* * DEBUG only given texts ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTsu(tree) {\n const result = {};\n for (const [key, value] of Object.entries(tree)) {\n if (!key) {\n // we have reached the bottom of this branch\n result[key] = `っ${value}`;\n } else {\n // more subtrees\n result[key] = addTsu(value);\n }\n }\n r...
[ "0.58842486", "0.5833293", "0.5787005", "0.5688145", "0.5687705", "0.568191", "0.54764754", "0.5409496", "0.536727", "0.53334725", "0.5310823", "0.53027725", "0.52927834", "0.52894056", "0.52596146", "0.5255391", "0.5234261", "0.5201323", "0.5197445", "0.5197445", "0.5197445"...
0.77441484
0
Check if given translation is in text block from editor field (type:editor)
isInEditorElement(element){ if ( element ) { if ( element.hasPointer && element.hasPointer.indexOf('translatable') > -1 ) { return true; } if ( element.nodeName != '#text' && element.getAttribute('data-crudadmin-editor') === '' ) { return true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasTexts(editor, element) {\n return element.children.every(n => Text.isText(n));\n }", "hasTexts(editor, element) {\n return element.children.every(n => Text.isText(n));\n }", "isBlock(editor, value) {\n return Element.isElement(value) && !editor.isInline(value);\n }", "isBlock(editor, value) {\...
[ "0.6443548", "0.6443548", "0.62367404", "0.62367404", "0.6154448", "0.61517245", "0.58699477", "0.58699477", "0.56985277", "0.56985277", "0.56627595", "0.56097907", "0.55531263", "0.55523014", "0.54861355", "0.54861355", "0.5444729", "0.54415315", "0.5427478", "0.5421324", "0...
0.65629715
0
Update all translates with same translation
updateSameTranslationElements(element){ for ( var i = 0; i < CAEditor.matchedElements.length; i++ ) { if ( CAEditor.matchedElements[i].getPointerSetting('originalTranslate', 'translatable') == element.getPointerSetting('originalTranslate', 'translatable') ) { if ( CAEditor.matchedEle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function translateAll() {\n\t$(\"span[data-translated]\").each(function(){\n\t\tvar translatedData = $(this).attr('data-translated');\n\t\t$(this).text(translatedData);\n\t});\n}", "function translateAll(t) {\n\tvar $elementsToTranslate = $('[data-i18n]');\n\t\n\tif (exists($elementsToTranslate)) {\n\t\tfor(var ...
[ "0.70455176", "0.6580601", "0.65523267", "0.6515779", "0.6389982", "0.6376157", "0.6273291", "0.62172514", "0.6163577", "0.6163577", "0.60757834", "0.60646904", "0.6046477", "0.59718996", "0.5901356", "0.58527195", "0.5788213", "0.5784478", "0.57767767", "0.57624793", "0.5761...
0.6700082
1
reset post views on change
handleSetViews( value ) { // force update button to be clickable wp.data.dispatch( 'core/editor' ).editPost( { meta: { _pvc_post_views: value } } ); this.setState( () => { return { postViews: value } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetComposeView () {\n this.props.setCurrentPost(null)\n }", "function resetPageCounter() {\n self.pagesLoaded = 0;\n self.newUpdatesApplied = 0;\n self.uncountedPosts = [];\n self.countedPosts = [];\n }", "resetPostEditId(){\n loc...
[ "0.64552325", "0.6238099", "0.59901357", "0.59631294", "0.59099764", "0.5882386", "0.57926726", "0.57926726", "0.5739985", "0.5729585", "0.57082224", "0.5701196", "0.5640535", "0.5571028", "0.55539554", "0.5540789", "0.55403674", "0.5536599", "0.55213314", "0.5500447", "0.548...
0.6652581
0
Creates books and authors returns array of Book.create promises
function populateDatabase(booksArr) { const bookPromisesArr = booksArr.map(bookObj => { const bookPromise = Author.create(bookObj.author) .then(createdAuthor => { const bookPr = Book.create({ ...bookObj, author: createdAuthor._id }); return bookPr; }) .catch(err => console.log(er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBook(title) {\n return new Promise((resolve, reject) => {\n let bookToSave = new Books({ title });\n bookToSave.save((err, data) =>\n err ? reject(null) : resolve(data));\n });\n }", "static createBooks (amt, model, data) {\n return function (user) {\n u...
[ "0.66934973", "0.63480157", "0.6319241", "0.6237567", "0.6024237", "0.60131586", "0.5948263", "0.5886392", "0.58493376", "0.58257926", "0.5810981", "0.5795279", "0.57926095", "0.578554", "0.57737637", "0.5712885", "0.57047814", "0.56970763", "0.56235373", "0.5618312", "0.5597...
0.75729966
0
Loads GameObjects from layer. `class` tag specifies class in mapping and `param` is passed as paramters
fromTiledLayer(map, classMapping, layerName = 'Object Layer 1') { // get list of objects let objs = map.layers.find(l => l.name === layerName).objects; // filter out those without tag objs = objs.filter(o => (o.properties && o.properties.find(p => p.name === 'class'))); // load o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createFromObjects(layerName, gid, spriteClass, group) {\n parent.stage.createFromObjects(layerName, gid, null, null, true, false, group, spriteClass, true);\n }", "static load(gameInstance) {}", "function loadGlb(object,selectable) {\n loader.load(\n object.path,\n function ( gltf ) {\n ...
[ "0.62185097", "0.5965939", "0.56523407", "0.53426117", "0.525501", "0.52301705", "0.52239984", "0.5223409", "0.515182", "0.5121722", "0.5110439", "0.5106571", "0.51062495", "0.5104791", "0.5101975", "0.510101", "0.5096642", "0.5091995", "0.50903654", "0.50875217", "0.5087509"...
0.73816186
0
FUNCTION FOR PREVENTING AFFILIATE IFRAMES FROM SLOWING PAGE LOAD
function affiliateFrames(){ var theURL, theFrame, theWidth, theHeight, theTitle; var spans = document.getElementsByTagName('span'); for (var i = 0; i<spans.length; i++){ if (hasClass(spans[i], 'afframe')){ theTitle = spans[i].title.toLowerCase().replace(/^\s+|\s+$/g,""); switch (theTitle) { case 'adobe 3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function frameBuster()\n{\n}", "function Interpreter_ProcessLoadedFrames()\n{\n\t//do we have work to do?\n\tvar processing = this.IFramesWaitingForLoad.length > 0;\n\t//if we are processing\n\tif (processing)\n\t{\n\t\t//\"copy\" the array of frames to load\n\t\tvar updateList = this.IFramesWaitingForLoad;\n\t\...
[ "0.64184487", "0.59190416", "0.5885082", "0.5809257", "0.57558995", "0.5755613", "0.5743273", "0.57252127", "0.57246715", "0.5722", "0.56799155", "0.5677672", "0.5621738", "0.5619386", "0.56010157", "0.5591387", "0.5568163", "0.5560225", "0.5532748", "0.55294985", "0.55219203...
0.60541433
1
Title icons Looks for title icons (class="icon") and Shifts them to the right of the title on the page.
function titleicons() { var h1 = document.getElementsByTagName("h1")[0]; var icons = getElementsByClass( "icon", document, "div" ); for( var j = icons.length; j > 0; --j ){ icons[j-1].style.display = "block"; /* cancels "display: none" by default */ icons[j-1].style.marginLeft = "0.35em"; if( skin == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTitleIcons() {\n if (skin == 'monaco' || skin == 'monobook' || skin == 'oasis') {\n var insertTarget;\n \n switch (skin) {\n case 'monobook':\n insertTarget = $('#firstHeading');\n break;\n case 'monaco':\n insertTarget = $('#article > h1.fir...
[ "0.6847447", "0.6339608", "0.62998915", "0.5981498", "0.5809575", "0.5765122", "0.5689369", "0.56378675", "0.56311804", "0.5601717", "0.56014276", "0.5591319", "0.5591319", "0.5591319", "0.5591319", "0.5559933", "0.55561095", "0.54987454", "0.5492391", "0.54701144", "0.538262...
0.7349161
0
checks if sprite lands on bomb and appends
function bombCheck() { if (x==1 && y==2 || x==18 && y==3 || x==18 && y==9 || x==13 && y==2 || x==3 && y==7 || x==14 && y==6 || x==17 && y==7) { const position = getPosition(); position.append(bombImg); alert('You hit the bomb!') health -= 10; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRocket_Clash_Bomb() {\r\n for (let i in stages.bomb) {\r\n if (\r\n stages.bomb[i].y >= rocket1.y &&\r\n stages.bomb[i].y <= rocket1.y + rocket1.height &&\r\n stages.bomb[i].x - rocket1.width <= rocket1.x &&\r\n stages.bomb[i].x >= rocket1.x\r\n ) {\r\n st...
[ "0.74117064", "0.6805632", "0.6698237", "0.6670979", "0.6517813", "0.6488071", "0.64854157", "0.6478197", "0.6362964", "0.63297725", "0.6314641", "0.6265464", "0.6265142", "0.6257174", "0.62540233", "0.62448204", "0.618354", "0.6160284", "0.61590874", "0.6150287", "0.6138672"...
0.73008186
1
riddle function only plays if riddePlayed == false
function riddle() { if(riddePlayed == false) { if(x==8 && y ==8) { const position = getPosition(); position.append(riddeImg); var answer = prompt('What gets bigger the more you take away from it?'); if(answer.toUpperCase()=='A HOLE') { score += 20; scoreCheck(); alert('You just got 2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function riddleTwo() {\n\tif(riddePlayedTwo == false) {\n\t\tif(x==24 && y ==4) {\n\t\t\tconst position = getPosition();\n\t\t\tposition.append(riddeImg);\n\t\t\t\tvar answer = prompt('I have hands I can move but I cannot clap, what am I?');\n\t\t\t\t\tif(answer.toUpperCase()=='A CLOCK') {\n\t\t\t\t\t\tscore += 20...
[ "0.6812742", "0.66949683", "0.66364855", "0.65233266", "0.6424245", "0.61829937", "0.61618555", "0.614032", "0.61309934", "0.61223215", "0.611434", "0.611434", "0.611077", "0.60755706", "0.6069289", "0.6069289", "0.6051811", "0.6039284", "0.6027259", "0.6024517", "0.59933037"...
0.68834525
0
riddle function only plays if riddePlayed == false
function riddleTwo() { if(riddePlayedTwo == false) { if(x==24 && y ==4) { const position = getPosition(); position.append(riddeImg); var answer = prompt('I have hands I can move but I cannot clap, what am I?'); if(answer.toUpperCase()=='A CLOCK') { score += 20; scoreCheck(); alert('Y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function riddle() {\n\tif(riddePlayed == false) {\n\t\tif(x==8 && y ==8) {\n\t\t\tconst position = getPosition();\n\t\t\tposition.append(riddeImg);\n\t\t\t\tvar answer = prompt('What gets bigger the more you take away from it?');\n\t\t\t\t\tif(answer.toUpperCase()=='A HOLE') {\n\t\t\t\t\t\tscore += 20;\n\t\t\t\t\t...
[ "0.68834984", "0.669424", "0.6636163", "0.65226024", "0.64236796", "0.6182333", "0.61614054", "0.6139923", "0.6130631", "0.61219424", "0.6113765", "0.6113765", "0.6111432", "0.6076325", "0.60686535", "0.60686535", "0.6051315", "0.60387707", "0.6027697", "0.60242844", "0.59931...
0.6812801
1
guess a number against computer you make a bet on if you can get it right
function randomNumber() { if (getyx(y,x) =='Y3X23' || getyx(y,x) =='Y3X2') { var randomNumber = (Math.floor(Math.random() * 5) + 1); var bet = prompt('Please make a wager'); var guess = prompt('Please pick a number from 1 to 5'); if(parseInt(guess) == randomNumber) { alert('You just increased your score by...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guessing_game(guess) {\n var num = Math.ceil(Math.random() * 10);\n\n if (guess == num)\n alert('Good Work');\n else\n alert('Not matched, the number was ' + num);\n}", "function guessing_game(guess) {\n // Get a random integer from 1 to 10 inclusive\n var x=Math.ceil(10*Math.random())...
[ "0.73781186", "0.72886837", "0.7174659", "0.7148181", "0.7114091", "0.70204103", "0.6987928", "0.69846153", "0.69697857", "0.6958348", "0.69351506", "0.69322866", "0.6923629", "0.6903926", "0.6824664", "0.6813886", "0.68066704", "0.6791859", "0.6784959", "0.6780025", "0.67589...
0.7446965
0
function creates a new element with text. A unique identifier is set to the new element
function createNewElement(elementType, newElementUniqueIdentifier, elementStr, parentElementID) { var newElement = document.createElement(elementType); newElement.setAttribute("id", newElementUniqueIdentifier) var elementText = document.createTextNode(elementStr); newElement.appendChild(elementText); document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNewText() {\n // making a new element object\n let newElement = document.createElement(\"p\");\n // modifying its contents\n newElement.innerHTML = \"new element\";\n // appending it to the end of the body\n document.body.appendChild(newElement);\n }", "fu...
[ "0.70894897", "0.7069185", "0.69756806", "0.69499034", "0.69424087", "0.6906688", "0.6822006", "0.6805651", "0.67906874", "0.6782234", "0.6733353", "0.6733353", "0.67127377", "0.66874534", "0.6685392", "0.66414106", "0.6631054", "0.6618224", "0.66118985", "0.66066647", "0.658...
0.7335491
0
Loads FFM district polygons
function loadMapShapes(){ //loads FFM geojson file map.data.loadGeoJson('https://raw.githubusercontent.com/codeforffm/district_finder/master/googlemaps/frankfurt-main.geojson'); google.maps.event.addListenerOnce(map.data, 'addfeature', function(){ google.maps.event.trigger(document.getElementById('criteria-varia...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractCouncilDistricts (jsonPath) {\n const districtFileContents = fs.readFileSync(jsonPath)\n const councilFeatureCollection = JSON.parse(districtFileContents)\n\n // keys are district numbers, values are GeoJSONn boundaries\n let idToBoundaryMap = {}\n\n councilFeatureCollection.features.forEach(f...
[ "0.6099774", "0.60996133", "0.60989845", "0.5787687", "0.576958", "0.5663766", "0.56612957", "0.5586829", "0.5553022", "0.54617167", "0.5409049", "0.53999686", "0.5398373", "0.53902936", "0.537852", "0.53589565", "0.5340791", "0.53108835", "0.5305637", "0.53055435", "0.529389...
0.66271824
0
DELIVERY GUY APPENDOVANJE SELECT LISTE
function addDeliveryGuyToList(delivery) { if(delivery.voziloId == -1) { $("#orderDelivererSelect").append('<option value="' + delivery.id + '">' + delivery.username + '</option>'); $("#newOrderDelivererSelect").append('<option value="' + delivery.id + '">' + delivery.username + '</option>'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargaTransporte(){\n\tconsole.log($('#txtIdCliente').val());\n\tvar idCliente = $('#txtIdCliente').val();\n\tvar ruta = \"/facturacion/buscatransporte/\" + idCliente;\n\t$.post(ruta, function(data){\n\t\t$('#lstTransporte').html('<option value=\"\">-- Transporte --' + data);\n\t});\n}", "function comboP...
[ "0.63957274", "0.62908816", "0.6162894", "0.6078232", "0.60773534", "0.6056547", "0.6035708", "0.6025848", "0.5980274", "0.5963261", "0.59562683", "0.5949805", "0.59449977", "0.59412545", "0.5916501", "0.58855647", "0.5878631", "0.58709663", "0.5858353", "0.585732", "0.583389...
0.6542063
0
gets the control associated with a component
function getControl(component) { var host = ReactDOM.findDOMNode(component); return wijmo.Control.getControl(host); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get component() {\n return this._componentRef.instance;\n }", "get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent$1(nativeElement) || getOwningComponent(nativeElement));\n }", "FindComponent(component)\n\t{\n\t\tret...
[ "0.6664873", "0.6292124", "0.6271524", "0.61969286", "0.61818284", "0.6139839", "0.61160195", "0.60932153", "0.6093094", "0.60121536", "0.59628946", "0.5916966", "0.5902603", "0.5895775", "0.5878788", "0.5850081", "0.58465326", "0.5827249", "0.5786909", "0.5755438", "0.574252...
0.84295297
0
mounts a new control onto a component
function mount(component, controlType) { // instantiate the control var host = ReactDOM.findDOMNode(component), control = new controlType(host), cprops = component.props; // initialize the control with properties and event handlers, // and the host element with the re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mount() {\n this.updateAnimationControlsSubscription();\n }", "updateControl(){\n this._control.update();\n }", "_mountComponent() {\n\t\t// wait next frame\n\t\tthis.mutate(() => {\n\t\t\t// sometimes, the component has been unmounted between the\n\t\t\t// fastdom execution, so we stop here if i...
[ "0.6108432", "0.57919395", "0.5710287", "0.5656766", "0.56481487", "0.56102586", "0.5541057", "0.55396783", "0.5517013", "0.54570675", "0.5420434", "0.5357227", "0.53420824", "0.5341063", "0.533623", "0.5329848", "0.5266415", "0.5247678", "0.52311826", "0.5229625", "0.5224913...
0.6829607
0
update component value to match control's
function _update() { this.component[this.prop] = this.control[this.prop]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateValue(value) {\n if (this.control) {\n this.control.control.setValue(value);\n }\n else {\n this.target.value = value;\n }\n }", "function updateValue( value ) \n{\n \n updateComponentValue( value );\n \n}", "updateControl(){\n this._control....
[ "0.7241002", "0.72254723", "0.69481194", "0.6947004", "0.67606336", "0.6602131", "0.6563453", "0.65227604", "0.64768326", "0.64724743", "0.6447024", "0.640809", "0.63762283", "0.63743144", "0.6295509", "0.62937236", "0.6286469", "0.6286117", "0.6286117", "0.6286117", "0.62861...
0.76027435
0
disposes of the control associated with a component
function unmount(component) { getControl(this).dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dispose() {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this.outletElement.parentNode.removeChild(this.outletElement);\n }\n }", "dispose() {\n this._disposed = true;\n }", "_destroyLabel () {\n this._label && this._label.dispose();\n }",...
[ "0.6801484", "0.6710262", "0.656747", "0.6558099", "0.65181214", "0.64961195", "0.648281", "0.64421546", "0.64421546", "0.6386172", "0.63772976", "0.6364599", "0.63154984", "0.62971336", "0.6290483", "0.62787795", "0.62634", "0.6255219", "0.6251963", "0.6251963", "0.6251963",...
0.7203641
0
padding function for leading zeroes on timer / pads the timer.
function pad(time){ if(time < 10){ return "0" + time; } return time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pad0(i,w) { return (\"000\" + String(i)).slice(-w); }", "function padTimer(num) {\n\t\tlet numString = num.toString();\n\t\twhile (numString.length < 2) {\n\t\t\tnumString = \"0\" + numString;\n\t\t}\n\t\treturn numString;\n\t}", "function pad(number, length, ending) {\n return (`0000${number}`)....
[ "0.73439676", "0.7324027", "0.727295", "0.7253498", "0.71737057", "0.7167465", "0.71508443", "0.71394557", "0.70825905", "0.70768476", "0.7048719", "0.7026721", "0.70197684", "0.69960916", "0.6968192", "0.69426024", "0.6920448", "0.69102526", "0.68925524", "0.68904984", "0.68...
0.74599737
0
functions enlarges a game to play mode
function enlargeGame(pos) { enlarged = pos; /* back button is shown when a module is clicked and enlarged */ $('#backbutton').fadeIn(250); if (enlarged.type = "simonGame") { $("#replay").fadeIn(250); } /*fades the minigauge in when module is expanded*/ $('#mini').fadeIn(250); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enlarge()\r\n\t{\r\n\t\t//var portwidth = (gl.viewportWidth-2) * 2 + 2;\r\n\t\t//gl.viewportWidth = portwidth;\r\n\t\tvar canvas = document.getElementById(\"lesson01-canvas\");\r\n\t\tvar cwidth = canvas.width;\r\n\t\tvar cheigth = canvas.heigth;\r\n\t\tcanvas.width = (cwidth-2)*2 + 2;\r\n\t\tdrawScene();...
[ "0.71100366", "0.66034335", "0.64149064", "0.6399009", "0.6319584", "0.6281824", "0.6206947", "0.61994004", "0.6182732", "0.6166065", "0.6150937", "0.6121393", "0.60855275", "0.6073722", "0.6073089", "0.60256416", "0.60233814", "0.6012538", "0.5999974", "0.5996885", "0.598911...
0.7216446
0
heat gauge heat increase function. increases heat by 5 every second and adds heat from gauges to main heat bar.
function heatGenerate(){ for(var key in activeArray) { if(activeArray[key].heat < 100) { activeArray[key].heat += HEAT_PER_TICK; } var $fill; switch (enlarged) { case "": $fill = $("#" + key + " .gauge-fill"); break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addHeat(data, heat) {\n\t\tif(!data) return;\n\t\tlet multiplier = 10 / Math.max(10, data.maxPopulation);\n let addedHeat = heat * Math.pow(1.05, data.resets) * multiplier;\n data.heat += addedHeat;\n console.log(`Heat increased by ${heat} to ${data.heat}`);\n\t}", "function updateGauges() {...
[ "0.68723404", "0.61031944", "0.5826972", "0.57751966", "0.57687783", "0.5757556", "0.57505333", "0.57326627", "0.5632379", "0.56206673", "0.56069297", "0.5599339", "0.5494908", "0.54565233", "0.54148185", "0.53797764", "0.53767186", "0.53740185", "0.5367144", "0.53368807", "0...
0.69921327
0
ajax call to submit scores
function ajaxSubmitScore() { $.ajax({ type: 'POST', url: 'leaderboard/submit_score.php', data: { score: min * 600 + sec * 10 + dsec, }, success: function(response) { $('.scoreSubmission').html("<h3>Your Rank:<span>#" + response + "</span></h3>"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitScore(scores){\n $.ajax({\n type: \"POST\",\n url: 'php/calculateScore.php',\n data: {scores: scores},\n success: function(data){\n //update current score with response from php\n $('.currentScore').text(data.sum);\n ...
[ "0.78997767", "0.77061325", "0.76074696", "0.74539423", "0.7447248", "0.7441385", "0.73192453", "0.7114112", "0.7041058", "0.7023641", "0.7012322", "0.6918795", "0.6836911", "0.67119545", "0.6704996", "0.66381615", "0.66077584", "0.65846884", "0.6558892", "0.6545783", "0.6525...
0.77951217
1