_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 27 233k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q58500 | recursiveFn | validation | function recursiveFn(source, target, key) {
if (isArray(source) || isObject(source)) {
target = isPrimitive(target) ? isObject(source) ? {} : [] : target;
for (var _key in source) { | javascript | {
"resource": ""
} |
q58501 | deepAssign | validation | function deepAssign() {
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
if (args.length < 2) {
throw new Error('deepAssign accept two and more argument');
}
for (var i = args.length - 1; i > -1; i--) {
if (isPrimitive(arg... | javascript | {
"resource": ""
} |
q58502 | getDeepProperty | validation | function getDeepProperty(obj, keys) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$throwError = _ref.throwError,
throwError = _ref$throwError === undefined ? false : _ref$throwError,
backup = _ref.backup;
if (isString(keys)) {
keys = keys.split('.');... | javascript | {
"resource": ""
} |
q58503 | transObjectAttrIntoArray | validation | function transObjectAttrIntoArray(obj) {
var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (a, b) {
return +a - +b;
};
| javascript | {
"resource": ""
} |
q58504 | runRejectableQueue | validation | function runRejectableQueue(queue) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return new _Promise(function (resolve, reject) {
var step = function step(index) {
if (index >= queue.length) {
... | javascript | {
"resource": ""
} |
q58505 | runStoppableQueue | validation | function runStoppableQueue(queue) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
var step = function step(index) {
if (index >= queue.length) {
return true;
}
var result = | javascript | {
"resource": ""
} |
q58506 | getLegalBox | validation | function getLegalBox(_ref) {
var src = _ref.src,
box = _ref.box;
if (isString(box) && box) return box;
src = src.toLowerCase();
for (var key in boxSuffixMap) {
var | javascript | {
"resource": ""
} |
q58507 | bind$1 | validation | function bind$1(fn, context) {
if (fn.bind) {
return fn.bind(context);
} else if (fn.apply) {
return function __autobind__() {
for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
args[_key3] = arguments[_key3];
}
return fn.apply(context, ar... | javascript | {
"resource": ""
} |
q58508 | isAccessorDescriptor | validation | function isAccessorDescriptor(desc) {
return !!desc && (isFunction(desc.get) || isFunction(desc.set)) && isBoolean(desc.configurable) && | javascript | {
"resource": ""
} |
q58509 | isDataDescriptor | validation | function isDataDescriptor(desc) {
return !!desc && desc.hasOwnProperty('value') | javascript | {
"resource": ""
} |
q58510 | isInitializerDescriptor | validation | function isInitializerDescriptor(desc) {
return !!desc && isFunction(desc.initializer) | javascript | {
"resource": ""
} |
q58511 | createDefaultSetter | validation | function createDefaultSetter(key) {
return function set(newValue) {
_Object$defineProperty(this, key, {
configurable: true,
writable: true,
// IS enumerable | javascript | {
"resource": ""
} |
q58512 | compressOneArgFnArray | validation | function compressOneArgFnArray(fns) {
var errmsg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'You must pass me an array of function';
if (!isArray(fns) || fns.length < 1) {
throw new TypeError(errmsg);
}
if (fns.length === 1) {
if (!isFunction(fns[0])) {
throw new TypeEr... | javascript | {
"resource": ""
} |
q58513 | getBoundSuper | validation | function getBoundSuper(obj, fn) {
if (typeof _WeakMap === 'undefined') {
throw new Error('Using @autobind on ' + fn.name + '() requires WeakMap support due to its use of super.' + fn.name + '()');
}
if (!mapStore) {
mapStore = new _WeakMap();
}
if (mapStore.has(obj) === false) | javascript | {
"resource": ""
} |
q58514 | autobind | validation | function autobind(obj, prop, descriptor) {
if (arguments.length === 1) return autobindClass()(obj);
var _ref = descriptor || {},
fn = _ref.value,
configurable = _ref.configurable;
if (!isFunction(fn)) {
throw new TypeError('@autobind can only be used on functions, not "' + fn + '" in ' + (typeof... | javascript | {
"resource": ""
} |
q58515 | set | validation | function set(value) {
if (value === true) {
while (waitingQueue.length > 0) | javascript | {
"resource": ""
} |
q58516 | attrAndStyleCheck | validation | function attrAndStyleCheck() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (args.length > 2) {
return ['set'].concat(args);
}
if (args.length === 2) {
if | javascript | {
"resource": ""
} |
q58517 | Vessel | validation | function Vessel(dispatcher, target, config) {
var _this = this;
_classCallCheck(this, Vessel);
this.__dispatcher = dispatcher;
this.__target = target;
['width', 'height', 'position', 'display'].forEach(function (key) {
_Object$defineProperty(_this, key, {
get: function get() {
return this.... | javascript | {
"resource": ""
} |
q58518 | destroy | validation | function destroy() {
for (var _key in this.plugins) {
this.unuse(_key);
}
this.binder.destroy();
delete this.binder;
this.dom.destroy();
delete this.dom;
| javascript | {
"resource": ""
} |
q58519 | eventBinderCheck | validation | function eventBinderCheck(key, fn) {
if (!chimeeHelper.isString(key)) throw new TypeError('key | javascript | {
"resource": ""
} |
q58520 | oldVideoTimeupdate | validation | function oldVideoTimeupdate() {
var currentTime = _this2.kernel.currentTime;
if (bias <= 0 && currentTime >= idealTime || bias > 0 && (Math.abs(idealTime - currentTime) <= bias && newVideoReady || currentTime - idealTime > bias)) {
chimeeHelper.removeEvent(_this2.dom.videoEle... | javascript | {
"resource": ""
} |
q58521 | registerEvents | validation | function registerEvents() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
name = _ref.name,
target = _ref.target;
if (!name || !chimeeHelper.isString(name)) throw new Error('The event name | javascript | {
"resource": ""
} |
q58522 | validation | function (runState) {
const [a, b] = runState.stack.popN(2)
const r = new BN(a.lt(b) | javascript | {
"resource": ""
} | |
q58523 | validation | function (runState) {
const [offset, length] = runState.stack.popN(2)
subMemUsage(runState, offset, length)
let data = Buffer.alloc(0)
if (!length.isZero()) {
data = runState.memory.read(offset.toNumber(), length.toNumber())
}
// copy fee
| javascript | {
"resource": ""
} | |
q58524 | validation | function (runState, cb) {
const number = runState.stack.pop()
var blockchain = runState.blockchain
var diff = new BN(runState.block.header.number).sub(number)
// block lookups must be within the past 256 blocks
if (diff.gtn(256) || diff.lten(0)) {
runState.stack.push(new BN(0))
cb(null)... | javascript | {
"resource": ""
} | |
q58525 | validation | function (runState, done) {
if (runState.static) {
trap(ERROR.STATIC_STATE_CHANGE)
}
const [value, offset, length] = runState.stack.popN(3)
subMemUsage(runState, offset, length)
let data = Buffer.alloc(0)
if (!length.isZero()) {
data = runState.memory.read(offset.toNumber(), length... | javascript | {
"resource": ""
} | |
q58526 | validation | function (runState, cb) {
let selfdestructToAddress = runState.stack.pop()
if (runState.static) {
trap(ERROR.STATIC_STATE_CHANGE)
}
var stateManager = runState.stateManager
var contract = runState.contract
var contractAddress = runState.address
selfdestructToAddress = addressToBuffer(s... | javascript | {
"resource": ""
} | |
q58527 | getDataSlice | validation | function getDataSlice (data, offset, length) {
let len = new BN(data.length)
if (offset.gt(len)) {
offset = len
}
let end = offset.add(length)
if (end.gt(len)) {
end = len
}
| javascript | {
"resource": ""
} |
q58528 | checkCallMemCost | validation | function checkCallMemCost (runState, callOptions, localOpts) {
// calculates the gas need for saving the output in memory
subMemUsage(runState, localOpts.outOffset, localOpts.outLength)
| javascript | {
"resource": ""
} |
q58529 | validation | function (next) {
genesisBlock.header = new BlockHeader(
| javascript | {
"resource": ""
} | |
q58530 | validation | function (next) {
async.eachSeries(testData.blocks, eachBlock, next)
function eachBlock (raw, cb) {
try {
var block = new Block(
Buffer.from(raw.rlp.slice(2), 'hex'))
// forces the block into thinking they are homestead
block.header.isHomestead = function () {
... | javascript | {
"resource": ""
} | |
q58531 | getHead | validation | function getHead (next) {
vm.blockchain.getHead(function (err, block) {
// make | javascript | {
"resource": ""
} |
q58532 | runVm | validation | function runVm (err) {
// Check that the programCounter is in range. Does not overwrite the previous err, if any.
const pc = runState.programCounter
| javascript | {
"resource": ""
} |
q58533 | loadContract | validation | function loadContract (cb) {
stateManager.getAccount(runState.address, function (err, account) {
| javascript | {
"resource": ""
} |
q58534 | preprocessValidJumps | validation | function preprocessValidJumps (runState) {
for (var i = 0; i < runState.code.length; i++) {
var curOpCode = lookupOpInfo(runState.code[i]).name
// no destinations into the middle of PUSH
if | javascript | {
"resource": ""
} |
q58535 | getStartingState | validation | function getStartingState (cb) {
// if we are just starting or if a chain re-org has happened
if (!headBlock || reorg) {
blockchain.getBlock(block.header.parentHash, function (err, parentBlock) {
parentState = parentBlock.header.stateRoot
| javascript | {
"resource": ""
} |
q58536 | runBlock | validation | function runBlock (cb) {
self.runBlock({
block: block,
root: parentState
}, function (err, results) {
if (err) {
// remove invalid block
blockchain.delBlock(block.header.hash(), function () {
cb(err)
| javascript | {
"resource": ""
} |
q58537 | payOmmersAndMiner | validation | function payOmmersAndMiner (cb) {
var ommers = block.uncleHeaders
// pay each ommer
async.series([
rewardOmmers,
rewardMiner
], cb)
function rewardOmmers (done) {
async.each(block.uncleHeaders, function (ommer, next) {
// calculate reward
var minerReward = new BN(... | javascript | {
"resource": ""
} |
q58538 | parseBlockResults | validation | function parseBlockResults (err) {
if (err) {
if (checkpointedState) {
self.stateManager.revert(function () {
cb(err)
})
} else {
cb(err)
}
return
}
self.stateManager.commit(function (err) {
if (err) return cb(err)
self.stateManager.get... | javascript | {
"resource": ""
} |
q58539 | setup | validation | function setup (cb) {
// the address we are sending from
var publicKeyBuf = Buffer.from(keyPair.publicKey, 'hex')
var address = utils.pubToAddress(publicKeyBuf, true)
// create a new account
var account = new Account()
// give the account some wei.
// Note: this needs to be a `Buffer` or a string. Al... | javascript | {
"resource": ""
} |
q58540 | runTx | validation | function runTx (raw, cb) {
// create a new transaction out of the json
var tx = new Transaction(raw)
// tx.from
tx.sign(Buffer.from(keyPair.secretKey, 'hex'))
console.log('----running tx-------')
// run the tx \o/
vm.runTx({
tx: tx
}, function (err, results) {
createdAddress = results.createdA... | javascript | {
"resource": ""
} |
q58541 | checkResults | validation | function checkResults (cb) {
// fetch the new account from the trie.
stateTrie.get(createdAddress, function (err, val) {
var account = new Account(val)
storageRoot = account.stateRoot // used later! :)
console.log('------results------')
console.log('nonce: ' + account.nonce.toString('hex'))
con... | javascript | {
"resource": ""
} |
q58542 | readStorage | validation | function readStorage (cb) {
// we need to create a copy of the state root
var storageTrie = stateTrie.copy()
// Since we are using a copy we won't change the
// root of `stateTrie`
storageTrie.root = storageRoot
var stream = storageTrie.createReadStream()
| javascript | {
"resource": ""
} |
q58543 | _handleKey | validation | function _handleKey(character, modifiers, e) {
var self = this;
if (!self.recording) {
_origHandleKey.apply(self, arguments);
return;
}
// remember this character if we're currently recording a sequence
if (e.type == 'keydown') {
if (characte... | javascript | {
"resource": ""
} |
q58544 | _recordKey | validation | function _recordKey(key) {
var i;
// one-off implementation of Array.indexOf, since IE6-9 don't support it
for (i = 0; i < _currentRecordedKeys.length; ++i) {
| javascript | {
"resource": ""
} |
q58545 | _normalizeSequence | validation | function _normalizeSequence(sequence) {
var i;
for (i = 0; i < sequence.length; ++i) {
sequence[i].sort(function(x, y) {
// modifier keys always come first, in alphabetical order
if (x.length > 1 && y.length === 1) {
return -1;
... | javascript | {
"resource": ""
} |
q58546 | _finishRecording | validation | function _finishRecording() {
if (_recordedSequenceCallback) {
_normalizeSequence(_recordedSequence);
_recordedSequenceCallback(_recordedSequence);
| javascript | {
"resource": ""
} |
q58547 | CreateSetPolyfill | validation | function CreateSetPolyfill() {
return /** @class */ (function () {
function Set() {
this._map = new _Map();
}
Object.defineProperty(Set.prototype, "size", {
get: function () { return this._map.size; },
... | javascript | {
"resource": ""
} |
q58548 | fuzzysearch | validation | function fuzzysearch (searchString, haystack, caseInsensitive) {
var tlen = haystack.length;
var qlen = searchString.length;
var chunks = 1;
var finding = false;
var prefix = true;
if (qlen > tlen) {
return false;
}
if (qlen === tlen) {
if (searchString === haystack) {
return { caseM... | javascript | {
"resource": ""
} |
q58549 | getExternals | validation | function getExternals (api, pluginOptions) {
const nodeModulesPath = pluginOptions.nodeModulesPath || './node_modules'
let nodeModulesPaths = []
if (Array.isArray(nodeModulesPath)) {
// Set to user-defined array
nodeModulesPaths = nodeModulesPath
} else {
// Add path to list
nodeModulesPaths.pus... | javascript | {
"resource": ""
} |
q58550 | validation | function(hashKey, dataObject, myContent, myClass, bootstrapSettings) {
var exportButton = document.createElement("button");
exportButton.setAttribute("type", "button");
| javascript | {
"resource": ""
} | |
q58551 | validation | function(string) {
var self = this;
return String(string).replace(/[&<>'\/]/g, function(s) {
| javascript | {
"resource": ""
} | |
q58552 | validation | function(string) {
var str = String(string);
for (var key in this.entityMap) {
| javascript | {
"resource": ""
} | |
q58553 | validation | function(string) {
if (!string) return "";
var types = this.typeConfig;
if (~string.indexOf(types.string.defaultClass)) {
return _TYPE.STRING;
} else if (~string.indexOf(types.number.defaultClass)) {
| javascript | {
"resource": ""
} | |
q58554 | validation | function(v, date1904) {
if (date1904) v += 1462;
var epoch = Date.parse(v);
| javascript | {
"resource": ""
} | |
q58555 | validation | function(data, merges) {
var ws = {};
var range = { s: { c: 10000000, r: 10000000 }, e: { c: 0, r: 0 } };
var types = this.typeConfig;
for (var R = 0; R !== data.length; ++R) {
for (var C = 0; C !== data[R].length; ++C) {
if (range.s.r > R) range.s.r = R;
if (range.s.... | javascript | {
"resource": ""
} | |
q58556 | validation | function(event) {
var target = event.target;
var object = JSON.parse(Storage.getInstance().getItem(target.getAttribute(this.storageKey))),
data = object.data,
filename = object.filename,
mimeType = object.mimeType,
fileExtension = object.fileExtension,
merges = object... | javascript | {
"resource": ""
} | |
q58557 | validation | function(data, mime, name, extension, merges, RTL, sheetname) {
var format = extension.slice(1);
data = this.getRawData(data, extension, name, merges, RTL, sheetname);
if (_isMobile && (format === _FORMAT.CSV || format === _FORMAT.TXT)) {
var dataURI = "data:" + mime + ";" + this.charset + ",... | javascript | {
"resource": ""
} | |
q58558 | validation | function() {
this._instance = null;
this.store = sessionStorage;
this.namespace = TableExport.prototype.defaultNamespace;
this.getKey = function(key) {
return this.namespace + key;
};
this.setItem = function(_key, value, overwrite) {
var key = this.getKey(_key);
if (this.exist... | javascript | {
"resource": ""
} | |
q58559 | getPlatformLibtensorflowUri | validation | function getPlatformLibtensorflowUri() {
let targetUri = BASE_URI;
if (platform === 'linux') {
if (os.arch() === 'arm') {
// TODO(kreeger): Update to TensorFlow 1.13:
// https://github.com/tensorflow/tfjs/issues/1370
targetUri =
'https://storage.googleapis.com/tf-builds/libtensorflow... | javascript | {
"resource": ""
} |
q58560 | cleanDeps | validation | async function cleanDeps() {
if (await exists(depsPath)) {
| javascript | {
"resource": ""
} |
q58561 | downloadLibtensorflow | validation | async function downloadLibtensorflow(callback) {
// Ensure dependencies staged directory is available:
await ensureDir(depsPath);
console.warn('* Downloading libtensorflow');
resources.downloadAndUnpackResource(
getPlatformLibtensorflowUri(), depsPath, async () => {
if (platform === 'win32') {
... | javascript | {
"resource": ""
} |
q58562 | build | validation | async function build() {
console.error('* Building TensorFlow Node.js bindings');
cp.exec('node-gyp rebuild', (err) => {
if (err) {
throw | javascript | {
"resource": ""
} |
q58563 | run | validation | async function run() {
// First check if deps library exists:
if (forceDownload !== 'download' && await exists(depsLibTensorFlowPath)) {
// Library has already been downloaded, then compile and simlink:
await build();
} else | javascript | {
"resource": ""
} |
q58564 | symlinkDepsLib | validation | async function symlinkDepsLib() {
if (destLibPath === undefined) {
throw new Error('Destination path not supplied!');
}
try {
await symlink(depsLibTensorFlowPath, destLibPath);
if (os.platform() !== 'win32') {
await symlink(depsLibTensorFlowFrameworkPath, destFrameworkLibPath);
}
} catch (... | javascript | {
"resource": ""
} |
q58565 | moveDepsLib | validation | async function moveDepsLib() {
await rename(depsLibTensorFlowPath, destLibPath);
if (os.platform() !== 'win32') {
| javascript | {
"resource": ""
} |
q58566 | run | validation | async function run(action) {
if (action.endsWith('symlink')) {
// Symlink will happen during `node-gyp rebuild`
await symlinkDepsLib();
} else if (action.endsWith('move')) {
// Move action is used when installing | javascript | {
"resource": ""
} |
q58567 | downloadAndUnpackResource | validation | async function downloadAndUnpackResource(uri, destPath, callback) {
// If HTTPS_PROXY, https_proxy, HTTP_PROXY, or http_proxy is set
const proxy = process.env['HTTPS_PROXY'] || process.env['https_proxy'] ||
process.env['HTTP_PROXY'] || process.env['http_proxy'] || '';
// Using object destructuring to const... | javascript | {
"resource": ""
} |
q58568 | cssToAST | validation | function cssToAST(text, syntax, filename) {
var string = JSON.stringify;
var fileInfo = filename ? ' at ' + filename : '';
var tree;
try {
tree = gonzales.parse(text, {syntax: syntax});
} catch (e) {
throw new Error('Parsing error' + fileInfo + ': ' + e.message);
}
// TODO: When can tree be unde... | javascript | {
"resource": ""
} |
q58569 | detectInTree | validation | function detectInTree(tree, handlers) {
var detectedOptions = {};
// We walk across complete tree for each handler,
// because we need strictly maintain order in which handlers work,
// despite fact that handlers work on different level of the | javascript | {
"resource": ""
} |
q58570 | getDetectedOptions | validation | function getDetectedOptions(detected, handlers) {
var options = {};
Object.keys(detected).forEach(function(option) {
// List of all the detected variants from the stylesheet
// for the given option:
var values = detected[option];
var i;
if (!values.length) {
// If there are no values for t... | javascript | {
"resource": ""
} |
q58571 | getHandler | validation | function getHandler(optionName) {
var option = require('./options/' + optionName);
if (!option.detect)
throw new | javascript | {
"resource": ""
} |
q58572 | isEmptyBlock | validation | function isEmptyBlock(node) {
if (!node.length) return true;
| javascript | {
"resource": ""
} |
q58573 | getPrefixInfo | validation | function getPrefixInfo(propertyName, namespace, extraSymbols) {
var baseName = propertyName;
var prefixLength = 0;
namespace = namespace || '';
extraSymbols = extraSymbols || 0;
if (!propertyName) return;
PREFIXES.some(function(prefix) {
prefix = '-' + prefix + '-';
if (propertyNa... | javascript | {
"resource": ""
} |
q58574 | extraIndent | validation | function extraIndent(nodes) {
if (!nodes || !nodes.length) return;
var node;
var crPos;
var tabPos;
var result = 0;
for (var i = nodes.length; i--;) {
node = nodes[i];
if (!node.content) {
crPos = -1;
} else {
crPos = node.content.lastIndexOf('\n');
t... | javascript | {
"resource": ""
} |
q58575 | extraIndentProperty | validation | function extraIndentProperty(nodes, i) {
var subset = [];
while (i--) {
if (!nodes.get(i) || | javascript | {
"resource": ""
} |
q58576 | extraIndentVal | validation | function extraIndentVal(nodes, i) {
var subset = [];
var declaration = nodes.get(i);
if (!declaration.is('declaration')) return;
for (var x = declaration.length; x--;) {
if (!declaration.get(x).is('value')) continue;
| javascript | {
"resource": ""
} |
q58577 | walk | validation | function walk(args) {
args.node.forEach(function(item, i) {
var name = args.selector(item);
var namespace = args.namespaceSelector &&
makeNamespace(args.namespaceSelector(item));
var extraSymbols = args.getExtraSymbols(args.node, i);
| javascript | {
"resource": ""
} |
q58578 | updateDict | validation | function updateDict(info, dict) {
if (info.prefixLength === 0 && info.extra === 0) return;
var indent = dict[info.id] || {prefixLength: 0, extra: 0};
let indentLength = indent.prefixLength + indent.extra;
let infoLength = info.prefixLength + info.extra;
if (indentLength | javascript | {
"resource": ""
} |
q58579 | updateIndent | validation | function updateIndent(info, dict, whitespaceNode) {
var item = dict[info.id];
if (!item)
return whitespaceNode;
var crPos = whitespaceNode.lastIndexOf('\n');
var tabPos = whitespaceNode.lastIndexOf('\t');
if (tabPos > crPos) crPos = tabPos;
var firstPart = whitespaceNode.substr(0, crPo... | javascript | {
"resource": ""
} |
q58580 | animate | validation | function animate() {
controls.update();
renderer.render(scene, camera);
controls1.update();
renderer1.render(scene1, camera1);
| javascript | {
"resource": ""
} |
q58581 | validation | function(vertex, face) {
vertex.face = face;
if (face.outside === null) {
this.assigned.append(vertex);
| javascript | {
"resource": ""
} | |
q58582 | validation | function(vertex, face) {
if (vertex === face.outside) {
// fix face.outside link
if (vertex.next !== null && vertex.next.face === face) {
// face has at least 2 outside vertices, move the 'outside' reference
face.outside = vertex.next;
} else {
| javascript | {
"resource": ""
} | |
q58583 | validation | function(face) {
if (face.outside !== null) {
// reference to the first and last vertex of this face
var start = face.outside;
var end = face.outside;
while (end.next !== null && end.next.face === face) {
end = end.next;
| javascript | {
"resource": ""
} | |
q58584 | validation | function(face, absorbingFace) {
var faceVertices = this.removeAllVerticesFromFace(face);
if (faceVertices !== undefined) {
if (absorbingFace === undefined) {
// mark the vertices to be reassigned to some other face
this.unassigned.appendChain(faceVertices);
} else {
... | javascript | {
"resource": ""
} | |
q58585 | validation | function(newFaces) {
if (this.unassigned.isEmpty() === false) {
var vertex = this.unassigned.first();
do {
// buffer 'next' reference, see .deleteFaceVertices()
var nextVertex = vertex.next;
var maxDistance = this.tolerance;
var maxFace = null;
... | javascript | {
"resource": ""
} | |
q58586 | validation | function() {
var min = new THREE.Vector3();
var max = new THREE.Vector3();
var minVertices = [];
var maxVertices = [];
var i, l, j;
// initially assume that the first vertex is the min/max
for (i = 0; i < 3; i++) {
minVertices[i] = maxVertices[i] = this.vertices[0];... | javascript | {
"resource": ""
} | |
q58587 | validation | function() {
var activeFaces = [];
for (var i = 0; i < this.faces.length; i++) {
var face = this.faces[i];
if (face.mark === Visible) {
| javascript | {
"resource": ""
} | |
q58588 | validation | function() {
// if the 'assigned' list of vertices is empty, no vertices are left. return with 'undefined'
if (this.assigned.isEmpty() === false) {
var eyeVertex,
maxDistance = 0;
// grap the first available face and start with the first visible vertex of that face
var e... | javascript | {
"resource": ""
} | |
q58589 | validation | function(eyePoint, crossEdge, face, horizon) {
// moves face's vertices to the 'unassigned' vertex list
this.deleteFaceVertices(face);
face.mark = Deleted;
var edge;
if (crossEdge === null) {
edge = crossEdge = face.getEdge(0);
} else {
// start from the next edge... | javascript | {
"resource": ""
} | |
q58590 | validation | function(eyeVertex, horizonEdge) {
// all the half edges are created in ccw order thus the face is always pointing outside the hull
var face = Face.create(eyeVertex, horizonEdge.tail(), horizonEdge.head());
| javascript | {
"resource": ""
} | |
q58591 | validation | function(eyeVertex) {
var horizon = [];
this.unassigned.clear();
// remove 'eyeVertex' from 'eyeVertex.face' so that it can't be added to the 'unassigned' vertex list
this.removeVertexFromFace(eyeVertex, eyeVertex.face);
this.computeHorizon(eyeVertex.point, null, eyeVertex.face, horizo... | javascript | {
"resource": ""
} | |
q58592 | VertexNode | validation | function VertexNode(point) {
this.point = point;
this.prev = | javascript | {
"resource": ""
} |
q58593 | validation | function(target, vertex) {
vertex.prev = target.prev;
vertex.next = target;
if (vertex.prev === null) | javascript | {
"resource": ""
} | |
q58594 | validation | function(target, vertex) {
vertex.prev = target;
vertex.next = target.next;
if (vertex.next === null) | javascript | {
"resource": ""
} | |
q58595 | validation | function(vertex) {
if (this.head === null) {
this.head = vertex;
} else {
this.tail.next = vertex;
}
vertex.prev = | javascript | {
"resource": ""
} | |
q58596 | validation | function(vertex) {
if (vertex.prev === null) {
this.head = vertex.next;
} else {
vertex.prev.next = vertex.next; | javascript | {
"resource": ""
} | |
q58597 | validation | function(a, b) {
if (a.prev === null) {
this.head = b.next;
} else {
a.prev.next = b.next; | javascript | {
"resource": ""
} | |
q58598 | onWindowResize | validation | function onWindowResize() {
camera.aspect = container.offsetWidth / container.offsetHeight;
camera.updateProjectionMatrix();
| javascript | {
"resource": ""
} |
q58599 | info | validation | function info(msg) {
if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.infos) {
| javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.