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 |
|---|---|---|---|---|---|---|
Alternately, set max digit bits to 28 since some browsers slow down when dealing with 32bit numbers. | function am3(i,x,w,j,c,n) {
var xl = x&0x3fff, xh = x>>14;
while(--n >= 0) {
var l = this[i]&0x3fff;
var h = this[i++]>>14;
var m = xh*l+h*xl;
l = xl*l+((m&0x3fff)<<14)+w[j]+c;
c = (l>>28)+(m>>14)+xh*h;
w[j++] = l&0xfffffff;
}
return c;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function limitDigitDisplay(numb){\n return new Intl.NumberFormat('en-US', {minimumFractionDigits: 0,maximumFractionDigits: 8}).format(numb);\n}",
"function am2(i,x,w,j,c,n){var xl=x&0x7fff,xh=x>>15;while(--n>=0){var l=this[i]&0x7fff;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3ffffff... | [
"0.6339909",
"0.6063499",
"0.599789",
"0.594605",
"0.58785313",
"0.5848737",
"0.58296204",
"0.5758875",
"0.57333785",
"0.57183504",
"0.57130754",
"0.56965005",
"0.5690184",
"0.5677349",
"0.56686854",
"0.56637704",
"0.56557786",
"0.56378436",
"0.55863124",
"0.55675066",
"0.556... | 0.0 | -1 |
(protected) copy this to r | function bnpCopyTo(r) {
for(var i = this.t-1; i >= 0; --i) r[i] = this[i];
r.t = this.t;
r.s = this.s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"copyR(rv) {\nthis._r.setFromRQ(r);\nreturn this;\n}",
"copyRV(rv) {\nRQ.setQV(this._r.xyzw, rv);\nreturn this;\n}",
"copyFrom(source) {\n this.r = source.r;\n this.g = source.g;\n this.b = source.b;\n this.a = source.a;\n return this;\n }",
"setR(r) {\nthis._r = r;\nretu... | [
"0.75497603",
"0.72476476",
"0.72389024",
"0.7011037",
"0.6864913",
"0.64402145",
"0.64402145",
"0.6410029",
"0.6410029",
"0.63942933",
"0.63942933",
"0.63565814",
"0.63523525",
"0.63438",
"0.63438",
"0.63438",
"0.63438",
"0.63438",
"0.63438",
"0.63438",
"0.63438",
"0.63438... | 0.62882245 | 38 |
(protected) set from integer value x, DV <= x < DV | function bnpFromInt(x) {
this.t = 1;
this.s = (x<0)?-1:0;
if(x > 0) this[0] = x;
else if(x < -1) this[0] = x+this.DV;
else this.t = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set x(value) {this._x = value;}",
"set x(v) {}",
"set setX (x) {\n this.x = x;\n }",
"set x(value) {}",
"function fromInt(o,x) {\r\n o.t = 1;\r\n o.s = (x<0)?-1:0;\r\n if(x > 0) o[0] = x;\r\n else if(x < -1) o[0] = x+DV;\r\n else o.t = 0;\r\n}",
"function numberInSet() {\n\n}",
"static s... | [
"0.584265",
"0.5769166",
"0.56676805",
"0.55865365",
"0.5519997",
"0.54153454",
"0.54126585",
"0.5357837",
"0.5284889",
"0.52696866",
"0.5225308",
"0.5223468",
"0.5157958",
"0.513969",
"0.5135693",
"0.5114169",
"0.50854915",
"0.50443095",
"0.50248015",
"0.5018843",
"0.5010869... | 0.0 | -1 |
return bigint initialized to value | function nbv(i) { var r = nbi(); r.fromInt(i); return r; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function nbi() { return new BigInteger(null); }",
"function nbi() { return new BigInteger(null); }",
"function nbi() { return new BigInteger(null); }",
"function nbi() { return new BigInteger(null); }",
"function nbi() { return new BigInteger(null); }",
"function nbi() { return new BigInteger(null); }",
... | [
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"0.6788916",
"... | 0.0 | -1 |
(protected) set from string and radix | function bnpFromString(s,b) {
var k;
if(b == 16) k = 4;
else if(b == 8) k = 3;
else if(b == 256) k = 8; // byte array
else if(b == 2) k = 1;
else if(b == 32) k = 5;
else if(b == 4) k = 2;
else { this.fromRadix(s,b); return; }
this.t = 0;
this.s = 0;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setFromStr(name, value) {\n//---------\nreturn this.set(FourCC.fourCCInt(name), value);\n}",
"static fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error('empty string');\n if (str === 'NaN' || str === 'Infinity' || str === '+Infinity' || str === '-Infinity')\n ... | [
"0.59500855",
"0.5797865",
"0.57583916",
"0.57163745",
"0.570479",
"0.5646584",
"0.5612465",
"0.548796",
"0.5447908",
"0.5432583",
"0.5430371",
"0.5420716",
"0.5414515",
"0.5369068",
"0.535235",
"0.53480756",
"0.5347901",
"0.532566",
"0.532566",
"0.532566",
"0.5309538",
"0.... | 0.0 | -1 |
(protected) clamp off excess high words | function bnpClamp() {
var c = this.s&this.DM;
while(this.t > 0 && this[this.t-1] == c) --this.t;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function truncateWords(longText, wordLimit) {\n // longText (a String with several words in it)\n // wordLimit (an Integer that sets the number of words you want in the returned text)\n\n // declaration, assignments\n var splitWords = [];\n var numWords = 0;\n var numWords_Short = 0;\n // var ... | [
"0.6410447",
"0.62497896",
"0.6212312",
"0.61360306",
"0.6088829",
"0.602778",
"0.60098094",
"0.59800375",
"0.5962549",
"0.5930364",
"0.59274495",
"0.5911854",
"0.58764017",
"0.5866618",
"0.5858178",
"0.584635",
"0.5839283",
"0.58268946",
"0.58057034",
"0.58053905",
"0.579874... | 0.0 | -1 |
(public) return string representation in given radix | function bnToString(b) {
if(this.s < 0) return "-"+this.negate().toString(b);
var k;
if(b == 16) k = 4;
else if(b == 8) k = 3;
else if(b == 2) k = 1;
else if(b == 32) k = 5;
else if(b == 4) k = 2;
else return this.toRadix(b);
var km = (1<<k)-1, d, m = false... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bigInt2StrHelper(bi, r) {\n return bi.toString(r);\n}",
"function arrayToString(arr,radix) {\n return Array.from(arr).map(c=>(c%radix).toString(radix)).join(\"\")\n}",
"toString() {\n let res = '';\n for (let i = this.digits.length - 1; i >= 0; i--) {\n res += this.digits[... | [
"0.6569635",
"0.6452269",
"0.6398552",
"0.6398552",
"0.63979465",
"0.63979465",
"0.63979465",
"0.63979465",
"0.63979465",
"0.63979465",
"0.63979465",
"0.6391342",
"0.63456917",
"0.63456917",
"0.63392365",
"0.6335141",
"0.6324256",
"0.63225746",
"0.63225746",
"0.63225746",
"0.... | 0.63327986 | 17 |
(public) return + if this > a, if this < a, 0 if equal | function bnCompareTo(a) {
var r = this.s-a.s;
if(r != 0) return r;
var i = this.t;
r = i-a.t;
if(r != 0) return (this.s<0)?-r:r;
while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function value(a,b) {\r\na = a[1]+a[0];\r\nb = b[1]+b[0];\r\nreturn a == b ? 0 : (a < b ? -1 : 1)\r\n}",
"gt(other) { return this.cmp(other) > 0; }",
"function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r... | [
"0.7013546",
"0.6955024",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
"0.66921496",
... | 0.6656772 | 31 |
returns bit length of the integer x | function nbits(x) {
var r = 1, t;
if((t=x>>>16) != 0) { x = t; r += 16; }
if((t=x>>8) != 0) { x = t; r += 8; }
if((t=x>>4) != 0) { x = t; r += 4; }
if((t=x>>2) != 0) { x = t; r += 2; }
if((t=x>>1) != 0) { x = t; r += 1; }
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bitSize(x) {\n var j,z,w;\n for (j=x.length-1; (x[j]==0) && (j>0); j--);\n for (z=0,w=x[j]; w; (w>>=1),z++);\n z+=bpe*j;\n return z;\n }",
"function bitSize(x) {\n var j, z, w;\n for (j = x.length - 1; (x[j] == 0) && (j > 0); j--);\n for (z = 0, w = x[j]; w; (w >>= 1... | [
"0.8337857",
"0.829035",
"0.7554907",
"0.74802405",
"0.7473882",
"0.7465192",
"0.7465192",
"0.7458816",
"0.7458816",
"0.7458816",
"0.7458816",
"0.7458816",
"0.7458816",
"0.7458816",
"0.7456445",
"0.7454712",
"0.74444544",
"0.74444544",
"0.74437964",
"0.7441317",
"0.7441317",
... | 0.0 | -1 |
(public) return the number of bits in "this" | function bnBitLength() {
if(this.t <= 0) return 0;
return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnBitCount() {\n\t var r = 0, x = this.s&this.DM;\n\t for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n\t return r;\n\t }",
"function bnBitCount() {\n\t var r = 0, x = this.s&this.DM;\n\t for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n\t return r;\n\t }"... | [
"0.7724705",
"0.7724705",
"0.7695087",
"0.7681344",
"0.7667404",
"0.7667404",
"0.76382494",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
"0.7611839",
... | 0.7159938 | 72 |
(protected) r = this << nDB | function bnpDLShiftTo(n,r) {
var i;
for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
for(i = n-1; i >= 0; --i) r[i] = 0;
r.t = this.t+n;
r.s = this.s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function db_wrapper(idb) {\n\t\tObject.defineProperty(this, \"_db\", {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: false,\n\t\t\tvalue: idb,\n\t\t});\n\n\t\tstores.forEach(function (store) {\n\t\t\tObject.defineProperty(this, store, {\n\t\t\t\tconfigurable: false,\n\t\t\t\tenumerable: tr... | [
"0.5814989",
"0.5600617",
"0.5564867",
"0.55613804",
"0.5514192",
"0.54521364",
"0.5375183",
"0.5350181",
"0.532378",
"0.5322483",
"0.5318495",
"0.5165761",
"0.5160849",
"0.5160849",
"0.5146469",
"0.51333195",
"0.5132165",
"0.512582",
"0.5124944",
"0.509832",
"0.50938004",
... | 0.0 | -1 |
(protected) r = this >> nDB | function bnpDRShiftTo(n,r) {
for(var i = n; i < this.t; ++i) r[i-n] = this[i];
r.t = Math.max(this.t-n,0);
r.s = this.s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get record() {\n return new B_Record(this.get_record_bin());\n }",
"get db() {\n return this._db;\n }",
"function SDB(state) {\n var stack = state.stack;\n var n = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SDB[]'... | [
"0.5854444",
"0.57315916",
"0.5527455",
"0.54902464",
"0.5453797",
"0.5433116",
"0.541026",
"0.53947645",
"0.5382679",
"0.5362607",
"0.5358324",
"0.53390104",
"0.5283285",
"0.5275703",
"0.52659714",
"0.52251416",
"0.5208499",
"0.5181765",
"0.5149001",
"0.51464134",
"0.5127945... | 0.0 | -1 |
(protected) r = this << n | function bnpLShiftTo(n,r) {
var bs = n%this.DB;
var cbs = this.DB-bs;
var bm = (1<<cbs)-1;
var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;
for(i = this.t-1; i >= 0; --i) {
r[i+ds+1] = (this[i]>>cbs)|c;
c = (this[i]&bm)<<bs;
}
for(i = ds-1; ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"0x20(){return a << b}",
"function rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}",
"function bnpRShiftTo(n, r) {\n\t var self = this\n\t r.s = self.s\n\t var ds = Math.floor(n / self.DB)\n\t if (ds >= self.t) {\n\t r.t = 0\n\t return\n\t }\n\t var bs = n % self.DB\n\t var cbs = self.DB - bs\... | [
"0.6664859",
"0.6568819",
"0.65207016",
"0.65207016",
"0.6455807",
"0.6428635",
"0.6423152",
"0.64219934",
"0.64219934",
"0.64219934",
"0.64219934",
"0.64219934",
"0.64219934",
"0.64219934",
"0.6385169",
"0.6379712",
"0.63716114",
"0.6363762",
"0.6363762",
"0.6363762",
"0.634... | 0.0 | -1 |
(protected) r = this >> n | function bnpRShiftTo(n,r) {
r.s = this.s;
var ds = Math.floor(n/this.DB);
if(ds >= this.t) { r.t = 0; return; }
var bs = n%this.DB;
var cbs = this.DB-bs;
var bm = (1<<bs)-1;
r[0] = this[ds]>>bs;
for(var i = ds+1; i < this.t; ++i) {
r[i-ds-1] |= (this[i]&b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}",
"function rotl(x, n) {\n return x << n | x >>> (32 - n);\n}",
"function rotl(x, n) {\n return (x << n) | (x >>> (32 - n));\n}",
"function rotl( x, n ) {\n return ( x >>> ( 32 - n ) ) | ( x << n );\n }",
"function rotl(x, n) {\n re... | [
"0.6944473",
"0.6758659",
"0.67397445",
"0.67136276",
"0.66858965",
"0.6510775",
"0.6510775",
"0.6424868",
"0.6424868",
"0.6424868",
"0.6424868",
"0.6424868",
"0.6424868",
"0.6424868",
"0.63862187",
"0.635912",
"0.6358895",
"0.6358895",
"0.6358895",
"0.6343444",
"0.6343444",
... | 0.6210973 | 84 |
(protected) r = this a | function bnpSubTo(a,r) {
var i = 0, c = 0, m = Math.min(a.t,this.t);
while(i < m) {
c += this[i]-a[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
if(a.t < this.t) {
c -= a.s;
while(i < this.t) {
c += this[i];
r[i++] = c&this.DM;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function A() {\n r.call(this);\n }",
"function z(){r.call(this)}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n return this._a_;\n }",
"setR(r) {\nthis._r = r;\nreturn this;\n}",
"ap(r) {\n return ap(this, r);\n }",
"ap(r) {\n ... | [
"0.7887505",
"0.6961472",
"0.6889745",
"0.6889745",
"0.6741326",
"0.67147154",
"0.6645265",
"0.6645265",
"0.65065205",
"0.64600086",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
"0.6406615",
... | 0.0 | -1 |
(protected) r = this a, r != this,a (HAC 14.12) "this" should be the larger one if appropriate. | function bnpMultiplyTo(a,r) {
var x = this.abs(), y = a.abs();
var i = x.t;
r.t = i+y.t;
while(--i >= 0) r[i] = 0;
for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
r.s = 0;
r.clamp();
if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function self($this) {\n\treturn $this;\n}",
"subUnsafe(other) { return this.#sub(other); }",
"function z(){r.call(this)}",
"setR(r) {\nthis._r = r;\nreturn this;\n}",
"function Y(){var e=a();return this.copyTo(e),e}",
"function G(){var t=a();return this.copyTo(t),t}",
"function f() { \"use strict\"; r... | [
"0.6005108",
"0.58773667",
"0.5683513",
"0.5640879",
"0.5563781",
"0.55609363",
"0.553464",
"0.55178225",
"0.5505221",
"0.54117596",
"0.5394458",
"0.5394458",
"0.5388074",
"0.5388074",
"0.5345658",
"0.5345658",
"0.5345658",
"0.5345658",
"0.5345658",
"0.5345658",
"0.5345658",
... | 0.0 | -1 |
(protected) r = this^2, r != this (HAC 14.16) | function bnpSquareTo(r) {
var x = this.abs();
var i = r.t = 2*x.t;
while(--i >= 0) r[i] = 0;
for(i = 0; i < x.t-1; ++i) {
var c = x.am(i,x[i],r,2*i,0,1);
if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
r[i+x.t] -= x.DV;
r[i+x.t+1] = 1;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"XOR_R(r1){\n this.register_A = r1 ^ this.register_A;\n this.zero_flag = this.register_A === 0;\n this.carry_flag = false;\n this.subtraction_flag = false;\n this.half_carry_flag = false;\n }",
"RR_R(r1){\n let lo = r1 & 0x1;\n let hi = r1 >> 1;\n let rt = (lo << (BITS_A... | [
"0.64418167",
"0.6213901",
"0.61460376",
"0.61397725",
"0.6114284",
"0.60765254",
"0.60500455",
"0.6006536",
"0.59404767",
"0.59189594",
"0.59189594",
"0.5881059",
"0.5858973",
"0.582768",
"0.5787613",
"0.5737011",
"0.57346094",
"0.57191056",
"0.5687993",
"0.56511843",
"0.564... | 0.0 | -1 |
(protected) divide this by m, quotient and remainder to q, r (HAC 14.20) r != q, this != m. q or r may be null. | function bnpDivRemTo(m,q,r) {
var pm = m.abs();
if(pm.t <= 0) return;
var pt = this.abs();
if(pt.t < pm.t) {
if(q != null) q.fromInt(0);
if(r != null) this.copyTo(r);
return;
}
if(r == null) r = nbi();
var y = nbi(), ts = this.s, ms = m.s;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnpDivRemTo(m, q, r) {\n\t var self = this\n\t var pm = m.abs()\n\t if (pm.t <= 0) return\n\t var pt = self.abs()\n\t if (pt.t < pm.t) {\n\t if (q != null) q.fromInt(0)\n\t if (r != null) self.copyTo(r)\n\t return\n\t }\n\t if (r == null) r = new BigInteger()\n\t var y = new BigInteger(),... | [
"0.7360877",
"0.7360877",
"0.7356946",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"0.7326048",
"... | 0.72924936 | 61 |
(public) this mod a | function bnMod(a) {
var r = nbi();
this.abs().divRemTo(a,null,r);
if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n return this._a_;\n }",
"function ai(a) {\n this.m = a\n}",
"function M(){this.a={}}",
"set a(val) {\n\t\tthis._a_ = val * 2;\n\t}",
"set a(val) {\n\t\tthis._a_ = val * 2;\n\t}",
"function w(){this.a={... | [
"0.71102196",
"0.71102196",
"0.6818816",
"0.6425755",
"0.6398882",
"0.61737627",
"0.61737627",
"0.6133958",
"0.61257035",
"0.6110084",
"0.6063708",
"0.6057419",
"0.59832966",
"0.59351337",
"0.58691454",
"0.5861765",
"0.58456826",
"0.5839061",
"0.57936484",
"0.57804126",
"0.57... | 0.0 | -1 |
Modular reduction using "classic" algorithm | function Classic(m) { this.m = m; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function montReduce(x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * th... | [
"0.6492456",
"0.6492456",
"0.6492456",
"0.6478665",
"0.6478665",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"0.64568865",
"... | 0.0 | -1 |
(protected) return "1/this % 2^DB"; useful for Mont. reduction justification: xy == 1 (mod m) xy = 1+km xy(2xy) = (1+km)(1km) x[y(2xy)] = 1k^2m^2 x[y(2xy)] == 1 (mod m^2) if y is 1/x mod m, then y(2xy) is 1/x mod m^2 should reduce x and y(2xy) by m^2 at each step to keep size bounded. JS multiply "overflows" differentl... | function bnpInvDigit() {
if(this.t < 1) return 0;
var x = this[0];
if((x&1) == 0) return 0;
var y = x&3; // y == 1/x mod 2^2
y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnModPow(e, m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if (i <= 0) return r;\n else if (i < 18) k = 1;\n else if (i < 48) k = 3;\n else if (i < 144) k = 4;\n else if (i < 768) k = 5;\n else k = 6;\n if (i < 8)\n z = new Classic(m);\n else if (m.isEven())\n z... | [
"0.6252513",
"0.6190958",
"0.6190958",
"0.6190958",
"0.6190958",
"0.6190958",
"0.6190958",
"0.6190958",
"0.6127376",
"0.6127376",
"0.61248547",
"0.61151916",
"0.6084363",
"0.60715926",
"0.60715926",
"0.60715926",
"0.60715926",
"0.60715926",
"0.60715926",
"0.60715926",
"0.6056... | 0.0 | -1 |
x = x/R mod m (HAC 14.32) | function montReduce(x) {
while(x.t <= this.mt2) // pad x so am has enough room later
x[x.t++] = 0;
for(var i = 0; i < this.m.t; ++i) {
// faster way of calculating u0 = x[i]*mp mod DV
var j = x[i]&0x7fff;
var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod (num, m) { return ((num % m) + m) % m; }",
"function mod (num, m) { return ((num % m) + m) % m; }",
"function mod (num, m) { return ((num % m) + m) % m; }",
"function gmod(n,m){ re... | [
"0.7431943",
"0.7431943",
"0.693809",
"0.693809",
"0.693809",
"0.690342",
"0.67674375",
"0.67412084",
"0.6713338",
"0.66939044",
"0.6662061",
"0.6656487",
"0.6656487",
"0.6651071",
"0.66479003",
"0.6630517",
"0.66261876",
"0.66261876",
"0.6622791",
"0.6610281",
"0.6607287",
... | 0.0 | -1 |
r = "x^2/R mod m"; x != r | function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"stringX() {return this.x - 0.5*this.r/2;}",
"function modinv(x, m)\n{\n // calculate a,b such that a*x+b*m = g\n var [g, a, b] = GCD(x,m);\n if (a<numzero(a)) return a+m;\n return a;\n}... | [
"0.57980055",
"0.57980055",
"0.53983366",
"0.5370494",
"0.5310753",
"0.53031516",
"0.5264885",
"0.525807",
"0.5215709",
"0.52052474",
"0.5196345",
"0.51883113",
"0.51745486",
"0.51666063",
"0.51555693",
"0.51483244",
"0.51483244",
"0.51483244",
"0.51457006",
"0.513151",
"0.51... | 0.0 | -1 |
r = "xy/R mod m"; x,y != r | function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function r(r,o,a,s){e=r,t=a,n=-3*r+3*o-2*a-s,i=2*r-2*o+a+s}",
"function r(o,M){var D=o.split(\"_\");return M%10==1&&M%100!=11?D[0]:M%10>=2&&M%10<=4&&(M%100<10||M%100>=20)?D[1]:D[2]}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"stringX() ... | [
"0.53796464",
"0.53157866",
"0.52029127",
"0.52029127",
"0.5155119",
"0.5128501",
"0.50400656",
"0.500506",
"0.49794072",
"0.49479362",
"0.49291578",
"0.49291578",
"0.4891657",
"0.48885685",
"0.48766658",
"0.48707512",
"0.48656502",
"0.4853133",
"0.4827838",
"0.4821579",
"0.4... | 0.0 | -1 |
(protected) true iff this is even | function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"isEven() {\n return (this.low & 1) === 0;\n }",
"function bnpIsEven() {\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n }",
"function bnpIsEven() {\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n }",
"function bnpIsEven() {\n return ((this.t > 0) ? (... | [
"0.84073716",
"0.78738385",
"0.78738385",
"0.78640723",
"0.7858536",
"0.7858536",
"0.78366405",
"0.78366405",
"0.78366405",
"0.78306293",
"0.7743976",
"0.7743976",
"0.7730508",
"0.7654311",
"0.76520437",
"0.7645976",
"0.7642015",
"0.76310486",
"0.76310486",
"0.76310486",
"0.7... | 0.78518593 | 56 |
(protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) | function bnpExp(e,z) {
if(e > 0xffffffff || e < 1) return BigInteger.ONE;
var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
g.copyTo(r);
while(--i >= 0) {
z.sqrTo(r,r2);
if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
else { var t = r; r = r2; r2 = t; }
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sqr(number) { return number * number}",
"function mulberry32(a) {\n return function() {\n a |= 0; a = a + 0x6D2B79F5 | 0;\n var t = Math.imul(a ^ a >>> 15, 1 | a);\n t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n }\n}",
"function b... | [
"0.6781167",
"0.67234975",
"0.6677842",
"0.66450006",
"0.66405296",
"0.6639999",
"0.66381615",
"0.66381615",
"0.66102254",
"0.658782",
"0.658782",
"0.6585855",
"0.6585855",
"0.65846306",
"0.65846306",
"0.65846306",
"0.65846306",
"0.65846306",
"0.65846306",
"0.65846306",
"0.65... | 0.6117682 | 99 |
(public) this^e % m, 0 <= e < 2^32 | function bnModPowInt(e,m) {
var z;
if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
return this.exp(e,z);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnModPow(e, m) {\n var i = e.bitLength(),\n k,\n r = nbv(1),\n z;\n if (i <= 0) return r;else if (i < 18) k = 1;else if (i < 48) k = 3;else if (i < 144) k = 4;else if (i < 768) k = 5;else k = 6;\n if (i <... | [
"0.7625473",
"0.76249796",
"0.76249796",
"0.76172566",
"0.76172566",
"0.7592798",
"0.7592798",
"0.75917083",
"0.7582061",
"0.7582061",
"0.75810516",
"0.75746596",
"0.75746596",
"0.75746596",
"0.75733",
"0.75729954",
"0.7567265",
"0.7567265",
"0.75669044",
"0.7558328",
"0.7558... | 0.0 | -1 |
Copyright (c) 20052009 Tom Wu All Rights Reserved. See "LICENSE" for details. Extended JavaScript BN functions, required for RSA private ops. Version 1.1: new BigInteger("0", 10) returns "proper" zero Version 1.2: square() API, isProbablePrime fix (public) | function bnClone() { var r = nbi(); this.copyTo(r); return r; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function RSAGenerate(B,E) {\n var rng = new SecureRandom();\n var qs = B>>1;\n this.e = parseInt(E,16);\n var ee = new BigInteger(E,16);\n for(;;) {\n for(;;) {\n this.p = new BigInteger(B-qs,1,rng);\n if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbableP... | [
"0.6725159",
"0.6705545",
"0.6705545",
"0.66688067",
"0.6637839",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
"0.65964836",
... | 0.0 | -1 |
(public) return value as integer | function bnIntValue() {
if(this.s < 0) {
if(this.t == 1) return this[0]-this.DV;
else if(this.t == 0) return -1;
}
else if(this.t == 1) return this[0];
else if(this.t == 0) return 0;
// assumes 16 < DB < 32
return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|thi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get intValue() {}",
"get valueInteger() {\n\t\treturn this.__valueInteger;\n\t}",
"get valueInteger () {\r\n\t\treturn this.__valueInteger;\r\n\t}",
"function o2ws_get_int() { return o2ws_get_int32(); }",
"function toInt(val){\n\t // we do not use lang/toNumber because of perf and also because it\n\... | [
"0.8062313",
"0.72035396",
"0.71846676",
"0.71775496",
"0.7111766",
"0.70502305",
"0.69886273",
"0.697269",
"0.697269",
"0.6960986",
"0.6959027",
"0.69558144",
"0.69558144",
"0.6943782",
"0.6943782",
"0.6943782",
"0.6943782",
"0.6943782",
"0.6943782",
"0.6943782",
"0.6943782"... | 0.698818 | 8 |
(public) return value as byte | function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnByteValue() { return (this.t==0)?this.s:(this.data[0]<<24)>>24; }",
"function bnByteValue() { return (this.t==0)?this.s:(this.data[0]<<24)>>24; }",
"function bnByteValue() { return (this.t==0)?this.s:(this.data[0]<<24)>>24; }",
"function bnByteValue() { return (this.t==0)?this.s:(this.data[0]<<24)... | [
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.7843218",
"0.78183997",
"0.7818076",
"0.7818076",
"0.7818076",
"0.7814695",
"0.7814695",
"0.7798465",
"0.77922547",
"0.77922547",
"0.7783526",
"0.7783526",
... | 0.79313415 | 29 |
(public) return value as short (assumes DB>=16) | function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getShort(dataView, offset) {\n return dataView.getInt16(offset, false);\n }",
"function getShort(dataView, offset) {\r\n\t return dataView.getInt16(offset, false);\r\n\t}",
"function bnShortValue() { return (this.t==0)?this.s:(this.data[0]<<16)>>16; }",
"function bnSho... | [
"0.74132246",
"0.73773843",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72528607",
"0.72468877",
"0.7228917",
"0.7228917",
"0.722728",
"0.722728",
"0.722728",
"0.722728",
"0.722728",
"0.72272... | 0.71964544 | 50 |
(protected) return x s.t. r^x < DV | function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static approxEq(x, y) {\nvar DIFF, EPS, SIZE;\n//--------\nEPS = 5e-5;\nDIFF = Math.abs(x - y);\nSIZE = Math.max(Math.abs(x), Math.abs(y));\nif (SIZE <= 1) {\nreturn DIFF < EPS;\n} else {\nreturn DIFF / SIZE < EPS;\n}\n}",
"function verifSide(actX,i,valX,max)\n{\n return (((actX+(i*25)+valX)<0)||((actX+(i*2... | [
"0.61461234",
"0.60141087",
"0.56972027",
"0.56724834",
"0.5668852",
"0.5643446",
"0.56321156",
"0.5631613",
"0.56301486",
"0.5595587",
"0.5555595",
"0.5525466",
"0.55218357",
"0.5514203",
"0.5507866",
"0.5490237",
"0.54795885",
"0.546706",
"0.5460405",
"0.5460405",
"0.545278... | 0.0 | -1 |
(public) 0 if this == 0, 1 if this > 0 | function bnSigNum() {
if(this.s < 0) return -1;
else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
else return 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"isZero() {\n return this.value == 0;\n }",
"function o0(o1, o2) {\n try {\nreturn --this.o655 == 0;\n}catch(e){}\n}",
"isZero() { return (this.#val === BN_0); }",
"isZero() {\n return this.high === 0 && this.low === 0;\n }",
"sol() { return this.pos == 0; }",
"get negative () {\n retu... | [
"0.6416564",
"0.62657714",
"0.59058076",
"0.5873262",
"0.5860204",
"0.58478665",
"0.5802061",
"0.57786113",
"0.56696266",
"0.5641842",
"0.5641503",
"0.56346637",
"0.55556726",
"0.55554295",
"0.5511258",
"0.5456321",
"0.5445312",
"0.53759646",
"0.53730774",
"0.5371902",
"0.534... | 0.5028147 | 83 |
(protected) convert to radix string | function bnpToRadix(b) {
if(b == null) b = 10;
if(this.signum() == 0 || b < 2 || b > 36) return "0";
var cs = this.chunkSize(b);
var a = Math.pow(b,cs);
var d = nbv(a), y = nbi(), z = nbi(), r = "";
this.divRemTo(d,y,z);
while(y.signum() > 0) {
r = (a+z.intValue... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnToString(b) {\n var self = this\n if (self.s < 0) return \"-\" + self.negate()\n .toString(b)\n var k\n if (b == 16) k = 4\n else if (b == 8) k = 3\n else if (b == 2) k = 1\n else if (b == 32) k = 5\n else if (b == 4) k = 2\n else return self.toRadix(b)\n var km = (1 << k) - 1,\n d, m = ... | [
"0.6597632",
"0.6597632",
"0.6597632",
"0.6597632",
"0.6597632",
"0.6597632",
"0.6597632",
"0.6556637",
"0.6556637",
"0.6522603",
"0.65203565",
"0.65203565",
"0.65203565",
"0.6519979",
"0.65187824",
"0.6513832",
"0.6504174",
"0.65004826",
"0.65004826",
"0.6495279",
"0.6492298... | 0.0 | -1 |
(protected) convert from radix string | function bnpFromRadix(s,b) {
this.fromInt(0);
if(b == null) b = 10;
var cs = this.chunkSize(b);
var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
for(var i = 0; i < s.length; ++i) {
var x = intAt(s,i);
if(x < 0) {
if(s.charAt(i) == "-" && this.signum() == ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sc_string2integer(s, radix) {\n return parseInt(s, radix);\n}",
"function convert2IntegerWithRadix(str){\n return parseInt(str, 2); // passing it as a base 2\n}",
"function convertToInteger(str) {\n return parseInt(str,10);/*radix is considered as the base d*/\n}",
"function convertToBase10(st... | [
"0.7646501",
"0.7535366",
"0.7348166",
"0.73386",
"0.71578526",
"0.68885183",
"0.6887245",
"0.66735554",
"0.6563559",
"0.65430105",
"0.6526181",
"0.6526181",
"0.6526181",
"0.6523624",
"0.6514668",
"0.65139455",
"0.6476906",
"0.64557236",
"0.6436012",
"0.63844067",
"0.6357579"... | 0.0 | -1 |
(public) convert to bigendian byte array | function bnToByteArray() {
var i = this.t, r = new Array();
r[0] = this.s;
var p = this.DB-(i*this.DB)%8, d, k = 0;
if(i-- > 0) {
if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)
r[k++] = d|(this.s<<(this.DB-p));
while(i >= 0) {
if(p < 8) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnToByteArray() {\n\tvar i = this.t, r = new Array();\n\tr[0] = this.s;\n\tvar p = this.DB-(i*this.DB)%8, d, k = 0;\n\tif(i-- > 0) {\n\t if(p < this.DB && (d = this.data[i]>>p) != (this.s&this.DM)>>p)\n\t r[k++] = d|(this.s<<(this.DB-p));\n\t while(i >= 0) {\n\t if(p < 8) {\n\t d = (this.data[i]&(... | [
"0.70684004",
"0.7067357",
"0.7067357",
"0.7060335",
"0.7060335",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
"0.70405376",
... | 0.70666355 | 4 |
(protected) r = this op a (bitwise) | function bnpBitwiseTo(a,op,r) {
var i, f, m = Math.min(a.t,this.t);
for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);
if(a.t < this.t) {
f = a.s&this.DM;
for(i = m; i < this.t; ++i) r[i] = op(this[i],f);
r.t = this.t;
}
else {
f = this.s&this.DM;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"AND_R(op, r1){\n this.register_A = r1 & this.register_A;\n this.zero_flag = this.register_A === 0;\n this.carry_flag = false;\n this.subtraction_flag = false;\n this.half_carry_flag = true;\n }",
"OR_R(op, r1){\n this.register_A = r1 | this.register_A;\n this.zero_fla... | [
"0.68860805",
"0.68497163",
"0.65826225",
"0.65826225",
"0.65699977",
"0.6511579",
"0.6502743",
"0.6502743",
"0.6498972",
"0.6498972",
"0.6498972",
"0.6498972",
"0.6498972",
"0.6498972",
"0.6498972",
"0.6494305",
"0.64897645",
"0.64897645",
"0.64897645",
"0.64897645",
"0.6489... | 0.6445838 | 54 |
(public) this & a | function op_and(x,y) { return x&y; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get and() { return this; }",
"get and() { return this; }",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n return this._a_;\n }",
"function w(){this.a={}}",
"function a(num1, num2) { // what if I do 'a' num1 & num2\n return num1 + num2 // if I do re... | [
"0.6621647",
"0.6621647",
"0.649249",
"0.649249",
"0.6168757",
"0.6094842",
"0.6020287",
"0.57909954",
"0.57909954",
"0.57909954",
"0.57762235",
"0.5769032",
"0.5769032",
"0.5769032",
"0.5769032",
"0.5756513",
"0.5753057",
"0.57154083",
"0.5700255",
"0.5667011",
"0.56299955",... | 0.0 | -1 |
(public) this | a | function op_or(x,y) { return x|y; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get and() { return this; }",
"get and() { return this; }",
"ap (_) { \n return this\n }",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"function self($this) {\n\treturn $this;\n}",
"get a() {\n return this._a_;\n }",
"function w(){this.a={}}",
"function ... | [
"0.6733279",
"0.6733279",
"0.60864156",
"0.60624814",
"0.60624814",
"0.5986518",
"0.59855044",
"0.59745336",
"0.59614503",
"0.5940901",
"0.59260935",
"0.5910446",
"0.58432823",
"0.58395296",
"0.58327425",
"0.5797478",
"0.579615",
"0.579615",
"0.579615",
"0.5795147",
"0.579514... | 0.0 | -1 |
(public) this ^ a | function op_xor(x,y) { return x^y; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Y(){var e=a();return this.copyTo(e),e}",
"copy() {\n return new this.constructor(\n this.power,\n this.value,\n (this.next != null) ? this.next.copy() : null,\n );\n }",
"function _xor(a, b) {\n // self-documenting\n for (let i = 0; i < a.length; i++) {\n a[i] ... | [
"0.6236243",
"0.6126028",
"0.60564566",
"0.5898517",
"0.58975786",
"0.58975786",
"0.589756",
"0.5822314",
"0.5814697",
"0.5802941",
"0.57717615",
"0.5768902",
"0.5753806",
"0.5753806",
"0.5753806",
"0.5753806",
"0.5753806",
"0.57530105",
"0.57499516",
"0.5749558",
"0.57479995... | 0.0 | -1 |
(public) this & ~a | function op_andnot(x,y) { return x&~y; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function remove_(self, a) {\n return self.remove(a);\n}",
"function remove(a) {\n return self => remove_(self, a);\n}",
"function uh(){this.b=null;this.a=[]}",
"function uh(){this.b=null;this.a=[]}",
"function uh(){this.b=null;this.a=[]}",
"function uh(){this.b=null;this.a=[]}",
"function uh(){this.b... | [
"0.5967231",
"0.5960546",
"0.5842763",
"0.5842763",
"0.5842763",
"0.5842763",
"0.5842763",
"0.5842763",
"0.57816476",
"0.5648861",
"0.5648861",
"0.56127405",
"0.5588377",
"0.5573239",
"0.55704975",
"0.55431944",
"0.55391514",
"0.55089366",
"0.55089366",
"0.5497653",
"0.547405... | 0.5786309 | 46 |
(public) this << n | function bnShiftLeft(n) {
var r = nbi();
if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"n(val) {\n this._n = val;\n return this;\n }",
"0x20(){return a << b}",
"undefined(state, n) {\n state.a += n;\n }",
"get(){return this[n]}",
"shift(digits ) {\n let cursor = this;\n while (cursor != null) {\n cursor.power += digits;\n cursor = cursor.nex... | [
"0.64983845",
"0.6221547",
"0.5790253",
"0.57696396",
"0.5737075",
"0.57242584",
"0.57103467",
"0.56560415",
"0.5594429",
"0.55821633",
"0.5546495",
"0.55410796",
"0.5501602",
"0.5477894",
"0.54742324",
"0.54423094",
"0.54367185",
"0.54206896",
"0.54111236",
"0.5387897",
"0.5... | 0.0 | -1 |
(public) this >> n | function bnShiftRight(n) {
var r = nbi();
if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get(){return this[n]}",
"n(val) {\n this._n = val;\n return this;\n }",
"function rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}",
"value(n) {\n return this.slots[n * 2 + 1];\n }",
"get next() { return this.$n++; }",
"function rotl(x, n) {\n return x << n | x >>> (32 - n);\n}",
"fun... | [
"0.65986246",
"0.6181446",
"0.61333656",
"0.61264515",
"0.60759634",
"0.60659236",
"0.60184306",
"0.60091186",
"0.59621763",
"0.5958536",
"0.59106475",
"0.5852143",
"0.58449066",
"0.5733461",
"0.5727998",
"0.5716186",
"0.57039136",
"0.56873596",
"0.5673362",
"0.56461185",
"0.... | 0.0 | -1 |
return index of lowest 1bit in x, x < 2^31 | function lbit(x) {
if(x == 0) return -1;
var r = 0;
if((x&0xffff) == 0) { x >>= 16; r += 16; }
if((x&0xff) == 0) { x >>= 8; r += 8; }
if((x&0xf) == 0) { x >>= 4; r += 4; }
if((x&3) == 0) { x >>= 2; r += 2; }
if((x&1) == 0) ++r;
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnGetLowestSetBit()\n{\n for (var i = 0; i < this.t; ++i)\n if (this[i] != 0) return i * this.DB + lbit(this[i]);\n if (this.s < 0) return this.t * this.DB;\n return -1;\n}",
"function bnGetLowestSetBit() {\nfor(var i = 0; i < this.t; ++i)\n if(this.data[i] != 0) return i*this.DB+lbit(this.data[i]... | [
"0.751477",
"0.7509177",
"0.7509177",
"0.7509177",
"0.7509177",
"0.7509177",
"0.7509177",
"0.7509177",
"0.7482779",
"0.7482779",
"0.7482779",
"0.7482779",
"0.7482779",
"0.7482779",
"0.7482779",
"0.7474666",
"0.7470342",
"0.7470342",
"0.7466083",
"0.7466083",
"0.7466083",
"0... | 0.6402869 | 74 |
(public) returns index of lowest 1bit (or 1 if none) | function bnGetLowestSetBit() {
for(var i = 0; i < this.t; ++i)
if(this[i] != 0) return i*this.DB+lbit(this[i]);
if(this.s < 0) return this.t*this.DB;
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnGetLowestSetBit()\n{\n for (var i = 0; i < this.t; ++i)\n if (this[i] != 0) return i * this.DB + lbit(this[i]);\n if (this.s < 0) return this.t * this.DB;\n return -1;\n}",
"function bnGetLowestSetBit() {\n\tfor(var i = 0; i < this.t; ++i)\n\t if(this[i] != 0) return i*this.DB+lbit(this[i]);\... | [
"0.8138044",
"0.8124347",
"0.8118487",
"0.8118487",
"0.8118487",
"0.8117575",
"0.8117575",
"0.81032676",
"0.81032676",
"0.81002975",
"0.81002975",
"0.81002975",
"0.81002975",
"0.81002975",
"0.81002975",
"0.81002975",
"0.8098758",
"0.8098232",
"0.8098232",
"0.8098232",
"0.8098... | 0.8101631 | 10 |
return number of 1 bits in x | function cbit(x) {
var r = 0;
while(x != 0) { x &= x-1; ++r; }
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bitSize(x) {\n var j, z, w;\n for (j = x.length - 1; (x[j] == 0) && (j > 0); j--);\n for (z = 0, w = x[j]; w; (w >>= 1), z++);\n z += bpe * j;\n return z;\n }",
"function nbits(x) {\n\t \tvar n = 1, t;\n\t \tif ((t = x >>> 16) != 0) {\n\t \t\tx = t;\n\t \t\tn += 16;... | [
"0.7837349",
"0.7834097",
"0.7827324",
"0.76866406",
"0.76866406",
"0.76866406",
"0.7676171",
"0.76739585",
"0.76739585",
"0.76594096",
"0.7655114",
"0.76348",
"0.76348",
"0.76163054",
"0.76163054",
"0.7612852",
"0.7612159",
"0.7603298",
"0.75948954",
"0.7589331",
"0.7589331"... | 0.0 | -1 |
(public) return number of set bits | function bnBitCount() {
var r = 0, x = this.s&this.DM;
for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnBitCount() {\n\tvar r = 0, x = this.s&this.DM;\n\tfor(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n\treturn r;\n }",
"function bnBitCount() {\r\n\t var r = 0, x = this.s & this.DM;\r\n\t for (var i = 0; i < this.t; ++i) r += cbit(this[i] ^ x);\r\n\t return r;\r\n\t}",
"function bnB... | [
"0.7350894",
"0.7333377",
"0.7333377",
"0.7313277",
"0.73018765",
"0.7278378",
"0.72736686",
"0.72736686",
"0.72736686",
"0.72736686",
"0.72736686",
"0.72736686",
"0.72736686",
"0.7265734",
"0.7258504",
"0.7258504",
"0.7232161",
"0.7232161",
"0.7232161",
"0.7232161",
"0.72321... | 0.735676 | 1 |
(public) true iff nth bit is set | function bnTestBit(n) {
var j = Math.floor(n/this.DB);
if(j >= this.t) return(this.s!=0);
return((this[j]&(1<<(n%this.DB)))!=0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"isNextBitSet(){\n return this.data[this.index++] === '1';\n }",
"function bit (value) {\n\t return value === 0 || value === 1\n\t}",
"function Number_IsFlagSet(nFlag)\n{\n\t//returns it\n\treturn (this & nFlag) == (nFlag & nFlag);\n}",
"function bnSetBit(n)\n{\n return this.changeBit(n, op_or);\n... | [
"0.6550329",
"0.64680755",
"0.64258146",
"0.6418798",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
"0.6381118",
... | 0.6090166 | 80 |
(protected) this op (1<<n) | function bnpChangeBit(n,op) {
var r = BigInteger.ONE.shiftLeft(n);
this.bitwiseTo(r,op,r);
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function withBitwiseOperator(n) {\n if (n < 1) {\n return false;\n } else {\n return (n & n - 1) === 0;\n }\n}",
"function bnpChangeBit(n,op) {\n\t var r = BigInteger.ONE.shiftLeft(n);\n\t this.bitwiseTo(r,op,r);\n\t return r;\n\t }",
"function bnSetBit(n)\n{\n return this.changeB... | [
"0.68308777",
"0.66804725",
"0.6654112",
"0.6634383",
"0.6634383",
"0.6634383",
"0.6634383",
"0.6634383",
"0.6634383",
"0.6634383",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
"0.6634022",
... | 0.665315 | 4 |
(public) this | (1<<n) | function bnSetBit(n) { return this.changeBit(n,op_or); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"0x20(){return a << b}",
"function bnSetBit(n)\n{\n return this.changeBit(n, op_or);\n}",
"function withBitwiseOperator(n) {\n if (n < 1) {\n return false;\n } else {\n return (n & n - 1) === 0;\n }\n}",
"function setBit(num, i){\n return num | (1 << i)\n}",
"function bnSetBit(n) {\... | [
"0.6426379",
"0.6369834",
"0.62906736",
"0.6248135",
"0.6239599",
"0.6239599",
"0.6239599",
"0.6239599",
"0.6239599",
"0.6239599",
"0.6239599",
"0.6236068",
"0.6236068",
"0.62105596",
"0.61565083",
"0.6151285",
"0.6151285",
"0.6151285",
"0.6144622",
"0.6144622",
"0.61132634",... | 0.6199906 | 51 |
(public) this & ~(1<<n) | function bnClearBit(n) { return this.changeBit(n,op_andnot); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function withBitwiseOperator(n) {\n if (n < 1) {\n return false;\n } else {\n return (n & n - 1) === 0;\n }\n}",
"not() {\n return Long.fromBits(~this.low, ~this.high, this.unsigned);\n }",
"function bnClearBit(n)\n{\n return this.changeBit(n, op_andnot);\n}",
"function sc_b... | [
"0.6772579",
"0.6766647",
"0.667096",
"0.66568714",
"0.6612119",
"0.6593823",
"0.6593823",
"0.6563815",
"0.6563815",
"0.6544822",
"0.6544822",
"0.6544822",
"0.6531411",
"0.6509399",
"0.6509399",
"0.6506139",
"0.6506139",
"0.6506139",
"0.6506139",
"0.6506139",
"0.6506139",
"... | 0.6674993 | 40 |
(public) this ^ (1<<n) | function bnFlipBit(n) { return this.changeBit(n,op_xor); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function xor_n(n) {\n CPU.tCycles += 7;\n const a = r8.get(i8.A);\n let f = CPU.tables.xorFlagsTable[(a << 8) | n];\n r8.set(i8.F, f);\n r8.set(i8.A, a ^ n);\n}",
"function bnSetBit(n)\n{\n return this.changeBit(n, op_or);\n}",
"function bnSetBit(n) {\n return this.changeBit(n, op_or)\n}",
"... | [
"0.69218564",
"0.6515495",
"0.6392404",
"0.6392404",
"0.6392404",
"0.6392404",
"0.6392404",
"0.6392404",
"0.6392404",
"0.6389686",
"0.6389686",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
"0.6383995",
... | 0.0 | -1 |
(protected) r = this + a | function bnpAddTo(a,r) {
var i = 0, c = 0, m = Math.min(a.t,this.t);
while(i < m) {
c += this[i]+a[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
if(a.t < this.t) {
c += a.s;
while(i < this.t) {
c += this[i];
r[i++] = c&this.DM;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function add_(self, a) {\n return self.add(a);\n}",
"suma(){\n return this.a + this.b;\n }",
"function addiere(a,b) {\n\t\t\t\tvar erg = a + b;\n\t\t\t\treturn erg;\n\t\t}",
"add(a, b) {\r\n this.data[0] = a.data[0] + b.data[0];\r\n this.data[1] = a.data[1] + b.data[1];\r\n th... | [
"0.6958733",
"0.67737406",
"0.6687434",
"0.6640313",
"0.66318834",
"0.66062677",
"0.66062677",
"0.6603584",
"0.6603584",
"0.65958405",
"0.6592635",
"0.6592635",
"0.6573848",
"0.6573848",
"0.6573848",
"0.6573848",
"0.6573848",
"0.6573848",
"0.6573848",
"0.6573848",
"0.6573848"... | 0.6520421 | 74 |
(public) this + a | function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"suma(){\n return this.a + this.b;\n }",
"function add_(self, a) {\n return self.add(a);\n}",
"function foo(something) {\n console.log(this.a, something);\n return this.a + something;\n}",
"function foo(something) {\n console.log( this.a, something );\n return this.a + something;\n}",
... | [
"0.73325425",
"0.7183759",
"0.7093759",
"0.70806885",
"0.7023576",
"0.6930113",
"0.6928218",
"0.6873521",
"0.6870167",
"0.68465626",
"0.68408215",
"0.6837249",
"0.6739391",
"0.668296",
"0.6652572",
"0.6652572",
"0.6646431",
"0.6637279",
"0.66269016",
"0.660761",
"0.65827024",... | 0.0 | -1 |
(public) this / a | function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n return this._a_;\n }",
"function M(){this.a={}}",
"function w(){this.a={}}",
"function x(){this.a={}}",
"function x(){this.a={}}",
"function x(){this.a={}}",
"ap (_) { \n return this\n }",
"funct... | [
"0.7761875",
"0.7761875",
"0.7505133",
"0.7086824",
"0.7050244",
"0.6825956",
"0.6825956",
"0.6825956",
"0.67958516",
"0.67701125",
"0.6768431",
"0.6755437",
"0.6732417",
"0.6708534",
"0.66912264",
"0.66912264",
"0.66912264",
"0.6634452",
"0.6610345",
"0.6604827",
"0.6560277"... | 0.0 | -1 |
(public) this % a | function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set a(val) {\n this._a_ = val * 2;\n }",
"set a(val) {\n\t\tthis._a_ = val * 2;\n\t}",
"set a(val) {\n\t\tthis._a_ = val * 2;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n\t\treturn this._a_;\n\t}",
"get a() {\n return this._a_;\n }",
"function H(a){A(a)}",
"function foo(a) ... | [
"0.6609586",
"0.65037227",
"0.65037227",
"0.63997024",
"0.63997024",
"0.630512",
"0.6295272",
"0.629388",
"0.6290981",
"0.6202525",
"0.61278516",
"0.6125138",
"0.6090962",
"0.6084644",
"0.6084573",
"0.6083849",
"0.6083849",
"0.6083849",
"0.6083849",
"0.6083849",
"0.6083849",
... | 0.0 | -1 |
(protected) this = n, this >= 0, 1 < n < DV | function bnpDMultiply(n) {
this[this.t] = this.am(0,n-1,this,0,0,this.t);
++this.t;
this.clamp();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"n(val) {\n this._n = val;\n return this;\n }",
"function N(a){n(this,a)}",
"get(){return this[n]}",
"set next(n) {\t\t\t\t\t\t// configura novo valor de n, somente se for > do que o atual\n\t\tif (n > this.$n) this.$n = n;\n\t}",
"static constrain(v){\r\n while(v<0){v+=1;}\r\n while(v>... | [
"0.607401",
"0.6002053",
"0.5899723",
"0.57966125",
"0.56439304",
"0.5593456",
"0.54900944",
"0.54356056",
"0.54285955",
"0.5386609",
"0.53530186",
"0.5340947",
"0.532861",
"0.53038377",
"0.53038377",
"0.53038377",
"0.53038377",
"0.53038377",
"0.53038377",
"0.53038377",
"0.53... | 0.0 | -1 |
(protected) this += n = 0 | function bnpDAddOffset(n,w) {
if(n == 0) return;
while(this.t <= w) this[this.t++] = 0;
this[w] += n;
while(this[w] >= this.DV) {
this[w] -= this.DV;
if(++w >= this.t) this[this.t++] = 0;
++this[w];
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"undefined(state, n) {\n state.a += n;\n }",
"increment() {\n\t\t++this.amount;\n\t}",
"get next() { return this.$n++; }",
"function incrementer(n) { afficher(index += n); }",
"function addOne(n){\n return n += 1;\n}",
"increment() {\n this[$referenceCount]++;\n }",
"function... | [
"0.7729201",
"0.6934396",
"0.6877341",
"0.6817428",
"0.6811031",
"0.6782622",
"0.67658055",
"0.67545086",
"0.6618305",
"0.6539163",
"0.6507117",
"0.6470742",
"0.64438957",
"0.64383954",
"0.6329764",
"0.6280653",
"0.6277563",
"0.62544596",
"0.6246216",
"0.6219666",
"0.61992097... | 0.0 | -1 |
(protected) r = lower n words of "this a", a.t <= n "this" should be the larger one if appropriate. | function bnpMultiplyLowerTo(a,n,r) {
var i = Math.min(this.t+a.t,n);
r.s = 0; // assumes a,this >= 0
r.t = i;
while(i > 0) r[--i] = 0;
var j;
for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);
for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get lowerArmTwist() {}",
"get lowerLegTwist() {}",
"function bnpMultiplyLowerTo(a, n, r) {\n var i = Math.min(this.t + a.t, n);\n r.s = 0; // assumes a,this >= 0\n\n r.t = i;\n\n while (i > 0) {\n r[--i] = 0;\n }\n\n ... | [
"0.65991974",
"0.62857634",
"0.61546904",
"0.6069033",
"0.60505605",
"0.5994828",
"0.59118944",
"0.58610713",
"0.5739068",
"0.57067287",
"0.5706441",
"0.56876343",
"0.56706303",
"0.56557655",
"0.56273407",
"0.5616759",
"0.5588057",
"0.5543707",
"0.55357087",
"0.55357087",
"0.... | 0.0 | -1 |
(protected) r = "this a" without lower n words, n > 0 "this" should be the larger one if appropriate. | function bnpMultiplyUpperTo(a,n,r) {
--n;
var i = r.t = this.t+a.t-n;
r.s = 0; // assumes a,this >= 0
while(--i >= 0) r[i] = 0;
for(i = Math.max(n-this.t,0); i < a.t; ++i)
r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);
r.clamp();
r.drShiftTo(1,r);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function $cvrs(s, n, r) {\n\t\treturn $strcpy(s, (~~n).toString(r).toUpperCase());\n\t}",
"function spinWords(str) {\n return str\n .split(\" \")\n .map((word) => (word.length >= 5 ? revers(word) : word))\n .join(\" \");\n}",
"makeText(numWords = 100) {\n let words = Object.keys(this.chains);\n\n ... | [
"0.6134677",
"0.6017461",
"0.597557",
"0.5944114",
"0.59353477",
"0.5885649",
"0.5868218",
"0.5850965",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"... | 0.0 | -1 |
x = x mod m (HAC 14.42) | function barrettReduce(x) {
x.drShiftTo(this.m.t-1,this.r2);
if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod (num, m) { return ((num % m) + m) % m; }",
"function mod (num, m) { return ((num % m) + m) % m; }",
"function mod (num, m) { return ((num % m) + m) % m; }",
"function gmod(n,m){ re... | [
"0.8343938",
"0.8343938",
"0.8006592",
"0.8006592",
"0.8006592",
"0.787943",
"0.7786837",
"0.7763976",
"0.7686515",
"0.7662026",
"0.7652328",
"0.7652328",
"0.76485157",
"0.76268935",
"0.7620665",
"0.76092637",
"0.75998324",
"0.75998324",
"0.75998324",
"0.75998324",
"0.7599832... | 0.0 | -1 |
r = x^2 mod m; x != r | function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function modinv(x, m)\n{\n // calculate a,b such that a*x+b*m = g\n var [g, a, b] = GCD(x,m);\n if (a<numzero(a)) return a+m;\n return a;\n}",
"function mod (num, m) { return ((num % m)... | [
"0.772631",
"0.772631",
"0.72638226",
"0.72288704",
"0.72288704",
"0.72288704",
"0.7171731",
"0.7140583",
"0.709791",
"0.7050108",
"0.7043654",
"0.70422614",
"0.70231307",
"0.7001282",
"0.69999737",
"0.6984952",
"0.6984952",
"0.69671917",
"0.69671917",
"0.69671917",
"0.696719... | 0.0 | -1 |
r = xy mod m; x,y != r | function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod(x, m) {\n return ((x % m) + m) % m;\n}",
"function mod (x, y) {return x < 0? y - (-x % y) : x % y;}",
"function modinv(x, m)\n{\n // calculate a,b such that a*x+b*m = g\n var [g, a, b] = GCD(x,m);\n if (a<numzero(a)) return a+m;\n... | [
"0.64588064",
"0.64588064",
"0.6281086",
"0.6175201",
"0.61340857",
"0.6126085",
"0.6126085",
"0.6126085",
"0.6119396",
"0.60620236",
"0.60451",
"0.60339725",
"0.6030043",
"0.60217905",
"0.6020337",
"0.59996223",
"0.59970987",
"0.5995684",
"0.59782994",
"0.5969739",
"0.596947... | 0.0 | -1 |
(public) this^e % m (HAC 14.85) | function bnModPow(e,m) {
var i = e.bitLength(), k, r = nbv(1), z;
if(i <= 0) return r;
else if(i < 18) k = 1;
else if(i < 48) k = 3;
else if(i < 144) k = 4;
else if(i < 768) k = 5;
else k = 6;
if(i < 8)
z = new Classic(m);
else if(m.isEven())
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function b(M,e){0}",
"get m(){ return this.density * this.volume;}",
"function M(){}",
"get m00(){ return this.data[ 0]; }",
"function mi(t,e){0}",
"function pm(t,e){0}",
"private public function m246() {}",
"function Ma(e,t,n,i){Ca.call(this,e,t,n,i)}",
"get matrix$() {\n\t\treturn this._m;\n\t}",... | [
"0.69042754",
"0.6534386",
"0.6518357",
"0.64879775",
"0.64857584",
"0.6445553",
"0.6436432",
"0.6180835",
"0.6180695",
"0.6169891",
"0.6144389",
"0.6117738",
"0.6101374",
"0.6101374",
"0.6096127",
"0.609493",
"0.60825866",
"0.60544467",
"0.60484207",
"0.6043786",
"0.60435265... | 0.0 | -1 |
(public) gcd(this,a) (HAC 14.54) | function bnGCD(a) {
var x = (this.s<0)?this.negate():this.clone();
var y = (a.s<0)?a.negate():a.clone();
if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
var i = x.getLowestSetBit(), g = y.getLowestSetBit();
if(g < 0) return x;
if(i < g) g = i;
if(g > 0) {
x.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gcd(a,b)\n{\nif (b == 0)\n {return a}\nelse\n {return gcd(b, a % b)}\n}",
"function gcd(a, b) {\n\tvar t;\t\t\t\t\t\t\t\t\t\t// variavel temp para troca de valores\n\tif (a < b) t=b, b=a, a=t;\t\t\t\t\t// garante que a >= b\n\twhile (b != 0) t=b, b=a%b, a=t;\t\t\t\t// algoritmo de Euclides para MDC\n\... | [
"0.82803494",
"0.8086266",
"0.8060355",
"0.8033914",
"0.8025891",
"0.8025891",
"0.8025891",
"0.8025891",
"0.8025891",
"0.8025891",
"0.8025891",
"0.8016659",
"0.8014574",
"0.80078626",
"0.7987127",
"0.7986394",
"0.79858726",
"0.79858726",
"0.79858726",
"0.79858726",
"0.7985872... | 0.8068589 | 3 |
(protected) this % n, n < 2^26 | function bnpModInt(n) {
if(n <= 0) return 0;
var d = this.DV%n, r = (this.s<0)?n-1:0;
if(this.t > 0)
if(d == 0) r = this[0]%n;
else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mod (x, n) {\r\n return (x % n + n) % n;\r\n}",
"function mod(a, n) {\n return (((a % n) + n) % n);\n}",
"function modInt(x,n) {\n var i,c=0;\n for (i=x.length-1; i>=0; i--)\n c=(c*radix+x[i])%n;\n return c;\n }",
"function mod(x,n) {\n var ans=dup(x);\n mod_(ans,n);\n re... | [
"0.78715926",
"0.77281857",
"0.75466335",
"0.7537476",
"0.751915",
"0.7512508",
"0.75074625",
"0.7478933",
"0.7460654",
"0.7427211",
"0.73924196",
"0.73779577",
"0.7366897",
"0.7356524",
"0.7343349",
"0.7332816",
"0.7332816",
"0.73123574",
"0.73123574",
"0.72862154",
"0.72862... | 0.7089429 | 41 |
(public) 1/this % m (HAC 14.61) | function bnModInverse(m) {
var ac = m.isEven();
if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
var u = m.clone(), v = this.clone();
var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
while(u.signum() != 0) {
while(u.isEven()) {
u.rShiftTo(1,u... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function M(){}",
"private public function m246() {}",
"m() {}",
"function b(M,e){0}",
"static private internal function m121() {}",
"private internal function m248() {}",
"get m00(){ return this.data[ 0]; }",
"static private public function m119() {}",
"function Atm() {\r\n }",
"function M(a,b... | [
"0.70305276",
"0.6879944",
"0.67265445",
"0.6715804",
"0.66882336",
"0.6606527",
"0.6508406",
"0.6505275",
"0.6490413",
"0.6467551",
"0.6398124",
"0.6385031",
"0.63641244",
"0.63568777",
"0.63523173",
"0.63331485",
"0.6320896",
"0.6310307",
"0.6307197",
"0.6274568",
"0.627141... | 0.0 | -1 |
(public) test primality with certainty >= 1.5^t | function bnIsProbablePrime(t) {
var i, x = this.abs();
if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {
for(i = 0; i < lowprimes.length; ++i)
if(x[0] == lowprimes[i]) return true;
return false;
}
if(x.isEven()) return false;
i = 1;
while(i < ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bnIsProbablePrime(t) {\nvar i, x = this.abs();\nif(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x.data[0] == lowprimes[i]) return true;\n return false;\n}\nif(x.isEven()) return false;\ni = 1;\nwhile(i < lowprimes.length) {\n var m = lowprimes[i]... | [
"0.69471127",
"0.69471127",
"0.69471127",
"0.69471127",
"0.69471127",
"0.69471127",
"0.69471127",
"0.6885453",
"0.6885453",
"0.6885453",
"0.68630743",
"0.68630743",
"0.6861177",
"0.68327105",
"0.68198085",
"0.68136716",
"0.6812181",
"0.6810492",
"0.6805744",
"0.6805744",
"0.6... | 0.67792666 | 53 |
(protected) true if probably prime (HAC 4.24, MillerRabin) | function bnpMillerRabin(t) {
var n1 = this.subtract(BigInteger.ONE);
var k = n1.getLowestSetBit();
if(k <= 0) return false;
var r = n1.shiftRight(k);
t = (t+1)>>1;
if(t > lowprimes.length) t = lowprimes.length;
var a = nbi();
for(var i = 0; i < t; ++i) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isprime(num){\n if(num === 0 || num === 1){\n return false;\n }\n\n var limit = Math.ceil(Math.pow(num, 1/2));\n if(num !== 2){\n for (var i = 2; i <= limit; i++){\n if(num % i == 0){\n return false\n }\n }\n }\n return true;\n}",... | [
"0.7864488",
"0.78372645",
"0.7836517",
"0.7836517",
"0.7809034",
"0.78036857",
"0.77836525",
"0.7750449",
"0.7728188",
"0.77263016",
"0.7713858",
"0.7668644",
"0.7668573",
"0.7666891",
"0.7664938",
"0.7661925",
"0.7661055",
"0.7652463",
"0.7651813",
"0.7648487",
"0.76252407"... | 0.0 | -1 |
Mix in a 32bit integer into the pool | function rng_seed_int(x) {
rng_pool[rng_pptr++] ^= x & 255;
rng_pool[rng_pptr++] ^= (x >> 8) & 255;
rng_pool[rng_pptr++] ^= (x >> 16) & 255;
rng_pool[rng_pptr++] ^= (x >> 24) & 255;
if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FastIntegerCompression() {\n}",
"writeInt32BE(n) {\n const buf = this.reserveBytes(4);\n buf.writeInt32BE(n);\n }",
"function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}",
"function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}",
"function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n... | [
"0.5945333",
"0.58785087",
"0.5842755",
"0.5842755",
"0.5805071",
"0.58050495",
"0.57830083",
"0.57830083",
"0.57243735",
"0.57095706",
"0.56954074",
"0.56954074",
"0.56768334",
"0.5676442",
"0.5668155",
"0.56616664",
"0.5626491",
"0.5603934",
"0.55899537",
"0.55899537",
"0.5... | 0.54178035 | 59 |
Mix in the current time (w/milliseconds) into the pool | function rng_seed_time() {
rng_seed_int(new Date().getTime());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function currTime() { return new Date(ops.clock.getTime() + ops.tickDelta); }",
"function concurrent_time() {\n if (app_opt.simulate)\n return simulate(event_opt.simulate.min, event_opt.simulate.max);\n else\n return event_opt.simulate.tick;\n }",
"tick() {\n this._last = this._cu... | [
"0.6177198",
"0.605193",
"0.59178066",
"0.5900955",
"0.5721689",
"0.56716794",
"0.5657394",
"0.56206226",
"0.561641",
"0.5608743",
"0.5604414",
"0.5604341",
"0.5597554",
"0.559129",
"0.5576254",
"0.5559016",
"0.55571854",
"0.55287534",
"0.5514709",
"0.55079514",
"0.5504798",
... | 0.0 | -1 |
prng4.js uses Arcfour as a PRNG | function Arcfour() {
this.i = 0;
this.j = 0;
this.S = new Array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function seedRandom(pool, math) {\n//\n// The following constants are related to IEEE 754 limits.\n//\n var global = this,\n width = 256, // each RC4 output is 0 <= x < 256\n chunks = 6, // at least six RC4 outputs for each double\n digits = 52, // there are 52 signifi... | [
"0.6965785",
"0.6789824",
"0.66600645",
"0.6562927",
"0.6557508",
"0.65517306",
"0.652087",
"0.6516145",
"0.65028286",
"0.64971334",
"0.64757323",
"0.64757323",
"0.64750427",
"0.6465722",
"0.6465722",
"0.6465722",
"0.6465722",
"0.64538693",
"0.64082456",
"0.63919014",
"0.6390... | 0.0 | -1 |
Initialize arcfour context from key, an array of ints, each from [0..255] | function ARC4init(key) {
var i, j, t;
for(i = 0; i < 256; ++i)
this.S[i] = i;
j = 0;
for(i = 0; i < 256; ++i) {
j = (j + this.S[i] + key[i % key.length]) & 255;
t = this.S[i];
this.S[i] = this.S[j];
this.S[j] = t;
}
this.i = 0;
this.j = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"init(key) {\n let i;\n let j;\n let t;\n for (i = 0; i < 256; ++i) {\n this.S[i] = i;\n }\n j = 0;\n for (i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\... | [
"0.6914921",
"0.625245",
"0.6162632",
"0.61115855",
"0.6109592",
"0.6108996",
"0.6103096",
"0.6103096",
"0.6085379",
"0.6085379",
"0.6085379",
"0.60367274",
"0.60367274",
"0.60367274",
"0.60367274",
"0.60367274",
"0.60367274",
"0.60367274",
"0.60367274",
"0.60367274",
"0.6036... | 0.6029137 | 32 |
Plug in your RNG constructor here | function prng_newstate() {
return new Arcfour();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function RNG(stream) {\n this._stream = stream;\n}",
"function rng() {\n return random();\n } // updates generator with a new instance of a seeded pseudo random number generator",
"function SeededRandom(){}",
"function Random(internalRng) {\r\n this.internalRng = internalRng;\r\n }",
"func... | [
"0.73984",
"0.733239",
"0.7138282",
"0.70892936",
"0.7059723",
"0.7059723",
"0.6983335",
"0.6958095",
"0.6944014",
"0.6944014",
"0.680501",
"0.6693145",
"0.66901046",
"0.66764385",
"0.6615744",
"0.6582395",
"0.65425086",
"0.6535012",
"0.65324277",
"0.6515502",
"0.6482243",
... | 0.0 | -1 |
Currently only WebKitbased Web Inspectors, Firefox >= v31, and the Firebug extension (any Firefox version) are known to support "%c" CSS customizations. TODO: add a `localStorage` variable to explicitly enable/disable colors | function useColors() {
// is webkit? http://stackoverflow.com/a/16459606/376773
return ('WebkitAppearance' in document.documentElement.style) ||
// is firebug? http://stackoverflow.com/a/398120/376773
(window.console && (console.firebug || (console.exception && console.table))) ||
// is firefox >= ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function useColors(){ // is webkit? http://stackoverflow.com/a/16459606/376773\nreturn 'WebkitAppearance' in document.documentElement.style || // is firebug? http://stackoverflow.com/a/398120/376773\nwindow.console && (console.firebug || console.exception && console.table) || // is firefox >= v31?\n// https://de... | [
"0.6764141",
"0.62982607",
"0.62982607",
"0.62982607",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
"0.6252978",
... | 0.61375684 | 83 |
Colorize log arguments if enabled. | function formatArgs() {
var args = arguments;
var useColors = this.useColors;
args[0] = (useColors ? '%c' : '')
+ this.namespace
+ (useColors ? ' %c' : ' ')
+ args[0]
+ (useColors ? '%c ' : ' ')
+ '+' + exports.humanize(this.diff);
if (!useColors) return args;
var c = 'colo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"log(...args) {\n console.log(this.getColorOn() + args.join(\" \"));\n }",
"function writelnColor(){\n\t\tfor(var i=0; i<arguments.length; i=i+2)\n\t\t\tgrunt.log.write(arguments[i][arguments[i+1]]);\n\t\tgrunt.log.writeln('');\n\t}",
"debug(...args) {\n console.debug(this.getColorOn() + args.join(... | [
"0.6760166",
"0.6711751",
"0.65307504",
"0.65290976",
"0.65290976",
"0.65290976",
"0.6475225",
"0.64737195",
"0.64728016",
"0.6462169",
"0.645757",
"0.6455942",
"0.6453729",
"0.64420164",
"0.64335275",
"0.64298606",
"0.642863",
"0.6418752",
"0.6418752",
"0.6418752",
"0.641875... | 0.6391772 | 85 |
Invokes `console.log()` when available. Noop when `console.log` is not a "function". | function log() {
// this hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return 'object' === typeof console
&& console.log
&& Function.prototype.apply.call(console.log, console, arguments);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function log() {\n if (window.console) console.log.apply(console,arguments);\n}",
"function consoleLog() {\n if (typeof(console) == 'object' && typeof(console[\"log\"]) != \"undefined\") {\n console.log.apply(console, arguments);\n }\n}",
"function L() {\n if (window.console && console.log) {\n ... | [
"0.7740726",
"0.77190375",
"0.7708073",
"0.761103",
"0.7567806",
"0.7567806",
"0.7532321",
"0.7489864",
"0.74157906",
"0.7337263",
"0.73321635",
"0.73312366",
"0.7325651",
"0.73131526",
"0.7311219",
"0.7311219",
"0.7311219",
"0.7311219",
"0.7311219",
"0.73067605",
"0.73067605... | 0.0 | -1 |
define the `disabled` version | function disabled() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function disabled() {}",
"function disabled() {}",
"function disabled(){}",
"function disabled(){}",
"function disabled(){}",
"function disabled(){}",
"function disabled() {\n }",
"function disabled() {\n }",
"function disabled() {\n }",
"function disabled() {\n }",
"function disabled() {\n... | [
"0.83263636",
"0.83263636",
"0.83100826",
"0.83100826",
"0.83100826",
"0.83100826",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059",
"0.8109059... | 0.81536764 | 37 |
define the `enabled` version | function enabled() {
var self = enabled;
// set `diff` timestamp
var curr = +new Date();
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
// add the `color` if not set
if (null == self.useColors) self.use... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set enabled(value) {}",
"set enabled(value) {}",
"set enabled(value) {}",
"set enabled(value) {}",
"function setEnabled(enabled){_enabled=!!enabled;}",
"function setEnabled(enabled){_enabled=!!enabled;}",
"get enabled() {}",
"get enabled() {}",
"get enabled() {}",
"get enabled() {}",
"get enabl... | [
"0.80437756",
"0.80437756",
"0.80437756",
"0.80437756",
"0.7556496",
"0.7556496",
"0.7528498",
"0.7528498",
"0.7528498",
"0.7528498",
"0.72541606",
"0.72541606",
"0.72541606",
"0.72541606",
"0.72541606",
"0.72541606",
"0.72541606",
"0.7095985",
"0.705773",
"0.705773",
"0.7031... | 0.0 | -1 |
Creates a PasswordPolicy which is a set of rules. | function PasswordPolicy(rules, ruleset) {
this.rules = rules;
this.ruleset = ruleset || defaultRuleset;
this._reduce(function (result, ruleOptions, rule) {
rule.validate(ruleOptions);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function PasswordPolicy(rules, ruleset) {\n\t this.rules = rules;\n\t this.ruleset = ruleset || defaultRuleset;\n\n\t this._reduce(function (result, ruleOptions, rule) {\n\t rule.validate(ruleOptions);\n\t });\n\t}",
"function PasswordPolicy(rules, ruleset) {\n this.rules = rules;\n this.ruleset = rules... | [
"0.7646631",
"0.7542534",
"0.7542534",
"0.5790607",
"0.579042",
"0.5617872",
"0.5607991",
"0.54383135",
"0.536437",
"0.53495824",
"0.5303243",
"0.52172107",
"0.52172107",
"0.52172107",
"0.52172107",
"0.5207643",
"0.517936",
"0.51045436",
"0.50951385",
"0.5052597",
"0.5052597"... | 0.76584667 | 1 |
A rule should contain explain and rule methods TODO explain explain TODO explain missing TODO explain assert | function assert (options, password) {
return !!password && options.minLength <= password.length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FooRule() {\n}",
"function describeRule(rule) {\n var description = undefined\n if (rule.aliveBefore) {\n description = '<b>Die</b> if it'\n } else {\n description = '<b>Be born</b> if it'\n }\n\n function describeNeighborCount(count) {\n if (count == 1) return '1 nei... | [
"0.61921245",
"0.583908",
"0.569455",
"0.55225885",
"0.5407589",
"0.529769",
"0.5245484",
"0.5229266",
"0.5200614",
"0.5177281",
"0.51706076",
"0.5160095",
"0.5133476",
"0.5101767",
"0.5087157",
"0.5081087",
"0.5067606",
"0.5026354",
"0.5026354",
"0.5026354",
"0.4983504",
"... | 0.0 | -1 |
Flow type definition of console.table is too strict right now, see for updates | function consoleTable(table) {
console.table(table);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function consoleTable(table) {\n console.table(table);\n}",
"function consoleTable(table) {\n console.table(table);\n}",
"function consoleTable(table) {\n console.table(table);\n}",
"function consoleTable(table) {\n console.table(table);\n}",
"function consoleTable(table) {\n console.table(table);\n}"... | [
"0.7139735",
"0.7139735",
"0.7139735",
"0.7139735",
"0.7139735",
"0.6066269",
"0.60596824",
"0.6033592",
"0.5986968",
"0.5861037",
"0.5828583",
"0.57387906",
"0.57143253",
"0.5685106",
"0.5682388",
"0.5632328",
"0.56317496",
"0.56232196",
"0.5622573",
"0.56170577",
"0.5577492... | 0.72166723 | 2 |
Exports: `ReactTestUtils.Simulate.click(Element/ReactDOMComponent)` `ReactTestUtils.Simulate.mouseMove(Element/ReactDOMComponent)` `ReactTestUtils.Simulate.change(Element/ReactDOMComponent)` ... (All keys from event plugin `eventTypes` objects) | function makeSimulator(eventType) {
return function (domComponentOrNode, eventData) {
var node;
!!React.isValidElement(domComponentOrNode) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'TestUtils.Simulate expects a component instance and not a ReactElement.TestUtils.Simulate will not work if y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeSimulator(eventType) {\n return function (domNode, eventData) {\n if (!!React.isValidElement(domNode)) {\n {\n throw Error( \"TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note tha... | [
"0.6657435",
"0.6645382",
"0.65911967",
"0.65795714",
"0.65795714",
"0.65795714",
"0.65713423",
"0.6423227",
"0.6423227",
"0.6423227",
"0.6190463",
"0.6190463",
"0.6190463",
"0.61719096",
"0.6139017",
"0.6139017",
"0.6139017",
"0.6139017",
"0.6139017",
"0.6139017",
"0.6139017... | 0.6477703 | 7 |
Exports: `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)` `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)` `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)` `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)` ... (All keys from `EventConstants.topLevelTypes`)... | function makeNativeSimulator(eventType) {
return function (domComponentOrNode, nativeEventData) {
var fakeNativeEvent = new Event(eventType);
_assign(fakeNativeEvent, nativeEventData);
if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
ReactTestUtils.simulateNativeEventOnDOMComponent(even... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeSimulator(eventType) {\n return function (domNode, eventData) {\n if (!!React.isValidElement(domNode)) {\n {\n throw Error( \"TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note tha... | [
"0.6988323",
"0.6982482",
"0.6950371",
"0.6818953",
"0.6818953",
"0.6818953",
"0.6806974",
"0.6676472",
"0.661514",
"0.6604251",
"0.6604251",
"0.6604251",
"0.65898323",
"0.65581775",
"0.65581775",
"0.65581775",
"0.6548135",
"0.6540727",
"0.6540727",
"0.6540727",
"0.6540727",
... | 0.65210706 | 22 |
a portable addListener implementation | function addListener(w, event, cb) {
if(w.attachEvent) w.attachEvent('on' + event, cb);
else if (w.addEventListener) w.addEventListener(event, cb, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static addListener(listener) {\n listeners.push(listener);\n }",
"addListener(listener) {\n listeners.push(listener);\n }",
"addListener(listener) {\n this.listeners.push(listener);\n }",
"addListener(listener) {\n this.listeners.push(listener);\n }",
"addListener(listener) {\n ... | [
"0.7615961",
"0.75188",
"0.74995065",
"0.74995065",
"0.74757445",
"0.74617445",
"0.72775537",
"0.7273885",
"0.7160785",
"0.7029512",
"0.70260805",
"0.6989777",
"0.69846004",
"0.6981244",
"0.69518447",
"0.6937017",
"0.69158316",
"0.69092864",
"0.6860833",
"0.684988",
"0.683127... | 0.6784473 | 25 |
a portable removeListener implementation | function removeListener(w, event, cb) {
if(w.detachEvent) w.detachEvent('on' + event, cb);
else if (w.removeEventListener) w.removeEventListener(event, cb, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"removeListeners() {}",
"removeListeners() {}",
"removeListeners() {}",
"removeListener(listener) {\n const index = activeListeners.findIndex(l => l === listener);\n if (index !== -1) {\n activeListeners.splice(index, 1);\n }\n }",
"function removeListener(w, event, cb) {\n if (w.detachEve... | [
"0.793617",
"0.793617",
"0.793617",
"0.7912222",
"0.78458875",
"0.7818138",
"0.7818138",
"0.7818138",
"0.7818138",
"0.7818138",
"0.7818138",
"0.7699123",
"0.76656306",
"0.75844496",
"0.7570472",
"0.7403632",
"0.7401261",
"0.73782825",
"0.7335785",
"0.73357683",
"0.73284477",
... | 0.80208117 | 4 |
checking for IE8 or above | function isInternetExplorer() {
if (typeof navigator === 'undefined') {
return false;
}
var rv = -1; // Return value assumes failure.
var ua = navigator.userAgent;
if (navigator.appName === 'Microsoft Internet Explorer') {
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function less_IE8() {\n if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {\n return true;\n }\n}",
"function isIE8() {\n if (window.attachEvent && !window.addEventListener) {\n return true;\n } else {\n return false;\n }\n }",
"function seven_isIE () {\n\t\t\tvar... | [
"0.8158584",
"0.7717139",
"0.7595134",
"0.75842905",
"0.7343461",
"0.7343461",
"0.73404187",
"0.7339538",
"0.7316492",
"0.72828066",
"0.72430605",
"0.7200875",
"0.7141105",
"0.71235096",
"0.71053135",
"0.71053135",
"0.7082827",
"0.7078869",
"0.7045568",
"0.70396096",
"0.70396... | 0.70898014 | 16 |
checking Mobile Firefox (Fennec) | function isFennec() {
try {
// We must check for both XUL and Java versions of Fennec. Both have
// distinct UA strings.
var userAgent = navigator.userAgent;
return (userAgent.indexOf('Fennec/') != -1) || // XUL
(userAgent.indexOf('Firefox/') != -1 && userAgent.indexOf('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function DetectaIpad(){\n\n if (uagent.search(dispositivoIpad) > -1 && DetectaWebkit())\n\n return true;\n\n else\n\n return false;\n\n}",
"function DetectaWindowsMobile(){\n\n if (uagent.search(dispositivoWinMob) > -1)\n\n return true;\n\n else\n\n return false;\n\n}",
"function D... | [
"0.7165622",
"0.71058404",
"0.69855845",
"0.6912687",
"0.69026816",
"0.6897367",
"0.6860382",
"0.68082684",
"0.67855203",
"0.6775229",
"0.67484194",
"0.67476875",
"0.67362547",
"0.6734531",
"0.67166954",
"0.6700017",
"0.6697855",
"0.66914284",
"0.66898805",
"0.66583973",
"0.6... | 0.63215506 | 53 |
feature checking to see if this platform is supported at all | function isSupported() {
return (typeof window !== 'undefined' && window.JSON && window.JSON.stringify &&
window.JSON.parse && window.postMessage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"isSupportedOnCurrentPlatform() {\n if (this.isSupportedOnCurrentPlatform === Maker.prototype.isSupportedOnCurrentPlatform) {\n throw new Error(`Maker ${this.name} did not implement the isSupportedOnCurrentPlatform method`);\n }\n\n return true;\n }",
"function isSupported() {\n return error.isV... | [
"0.7549608",
"0.75044847",
"0.74908996",
"0.7395247",
"0.72645044",
"0.71017843",
"0.69509685",
"0.69136024",
"0.6888995",
"0.6861249",
"0.682906",
"0.6779599",
"0.677366",
"0.6769858",
"0.67552704",
"0.6725508",
"0.6715418",
"0.6712986",
"0.6709109",
"0.6709109",
"0.6709109"... | 0.67639875 | 15 |
given a URL, extract the origin. Taken from: | function extractOrigin(url) {
if (!/^https?:\/\//.test(url)) url = window.location.href;
var m = /^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(url);
if (m) return m[1];
return url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t}",
"function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m =... | [
"0.863215",
"0.858529",
"0.858529",
"0.858529",
"0.858529",
"0.858529",
"0.858529",
"0.858529",
"0.8514881",
"0.8514881",
"0.8514881",
"0.8514881",
"0.8514881",
"0.8514881",
"0.8514881",
"0.82713276",
"0.72983414",
"0.72983414",
"0.72983414",
"0.72983414",
"0.72983414",
"0.... | 0.8694698 | 4 |
find the relay iframe in the opener | function findRelay() {
var loc = window.location;
var frames = window.opener.frames;
for (var i = frames.length - 1; i >= 0; i--) {
try {
if (frames[i].location.protocol === window.location.protocol &&
frames[i].location.host === window.location.host &&
frames[i]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function findRelay() {\n var loc = window.location;\n var frames = window.opener.frames;\n var origin = loc.protocol + '//' + loc.host;\n for (var i = frames.length - 1; i >= 0; i--) {\n try {\n if (frames[i].location.href.indexOf(origin) === 0 &&\n frames[i].name === RELAY_FRAME_NAME)\n ... | [
"0.8077882",
"0.80604094",
"0.805648",
"0.805648",
"0.805648",
"0.805648",
"0.805648",
"0.805648",
"0.63002414",
"0.60607916",
"0.6034506",
"0.59803116",
"0.5963067",
"0.5859524",
"0.5849013",
"0.5788055",
"0.5744519",
"0.5742153",
"0.57317674",
"0.572743",
"0.57202536",
"0... | 0.81070095 | 4 |
Reports whether credentials already exiist | async credentialsExist() {
return { success: true, credentialsExist: this.authManager.accountsFileExists() }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkCreds() {\n checkEmail();\n return false;\n }",
"function checkExistingAuth() {\n // const userRecord = configstore.get('user');\n // const tokens = configstore.get('tokens');\n // console.log({ tokens });\n //\n // if (userRecord && tokens) throw new Error('You are alread log... | [
"0.70082474",
"0.6486301",
"0.63800395",
"0.5948699",
"0.57725024",
"0.5712272",
"0.56748664",
"0.56674623",
"0.55648595",
"0.5545252",
"0.55263364",
"0.55073094",
"0.54858226",
"0.5458999",
"0.544211",
"0.5438119",
"0.54226077",
"0.5376356",
"0.5365062",
"0.5363686",
"0.5335... | 0.70326436 | 0 |
Get SS auth URL | async getSSAuthURL() {
return { success: true, url: this.authManager.getSSAuthURL() }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getSSOURL() {\n const fragments = this._formatFragments({\n 'from': this._domain,\n });\n return `${this._appURL}/sso${fragments}&ttl=180`;\n }",
"get_url() {\n this._authentication.state = crypto.randomBytes(6).toString('hex');\n // Replace 'api' from the api_url... | [
"0.74245137",
"0.740146",
"0.7188129",
"0.6740033",
"0.6708028",
"0.66632164",
"0.6520492",
"0.65006214",
"0.649978",
"0.6400031",
"0.6327783",
"0.6213736",
"0.6212483",
"0.6208475",
"0.6198218",
"0.6106892",
"0.6103066",
"0.602466",
"0.59761757",
"0.5974445",
"0.59469575",
... | 0.7772622 | 0 |
Try to extract auth code | async getAuthCodeFromUrl(payload) {
const redirectURLStr = payload.redirectURLStr;
let code;
try {
code = this.authManager.parseCodeFromURL(redirectURLStr);
} catch (error) {
return { success: false, error: error.toString() }
}
return { success: true, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAuthCode(url){\n var error = url.match(/[&\\?]error=([^&]+)/);\n if (error) {\n throw 'Error getting authorization code: ' + error[1];\n }\n return url.match(/[&\\?]code=([\\w\\/\\-]+)/)[1];\n}",
"async extractFromAuthCode () {\n\t\ttry {\n\t\t\tthis.payload = this.api.services.tok... | [
"0.785441",
"0.73551613",
"0.6508617",
"0.6320866",
"0.6266223",
"0.6189062",
"0.6181132",
"0.61358696",
"0.5926842",
"0.5923228",
"0.5910531",
"0.58875924",
"0.5826696",
"0.57139045",
"0.5698362",
"0.5676593",
"0.56579113",
"0.5645676",
"0.5630123",
"0.56245244",
"0.5618376"... | 0.72964907 | 2 |
Get SS auth Token | async getToken(payload) {
const code = payload.authCode;
try {
await this.authManager.getToken(code);
} catch (error) {
console.log(error);
return { success: false, error: error.toString() }
}
return {
success: true,
accessTok... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getToken() {\n return fetch(STT_AUTHURL).then(function(response) {\n return response.text();\n });\n }",
"function getToken() {\n return sessionStorage.getItem('auth');\n }",
"function getToken() {\n\n var tokenURL = portal + '/sharing/rest/generateToken?';\n\n var parameters = {username: use... | [
"0.7635404",
"0.7477067",
"0.72023207",
"0.71864504",
"0.715861",
"0.70870924",
"0.7052408",
"0.70443404",
"0.7034967",
"0.70320356",
"0.69162303",
"0.6846069",
"0.68357444",
"0.6803826",
"0.6785143",
"0.67523617",
"0.6749712",
"0.67472917",
"0.67140275",
"0.66974187",
"0.669... | 0.0 | -1 |
Skriv ut dagens lunch | function printWeekdayFood(day) {
const getDay = weekday.find(element => element.dayName == day);
let todaysLunch = (getDay.isClosed == true) ? "<div>Idag är det stängt</div>" : "<div>Idag serverar vi " + getDay.lunch + "</div>";
lunchContainer.innerHTML = "";
lunchContainer.insertAdjacentHTML("afterbeg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function C007_LunchBreak_Natalie_StartLunch() {\r\n CurrentTime = CurrentTime + 120000;\r\n LeaveIcon = \"\";\r\n}",
"spawnMunchkin(){\n this.munchkinSpawner.spawnMunchkin();\n MainGameScene.gameStats.addToCount(\"munchkins\");\n this.updateUI();\n }",
"function collectWheatSeeds(... | [
"0.6225722",
"0.5860095",
"0.58103204",
"0.5776716",
"0.5725661",
"0.5719423",
"0.5663732",
"0.5650157",
"0.56367457",
"0.5625577",
"0.560645",
"0.55570644",
"0.554214",
"0.5533247",
"0.5524198",
"0.5518459",
"0.55154306",
"0.55146146",
"0.55144596",
"0.5495146",
"0.54941815"... | 0.51995337 | 74 |
Define function first, second parameters | function int_sum(first, second, name) {
let sum = (first * 2) + second; // 7
return name + sum; // S: 7
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function myOtherFunction (first_argument = second_argument, second_argument) {}",
"function newFunction(param1, param2) { //param1 and param2 are the parameters or placeholders\n return param1 + param2; // returns 9\n }",
"function paraArguments(parameterOne, parameterTwo) {//function declared, with ... | [
"0.73517406",
"0.70277566",
"0.6837727",
"0.6808185",
"0.67712766",
"0.6749579",
"0.6667182",
"0.6624873",
"0.661996",
"0.65976197",
"0.6582178",
"0.65764856",
"0.65512633",
"0.65101343",
"0.6488578",
"0.64864063",
"0.6451782",
"0.644993",
"0.64364195",
"0.6429992",
"0.640836... | 0.0 | -1 |
stores and resizes an image for the user | static async editUserForm(userId, req, res, next) {
let user = await userModel.getUser(userId);
if (user[0]) {
user = user[0];
user.hasImage = this.hasImage(userId);
let data = {
title: "User",
user: user,
nav: await navmenuModel.getNavmenu()
};
if (cfgControllers.json) {
return res.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@action\n resize() {\n this.compressImage(this.selectedImageUser.value)\n }",
"function updateImage() {\n const file = document.getElementById('user-picture').files[0];\n // check media type e.g. image/png, text/html\n if (!file.type.startsWith(\"image/\")) {\n alert(\"Not an image!\");\n } else {\n ... | [
"0.7004836",
"0.634672",
"0.6278804",
"0.6268619",
"0.62138563",
"0.6193994",
"0.61561626",
"0.6115377",
"0.6076037",
"0.60745364",
"0.6030772",
"0.6016504",
"0.6013826",
"0.59509283",
"0.5950221",
"0.5940126",
"0.5937482",
"0.592473",
"0.59184104",
"0.59169066",
"0.5905293",... | 0.0 | -1 |
fn_school() Function is used to change the school based on the district | function fn_school(id)
{
$("#reports-pdfviewer").hide("fade").remove();
var dataparam = "oper=showschool&districtid="+id;
$.ajax({
type: 'post',
url: 'reports/password/reports-password-passwordajax.php',
data: dataparam,
beforeSend: function(){
$('#schools').html('<img src="img/loader.gif" width="200" b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function School(){\n const school = {\n\n vak: [\"FRO\", \"BAP\", \"NED\"],\n opdracht: [\"Fotogallery\", \"Grid\", \"Object\", \"Login\", \"Registratie\", \"Uploaden\", \"Correspondentie 1\", \"Correspondentie 2\", \"Correspondentie 3\" ],\n cijfer: [\"6.2\", \"8.3\", \"4.6\", \"7.0\", \"9.1\", \"3.5\",... | [
"0.6409181",
"0.6275149",
"0.6250165",
"0.6098262",
"0.6032424",
"0.5955797",
"0.59325504",
"0.5911619",
"0.5888935",
"0.5857584",
"0.58522415",
"0.58522415",
"0.58522415",
"0.5821853",
"0.5779945",
"0.57747716",
"0.57289433",
"0.5724326",
"0.57217747",
"0.57083976",
"0.57052... | 0.6449472 | 0 |
fn_showpassreport() Function to Call the viewreport page for student password $('studentid').val() > Studentid, $('classid').val() > Classid | function fn_showpassreport(type)
{
setTimeout('removesections("#reports-password");',500);
var val = $('#districtid').val()+"~"+$('#schoolid').val()+"~"+type;
$.Zebra_Dialog('Download the report as ', {
'type': 'question',
'custom_class': 'myclass',
'title': 'Export Users report',
'overlay_close':... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function fn_school(id)\n{\t\n\t$(\"#reports-pdfviewer\").hide(\"fade\").remove();\n\tvar dataparam = \"oper=showschool&districtid=\"+id;\n\t$.ajax({\n\t\ttype: 'post',\n\t\turl: 'reports/password/reports-password-passwordajax.php',\n\t\tdata: dataparam,\n\t\tbeforeSend: function(){\n\t\t\t$('#schools').html('<img ... | [
"0.6370277",
"0.61405414",
"0.60412157",
"0.6022611",
"0.5784925",
"0.5767827",
"0.57326114",
"0.56182635",
"0.551557",
"0.5504909",
"0.550006",
"0.5497985",
"0.54809815",
"0.54598427",
"0.5416611",
"0.54025084",
"0.5399627",
"0.5392528",
"0.5358523",
"0.5351876",
"0.53413147... | 0.7504471 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.