add(ones(updateGate.rows, updateGate.columns), negative(updateGate)), cell ),
case 'negative': if (['number', 'integer', 'bigint', 'float', 'decimal'].includes(type)) { schema = schema.negative();
// eslint-disable-next-line require-jsdoc constructor(positiveQry, negativeQry, negativeBoost) { super('boosting'); if (!isNil(positiveQry)) this.positive(positiveQry); if (!isNil(negativeQry)) this.negative(negativeQry); if (!isNil(negativeBoost)) this._queryOpts.negative_boost = negativeBoost; }
function h(a) { c(a.type, "characterClass"); var b = a.body, d = b ? b.length : 0, e = -1, f = "["; for (a.negative && (f += "^"); ++e < d; ) f += k(b[e]); return f += "]"; }
it('should return NaN for impossible combinations', () => { const impossibleMinSchema = Joi.number().negative().min(1); let example = ValueGenerator(impossibleMinSchema); expect(example).to.equal(NaN); example = 0; const impossibleMinMultipleSchema = Joi.number().negative().min(-10).multiple(12); example = ValueGenerator(impossibleMinMultipleSchema); expect(example).to.equal(NaN); });
parseString(xml, function (err, result) { for(var i =0; i < result.senticon.layer.length; i++){ for(var j = 0; j < result.senticon.layer[i].positive[0].lemma.length; j++){ //console.log(util.inspect(result.senticon.layer[i].negative[0].lemma[j], false, null)) list[result.senticon.layer[i].positive[0].lemma[j]._] = result.senticon.layer[i].positive[0].lemma[j].$; } for(var n = 0; n < result.senticon.layer[i].negative[0].lemma.length; n++){ list[result.senticon.layer[i].negative[0].lemma[n]._] = result.senticon.layer[i].negative[0].lemma[n].$; } } });
function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len;len=len-1|0;// Peel one iteration (compiler can't do it, because of code complexity) var a=self.words[0]|0;var b=num.words[0]|0;var r=a*b;var lo=r&0x3ffffff;var carry=r/0x4000000|0;out.words[0]=lo;for(var k=1;k<len;k++){// Sum all words with the same `i + j = k` and accumulate `ncarry`, // note that ncarry could be >= 0x3ffffff var ncarry=carry>>>26;var rword=carry&0x3ffffff;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/0x4000000|0;rword=r&0x3ffffff;}out.words[k]=rword|0;carry=ncarry|0;}if(carry!==0){out.words[k]=carry|0;}else{out.length--;}return out.strip();}
it('should return an ordered array', () => { const schema = Joi.array().ordered(Joi.string().max(3).required(), Joi.number().negative().integer().required(), Joi.boolean().required()); const example = ValueGenerator(schema); ExpectValidation(example, schema); });
const MyCalendarDate = props => { const day = props.date.getDate(); const price = prices[day - 1]; let cell = CELL_TYPES.default; if (price >= 100) { cell = CELL_TYPES.negative; } else if (price >= 75) { cell = CELL_TYPES.neutral; } else if (price < 60 && price <= 74) { cell = CELL_TYPES.positive; } return <BpkCalendarDate cellType={cell} price={price} {...props} />; }
bm.readFile(filename) .then(function() { var neg = bm.negative(); var suffix = filename.substr(-4); var negFilename = filename.replace(suffix, '.neg' + suffix); return neg.writeFile(negFilename); }) .then(function() { console.log("Done"); }) .catch(function(error) { console.log(error.message); });
it('should be in array or throw error', () => { function showError() { unitSystem.prefix({sign: "none"}); } expect(showError).toThrowError(`Unsupported sign. Use: 'positive' or 'negative'`); expect(SI_PREFIXES._sym_.positive).toContain(unitSystem.prefix({ sign: 'positive', symbol: true })); expect(SI_PREFIXES._sym_.negative).toContain(unitSystem.prefix({ sign: 'negative', symbol: true })); expect(SI_PREFIXES.positive).toContain(unitSystem.prefix()); expect(SI_PREFIXES.negative).toContain(unitSystem.prefix({ sign: 'negative', symbol: false })); })
get total() { return this.negative + this.positive; }
it('should return a negative number', () => { const schema = Joi.number().negative(); const example = ValueGenerator(schema); expect(example).to.be.below(0); ExpectValidation(example, schema); });
case 'negative': if (['number', 'integer', 'bigint', 'float', 'decimal'].includes(type)) { schema = schema.negative();
const MyCalendarDate = props => { const day = props.date.getDate(); const price = prices[day - 1]; let cell = CELL_TYPES.default; if (price >= 100) { cell = CELL_TYPES.negative; } else if (price >= 75) { cell = CELL_TYPES.neutral; } else if (price < 60 && price <= 74) { cell = CELL_TYPES.positive; } return <BpkCalendarDate cellType={cell} price={price} {...props} />; }