_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q61200 | validation | function() {
this.addEvents(
/**
* @event change
* Fires when the value of a field is changed via the {@link #setValue} method.
* @param {Ext.form.field.Field} this
* @param {Object} newValue The new value
* @param {Object} oldValue Th... | javascript | {
"resource": ""
} | |
q61201 | munge | validation | function munge(str, options) {
var aMunged = [];
var aChars, i;
// initialize default options
options = options || {};
if (options.encoding) {
// validate encoding option
if (encoder.TYPES.indexOf(options.encoding) < 0)
throw Error('Invalid encoding option given: ' +... | javascript | {
"resource": ""
} |
q61202 | validation | function() {
var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor;
function getAttr(elm, name) {
var value = elm.attr(name);
return value || '';
};
// Default some values
data.fontface = editor.getParam("fullpage_default_fontface", "");
d... | javascript | {
"resource": ""
} | |
q61203 | validation | function() {
var me = this,
menuTrigger = me.menuTrigger,
names = me.layout.names;
// The rendering flag is set when getRenderTree is called which we do when returning markup string for the owning layout's "suffix"
if (menuTrigger.rendering) {
menuTrigger.fin... | javascript | {
"resource": ""
} | |
q61204 | validation | function(width, height) {
var me = this;
me.target.setSize(width, height);
me.fireEvent('resize', me, width, height, null);
} | javascript | {
"resource": ""
} | |
q61205 | validation | function(date, format) {
var formatFunctions = utilDate.formatFunctions;
if (!Ext.isDate(date)) {
return '';
}
if (formatFunctions[format] == null) {
utilDate.createFormat(format);
}
return formatFunctions[format].call(date) + '';
} | javascript | {
"resource": ""
} | |
q61206 | validation | function(date) {
var num = 0,
d = Ext.Date.clone(date),
m = date.getMonth(),
i;
for (i = 0, d.setDate(1), d.setMonth(0); i < m; d.setMonth(++i)) {
num += utilDate.getDaysInMonth(d);
}
return num + date.getDate() - 1;
} | javascript | {
"resource": ""
} | |
q61207 | validation | function() {
var nativeDate = window.Date,
p,
statics = ['useStrict', 'formatCodeToRegex', 'parseFunctions', 'parseRegexes', 'formatFunctions', 'y2kYear', 'MILLI', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'MONTH', 'YEAR', 'defaults', 'dayNames', 'monthNames', 'monthNumbers', 'getShortMonthName... | javascript | {
"resource": ""
} | |
q61208 | readSync | validation | function readSync() {
const TLS_CERT = process.env.TLS_CERT;
const TLS_KEY = process.env.TLS_KEY;
const TLS_CA = process.env.TLS_CA;
const tls_cert = readOpt("--tls-cert");
const tls_key = readOpt("--tls-key");
const tls_ca = readOpt("--tls-ca");
const result = {
secureOptions: const... | javascript | {
"resource": ""
} |
q61209 | read | validation | function read() {
const TLS_CERT = process.env.TLS_CERT;
const TLS_KEY = process.env.TLS_KEY;
const TLS_CA = process.env.TLS_CA;
const tls_cert = readOpt("--tls-cert");
const tls_key = readOpt("--tls-key");
const tls_ca = readOpt("--tls-ca");
const result = {};
if (tls_cert) {
i... | javascript | {
"resource": ""
} |
q61210 | readOpt | validation | function readOpt(option) {
const prefix = `${option}=`;
for (let i = 0, len = process.argv.length, arg; i < len; i++) {
arg = process.argv[i];
if (arg === option) {
return process.argv[i+1];
} else if (arg.indexOf(prefix) === 0) {
return arg.substr(prefix.length... | javascript | {
"resource": ""
} |
q61211 | validation | function(target) {
var me = this,
anims = [],
timeline = me.timeline,
ln = timeline.length,
anim, easing, damper, attrs, i;
if (me.fireEvent('beforeanimate', me) !== false) {
for (i = 0; i < ln; i++) {
anim = timeline[i];
... | javascript | {
"resource": ""
} | |
q61212 | validation | function() {
var me = this,
chart = me.chart,
store = chart.getChartStore(),
data = store.data.items,
count = me.getRecordCount(),
i, ln, record,
min, max,
xField = me.xField,
xValue;
if (count > 0) {
... | javascript | {
"resource": ""
} | |
q61213 | validation | function(title) {
var me = this,
titleCmp = me.titleCmp;
me.title = title;
if (titleCmp.rendered) {
titleCmp.textEl.update(me.title || ' ');
titleCmp.updateLayout();
} else {
me.titleCmp.on({
render: function() {
... | javascript | {
"resource": ""
} | |
q61214 | validation | function(cls) {
var me = this,
isEmpty = !cls || !cls.length,
iconCmp = me.iconCmp;
me.iconCls = cls;
if (!me.iconCmp && !isEmpty) {
me.initIconCmp();
me.insert(0, me.iconCmp);
} else if (iconCmp) {
if (isEmpty) {
... | javascript | {
"resource": ""
} | |
q61215 | validation | function(icon) {
var me = this,
isEmpty = !icon || !icon.length,
iconCmp = me.iconCmp;
me.icon = icon;
if (!me.iconCmp && !isEmpty) {
me.initIconCmp();
me.insert(0, me.iconCmp);
} else if (iconCmp) {
if (isEmpty) {
... | javascript | {
"resource": ""
} | |
q61216 | validation | function(glyph) {
var me = this,
iconCmp = me.iconCmp;
if (!me.iconCmp) {
me.initIconCmp();
me.insert(0, me.iconCmp);
} else if (iconCmp) {
if (glyph) {
me.iconCmp.setGlyph(glyph);
} else {
me.ic... | javascript | {
"resource": ""
} | |
q61217 | validation | function (item, checked) {
var value = [];
this.items.each(function(item){
if (item.checked) {
value.push(item.value);
}
});
this.selected = value;
this.fireEvent('checkchange', item, checked);
} | javascript | {
"resource": ""
} | |
q61218 | isType | validation | function isType (type, val) {
return (type == Any)
|| (type == Object && is.object(val))
|| (type == Function && is.function(val))
|| (type == String && is.string(val))
|| (type == Error && is.error(val))
|| (type == Number && is.number(val))
|| (type == Array && is.array(val))
... | javascript | {
"resource": ""
} |
q61219 | findMorph | validation | function findMorph (args, morphs) {
for (var i = 0; i < morphs.length; i++) {
var sig = morphs[i].sig
if (args.length == sig.length) {
var matched = true
for (var j = 0; j < sig.length; j++) {
if (!isType(sig[j], args[j])) {
matched = false
break
}
}
... | javascript | {
"resource": ""
} |
q61220 | generateAssignStateOutOfFinally | validation | function generateAssignStateOutOfFinally(enclosingFinally, destination) {
var finallyState = enclosingFinally.finallyState;
// $ctx.state = finallyState;
// $fallThrough = destination;
return createStatementList(
createAssignStateStatement(finallyState),
parseStatement `$ctx.finallyFallThrough = ${d... | javascript | {
"resource": ""
} |
q61221 | directory_path | validation | function directory_path () {
pending++
readdir(entry, (err, children) => {
if (err) return done(err)
// Push children into pipeline, order is not important
for (var i = children.length; i--;) {
if (path !== null && base !== null) {
files.push({ base, path: join... | javascript | {
"resource": ""
} |
q61222 | file_path | validation | function file_path () {
pending++
for (var i = globs.length; i--;) {
const glob = globs[i]
const glob_full = glob.glob
const glob_base = glob.base
const glob_negated = glob.negated
const glob_pattern = glob.pattern
if (entry === glob_full || mm.isMatch(entry, ... | javascript | {
"resource": ""
} |
q61223 | extend | validation | function extend(a, b, noClone) { // A extends B
a = a || {};
if(typeof a !== 'object' || typeof a.length !== 'undefined'){
return b;
}
if(typeof b !== 'object'){
return b;
}
if(!noClone){
a = clone(a);
}
var bk = Object.keys(b);
for(var i = 0, c = bk.length; i < c; i++){
va... | javascript | {
"resource": ""
} |
q61224 | clone | validation | function clone(o){
var c = {};
var h = Object.keys(o);
for(var i = 0, co = h.length; i < co; i++){
c[h[i]] = o[h[i]];
}
return c;
} | javascript | {
"resource": ""
} |
q61225 | fixPath | validation | function fixPath(string){
if(string.length < 1){
return string;
}
if(string.charAt(string.length-1) !== path.sep){
string += path.sep;
}
return string;
} | javascript | {
"resource": ""
} |
q61226 | stringify | validation | function stringify(string, params, noError) {
var arr = string.split(':');
var param;
for(var i = 0, c = arr.length; i < c; i++) {
param = arr[i];
if(i % 2){
if(!(typeof params[param] === 'string' || typeof params[param] === 'number')){
if(!noError){
throw new Error('Variable ' + p... | javascript | {
"resource": ""
} |
q61227 | cleanCallback | validation | function cleanCallback(errorCallback, callback){
var self = this || {};
if(!callback){
return function(err){ // remove other variables
if(err && self.log){
self.log('error',err);
}
errorCallback(err);
}
}
return function(err){
if(err){
if(self.log){
self.lo... | javascript | {
"resource": ""
} |
q61228 | iterateElements | validation | function iterateElements(array) {
var index = 0;
var rv = {};
rv[Symbol.iterator] = {
next() {
if (index < array.length)
return {value: array[index++], done: false};
return {done: true};
}
}
} | javascript | {
"resource": ""
} |
q61229 | validation | function(fo,clear)
{
this.filters = fo;
if(this.filters && this.filterFields)
{
//Delete filters that doesn't match with any field
for(var fn in this.filters)
{
if(!this.filterFields[fn])
delete this.filters[fn]... | javascript | {
"resource": ""
} | |
q61230 | GedcomXDate | validation | function GedcomXDate(str) {
if(str == '') {
throw new Error('Invalid Date');
}
if(str.charAt(0) == 'R') {
return new Recurring(str);
} else if(/\//.test(str)) {
return new Range(str);
} else if(str.charAt(0) == 'A') {
return new Approximate(str);
} else {
return new Simple(str);
}
} | javascript | {
"resource": ""
} |
q61231 | validation | function(toClose) {
var me = this;
if (toClose.active && me.items.getCount() > 1) {
return (me.previousTab && me.previousTab !== toClose && !me.previousTab.disabled) ? me.previousTab : (toClose.next('tab[disabled=false]') || toClose.prev('tab[disabled=false]'));
}
} | javascript | {
"resource": ""
} | |
q61232 | validation | function (autoRender, config) {
if (!tip) {
if (!Ext.isReady) {
Ext.onReady(function(){
Ext.tip.QuickTipManager.init(autoRender, config);
});
return;
}
var tipConfig = Ext.app... | javascript | {
"resource": ""
} | |
q61233 | validation | function(el, id) {
var me = this,
childEls = me.getChildEls(),
baseId, childName, i, selector, value;
baseId = (id || me.id) + '-';
for (i = childEls.length; i--; ) {
childName = childEls[i];
if (typeof childName == 'string') {
//... | javascript | {
"resource": ""
} | |
q61234 | validation | function (testFn) {
var me = this,
old = me.getChildEls(),
keepers = (me.childEls = []),
n, i, cel;
for (i = 0, n = old.length; i < n; ++i) {
cel = old[i];
if (!testFn(cel)) {
keepers.push(cel);
}
}
} | javascript | {
"resource": ""
} | |
q61235 | multiFieldSort | validation | function multiFieldSort(array, sortBy) {
array.sort((a, b) => {
for (let field of sortBy) {
let reverse = field[0] === '-';
if (reverse) {
field = field.slice(1);
}
let valueA = getPath(a, field);
let valueB = getPath(b, field);
if (reverse) {
if (valueA > valueB) return -1;
else if (va... | javascript | {
"resource": ""
} |
q61236 | protect_split | validation | function protect_split(separator, str) {
var sep = '######';
var string = false;
var nb_brackets = 0;
var new_str = "";
for (var i = 0 ; i < str.length ; i++) {
if (!string && /['"`]/.test(str[i])) string = str[i];
else if (string && str[i] == string) string = false;
else if (!string && str[i] == '(... | javascript | {
"resource": ""
} |
q61237 | validation | function () {
if (/\w/.test(this.currentChar)) return this.readWord();
if (/["'`]/.test(this.currentChar)) return this.readString();
if (/[()]/.test(this.currentChar)) return this.readGroupSymbol();
if (/[!=<>]/.test(this.currentChar)) return this.readOperator();
if (this.currentChar === "") return {typ... | javascript | {
"resource": ""
} | |
q61238 | validation | function () {
var astNode = "";
// If this is a word/string, return its value
if (this.currentToken.type == 'word' || this.currentToken.type == 'string') {
astNode = this.currentToken.value;
this.readNextToken();
}
// If this is a group, skip brackets and parse the inside
else if (this.curren... | javascript | {
"resource": ""
} | |
q61239 | diffText | validation | function diffText(a,b){
var changes = []
var text = a
while(text !== b){
var c = partiallyDiffText(text,b)
if(c.type === 'add'){
text = text.substr(0,c.index)+c.value+text.substr(c.index)
}else{
text = text.substr(0,c.index)+text.substr(c.index+c.many)
}
changes.push(c)
}
return changes
} | javascript | {
"resource": ""
} |
q61240 | validation | function(store, initial){
var me = this;
me.mixins.bindable.bindStore.apply(me, arguments);
if(me.store && !initial) {
me.refresh();
}
} | javascript | {
"resource": ""
} | |
q61241 | validation | function(suppressEvent) {
var me = this,
selections = me.store.getRange(),
i = 0,
len = selections.length,
start = me.getSelection().length;
me.bulkChange = true;
for (; i < len; i++) {
me.doSelect(selections[i], true, suppressEvent);
... | javascript | {
"resource": ""
} | |
q61242 | validation | function(record, e, keepExisting) {
var me = this,
isSelected = me.isSelected(record);
switch (me.selectionMode) {
case 'MULTI':
if (e.shiftKey && me.selectionStart) {
me.selectRange(me.selectionStart, record, e.ctrlKey);
} els... | javascript | {
"resource": ""
} | |
q61243 | validation | function(e, record) {
var me = this,
recIdx,
fromIdx,
isSelected = me.isSelected(record),
from = (me.selectionStart && me.isSelected(me.lastFocused)) ? me.selectionStart : (me.selectionStart = me.lastFocused),
key = e.getCharCode(),
isSpace... | javascript | {
"resource": ""
} | |
q61244 | validation | function(fireEvent) {
var me = this;
if (fireEvent && !me.bulkChange) {
me.fireEvent('selectionchange', me, me.getSelection());
}
} | javascript | {
"resource": ""
} | |
q61245 | validation | function(record) {
record = Ext.isNumber(record) ? this.store.getAt(record) : record;
return this.selected.contains(record);
} | javascript | {
"resource": ""
} | |
q61246 | validation | function(store, records, indexes, isMove) {
var me = this;
// If the selection start point is among records being removed, we no longer have a selection start point.
if (me.selectionStart && Ext.Array.contains(records, me.selectionStart)) {
me.selectionStart = null;
}
... | javascript | {
"resource": ""
} | |
q61247 | deployRules | validation | function deployRules({client, rules, secret}) {
const lastRequest = rulesRequests.get(client.projectId);
return Promise.resolve(lastRequest).then(oldRulesHash => {
const newRuleHash = hash(rules);
if (oldRulesHash === newRuleHash) {
return oldRulesHash;
}
const request = client.rules({rules... | javascript | {
"resource": ""
} |
q61248 | lock | validation | function lock(client, sequence) {
const lastSequence = sequences.get(client.projectId);
return Promise.resolve(lastSequence).then(() => {
const result = sequence();
sequences.set(client.projectId, result.then(noop, noop));
return result;
});
} | javascript | {
"resource": ""
} |
q61249 | validation | function () {
var renderData = this.callParent();
if (this.owner.getHierarchyState().rtl) {
renderData.innerCtCls =
(renderData.innerCtCls || '') + ' ' + Ext.baseCSSPrefix + 'rtl';
}
return renderData;
} | javascript | {
"resource": ""
} | |
q61250 | validation | function(o) {
var me = this;
o.un({
scope: me,
mousedown: me.onMouseDown,
mouseup: me.onMouseUp,
mouseover: me.onMouseOver,
mouseout: me.onMouseOut,
click: me.onClick
});
return me.callParent(arguments);
... | javascript | {
"resource": ""
} | |
q61251 | validation | function(redraw) {
var i = 0,
items = this.items,
len = this.length;
for (; i < len; i++) {
items[i].hide(redraw);
}
return this;
} | javascript | {
"resource": ""
} | |
q61252 | validation | function(redraw) {
var i = 0,
items = this.items,
len = this.length;
for (; i < len; i++) {
items[i].show(redraw);
}
return this;
} | javascript | {
"resource": ""
} | |
q61253 | validation | function() {
var me = this,
i = 0,
items = me.items,
surface = me.getSurface(),
len = me.length;
if (surface) {
for (; i < len; i++) {
surface.renderItem(items[i]);
}
}
return me;
} | javascript | {
"resource": ""
} | |
q61254 | validation | function(obj) {
var i = 0,
items = this.items,
len = this.length,
item, el;
for (; i < len; i++) {
item = items[i];
el = item.el;
if (el) {
el.setStyle(obj);
}
}
} | javascript | {
"resource": ""
} | |
q61255 | validation | function(obj) {
var i = 0,
items = this.items,
surface = this.getSurface(),
len = this.length;
if (surface) {
for (; i < len; i++) {
surface.addCls(items[i], obj);
}
}
} | javascript | {
"resource": ""
} | |
q61256 | validation | function(obj) {
var i = 0,
items = this.items,
surface = this.getSurface(),
len = this.length;
if (surface) {
for (; i < len; i++) {
surface.removeCls(items[i], obj);
}
}
} | javascript | {
"resource": ""
} | |
q61257 | validation | function(){
var me = this,
surface = me.getSurface(),
destroySprites = me.autoDestroy,
item;
if (surface) {
while (me.getCount() > 0) {
item = me.first();
me.remove(item);
surface.remove(item, de... | javascript | {
"resource": ""
} | |
q61258 | validation | function(config){
var me = this,
o, key, value;
me.copyLegacyObject(config, me.customRenderers, 'renderer');
me.copyLegacyObject(config, me.customEditors, 'editor');
me.copyLegacyObject(config, me.propertyNames, 'displayName');
//<debug>
... | javascript | {
"resource": ""
} | |
q61259 | validation | function(pos, direction, e, preventWrap, verifierFn, scope) {
if (direction == 'left') {
direction = 'up';
} else if (direction == 'right') {
direction = 'down';
}
pos = Ext.view.Table.prototype.walkCells.call(this, pos, direction, e, preventWrap, verifierFn, scop... | javascript | {
"resource": ""
} | |
q61260 | init | validation | function init() {
tinyMCEPopup.resizeToInnerSize();
var inst = tinyMCEPopup.editor;
var dom = inst.dom;
var elm = inst.selection.getNode();
var f = document.forms[0];
var onclick = dom.getAttrib(elm, 'onclick');
setFormValue('title', dom.getAttrib(elm, 'title'));
setFormValue('id', dom.getAttrib(elm, ... | javascript | {
"resource": ""
} |
q61261 | validation | function(columns) {
var i,
len = columns.length,
column;
for (i = 0; i < len; i++) {
column = columns[i];
if (!column.processed && column.locked) {
return true;
}
}
} | javascript | {
"resource": ""
} | |
q61262 | validation | function(headerCt, header, colsToMove, fromIdx, toIdx) {
var me = this;
// If there are Features or Plugins which create DOM which must match column order, they set the optimizedColumnMove flag to false.
// In this case we must refresh the view on column move.
if (me.optimizedColumnMove... | javascript | {
"resource": ""
} | |
q61263 | validation | function() {
var me = this;
return me.lhsMarker || (me.lhsMarker = Ext.DomHelper.append(me.el, {
cls: me.resizeMarkerCls
}, true));
} | javascript | {
"resource": ""
} | |
q61264 | validation | function() {
var animateWithClass = this.animateClearButton && this.animateWithCss3;
this.clearButtonEl = this.textField.bodyEl.createChild({
tag: 'div',
cls: this.clearButtonCls
});
if(this.animateClearButton) {
this.animat... | javascript | {
"resource": ""
} | |
q61265 | validation | function(el) {
var styles = ['transitionProperty', 'WebkitTransitionProperty', 'MozTransitionProperty',
'OTransitionProperty', 'msTransitionProperty', 'KhtmlTransitionProperty'];
var style = el.dom.style;
for(var i = 0, length = styles.length; i < length; +... | javascript | {
"resource": ""
} | |
q61266 | validation | function() {
if (!this.clearOnEscape) {
return;
}
// Using a KeyMap did not work: ESC is swallowed by combo box and date field before it reaches our own KeyMap
this.textField.inputEl.on('keydown',
function(e) {
if (e.ge... | javascript | {
"resource": ""
} | |
q61267 | validation | function() {
var clearButtonEl = this.clearButtonEl;
if (!clearButtonEl) {
return;
}
var right = 0;
if (this.fieldHasScrollBar()) {
right += Ext.getScrollBarWidth();
}
if (this.textField.triggerWrap) {
... | javascript | {
"resource": ""
} | |
q61268 | validation | function() {
if (!this.isTextArea) {
return false;
}
var inputEl = this.textField.inputEl;
var overflowY = inputEl.getStyle('overflow-y');
if (overflowY == 'hidden' || overflowY == 'visible') {
return false;
}
... | javascript | {
"resource": ""
} | |
q61269 | validation | function() {
if (this.hideClearButtonWhenEmpty && Ext.isEmpty(this.textField.getValue())) {
return false;
}
var clearButtonEl = this.clearButtonEl;
//noinspection RedundantIfStatementJS
if (this.hideClearButtonWhenMouseOut
&& !... | javascript | {
"resource": ""
} | |
q61270 | validation | function() {
var oldVisible = this.isButtonCurrentlyVisible();
var newVisible = this.shouldButtonBeVisible();
var clearButtonEl = this.clearButtonEl;
if (oldVisible != newVisible) {
if(this.animateClearButton && this.animateWithCss3) {
... | javascript | {
"resource": ""
} | |
q61271 | quit | validation | function quit(message, line, chr) {
var percentage = Math.floor((line / lines.length) * 100);
throw {
name: 'JSHintError',
line: line,
character: chr,
message: message + " (" + percentage + "% scanned).",
raw: message
};
} | javascript | {
"resource": ""
} |
q61272 | saveProperty | validation | function saveProperty(name, token) {
if (props[name] && is_own(props, name))
warning("Duplicate member '{a}'.", nexttoken, i);
else
props[name] = {};
props[name].basic = true;
props[name].basicToken = token;
... | javascript | {
"resource": ""
} |
q61273 | makePow | validation | function makePow(left, prev) {
if (left.isEmpty()) {
return prev;
}
const elem = left.first();
return makePow(
left.remove(elem),
prev.union(prev.map(e => e.add(elem)))
);
} | javascript | {
"resource": ""
} |
q61274 | validation | function(s) {
s = tinymce.trim(s);
function rep(re, str) {
s = s.replace(re, str);
};
// example: <strong> to [b]
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
... | javascript | {
"resource": ""
} | |
q61275 | validation | function(s) {
s = tinymce.trim(s);
function rep(re, str) {
s = s.replace(re, str);
};
// example: [b] to <strong>
rep(/\n/gi,"<br />");
rep(/\[b\]/gi,"<strong>");
rep(/\[\/b\]/gi,"</strong>");
rep(/\[i\]/gi,"<em>");
rep(/\[\/i\]/gi,"</em>");
rep(/\[u\]/gi,"<u>");
rep... | javascript | {
"resource": ""
} | |
q61276 | validation | function (childContext, axis) {
var collapseTarget = childContext.collapseTarget,
setSizeMethod = 'set' + axis.sizePropCap,
sizeProp = axis.sizeProp,
childMarginSize = childContext.getMarginInfo()[sizeProp],
region, isBegin, flex, pos, size;
if (collapseT... | javascript | {
"resource": ""
} | |
q61277 | validation | function (ownerContext, axis) {
var size = axis.end - axis.begin,
center = ownerContext.centerRegion;
if (center) {
center['set' + axis.sizePropCap](size - center.getMarginInfo()[axis.sizeProp]);
center.layoutPos[axis.posProp] = axis.begin;
}
return ... | javascript | {
"resource": ""
} | |
q61278 | validation | function (childItems) {
var length = childItems.length,
index, childContext;
for (index = 0; index < length; ++index) {
childContext = childItems[index];
childContext.setProp('x', childContext.layoutPos.x + childContext.marginInfo.left);
childContext.set... | javascript | {
"resource": ""
} | |
q61279 | Duration | validation | function Duration(str) {
// There must be at least a P
if(str.length < 1 || str.charAt(0) != 'P') {
throw new Error('Invalid Duration');
}
var duration = str.substr(1);
if(duration.length < 1) {
throw new Error('Invalid Duration');
}
// 5.3.2 allows for NON normalized durations
// We assume ... | javascript | {
"resource": ""
} |
q61280 | validation | function () {
var result = {},
fields = this.fields,
key, field;
for (key in fields) {
if (fields.hasOwnProperty(key)) {
field = fields[key];
if (field.isValid() && field.getValue() !== null) {
result[k... | javascript | {
"resource": ""
} | |
q61281 | validation | function (data) {
var me = this,
fields = me.fields,
key,
field;
for (key in fields) {
if (fields.hasOwnProperty(key)) {
// Prevent field's change event from tiggering a Store filter. The final upate event will do that
fiel... | javascript | {
"resource": ""
} | |
q61282 | ensureDefault | validation | function ensureDefault(val, def) {
if ((util_1.isNullOrUndefined(val) || val === '') && !chek_1.isUndefined(def))
return def;
return val;
} | javascript | {
"resource": ""
} |
q61283 | isLikeNumber | validation | function isLikeNumber(val) {
return constants_1.LIKE_HEX_NUMBER.test(val) ||
constants_1.LIKE_NUMBER.test(val);
} | javascript | {
"resource": ""
} |
q61284 | validation | function (val) {
val = ensureDefault(val, constants_1.DEFAULT_TYPE_VALUES.boolean);
return Boolean(/^false$/i.test(val) ? false : val);
} | javascript | {
"resource": ""
} | |
q61285 | validation | function (val) {
val = ensureDefault(val, constants_1.DEFAULT_TYPE_VALUES.array);
if (!Array.isArray(val))
val = [val];
return val;
} | javascript | {
"resource": ""
} | |
q61286 | toCamelcase | validation | function toCamelcase(val, strict) {
if (strict === void 0) { strict = true; }
if (!strict || !/\S+\.[^\.]\S+/.test(val))
return chek_1.camelcase(val);
return val;
} | javascript | {
"resource": ""
} |
q61287 | expandArgs | validation | function expandArgs(val, match, safe) {
if (Array.isArray(val))
return val.slice(0); // always slice to clone.
match = match || ['"', "'"];
safe = safe || ['[', ']', '<', '>'];
function replacer(p, c) {
p.a[p.a.length - 1] += c.replace(/\\(.)/, '$1');
}
var all = safe.concat(matc... | javascript | {
"resource": ""
} |
q61288 | expandOptions | validation | function expandOptions(val, allowValues) {
val = val || [];
var trail = [];
return val.reduce(function (a, c) {
if (!constants_1.FLAG_SHORT.test(c) || constants_1.FLAG_COUNT.test(c))
return a.concat(c);
var split = c.slice(1).split('').map(function (n) { return "-" + n; });
... | javascript | {
"resource": ""
} |
q61289 | isNegateFlag | validation | function isNegateFlag(val, negate) {
negate = escape(negate || constants_1.NEGATE_CHAR);
return (new RegExp('^--' + negate)).test(val);
} | javascript | {
"resource": ""
} |
q61290 | isArgVariadic | validation | function isArgVariadic(val, variadic) {
variadic = variadic || constants_1.VARIADIC_CHAR;
return isArg(val)
&& (val.endsWith(variadic + ']')
|| val.endsWith(variadic + '>'));
} | javascript | {
"resource": ""
} |
q61291 | isArgVariadicRequired | validation | function isArgVariadicRequired(val, variadic) {
variadic = variadic || constants_1.VARIADIC_CHAR;
return isArgRequired(val) && val.endsWith(variadic + '>');
} | javascript | {
"resource": ""
} |
q61292 | stripFlag | validation | function stripFlag(val, negate) {
negate = escape(negate || constants_1.NEGATE_CHAR);
return (val || '').replace(new RegExp('^--?(' + negate + ')?'), '');
} | javascript | {
"resource": ""
} |
q61293 | stripNegate | validation | function stripNegate(val, negate) {
negate = escape(negate || constants_1.NEGATE_CHAR);
var exp = new RegExp('^' + negate);
return val.replace(exp, '');
} | javascript | {
"resource": ""
} |
q61294 | stripVariadic | validation | function stripVariadic(val, variadic) {
variadic = escape(variadic || constants_1.VARIADIC_CHAR);
var exp = new RegExp(variadic + '$');
return val.replace(exp, '');
} | javascript | {
"resource": ""
} |
q61295 | stripTokens | validation | function stripTokens(val, negate, variadic) {
variadic = escape(variadic || constants_1.VARIADIC_CHAR);
negate = escape(negate || constants_1.NEGATE_CHAR);
var argExp = new RegExp(['<', '>', '\\[', '\\]'].join('|'), 'g');
var noExp = new RegExp('^' + negate);
var variExp = new RegExp(variadic + '$')... | javascript | {
"resource": ""
} |
q61296 | validation | function(item) {
if (!item) {
return;
}
var me = this,
sprite = item.sprite,
opts = Ext.merge({}, me.highlightCfg, me.highlight),
surface = me.chart.surface,
animate = me.chart.animate,
p, from, to, pi;
if ... | javascript | {
"resource": ""
} | |
q61297 | validation | function() {
if (!this.highlight || !this.items) {
return;
}
var me = this,
items = me.items,
len = items.length,
opts = Ext.merge({}, me.highlightCfg, me.highlight),
animate = me.chart.animate,
i = 0,
obj, p, s... | javascript | {
"resource": ""
} | |
q61298 | validation | function(component, selector) {
if (!selector) {
return true;
}
var selectors = selector.split(','),
length = selectors.length,
i = 0,
query;
for (; i < length; i++) {
selector = Ext.String.t... | javascript | {
"resource": ""
} | |
q61299 | getVinylFile | validation | async function getVinylFile(filePath, options) {
if (!isString(filePath)) {
if (!options.lookup.has(filePath.path)) options.lookup.set(filePath.path, filePath);
return filePath;
}
if (options.lookup.has(filePath)) return options.lookup.get(filePath);
return createVinylFile(filePath, options);
} | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.