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
Add Warn Messages to Debugger Queue
function warn() { try { var messages = Array.prototype.slice.call(arguments, 0) || []; addMessages('warn', messages, stackTrace()); logger.warn(messages); } catch (err) { Debugger.fatal.push(err); logger.fatal(err); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "warn (msg : string, ...args : mixed[]) {\n\t\tthis._print(\"warn\", msg, ...args)\n\t}", "function warn(message) {\r\n\tnotify(\"Attention\", message);\r\n}", "function warn(msg){\r\n rootLogger.warn(msg)\r\n}", "function warn (mssg) {\n console.log ('WARNING %s', mssg);\n }", "function postWarningM...
[ "0.5885693", "0.58361495", "0.5752208", "0.5713043", "0.5692084", "0.56708425", "0.5662857", "0.56601435", "0.5657197", "0.5657197", "0.55829495", "0.55829495", "0.55829495", "0.55829495", "0.55829495", "0.55630016", "0.5535212", "0.55238116", "0.5488184", "0.547262", "0.5458...
0.60109603
0
Support zero setup using `app.template.afterFooter` hook in SFRA
function afterFooter() { // Get Cartridge Cache var cache = dw.system.CacheMgr.getCache('DevToolsCache'); // Write log types to their own cache key ( 128KB max per key ) cache.put('debug', Debugger.debug); cache.put('error', Debugger.error); cache.put('fatal', Debugger.fatal); cache.put('in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderFooter() {\n return null;\n }", "createFooter(footer) {\n footer.appendChild(footerTemplate.content);\n }", "displayFooter() {\n }", "function FOOTER$static_(){ToolbarSkin.FOOTER=( new ToolbarSkin(\"footer\"));}", "function EMBEDDED_FOOTER$static_(){ToolbarSkin.EMBEDDED_FOOTER=( n...
[ "0.70794785", "0.6963428", "0.68318343", "0.6681297", "0.65394115", "0.6497432", "0.6367801", "0.63453925", "0.628396", "0.6234939", "0.6206683", "0.61678845", "0.61656296", "0.6139608", "0.61057913", "0.6087078", "0.6068413", "0.6064464", "0.60264033", "0.6019035", "0.601377...
0.73326063
0
Support Dev Tool Rendering for SFSG Sites
function render() { var ISML = require('dw/template/ISML'); // Get Basket Info var BasketMgr = require('dw/order/BasketMgr'); var basket = BasketMgr.getCurrentBasket(); // Get Preferences var Site = require('dw/system/Site'); var currentSite = Site.getCurrent(); var preferences = Site....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function devTools(req, res, template, block, next) {\n\n calipso.theme.renderItem(req, res, template, block, {blocks:res.renderedBlocks},next);\n\n}", "function createSiteModel(presentMold,sa,ss,sv,ctx) {\r\n console.log(\"createSiteModel %o\",{presentMold:presentMold,sa:sa,ss:ss,sv:sv,ctx:ctx});\r\n // =====...
[ "0.6392638", "0.5629564", "0.5591505", "0.55517715", "0.5545854", "0.5477624", "0.54771936", "0.546993", "0.54038614", "0.5373999", "0.53692985", "0.5335232", "0.53042716", "0.5287603", "0.5287603", "0.5287603", "0.5285112", "0.52477056", "0.5228362", "0.52249527", "0.5218984...
0.62661785
1
A promisey wrapper for FB graph requests.
function graphRequest(path) { return httpsRequest.get('https://graph.facebook.com/' + path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetch(label) {\n\n\t\t/* currying scope */\n\t\tvar _label = label, _call, _model, _callback;\n\n\t\t\t/* currying helpers */\n\t\t\tfunction from(call) {\n\t\t\t\t_call = call;\n\t\t\t\treturn { saveTo: saveTo };\n\t\t\t}\n\n\t\t\tfunction saveTo(model) {\n\t\t\t\t_model = model;\n\t\t\t\treturn { proces...
[ "0.6034932", "0.58807665", "0.58761847", "0.584159", "0.57870877", "0.57573324", "0.5676029", "0.5674774", "0.565767", "0.56330574", "0.56326675", "0.56152135", "0.5597064", "0.5581951", "0.5568661", "0.5562038", "0.5514445", "0.55002064", "0.5477224", "0.5456112", "0.5427632...
0.63984615
0
IMPL HELPER Usage: MyClass.Implement(IStructuralQueryProcessorImpl);
function IStructuralQueryProcessorImpl() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addImplementationToInterfaces(impl) {\n\t impl.getInterfaces().forEach(function (type) {\n\t type._implementations.push(impl);\n\t });\n\t}", "function addImplementationToInterfaces(impl) {\n impl.getInterfaces().forEach(function (type) {\n type._implementations.push(impl);\n });\n}", "funct...
[ "0.58663887", "0.58471787", "0.58471787", "0.534457", "0.52945155", "0.5279814", "0.52375954", "0.499448", "0.49334556", "0.4891269", "0.48632932", "0.48614883", "0.4855235", "0.48027858", "0.4783587", "0.47811607", "0.47425663", "0.47416317", "0.47362837", "0.4652986", "0.46...
0.7234552
0
Get path start point for placing vehicle
function pathStartPoint(path) { var d = path.attr("d"), dsplitted = d.split(" "); let posX = dsplitted[0].replace('m', '').replace('M', ''); let posY = dsplitted[1].replace(/C.*/, ""); return [posX, posY]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pathStartPoint(path) {\n\tvar d = path.attr(\"d\"),\n\t\tdsplitted = d.split(\" \");\n\treturn dsplitted[1];\n}", "getStartingStop(route) {\n const busses = _.filter(route[0].legs, { type: '1'} );\n return busses[0].locs[0].name;\n }", "getStartingStop(route) {\n const busses = _.fil...
[ "0.63816726", "0.6046992", "0.6046992", "0.59468085", "0.592884", "0.59148055", "0.5861683", "0.58531725", "0.5791481", "0.5774587", "0.5760746", "0.56078213", "0.55926573", "0.55506986", "0.55498224", "0.55344373", "0.55331314", "0.5497983", "0.545433", "0.54322016", "0.5408...
0.64677376
0
Creates a menu item as an html component
function createMenuItemComponent(item) { var classStr = getMenuItemClassStr(options.menuItemClasses, item.hasTrailingDivider); var itemStr = '<button id="' + item.id + '" class="' + classStr + '"'; if(item.tooltipText) { itemStr += ' title="' + item.tooltipText + '"'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MenuItem(n, text, label)\n{\n this.domRef = document.createElement(\"div\");\n this.domRef.setAttribute(\"id\", \"menuItem\" + n);\n this.domRef.setAttribute(\"class\", \"menuItem\");\n this.domRef.setAttribute(\"className\", \"menuItem\");\n this.text = text;\n this.label = label;\n}", ...
[ "0.7304031", "0.7251548", "0.7237758", "0.7084985", "0.7084985", "0.70612836", "0.70131046", "0.694023", "0.68826306", "0.6875788", "0.68330383", "0.6825445", "0.6815181", "0.68016756", "0.67925537", "0.6764519", "0.6751461", "0.6750822", "0.67262894", "0.66983193", "0.669443...
0.778071
0
Appends the given component to cxtMenu
function appendComponentToCxtMenu(component) { $cxtMenu.append(component); bindMenuItemClickFunction(component); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAndAppendCxtMenuComponent() {\n var classes = getClassStr(options.contextMenuClasses);\n// classes += ' cy-context-menus-cxt-menu';\n $cxtMenu = $('<div class=' + classes + '></div>');\n $cxtMenu.addClass('cy-context-menus-cxt-menu');\n setScratchProp('cxtMenu', $c...
[ "0.6699425", "0.66000414", "0.6367995", "0.63181335", "0.61374", "0.6087114", "0.60329133", "0.59219337", "0.5849409", "0.58446276", "0.5834317", "0.58102256", "0.58061033", "0.5786877", "0.5770239", "0.5758063", "0.5677042", "0.56365514", "0.5610651", "0.5589875", "0.5579029...
0.8334407
0
Insert the given component to cxtMenu just before the existing item with given ID
function insertComponentBeforeExistingItem(component, existingItemID) { var $existingItem = $('#' + existingItemID); component.insertBefore($existingItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendComponentToCxtMenu(component) {\n $cxtMenu.append(component);\n bindMenuItemClickFunction(component);\n }", "function prependElemToContainer(itemType, itemId, containerId) {\r\n\tvar item = document.createElement(itemType);\r\n\titem.id = itemId;\r\n\tvar container = Wicket.$(co...
[ "0.6333138", "0.59704393", "0.57982093", "0.5783436", "0.57410884", "0.56878734", "0.5678838", "0.5642974", "0.5606567", "0.5546855", "0.55390793", "0.55263275", "0.5522688", "0.54865086", "0.5454151", "0.5448032", "0.5446074", "0.5444185", "0.54396063", "0.54349387", "0.5429...
0.78257173
0
When component is mounted we get access to DOM elements, so we can acquire detailed information about item sizes, visible area size, we can calculate boundry to prevent empty space after scrolling to far to the right. We also set the starting position that was set in props.
componentDidMount() { const offsets = this.getOffsets(); const { startingItemIndex } = this.props; const { rightBoundry } = this.mouseTracking; const currentItemIndex = (startingItemIndex > rightBoundry) ? rightBoundry : startingItemIndex; const currentOffset = offsets[currentItemInde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n this.sbh.reportRendering();\n const { init, end, itemsContainer_hg, ghostView_hg, viewport_hg } = this.sbh;\n\n const visibleItems = this.state.items.slice( init, end ).map( ( obj, index )=> {\n return this.props.renderFunc( obj, index );\n } );\n console....
[ "0.66064733", "0.62121683", "0.6150639", "0.6081499", "0.603153", "0.5989495", "0.5968034", "0.5963147", "0.59049416", "0.588448", "0.5809189", "0.5793167", "0.577373", "0.5770065", "0.57659763", "0.5735189", "0.57280177", "0.5727359", "0.56949747", "0.5694672", "0.5685819", ...
0.6516694
1
Function Hide Extra Items
function hideExtraItems() { if( !$( "div[id^='newExtraId']" ).length ){ $("#extras-headers").hide(); $("#remove-extras").hide(); $("#add-extra-div").hide(); $("#card-extras").addClass("card-box-empty"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideItems() {\r\n piecesSlider.hidePieces({items: [currentImageIndex, currentTextIndex, currentNumberIndex]});\r\n }", "function hideItems(){\n $(\".bap-objective\").each(function(){\n $(this).css({'display' : 'none'});\n });\n \n $(\".bap-actions\").each(function(){...
[ "0.7424368", "0.7050472", "0.6987452", "0.688318", "0.68615764", "0.6785888", "0.678303", "0.67474234", "0.67277205", "0.66056925", "0.65926754", "0.65733886", "0.6563795", "0.6562554", "0.65456986", "0.6542916", "0.65317863", "0.6502858", "0.6445313", "0.6434914", "0.642828"...
0.77597964
0
return true if the rectangle and circle are colliding
function CircleRectColliding(circle,rect){ var distX = Math.abs(circle.x - rect.x-rect.width/2); var distY = Math.abs(circle.y - rect.y-rect.height/2); if (distX > (rect.width/2 + circle.radius)) { return false; } if (distY > (rect.height/2 + circle.radius)) { return false; } if (dist...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RectCircleColliding(circle, rect){\r\n let distX = Math.abs(circle.x - rect.x);\r\n let distY = Math.abs(circle.y - rect.y);\r\n\r\n if (distX > (rect.w/2 + circle.r)) { return false; }\r\n if (distY > (rect.h/2 + circle.r)) { return false; }\r\n\r\n if (distX <= (rect.w/2) && distY <= (rec...
[ "0.8051447", "0.74932647", "0.74816024", "0.7471761", "0.7371402", "0.7362761", "0.73568165", "0.73499477", "0.7326452", "0.7313426", "0.7310763", "0.7281313", "0.727381", "0.72569495", "0.72476524", "0.72384375", "0.7231175", "0.7225427", "0.72012377", "0.7184791", "0.716728...
0.8142307
0
Find the total sum of internal angles (in degrees) in an nsided simple polygon. N will be greater than 2. HINT: formula 180 (n 2)
function angle(n) { return (n - 2) * 180 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function area2D(poly, n) {\n let area = 0.0;\n let i, j, k;\n\n if (n < 3) return 0;\n\n for (i = 1, j = 2, k = 0; i < n; i++, j++, k++) {\n area += poly.get(i)[0] * (poly.get(j)[1] - poly.get(k)[1]);\n }\n area += poly.get(n)[0] * (poly.get(1)[1] - poly.get(n - 1)[1]); // wrap-around term\n return area ...
[ "0.64632773", "0.62722427", "0.6221935", "0.6185668", "0.6161291", "0.60888535", "0.5994085", "0.59938157", "0.59839904", "0.5973642", "0.5962862", "0.5943692", "0.58638024", "0.5843711", "0.58429116", "0.5764769", "0.572328", "0.57161814", "0.56387854", "0.5627265", "0.56237...
0.69361514
0
create a function to print more test
function printMore() { console.log("Inside of the print more. Here is more text"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printMore(){\n\n\n console.log(\"Print out more text\");\n\n }", "function printMore() {\n console.log(\"Inside of print more. Here is more text!\");\n}", "function printMore(){\n console.log(\"Prints more text!\");\n}", "function printMore (){\n console.log(\"This is different text\");\n}", ...
[ "0.6983522", "0.6814996", "0.6796115", "0.67783767", "0.67265236", "0.65004396", "0.6470193", "0.6415718", "0.63583297", "0.6305286", "0.62471586", "0.6193694", "0.61724573", "0.61481136", "0.6124001", "0.6086793", "0.6059048", "0.60545343", "0.6041228", "0.5991413", "0.59864...
0.6859952
1
purpose add a work order args user_id (required) name (required) notes (optional) scheduled_at (optional) (default is NULL) address_id (required) returns work_order
add(form_data, success_callback, failure_callback) { var url = "/global/str/work/order/add"; return WebClient.basicPost( form_data, url, success => { success.data.work_order = new EliteAPI.Models.STR.WorkOrder(success.data.work_order); if (success_callback) success_callback(suc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateWorkOrder(data) {\r\n try {\r\n var record = nlapiLoadRecord('', data.id);\r\n\r\n } catch (e) {\r\n nlapiLogExecution('ERROR', 'Error during main updateWorkOrder', e.toString());\r\n }\r\n}", "function workOrderCreate() {\n // Define the data object and include the neede...
[ "0.5523549", "0.54187405", "0.53814536", "0.5340546", "0.52480507", "0.52443844", "0.5232081", "0.51992047", "0.5189182", "0.5189182", "0.51601285", "0.51406974", "0.51259065", "0.5107633", "0.5095634", "0.50781333", "0.50741386", "0.5072293", "0.5053681", "0.5039395", "0.501...
0.56223637
0
purpose add a work order product args work_order_id (required) product_id (required) name (optional) (default is product name) price (optional) (default is product price) quantity (optional) (default is 1) notes (optional) returns work_order_product
add(form_data, success_callback, failure_callback) { var url = "/global/str/work/order/product/add"; return WebClient.basicPost( form_data, url, success => { success.data.work_order_product = new EliteAPI.Models.STR.WorkOrderProduct(success.data.work_order_product); if (success...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_product(product_id)\n{\n\t//find the product id in the products_list \n\tif (product_id in products_list)\n\t{\n\t\t//find the product id in the order_list \n\t\tif (!(product_id in order_list))\n\t\t{\n\t\t\t//if not found insert into order_list from products_list \n\t\t\tvar temp_product = {};\n\t\t...
[ "0.5780007", "0.57395875", "0.57208806", "0.5682631", "0.5647372", "0.563515", "0.55671495", "0.5475941", "0.53586006", "0.53163195", "0.52552795", "0.52404964", "0.52378154", "0.5205758", "0.51758486", "0.5172874", "0.51694787", "0.51471686", "0.513617", "0.51258504", "0.509...
0.60723364
0
purpose set a work order product args work_order_product_id (required) name (optional) price (optional) quantity (optional) notes (optional) returns (none)
set(form_data, success_callback, failure_callback) { var url = "/global/str/work/order/product/set"; return WebClient.basicPost(form_data, url, success_callback, failure_callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateWorkOrder(data) {\r\n try {\r\n var record = nlapiLoadRecord('', data.id);\r\n\r\n } catch (e) {\r\n nlapiLogExecution('ERROR', 'Error during main updateWorkOrder', e.toString());\r\n }\r\n}", "setProductDetails(inventory_id, name) {\n var _this = this;\n $.aja...
[ "0.6260296", "0.57083803", "0.5682877", "0.56394154", "0.5510269", "0.5492568", "0.54738563", "0.5449034", "0.5429804", "0.5402962", "0.53116554", "0.53026104", "0.5301988", "0.5296191", "0.52909636", "0.52569056", "0.5249845", "0.5226249", "0.52033466", "0.51945895", "0.5189...
0.5881553
1
Returns an array of all data
get allData() { let currentNode = this._head; let data = []; while (currentNode != null) { data.push(currentNode.data); currentNode = currentNode.next; } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retreiveAllData() {\n\n // -------------------------------------------------------------JavaScript - Arrays Ex. 1s||\n let data = [];\n // -------------------------------------------------------------JavaScript - Loop Ex. 1||\n // -------------------------------------------------------------JavaScript -...
[ "0.72481996", "0.7109269", "0.7075278", "0.7033435", "0.7026172", "0.7018068", "0.6982982", "0.69762003", "0.6969854", "0.6969854", "0.6953239", "0.69425", "0.694046", "0.693402", "0.69297755", "0.6850158", "0.6850158", "0.6850158", "0.6850158", "0.6850158", "0.6850158", "0...
0.76037693
0
On form submission, fetch flights according to origin, dest., and dates
function handleSubmit(e) { e.preventDefault() // Prevent page from refreshing after submit /* Convert date object to appropriate string format: YYYY-MM-DD */ function toString(date) { return date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? '0' + (date.getMon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSubmit(e) {\n e.preventDefault() // Prevent page from refreshing after submit\n\n /* Convert date object to appropriate string format: YYYY-MM-DD */\n function toString(date) {\n return date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? \n '0' + (...
[ "0.6394337", "0.6247624", "0.620732", "0.61550575", "0.6139311", "0.6119096", "0.6071288", "0.606545", "0.60606325", "0.6047079", "0.6039009", "0.6016896", "0.6007751", "0.59811354", "0.5887124", "0.5861646", "0.58316725", "0.58176845", "0.5801056", "0.5781748", "0.56975263",...
0.6773049
0
Updates origin options by fetching places that match the current originValue
function getOriginOptions(origin) { async function fetchOrigins() { const reqOptions = { method: 'GET', headers: { "x-rapidapi-host": "skyscanner-skyscanner-flight-search-v1.p.rapidapi.com", "x-rapidapi-key": "9dd335fd5fmsh126b7...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOriginOptions(origin) {\n async function fetchOrigins() {\n const reqOptions = {\n method: 'GET',\n headers: {\n \"x-rapidapi-key\": `${process.env.REACT_APP_API_KEY}`,\n \"x-rapidapi-host\": \"skyscanner-skyscanner-f...
[ "0.7239087", "0.6354812", "0.5905114", "0.57293653", "0.5597726", "0.55211806", "0.5480086", "0.5362879", "0.52722776", "0.5210648", "0.51626736", "0.50667685", "0.5043833", "0.5043833", "0.5029589", "0.5014263", "0.5011548", "0.49924496", "0.4990985", "0.49862665", "0.497396...
0.716165
1
Metodo para obtener el array de Intervalos
getIntervalos(){ return this.arrayIntervalos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createIntervals(data) {\n var newArr = [];\n var start = Math.min(...data);\n var end = 0;\n var max = Math.max(...data);\n var i = start;\n while (i <= max) {\n //find end of interval\n while ( data.includes(i + 1) && i <= max) {\n i++;\n }\n end ...
[ "0.70541894", "0.6757823", "0.67196435", "0.65172875", "0.6339136", "0.63362443", "0.6329786", "0.631862", "0.63139117", "0.63041776", "0.6154532", "0.61465615", "0.6143484", "0.6137957", "0.61171407", "0.60353905", "0.6024911", "0.6024579", "0.60086", "0.59941787", "0.598874...
0.71930397
0
Bind initial g element
setUp() { this.g = d3 .select(this.root) .append("g"); this.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bind(el, mdef, item, index, insert) {\n\t // create svg element, bind item data for D3 compatibility\n\t var node = DOM.child(el, index, mdef.tag, ns, null, insert);\n\t node.__data__ = item;\n\t node.__values__ = {fill: 'default'};\n\n\t // create background rect\n\t if (mdef.tag === 'g') {\n\t ...
[ "0.59400624", "0.5921703", "0.5894392", "0.5894392", "0.58826184", "0.5854251", "0.5618019", "0.55787575", "0.5562254", "0.55472636", "0.55363476", "0.55363476", "0.55363476", "0.5534097", "0.55303216", "0.55303216", "0.5503348", "0.5495646", "0.5491219", "0.54748034", "0.545...
0.6115457
0
Setup the paging text
function setupPagingDisplayText(p_name, p_page, p_interval, p_total) { var l_range_low = 0; var l_range_high = 0; //text display l_range_high = (p_total < p_interval) ? p_total : (p_interval * p_page); l_range_low = (p_total < p_interval) ? 1 : (l_range_high - p_interval +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPagination() {\n if (this.pdfBuilder.includePageNumber) {\n const { doc, margins, documentFont } = this.pdfBuilder;\n let text = this.currentPage;\n doc.font(documentFont);\n doc.fontSize(9);\n\n if (this.docTitle.length > 0) {\n text = `${this.docTitle} - ${text}`;\n }\n...
[ "0.7050762", "0.66000205", "0.6436289", "0.6425054", "0.6425054", "0.6425054", "0.6313956", "0.62945944", "0.6258854", "0.6126773", "0.60130316", "0.6004611", "0.5871373", "0.58111334", "0.57850456", "0.5783015", "0.5759724", "0.57489336", "0.5744794", "0.57145375", "0.568591...
0.74766666
0
Setup the grid pagingation navigation buttons
function setupPagingNavigationButtons(p_name, p_tpages, p_page) { var l_next_obj = jQuery('#status_report_pager_' + id + '_center').find('td[id="next_status_report_pager_' + id + '"]'); var l_first_obj = jQuery('#status_report_pager_' + id + '_center').find('td[id="first_status_report_pager_' + id + '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupNavbuttons() {\n prevBtn = document.createElement('a');\n prevBtn.className = 'prev disabled';\n\n buttons.push(prevBtn);\n parentElement.appendChild(prevBtn);\n\n prevBtn.addEventListener('click', function (event) {\n event.preventDefault();\n prev();\n });\n \n nex...
[ "0.67810607", "0.6712781", "0.66395855", "0.6627907", "0.6558065", "0.65282375", "0.65019155", "0.6425628", "0.63972014", "0.637492", "0.6351019", "0.6248126", "0.6226326", "0.62041587", "0.6183944", "0.6138548", "0.61301386", "0.612205", "0.6120665", "0.6091883", "0.60862136...
0.7341848
0
Setup the grid pagingation navigation events
function setupPagingNavigationEvents(p_name) { //next_status_report_pager_DSC_0 var l_next_obj = jQuery('#status_report_pager_' + id + '_center').find('td[id="next_status_report_pager_' + id + '"]'); var l_first_obj = jQuery('#status_report_pager_' + id + '_center').find('td[id="f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHandlersOnPagination() {\n\t$('.pageNumber').on('click', function(event) {\n\t\tsetLoadingAnimation();\n\n\t\tvar num = parseInt(event.target.id.slice(4));\n\t\tloadNewsByPage(num);\n\t\tsetCurrents(num);\n\t\t// add class to really current element\n\t\t$(event.target).addClass('current');\t\n\t});\n\n...
[ "0.69010603", "0.669732", "0.6402162", "0.639814", "0.6388916", "0.6374469", "0.629267", "0.62695575", "0.6246333", "0.61780274", "0.61762035", "0.6168522", "0.6157021", "0.61362904", "0.61336005", "0.6133174", "0.61156315", "0.6102355", "0.6090263", "0.60222566", "0.60221875...
0.7534282
0
Retorna o numero de colunas de uma tabela.
function getColumnCount( $table ) { var cellCount = 0; var colCount = 0; $table.find( "> tbody > tr, > thead > tr" ).not( ".syo-datagrid-grip-row" ).each(function() { var span = 0; $( this ).children( "td, th" ).filter( ":visible" ).each(function() { span += +$( this ).attr( "colspan" ) || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getColumnsCount() {\r\n}", "function countCols() {\n var colCount = 0;\n $('tr:nth-child(1) td').each(function () {\n if ($(this).attr('colspan')) {\n colCount += +$(this).attr('colspan');\n } else {\n colCount++;\n }\n });\n return colCount;\n}", ...
[ "0.75602984", "0.69790137", "0.6714571", "0.6605004", "0.65670115", "0.6468128", "0.64569986", "0.64569986", "0.64191175", "0.6416906", "0.6383114", "0.63642746", "0.63219696", "0.631277", "0.629943", "0.629943", "0.629943", "0.629943", "0.6290581", "0.6290581", "0.6290581", ...
0.7075634
1
id of editor currently being controlled
get controls() { return !this.editor ? undefined : this.editor.getAttribute("id"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get id() { return this.editor.id; }", "function store_active_editor(id){\r\n\tif($.trim($('#active_editor_id').text())=='' || $.trim($('#active_editor_id').text())!=id){\r\n\t\t$('#active_editor_id').text(id);\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\t\r\n}", "function getCurrentEditorInstan...
[ "0.782157", "0.66879255", "0.6646849", "0.6622215", "0.6622215", "0.659061", "0.65835744", "0.6535789", "0.65117896", "0.62881595", "0.62812096", "0.6256706", "0.62469566", "0.62469566", "0.62469566", "0.62469566", "0.62469566", "0.62469566", "0.6240583", "0.61963004", "0.616...
0.7577074
1
Gets download count of first 10 releases from API
function get_first_ten_releases_from_api(){ return new Promise(function (resolve, reject) { let response = "" let request = new XMLHttpRequest(); let downloads = [] let get_versions = 'https://api.github.com/repos' + url.pathname + '?&page=1&per_page...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function first_page() {\n get_first_ten_releases_from_api().then(function (fulfilled) {\n add_download_count_first_page(fulfilled)\n }).catch(function (error) {\n console.error(\"GH Download Counter: \" + error.message);\n });\n}", "async function getRepos(line, url){\n\n let repos_url ...
[ "0.7095429", "0.62637126", "0.6114386", "0.6052023", "0.5885165", "0.5827343", "0.5767308", "0.57642406", "0.573691", "0.57238764", "0.5719693", "0.5702088", "0.56815404", "0.5675257", "0.5612377", "0.5582505", "0.5572187", "0.55702454", "0.5568355", "0.5566945", "0.5560624",...
0.74476177
0
Adds download count to assets in main releases page
function add_download_count_first_page(download) { let all_releases = document.querySelectorAll('.release-entry') let releases = [] for (k = 0; k < all_releases.length; k++){ if ( all_releases[k].className.localeCompare('release-entry') == 0 ){ releases.push(all_releases[k]) } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function first_page() {\n get_first_ten_releases_from_api().then(function (fulfilled) {\n add_download_count_first_page(fulfilled)\n }).catch(function (error) {\n console.error(\"GH Download Counter: \" + error.message);\n });\n}", "function get_tag(tag){\n path = '/' + pathnameArray[0]...
[ "0.63376135", "0.611717", "0.60875934", "0.6070179", "0.60143304", "0.6005538", "0.56704044", "0.5632922", "0.5580967", "0.5503848", "0.54997003", "0.54676867", "0.52970105", "0.5294807", "0.528715", "0.5286403", "0.527841", "0.5267389", "0.5264796", "0.5252578", "0.52467805"...
0.7832722
0
Adds download count to assets to individual releases
function get_release(tag, i){ get_release_from_api(url.pathname, tag).then(function (fulfilled) { let all_releases = document.querySelectorAll('.release-entry') let releases = [] for (k = 0; k < all_releases.length; k++){ if (all_releases[k].className.localeCompare('release-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_download_count_first_page(download) {\n let all_releases = document.querySelectorAll('.release-entry')\n let releases = []\n\n for (k = 0; k < all_releases.length; k++){\n if ( all_releases[k].className.localeCompare('release-entry') == 0 ){\n releases.push(all_releases[k])\...
[ "0.75657433", "0.61809605", "0.611499", "0.5751537", "0.5673498", "0.5639777", "0.55975145", "0.5555921", "0.5542782", "0.55139357", "0.54019684", "0.53406525", "0.5237544", "0.520664", "0.51901716", "0.51785606", "0.5172946", "0.51678556", "0.51670986", "0.5158365", "0.51504...
0.62289083
1
Processes get and add download count to individual release in tag page
function get_tag(tag){ path = '/' + pathnameArray[0] + '/' + pathnameArray[1] + '/' + pathnameArray[2] get_release_from_api(path, tag).then(function (fulfilled) { assets = document .getElementsByClassName('d-flex flex-justify-between \ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_download_count_first_page(download) {\n let all_releases = document.querySelectorAll('.release-entry')\n let releases = []\n\n for (k = 0; k < all_releases.length; k++){\n if ( all_releases[k].className.localeCompare('release-entry') == 0 ){\n releases.push(all_releases[k])\...
[ "0.73975223", "0.69801116", "0.6299598", "0.5905535", "0.58199376", "0.56608444", "0.5475051", "0.547356", "0.54141825", "0.540331", "0.5400969", "0.5384784", "0.53665423", "0.53665423", "0.53480285", "0.5339824", "0.5328388", "0.53251874", "0.5306061", "0.5302084", "0.530208...
0.75252974
0
Processes get and add download counts to main release page
function first_page() { get_first_ten_releases_from_api().then(function (fulfilled) { add_download_count_first_page(fulfilled) }).catch(function (error) { console.error("GH Download Counter: " + error.message); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_download_count_first_page(download) {\n let all_releases = document.querySelectorAll('.release-entry')\n let releases = []\n\n for (k = 0; k < all_releases.length; k++){\n if ( all_releases[k].className.localeCompare('release-entry') == 0 ){\n releases.push(all_releases[k])\...
[ "0.70850253", "0.6047731", "0.5902769", "0.58480215", "0.57566094", "0.5676323", "0.56647915", "0.56025094", "0.55763006", "0.5542721", "0.5530309", "0.55218774", "0.5491761", "0.5491761", "0.5491761", "0.5489082", "0.5475432", "0.54583853", "0.54547423", "0.5453795", "0.5447...
0.6766958
1
Fonction qui va permettre de remplir les champs de la DICT lorsque l'on a ceux sur la DT
function remplirDtDictInformationBase() { var form = $('form[name=mairievoreppe_demandetravauxbundle_dtdict]'); var inputs = form.find('#partie-dt .information-base input, #partie-dt .information-base textarea'); var selects = form.find('#partie-dt .information-base select[recuperer-info=recuper...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rekeyDict(tab, t_key, r_key, onecol_only) {\n if (onecol_only === undefined) {onecol_only = true}\n // if new tkey declare new dict according to onecol rule\n if (onecol_only) { di_changes[t_key] = {} } else {\n if (!(t_key in di_changes)) {\n di_changes[t_key] = {};\n }\...
[ "0.56238204", "0.5563324", "0.5553243", "0.5465876", "0.5377223", "0.5360889", "0.5334947", "0.529719", "0.52191573", "0.5188256", "0.5168324", "0.5138603", "0.5125954", "0.51255274", "0.51228064", "0.50593555", "0.5054419", "0.5027519", "0.5024497", "0.50136006", "0.50037575...
0.58944005
0
This function gets the number of decision variables
function getTheNumberOfDecisionVariables(){ header("PROVIDE US WITH THE RELEVANT INFORMATIONS", "The Number of decision variables"); inquirer.prompt([ { type: "input", name: "numberOfDecisionVAriables", message : "Please, enter the number of decision vari...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countVars()\n\t{\n\t\tvar i = 0;\n\t\tfor (var prop in this)\n\t\t{\n\t\t\tif (prop !== \"count\")\n\t\t\t\ti++;\n\t\t}\n\n\t\treturn i;\n\t}", "variableSize() {\n\t\treturn this._vars.length;\n\t}", "emptyVariableSize() {\n\t\tlet num = 0;\n\t\tfor (const v of this._vars) {\n\t\t\tif (v.isEmpty()) nu...
[ "0.6311499", "0.6199458", "0.6167375", "0.5937147", "0.583968", "0.5747099", "0.5747099", "0.5674639", "0.55592793", "0.5550169", "0.55272496", "0.55013114", "0.55013114", "0.54698986", "0.54640985", "0.5459283", "0.5439863", "0.5424535", "0.54244334", "0.54244334", "0.540344...
0.63473517
0
This function gets the objective function
function getObjectiveFucntion(noOfDecisionVariables, ourPosition){ if(noOfDecisionVariables > 0){ inquirer.prompt([ { type: "input", name: "decisionCoefficient", message: "Input the coefficient of decision variable " + ourPosition...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fitnessFunction(score,method)\n {\n if(method ==1)\n {\n score = pow(score,2);\n if(score ==0) score = 0.1;\n return score;\n }\n\n }", "policy(obs) {\n\t\tif (this.isTrain && Math.random() < this.epsilon) {\n\t\t\treturn Math.floor(Math.random() * t...
[ "0.5881348", "0.56004936", "0.557584", "0.5573094", "0.55133975", "0.54846275", "0.5453822", "0.5429023", "0.54098076", "0.5376141", "0.53643554", "0.5352406", "0.5317519", "0.53059816", "0.5257236", "0.52378184", "0.52279925", "0.5221422", "0.5187101", "0.5106702", "0.509544...
0.6012344
0
This gets the number of constraints
function getNumberOfConstrainsts(){ header("we are now looking at the constraints", "We need to know the number of constraints you have modelled"); inquirer .prompt([ { type: "input", name: "noOfContraints", message : "Pleas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constraintSize() {\n\t\treturn this._cons.length;\n\t}", "get length() {\n return this._constraint.length;\n }", "constraintDensity() {\n\t\treturn this.constraintSize() / this.variableSize();\n\t}", "get dof() {\n let dof = 0;\n for (const node of this.nodes)\n ...
[ "0.7257673", "0.6753218", "0.669257", "0.6194739", "0.6059314", "0.6058409", "0.60299075", "0.60002077", "0.5965975", "0.5965841", "0.59624696", "0.58916247", "0.5830875", "0.5824447", "0.58153456", "0.581416", "0.57827175", "0.5659883", "0.56457967", "0.5622357", "0.5622357"...
0.6921863
1
Given child node or element, append to childNodes array of instance.
appendChild(child) { this.childNodes.push(child); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendChild(elem,child){child.parent=elem;if(elem.children.push(child)!==1){var sibling=elem.children[elem.children.length-2];sibling.next=child;child.prev=sibling;child.next=null;}}", "function result_element_append(parent, child)\n{\n if(parent != null && child != null) {\n parent.content.pu...
[ "0.70200396", "0.69416153", "0.69062847", "0.68313944", "0.68150747", "0.67481816", "0.6717455", "0.6666579", "0.6647831", "0.657988", "0.6578471", "0.64778405", "0.64017946", "0.6367434", "0.63599414", "0.6326552", "0.6326552", "0.6326552", "0.6326552", "0.6326552", "0.63164...
0.71794957
0
Given name and value, set existing or new attribute of instance.
setAttribute(name, value) { const found = this.attributes.find(attribute => attribute.name === name); if (found) { found.value = value; } else { this.attributes.push({name, value}); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = +...
[ "0.6932361", "0.6932361", "0.6932361", "0.6932361", "0.6932361", "0.6932361", "0.6932361", "0.6932361", "0.6932361", "0.69204175", "0.68573785", "0.6854312", "0.68436515", "0.68436515", "0.68436515", "0.68436515", "0.68436515", "0.68436515", "0.68436515", "0.6652402", "0.6652...
0.75098515
0
Dwar owl carousel by ID Chayan
function makeOwlcarouselById(id) { var ts = $("#" + id) ts.owlCarousel({ autoplay: false, //autoplayTimeout:1000, //autoplaySpeed:700, loop: true, nav: true, dots: true, //animateOut: 'fadeOut', items: 1, navText: [ '<img src="a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initOwl(){ \n var owls = ['trending', 'jk', 'india', 'international'];\n $.each(owls, function(i, v){\n $(\"#\" + v).owlCarousel({\n autoPlay: false,\n pagination: false,\n lazyLoad : true,\n items: 4,\n autoHeight: true,\n stopOnHover: true,\n });...
[ "0.6559295", "0.6537994", "0.6379854", "0.637475", "0.63485885", "0.6320018", "0.63095766", "0.63047266", "0.6188075", "0.6177506", "0.6172342", "0.61648196", "0.6147855", "0.6128071", "0.6124939", "0.6076807", "0.6064248", "0.6052537", "0.60169846", "0.6004673", "0.5965418",...
0.73859596
0
setting up enemies and loop once component mounts
componentDidMount() { this.context.loop.subscribe(this.update); this.interval = setInterval(function () { generateEnemy() }, 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleEnemies() {\n this.checkEnemySpawn()\n this.moveEnemies()\n }", "function initEnemies() {\n var i, maxSpeed = 2 + (0.07 * level);\n for (i = 0; i < 3; i++) {\n var enemy = new Enemy();\n enemy.reset();\n allEnemies.push(enemy);\n }\n ...
[ "0.70730364", "0.67479455", "0.6722318", "0.6664828", "0.66179436", "0.65498513", "0.65324515", "0.6520484", "0.64712244", "0.6446074", "0.64354086", "0.64324886", "0.6423326", "0.6386062", "0.635075", "0.63340765", "0.6326935", "0.6324929", "0.6316492", "0.6307901", "0.63058...
0.7178719
0
Watch my signaling object. Returns promise
function watchSignaling() { var d = $q.defer(); signalingArr.$watch(function(e) { //if child added handle message in added record if(e.event === 'child_added'){ var fromId = e.key; // get array of messages coming from peer var fromMessageArr = $firebase(ref.chil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "watch() {\n }", "get isWatching(){ return this._isWatching }", "watch() {\n this._createDelayedRequest(0);\n }", "function analogueWatch(){\n \n\n \n}", "get signal() {\n return this._signal;\n }", "get signal() {\n return this._signal;\n }", "get signal() {\n ...
[ "0.6320026", "0.6191276", "0.61662865", "0.59492636", "0.5822303", "0.5822303", "0.5822303", "0.5822303", "0.5816058", "0.5746926", "0.568041", "0.56402504", "0.562322", "0.5508673", "0.5475394", "0.5473844", "0.5458893", "0.5458893", "0.54538536", "0.54465145", "0.54465145",...
0.6490843
0
Watch the peers object returns promise
function watchPeers() { var d = $q.defer(); peersArr.$watch(function (ref) { if(ref.event === 'child_added' && ref.key !== myId){ console.log('Peer Joined: ', peersArr.$getRecord(ref.key).$value); makeOffer(ref.key); }else { console.log('event: ', ref); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async syncPeers() {\n let curPeers = await this.worker.getPeers();\n let { peers } = this.store.getState().blockchain;\n\n if (peersChanged(peers, curPeers)) {\n this.store.dispatch(setPeers(curPeers));\n }\n }", "startMonitoring () {\n if (this.monitoringSetInterval) return\n\n this.moni...
[ "0.66405326", "0.6378597", "0.6376189", "0.62260747", "0.6137405", "0.6137405", "0.6093408", "0.5946549", "0.5859425", "0.57961464", "0.5716169", "0.57142603", "0.5682525", "0.5655683", "0.56521934", "0.5644228", "0.5588594", "0.55829716", "0.555205", "0.55383676", "0.5518395...
0.83649766
0
Add myself to peers list returns promise
function addToPeersList() { if(peersArr.length < 1){ role = 'hub'; return peers.$set(myId, {username: username, role: role}); } else { role = 'spoke'; return peers.$set(myId, {username: username, role: role}); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add (pid) {\n console.log('called add');\n // check if we already have this item\n var haveIt = peers.has(pid)\n console.warn('we have this peer:', pid, haveIt);\n if(!haveIt) {\n // add new peer\n peers.set(pid, {status:'new'});\n queue.push(pid);\n }\n}", "function watchPeers() {\n ...
[ "0.6679985", "0.65122", "0.6420999", "0.6388071", "0.63636214", "0.6254331", "0.61127937", "0.605187", "0.6027108", "0.6016369", "0.6001477", "0.591961", "0.569449", "0.564345", "0.5616844", "0.55270773", "0.54917526", "0.54917526", "0.5489738", "0.543635", "0.54254913", "0...
0.7508679
0
min ///////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Write a function min that takes two arguments and returns their minimum. params: arg1, arg2 return the least of the two arguments using math.min
function min(arg1, arg2) { return Math.min(arg1,arg2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function min(one, two){\n return Math.min(one, two);\n}", "function min(num1, num2){\n return Math.min(num1, num2);\n}", "function min(num1, num2) {\n return Math.min(num1, num2);\n}", "function min (a, b) {\n return Math.min(a, b);\n}", "function min(num1, num2) {\n\treturn Math.min(num1, num2);\n}...
[ "0.8449258", "0.8352221", "0.8326504", "0.83041847", "0.8292863", "0.8269465", "0.82617635", "0.8163147", "0.8045932", "0.8034541", "0.80243737", "0.8010336", "0.80098075", "0.79977274", "0.7996251", "0.7996251", "0.7996251", "0.7993808", "0.7984218", "0.79781234", "0.7970873...
0.9101293
0
First plus length Given an array, return the sum of the first value in the array, plus the array's length. What happens if the array's first value is not a number. but a string like "what?" o bolean like false
function firtPlusLength(arr) { var sum = 0 if(typeof(arr[0]) === "number"){ sum = arr[0] + arr.length; return sum; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstPlusLength(arr){\n var sum = arr[0] + arr[arr.length-1];\n return (sum);\n}", "function sum(arr) {\n if (arr.length === 0) {\n return 0;\n }\n\n return arr[0] + sum(arr.slice(1));\n}", "function sum(arr){\n if(arr.length==0)\n return 0\n else \n return arr[arr.length-1]+su...
[ "0.7977022", "0.70648634", "0.6852369", "0.67331165", "0.67083156", "0.6706628", "0.66949713", "0.6672807", "0.66710794", "0.6667983", "0.66468775", "0.66221756", "0.6605951", "0.6587539", "0.6586991", "0.6577908", "0.6530131", "0.6527031", "0.65130126", "0.65125", "0.649501"...
0.8030793
0
Values Greater than second For[1,3,5,6,9,17], print values that are greater than its 2nd value. Return how many values this is
function valueGreaterThanSecond(arr) { var secondValue = arr[1]; var count = 0; for(var i = 0); i < arr.length; i ++){ if(arr[i] > secondValue){ console.log(arr[i]); count ++; } } return count }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greaterThanSecond(){\n\tvar gtsArray = [1,3,5,7,9,13];\n\tvar num = 0;\n\tvar count = 0;\n\n\twhile (num <= gtsArray.length){\n\t\tif (gtsArray[num] > gtsArray[1]){\n\t\t\tconsole.log(gtsArray[num]);\n\t\t\tcount++;\n\t\t\tnum++;\n\t\t}\n\n\t\telse{\n\t\t\tnum++;\n\t\t}\n\t}\n\tconsole.log(\"Number of val...
[ "0.80338967", "0.792675", "0.7733407", "0.77188563", "0.76742935", "0.7662511", "0.76616204", "0.76129514", "0.7565698", "0.7545635", "0.7220287", "0.68237126", "0.67864484", "0.67439646", "0.66830957", "0.6545852", "0.6509318", "0.64621204", "0.641929", "0.6416038", "0.64072...
0.8176314
0
Values Greater than second, Generalized Write a function that accepts any array, and return a new array with the array values that are greater than its 2nd value. Print how many values this is. What will you do if the array is only one element long?
function valueGreaterThanSecondGeneralized(){ var result = [] var secondValue = arr[1] if(arr.length < 1){ return null; } for(var i = 0); i < arr.length; i ++){ if(arr[i] > secondValue){ console.log(arr[i]); count ++; } } console.log(count); return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greaterThanSecond(){\n\tvar gtsArray = [1,3,5,7,9,13];\n\tvar num = 0;\n\tvar count = 0;\n\n\twhile (num <= gtsArray.length){\n\t\tif (gtsArray[num] > gtsArray[1]){\n\t\t\tconsole.log(gtsArray[num]);\n\t\t\tcount++;\n\t\t\tnum++;\n\t\t}\n\n\t\telse{\n\t\t\tnum++;\n\t\t}\n\t}\n\tconsole.log(\"Number of val...
[ "0.7723632", "0.77215016", "0.76464987", "0.7592246", "0.75032794", "0.74521536", "0.74032164", "0.73817337", "0.7376954", "0.73532677", "0.7348219", "0.7276766", "0.72393954", "0.7187956", "0.71776175", "0.7156687", "0.71446484", "0.7140427", "0.67968744", "0.67790914", "0.6...
0.80280244
0
This Length, That Values Given two numbers, return array of length num1 with each value num2. Print "Jinx" if they are the same
function thisLength(num1, num2) { if(num1 === num2){ console.log( "Jinx"); } var arr = []; for(var i = num1; i >= 0; i--){ arr.push(num2); } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thisLength(num1, num2) {\n var arr = []\n for (i = 0; i < num1; i++) {\n arr.push(num2)\n } if (num1 === num2){\n return \"Jinx\";\n }\n return arr\n}", "function thisLengthThatValue(num1, num2)\n{\nvar arr1= []\nfor(var i=0; i<num1; i++)\n{\n arr1.push(num2)\n }\n if(num...
[ "0.8282252", "0.81666726", "0.8121901", "0.78600407", "0.7664533", "0.7618827", "0.7581766", "0.71374565", "0.68039685", "0.67360073", "0.6674686", "0.6424707", "0.6346053", "0.6251569", "0.61893076", "0.6133995", "0.6115384", "0.6090489", "0.6043271", "0.6029449", "0.6006647...
0.820655
1
optionTeamFiller fills in the select box with options of each NHL team for users to select.
optionTeamFiller(nhlTeam) { return ( <option value={nhlTeam}>{nhlTeam}</option> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderSelect(teams) {\n const select = document.createElement('select')\n select.addEventListener(\"change\", () => {\n getTeamData(select.value)\n })\n\n //The dummy name for the dropdown using an id out of range.\n\n const selectTeam = [{ name: 'Select a Team', id: 222 }, ...teams]\n \n //popu...
[ "0.66980845", "0.6662204", "0.6394056", "0.6326724", "0.62274915", "0.62129796", "0.61977375", "0.61608946", "0.5962248", "0.5936834", "0.5931702", "0.5886382", "0.5823537", "0.5807353", "0.5796431", "0.5764903", "0.57477266", "0.5729598", "0.5714375", "0.56826246", "0.568114...
0.7911977
0
RowParser parses DataRow buffers into objects and arrays.
constructor(buf, off=0) { // Create a new RowParser from a DataRow message buffer. this.buf = buf; this.off = off; this.columns = []; this.columnNames = []; // Set up parsing state. const columnCount = r16(buf, off+5); off += 7; // Read in the array of column descriptions. for (let i = 0; i < co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "parseData(data) {\n // Taken from https://gist.github.com/Jezternz/c8e9fafc2c114e079829974e3764db75\n const re = /(,|\\r?\\n|\\r|^)(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|([^,\\r\\n]*))/gi;\n const result = [[]];\n let matches;\n\n while ((matches = re.exec(data))) {\n if (matches[1].length && matches[1...
[ "0.6253608", "0.6235961", "0.6235961", "0.6235961", "0.6235961", "0.6185618", "0.6185618", "0.6185618", "0.6185618", "0.6184335", "0.6113916", "0.60846883", "0.6043474", "0.58531505", "0.572435", "0.56271964", "0.5606452", "0.55728656", "0.55548555", "0.5512242", "0.55118", ...
0.7451022
0
Given a string, compute recursively (no loops) a new string where all the lowercase 'x' chars have been changed to 'y' chars.
function changeXY(str){ let s = str.indexOf("x"); if (s == -1) return str; if (s == 0) return changeXY("y"+str.substring(1)); else if (s == str.length-1) return changeXY(str.substring(0, str.length-1)+"y"); else{ return changeXY(str.substring(0, s)+"y"+str.substring(s +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchX(string) {\n if (string === '') {\n return ''\n } else if (string.substr(0, 1) === 'x') {\n return ('y' + switchX(string.substr(1)));\n } else {\n return string.substr(0, 1) + switchX(string.substr(1))\n }\n}", "function LetterChanges(str) {\r\n let strArr = str.toLowerCase().split(...
[ "0.64934", "0.6402788", "0.63090956", "0.62337476", "0.6207709", "0.6184649", "0.6160992", "0.6129788", "0.6118349", "0.6062047", "0.6051918", "0.6040605", "0.6036677", "0.60312355", "0.5987081", "0.5981191", "0.5974631", "0.59589636", "0.59454745", "0.59348387", "0.59082514"...
0.6722449
0
Toggle selection of a token in the token list
function toggle_select_token(token) { var previous_selected_token = selected_token; if(selected_token) { deselect_token($(selected_token), POSITION.END); } if(previous_selected_token === token.get(0)) { deselect_token(token, POSITION.END); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggle() {\n this.selected = !this.selected;\n }", "toggle() {\n this.selected = !this.selected;\n }", "function select_token (token) {\n token.addClass(settings.classes.selectedToken);\n selected_token = token.get(0);\n\n // Hide input box\n input_box.val(\"\");...
[ "0.69126725", "0.69126725", "0.6896116", "0.6896116", "0.6885964", "0.6885964", "0.6885964", "0.6723048", "0.66042906", "0.66042906", "0.66042906", "0.6555319", "0.6555319", "0.65408415", "0.63466185", "0.62246066", "0.62204033", "0.6150972", "0.6137664", "0.61175483", "0.596...
0.8750482
0
Delete a token from the token list
function delete_token (token) { // Remove the id from the saved list var token_data = $.data(token.get(0), "tokeninput"); var callback = $(input).data("settings").onDelete; var index = token.prevAll().length; if(index > selected_token_index) index--; // Delete the token...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_token (token) {\n // Remove the id from the saved list\n var token_data = $.data(token.get(0), \"tokeninput\");\n var callback = settings.onDelete;\n\n var index = token.prevAll().length;\n if(index > selected_token_index) index--;\n\n // Delete the token\n...
[ "0.8053743", "0.7985843", "0.7903599", "0.78384614", "0.76120734", "0.71796006", "0.6860964", "0.6859272", "0.6686944", "0.6664186", "0.6549724", "0.65361494", "0.6522463", "0.64587635", "0.63496196", "0.63455594", "0.6317005", "0.6314252", "0.6272635", "0.6262404", "0.624098...
0.80124986
1
Hide and clear the results dropdown
function hide_dropdown () { dropdown.hide().empty(); selected_dropdown_item = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function salir_search(){\n\t\tdocument.getElementById('resultado').innerHTML='';\n\t\tdocument.getElementById('resultado').style.display='none';\n}", "function resetDisplay() {\n\n $(\"#display-results\").empty();\n\n}", "function hideShowRelatedParts() {\n selectElement.style.display = \"\";\n searchBar....
[ "0.7181717", "0.7180138", "0.70514566", "0.70296746", "0.6951834", "0.6804274", "0.68039197", "0.67972374", "0.6789296", "0.6781219", "0.6741893", "0.6728532", "0.6719783", "0.67171717", "0.6716586", "0.6710703", "0.67015064", "0.66623926", "0.666053", "0.6654084", "0.6644516...
0.73455644
0
Do a search and show the "searching" dropdown if the input is longer than $(input).data("settings").minChars
function do_search() { var query = input_box.val(); if(query && query.length) { if(selected_token) { deselect_token($(selected_token), POSITION.AFTER); } if(query.length >= $(input).data("settings").minChars) { show_dropdown_searching...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function suggest() { \n\tvar min_length = 0; \n\tvar data = $('#search_item').val();\n\tif (data.length > min_length) {\n\t\t$.ajax({\n\t\t\turl: 'search.php',\n\t\t\ttype: 'POST',\n\t\t\tdata: {data:data},\n\t\t\tsuccess:function(data)\n {\n $('#search_list').h...
[ "0.7312231", "0.7141937", "0.7141937", "0.6339325", "0.58634394", "0.5835298", "0.5735936", "0.5735936", "0.57313955", "0.56972975", "0.5691348", "0.5681856", "0.56791556", "0.5676564", "0.5671959", "0.56596696", "0.56592655", "0.56580377", "0.5602192", "0.5593396", "0.558743...
0.72252315
1
Bring browser focus to the specified object. Use of setTimeout is to get around an IE bug. (See, e.g., obj: a jQuery object to focus()
function focus_with_timeout(obj) { setTimeout(function() { obj.focus(); }, 50); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusit(obj) {\n return setTimeout(function() {\n obj.focus();\n //console.log('Focus transferred to:', obj);\n }, 10);\n }", "function SetFocus(obj) {\r\n if (obj) {\r\n // SIR 19132 - if field is invisible call expand all first then focus\r\n try {\r\n obj.focus();\r\n...
[ "0.8556256", "0.738074", "0.7217214", "0.6711863", "0.6653254", "0.6653254", "0.66524345", "0.6616686", "0.6612766", "0.6599376", "0.6510558", "0.64990526", "0.64990526", "0.6495723", "0.6495723", "0.64866114", "0.6432287", "0.64092356", "0.6367555", "0.6336164", "0.6267266",...
0.8454483
1
declare 2 variables one for guests and one for donuts use prompt method to bring up a dialog box in the browser for the user to insert the number of guests and donuts.
function DonutCounter(){ var guests= parseInt(prompt("How many guests?")); var donuts= parseInt(prompt("How many donuts?")); if(guests <= donuts){ donutsPerGuests= Math.floor(donuts/guests); alert(`There are ${donutsPerGuests} donut(s) for each guest`); } else { alert("There aren't enough donuts per guest");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myFortune() {\n var children = prompt('How many Kids do you like to have?')\n var partername = prompt('with whoom would you like to marry?')\n var geolocation = prompt('where would you like to live?')\n var jobtitle = prompt('in what positin woild you like to work?') \n alert('you will hav...
[ "0.6899933", "0.6671885", "0.65247786", "0.6489253", "0.64313704", "0.638488", "0.6366004", "0.6272302", "0.6266681", "0.6262969", "0.6257658", "0.62284553", "0.6213477", "0.62062174", "0.62008244", "0.6159608", "0.61554444", "0.61181325", "0.6108451", "0.60925424", "0.608398...
0.7135155
0
Handle logics for when the view leaderboard button is clicked
function handleViewLeaderboard() { updateLeaderboard(); // hide the form document.querySelector(".form-container").style.display = "none"; // show the leaderboard document.querySelector(".leaderboard-container").style.display = "block"; // add click event listener for going back to the game document ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleChangeOfView() {\n if (section.buttonDisplay === RULES) {\n section.buttonDisplay = RANK;\n replaceContent(\n scoreTable,\n gameWrapper,\n modeRules,\n buttonsWrapper,\n buttonRulesRanking,\n 'id-badge',\n );\n } else {\n section.bu...
[ "0.64395875", "0.6249851", "0.6224972", "0.61244583", "0.61138", "0.59843826", "0.5963994", "0.59634", "0.59499353", "0.5945517", "0.5884172", "0.5875085", "0.5862842", "0.5802338", "0.57849044", "0.5779563", "0.57478654", "0.5747708", "0.574759", "0.57432246", "0.57425106", ...
0.75875473
0
get room chat information code start here
function chatInfo(room_name,CallBackFunction){ var getDbConnection=BD(); getDbConnection.query("select * from message_contact where room_id='"+room_name+"'",function(index,rows){ CallBackFunction(rows); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRoom(){\n\tvar chatName = document.getElementById(\"chatName\");\n\tif(!chatName)\n\t\treturn null;\n\treturn chatName.innerText;\n}", "SOCKET_GET_ROOM_INFO(state, message) {\n // eslint-disable-next-line\n console.log(\"%c socket_get_room_info\", \"color:green\");\n state.room = message;\n ...
[ "0.70237625", "0.7021525", "0.69915205", "0.68358564", "0.6694893", "0.6680704", "0.6677898", "0.6676198", "0.6629118", "0.6550383", "0.65401506", "0.65101904", "0.6507405", "0.6481379", "0.64029497", "0.6378536", "0.6358517", "0.63514197", "0.6335095", "0.6331596", "0.630931...
0.73042035
0
When the network changes, reload data from the blockchain
function onNetworkChanged(id) { if (id == chainId) return; chainId.current = id; web3Provider.current = getWeb3Provider(id); setContractAddresses(id); // setBlockchainSwitchState(usingBinance(id)); updateGenericBlockchainData(); if (ref(account)) updat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static reload() {\n for(let connection of LiveReload._connections) {\n connection.write(\"data: reload\\n\\n\");\n LiveReload._connections.slice(LiveReload._connections.indexOf(connection), 1);\n }\n }", "reload() {\n\t\tthis.clearNetwork();\n\t\tthis.render();\n\t}", "fu...
[ "0.6188579", "0.61261255", "0.6101301", "0.5969676", "0.59601086", "0.5910541", "0.58937454", "0.5865181", "0.58640033", "0.57902014", "0.57532716", "0.57347775", "0.57248414", "0.5713169", "0.57131374", "0.5711974", "0.5708531", "0.56776834", "0.56673074", "0.5661544", "0.56...
0.6844363
0
Creates an ethers.js provider for the given network ID
function getWeb3Provider(id = ref(chainId)) { //BSC Mainnet if (id == 56) return new ethers.providers.JsonRpcProvider("https://bsc-dataseed.binance.org"); //BSC Testnet if (id == 97) return new ethers.providers.JsonRpcProvider("https://data-seed-prebsc-1-s1.binance.org:8545"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEthProvider () {\n let ethProvider;\n\n return new Promise(resolve => {\n function instantiateWithoutWallet () {\n console.debug('[kredits] Creating new instance from npm module class');\n console.debug(`[kredits] providerURL: ${config.web3ProviderUrl}`);\n ethProvider = new ethe...
[ "0.5891273", "0.55418146", "0.5378567", "0.5374506", "0.53192115", "0.52533984", "0.5251974", "0.523953", "0.5152228", "0.51205117", "0.5117007", "0.50904167", "0.5073718", "0.50418216", "0.4966517", "0.49616715", "0.49382785", "0.49031112", "0.49022943", "0.48961717", "0.485...
0.6319289
0
When the account changes, reload data from the blockchain
function onAccountChanged(acc) { account.current = acc; forceUpdate(); updateUserSpecificBlockchainData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onAccountChanged() {\n loadBankOperations().then(function () {\n updateChart();\n });\n }", "async function refreshAccountData() {\n\n // If any current data is displayed when\n // the user is switching acounts in the wallet\n // immediate hide this data\n document.querySelector(...
[ "0.72093993", "0.7039775", "0.7039775", "0.70232093", "0.7016047", "0.70130414", "0.6963249", "0.68082404", "0.65095884", "0.6203567", "0.6196973", "0.6185396", "0.61729264", "0.61687845", "0.614749", "0.61371714", "0.6135368", "0.6099675", "0.6091408", "0.60896516", "0.60823...
0.75416106
0
find sub layout by name
function _findLayout(article, name, parent, detail) { if (!article) return null; article = _scanObj(article, function(o) { if (o.$bind === name) { // if (parent) return o; // cards var cards = _cardsLayout(o, detail); return cards; } return null; }); return article; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLayout(collection, name) {\n if (!name) return;\n if (collection instanceof Map) {\n for (const [key, view] of collection) {\n if (name === key) {\n return view;\n }\n if (!view.path) continue;\n if (!view.hasPath) {\n return getView(collection, name);\n }\n ...
[ "0.593009", "0.54051906", "0.53943247", "0.5380044", "0.5366485", "0.5315244", "0.5306944", "0.520254", "0.5154396", "0.50960356", "0.5027221", "0.5018269", "0.49636528", "0.495207", "0.4946525", "0.4874463", "0.4858093", "0.48566952", "0.483944", "0.48149914", "0.48069343", ...
0.6666476
0
scan check and correct $article (layout of lists)
function _checkListArticle(proto, article, info) { if (!info.list) return article; // check if exists an image property var imageProp = null; Object.keys(proto.$properties).forEach(function(pn) { var p = proto.$properties[pn]; if (!imageProp && (p.$type === "image")) { imageProp = pn; } }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _filterItem(article, list) {\n\t\tvar styles = {};\n\t\t$helpers.propagateMobileExt(styles, article);\n\t\tarticle = _scanObj(article, function(o) {\n\t\t\tif (o.$bind === \"$resources\") {\n\t\t\t\t// only for $query || $facet\n\t\t\t\tvar cards = _cardsLayout(o, true);\n\t\t\t\t$helpers.propagateMobileE...
[ "0.64288986", "0.602033", "0.5899035", "0.57275575", "0.5484439", "0.54554796", "0.54211265", "0.53966916", "0.5384404", "0.53690493", "0.5366481", "0.5302637", "0.5275788", "0.52583027", "0.5252757", "0.5236186", "0.5235688", "0.5212464", "0.5192609", "0.51915514", "0.518558...
0.6555231
0
Updates value and state arrays to match current item count.
function updateValuesAndStates() { [values, states] = generateDefaultStateArray(getItemCount()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateItemCount(){\n itemCountSpan.innerHTML = count;\n}", "function addItemsToFullState (newItems, fullStateItems, indexer) {\n newItems.forEach((item) => {\n if (!item) {\n //check for null\n } else if (indexer[item.id] || indexer[item.id] === 0) {\n //we've added this item id alread...
[ "0.6248879", "0.62397325", "0.61464155", "0.61457896", "0.6118615", "0.6072587", "0.604411", "0.6017322", "0.60068876", "0.60048115", "0.5971728", "0.59656787", "0.59604865", "0.5934331", "0.5931003", "0.5901618", "0.5900733", "0.5896069", "0.58951336", "0.58432806", "0.58129...
0.71129155
0
calculate overview: sum, min, max
function calculateOverview(value, overviewer, summatoryName) { if (value < overviewer.min) overviewer.min = value; if (value > overviewer.max) overviewer.max = value; summatory[`${summatoryName}`] += value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateStatistics() {\n let saleCount = 0;\n let amount = 0;\n let average = 0;\n let max = undefined;\n let min = undefined;\n let upperBound = 0;\n let lowerBound = 0;\n\n //Se calcula max, min y amount\n this.sales.forEach((sale) => {\n saleCount++;\n amount += sale.amount...
[ "0.6891387", "0.6458528", "0.6407958", "0.6354061", "0.62155604", "0.6156939", "0.60867715", "0.60732436", "0.6062219", "0.6061142", "0.60199356", "0.59982157", "0.59801245", "0.59777814", "0.5957454", "0.5923872", "0.59200156", "0.58719575", "0.584705", "0.58360046", "0.5823...
0.74198496
0
This creates a listener around the trackRequest method, so it can be called from within a callback. A boundfunction is created by this.
getTrackRequestListener() { return this.trackRequest.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TracingListener() {\n // array for incoming data.\n // onStopRequest we combine these to get the full source\n this.receivedChunks = [];\n this.responseBody;\n this.responseStatusCode;\n\n this.deferredDone = {\n promise: null,\n resolve: null,\n reject: null\n };\n this.deferredDone.prom...
[ "0.63851553", "0.6131435", "0.6107593", "0.6074388", "0.5894753", "0.5828253", "0.57840884", "0.57078665", "0.5704722", "0.56023264", "0.5599452", "0.559434", "0.5577763", "0.5577763", "0.55692846", "0.5512044", "0.5512044", "0.5471228", "0.5471228", "0.5471228", "0.54640615"...
0.7814112
0
A SVG pie chart generator.
createPie (element, slices) { element.setAttributeNS (null, "viewBox", "-1 -1 2 2"); let cumulativePercent = 0; let getCoordinatesForPercent = (percent) => { const x = Math.cos(2 * Math.PI * percent); const y = Math.sin(2 * Math.PI * percent); return [x, y]; }; slices.forEach(sli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawPie(alpha){\n var xo = 20;\n var yo = 20;\n var cote = 400;\n var rayon = 180;\n /*alpha = 4.0;*/\n var path = camenbertPath(xo, yo, cote, rayon, alpha);\n/* svg = \"<svg width=\\\"\"+ (xo+cote) +\"\\\" height=\\\"\"+ (yo+cote) +\"\\\">;*/\n var svg = \"<svg width=\\\"\"+ 420 +\"\\\" height=\\...
[ "0.6996864", "0.6827191", "0.65336883", "0.6516286", "0.6492166", "0.64905745", "0.6457609", "0.64051193", "0.6404002", "0.6362596", "0.6362596", "0.6362596", "0.6362596", "0.6362596", "0.6362596", "0.63442165", "0.63394475", "0.63288635", "0.6313047", "0.6304179", "0.627991"...
0.7023438
0
Get a form and normalize fields id and names to match the current position
function normalizeFieldsForForm(form, index) { form.find(formFields).each(function(){ var that = $(this); if(typeof that != 'function'){ var idTemplateAttr = that.attr("id") ,nameTemplateAttr = that.attr("name") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFormHandleForm(seq)\n{\nvar name = 'iiiFormHandle_' + seq;\nvar obj = getObj(name);\nreturn obj.form;\n}", "getById(id) {\r\n const i = new Form(this);\r\n i.concat(`('${id}')`);\r\n return i;\r\n }", "getIndexForm(id) {\n return this.state.formFields.findIndex(e => e.i...
[ "0.6615323", "0.64581716", "0.63063985", "0.62911224", "0.6251812", "0.6183737", "0.6139189", "0.6119521", "0.60690325", "0.6033465", "0.6033154", "0.6033154", "0.6033154", "0.6020802", "0.6013901", "0.5968875", "0.59642386", "0.594533", "0.5923837", "0.5917939", "0.59177035"...
0.7102959
0
Extends source object with many useful methods, used to control sheepIt forms with javascript
function extendSource(source) { // API $.extend( source, { /* ----- Options ----- */ getOptions: function() { return getOptions(); }, getOption: function(option) { return options[optio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extendSource(source)\n {\n // API\n $.extend( source, {\n /* ------Custom--------*/\n disable: function(){\n disable();\n },\n enable: function(){\n enable();\n },\...
[ "0.6685528", "0.6175825", "0.5778056", "0.5774201", "0.57625", "0.559172", "0.5533725", "0.5515363", "0.55001414", "0.5495209", "0.5495209", "0.5467744", "0.54579306", "0.54576063", "0.54576063", "0.54576063", "0.5456459", "0.5454913", "0.5443358", "0.54092026", "0.53754705",...
0.69032186
0
Handle click on addNForm button
function clickOnAddN(event) { event.stopPropagation(); event.preventDefault(); if (addNInput.value !== '') { addNForms(addNInput.attr('value')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "click(){\n\t\t\t\tcreateAddWindow();\n\t\t\t}", "onAddClicked() {\n console.log('clicked');\n }", "setUpAddForm() {\n ADD.addEventListener('click', (e) => {\n e.preventDefault();\n this.addForm();\n });\n }", "clickAdd(e) {\n this.toggleCircle(e.currentTarget...
[ "0.745874", "0.7244504", "0.7186231", "0.7120801", "0.6920486", "0.69083065", "0.6907147", "0.6882531", "0.68223286", "0.6804145", "0.6774763", "0.67188716", "0.6696502", "0.66502416", "0.6642503", "0.6592243", "0.6582169", "0.6568695", "0.6561044", "0.65530205", "0.6552861",...
0.735015
1
Handle click on Remove last control
function clickOnRemoveLast(event) { event.stopPropagation(); event.preventDefault(); if (options.removeLastConfirmation) { if ( confirm(options.removeLastConfirmationMsg) ) { removeLastForm(); } } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_control(elem) {\n $(elem).parent('.control-group').remove();\n}", "function deleteMe(event) {\n\tdocument.getElementById(\"controls\").removeChild(event.target.parentNode.parentNode);\n}", "function removeButton(){\n $(\"#car-view\").empty();\n var topic = $(this).attr('data-name')...
[ "0.67547166", "0.669139", "0.66540277", "0.66399103", "0.6622683", "0.6616269", "0.6609833", "0.6567322", "0.65024364", "0.64220124", "0.6360894", "0.635319", "0.6306648", "0.6295237", "0.62832123", "0.6274862", "0.6270434", "0.6254896", "0.6251584", "0.6245487", "0.6240576",...
0.6912618
0
Normalize all (Controls, Forms)
function normalizeAll() { normalizeForms(); normalizeControls(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataNormalize(){\n var name,key,\n item,\n itemKeys;\n\n for( name in data.insertItems ){\n item = data.insertItems[name];\n itemKeys = item.keys;\n\n item.useCtrlKey = $.inArray('CTRL',itemKeys) < 0 ? false : true;\n item.use...
[ "0.6064604", "0.5942553", "0.5884935", "0.58385354", "0.5599531", "0.5591687", "0.55424196", "0.55365187", "0.5520283", "0.5520283", "0.5520283", "0.5506971", "0.54773426", "0.5421205", "0.54068375", "0.5402444", "0.5349728", "0.5340313", "0.52883416", "0.5285443", "0.5275652...
0.8410315
0
Get the current form based on the interal pointer
function getCurrentForm() { if ( current() !== false) { return forms[current()]; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Form_GetFocusedForm()\n{\n\t//last found valid form\n\tvar lastValidForm = null;\n\t//loop through all the children of display panel\n\tfor (var child = __SIMULATOR.Interpreter.DisplayPanel.firstChild; child; child = child.nextSibling)\n\t{\n\t\t//interested in this?\n\t\tif (child.InterpreterObject)\n\t\...
[ "0.73150396", "0.6601301", "0.6601301", "0.6601301", "0.651026", "0.6486006", "0.6397554", "0.6260426", "0.6174772", "0.60882634", "0.60751665", "0.60678387", "0.59257525", "0.58797914", "0.58673847", "0.58057696", "0.57698035", "0.57192314", "0.5701884", "0.5689707", "0.5663...
0.74364376
0
Checks if can remove any form
function canRemoveForm() { return (getFormsCount() > options.minFormsCount) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkFormIntegrityUser() { //dont delete function declaretion\n\n return true;\n}", "setUpRemoveForm() {\n REMOVE.addEventListener('click', (e) => {\n e.preventDefault();\n this.removeForm();\n });\n }", "function removeForm() {\n const form = document.quer...
[ "0.62742746", "0.62109995", "0.621044", "0.6088938", "0.6084897", "0.60248566", "0.59852344", "0.59730154", "0.5957415", "0.5952571", "0.58900714", "0.587922", "0.5878394", "0.58591336", "0.58535135", "0.58337194", "0.58253485", "0.5820256", "0.57958525", "0.5745003", "0.5728...
0.8283818
0
Extend passed control with new methods used by this plugin
function extendControl(control, allowControlOption , onClickFunction, onClickSubControl) { /** * onClickSubControl es utilizado cuando el control principal no es el que recibe el click */ if (typeof(onClickSubControl) == 'undefined') { onClickSub...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Control() {}", "function Control() {}", "function Control() {}", "function Control() {}", "static AddControl() {}", "function AbstractControlOptions() {}", "function AbstractControlOptions() {}", "function AbstractControlOptions() {}", "function AbstractControlOptions() { }", "function A...
[ "0.621157", "0.621157", "0.621157", "0.621157", "0.6012873", "0.5961085", "0.5961085", "0.5961085", "0.57320935", "0.57320935", "0.5684285", "0.5602634", "0.55865973", "0.5519673", "0.5497051", "0.5449244", "0.54198647", "0.5403448", "0.53440833", "0.53427976", "0.5327915", ...
0.6435214
0
Extends source object with many useful methods, used to control sheepIt forms with javascript
function extendSource(source) { // API $.extend( source, { /* ------Custom--------*/ disable: function(){ disable(); }, enable: function(){ enable(); }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extendSource(source)\n {\n // API\n $.extend( source, {\n /* ----- Options ----- */\n getOptions: function() {\n return getOptions();\n },\n getOption: function(option) {\n return...
[ "0.6904082", "0.61754644", "0.57782614", "0.5774517", "0.5761664", "0.55911326", "0.55333936", "0.55157244", "0.55008686", "0.5494981", "0.5494981", "0.54666406", "0.5457953", "0.54568404", "0.54568404", "0.54568404", "0.5455021", "0.5454881", "0.54432887", "0.54095656", "0.5...
0.6686183
1
Getting login URL / app.get("/auth/google/url",
async function GetLoginUrl(req, res) { return res.send(getGoogleAuthURL()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function googleLogin(req, res) {}", "function urlGoogle() {\n const auth = createConnection();\n const url = getConnectionUrl(auth);\n return url;\n}", "function goGoogle (req, res) {\n return passport.authenticate('google')(req, res)\n}", "function generateAuthUrl_() {\n var payload = {\n scop...
[ "0.72744495", "0.7210013", "0.7187906", "0.6985956", "0.69832623", "0.6914432", "0.67712814", "0.6702395", "0.65918034", "0.64851475", "0.6467686", "0.643927", "0.6405099", "0.6377041", "0.6310926", "0.63062376", "0.6300249", "0.6298386", "0.62880695", "0.6260975", "0.6259546...
0.80113465
0
get the access tokens for each user in the team that is registered
async getTokens () { this.tokens = this.members.reduce((tokens, user) => { const userAttrs = user.attributes || user; if (userAttrs.broadcasterToken) { tokens.push(userAttrs.broadcasterToken); } return tokens; }, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async getUsers (token) {\n const query = `*[_type == 'user'] {\n name,\n _id\n }\n `\n client.config({ token })\n return client.fetch(query)\n }", "async getTeamUsers () {\n\t\tthis.debug('\\tGetting users on team...');\n\t\tconst users = await this.data.users.getByQuery(\n\t\t\t...
[ "0.653528", "0.633706", "0.6304364", "0.6285085", "0.60968494", "0.6085005", "0.60469145", "0.60077333", "0.59876996", "0.5953377", "0.5945255", "0.5938818", "0.58727515", "0.5841865", "0.5834493", "0.58198714", "0.57367396", "0.5724627", "0.5723724", "0.57136774", "0.569632"...
0.65825576
0
grant (or revoke) permissions for each registered user to subscribe to the team channel
async grantTeamChannel () { if (this.tokens.length === 0) { return; } const channel = 'team-' + this.team.id; const func = this.revoke ? 'revoke' : 'grant'; try { await this.broadcaster[func]( this.tokens, channel, { //includePresence: true, request: this.request } ); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async grantUserMessagingPermissions () {\n\t\tconst granterOptions = {\n\t\t\tdata: this.data,\n\t\t\tbroadcaster: this.api.services.broadcaster,\n\t\t\tteam: this.model,\n\t\t\tmembers: [this.user],\n\t\t\trequest: this.request\n\t\t};\n\t\ttry {\n\t\t\tawait new TeamSubscriptionGranter(granterOptions).grantToMem...
[ "0.73335546", "0.72719675", "0.650131", "0.64200634", "0.6409855", "0.5915486", "0.5891578", "0.58070534", "0.57939214", "0.57634556", "0.57355803", "0.5715058", "0.5683614", "0.5606231", "0.55306256", "0.54912835", "0.5477514", "0.5443808", "0.5430642", "0.54113275", "0.5410...
0.7462514
0
Loads the list of Vision Boards for the authenticated user session. NOTE: Does not load the entire vision board object, only metadata necessary to display cards. NOTE: Clears the current state related to data when function is executed.
loadBoardData() { this.setState({ isLoaded: false, err: null, visionBoards: [] }); execFetch('/api/visionboard/boards', { method: 'GET' }) .then(res => res.json()) .then(res => this.setState({ visionBoards: res })) .catch(err => this.setState({ err: err.message })) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllBoards() {\n let res = await fetch('/boards', {credentials: 'include', headers: {'Content-Type': 'application/json'}})\n let v = await res.json()\n return v\n }", "getAllBoards() {\n var opts = {\n type: \"\",\n startAt: 0,\n maxResults:...
[ "0.6347283", "0.5993078", "0.5929826", "0.5902295", "0.585693", "0.5775531", "0.56540316", "0.56317604", "0.56128895", "0.5515171", "0.55006033", "0.5406699", "0.53888446", "0.53827673", "0.536624", "0.5351936", "0.53065675", "0.5288442", "0.5281095", "0.52707374", "0.5244992...
0.7021821
0
region save assessment success/fail/validation handlers
function onSaveAssessmentSucceeded(assessment) { alert({ title: 'Success', message: 'Assessment has been created successfully.', close: function () { page.set('assessment', assessment); } }); reset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSpec() {\n updateGeneralspe();\n if (!iserror && !iserrorOwnpanel && !iserrorGeneralSpec && !isSingleError) {\n document.forms['specForm'].action = '${pageContext.request.contextPath}/specification/Specification.action?saveandBack=';\n ...
[ "0.6780907", "0.6576635", "0.6440875", "0.6426187", "0.6418681", "0.637815", "0.63755506", "0.63318187", "0.6330184", "0.6313032", "0.6288133", "0.62770605", "0.6273863", "0.62712175", "0.62541103", "0.6230347", "0.6228628", "0.6215097", "0.6204402", "0.6192396", "0.61616856"...
0.7198447
0
endregion region rubric min/max scores
function setRubricMinScoreAgainstMax(max) { var min = viewModel.assessment.rubricMinScore; if (min > max) { viewModel.set('assessment.rubricMinScore', max); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iScore (min, max, value) {\n value = Math.min(max, value);\n value = Math.max(min, value);\n return round(1 + 9 * (max - value) / (max - min));\n}", "getAggregateScore(scores) {\n // this adds a weighted score to each score object\n var scoresMultiplied = scores.map((item) => {\n item.weig...
[ "0.6797977", "0.65059173", "0.64123166", "0.6362395", "0.6350452", "0.62516904", "0.62438357", "0.62211907", "0.61751175", "0.6169783", "0.61484265", "0.6104067", "0.6097295", "0.60918415", "0.6025391", "0.600282", "0.6000899", "0.59829915", "0.5977829", "0.5970391", "0.59589...
0.70566034
0
Load layout update from file
async loadLayout(layoutFilename) { (await this.logger).debug('LAYOUT.LOAD: ' + layoutFilename); try { let layoutData = await System.import(layoutFilename); layoutData = layoutData.default; await this.addLayout(layoutData); } catch(e) { (await this....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadLayout(layout, mode){\n\t\tfadeOutMask();\n\t\tif(mode == 'day'){\n\t\t\tsetDay();\n\t\t}\n\t\telse if(mode == 'night'){\n\t\t\tsetNight();\n\t\t}\n\t\tmode.light = mode\n\n\t\tfor(var i = 0; i < layout.length; i++){\n\t\t\tvar name = layout[i].tileName;\n\t\t\tvar new_tile = '<li id=\"' + name + '_wi...
[ "0.64062005", "0.60249275", "0.6017142", "0.57909817", "0.5720338", "0.56491774", "0.5606157", "0.5508958", "0.54607207", "0.5448092", "0.53574485", "0.53410393", "0.5283176", "0.5244866", "0.5226923", "0.5191566", "0.5190236", "0.5188764", "0.5152752", "0.5152067", "0.514058...
0.62232393
1
Register a view as call back to a hook $viewName should either be a string with a name of view, or an array in which first field is view name and the rest are view parameters.
async hookView(hookName, viewName, args = {}, params = {}) { //console.log(params); if (Array.isArray(viewName)) { let viewParams = viewName; viewName = viewParams.shift(); await this.addView(viewName, viewParams); } let view = this.view(viewName); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerView(method, path, viewName) {\n const override = cfg.viewOverrides[viewName];\n\n // Retrieve the correct and final handler,\n // if a override view was given, we call the override with the config.\n // Otherwise, we use the default view.\n let finalHandler = ov...
[ "0.6517517", "0.5870521", "0.57994926", "0.57994926", "0.5748405", "0.57235795", "0.56668437", "0.5372754", "0.5368416", "0.5331573", "0.5288595", "0.5180113", "0.51734906", "0.5029289", "0.5029289", "0.5029289", "0.5029289", "0.5029289", "0.5029289", "0.5017091", "0.5017091"...
0.742566
0
Unregister single or all views as call back to a hook viewNames string == ALL or boolean == true, or an array of view names to unregister.
async hookClear(hookName, viewNames) { let evtHlp = await Class.i('awy_core_model_events'); let util = await Class.i('awy_core_util_misc'); let eventName = 'Layout::hook:' + hookName; if (true === viewNames || 'ALL' === viewNames) { evtHlp.off(eventName, true); } else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "destroyAllViews() {\n const _views = this.cloneObject(this.views);\n this.views = [];\n _views\n .map(_viewId => {\n return HSystem.views[_viewId];\n })\n .forEach(_view => {\n if (this.isObject(_view) && this.isFunction(_view.die)) {\n _view.die();\n }\n ...
[ "0.5879905", "0.56894994", "0.5508926", "0.5508926", "0.5497777", "0.54105604", "0.5391851", "0.53682214", "0.53682214", "0.5363556", "0.5346659", "0.5309544", "0.5299486", "0.5239488", "0.5225129", "0.52113706", "0.5207722", "0.5202202", "0.5182616", "0.512299", "0.5113788",...
0.67969507
0
Get data from content page May be: airflow run data or log data
function getAirflowData() { // Get params let url = location.href; let params = getJsonFromUrl(); let data = { success: true }; if (url.match(/airflow\/log/)) { getLogData(data, params); } else { getRunData(data, params); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotContent(data){\r\n let page = data.query.pages; \r\n //console.log(page);\r\n let pageID = Object.keys(data.query.pages)[0];\r\n console.log(pageID);\r\n\r\n let content = page[pageID].revisions[0][\"*\"];\r\n startOfContentChar = \"'''\"\r\n star...
[ "0.66941226", "0.6369793", "0.6261265", "0.6143125", "0.5993984", "0.587535", "0.5715278", "0.56967723", "0.5675522", "0.5616707", "0.5605657", "0.55882734", "0.55658954", "0.5558413", "0.55118394", "0.54905057", "0.5478376", "0.5478376", "0.5454899", "0.5448715", "0.54338545...
0.69897336
0
The compressed public key. This will always begin with either the prefix ``0x02`` or ``0x03`` and be 68 characters long (the ``0x`` prefix and 33 hexadecimal nibbles)
get compressedPublicKey() { return SigningKey.computePublicKey(this.#privateKey, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getPublicKeyString () {\n return secUtil.bufferToHex(this.getPublicKey())\n }", "getPublicKey() {\n // returns hex\n return this.keyPair.getPublic().encode('hex')\n }", "function getPublicKeyEncoded(unencodedKey) {\r\n const publicKeyArray = new Uint8Array(u_1.hexstring2ab(unencodedKey)...
[ "0.6745739", "0.6687595", "0.66261643", "0.65856993", "0.6533986", "0.64728755", "0.63546604", "0.6289114", "0.6289114", "0.6289114", "0.6248129", "0.62450624", "0.624417", "0.624417", "0.624417", "0.624417", "0.624417", "0.62165457", "0.6167201", "0.612367", "0.612367", "0...
0.69461435
0
Return the signature of the signed %%digest%%.
sign(digest) { assertArgument(dataLength(digest) === 32, "invalid digest length", "digest", digest); const [sigDer, recid] = secp256k1.signSync(getBytesCopy(digest), getBytesCopy(this.#privateKey), { recovered: true, canonical: true }); const sig = secp256k1.Signa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSignatureDigest() {\n const buffer = new Serialize.SerialBuffer({\n textEncoder: this.textEncoder,\n textDecoder: this.textDecoder,\n });\n // protocol version + utf8 \"request\"\n buffer.pushArray([this.version, 0x72, 0x65, 0x71, 0x75, 0...
[ "0.6579476", "0.6065673", "0.6033341", "0.5865122", "0.5848686", "0.57768", "0.57669175", "0.57075095", "0.5706753", "0.5661246", "0.5634138", "0.5460591", "0.54409075", "0.5344294", "0.53308946", "0.5289724", "0.52726656", "0.52162653", "0.52101314", "0.5207066", "0.51616865...
0.75547177
0
Returns the [[linkwikiecdh]] shared secret between this private key and the %%other%% key. The %%other%% key may be any type of key, a raw public key, a compressed/uncompressed pubic key or aprivate key. Best practice is usually to use a cryptographic hash on the returned value before using it as a symetric secret.
computeSharedSecret(other) { const pubKey = SigningKey.computePublicKey(other); return hexlify(secp256k1.getSharedSecret(getBytesCopy(this.#privateKey), getBytes(pubKey))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatKdf (key, otherInfo) {\n const buffer = Buffer.concat([uint32BE(1), key, otherInfo])\n return crypto.createHash('sha256').update(buffer).digest()\n}", "_getSharedSecret() {\n // Once every ~256 attempts, we will get a key that starts with a `00` byte, which\n // can lead to problems initia...
[ "0.60809207", "0.602143", "0.5782654", "0.5773155", "0.54855466", "0.5424249", "0.54054004", "0.53523177", "0.5337325", "0.52494013", "0.5243646", "0.5232581", "0.5165071", "0.5128153", "0.5040868", "0.50377244", "0.5034131", "0.50268286", "0.5008092", "0.49994338", "0.497804...
0.85178185
0
Compute the public key for %%key%%, optionally %%compressed%%. The %%key%% may be any type of key, a raw public key, a compressed/uncompressed public key or private key.
static computePublicKey(key, compressed) { let bytes = getBytes(key, "key"); // private key if (bytes.length === 32) { const pubKey = secp256k1.getPublicKey(bytes, !!compressed); return hexlify(pubKey); } // raw public key; use uncompressed key with 0x04 p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get compressedPublicKey() { return SigningKey.computePublicKey(this.#privateKey, true); }", "function importPublicKey(key){\n return new Promise(function (resolve, rej) {\n crypto.importKey(\"raw\", converterWrapper.base64StringToArrayBuffer(key),\n {\n name: \...
[ "0.6609154", "0.6376886", "0.5911797", "0.5857496", "0.5721889", "0.56639266", "0.56108004", "0.56108004", "0.56108004", "0.5590525", "0.5590525", "0.5590525", "0.5590525", "0.5590525", "0.5570318", "0.55550987", "0.54772264", "0.54635906", "0.54635906", "0.54635906", "0.5463...
0.7813145
0
Returns the public key for the private key which produced the %%signature%% for the given %%digest%%.
static recoverPublicKey(digest, signature) { assertArgument(dataLength(digest) === 32, "invalid digest length", "digest", digest); const sig = Signature.from(signature); const der = secp256k1.Signature.fromCompact(getBytesCopy(concat([sig.r, sig.s]))).toDERRawBytes(); const pubKey = secp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sign(digest) {\n assertArgument(dataLength(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const [sigDer, recid] = secp256k1.signSync(getBytesCopy(digest), getBytesCopy(this.#privateKey), {\n recovered: true,\n canonical: true\n });\n const sig = ...
[ "0.66130936", "0.5953565", "0.5756693", "0.56735456", "0.5228989", "0.51807576", "0.5172962", "0.51613706", "0.513973", "0.5132874", "0.51305085", "0.51198465", "0.51072276", "0.50801617", "0.5077731", "0.5073052", "0.506183", "0.5043282", "0.5042965", "0.5027948", "0.5026904...
0.7186326
0
render rating as "A", "B" or "C" depending upon numeric value.
function rating(v) { if (v == 0) return "A" if (v == 1) return "B" if (v == 2) return "C" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rating(v) {\n if (v == 0) return \"A\"\n if (v == 1) return \"B\"\n if (v == 2) return \"C\"\n }", "function ratingToString(rating){\n if(rating==1)\n return \"Like!\";\n if(rating==0)\n return \"Not yet rated!\";\n return \"Dislike!\";...
[ "0.8206831", "0.7071086", "0.678831", "0.677432", "0.6699367", "0.6667807", "0.6646553", "0.6629607", "0.6440465", "0.6436549", "0.64183795", "0.6390122", "0.62745726", "0.6208583", "0.6140629", "0.6131981", "0.6094251", "0.60820746", "0.6071975", "0.6071975", "0.6071975", ...
0.8175744
1
pt is [x,y] and ring is [[x,y], [x,y],..]
function inRing(pt, ring) { var isInside = false; for (var i = 0, j = ring.length - 1; i < ring.length; j = i++) { var xi = ring[i][0], yi = ring[i][1]; var xj = ring[j][0], yj = ring[j][1]; var intersect = ((yi > pt[1]) !== (yj > pt[1])) && (pt[0] < (xj - xi) * (pt[1] - yi) / (y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inRing (pt, ring) {\n var isInside = false;\n for (var i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n var xi = ring[i][0], yi = ring[i][1];\n var xj = ring[j][0], yj = ring[j][1];\n \n var intersect = ((yi > pt[1]) != (yj > pt[1]))\n && (pt[0] < (xj - xi) * (pt[1] - yi) / (...
[ "0.67964005", "0.6742104", "0.67210066", "0.67051923", "0.66208977", "0.6193925", "0.6193925", "0.606301", "0.57557786", "0.56671643", "0.5653205", "0.5645153", "0.56102216", "0.5603839", "0.55337703", "0.55332625", "0.5514085", "0.54902107", "0.5430508", "0.5400922", "0.5352...
0.68291044
0
returns true if ring's first coordinate is the same as its last
function checkValidity(ring) { if (ring.length < 3) { return false; //if the last point is the same as the first, it's not a triangle } else if (ring.length === 3 && ((ring[2][0] === ring[0][0]) && (ring[2][1] === ring[0][1]))) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkValidity(ring) {\n\t if (ring.length < 3) {\n\t return false;\n\t //if the last point is the same as the first, it's not a triangle\n\t } else if (ring.length === 3 &&\n\t ((ring[2][0] === ring[0][0]) && (ring[2][1] === ring[0][1]))) {\n\t return false;\n\t } else {\n\t...
[ "0.6607702", "0.64669114", "0.6154713", "0.61495155", "0.6062512", "0.600217", "0.5939138", "0.5865868", "0.58544123", "0.5840582", "0.5834277", "0.5826192", "0.5813706", "0.58056927", "0.5788277", "0.5773696", "0.5770974", "0.575342", "0.5752914", "0.575199", "0.5748112", ...
0.67398095
0
Bearing [180, 180] if first bearing is further along clockwise than second bearing returns true
function bearingCompare(firstBearing, secondBearing) { //convert to [0, 360] var firstBearing = (firstBearing % 360 + 360) % 360; var secondBearing = (secondBearing % 360 + 360) % 360; return secondBearing < firstBearing; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static IsConjunction(m1, s1, s2, m2) {\n\t\tif (m2 < m1)\n\t\t\tm2 += 360.0;\n\t\tif (s2 < s1)\n\t\t\ts2 += 360.0;\n\t\tif ((m1 <= s1) && (s1 < s2) && (s2 <= m2))\n\t\t\treturn true;\n\n\t\tm1 = GCMath.putIn180(m1);\n\t\tm2 = GCMath.putIn180(m2);\n\t\ts1 = GCMath.putIn180(s1);\n\t\ts2 = GCMath.putIn180(s2);\n\n\t\...
[ "0.67430586", "0.67058396", "0.6545893", "0.6499438", "0.6489221", "0.6341895", "0.6298043", "0.6270406", "0.62631446", "0.6213356", "0.61476064", "0.61294967", "0.61060435", "0.6078521", "0.6077663", "0.6020577", "0.5986585", "0.5980923", "0.5947463", "0.5944994", "0.5894952...
0.77442855
0
Property Sheet Load function
newPropertiesSheet() { this.properties_sheet = new InstanceProperties(this.artefact) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadProperties() {\n const self = this;\n $(jqId(PROPERTIES_PANEL)).load(\"propertysheets/vm_cluster.html\", () => {loadPropertiesSheet(self.artefact);});\n }", "newPropertiesSheet() {\n this.properties_sheet = new MysqlDatabaseSystemProperties(this.artefact)\n }", "loadOwnProperties...
[ "0.7243266", "0.644674", "0.62801284", "0.62462914", "0.6237866", "0.6116233", "0.60596955", "0.5905504", "0.586504", "0.58635515", "0.58017796", "0.5789003", "0.5754469", "0.57439095", "0.56088334", "0.5515779", "0.5509394", "0.55057716", "0.5495979", "0.5484869", "0.547282"...
0.6547866
1
Load and display Value Proposition
loadValueProposition() { $(jqId(VALUE_PROPOSITION_PANEL)).load("valueproposition/instance.html"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadValueProposition() {\n $(jqId(VALUE_PROPOSITION_PANEL)).load(\"valueproposition/vm_cluster.html\");\n }", "loadValueProposition() {\n $(jqId(VALUE_PROPOSITION_PANEL)).load(\"valueproposition/oke_cluster.html\");\n }", "loadValueProposition() {\n $(jqId(VALUE_PROPOSITION_PANEL)).l...
[ "0.66930336", "0.6653542", "0.6519411", "0.6332947", "0.6005394", "0.59091294", "0.5749966", "0.5707011", "0.56469524", "0.5601631", "0.5601631", "0.5588315", "0.557618", "0.5527793", "0.5525548", "0.5525548", "0.55200255", "0.55200255", "0.55200255", "0.55200255", "0.5520025...
0.6869938
0
The Earley parser is like the proverbial tortoise. Its simplicity lets slowly but surely it chug through any grammar you throw its way.
function EarleyParser( ruleSet ) { // Map from rule name to NFA. this.tokenizer = ruleSet.createTokenizer(); this.EPSILON = ruleSet.EPSILON; ruleSet.computeFirst(); this.rules = ruleSet.rules; this.first = ruleSet.first; //this.debug = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function advance(parser) {\n\t var prevEnd = parser.token.end;\n\t parser.prevEnd = prevEnd;\n\t parser.token = parser._lexToken(prevEnd);\n\t}", "function Parser() {\n\n}", "function advance(parser) {\n var prevEnd = parser.token.end;\n parser.prevEnd = prevEnd;\n parser.token = parser._lexToken(prevEnd...
[ "0.5816324", "0.57709587", "0.57640976", "0.57422113", "0.57333434", "0.5703306", "0.5684258", "0.5684258", "0.5579846", "0.5554446", "0.55456114", "0.5536273", "0.55281204", "0.55023223", "0.5483728", "0.5439964", "0.5434319", "0.53967375", "0.53774905", "0.53760713", "0.537...
0.7080462
0
Parse a `require("...")` expression and return the module path and imported symbol name or "" if the entire module is being imported. If the expression is not recognized as a CommonJS import, return `null`. Several forms are supported: 1. require("foo") // Plain require 2. require("foo").exportName // Import of a speci...
function parseRequireExpression(node) { if (t.isSequenceExpression(node)) { node = node.expressions[node.expressions.length - 1]; } if (t.isCallExpression(node)) { const source = commonJSRequireSource(node); if (source) { return { source, symbol: "<CJS>" }; } } else if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImportOrRequire(importSectionText) {\n if (!importSectionText) return 'require'\n\n const firstLine = importSectionText.split('\\n')[0],\n isRequire = re.require.test(firstLine),\n isImport = re.import.test(firstLine)\n\n if (!isRequire && !isImport) {\n return {\n errorMessage:\n ...
[ "0.6221068", "0.614897", "0.5970915", "0.5918487", "0.5863869", "0.58535033", "0.58454746", "0.57312524", "0.5727614", "0.5718905", "0.5718905", "0.5610159", "0.5593179", "0.5556537", "0.5518531", "0.54896444", "0.5460518", "0.5409742", "0.5387307", "0.53433394", "0.531178", ...
0.6606032
0