Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Move function for adding moves when user clicks on cards
function addMoves() { 'use strict'; // turn on Strict Mode moves++; movesCounter.innerHTML = moves; rating(); //Starting timer when user makes its first click on the cards if (moves == 1) { second = 0; minute = 0; hour = 0; startTimer(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMove(){\n\t$(\".card\").click(function(e){\n\t\tshowCardSymbol($(e.target));\n\t\taddToCardCheck($(e.target));\n\t\tif (cardCheck.length === 2) {\n\t\t\tcheckMatches();\n\t\t}\n\t\tcongratsMessage();\n\t});\n}", "function takeCards()\n {\n if (state.turnedCard)\n {\n ...
[ "0.7880115", "0.73466146", "0.71526766", "0.7134944", "0.7134629", "0.6997075", "0.6878985", "0.68646246", "0.6824192", "0.67994934", "0.679314", "0.67784", "0.6756485", "0.6724491", "0.670292", "0.66926295", "0.66825783", "0.6666016", "0.66611254", "0.66378945", "0.6632416",...
0.67670876
12
Rating function Based on the moves, user will get rating specific rating or stars.
function rating() { 'use strict'; // turn on Strict Mode if (moves > 10 && moves < 19) { stars[2].classList.remove('fa-star'); stars[2].classList.add('fa-star-o'); starsRating = 2; } else if (moves > 20) { stars[1].classList.remove('fa-star'); stars[1].classList.add('fa-sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rating(moves) {\n // \n let rating = 3;\n\n // Scoring system from 1 to 3 stars\n let stars3 = 10,\n stars2 = 16,\n star1 = 20;\n\n if (moves > stars3 && moves < stars2) {\n $stars.eq(3).removeClass('fa-star').addClass('fa-star-o');\n } else if (moves > stars2 && mov...
[ "0.78940636", "0.78329915", "0.77787524", "0.7774005", "0.7739763", "0.77269536", "0.769004", "0.7676076", "0.76703954", "0.763949", "0.760653", "0.7389732", "0.73660254", "0.723577", "0.71886635", "0.7159756", "0.7139172", "0.70582867", "0.70310605", "0.70205367", "0.7017559...
0.7537224
11
Toggline the congratulation modal
function modalToggle() { 'use strict'; // turn on Strict Mode congoModal.classList.toggle('hide'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCongratulationModal() {\n let template = `\n were ${scorePanel.playTime} seconds on a ${deckConfig.numberOfcards === difficulty.easy ? 'easy' : 'hard'} level, \n with ${scorePanel.moveCounter} moves and ${scorePanel.starCounter} star(s).`;\n\n $(\"#congratulationScore\").text(template);\n $(\...
[ "0.6729323", "0.66939205", "0.65758806", "0.65140384", "0.6500626", "0.6443051", "0.63722503", "0.63673633", "0.6337035", "0.631825", "0.6234612", "0.62173873", "0.62173873", "0.6192255", "0.6189544", "0.61855483", "0.61756074", "0.61730677", "0.6167182", "0.61467", "0.614215...
0.0
-1
Congratulation Modal, after user sucessfully matched all the cards
function isOverModal() { 'use strict'; // turn on Strict Mode if (matchedCards.length === cards.length) { clearInterval(timerInterval); //Defined variable let endTimer = timerCounter.innerHTML; modalToggle(); //Assigning stars, time and moves document.getElementB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setmatchscreen(){\n cardcount= 0; //var to hold all the match cards\n let modal = document.getElementById('modal');\n let span = document.getElementsByClassName(\"close\")[0];\n for(i=0; i<cardarray.length;i++){ //loops through all cards\n if (cardarray[i].ou...
[ "0.68357116", "0.67636406", "0.6718432", "0.66461164", "0.6480009", "0.6472404", "0.6469817", "0.6429782", "0.6428735", "0.6400441", "0.63152534", "0.62675756", "0.6245581", "0.6233706", "0.6215076", "0.62050474", "0.62028915", "0.61839455", "0.6178714", "0.61627567", "0.6160...
0.0
-1
Function for restarting the game
function playAgain() { 'use strict'; // turn on Strict Mode modalToggle(); init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restart() {\n game.state.restart();\n}", "function restartGame() {\n playGame();\n }", "function restartGame()\n{\n\tSnake.reset();\n\tMouse.changeLocation();\n\tScoreboard.reset();\n\t\n\tenterState(\"countdown\");\n}", "function restart() {}", "function restartGame() {\n\tthis.game.stats.setSta...
[ "0.87297684", "0.8581637", "0.842008", "0.8373883", "0.8325835", "0.8300972", "0.81533444", "0.81125796", "0.8107974", "0.8104296", "0.80926013", "0.8089746", "0.80254537", "0.8019161", "0.8008237", "0.80007124", "0.79995066", "0.79843736", "0.79833364", "0.79829985", "0.7967...
0.0
-1
Reset function All time, moves and rating will be reset to the their default values
function reset() { 'use strict'; // turn on Strict Mode //Resetting timer timerCounter.innerHTML = "0 Minute 0 Second"; clearInterval(timerInterval); //Resetting moves moves = 0; movesCounter.innerHTML = moves; //Reseting stars stars[1].classList.add("fa-star"); stars[1].classL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n state.moves = [];\n state.turnCount = 0;\n state.playbackSpeed = 700;\n chooseMove();\n }", "function fullReset() {\n reset();\n score.DROITE = 0;\n score.GAUCHE = 0;\n }", "function reset() { }", "function reset() {\n\t\t\tclear_board()\n\t\t}", "reset(){\n ...
[ "0.8027952", "0.7669807", "0.76210487", "0.7611284", "0.7604743", "0.76007974", "0.7590081", "0.7580365", "0.75753236", "0.7570899", "0.752332", "0.7498892", "0.74797004", "0.7467668", "0.743186", "0.7416143", "0.7406773", "0.7398435", "0.7393521", "0.738837", "0.7373027", ...
0.7133154
64
>>>>>> bug <<<<<customerList refresh
function PurchaseSimilarInventory() { const { setTopHeading } = useContext(TopBarContext); const [flow, setFlow] = useState("basic"); const [calculate, setCalculate] = useState(false); const [datecalculate, setDateCalculate] = useState(false); const [calnum, setCalnum] = useState(-1); const thebval = { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomerList() {\n\t// TODO: add logic to call backend system\n\n\n}", "function ResetCustomerList() {\n BindOrReloadCustomerTable('Reset');\n}", "get customersList() {\n\t\treturn this._customersList;\n\t}", "function severRefresh(newValue) {\n if (newValue) {\n if (...
[ "0.70704305", "0.69736576", "0.69008005", "0.68298393", "0.68096864", "0.67783123", "0.67059684", "0.66040456", "0.65784174", "0.65544456", "0.64780205", "0.64742035", "0.64562523", "0.6421873", "0.6312858", "0.6308224", "0.62962306", "0.62312764", "0.62229043", "0.6176786", ...
0.0
-1
Used to toggle the menu on small screens when clicking on the menu button
function toggleFunction() { var x = document.getElementById("navDemo"); //alert(x.className.indexOf("show")); if (x.className.indexOf("show") == -1) { x.className += " show"; } else { x.className = x.className.replace(" show", ""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuForSmallScreen() {\n navMenuList.hide();\n\n hideMenuBtn.addClass(ClassName.NONE);\n showMenuBtn.removeClass(ClassName.NONE);\n\n function toggleSmallMenu() {\n navMenuList.fadeToggle();\n toggleButtons();\n }\n\n function toggleMenuEvent...
[ "0.86165327", "0.8036715", "0.780012", "0.77065015", "0.75995696", "0.7574694", "0.75403684", "0.7524451", "0.75068945", "0.75068945", "0.7503618", "0.7501699", "0.74886316", "0.7467993", "0.746118", "0.7406113", "0.7406113", "0.74043226", "0.73866475", "0.73753613", "0.73482...
0.0
-1
Drop in replacement of the `Radio`, `Switch` and `Checkbox` component. Use this component if you want to display an extra label.
function FormControlLabel(props, context) { var checked = props.checked, classes = props.classes, classNameProp = props.className, control = props.control, disabledProp = props.disabled, inputRef = props.inputRef, label = props.label, name = props.name, onChange = props...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Label(_ref) {\n var htmlFor = _ref.htmlFor,\n label = _ref.label,\n required = _ref.required;\n return _react.default.createElement(\"label\", {\n style: {\n display: \"block\"\n },\n htmlFor: htmlFor\n }, label, \" \", required && _react.default.createElement(\"span\", {\n s...
[ "0.68338424", "0.67030853", "0.6557703", "0.64623713", "0.6420008", "0.6416059", "0.6416059", "0.63771886", "0.6285889", "0.6246065", "0.6221066", "0.61106735", "0.60983837", "0.60287285", "0.60223705", "0.5996795", "0.59856206", "0.5935544", "0.59085596", "0.58794147", "0.58...
0.6531685
5
================= for date checking =================
function checkDates(element) { var birthDate = element.value; if(birthDate.length > 10){ alert("Invalid Date Format"); element.value = ""; element.focus(); return; } var split = birthDate.split(/[^\d]+/); var year = parseFloat(split[2]); var month = pars...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateValidation( date ) {\n\n\t\tvar pass = /^\\d{4}-\\d{2}-\\d{2}/.test( date );\n\t\treturn pass;\n\n\t}", "function checkdate(input){\t \nvar validformat=/^\\d{2}\\/\\d{2}\\/\\d{4}$/ // Basic check for format validity\n\t var returnval= 0\n\t if (!validformat.test(input.value)){\n\t\t input.select();\...
[ "0.76711684", "0.7645414", "0.76122695", "0.76077014", "0.75384104", "0.7458504", "0.7407468", "0.7403451", "0.7402913", "0.73803276", "0.7351411", "0.732255", "0.7315654", "0.731516", "0.7289354", "0.72882485", "0.72827524", "0.7246374", "0.72328573", "0.7217748", "0.7189891...
0.0
-1
New validations for resume name and attachment name validation in AddConsultent.jsp new functions for consultant resume attachment validations
function attachmentNameValidate(){ var attachmentName= document.addConsultantForm.attachmentName; if (attachmentName.value != null && (attachmentName.value != "")) { if(attachmentName.value.replace(/^\s+|\s+$/g,"").length>50){ str = new String(doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkResume() {\n\tvar x = document.getElementById('resume').value;\n\tvar sub = x.substring(x.length-3);\n\tvar validate;\n\t\n\tif(sub == \"doc\" || sub == \"ocx\" || sub == \"pdf\"){\n\t\tvalidate = true\n\t}\n\tif(sub == 0 || sub == \"\") {\n\t\tdocument.getElementById('div_4').className='error'\n\t\t...
[ "0.7143847", "0.6299985", "0.591096", "0.5736371", "0.5716605", "0.5593715", "0.55903906", "0.5575404", "0.5569979", "0.554915", "0.55022824", "0.54944205", "0.54754704", "0.5461847", "0.5443368", "0.54389447", "0.5421969", "0.5412685", "0.541155", "0.5378472", "0.53620934", ...
0.67289054
1
user click on start to startGame
function startGame(){ countStartGame = 30; correctAnswers = 0; wrongAnswers = 0; unanswered = 0; if (!timerRunning){ intervalId = setInterval(timer, 1000); timerRunning = true; } timer(); console.log("game startiiing"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "onStartGame(event) {\n\n if(this.checkStartButton()){\n console.log('On click btn start'); \n this.app.goToGame();\n\n if(this.start){\n this.app.start(); \n }\n }\n }", "pressedStart()\n\t\t\t{\n\t\t\tif(th...
[ "0.7925207", "0.7908294", "0.78537375", "0.762998", "0.76202166", "0.76115394", "0.75777036", "0.756493", "0.7529975", "0.7495164", "0.74581033", "0.7443494", "0.7438885", "0.74356896", "0.7435168", "0.7434496", "0.7433483", "0.7399481", "0.7386848", "0.7381565", "0.73702115"...
0.0
-1
timer beggins 30 seconds countdown will it be a function?
function timer(){ countStartGame -= 1; console.log(countStartGame); if (countStartGame === 0){ console.log ("time's up"); //need to clear interval - add stop } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTime() {\n timer = timer + 30;\n}", "function start30SecTimer(){\r\n\t\tconsole.log( new Date());\r\n\t\t//setTimeout(function(){ console.log( new Date()) }, 30000);\r\n\t\tconsole.log(\"START TIMER!!!!!!\");\r\n\t\tfor(var x = 6; x>1; x--){\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\t//sendOutCount(...
[ "0.7035286", "0.69687426", "0.69199884", "0.6894611", "0.68926716", "0.6849651", "0.6823727", "0.68000007", "0.679997", "0.676423", "0.6763475", "0.67266095", "0.6720447", "0.67178816", "0.6706305", "0.6689997", "0.6684375", "0.6673262", "0.66707855", "0.6656377", "0.66549444...
0.0
-1
Destroys the instance of the player and it's plugins.
destroy() { // Remove the player from the page. this.wrapper.innerHTML = ''; this.trigger('requestDestroy'); // HACK: fix this hack! Because requestDestroy refers to this.playerPlugin (via get playing) it throws an error when playerPlugin is nulled.. By using setTimeout 0 we effectively...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "destroy() {\n // Try to delete as much about anything that could lead to memory leaks.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management\n this.ytPlayer.destroy();\n this.ytPlayer = undefined;\n this.rootElement.parentNode\n .removeChild(th...
[ "0.7446531", "0.7442718", "0.74154264", "0.728973", "0.7181743", "0.7156699", "0.7105579", "0.7088779", "0.70685625", "0.70408124", "0.7035602", "0.68820703", "0.6867774", "0.6848587", "0.6830043", "0.6731127", "0.6703837", "0.6663888", "0.6658892", "0.6658104", "0.66374576",...
0.8091967
0
Don't rerender `` on page navigation (on `route` change). TrackedThreads = React.memo(TrackedThreads)
function TrackedThread({ edit, selected, locale, thread }) { const addedAt = useMemo(() => thread.addedAt, [thread]) const untrackButton = useRef() const undoUntrackButton = useRef() const dispatch = useDispatch() const [untracked, setUntracked] = useState() const onUntrackThread = useCallback(() => { dispa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TrackedThread({\n\tselected,\n\tlocale,\n\tthread,\n\tdispatch\n}) {\n\tconst onUntrackThread = useCallback(() => dispatch(untrackThread(thread)), [thread])\n\tconst isLink = !thread.expired\n\tconst Component = isLink ? Link : 'div'\n\treturn (\n\t\t<div\n\t\t\ttitle={thread.title}\n\t\t\tclassName={clas...
[ "0.58103335", "0.542898", "0.53228194", "0.5296358", "0.5247592", "0.5213371", "0.5190907", "0.51808065", "0.5070394", "0.506929", "0.5060426", "0.50431436", "0.50210977", "0.49881974", "0.49798256", "0.49666816", "0.49288386", "0.4918276", "0.491626", "0.4913396", "0.4911656...
0.62011886
0
an attempt to work around
function sendKeyframe(pc) { console.log('sendkeyframe', pc.iceConnectionState); if (pc.iceConnectionState !== 'connected') return; // safe... pc.setRemoteDescription( pc.remoteDescription, function () { pc.createAnswer( function (modifiedAnswer) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "static private internal fun...
[ "0.67953676", "0.6461239", "0.642104", "0.6208531", "0.6102396", "0.6011876", "0.59634054", "0.59355253", "0.57962424", "0.573845", "0.56429243", "0.56102186", "0.5574703", "0.5557605", "0.54862726", "0.5471745", "0.5366237", "0.5313665", "0.52801836", "0.52556163", "0.525497...
0.0
-1
this could be useful in Array.prototype.
function arrayEquals(array) { // if the other array is a falsy value, return if (!array) return false; // compare lengths - can save a lot of time if (this.length != array.length) return false; for (var i = 0, l=this.length; i < l; i++) { // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ArrayUtils() {}", "function Array() {}", "[Symbol.iterator]() {\n return this.#array[Symbol.iterator]();\n }", "function arrayMethodFix(fn){ // 809\n return function(){ ...
[ "0.696767", "0.66225266", "0.6128983", "0.60604686", "0.6013327", "0.6009423", "0.59820926", "0.59453964", "0.5943842", "0.59429765", "0.5881751", "0.58740425", "0.5865706", "0.5865706", "0.5865706", "0.58581585", "0.5850747", "0.5845911", "0.582462", "0.5821777", "0.5789929"...
0.0
-1
Sends a COLIBRI message which enables or disables (according to 'state') the recording on the bridge. Waits for the result IQ and calls 'callback' with the new recording state, according to the IQ.
function setRecordingColibri(state, token, callback, connection) { var elem = $iq({to: connection.emuc.focusMucJid, type: 'set'}); elem.c('conference', { xmlns: 'http://jitsi.org/protocol/colibri' }); elem.c('recording', {state: state, token: token}); connection.sendIQ(elem, functio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onCdr(callback)\n{\n if ( !callback || typeof (callback) !== 'function' ) { return; }\n webphone_api.cdrcb.push(callback);\n}", "function connect() {\n sb = new SendBird({appId: APP_ID.value});\n sb.connect(USER_ID.value, (user, error) => {\n if (error) {\n alert(error);\n ...
[ "0.55292344", "0.49632838", "0.4924295", "0.49182978", "0.49025458", "0.47946677", "0.47543642", "0.4711298", "0.46959478", "0.46685758", "0.46531543", "0.46503454", "0.4637619", "0.46288246", "0.4626916", "0.45827892", "0.4579811", "0.45359525", "0.44989538", "0.44596183", "...
0.66643995
1
deflate(data[, options]) > Uint8Array|Array|String data (Uint8Array|Array|String): input data to compress. options (Object): zlib deflate options. Compress `data` with deflate alrorythm and `options`. Supported options are: level windowBits memLevel strategy [ for more information on these. Sugar (options): `raw` (Bool...
function deflate(input, options) { var deflator = new Deflate(options); deflator.push(input, true); // That will never happens, if you don't cheat with options :) if (deflator.err) { throw deflator.msg; } return deflator.result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gzip(input,options){options=options||{};options.gzip=true;return deflate$1(input,options);}", "function deflate$1(input,options){const deflator=new Deflate(options);deflator.push(input,true);// That will never happens, if you don't cheat with options :)\nif(deflator.err){throw deflator.msg||messages[def...
[ "0.6332804", "0.6329344", "0.61815435", "0.61335", "0.61335", "0.61122954", "0.6091908", "0.608164", "0.60806566", "0.6079221", "0.6062083", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0.6038355", "0....
0.6034561
56
deflateRaw(data[, options]) > Uint8Array|Array|String data (Uint8Array|Array|String): input data to compress. options (Object): zlib deflate options. The same as [[deflate]], but creates raw data, without wrapper (header and adler32 crc).
function deflateRaw(input, options) { options = options || {}; options.raw = true; return deflate(input, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deflateRaw$1(input, options) {\n\t options = options || {};\n\t options.raw = true;\n\t return deflate$3(input, options);\n\t}", "function deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}", "function deflateRaw(input, options) {...
[ "0.7680796", "0.76410246", "0.76410246", "0.7620591", "0.7620591", "0.7614947", "0.7574728", "0.75647724", "0.755764", "0.7534994", "0.7517278", "0.75154525", "0.6568635", "0.6568635", "0.6568635", "0.6568635", "0.6568635", "0.6568635", "0.6568635", "0.6568635", "0.6568635", ...
0.7583417
46
gzip(data[, options]) > Uint8Array|Array|String data (Uint8Array|Array|String): input data to compress. options (Object): zlib deflate options. The same as [[deflate]], but create gzip wrapper instead of deflate one.
function gzip(input, options) { options = options || {}; options.gzip = true; return deflate(input, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gzip(input,options){options=options||{};options.gzip=true;return deflate$1(input,options);}", "function gzip$1(input, options) {\n\t options = options || {};\n\t options.gzip = true;\n\t return deflate$3(input, options);\n\t}", "function gzip(input, options) {\n\t options = options || {};\n\t opt...
[ "0.75869906", "0.7519991", "0.7475314", "0.7475314", "0.74652964", "0.74602276", "0.73579544", "0.73579544", "0.7340525", "0.73362404", "0.7313697", "0.730394", "0.6607629", "0.6607629", "0.6607629", "0.65512145", "0.6153322", "0.6144623", "0.6144623", "0.6116595", "0.6116595...
0.7335155
53
inflateRaw(data[, options]) > Uint8Array|Array|String data (Uint8Array|Array|String): input data to decompress. options (Object): zlib inflate options. The same as [[inflate]], but creates raw data, without wrapper (header and adler32 crc).
function inflateRaw(input, options) { options = options || {}; options.raw = true; return inflate(input, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}", "function inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}", "function inflateRaw(input, options) {\n\t opti...
[ "0.7418727", "0.7418727", "0.74137247", "0.74064463", "0.7394453", "0.7394453", "0.73830867", "0.7376981", "0.73463386", "0.7340878", "0.7328237", "0.7328237", "0.7274889", "0.72629726", "0.7207871", "0.7207871", "0.72034985", "0.72034985", "0.7195765", "0.719202", "0.7128862...
0.74284965
41
Helper (used in 2 places)
function buf2binstring(buf, len) { // use fallback for big arrays to avoid stack overflow if (len < 65537) { if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); } } var result = ''; for(var i=0; i < len;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "static private protected inter...
[ "0.68026626", "0.67003596", "0.665479", "0.62646127", "0.62632245", "0.6196471", "0.6128034", "0.60641336", "0.60158974", "0.60106325", "0.59154373", "0.58908814", "0.57922685", "0.5754438", "0.57025576", "0.56650496", "0.5632441", "0.56095976", "0.5585894", "0.5585894", "0.5...
0.0
-1
Note: adler32 takes 12% for level 0 and 2% for level 6. It doesn't worth to make additional optimizationa as in original. Small size is preferable.
function adler32(adler, buf, len, pos) { var s1 = (adler & 0xffff) |0 , s2 = ((adler >>> 16) & 0xffff) |0 , n = 0; while (len !== 0) { // Set limit ~ twice less than 5552, to keep // s2 in 31-bits, because we force signed ints. // in other case %= will fail. n = len > 2000 ? 2000 : len; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adler32(data){var a=1;var b=0;var i=0;var l=data.length;var m=l&~0x3;while(i<m){var n=Math.min(i+4096,m);for(;i<n;i+=4){b+=(a+=data.charCodeAt(i))+(a+=data.charCodeAt(i+1))+(a+=data.charCodeAt(i+2))+(a+=data.charCodeAt(i+3));}a%=MOD;b%=MOD;}for(;i<l;i++){b+=a+=data.charCodeAt(i);}a%=MOD;b%=MOD;return a|b<...
[ "0.6453808", "0.6453808", "0.6453808", "0.6355045", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "0.6333638", "...
0.0
-1
Note: we can't get significant speed boost here. So write code to minimize size no pregenerated tables and array tools dependencies. Use ordinary array, since untyped makes no boost here
function makeTable() { var c, table = []; for(var n =0; n < 256; n++){ c = n; for(var k =0; k < 8; k++){ c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); } table[n] = c; } return table; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Array() {}", "function sumArrayPlain(arr) {\n\n window.performance.mark('pStart');\n\n var sum = 0;\n for (var i = 0; i < arr.length; i++)\n sum += arr[i];\n\n pEnd = new Date().getTime();\n /* Adding data to the global array */...
[ "0.6351423", "0.626551", "0.61295223", "0.6040662", "0.60219103", "0.59781724", "0.5955053", "0.5879565", "0.5820634", "0.58065885", "0.5776067", "0.5773094", "0.5760899", "0.57540375", "0.5751431", "0.574649", "0.5744183", "0.5722956", "0.5664927", "0.5648365", "0.5645067", ...
0.0
-1
Unix :) . Don't detect, use this default.
function err(strm, errorCode) { strm.msg = msg[errorCode]; return errorCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static mojangFriendlyOS(){\n const opSys = process.platform\n if (opSys === 'darwin') {\n return 'osx'\n } else if (opSys === 'win32'){\n return 'windows'\n } else if (opSys === 'linux'){\n return 'linux'\n } else {\n return 'unknown_os...
[ "0.60842496", "0.59525836", "0.58187497", "0.57424915", "0.57085973", "0.5652684", "0.5647002", "0.55350727", "0.54870725", "0.5475888", "0.54565", "0.54538655", "0.5415005", "0.5375714", "0.5364179", "0.5357404", "0.53541917", "0.53301984", "0.527862", "0.527862", "0.527862"...
0.0
-1
========================================================================= Flush as much pending output as possible. All deflate() output goes through this function so some applications may wish to modify it to avoid allocating a large strm>output buffer and copying into it. (See also read_buf()).
function flush_pending(strm) { var s = strm.state; //_tr_flush_bits(s); var len = s.pending; if (len > strm.avail_out) { len = strm.avail_out; } if (len === 0) { return; } utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); strm.next_out += len; s.pending_out += len; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flush_pending(strm) {\n\t var s = strm.state;\n\t\n\t //_tr_flush_bits(s);\n\t var len = s.pending;\n\t if (len > strm.avail_out) {\n\t len = strm.avail_out;\n\t }\n\t if (len === 0) { return; }\n\t\n\t arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n\t ...
[ "0.6295302", "0.62700987", "0.6267362", "0.6204446", "0.62010384", "0.6188399", "0.61843765", "0.6183771", "0.61774987", "0.6162318", "0.6162145", "0.6162057", "0.6162057", "0.6156232" ]
0.6159415
87
========================================================================= Put a short in the pending buffer. The 16bit value is put in MSB order. IN assertion: the stream state is correct and there is enough room in pending_buf.
function putShortMSB(s, b) { // put_byte(s, (Byte)(b >> 8)); // put_byte(s, (Byte)(b & 0xff)); s.pending_buf[s.pending++] = (b >>> 8) & 0xff; s.pending_buf[s.pending++] = b & 0xff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}", "function put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8)...
[ "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273", "0.80095273"...
0.0
-1
=========================================================================== Read a new buffer from the current input stream, update the adler32 and total number of bytes read. All deflate() input goes through this function so some applications may wish to modify it to avoid allocating a large strm>input buffer and copy...
function read_buf(strm, buf, start, size) { var len = strm.avail_in; if (len > size) { len = size; } if (len === 0) { return 0; } strm.avail_in -= len; utils.arraySet(buf, strm.input, strm.next_in, len, start); if (strm.state.wrap === 1) { strm.adler = adler32(strm.adler, buf, len, start); } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n \n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n \n strm.avail_in -= len;\n \n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n ...
[ "0.6806013", "0.6776525", "0.6776525", "0.6776525", "0.6776525", "0.6775718", "0.67708814", "0.674234", "0.6718914", "0.67015874", "0.66959625", "0.66921324", "0.66756624", "0.6658554", "0.6658554", "0.6612709", "0.6612709", "0.6612709", "0.6612709", "0.6612709", "0.6612709",...
0.0
-1
=========================================================================== Set match_start to the longest match starting at the given string and return its length. Matches shorter or equal to prev_length are discarded, in which case the result is equal to prev_length and match_start is garbage. IN assertions: cur_matc...
function longest_match(s, cur_match) { var chain_length = s.max_chain_length; /* max hash chain length */ var scan = s.strstart; /* current string */ var match; /* matched string */ var len; /* length of current match */ var best_len = s.prev_length; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longest_match$1(s, cur_match) {\n\t var chain_length = s.max_chain_length; /* max hash chain length */\n\t var scan = s.strstart; /* current string */\n\t var match; /* matched string */\n\t var len; /* length of current match */\n\t var best_len =...
[ "0.75376654", "0.7508505", "0.7501495", "0.75013494", "0.74998707", "0.74998707", "0.74998707", "0.74998707", "0.74998707", "0.74998707", "0.74998707", "0.7496742", "0.74936265", "0.748309", "0.74774504" ]
0.7495141
86
=========================================================================== Fill the window when the lookahead becomes insufficient. Updates strstart and lookahead. IN assertion: lookahead < MIN_LOOKAHEAD OUT assertions: strstart <= window_sizeMIN_LOOKAHEAD At least one byte has been read, or avail_in == 0; reads are p...
function fill_window(s) { var _w_size = s.w_size; var p, n, m, more, str; //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); do { more = s.window_size - s.lookahead - s.strstart; // JS ints have 32 bit, block below not needed /* Deal with !@#$% 64K limit: */ //if (sizeof(int)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fill_window() {\n\t\tvar n, m;\n\n\t // Amount of free space at the end of the window.\n\t\tvar more = window_size - lookahead - strstart;\n\n\t\t// If the window is almost full and there is insufficient lookahead,\n\t\t// move the upper half to the lower one to make room in the upper half.\n\t\tif (more ...
[ "0.73649114", "0.68951803", "0.6752545", "0.674314", "0.6729958", "0.67143106", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", "0.6687618", ...
0.6687618
86
=========================================================================== Copy without compression as much as possible from the input stream, return the current block state. This function does not insert new strings in the dictionary since uncompressible data is probably not useful. This function is used only for the...
function deflate_stored(s, flush) { /* Stored blocks are limited to 0xffff bytes, pending_buf is limited * to pending_buf_size, and each stored block has a 5 byte header: */ var max_block_size = 0xffff; if (max_block_size > s.pending_buf_size - 5) { max_block_size = s.pending_buf_size - 5; } /* Co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deflate_stored(s,flush){/* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */var max_block_size=0xffff;if(max_block_size>s.pending_buf_size-5){max_block_size=s.pending_buf_size-5;}/* Copy as much as...
[ "0.59261113", "0.5765634", "0.57584363", "0.57032734", "0.56545705", "0.56424904", "0.5635157", "0.5626327", "0.56045735", "0.55976427", "0.55753577", "0.5563106", "0.55127627" ]
0.5665257
85
=========================================================================== Compress as much as possible from the input stream, return the current block state. This function does not perform lazy evaluation of matches and inserts new strings in the dictionary only for unmatched strings or for short matches. It is used ...
function deflate_fast(s, flush) { var hash_head; /* head of the hash chain */ var bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, pl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deflate_fast() {\n\t\twhile (lookahead !== 0 && qhead === null) {\n\t\t\tvar flush; // set if current block must be flushed\n\n\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tINSERT_STRING();\n\n\t\t\t// Find th...
[ "0.66834676", "0.66489595", "0.6623362", "0.63921976", "0.639217", "0.6382699", "0.63680315", "0.63517934", "0.6348527", "0.6344936", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0.63384753", "0...
0.0
-1
=========================================================================== Same as above, but achieves better compression. We use a lazy evaluation for matches: a match is finally adopted only if there is no better match at the next window position.
function deflate_slow(s, flush) { var hash_head; /* head of hash chain */ var bflush; /* set if current block must be flushed */ var max_insert; /* Process the input block. */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deflate_fast() {\n\t\twhile (lookahead !== 0 && qhead === null) {\n\t\t\tvar flush; // set if current block must be flushed\n\n\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tINSERT_STRING();\n\n\t\t\t// Find th...
[ "0.66324675", "0.60708964", "0.60278755", "0.58126444", "0.56749785", "0.56560904", "0.5632922", "0.5628258", "0.5612574", "0.55996627", "0.5562616", "0.5542642", "0.55422807", "0.55375457", "0.5528214", "0.5515559", "0.55129355", "0.550209", "0.5501354", "0.5501354", "0.5498...
0.0
-1
=========================================================================== For Z_RLE, simply look for runs of bytes, generate matches only of distance one. Do not maintain a hash table. (It will be regenerated if this run of deflate switches away from Z_RLE.)
function deflate_rle(s, flush) { var bflush; /* set if current block must be flushed */ var prev; /* byte at distance one to match */ var scan, strend; /* scan goes up to strend for length of run */ var _win = s.window; for (;;) { /* Make sure that we always have enough look...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $m2YO$var$deflate_rle(s, flush) {\n var bflush;\n /* set if current block must be flushed */\n\n var prev;\n /* byte at distance one to match */\n\n var scan, strend;\n /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enou...
[ "0.7337809", "0.72525966", "0.69772786", "0.6927416", "0.6923", "0.6902618", "0.690135", "0.68757206", "0.685161", "0.685161", "0.68312955", "0.68101317", "0.68007237", "0.67007655", "0.67007655" ]
0.6905223
85
=========================================================================== For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. (It will be regenerated if this run of deflate switches away from Huffman.)
function deflate_huff(s, flush) { var bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we have a literal to write. */ if (s.lookahead === 0) { fill_window(s); if (s.lookahead === 0) { if (flush === Z_NO_FLUSH) { return BS_NEED_MORE; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deflate_fast(flush) {\n\t\t // short hash_head = 0; // head of the hash chain\n\t\t var hash_head = 0; // head of the hash chain\n \n\t\t var bflush; // set if current block must be flushed\n \n\t\t while (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end ...
[ "0.67539406", "0.6724569", "0.637843", "0.63653594", "0.6295601", "0.6234702", "0.6223958", "0.6153701", "0.6106422", "0.6075691", "0.603571", "0.6007223", "0.600191", "0.600191", "0.600191", "0.600191", "0.600191", "0.600191", "0.600191", "0.600191", "0.600191", "0.600191"...
0.0
-1
=========================================================================== Initialize the "longest match" routines for a new zlib stream
function lm_init(s) { s.window_size = 2 * s.w_size; /*** CLEAR_HASH(s); ***/ zero(s.head); // Fill with NIL (= 0); /* Set the default configuration parameters: */ s.max_lazy_match = configuration_table[s.level].max_lazy; s.good_match = configuration_table[s.level].good_length; s.nice_match = configur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longest_match(s,cur_match){var chain_length=s.max_chain_length;/* max hash chain length */var scan=s.strstart;/* current string */var match;/* matched string */var len;/* length of current match */var best_len=s.prev_length;/* best match length so far */var nice_match=s.nice_match;/* stop if match long en...
[ "0.6649219", "0.6516887", "0.64467674", "0.63978803", "0.6388808", "0.6328055", "0.62111276", "0.6198129", "0.6192374", "0.6181118", "0.61744523", "0.6143312", "0.6141138", "0.61273575", "0.6118701", "0.6109118", "0.60909086", "0.609031", "0.60864216", "0.60686386", "0.605897...
0.0
-1
We have no pointers in JS, so keep tables separate
function fixedtables(state) { /* build fixed huffman tables if first call (may not be thread safe) */ if (virgin) { var sym; lenfix = new utils.Buf32(512); distfix = new utils.Buf32(32); /* literal/length table */ sym = 0; while (sym < 144) { state.lens[sym++] = 8; } while (sym < 256) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildTable(){\n\n}", "function make_table_for_external_dispatcher(id_of_table , row_class_name , state){\n let table_witch_contains_id = document.getElementById(id_of_table);\n let table_rows_with_class_name = document.getElementsByClassName(row_class_name);\n\n while (table_rows_with_class_nam...
[ "0.634005", "0.62782997", "0.6234986", "0.6232895", "0.61956674", "0.61253685", "0.61182165", "0.6103738", "0.60886884", "0.6075594", "0.6073368", "0.60690916", "0.60636455", "0.60636455", "0.60636455", "0.6060776", "0.6054898", "0.6052255", "0.6043594", "0.6034194", "0.60278...
0.0
-1
Update the window with the last wsize (normally 32K) bytes written before returning. If window does not exist yet, create it. This is only called when a window is already in use, or when output has been written during this inflate call, but the end of the deflate stream has not been reached yet. It is also called to cr...
function updatewindow(strm, src, end, copy) { var dist; var state = strm.state; /* if it hasn't been done already, allocate space for the window */ if (state.window === null) { state.wsize = 1 << state.wbits; state.wnext = 0; state.whave = 0; state.window = new utils.Buf8(state.wsize); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\t\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\t\n\t ...
[ "0.6681966", "0.66441613", "0.66441613", "0.66441613", "0.66441613", "0.6637881", "0.6636711", "0.66295844", "0.66189325", "0.66103846", "0.66056824", "0.66056824", "0.6594528", "0.65899986", "0.6587221", "0.6587221", "0.6587221", "0.6587221", "0.6587221", "0.6587221", "0.658...
0.0
-1
=========================================================================== Output a short LSB first on the stream. IN assertion: there is enough room in pendingBuf.
function put_short (s, w) { // put_byte(s, (uch)((w) & 0xff)); // put_byte(s, (uch)((ush)(w) >> 8)); s.pending_buf[s.pending++] = (w) & 0xff; s.pending_buf[s.pending++] = (w >>> 8) & 0xff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function putShortMSB(s,b){// put_byte(s, (Byte)(b >> 8));\n // put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++]=b>>>8&0xff;s.pending_buf[s.pending++]=b&0xff;}", "function putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending+...
[ "0.7274559", "0.7092112", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "0.7075015", "...
0.0
-1
=========================================================================== Send a value on a given number of bits. IN assertion: length <= 16 and value fits in length bits.
function send_bits(s, value, length) { if (s.bi_valid > (Buf_size - length)) { s.bi_buf |= (value << s.bi_valid) & 0xffff; put_short(s, s.bi_buf); s.bi_buf = value >> (Buf_size - s.bi_valid); s.bi_valid += length - Buf_size; } else { s.bi_buf |= (value << s.bi_valid) & 0xffff; s.bi_valid += ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send_bits(s, value, length) {\n\t if (s.bi_valid > (Buf_size - length)) {\n\t s.bi_buf |= (value << s.bi_valid) & 0xffff;\n\t put_short(s, s.bi_buf);\n\t s.bi_buf = value >> (Buf_size - s.bi_valid);\n\t s.bi_valid += length - Buf_size;\n\t } else {\n\t s.bi_buf |= (value << ...
[ "0.84644645", "0.8458237", "0.8422658", "0.84223914", "0.8398401", "0.8398401", "0.8398401", "0.8398401", "0.8398401", "0.8398401", "0.8398401", "0.8398401", "0.8398401", "0.83725744", "0.8353432", "0.83477384" ]
0.0
-1
=========================================================================== Reverse the first len bits of a code, using straightforward code (a faster method would use a table) IN assertion: 1 <= len <= 15
function bi_reverse(code, len) { var res = 0; do { res |= code & 1; code >>>= 1; res <<= 1; } while (--len > 0); return res >>> 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bi_reverse(code, len) {\n\t\tvar res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >> 1;\n\t}", "function bi_reverse(code, len) {\n var res = 0;\n\n do {\n res |= code & 1;\n code >>>= 1;\n r...
[ "0.7971538", "0.79377985", "0.7926397", "0.79039055", "0.79021436", "0.78989965", "0.7893038", "0.7874789", "0.7856889", "0.78369194", "0.78369194", "0.78369194", "0.78369194", "0.78369194", "0.78369194", "0.78369194", "0.78369194", "0.78369194" ]
0.0
-1
=========================================================================== Flush the bit buffer, keeping at most 7 bits in it.
function bi_flush(s) { if (s.bi_valid === 16) { put_short(s, s.bi_buf); s.bi_buf = 0; s.bi_valid = 0; } else if (s.bi_valid >= 8) { s.pending_buf[s.pending++] = s.bi_buf & 0xff; s.bi_buf >>= 8; s.bi_valid -= 8; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bi_flush(s) {\n\t if (s.bi_valid === 16) {\n\t put_short(s, s.bi_buf);\n\t s.bi_buf = 0;\n\t s.bi_valid = 0;\n\t\n\t } else if (s.bi_valid >= 8) {\n\t s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n\t s.bi_buf >>= 8;\n\t s.bi_valid -= 8;\n\t }\n\t }", "function bi...
[ "0.61976147", "0.6166657", "0.6141256", "0.6115985", "0.61072356", "0.6072232", "0.6072232", "0.6072232", "0.6072232", "0.6072232", "0.6072232", "0.6072232", "0.6072232", "0.6072232", "0.60623586", "0.60252243", "0.58954155" ]
0.0
-1
=========================================================================== Compute the optimal bit lengths for a tree and update the total bit length for the current block. IN assertion: the fields freq and dad are set, heap[heap_max] and above are the tree nodes sorted by increasing frequency. OUT assertions: the fie...
function gen_bitlen(s, desc) // deflate_state *s; // tree_desc *desc; /* the tree descriptor */ { var tree = desc.dyn_tree; var max_code = desc.max_code; var stree = desc.stat_desc.static_tree; var has_stree = desc.stat_desc.has_stree; var extra = desc.stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gen_bitlen(s, desc) // deflate_state *s;\n // tree_desc *desc; /* the tree descriptor */\n {\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra =...
[ "0.7310192", "0.72961044", "0.7278004", "0.7245382", "0.7242131", "0.7229786", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "0.72161794", "...
0.0
-1
=========================================================================== Generate the codes for a given tree and bit counts (which need not be optimal). IN assertion: the array bl_count contains the bit length statistics for the given tree and the field len is set for all tree elements. OUT assertion: the field code...
function gen_codes(tree, max_code, bl_count) // ct_data *tree; /* the tree to decorate */ // int max_code; /* largest code with non zero frequency */ // ushf *bl_count; /* number of codes at each bit length */ { var next_code = new Array(MAX_BITS+1); /* next code value for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gen_codes(tree, max_code, bl_count) // ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1);\n /* next ...
[ "0.82030475", "0.817848", "0.81344014", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", "0.8130681", ...
0.8137075
24
=========================================================================== Initialize the various 'constant' tables.
function tr_static_init() { var n; /* iterates over tree elements */ var bits; /* bit counter */ var length; /* length value */ var code; /* code value */ var dist; /* distance index */ var bl_count = new Array(MAX_BITS+1); /* number of codes at each bit length for an optimal tree */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Constants() {}", "function Constants() {}", "function setConstants() {\n squareConfigs.constantValues = {\n x: squareConfigs.dimensions.x,\n y: squareConfigs.dimensions.y,\n w: squareConfigs.dimensions.w,\n h: squareConfigs.dimensions.h,\n\n actuallyConstantX: squ...
[ "0.6477462", "0.6477462", "0.6084643", "0.5989747", "0.59109056", "0.579599", "0.5717196", "0.5694086", "0.5694086", "0.5694086", "0.5659585", "0.55818164", "0.558161", "0.5556769", "0.5543848", "0.5535738", "0.5528524", "0.5462032", "0.5461605", "0.54583144", "0.5440198", ...
0.0
-1
=========================================================================== Initialize a new block.
function init_block(s) { var n; /* iterates over tree elements */ /* Initialize the trees. */ for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; } for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; } for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; } s.dyn_ltree[END_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() { \n \n Block.initialize(this);\n }", "constructor(genesisBlock) {\n\n this.blocks = [];\n\n //2 [0, 2]\n this.addBlock(genesisBlock);\n }", "function init_block() {\n\t\tvar n; // iterates over tree elements\n\n\t\t// Initialize the trees.\n\t\tfor (n = 0...
[ "0.8056365", "0.7342965", "0.7319945", "0.7095824", "0.70780075", "0.7075087", "0.7068257", "0.70115083", "0.6973862", "0.6937791", "0.6902216", "0.6891296", "0.68896234", "0.6884551", "0.68490547", "0.6840111", "0.6802844", "0.68015593", "0.6768908", "0.6744197", "0.6713622"...
0.66690433
46
=========================================================================== Flush the bit buffer and align the output on a byte boundary
function bi_windup(s) { if (s.bi_valid > 8) { put_short(s, s.bi_buf); } else if (s.bi_valid > 0) { //put_byte(s, (Byte)s->bi_buf); s.pending_buf[s.pending++] = s.bi_buf; } s.bi_buf = 0; s.bi_valid = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bi_flush(s){if(s.bi_valid===16){put_short(s,s.bi_buf);s.bi_buf=0;s.bi_valid=0;}else if(s.bi_valid>=8){s.pending_buf[s.pending++]=s.bi_buf&0xff;s.bi_buf>>=8;s.bi_valid-=8;}}", "function bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n ...
[ "0.6588064", "0.6497159", "0.6488631", "0.6452589", "0.6426544", "0.63282317", "0.63277125", "0.6314214", "0.6314214", "0.6314214", "0.6314214", "0.6314214", "0.6314214", "0.6314214", "0.6314214", "0.6314214", "0.6227526", "0.6213828", "0.6213828", "0.6213828", "0.6213828", ...
0.0
-1
=========================================================================== Copy a stored block, storing first the length and its one's complement if requested.
function copy_block(s, buf, len, header) //DeflateState *s; //charf *buf; /* the input data */ //unsigned len; /* its length */ //int header; /* true if block header must be written */ { bi_windup(s); /* align on byte boundary */ if (header) { put_short(s, len); put_short(s, ~len); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copy_block(s,buf,len,header)//DeflateState *s;\n //charf *buf; /* the input data */\n //unsigned len; /* its length */\n //int header; /* true if block header must be written */\n {bi_windup(s);/* align on byte boundary */if(header){put_short(s,len);put_short(s,~len);}// while (len--)...
[ "0.678666", "0.6686689", "0.6685482", "0.6682091", "0.66631144", "0.66631144", "0.6659264", "0.66396034", "0.66011596", "0.6587834", "0.6572326", "0.65491056", "0.653225", "0.6522475", "0.6462461" ]
0.66295946
85
=========================================================================== Compares to subtrees, using the tree depth as tie breaker when the subtrees have equal frequency. This minimizes the worst case length.
function smaller(tree, n, m, depth) { var _n2 = n*2; var _m2 = m*2; return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smaller(tree,n,m,depth){var _n2=n*2;var _m2=m*2;return tree[_n2]/*.Freq*/<tree[_m2]/*.Freq*/||tree[_n2]/*.Freq*/===tree[_m2]/*.Freq*/&&depth[n]<=depth[m];}", "function smaller(tree, n, m, depth) {\n const _n2 = n * 2;\n const _m2 = m * 2;\n return tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n ...
[ "0.64469874", "0.60803324", "0.5934289", "0.589644", "0.58895206", "0.58659226", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", "0.5861905", ...
0.58711904
25
=========================================================================== Restore the heap property by moving down the tree starting at node k, exchanging a node with the smallest of its two sons if necessary, stopping when the heap property is reestablished (each father smaller than its two sons).
function pqdownheap(s, tree, k) // deflate_state *s; // ct_data *tree; /* the tree to restore */ // int k; /* node to move down */ { var v = s.heap[k]; var j = k << 1; /* left son of k */ while (j <= s.heap_len) { /* Set j to the smallest of the two sons: */ if (j < s.heap_len && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "swim(k) {\n while (k > 1 && this.heap[Math.floor(k/2)].priority > this.heap[k].priority) {\n /*\n * While not at root node, swap k (parent) with k/2 (child) if\n * parent > child. Continue swimming upwards until the invariant holds.\n */\n [this.heap[k], this.heap[Math.floor(k/2)]]\n...
[ "0.8100696", "0.7786214", "0.7684644", "0.7658836", "0.7649785", "0.7647308", "0.7631074", "0.7631074", "0.7631074", "0.7631074", "0.7631074", "0.7631074", "0.76270545", "0.76270545", "0.7623064", "0.76088023", "0.7603816", "0.75517195", "0.75347507", "0.75347507", "0.7534750...
0.0
-1
inlined manually var SMALLEST = 1; / =========================================================================== Send the block data compressed using the given Huffman trees
function compress_block(s, ltree, dtree) // deflate_state *s; // const ct_data *ltree; /* literal tree */ // const ct_data *dtree; /* distance tree */ { var dist; /* distance of matched string */ var lc; /* match length or unmatched char (if dist == 0) */ var lx = 0; /* runn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send_tree(s,tree,max_code)// deflate_state *s;\n // ct_data *tree; /* the tree to be scanned */\n // int max_code; /* and its largest code of non zero frequency */\n {var n;/* iterates over all tree elements */var prevlen=-1;/* last emitted length */var curlen;/* length of current code *...
[ "0.70694613", "0.6978705", "0.6972461", "0.6965995", "0.6906903", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", "0.6906186", ...
0.0
-1
=========================================================================== Construct one Huffman tree and assigns the code bit strings and lengths. Update the total bit length for the current block. IN assertion: the field freq is set for all tree elements. OUT assertions: the fields len and code are set to the optima...
function build_tree(s, desc) // deflate_state *s; // tree_desc *desc; /* the tree descriptor */ { var tree = desc.dyn_tree; var stree = desc.stat_desc.static_tree; var has_stree = desc.stat_desc.has_stree; var elems = desc.stat_desc.elems; var n, m; /* iterate over heap elements */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_bl_tree() {\n\t\tvar max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbuild_tr...
[ "0.6371719", "0.63665086", "0.6333171", "0.6235446", "0.62348443", "0.6192163", "0.6171294", "0.61624026", "0.61611164", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077", "0.6161077",...
0.0
-1
=========================================================================== Scan a literal or distance tree to determine the frequencies of the codes in the bit length tree.
function scan_tree(s, tree, max_code) // deflate_state *s; // ct_data *tree; /* the tree to be scanned */ // int max_code; /* and its largest code of non zero frequency */ { var n; /* iterates over all tree elements */ var prevlen = -1; /* last emitted length */ var curl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scan_tree(tree, // the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t\t) {\n\t\t var n; // iterates over all tree elements\n \n\t\t var prevlen = -1; // last emitted length\n \n\t\t var curlen; // length of current code\n \n\t\t var nextlen = tree[0 * 2 + 1]; // ...
[ "0.7196888", "0.7099034", "0.7092436", "0.70759386", "0.706675", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "0.7054964", "...
0.70580226
27
=========================================================================== Send a literal or distance tree in compressed form, using the codes in bl_tree.
function send_tree(s, tree, max_code) // deflate_state *s; // ct_data *tree; /* the tree to be scanned */ // int max_code; /* and its largest code of non zero frequency */ { var n; /* iterates over all tree elements */ var prevlen = -1; /* last emitted length */ var cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send_all_trees(lcodes, dcodes, blcodes) {\n\t\t var rank; // index in bl_order\n \n\t\t send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n \n\t\t send_bits(dcodes - 1, 5);\n\t\t send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n \n\t\t for (rank = 0; rank < blcodes; ra...
[ "0.721052", "0.6960736", "0.6942097", "0.6926114", "0.6910601", "0.6898549", "0.6897821", "0.6881878", "0.68465155", "0.6825804", "0.68159336", "0.6795697", "0.6787552", "0.6787552", "0.6787552", "0.6787552", "0.6787552", "0.6787552", "0.6787552", "0.6787552", "0.6787552", ...
0.0
-1
=========================================================================== Construct the Huffman tree for the bit lengths and return the index in bl_order of the last bit length code to send.
function build_bl_tree(s) { var max_blindex; /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ scan_tree(s, s.dyn_ltree, s.l_desc.max_code); scan_tree(s, s.dyn_dtree, s.d_desc.max_code); /* Build the bit length tree: */ build_tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_bl_tree() {\n\t\tvar max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbuild_tr...
[ "0.7984391", "0.79464096", "0.73637545", "0.7298226", "0.7285736", "0.7285724", "0.724746", "0.7231646", "0.7228964", "0.7219668", "0.7219668", "0.7219668", "0.7219668", "0.7219668", "0.7218879", "0.7215603", "0.7215603", "0.7182199", "0.7176828", "0.7176828", "0.7176828", ...
0.0
-1
=========================================================================== Send the header for a block using dynamic Huffman trees: the counts, the lengths of the bit length codes, the literal tree and the distance tree. IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
function send_all_trees(s, lcodes, dcodes, blcodes) // deflate_state *s; // int lcodes, dcodes, blcodes; /* number of codes for each tree */ { var rank; /* index in bl_order */ //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); //Assert (lcodes <= L_CODES && dco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_bl_tree() {\n\t\t var max_blindex; // index of last bit length code of non zero freq\n\t\t // Determine the bit length frequencies for literal and distance trees\n \n\t\t scan_tree(dyn_ltree, l_desc.max_code);\n\t\t scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree:\n \n\t\t ...
[ "0.605133", "0.58291775", "0.5769802", "0.5747375", "0.56533957", "0.56533957", "0.56533957", "0.56533957", "0.5626713", "0.55912226", "0.55687624", "0.556751", "0.55406004", "0.55307066", "0.55298615", "0.55298615", "0.55298615", "0.55298615", "0.55298615", "0.55298615", "0....
0.0
-1
=========================================================================== Initialize the tree data structures for a new zlib stream.
function _tr_init(s) { if (!static_init_done) { tr_static_init(); static_init_done = true; } s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); s.bi_buf = 0; s.bi_valid = 0; /* Initi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_init() {\n this.__lookupTable = new qx.data.Array();\n this.__openNodes = [];\n this.__nestingLevel = [];\n this._initLayer();\n }", "function _tr_init(s){if(!static_init_done){tr_static_init();static_init_done=true;}s.l_desc=new TreeDesc(s.dyn_ltree,static_l_desc);s.d_desc=new TreeDesc(s...
[ "0.6510822", "0.6424953", "0.6375535", "0.63501585", "0.6259595", "0.6178484", "0.6144798", "0.61362624", "0.6128932", "0.60982025", "0.6096389", "0.60900533" ]
0.61420107
90
=========================================================================== Send a stored block
function _tr_stored_block(s, buf, stored_len, last) //DeflateState *s; //charf *buf; /* input block */ //ulg stored_len; /* length of input block */ //int last; /* one if this is the last block for a file */ { send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3); /* send block type */ copy_block(s, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "messageSent (peerId, block) {\n const ledger = this._findOrCreate(peerId)\n ledger.sentBytes(block ? block.data.length : 0)\n if (block && block.cid) {\n ledger.wantlist.remove(block.cid)\n }\n }", "messageSent (peerId, block) {\n const ledger = this._findOrCreate(peerId)\n ledger.sentByt...
[ "0.6636688", "0.6636688", "0.6435359", "0.62935793", "0.60487586", "0.60476345", "0.60344964", "0.6023343", "0.59361583", "0.58950603", "0.58587354", "0.5830017", "0.582569", "0.5822428", "0.5819708", "0.5804283", "0.57723826", "0.57716817", "0.5749839", "0.5746885", "0.57465...
0.5756371
36
=========================================================================== Send one empty static block to give enough lookahead for inflate. This takes 10 bits, of which 7 may remain in the bit buffer.
function _tr_align(s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); bi_flush(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inflate(data, usz) {\n /* shortcircuit for empty buffer [0x03, 0x00] */\n if (data[0] == 3 && !(data[1] & 0x3)) {\n return [new_raw_buf(usz), 2];\n }\n /* bit offset */\n\n\n var boff = 0;\n /* header includes final bit and type bits */\n\n ...
[ "0.528871", "0.52563787", "0.52494574", "0.52383506", "0.51888853", "0.51388097", "0.5121298", "0.51076716", "0.51043904", "0.51043904", "0.51043904", "0.51043904", "0.51019776", "0.50877845", "0.50877845", "0.50877845", "0.50877845", "0.50877845", "0.50877845", "0.50877845", ...
0.0
-1
=========================================================================== Determine the best encoding for the current block: dynamic trees, static trees or store, and output the encoded block to the zip file.
function _tr_flush_block(s, buf, stored_len, last) //DeflateState *s; //charf *buf; /* input block, or NULL if too old */ //ulg stored_len; /* length of input block */ //int last; /* one if this is the last block for a file */ { var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ var m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flush_block(eof) { // true if this is the last block for a file\n\t\tvar opt_lenb, static_lenb, // opt_len and static_len in bytes\n\t\t\tmax_blindex, // index of last bit length code of non zero freq\n\t\t\tstored_len, // length of input block\n\t\t\ti;\n\n\t\tstored_len = strstart - block_start;\n\t\tfl...
[ "0.60858995", "0.5848022", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", "0.5814596", ...
0.58105415
90
=========================================================================== Save the match info and tally the frequency counts. Return true if the current block must be flushed.
function _tr_tally(s, dist, lc) // deflate_state *s; // unsigned dist; /* distance of matched string */ // unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ { //var out_length, in_length, dcode; s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; s.pending_buf[s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function track(match) {\n return counters[match] = (counters[match] || 0) + 1;\n }", "function incrementMatchCount() {\n matchCount += 2;\n}", "function checkIfCompleted() {\n matchingCards++;\n\n if (matchingCards >= Math.floor(fieldSize / 2)) {\n gameCompleted = true;\n ...
[ "0.57499295", "0.5212014", "0.51859707", "0.5111995", "0.5039224", "0.50121415", "0.49712586", "0.49325344", "0.48576874", "0.4847375", "0.48212865", "0.48212302", "0.48096582", "0.4798437", "0.47001162", "0.46869558", "0.46755353", "0.46664038", "0.4647019", "0.46444625", "0...
0.0
-1
Copyright Joyent, Inc. and other Node contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.definePro...
[ "0.6149275", "0.54203457", "0.53920096", "0.53668714", "0.53668714", "0.53668714", "0.53408384", "0.5318133", "0.5318133", "0.5318133", "0.5308971", "0.52618045", "0.5255616", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0...
0.0
-1
++++++++++++++++++++++++++++++++++++++++++++ DATA Constructor and Instances ++++++++++++++++++++++++++++++++++++++++++++
function CatalogItem (imageName, filePath) { this.imageName = imageName; this.filePath = filePath; this.tallyClicked = 0; this.tallyDisplayed = 0; //Push the object to imageArray catalogArray.push(this); imageNameArray.push(this.imageName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Data() { }", "constructor() {\n super();\n this.data = new Data();\n }", "constructor(data) { }", "constructor(data) {\n \n }", "constructor() {\n this.data = this._loadData();\n }", "constructor(data) {\n this.data = data;\n }", "constructor(dataInput) {\n ...
[ "0.7691085", "0.753114", "0.7498393", "0.73728585", "0.7296609", "0.7263449", "0.7160494", "0.7158822", "0.71553206", "0.70138717", "0.7013545", "0.69452906", "0.69428927", "0.68995243", "0.688462", "0.6873593", "0.6873593", "0.68278205", "0.68025386", "0.6752245", "0.6751113...
0.0
-1
++++++++++++++++++++++++++++++++++++++++++++ FUNCTION DECLARATIONS ++++++++++++++++++++++++++++++++++++++++++++ Function to randomly generate randomIndex1, randomIndex2, and randomIndex3
function checkForData() { if (localStorage.userResults) { catalogArray = JSON.parse(localStorage.userResults); for (var i = 0; i < catalogArray.length; i++) { imageNameArray.push(catalogArray[i].imageName); } } else { catalogArray = []; createCatalogItems(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createThreeRandomIndexes(){\n\n let randomIndexes = [];\n while (randomIndexes.length !== 3){\n let rand = generateRandomNumber();\n if(!randomIndexes.includes(rand)){\n randomIndexes.push(rand);\n\n }\n }\n return randomIndexes;\n}", "function randomIndex() {\n let n = floor(random(0...
[ "0.7604658", "0.7136812", "0.71226996", "0.6999024", "0.69741267", "0.69292235", "0.69046384", "0.6896481", "0.687405", "0.68581074", "0.68324506", "0.678987", "0.6762413", "0.6676587", "0.66665584", "0.6651931", "0.6639924", "0.66346294", "0.6617684", "0.65913737", "0.658985...
0.0
-1
Function to end survey at 25 clicks
function surveyEnd() { viewResultsButton.textContent = 'View Results'; picSection.appendChild(viewResultsButton); picSection.removeEventListener('click', handleUserClick); for (var i = 0; i < catalogArray.length; i++) { tallyClickFinal.push(catalogArray[i].tallyClicked); tallyViewFinal.push(catalogArray...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function end_trial() {\n\n // kill any remaining setTimeout handlers\n jsPsych.pluginAPI.clearAllTimeouts();\n\n // gather the data to store for the trial\n var trial_data = {\n \"rt\": Math.round(performance.now() - trial_onset),\n \"digit_response\": digit_response,\n 'cl...
[ "0.64227456", "0.6413096", "0.6383165", "0.6315035", "0.61615896", "0.6158293", "0.6154531", "0.61421865", "0.61421865", "0.6108407", "0.60826856", "0.60767287", "0.6074042", "0.6061887", "0.60602075", "0.6058682", "0.60495466", "0.6020223", "0.6019584", "0.60044336", "0.5961...
0.66317606
0
Function to Load Images to Page
function loadImages() { if (surveyLength > 24) { surveyEnd(); } lastIndex = []; lastIndex.push(randomIndex1); lastIndex.push(randomIndex2); lastIndex.push(randomIndex3); //Re-assigning the variables for each picture randomIndexGenerator(); //While loop to prevent double choices AND no prior ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadImages() {\n\t\t const button = document.querySelector('#loadImages');\n\t\t const container = document.querySelector('#image-container');\n\n\t\t button.addEventListener(\"click\", (event) => {\n\n\t\t const images = imageNames();\n\t\t images.forEach((image) => {\n\t\t ...
[ "0.7676688", "0.731364", "0.73070186", "0.71697855", "0.7169777", "0.7163216", "0.7148358", "0.7096101", "0.70113856", "0.6933231", "0.6932604", "0.6905027", "0.6893312", "0.6842709", "0.68203217", "0.6815961", "0.68065524", "0.6800416", "0.6784943", "0.6782312", "0.6781785",...
0.0
-1
Event Handler for click on picture
function handleUserClick(event) { event.preventDefault(); if (event.target.id === 'left') { catalogArray[randomIndex1].tallyClicked += 1; } else if (event.target.id === 'center') { catalogArray[randomIndex2].tallyClicked += 1; } else if (event.target.id === 'right') { catalogArray[randomIndex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onImageClick() {\n console.log('Clicked Image')\n }", "function imgClick(event) {\n\n}", "imageClickHandler() {\n\t\tconst {data} = this.props,\n\t\t\tlistOfPhotos = document.querySelector('.gallery__photo-list');\n\n\t\tlistOfPhotos.addEventListener('click', e => {\n\t\t\tconst {target} = e,\n\t\t\t...
[ "0.793244", "0.7913272", "0.75001377", "0.72610736", "0.721918", "0.7161421", "0.71362853", "0.7103456", "0.7090242", "0.70852727", "0.70203173", "0.70005375", "0.6998707", "0.6914208", "0.69108677", "0.6900724", "0.6889584", "0.6857063", "0.68258864", "0.68070686", "0.680617...
0.0
-1
Function to Draw Chart
function drawChart() { var ctx = canvas.getContext('2d'); var myBarChart = new Chart(ctx, { type: 'bar', data: data, // options: { // responsive: false // } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_drawChart()\n {\n\n }", "function drawChart() {\n stroke(0);\n yAxis();\n xAxis();\n}", "function drawChart(arr) {\n drawSleepChart(arr);\n drawStepsChart(arr);\n drawCalorieChart(arr);\n drawHeartRateChart(arr);\n}", "function drawChart() {\n\n // Create the data table.\n var data = ...
[ "0.7766029", "0.74025255", "0.7394388", "0.7315559", "0.7298981", "0.7275957", "0.72704506", "0.7261915", "0.7242139", "0.7208406", "0.7186227", "0.7163451", "0.7124008", "0.7106811", "0.7092066", "0.7067875", "0.7059014", "0.703996", "0.7032495", "0.7031648", "0.7017393", ...
0.0
-1
setup pagination if amount of merchants is greater than per page value
setupPaginator(newProps) { if (this.state.filteredRows.length) { return this.state.filteredRows.length > this.state.perPage; } return newProps.merchants ? newProps.merchants.length > this.state.perPage : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handlePageClick(data) {\n const selected = data.selected;\n const offset = Math.ceil(selected * this.state.perPage);\n\n this.setState({\n offset,\n currentPage: selected + 1,\n merchants: this.state.totalRows.slice(offset, offset + this.state.perPage),\n filteredRowsPaged: this.state....
[ "0.6467618", "0.633153", "0.6129411", "0.6013692", "0.5927074", "0.585987", "0.5831542", "0.58012784", "0.57862914", "0.5755217", "0.57505757", "0.57426834", "0.5725534", "0.5725534", "0.56920147", "0.5682638", "0.5668438", "0.5666397", "0.56599253", "0.5656082", "0.56547046"...
0.7424281
0
Handle pagination for complex merchant table
handlePageClick(data) { const selected = data.selected; const offset = Math.ceil(selected * this.state.perPage); this.setState({ offset, currentPage: selected + 1, merchants: this.state.totalRows.slice(offset, offset + this.state.perPage), filteredRowsPaged: this.state.filteredRows....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pagination(tableID) {\n var table = tableID;\n var trnum = 0;\n var maxRows = 15;\n var totalRows = $(table + \" tbody tr[class*='inList']\").length;\n $(table + \" tbody tr[class*='inList']\").each(function () {\n trnum++;\n if (trnum > maxRows) {\n $(this).hide();...
[ "0.6467562", "0.6442428", "0.6293526", "0.62678313", "0.6221835", "0.6221805", "0.62183696", "0.62111676", "0.61271375", "0.61058706", "0.6097933", "0.6077092", "0.60657465", "0.6065403", "0.6050341", "0.60414356", "0.6007577", "0.5992503", "0.5990029", "0.5979477", "0.597089...
0.64169353
2
Get pagination for complex merchant table; reactabular table lives in Table.js
get paginator() { if (this.pagination && this.props.globalSelector.orgIds.length > 0) { const pageCount = this.state.filterText !== '' ? this.state.filteredPageCount : this.state.pageCount; return ( <Pagination handlePageClick={this.handlePageClick} pageCount={pageCount} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderPagination() {\n if (!_.isEmpty(this.props.pageMeta)) {\n const lastRecord = this.props.pageMeta.current_items_count + this.props.pageMeta.offset;\n const firstRecord = this.props.pageMeta.offset + 1;\n const totalItemsCount = this.props.pageMeta.total_items_count;\n\n...
[ "0.6724144", "0.6720494", "0.6720114", "0.66668576", "0.651038", "0.64357287", "0.6402743", "0.6393985", "0.63901496", "0.6385102", "0.63843", "0.63843", "0.6376642", "0.637434", "0.63591236", "0.63526535", "0.63466215", "0.63443977", "0.63443035", "0.6293342", "0.62765706", ...
0.61404717
31
Search complex merchant table
filterRows(searchString, columnsToSearch) { const lowercaseSearchString = searchString || ''; const objKeyLength = columnsToSearch.length; this.setState((prevState) => { const newRows = { filteredRows: prevState.totalRows.filter((row) => { for (let i = 0; i < objKeyLength; i += 1) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async index(ctx) {\n const { request, response } = ctx\n\n try {\n const q = await GetRequestQuery(ctx)\n const redisKey = `DownPayment_${q.redisKey}`\n let cached = await RedisHelper.get(redisKey)\n\n if (cached && !q.search) {\n console.log(redisKey)\n return cached\n ...
[ "0.58776355", "0.5789239", "0.5677279", "0.5620365", "0.55751693", "0.55638516", "0.55566597", "0.55396926", "0.55245984", "0.55237097", "0.55235994", "0.5513817", "0.5482206", "0.5473594", "0.546288", "0.54501927", "0.5425111", "0.5424942", "0.5405259", "0.53923196", "0.5384...
0.0
-1
Parse through merchants to create global selector hierarchy
globalSelectorGroup(merchants) { const trueHierarchy = createSelectorBar(merchants); this.setState({ globalSelectorGroup: trueHierarchy, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get selectors () {\n return _.extend(super.selectors, {\n node: '.arc',\n highlight: '.highlight',\n })\n }", "parseTreeSelector() {\n this.skipSpace(); // Ignore space after a comma, for example\n\n // A tree selector must begin with a node selector\n let ns = this.parseNod...
[ "0.5643752", "0.564177", "0.5522093", "0.5512223", "0.55110604", "0.54667956", "0.53392327", "0.5235726", "0.51027375", "0.5054602", "0.498947", "0.498947", "0.4982487", "0.49774575", "0.49722803", "0.49584448", "0.4940216", "0.4940216", "0.4940216", "0.4940216", "0.4917505",...
0.65161645
0
Helper function for sorting
compareBy(a, b) { const { key, order } = this.state.sort; if (key && order) { if (a[key] < b[key]) return -1; if (a[key] > b[key]) return 1; return 0; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sort() {}", "sort() {\n\t}", "sort() {\n\t}", "sort(){\n\n }", "function sorter(a,b) {\n return a - b;\n}", "function sortData (data) {\n ...\n}", "function sortFunction(val){\n return val.sort();\n}", "Sort() {\n\n }", "function sortAsc(a, b) {\n return a - b;\n }", "fu...
[ "0.81394196", "0.77322215", "0.77322215", "0.77019256", "0.7466116", "0.74345654", "0.74153644", "0.7377754", "0.7324186", "0.7306006", "0.72732276", "0.720845", "0.7200787", "0.7200787", "0.7200787", "0.7200787", "0.7182604", "0.71309775", "0.71250474", "0.7122583", "0.71096...
0.0
-1
All functions to be called on $(document).ready() should be in this function
function edgtfOnDocumentReady() { edgtfButton().init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function initOnDomReady() {}", "function edgtfOnDocumentReady() {\n edgtfHeaderBehaviour();\n edgtfSideArea();\n edgtfSideAreaScroll();\n edgtfFullscreenMenu();\n edgtfInitMobil...
[ "0.7637316", "0.7295945", "0.72917986", "0.7147366", "0.70661527", "0.6997775", "0.69576925", "0.69490075", "0.69365877", "0.68800694", "0.6833077", "0.682541", "0.682541", "0.682541", "0.682541", "0.67614293", "0.6753088", "0.672049", "0.6687089", "0.6669767", "0.6669577", ...
0.0
-1
Rotate Memory or Accumulator Left Absolute 0x2E
function _rotateLeftAbsolute() { this.name = "Rotate Memory or Accumulator Left Absolute" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.ABSOLUTE; this.mnemonic = 'ROL' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateLeftAbsoluteX() {\n this.name = \"Rotate Memory or Accumulator Left Absolute Indexed X\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.ABSOLUTE_INDEXED_X;\n this.mnemonic = 'ROL'\n}", "function _rotateRightAccumulator() {\n this.name = \"Rotate Memory or...
[ "0.74343175", "0.7421901", "0.73863924", "0.7303731", "0.68298024", "0.68284976", "0.68062663", "0.6724552", "0.65210956", "0.64577603", "0.6437752", "0.6413913", "0.63327265", "0.6285353", "0.62688637", "0.62613565", "0.62381095", "0.62231946", "0.62231946", "0.6216956", "0....
0.76143837
0
Rotate Memory or Accumulator Left Direct Page 0x26
function _rotateLeftDP() { this.name = "Rotate Memory or Accumulator Left Direct Page" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.DIRECT_PAGE; this.mnemonic = 'ROL' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateLeftDPX() {\n this.name = \"Rotate Memory or Accumulator Left Direct Page Indexed X\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.DIRECT_PAGE_INDEXED_X;\n this.mnemonic = 'ROL'\n}", "function _rotateRightDP() {\n this.name = \"Rotate Memory or Accumula...
[ "0.763694", "0.7465139", "0.73501825", "0.66468763", "0.6616651", "0.651152", "0.63243204", "0.61665314", "0.6058135", "0.5943482", "0.58843964", "0.5882576", "0.5870193", "0.5856959", "0.5856959", "0.5856959", "0.5856959", "0.5847049", "0.5834506", "0.58283377", "0.5827183",...
0.787481
0
Rotate Memory or Accumulator Left Absolute Indexed X 0x3E
function _rotateLeftAbsoluteX() { this.name = "Rotate Memory or Accumulator Left Absolute Indexed X" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.ABSOLUTE_INDEXED_X; this.mnemonic = 'ROL' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateRightAbsoluteX() {\n this.name = \"Rotate Memory or Accumulator Right Absolute Indexed X\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.ABSOLUTE_INDEXED_X;\n this.mnemonic = 'ROR'\n}", "function _rotateLeftAbsolute() {\n this.name = \"Rotate Memory or A...
[ "0.74959373", "0.7276008", "0.7002946", "0.68736386", "0.68279", "0.6760987", "0.6574002", "0.6554996", "0.6518214", "0.63686377", "0.62289166", "0.6228141", "0.62104076", "0.62104076", "0.61825615", "0.6167251", "0.6167251", "0.6167251", "0.6167251", "0.61502266", "0.6143089...
0.7733791
0
Rotate Memory or Accumulator Left Direct Page Indexed X 0x36
function _rotateLeftDPX() { this.name = "Rotate Memory or Accumulator Left Direct Page Indexed X" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.DIRECT_PAGE_INDEXED_X; this.mnemonic = 'ROL' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateLeftDP() {\n this.name = \"Rotate Memory or Accumulator Left Direct Page\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.DIRECT_PAGE;\n this.mnemonic = 'ROL'\n}", "function _rotateRightDPX() {\n this.name = \"Rotate Memory or Accumulator Right Direct Pag...
[ "0.780992", "0.747796", "0.7469967", "0.6591143", "0.6552049", "0.6551099", "0.62893796", "0.60578746", "0.5895792", "0.58441675", "0.57939506", "0.57722104", "0.5734263", "0.5716874", "0.5713662", "0.56871134", "0.5649602", "0.5645618", "0.5620337", "0.5620337", "0.55897045"...
0.76863647
1
Rotate Memory or Accumulator Right Accumulator 0x6A
function _rotateRightAccumulator() { this.name = "Rotate Memory or Accumulator Right Accumulator" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.ACCUMULATOR; this.mnemonic = 'ROR' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateRightAbsolute() {\n this.name = \"Rotate Memory or Accumulator Right Absolute\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.ABSOLUTE;\n this.mnemonic = 'ROR'\n}", "function _rotateRightAbsoluteX() {\n this.name = \"Rotate Memory or Accumulator Right Ab...
[ "0.7301488", "0.729129", "0.70738417", "0.70512545", "0.65957963", "0.64361584", "0.63505715", "0.63399667", "0.63057214", "0.63057214", "0.62479144", "0.61860484", "0.61491376", "0.6098807", "0.6088369", "0.6042117", "0.60115093", "0.58827204", "0.5880513", "0.5857465", "0.5...
0.8431012
0
Rotate Memory or Accumulator Right Absolute 0x6E
function _rotateRightAbsolute() { this.name = "Rotate Memory or Accumulator Right Absolute" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.ABSOLUTE; this.mnemonic = 'ROR' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateRightAccumulator() {\n this.name = \"Rotate Memory or Accumulator Right Accumulator\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.ACCUMULATOR;\n this.mnemonic = 'ROR'\n}", "function _rotateRightAbsoluteX() {\n this.name = \"Rotate Memory or Accumulator...
[ "0.7658909", "0.745342", "0.6927619", "0.6870383", "0.67823464", "0.6642205", "0.64832926", "0.64832926", "0.62943846", "0.62934655", "0.6185984", "0.6174134", "0.61561877", "0.61384267", "0.6127303", "0.6108802", "0.61074764", "0.59991443", "0.5984363", "0.59635574", "0.5940...
0.7432865
2
Rotate Memory or Accumulator Right Direct Page 0x66
function _rotateRightDP() { this.name = "Rotate Memory or Accumulator Right Direct Page" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.DIRECT_PAGE; this.mnemonic = 'ROR' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateRightDPX() {\n this.name = \"Rotate Memory or Accumulator Right Direct Page Indexed X\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.DIRECT_PAGE_INDEXED_X;\n this.mnemonic = 'ROR'\n}", "function _rotateRightAccumulator() {\n this.name = \"Rotate Memory ...
[ "0.7542031", "0.7105379", "0.69513595", "0.67965776", "0.67398393", "0.64333797", "0.62827593", "0.6184053", "0.607957", "0.6031022", "0.5983472", "0.59147984", "0.585667", "0.58494437", "0.5706723", "0.5706723", "0.5685161", "0.564845", "0.56215155", "0.5583932", "0.5549265"...
0.78634083
0
Rotate Memory or Accumulator Right Absolute Indexed X 0x7E
function _rotateRightAbsoluteX() { this.name = "Rotate Memory or Accumulator Right Absolute Indexed X" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.ABSOLUTE_INDEXED_X; this.mnemonic = 'ROR' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateRightAccumulator() {\n this.name = \"Rotate Memory or Accumulator Right Accumulator\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.ACCUMULATOR;\n this.mnemonic = 'ROR'\n}", "function _rotateRightAbsolute() {\n this.name = \"Rotate Memory or Accumulator ...
[ "0.72784024", "0.7242633", "0.721157", "0.70793945", "0.6726225", "0.6678231", "0.66013414", "0.66013414", "0.6499178", "0.63041914", "0.61889285", "0.6124849", "0.6048723", "0.5944712", "0.5929002", "0.5923633", "0.5921155", "0.5914576", "0.5908073", "0.5898166", "0.5894169"...
0.782805
0
Rotate Memory or Accumulator Right Direct Page Indexed X 0x76
function _rotateRightDPX() { this.name = "Rotate Memory or Accumulator Right Direct Page Indexed X" this.argCount = 0; this.size = Size.MEMORY_A; this.addrMode = AddressingMode.DIRECT_PAGE_INDEXED_X; this.mnemonic = 'ROR' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _rotateRightDP() {\n this.name = \"Rotate Memory or Accumulator Right Direct Page\"\n this.argCount = 0;\n this.size = Size.MEMORY_A;\n this.addrMode = AddressingMode.DIRECT_PAGE;\n this.mnemonic = 'ROR'\n}", "function _rotateRightAbsoluteX() {\n this.name = \"Rotate Memory or Accumulator Right Ab...
[ "0.77308357", "0.6866606", "0.6806523", "0.6764412", "0.67368245", "0.6629825", "0.60565335", "0.60262495", "0.5934687", "0.59247136", "0.59247136", "0.5909182", "0.5857056", "0.5799374", "0.5730875", "0.5659945", "0.56086606", "0.5555327", "0.5534251", "0.5532459", "0.552765...
0.7789457
0
click a slide in slide thumbnails > change slide
function showSlide(id) { // changing slide -> reset selected element selectedElement = null; if (selectedSlide != null) { selectedSlide.classList.remove('uiSlideSelected'); } selectedSlide = $('#' + id); selectedSlide.classList.add('uiSlideSelected'); var action = "chan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchSlide () {\n grabNextSlide();\n loadSlide();\n }", "function showSlides() {\n slideIndex++;\n showSlidesByClick(slideIndex);\n}", "function slideShow() {\n $thumbArray\n .eq(index) // eq selects the element at the given index\n .trigger('click'); /...
[ "0.7284267", "0.72596025", "0.718012", "0.7054175", "0.7038622", "0.68316835", "0.67867446", "0.6740162", "0.6681874", "0.6622672", "0.65616906", "0.6557785", "0.6517414", "0.65035224", "0.6490582", "0.64894557", "0.64516205", "0.644501", "0.64433914", "0.64309144", "0.642923...
0.0
-1
select an element in a slide > make editable
function selectElement(element) { console.log('new element selected'); // change class of selected (and unselected element) for styling // and make / unmake content editable // and save to database if (selectedElement != null) { selectedElement.classList.remove('uiSelected'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editable(el) {\n // set the clicked list element as editable\n el.target.contentEditable = true;\n //set the focus on this element in order to be able to change the text\n // and to keep the drag functionality working\n el.target.focus();\n}", "function toggleEditMode(mode) {\n var slides = docume...
[ "0.66210043", "0.66047364", "0.6248892", "0.62122303", "0.6202468", "0.61109245", "0.6036614", "0.5968051", "0.5952249", "0.5946495", "0.5910861", "0.5908027", "0.590312", "0.5888018", "0.5873248", "0.58478695", "0.5843096", "0.5824763", "0.57590777", "0.5709005", "0.5696458"...
0.59652174
8
triggered by a click on a slide call function to update selected item and unselect it
function unselectElement() { console.log('element unselected!'); if (selectedElement != null) { selectedElement.classList.remove('uiSelected'); selectedElement.classList.add('drag'); // set selectedElement to uneditable, then saving the changed contents selectedElement.se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unSelectItem (i) { this.toggSel(false, i); }", "doUnselectItem() {\n if (this.selected) {\n this.selected.set('selected', false);\n this.set('selected',null);\n }\n }", "function updateSelection(elem) {\n\n jQuery('.flex-item').attr(\"data-is-selected\", \"false\");\n\...
[ "0.6982529", "0.6892198", "0.68837166", "0.68206745", "0.6402647", "0.6366176", "0.6349188", "0.6330962", "0.63260204", "0.6303552", "0.62812376", "0.62789905", "0.6269649", "0.621414", "0.62036866", "0.6192106", "0.61791366", "0.61774963", "0.61719656", "0.61719656", "0.6161...
0.580751
82
triggered by elementdimension number picker ajax request to update dimensions in databse
function editElementDimensions() { console.log("edit element dimensions"); var elementId = $('#elementId').value; console.log(elementId); var element = $('#' + elementId); console.log(element); element.style.width = $('#widthPicker').value + "px"; console.log(element); va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateDimensionHandler() {\n\n // Get the current NAtural Unit\n var unit = new NaturalUnit();\n\n var id;\n\n id = $(\"#NaturalUnitList\").find('option:selected').val();\n\n unit = getReferenceUnit(id);\n if (unit.ID == -1) {\n // this is a new NAtural...
[ "0.7119299", "0.6495087", "0.6283018", "0.61688954", "0.6075968", "0.592012", "0.5852912", "0.5844542", "0.58080405", "0.5724996", "0.56657696", "0.56534666", "0.5648242", "0.56397265", "0.56374943", "0.5632622", "0.56306434", "0.5573068", "0.55637753", "0.55603683", "0.55496...
0.7309719
0
triggered from mouseup after dragging an element request element position update through ajax
function editElementPosition(selectedElement) { var left = selectedElement.getBoundingClientRect().left; var top = selectedElement.getBoundingClientRect().top; var data = {}; data.action = "editElementPosition"; data.id = selectedElement.dataset.id; data.left = left; data.top = to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onMouseUp(e) {\n // we have finished dragging\n this.isMouseDown = false;\n\n // remove specific styles\n this.options.element.classList.remove(\"dragged\");\n\n // update our end position\n this.endPosition = this.currentPosition;\n\n // send our mouse/touch positi...
[ "0.64260936", "0.6425617", "0.62787956", "0.62787956", "0.62750095", "0.62742996", "0.621151", "0.6165548", "0.61621416", "0.61463434", "0.61344", "0.610288", "0.610288", "0.60891455", "0.6087538", "0.60825616", "0.6062672", "0.6055652", "0.6052325", "0.60324657", "0.60300547...
0.62344575
6
request to update an elements' text in database
function changeText(element) { //var text = element.getElementsByClassName('textnode')[0].innerHTML; var text = element.innerHTML; var elementId = element.dataset.id; console.log("neuer Text für Element " + elementId + " ist " + text); var div = $('#lengthCalculator'); div.innerHTML ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateText(elementID, text){\n \n}", "function updateNote(noteEl) {\n const noteText = document.getElementById('note-text').value\n fetch(url + '/' + `${noteEl.parentElement.id} `, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(...
[ "0.65596914", "0.6273206", "0.6228144", "0.61891687", "0.6141462", "0.6102611", "0.6089756", "0.60776615", "0.6058269", "0.6040642", "0.60005695", "0.59905666", "0.5978067", "0.5978067", "0.5978067", "0.59659255", "0.59364766", "0.5934099", "0.5930564", "0.5893941", "0.588547...
0.61308557
5
request the deletion of an element refresh editor view
function deleteElement(id) { var elementId = $('#' + id).value; var data = {}; data.action = "deleteElement"; data.elementId = elementId; data.handler = "slide"; var url = "ajax.php"; Ajax.post(data, url, function (json) { if (json.error) { $('#activeSlid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete() {\n this.html.remove();\n }", "delete () {\n this.element = this.element.delete(this)\n }", "delete() {\n $(`#${this.idDOM}`).remove();\n }", "function onDeleteElement() {\n inputMultiElementDOM.trigger(\"ime:element:delete\");\n \n // Activate textarea\n...
[ "0.6767126", "0.6560261", "0.6551945", "0.6479844", "0.64727074", "0.6402094", "0.63449997", "0.62496346", "0.6243218", "0.6231263", "0.6220395", "0.6207248", "0.6206047", "0.6206047", "0.6192891", "0.6188038", "0.61845917", "0.6159082", "0.615455", "0.61307746", "0.6128477",...
0.0
-1
request deletion of active slide
function deleteSlide() { var data = {}; data.action = "deleteActiveSlide"; data.handler = "slide"; var url = "ajax.php"; Ajax.post(data, url, function (json) { if (json.error) { $('#activeSlideContainer').innerHTML = json.error; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteSlide() {\n var slideToDelete = $('.to-delete');\n slideToDelete.remove();\n }", "function deleteSlide(evt) {\n privates.sel.wrap.style.transitionDuration = '0s';\n privates.sel.slides[0].remove();\n privates.sel.wrap.style.transform = `translate${privates.opt.moveDirection}(...
[ "0.77357244", "0.7377002", "0.72924876", "0.7282034", "0.7161172", "0.6709938", "0.6579135", "0.65381134", "0.64747137", "0.6448782", "0.63921636", "0.6382087", "0.6324793", "0.6295693", "0.6248558", "0.6229366", "0.62201375", "0.6201239", "0.6166086", "0.616189", "0.61408406...
0.77518266
0
Automatically parses all request parameters and puts them into the `params` property of the request object. This is the union of all GET (query string) and POST (content) parameters, such that all POST parameters with the same name take precedence. Valid options include the following: maxLength The maximum length (in b...
function makeParams(app, options) { options = options || {}; var maxLength = options.maxLength; var uploadPrefix = options.uploadPrefix; function paramsApp(request) { if (request.params) { return request.call(app); // Don't overwrite existing params. } request.params = {}; merge(request....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseBody (req, res, next) {\n var uri = url.parse(req.url, true);\n req.pathname = uri.pathname;\n req.cookies = qs.parse(req.headers.cookie);\n req.query = uri.query;\n\n req.on('readable', function () {\n var body = req.read();\n var contentType = req.headers['content-type'];\n if (conten...
[ "0.56840175", "0.5627153", "0.5602417", "0.5493548", "0.5493548", "0.5485229", "0.5476286", "0.5392052", "0.538496", "0.538496", "0.538496", "0.53082705", "0.5189435", "0.5032697", "0.49922815", "0.49785656", "0.4959587", "0.49431035", "0.49431035", "0.49431035", "0.49379027"...
0.5889075
0
maak component aan en zet niet active gameobject maakt dan een refference naar game en naar gameobject
function Dcomponent(name) { this.mName = name; this.mActive = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ActiverCameraCarte(){\n\t//bascule entre la carte du jeu et la vue 3e pers\n\tcameraPerso.SetActive(!cameraPerso.activeSelf);\n\tcameraCarte.SetActive(!cameraCarte.activeSelf);\n\t\n\t//bascule l'affichage de l'interface de camera\n\tuiCarte.SetActive(!uiCarte.activeSelf);\t\n\t\n\t/*cache les textes d'in...
[ "0.65457183", "0.65092015", "0.64623725", "0.63458455", "0.6283822", "0.61846244", "0.614194", "0.6100298", "0.6001252", "0.59877", "0.5986141", "0.5972454", "0.5970727", "0.59693336", "0.5962489", "0.5929339", "0.59270525", "0.59270525", "0.59270525", "0.59270525", "0.592635...
0.0
-1
button callback: context naam of object callback is functie
function Button(iButton, iImage) { _super.call(this, "Button"); //callback, context en sound this._mCallbackFunction = iButton.mCallback; this._mContext = iButton.mContext; this._mSoundEffect = iButton.mSoundEffect; //button image info ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleButton() {}", "buttonClick(ev) {\n\n\t\t// Get the button using the index\n\t\tvar btn = this.props.buttons[ev.currentTarget.dataset.index];\n\n\t\t// If there's a callback\n\t\tif(typeof btn.callback == 'function') {\n\t\t\tbtn.callback(btn);\n\t\t} else {\n\t\t\tthis.props.close();\n\t\t}\n\t}", "funct...
[ "0.7049072", "0.7018743", "0.67045593", "0.6546951", "0.6546742", "0.64738196", "0.6413516", "0.62902", "0.61315125", "0.6113609", "0.6079787", "0.6030448", "0.6002051", "0.5983992", "0.5982074", "0.5981315", "0.5951969", "0.59450907", "0.59358037", "0.59348625", "0.5921149",...
0.0
-1
Uploads image locally in the browser To be used in ./UploadImage.js
function UploadImage(props) { const handleFileUpload = function(e) { e.stopPropagation() e.preventDefault() const file = e.target.files ? e.target.files[0] : e.dataTransfer.files[0] const reader = new FileReader() reader.onload = e => { props.handleImageUpload(e.target.result) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitImage() {\n let image = document.querySelector('input[type=file]').files[0];\n if (image) {\n encodeImageFileAsURL(image);\n } else {\n errorMessage(\"No Selected File\");\n }\n }", "function submitImage() {\n let image = document.querySelector('input[type=file]').files[0...
[ "0.7295836", "0.7295836", "0.72433865", "0.7166959", "0.71283275", "0.7034273", "0.7034118", "0.6974571", "0.6921538", "0.6919557", "0.6905386", "0.68774486", "0.6866051", "0.6850128", "0.6784523", "0.67219996", "0.6712172", "0.6634322", "0.66182846", "0.6613366", "0.6586653"...
0.0
-1
todo: merge with getNamedNodeByNameOrFindFunction
function getSymbolByNameOrFindFunction(items, nameOrFindFunc) { var findFunc; if (typeof nameOrFindFunc === "string") findFunc = function (dec) { return dec.getName() === nameOrFindFunc; }; else findFunc = nameOrFindFunc; return utils_1.ArrayUtils.find(items, findFunc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $n( root, nodeName ) { return findNodeByName(root,nodeName); }", "getNodeName() {}", "function getNodeByName(node, name) {\n\tfor (var i=0;i<node.childNodes.length;i++) {\n\t\tif (node.childNodes[i].name==name)\n\t\t\treturn node.childNodes[i];\n\t}\n}", "function nodeByName(name, root) {\n retur...
[ "0.7234405", "0.7213357", "0.6847762", "0.6753413", "0.667247", "0.64504325", "0.6433099", "0.61442745", "0.6089772", "0.60751873", "0.60433406", "0.60325", "0.60161674", "0.6013289", "0.59773445", "0.5946763", "0.5925504", "0.5894859", "0.588466", "0.5840062", "0.5824268", ...
0.0
-1
LOGIC HERE: CHECK OUT COMPONENT MOUNTING IF YOU WANT TO TRY IT OUT
render(){ //RENDER LOGIC HERE return( <div class="five columns offset-by-half text-center payCell"> <Pricing /> <Options /> </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isValid(){\n let component = this.props.component\n let key = this.props.attribute\n return !component.state.data[key].error\n }", "isValid(): boolean {\n return this.innerComponent.isValid();\n }", "function validateComponent(component) {\n const {componentUrl, componentId...
[ "0.6132408", "0.59143686", "0.5884589", "0.5827174", "0.580699", "0.57434094", "0.57434094", "0.56972545", "0.56900185", "0.56510246", "0.56259197", "0.5619333", "0.56176275", "0.56169486", "0.56101614", "0.56101614", "0.56064254", "0.5538871", "0.5495302", "0.54732376", "0.5...
0.0
-1
Compares two ArrayBuffer or ArrayBufferView objects. If bitCount is omitted, the two values must be the same length and have the same contents in every byte. If bitCount is included, only that leading number of bits have to match.
function equalBuffers(a, b, bitCount) { var remainder; if (typeof bitCount === "undefined" && a.byteLength !== b.byteLength) { return false; } var aBytes = new Uint8Array(a); var bBytes = new Uint8Array(b); var length = a.byteLength; if (typeof bitCount !== "undefi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalBuffers(a, b, bitCount) {\n var remainder;\n\n if (typeof bitCount === \"undefined\" && a.byteLength !== b.byteLength) {\n return false;\n }\n\n var aBytes = new Uint8Array(a);\n var bBytes = new Uint8Array(b);\n\n var length = a.byteLength;\n ...
[ "0.75339097", "0.6466259", "0.6395015", "0.6395015", "0.6380612", "0.6360943", "0.61681306", "0.5953913", "0.58806556", "0.5775409", "0.5770517", "0.5735271", "0.55813944", "0.556135", "0.5533317", "0.5440266", "0.54267716", "0.54244775", "0.5375167", "0.5310889", "0.5299251"...
0.75972325
0