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
get the payload, merge dates and dataElements and construct an object with the structure of a geoJSON
function generateGeoJSON(data){ let namesMap = data; let geoJSON = []; axios.get(`http://localhost:3000/api/dhis`) .then(response => { const data = response.data; let cases = []; let dates = []; let values = []; //extract the dataValues arrays data.events.forEach(event => { cases.push(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_constructGeoJson(feature) {\n var coordinates = [];\n\n var lat = Math.round(feature.lat * 10) / 10;\n var lng = Math.round(feature.lng * 10) / 10;\n\n coordinates.push(lng);\n coordinates.push(lat);\n\n return {\n type: 'Feature',\n geometry: {\n type: 'Point',\n coordin...
[ "0.6387824", "0.6086493", "0.60070795", "0.59651095", "0.59293526", "0.5771264", "0.5678587", "0.5677056", "0.5616087", "0.56084657", "0.55845517", "0.5566689", "0.5546781", "0.55434865", "0.55383205", "0.5538176", "0.55228823", "0.5509768", "0.53996974", "0.5388173", "0.5385...
0.629245
1
int __thiscall LRPC_ADDRESS::AlpcSend( LRPC_ADDRESS this, struct _PORT_MESSAGE a2, int a3, void a4, void a5, unsigned int a6, struct LRPC_SYSTEM_HANDLE_DATA a7 )
function hookLRPC_ADDRES_AlpcSend(moduleName) { hookFunction(moduleName, "LRPC_ADDRESS::AlpcSend", { onEnter: function (args) { log_message("[+] " + moduleName+ "!LRPC_ADDRESS::AlpcSend") log_message(" a2: " + args[0]) dumpPortMessage(ptr(args[0])) }, onLe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "send(address: string, packet: Object) {\n throw new Error(`Not implemented (sending ${typeof packet} to ${address})`);\n }", "function $oscsend(param)\n{\n\tvar thisPtr=this;\t\n\t\t\t\n\tvar host = param.split(\" \")[0]||\"127.0.0.1\";\n\tvar port = parseInt(param.split(\" \")[1])||8989;\n\t\t\n\tthis.inlet...
[ "0.5944719", "0.56534654", "0.5297736", "0.52839655", "0.5258882", "0.52552176", "0.52003", "0.5162679", "0.516177", "0.5076305", "0.5071018", "0.5060296", "0.5041427", "0.5039675", "0.5023073", "0.5022024", "0.5014009", "0.50114965", "0.50051254", "0.49983808", "0.4939136", ...
0.720107
0
React Life Cycle. Locates apikey from local storage when the component mounts and sets the saved state as true if they apikey is not an empty value
componentDidMount() { this.keyData = JSON.parse(localStorage.getItem('apikey')); if (this.keyData && this.keyData.apikey && this.keyData.apikey !== '') { this.setState({ apikey: this.keyData.apikey, saved: true }); } else { this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkApiInLocalStorage(){\n if(localStorage.getItem(\"apiKey\") === null){\n apiKey.focus();\n airQualityContainer.style.visibility = \"hidden\";\n weatherContainer.style.visibility = \"hidden\";\n\n } else {\n apiKey.value = \"\";\n getLocation();\n apiContainer.style.disp...
[ "0.6911631", "0.67037904", "0.660576", "0.64975184", "0.64900553", "0.63590705", "0.6358942", "0.6290964", "0.627795", "0.6236713", "0.62203854", "0.61412346", "0.611554", "0.6114234", "0.61052203", "0.6093481", "0.6090779", "0.60863817", "0.60825413", "0.60517055", "0.603389...
0.83620876
0
Proxy Server / Enables the proxy server
enableProxyServer (host, port) { if (host) { if (host.indexOf('://') === -1) { host = 'http://' + host } } if (port) { port = port.replace(/[^0-9\\.]+/g, '') } this.setProxyServer({ host: host, port: port, enabled: true }) return {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disableProxyServer () {\n this.setProxyServer({ enabled: false })\n return {}\n }", "function configureProxy(callback) {\n\tgetOptions(function(items) {\n\t\tif (items['optionProxy']) {\n\t\t\tenableProxy(function(result) {\n\t\t\t\tconsole.log(\"configured enableProxy in onInstalled\");\n\t\t\t\tcallback...
[ "0.7230123", "0.70970845", "0.666971", "0.65734047", "0.64098746", "0.6388739", "0.6330948", "0.63151693", "0.6231072", "0.61597097", "0.6096553", "0.60579395", "0.6009474", "0.5980852", "0.59623253", "0.5959714", "0.59218746", "0.59083074", "0.5890077", "0.5879785", "0.58666...
0.83234686
0
Disables the proxy server
disableProxyServer () { this.setProxyServer({ enabled: false }) return {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableNetwork() {\n dedicatedWorker.postMessage('disableNetwork');\n}", "function disableNetwork() {\n sharedWorker.port.postMessage('disableNetwork');\n}", "disable() {\n return this._client.send(\"Network.disable\");\n }", "unforceOffline() {\n this.internal.offlineForced = false;\...
[ "0.6366262", "0.6327098", "0.6253354", "0.58798474", "0.58416486", "0.58370596", "0.5810972", "0.5810972", "0.5810972", "0.5810972", "0.57965696", "0.5787286", "0.5787038", "0.5733847", "0.5718598", "0.57136816", "0.57130474", "0.5691809", "0.5688278", "0.5680042", "0.5667671...
0.8068228
0
Handles that the auth state changed and updates the completed state.
authChanged () { if (this.completed !== this.getCompleted()) { this.completed = this.getCompleted(); this.requestUpdate().then(); // Update the description as well const $description = this.shadowRoot.querySelector("#description"); if ($description != null) { $description.requestUpdate(); } }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onAuthStateChanged(result) {\n setUser(result)\n if (initializing) setInitializing(false)\n }", "function handleAuthChange() {\n if (auth.isSignedIn.get()) {\n // setName(auth.currentUser.get().wt.Ad);\n setName(auth.currentUser.get().Es.bT);\n }\n const newIsSignedIn = auth.is...
[ "0.6944953", "0.6788812", "0.6621948", "0.6439748", "0.6403341", "0.6402804", "0.6402804", "0.6402804", "0.63702005", "0.6362297", "0.6268043", "0.62053496", "0.6186681", "0.6186681", "0.61300397", "0.60601044", "0.6056411", "0.60373825", "0.6016763", "0.60144615", "0.6005254...
0.7156418
0
Toggles force showing the description.
toggleForceShowDescription () { const forceShowDescription = !this.isShowingDescription; dispatchCloseDescriptionEvent(); this.forceShowDescription = forceShowDescription; if (!this.forceShowDescription) { this.closeDescription(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleDescription() {\n self.showingDescription = !self.showingDescription;\n }", "toggleDescriptions() {\n let toggle = this.refs[\"settings-descriptions-toggle\"];\n toggle.getActiveVal() ? this.props.setDescriptionVisibility(false): this.props.setDescriptionVisibility(true);\n ...
[ "0.8621952", "0.72782844", "0.72568166", "0.714197", "0.6912965", "0.6877644", "0.6766627", "0.6688451", "0.66364497", "0.6559792", "0.65510416", "0.65331924", "0.65331924", "0.6420764", "0.64049244", "0.64003885", "0.63906765", "0.6379586", "0.636715", "0.6353004", "0.631808...
0.86108464
1
Gets a `HarnessPredicate` that can be used to search for a `MatAutocompleteOptionHarness` that meets certain criteria.
static with(options = {}) { return new HarnessPredicate(MatAutocompleteOptionHarness, options) .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static with(options = {}) {\n return new HarnessPredicate(MatAutocompleteOptionGroupHarness, options)\n .addOption('labelText', options.labelText, (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label));\n }", "function getPredicate(filter) {\n return function(apa...
[ "0.62389874", "0.57203925", "0.5609943", "0.47497445", "0.46903113", "0.4670415", "0.4652179", "0.4652179", "0.4642765", "0.46053338", "0.46053338", "0.45887744", "0.45887744", "0.45887744", "0.45887744", "0.45355022", "0.43522045", "0.43522045", "0.43511432", "0.42910665", "...
0.66222435
0
Gets a `HarnessPredicate` that can be used to search for a `MatAutocompleteOptionGroupHarness` that meets certain criteria.
static with(options = {}) { return new HarnessPredicate(MatAutocompleteOptionGroupHarness, options) .addOption('labelText', options.labelText, (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static with(options = {}) {\n return new HarnessPredicate(MatAutocompleteOptionHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));\n }", "static with(options = {}) {\n return new HarnessPredicate(MatChipGrid...
[ "0.5843311", "0.543264", "0.5426273", "0.48623255", "0.48623255", "0.46891677", "0.46867105", "0.45757794", "0.44092724", "0.440145", "0.43442696", "0.43404755", "0.4306432", "0.4306432", "0.42303672", "0.42303672", "0.42303672", "0.42303672", "0.41637725", "0.41207427", "0.4...
0.5927361
0
Set up Autocompte to existinf affected inventories Autocomplete for Affected inventories
function setAutoComplete(){ auto_comp = { serviceUrl:base_url+"/admin/inventory/get_inventory_items_autocomplete", /*lookup: function (query, done) { var result = { suggestions: lookUpValues }; done(result); },*/ onSelect: function (suggestion) { va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeAutocompleter() {}", "function setupAutocomplete() {\n if (jQuery.ui && jQuery.ui.autocomplete && typeof(autocompleteSetupFunction) === 'function') {\n for (var fieldName in autocompleteURLs) {\n var URL = autocompleteURLs[fieldName];\n var autocompleteConfiguration = autocompleteSetupFun...
[ "0.6897714", "0.66670156", "0.6617012", "0.6601572", "0.658502", "0.63913345", "0.63707453", "0.6280765", "0.62700456", "0.624621", "0.6231114", "0.62276554", "0.61858034", "0.60845673", "0.6058376", "0.60563934", "0.60229695", "0.60218227", "0.60182333", "0.5998361", "0.5971...
0.7410447
0
Generic call with parameters but none use type parameter type
function noGenericParams(n) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theTypedFn(arg0, arg1) {\n\n if (arguments.length === len0 && test00(arg0) && test01(arg1)) {\n return fn0.apply(this, arguments);\n }\n\n if (arguments.length === len1 && test10(arg0) && test11(arg1)) {\n return fn1.apply(this, arguments);\n }\n\n if (...
[ "0.5486436", "0.54719514", "0.54169685", "0.53816813", "0.537473", "0.52336127", "0.51500744", "0.51278704", "0.5039211", "0.49464893", "0.48896065", "0.4866743", "0.48615417", "0.4858361", "0.48417586", "0.48218623", "0.48195973", "0.48061782", "0.48032284", "0.47829002", "0...
0.666033
0
============================================================================= Scene_OmoriQuest Base Class for Omori Menu Scenes =============================================================================
function Scene_OmoriQuest() { this.initialize.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\r\n // \"menu\" is the identifier for this scene\"\r\n super (\"menu\");\r\n }", "function Scene_Menu() {\n this.initialize(...arguments);\n}", "constructor()\n {\n super(\"menuScene\");\n }", "init()\n {\n this.changeScene(\"menu\");\n }", "fun...
[ "0.7133708", "0.7058659", "0.69876516", "0.69146246", "0.670286", "0.66988987", "0.6578594", "0.6532149", "0.64996445", "0.6377923", "0.63660127", "0.6362321", "0.6344464", "0.6321446", "0.6283308", "0.6278092", "0.6270889", "0.6243254", "0.6222718", "0.6218723", "0.6185754",...
0.80757195
0
============================================================================= Window_OmoriQuestHeader This window displays the quest list header. =============================================================================
function Window_OmoriQuestHeader() { this.initialize.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Window_OmoriQuestList() { this.initialize.apply(this, arguments); }", "function Window_OmoriQuestMessage() { this.initialize.apply(this, arguments); }", "function Window_OmoriQuestTypes() { this.initialize.apply(this, arguments); }", "function setHeader(){\n\tvar questionBox = document.createElement...
[ "0.71617377", "0.62505734", "0.594316", "0.58483815", "0.56944585", "0.5555662", "0.5518172", "0.5480756", "0.5431349", "0.5422634", "0.53910565", "0.53506345", "0.5322198", "0.5318348", "0.53143615", "0.5309615", "0.5278433", "0.5277847", "0.5266709", "0.52650076", "0.524710...
0.81915116
0
============================================================================= Window_OmoriQuestTypes This window displays quest types (Completed, Incomplete). =============================================================================
function Window_OmoriQuestTypes() { this.initialize.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Window_OmoriQuestList() { this.initialize.apply(this, arguments); }", "function Window_OmoriQuestMessage() { this.initialize.apply(this, arguments); }", "function actionOnAddQuest() {\n\t// update the text on the screen\n\tlet quest = new Quest(this.game);\n\tquestList.push(quest);\n\n\t// Deals with ...
[ "0.70066845", "0.6043948", "0.5789973", "0.5759686", "0.5655508", "0.55810267", "0.5333926", "0.5301035", "0.5264178", "0.5253909", "0.5246059", "0.52353954", "0.52319133", "0.5209837", "0.51452553", "0.50795877", "0.5078231", "0.5040178", "0.50367624", "0.50156975", "0.50058...
0.80741566
0
============================================================================= Window_OmoriQuestList This window displays the list of available and completed quests =============================================================================
function Window_OmoriQuestList() { this.initialize.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Window_OmoriQuestTypes() { this.initialize.apply(this, arguments); }", "function Window_OmoriQuestMessage() { this.initialize.apply(this, arguments); }", "function actionOnAddQuest() {\n\t// update the text on the screen\n\tlet quest = new Quest(this.game);\n\tquestList.push(quest);\n\n\t// Deals with...
[ "0.64864206", "0.6299041", "0.59424603", "0.5926467", "0.5732185", "0.56777155", "0.5675747", "0.56438357", "0.5634108", "0.56258947", "0.560256", "0.5494883", "0.54924387", "0.54767734", "0.5420863", "0.53937024", "0.53913665", "0.5388478", "0.5385043", "0.5380163", "0.53756...
0.8250291
0
============================================================================= Window_OmoriQuestMessage This window displays quest message dialogue. =============================================================================
function Window_OmoriQuestMessage() { this.initialize.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showQuestion(msg, actionYes, actionNo) {\r\n dojo.byId(\"dialogQuestionMessage\").innerHTML=msg;\r\n dijit.byId(\"dialogQuestion\").acceptCallbackYes=actionYes;\r\n dijit.byId(\"dialogQuestion\").acceptCallbackNo=actionNo;\r\n dijit.byId(\"dialogQuestion\").show();\r\n}", "function Window_OmoriQuest...
[ "0.6442401", "0.6091873", "0.6012727", "0.599341", "0.59508526", "0.5942198", "0.5938607", "0.5935268", "0.5913807", "0.5912856", "0.5858223", "0.5844074", "0.5745012", "0.57302535", "0.57156265", "0.57063407", "0.569301", "0.56574506", "0.5653713", "0.5650271", "0.5643214", ...
0.8132618
0
Finds an element with the given name attribute
function get_element_by_name(name) { return YAHOO.util.Dom.getElementsBy(function(el) { return el.getAttribute("name") == name; })[0] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findChildByName(element, name) {\t\n if (element.name !== undefined && element.name === name) return element;\n \n\treturn element.querySelector(\"[name='\" + name + \"']\");\n}", "function findAttribute(name){\n var attrs = findObjs({\n _type: \"attribute\",\n \t _name...
[ "0.7884691", "0.7124696", "0.6462702", "0.6375191", "0.6340761", "0.6329218", "0.62861246", "0.62287545", "0.61231035", "0.6118021", "0.6081063", "0.5995631", "0.5966736", "0.5946516", "0.5922041", "0.59063125", "0.59023917", "0.5887089", "0.5846744", "0.5846278", "0.5839416"...
0.7739193
1
function for total cost and promo code
function getTotal(){ const bestPriceText = document.getElementById('best-price'); const bestPrice = Number(bestPriceText.innerText); const memoryCostText = document.getElementById('memory-cost'); const memoryCost = Number(memoryCostText.innerText); const storageCostText = document.getElementById('st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTotalCost(){\r\n\r\n let teaTotalPrice = productfunction() + sizesOfProducts() + ExtraFunction() ;\r\n\r\n return teaTotalPrice;\r\n}", "function calTotalCost(){\r\n return calSubTotal() + calTax();\r\n}", "function FindTotalCost(){\r\n let totalcost= productfunction() + sizesOfProduct...
[ "0.72570187", "0.70644385", "0.70138884", "0.693501", "0.68274915", "0.6815519", "0.6781213", "0.6758788", "0.6755422", "0.6747761", "0.6739369", "0.6727078", "0.6692712", "0.6692298", "0.66921675", "0.6645688", "0.6621359", "0.66033745", "0.6595098", "0.6569507", "0.6544888"...
0.7444823
0
Hide the stack frames corresponding to uninteresting source paths
function hideDetail(top, hiddenSrcPaths) { var seen = new FlexSet(); top.deepOutsPre(function(edge, node) { edge.traceRecord.trace.calls = hideFrames(edge.traceRecord.trace.calls || [], hiddenSrcPaths); if (seen.contains(node)) { return; } seen.addElement(node); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideStackFrames(fn) {\n return function hidden(...args) {\n // Make sure the most outer `hideStackFrames()` function is used.\n let setStackFn = false;\n if (excludedStackFn === undefined) {\n excludedStackFn = hidden;\n setStackFn = true;\n }\n try {\n return fn(...args);\n...
[ "0.6885759", "0.6623485", "0.6318806", "0.6267265", "0.6011254", "0.57260627", "0.56876767", "0.5447635", "0.5429108", "0.54062736", "0.5391761", "0.5360291", "0.5329404", "0.532247", "0.53199065", "0.531268", "0.5263903", "0.5262356", "0.522496", "0.52197605", "0.51983035", ...
0.6989275
0
Utility method used to dynamically perform an operation between two parameters with custom operator
dynamicCompute(op, a, b) { let operators = { '+': function (a, b) { return Number(a) + Number(b) }, '-': function (a, b) { return a - b }, 'X': function (a, b) { return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function operate(a,b,operator)\n{\n return operator(a,b);\n}", "function basicOp(operation, value1, value2)\n {\n return eval(value1 + operation + value2);\n }", "function basicOp(operation, value1, value2) {\n return eval(`${value1}${operation}${value2}`)\n}", "function basicOp(operation, value1, v...
[ "0.7661717", "0.7432269", "0.7411796", "0.7396907", "0.73352414", "0.7292865", "0.72869754", "0.7126807", "0.70619637", "0.70563793", "0.7027449", "0.7021986", "0.69755536", "0.6963931", "0.6963635", "0.6949743", "0.6907656", "0.68622124", "0.67935866", "0.67821544", "0.67271...
0.7565904
1
read reg, mode RR
function readR(){ lognl("readR"); w = tok(); var w0 = w.substring(0, 1); if(w0 == ':' || w0 == '@' || w0 == '+' || w0 == '#') error("expect register or ads argument"); if(isNumeric(w)) store("NUM", "RR", parseInt(w)); else store("SYM", "RR", w); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readValue(regOrLiteral) {\n if (CardHandlerUnit.validReadableRegister(regOrLiteral)) {\n switch (regOrLiteral) {\n case \"R0\":\n case \"R1\":\n case \"R2\":\n case \"R3\":\n case \"R4\":\n return this.r...
[ "0.61804146", "0.60725546", "0.59081763", "0.5904369", "0.5850838", "0.5836056", "0.5618934", "0.55643886", "0.55198586", "0.550437", "0.5445044", "0.53855187", "0.53704077", "0.53449816", "0.5298356", "0.5289431", "0.5232289", "0.52250195", "0.52241653", "0.5202185", "0.5185...
0.6649111
0
Cell that renders actions
function CellActions({ cellData }) { return ( <div className={classNames( LIST_ACTION_CLASS_NAME, tableTheme[LIST_ACTION_CLASS_NAME], largeTheme[LIST_ACTION_CLASS_NAME], )} > <Actions actions={cellData} hideLabel link /> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "actionFormatter(cell, row) {\n return <span>\n <button className=\"btn edit\" type=\"button\" onClick = {(event) => this.editRecord(event, row)} ><i className=\"fa fa-pencil-square-o\" aria-hidden=\"true\" ></i></button>\n <button className=\"btn delete\" type=\"button\" onClick = {(event) => this.rem...
[ "0.7119078", "0.7056818", "0.6495167", "0.64183766", "0.64141786", "0.6203093", "0.6202012", "0.61833364", "0.6175401", "0.61652714", "0.61339754", "0.6049331", "0.6035483", "0.6014998", "0.5988265", "0.59838945", "0.5891734", "0.5860231", "0.58591586", "0.5847408", "0.584457...
0.7269692
0
Generate test data of the video
function createDummyData() { videos = []; videos.push( { file: "SpaceGolf.mp4", title: "Space Golf", creators: ["Pelle", "Stupid++"], url: "https://stupidplusplus.itch.io/generally-relative-space-golf", }, { file: "tiled.mp4", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadViewing(){\n var testSeq1 = new Sequence([\n new VideoPart('p1', 'video1', 0, 10),\n new VideoPart('p2', 'video1', 10, 20),\n new VideoPart('p3', 'video2', 0, 10),\n new VideoPart('p4', 'video2', 10, 20),\n new VideoPart('p5', 'video3', 0, 10),\n new VideoPart('p6', 'vid...
[ "0.6031119", "0.60221547", "0.60101414", "0.589611", "0.58434206", "0.5813221", "0.5752947", "0.5636677", "0.5627128", "0.5610877", "0.5609455", "0.5607611", "0.55904174", "0.5587484", "0.55471444", "0.55390126", "0.5528528", "0.55162776", "0.55006963", "0.5498554", "0.549131...
0.7162982
0
When a video is done playing
function videoDone() { console.log("video done"); index = ++index % videos.length; nextVideo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endVideo() {\r\n myVideo.pause();\r\n console.log(\"Video off successfully\");\r\n}", "function handleEnd () {\n let i = Math.floor(Math.random()*21);\n setVideo(\"videos/\"+i+\".mp4\");\n //console.log(video.v2);\n document.getElementById(\"v2\").play();\n document.getElementById(\"v1\...
[ "0.7798979", "0.74525166", "0.74479306", "0.7361428", "0.7252235", "0.72010475", "0.7181297", "0.7124961", "0.70811707", "0.7033172", "0.7025241", "0.70101607", "0.69459605", "0.6936412", "0.69303745", "0.69224185", "0.69105375", "0.6871935", "0.686894", "0.6864275", "0.68610...
0.7527067
1
Returns the "working" copy and clears the working copy.
_$wrapWorking() { var result = new this.constructor(Object.assign({}, this._$workingCopy._$root), Object.assign([], this._$workingCopy._$path)); this._$workingCopy = undefined; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_$wrapWorking() {\n var result = new this.constructor(Object.assign([], this._$workingCopy._$array));\n this._$workingCopy = undefined;\n return result;\n }", "get _$working() {\n if(this._$workingCopy)\n return this._$workingCopy;\n re...
[ "0.6572266", "0.65689546", "0.6361679", "0.5934976", "0.5906553", "0.5898265", "0.58506435", "0.5781636", "0.5781636", "0.5781636", "0.5781636", "0.57516813", "0.5628388", "0.5512224", "0.5496733", "0.54596156", "0.5434206", "0.542643", "0.54003197", "0.5390575", "0.53692895"...
0.6733584
0
Build some property/values in the current this._path context with data and a functor.
_$from(data, func) { for(var k in data) { var res = func(data[k], k, data); if(res instanceof Object && res.hasOwnProperty('property') && res.hasOwnProperty('value')) var {property, value} = res; else if(res instanceof Arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Data(root, refPath, value, ensurePathValid) {\n root = root || Store;\n var toSet = arguments.length >= 3 && value !== __;\n var v = root;\n // var proppath = fullpathOf(null, root);\n var paths = [];\n if (refPath) paths = splitPath(refPath);\n var parent;\n var prop;\n\n while...
[ "0.555491", "0.54614276", "0.50505155", "0.5005418", "0.5002874", "0.4982414", "0.49406075", "0.49305165", "0.49180627", "0.49143246", "0.49028474", "0.48871434", "0.48862076", "0.48790452", "0.48687646", "0.4862278", "0.48469812", "0.48364088", "0.4835087", "0.48146233", "0....
0.56520706
0
does this person's profile match this element (entry of the data table)?
function computeMatch(element, profile) { // does their age match function ageMatch(min, max, age) { return age ? (age >= min && age <= max) : blankMeansYes; // ? : is called the ternary operator btw } // does their location match function locationMatch(places, destin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isOwnProfile() {\n\t\t\tconst topLink = document.querySelector(\"#top_myprofile_link\");\n\n\t\t\treturn topLink.getAttribute(\"href\") === CONTEXT.getLink();\n\t\t}", "function checkIfMatches(){\n\tif( currentProfile - 1 >= 0 ){\n\t\tif (myBigArray[currentProfile - 1].name === \"Bubbles\") {\n\t\t\tdisplayMatch...
[ "0.624203", "0.5884775", "0.58697516", "0.58438486", "0.57893825", "0.5593733", "0.55831516", "0.5572516", "0.5564894", "0.55577207", "0.5531317", "0.55146116", "0.5506202", "0.5457492", "0.5456747", "0.54505503", "0.54396945", "0.543504", "0.5429627", "0.5416485", "0.5388992...
0.6345812
0
does their student status/not match
function studentStatusMatch(requirement, status) { return status ? (requirement == 'ANY' || requirement == status) : blankMeansYes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findStudent(student) {\n for (let i = 0; i < presentList.length; i++) {\n if (presentList[i] === student) {\n return false;\n }\n }\n return true;\n }", "function studentInTeam(student, team){\n for(i = 0; i < te...
[ "0.64009136", "0.6277859", "0.596929", "0.58835685", "0.58276916", "0.56530154", "0.56109345", "0.55608475", "0.5549187", "0.5547195", "0.55399257", "0.54548407", "0.5440367", "0.54341227", "0.5391532", "0.53833723", "0.537771", "0.5369126", "0.5361243", "0.53486794", "0.5345...
0.70443845
0
endregion need get vaults, get single vault, create vault, delete vault
getVaults({ commit, dispatch }) { api.get(`vaults`) .then(res => { commit('setVaults', res.data) }) .catch(err => { console.log("Error is: " + err) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getVaults({ commit, dispatch }, payload) {\r\n\r\n api('/keeps/' + payload._id + '/vaults')\r\n .then(res => {\r\n commit('setSchedule', res.data.data)\r\n })\r\n .catch(err => {\r\n commit('handleError', err)\r\n ...
[ "0.67125416", "0.6598097", "0.64234644", "0.63222027", "0.580062", "0.5759064", "0.57335407", "0.5395373", "0.53234756", "0.5293471", "0.520214", "0.50869626", "0.50813013", "0.50667524", "0.50651157", "0.49813053", "0.49750736", "0.49698097", "0.49572924", "0.49482957", "0.4...
0.7008
0
Constructor Function to initiate doc_type, master, detail, menu, provider
constructor() { this.doc_type = ['S', 'L', 'P', 'E', 'R']; this.master = []; this.detail = []; this.menu = []; this.provider = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(doc) {\n super(doc);\n }", "constructor(doc) {\n super(doc);\n }", "constructor(doc) {\n super(doc);\n }", "constructor(doc) {\n super(doc);\n }", "constructor(doc) {\n super(doc);\n }", "constructor(doc) {\n super(doc);\n }", "con...
[ "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6762684", "0.6722755", "0.65473366", "0.6233454", "0.6164133", "0.58965534", "0.58855945", "0.5860467", "0.58285755", "0.5817699", "0.5784911", "0.57840043"...
0.78968835
0
Execute MetaRelated Table Call
async executeMetaRelatedTableCall(endpoint, methodType, dbModel, database) { try { if (database === 'mssql') { let metaArray = [`SELECT * FROM __fl_MetaDataMaster`, `SELECT * FROM __fl_MetaDataDetail`, `SELECT * FROM __fl_MetaDataMenu`]; let executeQuery = await axio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "meta(table_name){\n let me = this\n\n return new Promise((resolve, reject) => {\n this.knex.schema.raw(\"PRAGMA table_info(\"+table_name+\")\")\n .map((row)=>{return {\n 'Name': row.name,\n 'Type': row.type,\n 'Minimum': null,\n 'Maximum': null,\n...
[ "0.5833716", "0.51277727", "0.51019096", "0.5087741", "0.5060534", "0.50233203", "0.5004835", "0.4911234", "0.4873808", "0.4852312", "0.4841724", "0.4838025", "0.4817691", "0.4812693", "0.48077437", "0.48067245", "0.48058987", "0.4798678", "0.47866338", "0.47801113", "0.47514...
0.6267103
0
Find the inverses of a (mod n). That is, find x s.t. a x % n = 1.
function getInverses (a, n) { var vec2 = { x: 0, y: 0 }; exgcd(a, n, vec2); // We don't need the gcd of a and n. return (vec2.x % n + n) % n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inverseMod(x,n) {\n var ans=expand(x,n.length); \n var s;\n s=inverseMod_(ans,n);\n return s ? trim(ans,1) : null;\n }", "function inverseMod(x,n) {\n var ans=expand(x,n.length); \n var s;\n s=inverseMod_(ans,n);\n return s ? trim(ans,1) : null;\n }", "function inverseMod(x, ...
[ "0.7782379", "0.7782379", "0.7660143", "0.7660143", "0.75925994", "0.75925994", "0.7552617", "0.7552617", "0.7487404", "0.74713063", "0.7435079", "0.71888894", "0.7180687", "0.7141795", "0.7141795", "0.70111513", "0.70111513", "0.6986047", "0.6825132", "0.6825132", "0.6809267...
0.82535946
0
Unregisters a binding with the controller.
unregisterBinding(binding) { this._resetBinding(binding); this.bindings.delete(binding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Unbind()\n {\n this._constantBuffer = null;\n }", "removeAll() {\n if (!this.bindingMap_) {\n return\n }\n\n const list = this.bindingMap_.getAll()\n\n for (const binding of list) {\n binding.unlisten()\n }\n\n this.bindingMap_.clear()\n }", "release() {\n this.remo...
[ "0.6625118", "0.6399182", "0.626918", "0.6190151", "0.6178667", "0.61515397", "0.6151079", "0.6132843", "0.6132843", "0.6132843", "0.61098826", "0.6081836", "0.60679543", "0.6060722", "0.6056626", "0.60102344", "0.5998714", "0.59843004", "0.5963063", "0.5963063", "0.5963063",...
0.78054076
0
Validates all bindings and renders any validation errors.
validate() { const errors = []; for (let binding of this.bindings.keys()) { errors.splice(errors.length, 0, ...this._validateBinding(binding)); } return errors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearErrors() {\n this.viewModel.errors.length = 0;\n this.render();\n }", "clearErrors() {\n var hasErrors = this.markvalid();\n // if control has errors refresh the view.\n if (hasErrors) {\n this.refreshview();\n }\n }", "function validateBinding(){...
[ "0.61747104", "0.61624956", "0.61431336", "0.6080884", "0.5827475", "0.5786735", "0.57496196", "0.5738447", "0.57289714", "0.5723452", "0.5704488", "0.5626248", "0.5610953", "0.54860014", "0.5457161", "0.54176456", "0.5416916", "0.54012525", "0.53991634", "0.53991634", "0.539...
0.64418644
0
Reconciles a binding's existing errors array with the new errors array. Renders errors related to newly broken rules. Unrenders errors related to rules that are no longer broken.
_updateErrors(errors, newErrors, target) { let error; while (error = errors.pop()) { this._unrenderError(error, target); } for (let i = 0, ii = newErrors.length; i < ii; i++) { error = newErrors[i]; errors.push(error); this._renderError(error, target); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redrawErrors() {\n var noOfErrors = attrs.multiple ? ngModel.$xtErrors.length : 1;\n scope.errors = ngModel.$xtErrors.slice(0, noOfErrors);\n scope.showErrors = scope.errors.length > 0;\n toggleAriaAttributes(scope.showErrors);\n }", ...
[ "0.6573184", "0.6517475", "0.6505964", "0.6285714", "0.61919254", "0.60338634", "0.60151273", "0.5918765", "0.58089244", "0.5772552", "0.57415104", "0.57391196", "0.573026", "0.5727097", "0.57235235", "0.5703028", "0.5654315", "0.56491697", "0.5641118", "0.5635374", "0.560540...
0.70103884
0
Validates and renders errors for a particular binding.
_validateBinding(binding) { const { target, rules, errors } = this.bindings.get(binding); const { object, property } = getPropertyInfo(binding.sourceExpression, binding.source); const newErrors = this.validator.validateProperty(object, property, rules); this._updateErrors(errors, newErrors, target); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderWithErrors(errors) {\n res.status(400).render('candidates/newPasswordForm', {\n errors: errors,\n candidate: req.body\n })\n }", "validate() {\n const errors = [];\n for (let binding of this.bindings.keys()) {\n errors.splice(errors.length, 0, ...t...
[ "0.5736834", "0.57010543", "0.56845367", "0.552104", "0.5514765", "0.54753983", "0.5445513", "0.5438308", "0.534", "0.533068", "0.5289884", "0.5240543", "0.52201736", "0.522005", "0.52058625", "0.5181314", "0.51652604", "0.51564854", "0.5137328", "0.5122162", "0.5114093", "...
0.66729397
0
Resets and unrenders errors for a particular binding.
_resetBinding(binding) { const { target, errors } = this.bindings.get(binding); this._updateErrors(errors, [], target); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearErrors() {\n this.viewModel.errors.length = 0;\n this.render();\n }", "clearErrors(){\n this.errors = [];\n this.render();\n }", "resetErrorState() {\r\n this.isInErrorState = false;\r\n this.errors = null;\r\n this.errorFriendlyMessage = '';\r\n }...
[ "0.6877551", "0.6865542", "0.66377", "0.64701253", "0.64691913", "0.64565825", "0.63893366", "0.63758725", "0.63445073", "0.63080907", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182", "0.6223182"...
0.7112611
0
Gets the DOM element associated with the databinding. Most of the time it's the binding.target but sometimes binding.target is an aurelia custom element, which is a javascript "class" instance, so we need to use the controller to locate the actual DOM element.
getTarget(binding, view) { const target = binding.target; if (target instanceof Element) { return target; } let controller; for (let id in view.controllers) { controller = view.controllers[id]; if (controller.viewModel === target) { break; } } return controlle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTargetDOMElement(binding, view) {\n var target = binding.target;\n // DOM element\n if (target instanceof Element) {\n return target;\n }\n // custom element or custom attribute\n // tslint:disable-next-line:prefer-const\n for (var i = 0, ii =...
[ "0.76424235", "0.6169859", "0.6165162", "0.6138433", "0.60800236", "0.59827197", "0.59827197", "0.59827197", "0.59504133", "0.59409827", "0.5795191", "0.5793598", "0.57804984", "0.577472", "0.5774535", "0.5774535", "0.5740951", "0.5740951", "0.57275367", "0.5706333", "0.56983...
0.7445043
1
string stringify (data deparsed) Translate deparsed data into the source code of a RiveScript document. See the `stringify()` method on the parent RiveScript class; this is its implementation.
stringify(deparsed) { var self = this; if (deparsed == null) { deparsed = self.master.deparse(); } // Helper function to write out the contents of triggers. let _writeTriggers = function(triggers, indent) { let id = indent ? "\t" : ""; let output = []; for (let j = 0, len = triggers.length; j < ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stringify(deparsed) {\n\t\t\tvar self = this;\n\t\t\treturn self.parser.stringify(deparsed);\n\t\t}", "function stringify(data) {\n if (JSON)\n return (JSON.stringify(data));\n else {\n //Throw exception\n //TODO: Is there any other solution for ...
[ "0.6174346", "0.59103316", "0.5573214", "0.54805356", "0.54776967", "0.5460855", "0.54352707", "0.5419866", "0.5395878", "0.53942615", "0.53942615", "0.53942615", "0.53867066", "0.53867066", "0.53867066", "0.53867066", "0.53867066", "0.53867066", "0.53867066", "0.5370239", "0...
0.6009902
1
private void initTopic (object topics, string name) Initialize the topic tree for the parsing phase. Sets up the topic under ast.topics with all its relevant keys and subkeys, etc.
initTopic(topics, name) { var self = this; if (topics[name] === undefined) { topics[name] = { includes: {}, inherits: {}, triggers: [] }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initTopic(topicData){\n if (!newTopicDataValid(topicData))\n throw \"Topic data is invalid\";\n\n let ic = new iCrypto();\n ic.createSYMKey(\"s\")\n .base64Encode(\"s\", \"sb\")\n .generateRSAKeyPair(\"kp\")\n .createNonce(\"nc\")\n .base6...
[ "0.63408494", "0.6161732", "0.6094666", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", "0.60279197", ...
0.8408173
0
Query shortcut key according to the url.
function queryShortcutKeyByUrl(url) { let result = queryBindInfoByUrl(url); return result ? result.key : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shortcut()\n{\n\tobjectType = $(\"#searchType\").attr(\"value\")\n\tobjectValue = $(\"#searchQuery\").attr(\"value\")\n\tif(objectType && objectValue)\n\t{\n\t\tlocation.href=createLink(objectType, \"view\", \"id=\" + objectValue)\n\t}\n}", "function getQuerystring(key) {\n\tvar url_string = window.loc...
[ "0.62946796", "0.62220794", "0.62220794", "0.62036663", "0.61131346", "0.60796183", "0.6026988", "0.5966267", "0.5953711", "0.58366454", "0.5835816", "0.5822973", "0.5817693", "0.5795157", "0.5780449", "0.57778853", "0.5721533", "0.57187766", "0.56921124", "0.5660643", "0.564...
0.800705
0
Check current tab url whether bound or not.
function checkUrlBound(url) { return queryShortcutKeyByUrl(url) !== null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForValidUrl(tabId, changeInfo, tab) {\r\n// If the tabs url starts with \"http://specificsite.com\"...\r\nif (tab.url.indexOf(\"https://pollev.com/\") == 0) {\r\n// ... show the page action.\r\nchrome.pageAction.show(tabId);\r\n}\r\n}", "function checkForValidUrl(tabId, changeInfo, tab) {\n\tif(!ta...
[ "0.6839305", "0.68014944", "0.67780685", "0.6680365", "0.66671765", "0.6615865", "0.66078514", "0.65668577", "0.6506587", "0.64568293", "0.6404874", "0.6370239", "0.63334954", "0.6284561", "0.6216292", "0.62054396", "0.62054014", "0.6161894", "0.6132052", "0.61273986", "0.610...
0.7129917
0
Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus.
function onWindowFocusChanged(windowId) { if (chrome.windows.WINDOW_ID_NONE === windowId) { return; } //Get new active tab when window focuse changed. common.getCurrentTab(tab => { window.activeTab = tab; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWindowFocus() {\n if (document.activeElement == elWithFocusRing) addFocusRingClass(elWithFocusRing);\n\n elWithFocusRing = null;\n }", "function getFocussedWindow() {\n return browser.windows.getLastFocused();\n}", "function focusHandler(){\n isWindowFocused = true;\n ...
[ "0.68276304", "0.6706605", "0.6702006", "0.66194516", "0.6549233", "0.65319973", "0.6521883", "0.65121835", "0.65121835", "0.64634466", "0.638422", "0.638422", "0.638422", "0.638422", "0.6330256", "0.6001686", "0.59984493", "0.5927888", "0.5920173", "0.5878745", "0.5875337", ...
0.78183115
0
Templates for agree and disagree We loop throu all the liked news by user. If so, display one icon or other
function votingPicsAgree (n, u) { const votedAgree = yo`<span id="thumbup-liked" class="Noticia_comentarios-comentarios-agree-header-votes-icon-liked"></span>` const unVotedAgree = yo`<span id="thumbup" class="Noticia_comentarios-comentarios-agree-header-votes-icon"></span>` // Loop around users liked posts f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comCardPics (user, comment) {\n if (comment.likedBy.length > 0){\n // if the logged user's id is on the array of liked comments, render liked button\n for (let i in comment.likedBy){\n if (comment.likedBy[i] === user._id){\n return yo`<span id=\"new-card-liked\" data-comment=\"${comment...
[ "0.67082053", "0.61903846", "0.6087413", "0.6043529", "0.59783214", "0.5919918", "0.5914333", "0.59059757", "0.5898983", "0.58887315", "0.5861046", "0.58505213", "0.5850203", "0.5770502", "0.57393014", "0.57279044", "0.5725782", "0.5693703", "0.56471777", "0.5629006", "0.5619...
0.64207304
1
Renders form for sending comments
function renderSendComment (a) { let post = a === 'agree' ? 'commentagree' : 'commentdisagree' return yo`<form method="POST" action="/api/${post}" class="Noticia_comentarios_list-comments-create"> <span id="close-${post}" class="Noticia_comentarios_list-comments-create-cancel"></span> <textarea name="creat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCommentForm() {\n let commentForm = ''\n commentForm = `\n <input type=\"text\" class=\"mr-2 rounded-lg border px-3 py-2 focus:outline-none focus:ring-purple-500 focus:border-purple-500\" placeholder=\"Add a comment...\">\n <button class=\"post-comment-button py-2 px-4 rounded-md shadow-sm f...
[ "0.7119085", "0.69570976", "0.6831617", "0.67632645", "0.6705991", "0.6643073", "0.6603951", "0.6528112", "0.6524744", "0.6478045", "0.647783", "0.6426226", "0.64132607", "0.6403577", "0.6364757", "0.6356908", "0.6353162", "0.63454705", "0.6341276", "0.63306415", "0.6320893",...
0.7350512
0
Renders comment like button
function comCardPics (user, comment) { if (comment.likedBy.length > 0){ // if the logged user's id is on the array of liked comments, render liked button for (let i in comment.likedBy){ if (comment.likedBy[i] === user._id){ return yo`<span id="new-card-liked" data-comment="${comment._id}" class=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n\t\tif(this.state.liked) {\n\t\t\treturn (\n\t\t\t\t<button className=\"like-button liked\" onClick={() => this.handleLike(this.props.url)}>\n\t\t\t\t\t<i className=\"fas fa-heart\"></i>\n\t\t\t\t</button>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<button className=\"like-button unliked\" onClic...
[ "0.6783391", "0.6630991", "0.65300465", "0.6526674", "0.6465288", "0.6461332", "0.64599", "0.63656604", "0.6347979", "0.63408285", "0.63239616", "0.6322089", "0.63210905", "0.6316102", "0.62203693", "0.62176675", "0.6213688", "0.61651915", "0.6164017", "0.6150438", "0.614541"...
0.7111831
0
Returns a session ID if parseable, else false.
function parseSessionId(str) { try { var sid = SessionId.fromString(str); return sid; } catch(err) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function session_isValid() {\n var sessionTimeout = 900;\n\n var sessionID = localStorage.getItem(\"sessionID\");\n var sessionStart = localStorage.getItem(\"sessionStart\");\n\n var currentTime = timestamp();\n\n if (sessionID != null && sessionStart != null) {\n if ((currentTime - sessionSt...
[ "0.63269573", "0.60876393", "0.5759365", "0.57525337", "0.5741854", "0.57168484", "0.55368006", "0.55222404", "0.54292184", "0.53998035", "0.5244175", "0.5217974", "0.51969457", "0.5182667", "0.51073086", "0.5085207", "0.5069549", "0.5052445", "0.5051163", "0.50495607", "0.50...
0.75808054
0
Call to update the total play time so far
function updateTotalPlayTime() { totalPlayTime += ac.currentTime - currentPlayTime; var seconds = Math.round(totalPlayTime); if (seconds != currentSeconds) { // Make callback asynchronous setTimeout(function() { tickerCallback(secon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTime() {\n if (gameStart && gameIsLive) {\n console.log('Time updated')\n t++\n }\n}", "function timeUpdate() {\n\t\tvar playPercent = timelineWidth * (music.currentTime / duration);\n\t\tplayhead.style.marginLeft = playPercent + \"px\";\n\t\t//console.log(\"============timeUpdate=========...
[ "0.7610567", "0.7525935", "0.74921614", "0.7352024", "0.7292204", "0.72428966", "0.7242168", "0.7190981", "0.7174335", "0.71578175", "0.71578175", "0.7131333", "0.71020305", "0.7090663", "0.7068911", "0.7060856", "0.70577574", "0.70301306", "0.6993823", "0.69499296", "0.69118...
0.81831944
0
Helper function to stop all sound nodes and recreate them
function reset() { sounds.forEach(function(sound) { sound.node.stop(0); }); self.end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scene1_stopSound(){\n\n\tstoppeAnimation(\"szene1_sound_rechts\");\n\tstoppeAnimation(\"szene1_sound_links\");\n}", "stopAll() {\n Object.keys(sounds).forEach(key => {\n if (sounds[key].playing()) sounds[key].stop()\n })\n }", "stopSound(sourceNode) {\n if (sourceNode) {...
[ "0.69227844", "0.68040854", "0.66896987", "0.66878927", "0.66063285", "0.65067244", "0.64763397", "0.6417037", "0.63747615", "0.6357376", "0.63433367", "0.6324223", "0.6284672", "0.6277859", "0.62649673", "0.62357444", "0.62135404", "0.62060654", "0.6204259", "0.6196854", "0....
0.76075673
0
Load the display for testing.
function loadDisplay() { removeEventFromScreen(); if(events.length == 0) { const noReult = createNewElement("img", null, "noReult", null) noReult.src = "../pictures/webPic/nores.png"; eventList.appendChild(noReult) } for(let i = 0; i < events.length; i++) { addEvent(events[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTestScreen() {\n const screen = showScreen(\"test_screen\");\n clearElement(screen);\n const pageHeader = document.createElement(\"h1\");\n pageHeader.innerText = \"Test Results\";\n screen.appendChild(pageHeader);\n loadTestFile(screen, \"tests/tests.json\", document.baseURI);\n}", ...
[ "0.6676459", "0.6558777", "0.6232618", "0.61798555", "0.60586184", "0.59756786", "0.594482", "0.5941995", "0.5925467", "0.58884287", "0.58827853", "0.5873363", "0.5867727", "0.5861372", "0.58228225", "0.58181995", "0.5791399", "0.57464206", "0.57263625", "0.57181674", "0.5716...
0.67975205
0
/ DOM functions / Help remove all event from the screen.
function removeEventFromScreen() { while (eventList.firstChild) { eventList.removeChild(eventList.firstChild); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearEvents(){\n for(let event of this._events){\n this.htmlObj.removeEventListener(event[0], event[1]);\n }\n }", "function _removeEvents() {\n\t Utils.removeELementsAndAttachedEvent(Constants.OVERLAY_STYLE, Constants.FLEX_CLICK);\n\n\t Utils.removeELementsAndAttachedEvent(Cons...
[ "0.7614624", "0.72679335", "0.7227882", "0.70930153", "0.7079203", "0.7055496", "0.70024645", "0.6980812", "0.6904968", "0.6870367", "0.6859288", "0.6839914", "0.6782028", "0.6782028", "0.677551", "0.67564046", "0.67115325", "0.6709078", "0.66972184", "0.6691998", "0.6691998"...
0.8271987
0
Change the border color of empty input to red to indicate error.
function changeColorError(selector) { if(selector.value == "") { selector.style.borderColor = "red"; } else { selector.style.borderColor = ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputValidate(field) {\n if (field.value.length > 0) {\n field.setAttribute(\"style\", \"border-bottom-color:green\");\n // remove error class list\n let removeError = field.classList;\n removeError.forEach((err) => {\n if (err === \"error\") removeError.remove(err);\n });\n } else {...
[ "0.729836", "0.71511674", "0.70414394", "0.70349956", "0.70308864", "0.70129204", "0.6977382", "0.68517345", "0.6819669", "0.6801564", "0.6772959", "0.6698564", "0.6673886", "0.6651279", "0.6648121", "0.66378665", "0.6598307", "0.65789914", "0.6553973", "0.64911854", "0.64548...
0.76683617
0
add new event to the page Create and add new event to the eventList div
function addEvent(event) { const eventObj = createNewElement('div', 'event'); eventObj.id = event.id; const imgHolder = createNewElement('div', 'eventImgHolder'); const img = createNewElement('img', 'eventPhoto'); if(event.img[0] == null) { img.src = "../pictures/eventPic/w3.jpg" } else { img.src = eve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newEvent(){\n\t//alert(\"New\");\n\t//Save to memory\n\tcurrentEvents[eventIndex] = showHTMLEvent();\n\tdocument.getElementById(\"type\"+eventIndex).focus();\n\teventIndex++;\n\t//Create new event div, append it to #eventSection, time=v.currentTime, focusToSelectType\n}", "function addDivEvent(title, da...
[ "0.74525017", "0.74501747", "0.737117", "0.727719", "0.72203565", "0.7133135", "0.70566916", "0.7029591", "0.6987075", "0.69796795", "0.69771475", "0.6947112", "0.69050455", "0.6892796", "0.68778366", "0.6848766", "0.6812356", "0.67424", "0.67158896", "0.6709791", "0.66978556...
0.8104162
0
this event will fire from MediaSource
function onSourceopen() { console.log('onSourceopen'); mediaSource.removeEventListener('sourceopen', onSourceopen); sourceBuffer = mediaSource.addSourceBuffer(AUDIO_MIME_TYPE); sourceBuffer.addEventListener('updateend', onUpdateEnd); update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MediaStreamEventInit() {\n}", "function sourceSelectedHandler(e) {\n if (mediaElement.id == \"iplayer\") {\n if (!e.supportsImage) {\n id(\"messageDiv\").innerHTML += e.friendlyName + \" does not support streaming images. \" +\n ...
[ "0.7216771", "0.7039279", "0.6826291", "0.68175995", "0.67959183", "0.67270297", "0.6678169", "0.66591537", "0.6427699", "0.63926625", "0.6289245", "0.6284894", "0.6270513", "0.6254974", "0.62511885", "0.62111986", "0.61995757", "0.61926985", "0.6169855", "0.61668146", "0.614...
0.7256053
0
this function will be called from onSourceopen, onUpdateEnd and onTimeupdate add next buffer if it is required
function update() { if (!data[loadIndex]) { console.log('update skip: !data[loadIndex]'); return; } if (!sourceBuffer || !mediaSource || !audioElement) { return; } if (sourceBuffer.updating) { console.log('update skip: sourceBuffer.updating'); return; } if (m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadNextBuffer() {\n if (_loadedBuffers.length) {\n console.log('SourceBuffer: appending', _files[_itemsAppendedToSourceBuffer]);\n _logger.log('SourceBuffer: appending', _files[_itemsAppendedToSourceBuffer]);\n // append the next one into the source buffer.\n _sourceBuffer.appendBu...
[ "0.71402735", "0.66049695", "0.61585325", "0.614969", "0.6146125", "0.61340415", "0.6131446", "0.60649747", "0.60377145", "0.59708107", "0.5970625", "0.5809744", "0.5804491", "0.5792022", "0.577351", "0.57567215", "0.573448", "0.57249445", "0.5721651", "0.57106537", "0.570897...
0.7381079
0
TODO 2: Defined a function with identifier addItem, which does the following: a) Increments the number of items in the cart b) Prints a message "Item added to cart!" on the console c) Prints a message "Item(s) in cart = numberOfItemsInCart" on the console, where numberOfItemsInCart is replaced by the actual number
function addItem() { itemsInCart++; console.log("Item added to cart!"); console.log("Item(s) in cart = " + itemsInCart); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItemToCart(name, description, count, size) {\r\n for(let i in cart){\r\n //Looks for an item name in the cart\r\n if(cart[i].name === name) {\r\n //Adds to that item name if it exists.\r\n cart[i].count += count;\r\n return;\r\n }\r\n }\r\n //Creates a new item if it isn't al...
[ "0.79763156", "0.79399365", "0.7919589", "0.7891642", "0.78612506", "0.7814143", "0.7801107", "0.7762164", "0.774812", "0.77147895", "0.76831514", "0.7666995", "0.7661493", "0.76589406", "0.76228243", "0.76153356", "0.76014113", "0.7534678", "0.7516193", "0.7514293", "0.75108...
0.89971226
0
TODO 3: Defined a function with identifier removeItem, which does the following: a) Decrements the number of items in the cart b) Prints a message "Item removed from cart!" on the console c) Prints a message "Item(s) in cart = numberOfItemsInCart" on the console, where numberOfItemsInCart is replaced by the actual numb...
function removeItem() { if(itemsInCart === 0) {console.log("Your Cart Is Empty\ncan't remove Item.");} else {itemsInCart--; console.log("Item removed from cart!"); console.log("Item(s) in cart = " + itemsInCart); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeItem (item) {\n countItem--;\n \n cart.splice(cart.indexOf(item.name), 1); //remove item from the data array\n\n item.parentElement.parentElement.remove();\n\n updateTotal(); //update the total price\n\n if (countItem == 0)\n resetCart();\n}", "function removeItem( itemNam...
[ "0.8235032", "0.7945107", "0.78974336", "0.7879951", "0.7654665", "0.7599909", "0.75909346", "0.75876635", "0.75778246", "0.7571148", "0.75694156", "0.7546964", "0.74868613", "0.74824935", "0.7471296", "0.7438855", "0.72825587", "0.7269202", "0.7261889", "0.72618705", "0.7236...
0.8650381
0
.clamp() takes three arguments: a number, a lower bound, and an upper bound .clamp() modifies the provided number to be within the two provided bounds If the provided number is smaller than the lower bound, it will return the lower bound as the final number If the number is larger than the upper bound, it will return t...
clamp(number, lower, upper) { let lowerClampedValue = Math.max(number, lower); let clampedValue = Math.min(lowerClampedValue, upper); return clampedValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clamp (number,lowerBound,upperBound) {\n\n if(number < lowerBound){\n return lowerBound;\n }\n if(number > upperBound ) {\n return upperBound;\n }\n if(number > lowerBound && number < upperBound){\n return number;\n }\n\n //REFACTORA...
[ "0.9061936", "0.86717767", "0.8572881", "0.8562454", "0.8544797", "0.83324355", "0.8227858", "0.8206811", "0.81243557", "0.8099893", "0.8070756", "0.8070708", "0.8052088", "0.8052088", "0.80357206", "0.8032992", "0.7990593", "0.7990593", "0.79863846", "0.79699004", "0.7967987...
0.8687851
1
.words() takes one argument: a string .words() splits the string into an array of words A word is defined by a spaceseparated string of characters, so each space character, ' ', indicates the end of one word and the start of the next
words(string) { return string.split(' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function words(str) {\n return str.trim().split(/\\s+/g);\n }", "words(string) {\n let words = string.split(' ');\n return words;\n }", "words(string) {\n let copy = string.split(' ');\n return copy;\n }", "function Words(string) {\n this.str = string;\n let regex = /\\s/;\n \tr...
[ "0.7845813", "0.78174007", "0.75375825", "0.7469505", "0.7457169", "0.74164176", "0.7391323", "0.73626566", "0.72790956", "0.71346384", "0.71028954", "0.7101186", "0.70997065", "0.70890534", "0.7050617", "0.70401484", "0.70401233", "0.7020781", "0.7014419", "0.69702375", "0.6...
0.80279315
0
.dropWhile() takes two arguments: an array and a predicate function The supplied predicate function takes three arguments: the current element, the current element index, and the whole array .dropWhile() creates a new copy of the supplied array, dropping elements from the beginning of the array until an element causes ...
dropWhile(array, predicate) { // let dropNumber = array.findIndex((element, index) => { // want to drop elements until the predicate returns a falsy value. findIndex() looks for first truthy value so make every truthy value falsy and vice versa to get the value we want return !pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dropWhile(array, predicate) {\n let dropNumber = array.findIndex((element, index) => !predicate(element, index, array));\n let droppedArray = this.drop(array, dropNumber);\n return droppedArray;\n }", "dropWhile(array, predicate) {\n const cb = (element, index) => {\n return !predicate(elem...
[ "0.89595395", "0.8925492", "0.8416955", "0.8383056", "0.81060296", "0.7802215", "0.7622739", "0.7508507", "0.72195834", "0.71985173", "0.71930534", "0.706201", "0.7054043", "0.7053003", "0.7037408", "0.7029941", "0.69503355", "0.69488883", "0.6940913", "0.6929171", "0.6922403...
0.8965658
0
give 15 days data calculate +DM, DM, TR for 14 days
function calcDIDX(data){ var ndays = 14+1; var dm_tr_14 = (_.range(1, ndays)).map(function(index){ var today_data = data[data.length-index]; var yesterday_data = data[data.length-index-1]; // +DM-DM var positive_dm = Math.max(today_data.high - yesterday_data.high, 0) va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateDaily() {\n gramsPerDay.value = (amount.value * timesPerDay.value);\n dailyGrams.value = (amount.value * timesPerDay.value);\n}", "function totalCost(perDay) {\n var dailyCost = 0;\n\n if (perDay <= 16) {\n dailyCost = perDay * 60;\n } else if (perDay <= 20) {\n var fir...
[ "0.61132675", "0.5654512", "0.5632061", "0.5555151", "0.55241495", "0.55225456", "0.55150694", "0.5473698", "0.5464492", "0.5443507", "0.5430026", "0.5389648", "0.53671473", "0.5365304", "0.5363975", "0.5350143", "0.532991", "0.53287005", "0.52981675", "0.52978855", "0.527591...
0.62952936
0
need yesterday sar ... need to calculate from the first day 2012/01/01
function calcSARIndexToday(data){ var sar_indicator = {}; var n_days = 3; var tmpdata = _.takeRight(data, n_days); if (tmpdata.length != n_days) return sar_indicator; var today_data = data[data.length-1]; var yesterday_data = data[data.length-2]; if(yesterday_data.sar){ // yesterday has s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMixpanelDateYesterday(){\n var today = new Date();\n var yesterday = new Date(today);\n yesterday.setDate(today.getDate() - 1);\n \n //Logger.log(yesterday);\n var dd = yesterday.getDate();\n //Logger.log(yesterday);\n var mm = yesterday.getMonth() + 1;\n var yyyy = yesterday.getFullYear();\n ...
[ "0.6646973", "0.6184996", "0.59712017", "0.5914904", "0.5780491", "0.57551897", "0.56530577", "0.5622875", "0.55965805", "0.5542842", "0.5520537", "0.5505406", "0.5497271", "0.5489402", "0.54881275", "0.5466201", "0.5455648", "0.54484093", "0.5439804", "0.5437987", "0.5432790...
0.62594134
1
'foo' Example 2 myReadonly coredecorators: readonly, deprecate
function myReadonly(target, name, descriptor) { // descriptor对象原来的值如下 // { // value: specifiedFunction, // enumerable: false, // configurable: true, // writable: true // }; descriptor.writable = false; return descriptor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readonly(obj) {\n if (undefined !== 'production') {\n // TODO [#1292]: Remove the readonly decorator\n if (arguments.length !== 1) {\n assert.fail('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');\n...
[ "0.6327523", "0.6067331", "0.6053181", "0.6029284", "0.6029284", "0.6029284", "0.6029284", "0.6002787", "0.6002787", "0.59623057", "0.59623057", "0.59623057", "0.59623057", "0.59623057", "0.59623057", "0.59623057", "0.5934322", "0.5934322", "0.5934078", "0.5889444", "0.587996...
0.62576234
1
return authenticated account or underfined
function getAuthenticatedAccount(){ if(!$cookies.get('authenticatedAccount')){ return; } return JSON.parse($cookies.get('authenticatedAccount')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAuthUser() {\n if (this.isLoggedIn()) {\n this.setAuthUser();\n }\n return this.authUser;\n }", "get authenticatedUser () {\n\t\treturn this.activeUser || null;\n\t}", "async getActiveAccount() {\n var _a, _b, _c;\n if (this.account) {\n return this.account;\n ...
[ "0.6799868", "0.6726515", "0.66937345", "0.6571024", "0.6571024", "0.65698534", "0.65130424", "0.64794636", "0.64732635", "0.63123244", "0.62974495", "0.6292742", "0.6224127", "0.622366", "0.6222777", "0.6198277", "0.6184774", "0.6176431", "0.61756927", "0.61750394", "0.61500...
0.7052984
0
Clear update flag, form data and mark it as untouched
cancelUpdate() { this.updatingUser = false; this.user = {}; this.form.$setUntouched(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\r\n this.setState(this.baseState);\r\n document.getElementById(\"form\").reset();\r\n this.fetchData();\r\n }", "clearInputFields() {\n form.reset();\n }", "function clearForm() {\n document.getElementById('add-update-form').reset();\n\n enableEditModal();\n\...
[ "0.68037397", "0.6803034", "0.67865765", "0.6719235", "0.6691056", "0.6654881", "0.661493", "0.6613608", "0.65945935", "0.65853167", "0.6583033", "0.65762156", "0.6561496", "0.65608126", "0.6541589", "0.6517197", "0.65073174", "0.6500139", "0.6496088", "0.6495491", "0.6470974...
0.732616
0
Change text of convo indicator to reflect change in typing status of other user(s)
function changeTypingStatus(convo, nickname, isTyping) { if (isTyping) { if (convo === conversation) $('#who').text(nickname + " is typing..."); } else { if (conversation == 0) $('#who').text("Group"); else $('#who').text("Private: " + nickname); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uiChangeStatusText2(text) {\n const elStatus = document.getElementById(\"status2\");\n elStatus.innerText = text;\n elStatus.classList.remove(\"hidden\");\n}", "function onGetText(value) {\n changeMemeText(value);\n drawText();\n drawStickers();\n}", "function changeUser() {\n cur...
[ "0.6153992", "0.5898602", "0.5716233", "0.57065004", "0.5704136", "0.5561191", "0.5543203", "0.55364895", "0.5503565", "0.5489371", "0.54731923", "0.5464865", "0.5456477", "0.54467076", "0.54369766", "0.54185593", "0.54164106", "0.5405537", "0.53983957", "0.5383887", "0.53781...
0.71305764
0
Returns to main conversation
function returnToMain() { conversation = "0"; $('#history_list').empty(); $('#history_box').fadeOut(100, function(){ $('#history_box').css({"background":"rgba(214, 160, 198, 0.5)"}); $('#convo_indicator').css({"background":"rgba(255, 255, 255, 0.3)"}); $('#who').css({"color":"#5e3953...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toMain( callback ){\n\t\n\t\taddCallbackWithNullCommand(function(){ /* 在傳送指令前, 先將ptt-bot的狀態改變 */\n\t\t\tg_workingState = State_ReturningtoMain;\n\t\t\tclearScreenBufRow();//clean old data, since g_screenBufRow is not used until nextPttComand. \n\t\t});\n\t\taddCommands(CtrlL,function(){\n\t\t\t/* 重傳內容, 讓b...
[ "0.6218003", "0.6042513", "0.5839275", "0.5823114", "0.57896626", "0.56692046", "0.56685156", "0.56581277", "0.5653664", "0.5649913", "0.5644171", "0.5616137", "0.5598842", "0.5571182", "0.5544291", "0.5534052", "0.5527165", "0.5521144", "0.55115086", "0.54942167", "0.5490646...
0.67702353
0
Handles the click event of the "share" button, which copies link of the chatroom to the client's clipboard
function shareLink() { var link = document.getElementById("link"); link.select(); document.execCommand("Copy"); alert("Link has been copied to clipboard, ctrl+v to share the current chatroom with friends!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "share() {\n let baseUrl = window.location.href.split(\"?\")[0];\n let URIencodedPoem = compressToEncodedURI(this.fmtPoemToString());\n let url = `${baseUrl}?mode=view&poem=${URIencodedPoem}`;\n navigator.clipboard.writeText(url); // copy to clipboard\n window.history.pushState({}, document...
[ "0.75247294", "0.74667037", "0.7305068", "0.7147905", "0.6991223", "0.69640636", "0.6749681", "0.665548", "0.6627287", "0.658636", "0.65575373", "0.6550232", "0.6501747", "0.64731604", "0.6466003", "0.6465413", "0.6456932", "0.6407944", "0.6395827", "0.6387061", "0.63117504",...
0.79332525
0
Append previously active rooms to list and add click handlers to each item
function appendPreviouslyActiveRooms(rooms) { for(var i = 0; i < rooms.length; i++) { var name = rooms[i].name; if (name !== meta('roomName')) { var content = '<li><div class="prev_active_room button">Chatroom:'+ name +'</div></li>'; $('#prev_active_list').append(content); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateRoomList(data){ \n const rooms = data\n roomList = document.querySelector('#room-list');\n roomList.innerHTML = '';\n rooms.forEach(function(room){\n const li = document.createElement('li');\n li.setAttribute('class', 'list-group-item room-list')...
[ "0.65972716", "0.60376686", "0.60281193", "0.5973954", "0.5892028", "0.5865195", "0.58621967", "0.58331907", "0.58068603", "0.5799883", "0.579802", "0.5797324", "0.56981623", "0.56980115", "0.56825036", "0.5672349", "0.56246895", "0.5593866", "0.55839986", "0.5555406", "0.554...
0.75629276
0
Set up interval to track idle time and emit status change when necessary
function idleTimeDetection() { // increment the idle time counter variable every minute var interval = setInterval(function() { idleTime = idleTime + 1; // idle for more than 10 minutes, notify server if (idleTime > 9 && status === "ACTIVE") { socket.emit('status', "IDLE"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set updateInterval(value) {}", "resetIdleTimer(ev) {\n // Remove any timeouts as the user just interacted\n clearTimeout(_timeoutId);\n // Set idle time to 10 min\n _timeoutId = setTimeout(_idleCallback, _TEN_MINUTES_IN_MS);\n }", "function timerIncrement() {\n idleTime++;\n if (idleTime > 2...
[ "0.6731922", "0.6569968", "0.6518199", "0.6482406", "0.6449717", "0.6434633", "0.6377621", "0.63583255", "0.63559484", "0.630909", "0.6290632", "0.6282207", "0.626091", "0.6237276", "0.62325466", "0.6186748", "0.61861265", "0.6178809", "0.6166946", "0.61573666", "0.6146698", ...
0.7192216
0
Show list of users and hide list of rooms
function showUsers() { $('#prev_active_list').hide(); $('#active_users_list').show(); $('#rooms').css({"background": "rgba(214, 215, 216, 0.6)"}); $('#users').css({"background": "rgba(255,255,255, 0.6)"}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showRooms() {\n $('#prev_active_list').show();\n $('#active_users_list').hide();\n $('#users').css({\"background\": \"rgba(214, 215, 216, 0.6)\"});\n $('#rooms').css({\"background\": \"rgba(255,255,255, 0.6)\"});\n}", "function showUsers() {\n\n\tlet user = JSON.parse(localStorage.getItem('u...
[ "0.6941217", "0.6832283", "0.67903394", "0.66736495", "0.6605338", "0.6580023", "0.65541416", "0.654824", "0.638257", "0.63662845", "0.6356618", "0.63167876", "0.6290333", "0.6275142", "0.62585324", "0.6239994", "0.6193941", "0.61793923", "0.6171165", "0.6169965", "0.6149675"...
0.7087141
0
Show list of rooms and hide list of users
function showRooms() { $('#prev_active_list').show(); $('#active_users_list').hide(); $('#users').css({"background": "rgba(214, 215, 216, 0.6)"}); $('#rooms').css({"background": "rgba(255,255,255, 0.6)"}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideFilledRooms() {\n //location.reload();\n $.each(rooms, function (idx, obj) {\n var hasRes = false;\n var room = $(\"#room\" + obj.Room_ID);\n var roomNum = $(\"#\" + obj.Room_ID);\n if (obj.Res_Group.length !== 0) {\n room.hide();\n roomNum.hide();\n } else...
[ "0.70172", "0.69516546", "0.6757144", "0.6724946", "0.6724609", "0.66141367", "0.6441843", "0.63329804", "0.63233495", "0.63181597", "0.6291455", "0.6276444", "0.6253461", "0.6220028", "0.61951303", "0.6178489", "0.6174465", "0.61591727", "0.6150492", "0.61047685", "0.6092921...
0.70477337
0
Emit message to server, supresses the default behavior of the form which redirects the page
function sendMessage(event) { // prevent the page from redirecting event.preventDefault(); var message = document.form.message.value; socket.emit('message', conversation, message); document.form.message.value = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onOk() {\n this.doneRedirect();\n }", "function submitForm(e){\n e.preventDefault();\n\n // Get values\n var name = document.getElementById('name').value; //getInputVal('name');\n var company = getInputVal('company');\n var email = getInputVal('email');\n var phone = getInputVal('phone');\n...
[ "0.67535704", "0.61767673", "0.6131726", "0.6081461", "0.59889865", "0.5971887", "0.5954751", "0.5947201", "0.59015", "0.5898411", "0.5898411", "0.58669055", "0.583971", "0.5830416", "0.5824363", "0.58211875", "0.5813497", "0.5806959", "0.58007586", "0.5795244", "0.5787469", ...
0.6466814
1
Function to add style attributes to labels
function addLabelAttribs(labelText) { labelText.attr("font-size", "8px") .attr("font-family", "sans-serif") .attr("dy", ".35em") .attr("text-anchor", "middle") .attr("font-weight", "bold") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goodLabel(labelNum) {\n\tlabels[labelNum].style.color = \"green\";\n\tlabels[labelNum].style.fontWeight = \"bold\";\n}", "function badLabel(labelNum) {\n\tlabels[labelNum].style.color = \"red\";\n\tlabels[labelNum].style.fontWeight = \"bold\";\n}", "function createLabel(text,size)\n{\n const labelSty...
[ "0.69394565", "0.6342752", "0.6277663", "0.6241573", "0.6031034", "0.6008625", "0.6006397", "0.5982841", "0.59291345", "0.5920351", "0.58530664", "0.5850813", "0.5841719", "0.5841", "0.5838598", "0.5836242", "0.58108586", "0.57845134", "0.5782335", "0.57492", "0.57471436", ...
0.72799104
0
Updates the text displaying number of nodes and links in a graph
function updateInfoText(links, nodes) { nodeCountText.text(nodes.length + " nodes"); edgeCountText.text(links.length + " links"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderNodeTexts() {\n this.texts = this.graphContainer.selectAll('.nodeGroup')\n .append('text')\n .attrs({\n id: d => 'text_' + d.id,\n x: d => d.x + (this.props.config.nodeWidth / 2),\n y: d => d.y + (this.props.config.nodeHeight / 2)\n })\n .attr('fill', d => d.fontCo...
[ "0.63733566", "0.63700867", "0.6353051", "0.62897474", "0.62759364", "0.62396455", "0.6235632", "0.61471814", "0.6099042", "0.6068391", "0.60536814", "0.6023933", "0.6008632", "0.5995697", "0.59882337", "0.5920029", "0.5911765", "0.5870902", "0.5846368", "0.5838625", "0.58351...
0.80652845
0
Updates the colour key Creates array of [colour, label] pairs to be passed to the function that draws the key
function updateKey() { if((currentViz == vizTypes.AUTHOR_COLLAB || currentViz == vizTypes.SIMILARITY) && just_school == false) { var a = [[multiColour(inSchoolColour), "school member"], [multiColour(nonSchoolColour), "non school member"]]; } // If just school members are displayed, no need f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeKey(arr) {\n //First remove existing key\n d3.selectAll(\".keyCircle\").remove();\n d3.selectAll(\".keyText\").remove();\n // Adjust size of the key based on number of elements\n if(arr.length > 12) {\n var radius = 3.5;\n var textSize = 7.5;\n }\n else...
[ "0.6447923", "0.63932806", "0.6206048", "0.6087062", "0.6086626", "0.6062364", "0.6051859", "0.6033952", "0.6033952", "0.60103655", "0.60010993", "0.5998741", "0.5987346", "0.593303", "0.5809058", "0.57951206", "0.57920206", "0.5784079", "0.5784079", "0.5775761", "0.57649857"...
0.65191174
0
Function to highlight a group of nodes (used to highlight a community when hovering over community name) Takes array of nodes to be highlighted
function highlightNodeGroup(arr) { d3.selectAll(".nodeCircle").style("stroke-width", function(circ) { for(var i=0; i<arr.length; i++) { theNode = arr[i]; if(circ==theNode) return "3px"; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeSelectedNodesColor() {\n for (var i in selected_nodes)\n $(\"#node_\" + selected_nodes[i].id).attr('fill', setNodeCollor(selected_nodes[i].data.correct));\n}", "function highlightNode(selected, node) {\r\n\r\n\t\t\tif (clickedNodes > 2) {\r\n\r\n\t\t\t\tclickedNodes = 1;\r\n\r\n\t\t\t\tvar all...
[ "0.66233015", "0.6561123", "0.6550794", "0.65433866", "0.65090036", "0.6318639", "0.62658966", "0.62619764", "0.62503463", "0.61395794", "0.61324894", "0.6089681", "0.6085474", "0.6061994", "0.60320723", "0.6021292", "0.60185105", "0.6011252", "0.59954876", "0.5992716", "0.59...
0.8021325
0
Function to display collaboration titles between two nodes
function showTitles() { // Get id of number which was clicked var elemId = this.id; // Iterate over links to get the link which corresponds to the number which was clicked // Once found, make list out of the collaboration titles link attribute link.each(function(l) { if(l.source.id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lib_tree_print_title() {\r\n const self = this;\r\n var on_click = function (event) {\r\n return self.handler(\"switch_disp\", this.id, event);\r\n };\r\n var link_html =\r\n '<span><a id=\"panel1_headline_a\"><B>' +\r\n this.lang_headline[2 + global_setup.display_type] +\r\n \"</B></a></s...
[ "0.63236755", "0.6244355", "0.6223178", "0.6195304", "0.59214026", "0.5882818", "0.58260596", "0.57137275", "0.5698659", "0.5616973", "0.5590626", "0.5566157", "0.55607134", "0.5538858", "0.5439417", "0.54382396", "0.53917885", "0.5388017", "0.5383842", "0.53811073", "0.53743...
0.68202025
0
Function to display the keywords which authors have in common
function showKeywords() { var elemId = this.id; // Iterate through links to get link corresponding to clicked number link.each(function(l) { if(l.source.id + "-" + l.target.id === elemId) { var keywords = l.sim_kw; var titleString = "<strong>Keywords connecting " + getAuth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterByAuthor(author) {\n\tvar authordocs = [], retList = [];\n\t//first filter by author\n\tauthordocs = rawDocData.filter (function (data_item) {\n\t\treturn data_item['authorid'] == author.authorid;\n\t});\n\t//then filter by all current keywords\n\tvar i=0;\n\tfor (i=0;i<keywordList.length;i++) {\n\t...
[ "0.6913073", "0.6478058", "0.6096372", "0.60931945", "0.600461", "0.5957434", "0.5915286", "0.57709724", "0.57688487", "0.5739972", "0.56946564", "0.56913847", "0.5640842", "0.56321377", "0.56135064", "0.5599506", "0.5591618", "0.55857563", "0.55834365", "0.5548158", "0.55347...
0.6560781
1
Function to add event handlers to author names displayed in info text area
function addNameListHandlers() { // The author names have an id corresponding to the id of the node, so the node can be found from the name text element d3.selectAll(".authorName").on("click", function() { var theId = d3.select(this).attr("id"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAuthorNameHtml(theNode) {\n return \"<span class=\\\"clickable authorName\\\" id=\\\"\" + theNode.id + \"\\\">\"\n }", "function authorClick() {\n\t\tvar ajax = new XMLHttpRequest();\n\t\tajax.onload = receivedAllWordsByAuthor;\n\t\tajax.open(\"GET\", SERVICE + \"?author=\" + this.innerHTML, ...
[ "0.65104604", "0.648839", "0.6312291", "0.6166754", "0.60221", "0.6001371", "0.59244007", "0.5839985", "0.5791924", "0.5790633", "0.57698286", "0.56960374", "0.5676903", "0.566091", "0.5622886", "0.56189287", "0.5572938", "0.5566679", "0.55406445", "0.55379003", "0.55321205",...
0.759931
0
Helper function to produce the html for displaying an author name in info text area
function getAuthorNameHtml(theNode) { return "<span class=\"clickable authorName\" id=\"" + theNode.id + "\">" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAuthor() {\n const name = config.get(\"init.author.name\"),\n email = config.get(\"init.author.email\");\n\n if(name) return email?`${name} <${email}>`:name;\n else return email?email:undefined;\n}", "function showAuthorInfo(userId) {\n console.log(`showing author info for user ${userI...
[ "0.67954814", "0.65829915", "0.6537732", "0.64951295", "0.6431966", "0.6321515", "0.63163835", "0.62533873", "0.6195757", "0.6151342", "0.6090395", "0.60349387", "0.60325253", "0.59858805", "0.5979547", "0.59794754", "0.596802", "0.59653264", "0.5964861", "0.59569097", "0.593...
0.7764603
0
Restart simulation Remove the static drag listener and reattach the normal force.drag listener
function defrost() { node.on(".drag", null) node.call(force.drag); force.resume(); frozen = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dragstarted(d) {\n\n console.log(\"Drag node \" + d)\n \n force.simulation.restart()\n\n //disable node fixing\n nodes.each(d => { d.fx = null; d.fy = null })\n }", "function dragstart(d, i) {\n\t\t\t\tforce.stop(); // stops the force auto positioning before you s...
[ "0.67083687", "0.6091853", "0.6070625", "0.5962491", "0.5876059", "0.56856555", "0.5685128", "0.5673923", "0.5673519", "0.56474733", "0.5641424", "0.5634745", "0.5624931", "0.5620228", "0.56072736", "0.56072736", "0.56072736", "0.55827713", "0.55819345", "0.55743486", "0.5559...
0.632876
1
Function to update the year filter dropdown based on current graph
function updateYearChooser() { theLinks = allTimeLinks; // Get the latest year out of all collaborations var maxYear = Math.max.apply(Math, theLinks.map(function(l){ for(var i=0; i<l.collab_title_url_years.length; i++) return l.collab_title_url_years[i][2]; })); // Get t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onYearChanged() {\r\n var select = d3.select('#scaleSelect').node();\r\n // Get current value of select element, save to global currentYear\r\n currentYear = select.options[select.selectedIndex].value\r\n // Get corresponding year value to set the slider to the same year\r\n slider.value = ...
[ "0.76504207", "0.75356716", "0.75239784", "0.74137795", "0.7376692", "0.73104113", "0.7288828", "0.72702426", "0.72053766", "0.7166368", "0.71462035", "0.7133304", "0.7101172", "0.70795923", "0.7066467", "0.7040376", "0.70016336", "0.698264", "0.69581443", "0.69333297", "0.69...
0.7742927
0
Function to make copy of array of link objects, to be used for filtering links
function copyArray(linkArr) { arrCopy = [] for(var i=0; i<linkArr.length; i++) { var original = linkArr[i]; // Make deep copy of link object var objCopy = JSON.parse(JSON.stringify(original)); // Set source and target nodes of copied link to object references of original link...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v3_clone(a) {\n return [ a[0], a[1], a[2] ];\n}", "function v3_clone(a) {\n return [ a[0], a[1], a[2] ];\n}", "static createLinksArr(nodeArray){\n let linksArr = [];\n nodeArray.forEach(node=>{\n var links = node.forwardLinks;\n links.forEach(link=>{\n\tlinksArr.push({\n\t sourc...
[ "0.6324303", "0.6324303", "0.6210954", "0.6148527", "0.6148527", "0.61121434", "0.6046441", "0.60225475", "0.5915705", "0.5891794", "0.5891794", "0.5878794", "0.58319944", "0.5802943", "0.57948935", "0.57897365", "0.57748485", "0.5768581", "0.5765404", "0.5754425", "0.5754425...
0.75366426
0
Function to add handlers to metric menu options Called each time metrics menu options become available again
function addMetricHandlers() { d3.selectAll(".metricListItem").on("click", function() { var listItem = d3.select(this); var metric = listItem.attr("id"); var name = listItem.attr("data-name"); var descrptn = listItem.attr("data-desc"); colourByMetric(metric); var ke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged(idNo){ \n // Run the following 3 functions \n // Note: function 'addGauge' is in file bonus.js\n addDemoInfo(idNo);\n addCharts(idNo);\n addGauge(idNo);\n}", "function optionChanged(sample){\n bar_chart(sample);\n bubble_chart(sample);\n metadata(sample);\n}", "funct...
[ "0.62022203", "0.5933001", "0.5885829", "0.58772784", "0.5859375", "0.570275", "0.57021046", "0.5688844", "0.5659465", "0.5626067", "0.5610211", "0.55888796", "0.55693656", "0.55659276", "0.5563203", "0.55516016", "0.55407137", "0.5497377", "0.5494526", "0.54933614", "0.54927...
0.721758
0
Colours the nodes according to the value of a centrality metric
function colourByMetric(metric) { theNodes = force.nodes() // Get maximum centrality metric value out of all nodes max = Math.max.apply(Math,theNodes.map(function(n){ return n[metric] })); // Get minimum centrality metric value out of all nodes min = Math.min.apply(Math,theNo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeNodeColor() {\n _nodeColorAccessor.cacheAllValues();\n\n if (_nodeColorType === ColorTypes.CONT) {\n var range = _nodeColorAccessor.getRange();\n _nodeColorScaleC.domain([range.min,range.max]);\n _nodeData.forEach(function(d,i){\n debugger...
[ "0.6694719", "0.6664635", "0.66239476", "0.65177953", "0.64881986", "0.63300735", "0.6278099", "0.62539876", "0.62089133", "0.6183979", "0.61626637", "0.6148569", "0.60657245", "0.6035841", "0.603366", "0.6011572", "0.5998223", "0.593154", "0.59287184", "0.58936137", "0.58730...
0.76936156
0
Function to make an array of arrays, each one a different community of nodes
function getCommunities() { colourByCommunities(); var keyArray = [] var commNums = [] var communityArray = [] theNodes = force.nodes() // Sorting the nodes by community so that colours get attributed in the right order for the key theNodes.sort(function(a, b) { if(just...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateCommunityConnections() {\r\n let community_matrix = {}\r\n //Get the number of connections between the communities\r\n edges.forEach(d => {\r\n let sc = node_by_id[d.source].community\r\n let tc = node_by_id[d.target].community\r\n if(typeof s...
[ "0.65944755", "0.5936751", "0.58190876", "0.5794527", "0.5758908", "0.5699821", "0.569766", "0.56946653", "0.5655913", "0.56361556", "0.5600301", "0.55751306", "0.55578583", "0.5494527", "0.5469647", "0.5448814", "0.5447938", "0.54322183", "0.5421542", "0.5413055", "0.5407754...
0.65238315
1
Function to colour the nodes according to their community
function colourByCommunities() { var circles = d3.selectAll(".nodeCircle").style("fill", function(d) { // Get appropriate community property (just school community or full graph community) if(just_school) var comNum = d.school_com; else var comNum = d.com; // If...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorNodes(currPage) {\n node.each(function(n) {\n if (n.id == currPage) {\n d3.select(this).select(\"circle\").style(\"fill\", nodeHighlightColor);\n n.topacity = textVisibleOpacity;\n n.nopacity = nodeLinkHighlightOpacity;\n \n // Set the ...
[ "0.7244567", "0.72125787", "0.71310514", "0.7027873", "0.6958083", "0.6946227", "0.69121075", "0.6896111", "0.6872294", "0.68517065", "0.6812416", "0.6750477", "0.6709153", "0.66854745", "0.66097754", "0.65639615", "0.64772666", "0.64755714", "0.64617026", "0.6453969", "0.641...
0.84608334
0
Function to prepare the text listing the communities; takes array of arrays, each subarray being a community
function displayCommunityText(arr) { var infoText = "The authors in the network can be divided into communities based on the patterns of collaboration. Below are the \ communities for this network.<br><br>" // N.B. community numbers start at 1, not 0 for(var i=1; i<arr.length; i++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function singleCommunityText(comNodes, comNumber) {\n // Get the community keywords - they are a property of the graph object in the JSON data\n if(just_school)\n var allKeywords = graph.graph[1]\n else\n var allKeywords = graph.graph[0]\n\n // The actual arrays of keywords are in...
[ "0.6658836", "0.6158884", "0.5823533", "0.5548358", "0.5487532", "0.5400924", "0.53859854", "0.53770953", "0.53525823", "0.53354615", "0.53051764", "0.5289325", "0.52713144", "0.524355", "0.5227394", "0.5194037", "0.51933753", "0.5166331", "0.5161663", "0.51367635", "0.512305...
0.7754386
0
Function to get an array of nodes in a specific community, given the community number
function getNodesInCom(comNum) { var theNodes = force.nodes() var nodesInCom = theNodes.filter(function(n) { if(just_school) return n.school_com == comNum; else return n.com == comNum; }); return nodesInCom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCommunities() {\n colourByCommunities();\n var keyArray = []\n var commNums = []\n var communityArray = []\n theNodes = force.nodes()\n // Sorting the nodes by community so that colours get attributed in the right order for the key\n theNodes.sort(function(a, b) {\n ...
[ "0.71145236", "0.6321931", "0.5926782", "0.58773905", "0.57311255", "0.5682088", "0.56772006", "0.5621551", "0.55985975", "0.55524766", "0.5539471", "0.55254954", "0.5441614", "0.5419315", "0.54114074", "0.5399002", "0.53099644", "0.52942336", "0.5277358", "0.52730304", "0.52...
0.6384326
1
Displays the visualisation for a graph containing just the nodes in the array passed as argument Used to display single community
function showSingleCommunityGraph(nodeArray) { // Filter full set of links to just links between nodes in the node array var theLinks = force.links() var comFilteredLinks = graph.links.filter(function(l) { return nodeArray.indexOf(l.source) > -1 && nodeArray.indexOf(l.target) > -1; }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GraphDraw(nodes,connections)\n{\n var visualization = d3plus.viz()\n .container(\"#viz\")\n .type(\"network\")\n .data(nodes)\n .edges({\"size\": \"strength\", \"value\": connections})\n .size(\"Size\")\n .tooltip...
[ "0.6865688", "0.68451715", "0.66492224", "0.6470319", "0.6410935", "0.63513005", "0.6312182", "0.6259599", "0.61900085", "0.61317575", "0.60888", "0.6078164", "0.60220385", "0.6020512", "0.5988251", "0.5954162", "0.58944255", "0.58858097", "0.5867314", "0.58667326", "0.586630...
0.7983012
0
Function to colour nodes according to what school they are in
function colourBySchool() { d3.select("#colourButton").html(defaultColourText); var keyArray = [] var schools = [] // Keep track of whether any node in the graph is not in a school - so that "school not known" is added to key var nonSchoolPresent = false; d3.selectAll(".nodeCircle")....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colourByCommunities() {\n var circles = d3.selectAll(\".nodeCircle\").style(\"fill\", function(d) {\n // Get appropriate community property (just school community or full graph community)\n if(just_school)\n var comNum = d.school_com;\n else\n var comNum = d.com...
[ "0.72382057", "0.68189764", "0.65501994", "0.64080596", "0.6362067", "0.62795585", "0.6272894", "0.6268972", "0.61957735", "0.6189946", "0.6171035", "0.6059691", "0.5985579", "0.59471655", "0.5929514", "0.59169525", "0.5853921", "0.5825845", "0.57958", "0.5793111", "0.5760292...
0.81764495
0
Called in case response from server indicates that name input by user matches more than one author Displays list of candidates so user can choose one
function displayCandidates(sel, candidates) { var info = "Did you mean:<br><br>" // Prepare HTML to display for(var i=0; i<candidates.length; i++) { var name = candidates[i].name; if(candidates[i].school) var school = candidates[i].school; else var school = "school not know...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function authorSearch(x) {\n choice = $(x).text()\n authorname = $(x).html()\n \t\t$.ajax({\n\t\t\turl: '/creations-author-select',\n data: {\"Author\": choice},\n\t\t\ttype: 'POST',\n\t\t\tsuccess: function(response){\n authorsel = JSON.parse(response);\n ...
[ "0.6629504", "0.6198124", "0.61197996", "0.6111308", "0.60714537", "0.6038207", "0.6001831", "0.5801437", "0.5681415", "0.56689715", "0.56673634", "0.56368196", "0.5622282", "0.5619049", "0.56026185", "0.56007344", "0.5587099", "0.55841976", "0.5570451", "0.55697924", "0.5528...
0.6409
1
FUNCTION TO CHECK IF THE USER ALREADY HAS A SESSION STARTED
function check_if_user_already_has_asession() { /** * IF THE USER ALREADY HAS THE SESSION STARTED THE SEND IT TO * PHP PAGES TO ALLOW USE TO USE THE SYSTEM WITHOUT HAVING TO LOGIN */ if (sessionStorage.getItem('user_log') != null){ var user_session = sessionStorage.getItem("user_log"); send_u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function session_isValid() {\n var sessionTimeout = 900;\n\n var sessionID = localStorage.getItem(\"sessionID\");\n var sessionStart = localStorage.getItem(\"sessionStart\");\n\n var currentTime = timestamp();\n\n if (sessionID != null && sessionStart != null) {\n if ((currentTime - sessionSt...
[ "0.68719006", "0.66590333", "0.6546539", "0.6523599", "0.6494545", "0.6412009", "0.6365648", "0.63631946", "0.6352723", "0.6339566", "0.6313147", "0.63035387", "0.6300808", "0.6299273", "0.62771255", "0.62634176", "0.6249795", "0.62370956", "0.6208818", "0.62036264", "0.61943...
0.7820595
0
FUNCTION TO SEND USER SET SESSION TO ALL PHP CONTROLLERS SO THAT THE USER CAN USE THE SYSTEM WITHOUT HAVING TO FIRST LOG IN
function send_user_started_session(user_log){ /** * LIST OF ALL SYSTEM PHP CONTROLLERS USED */ const controller_pages = ['Dashboard'];//'Login', 'Signup', , 'Home' /** * LOOP THROW THE LIST/ARRAY OF ALL SYSTEM PHP CONTROLLERS THAT ARE ACCESSED BY JQUERY * AND SEND STARTED SESSION TO ALL THEM ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSession(){\n localStorage.setObject(\"userData\", userData);\n console.log(\"session saved in localStorage('userData')\");\n }", "function SetSessionVariables() {\n Session.set(\"page\", 'main'); //Default page\n Session.set(\"teams\", []); //Teams Object Array\n Session.se...
[ "0.59686786", "0.59416234", "0.58961755", "0.5878439", "0.58317214", "0.57861525", "0.57781076", "0.5746353", "0.57436657", "0.5722121", "0.5697261", "0.56887275", "0.568457", "0.568244", "0.5678163", "0.5652559", "0.56333756", "0.56325245", "0.56318974", "0.56311625", "0.561...
0.70483077
0
Evaluates the given expression and returns its statically resolved value and a list of object literals which define Angular providers.
evaluate(expr) { this._providerLiterals = []; const resolvedValue = this.visit(expr, { originatingFile: expr.getSourceFile(), absoluteModuleName: null, resolutionContext: expr.getSourceFile().fileName, scope: new Map(), foreignFunctionResolver:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unwrapExpressionsFromTemplateLiteral(quasi, fs) {\n if (fs === void 0) { fs = file_system_1.getFileSystem(); }\n return [quasi.node.expressions, quasi.get('expressions').map(function (e) { return getLocation(fs, e); })];\n }", "function getInjectionTokens(element) {\n var con...
[ "0.51782316", "0.5077108", "0.49329692", "0.49329692", "0.49329692", "0.49329692", "0.49329692", "0.49329692", "0.49329692", "0.49329692", "0.49244305", "0.49244305", "0.49244305", "0.49220726", "0.48925838", "0.48925838", "0.47998843", "0.47998843", "0.47998843", "0.4796012", ...
0.6896013
0
Sets User Latitude and Longitude
function setPosition(position) { UserLatitude = position.coords.latitude UserLongitude = position.coords.longitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_form(user) {\n $('location_attributes_latitude').value(user.lat()); \n $('location_attributes_longitude').value(user.lng());\n $('location_attributes_gmaps_zoom').value(Gmaps.map.map.getZoom());\n}", "function setUsersLocation (lat, lng) {\n uporabnikLAT = Math.round(lat * 1000000) / 100000...
[ "0.69027424", "0.6889016", "0.68051016", "0.6790992", "0.6790121", "0.6739556", "0.64432985", "0.6377197", "0.6367098", "0.633551", "0.6231373", "0.6201982", "0.6193585", "0.61502266", "0.6113638", "0.6088514", "0.60859954", "0.608171", "0.6043544", "0.604218", "0.60409945", ...
0.71601665
0
Component names can come in two separate flavors: 1. ComponentName 2. ModuleName/ComponentName Handling the second case requires to set a different `basePath` (module level components folder instead of the global one) and a different `name` (stripping the `ModuleName/` portion of the component name). If a component is ...
function generateComponent(keyword, type, name, program) { let basePath = program.config.srcPath || path.resolve(findRoot(), 'src') let componentsPath = path.join(basePath, 'components') let modulesPath = path.join(basePath, 'modules') const { verbose } = program if (!checkName(name)) { let msg = 'Compon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__name__({ pod, dasherizedModuleName }) {\n if (pod) {\n return 'component';\n }\n return dasherizedModuleName;\n }", "function createComponent(name) {\n return function (sfc) {\n sfc.name = name;\n\n sfc.install = function (app) {\n app.component(name, sfc);\n ...
[ "0.6285776", "0.6018001", "0.601741", "0.5974756", "0.5868375", "0.5814592", "0.5784174", "0.57153493", "0.57153493", "0.5710918", "0.56891495", "0.56465364", "0.56207097", "0.56207097", "0.56207097", "0.56207097", "0.56207097", "0.56207097", "0.56207097", "0.56207097", "0.56...
0.68429613
0
If commentSortingField is valid then sort comments based on it, else perform the default sort i.e; by object ID
function sortComments() { if (_this.config.commentSortingField && _this.config.commentSortingField !== null && _this.config.commentSortingField !== "" && _this._isValidCommentSortingFieldType(commentsTable)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByConfiguredField(a, b) {\n var sortingField;\n sortingField = this.config.commentSortingField;\n // Sort comments in ascending order\n if (this.config.commentSortingOrder && this.config.commentSortingOrder === \"ASC\") {\n ...
[ "0.76187754", "0.6278482", "0.6198084", "0.61571956", "0.61571956", "0.61369544", "0.6081683", "0.60813755", "0.59154665", "0.58834124", "0.58163136", "0.5812887", "0.5792818", "0.57713485", "0.5733967", "0.5715255", "0.5695698", "0.56776917", "0.56531656", "0.56246", "0.5601...
0.81420213
0
This function is used to sort comments based on objectIdField
function sortByOID(a, b) { if (a.attributes[commentsTable.objectIdField] > b.attributes[commentsTable.objectIdField]) { return -1; // order a before b } if (a.attributes[commentsTable.objectIdField] < b.attributes[commentsTable.objectI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortComments() {\n if (_this.config.commentSortingField &&\n _this.config.commentSortingField !== null &&\n _this.config.commentSortingField !== \"\" &&\n _this._isValidCommentSortingFieldType(commentsTable)) {\n ...
[ "0.72002095", "0.6759992", "0.6331953", "0.61598665", "0.59357315", "0.58595514", "0.5818122", "0.57949877", "0.57822514", "0.5775512", "0.574776", "0.57472813", "0.57448703", "0.5616791", "0.5608399", "0.5568761", "0.5563025", "0.55439967", "0.5501519", "0.54128", "0.5387957...
0.7443119
0