Validate that the rig does not contain any pole targets, inverse kinematic, or other non deformation bones  The user must bake these animations before exporting their model. [LINK TO DOCS]
973293
function noControlBones (allJointNames, deformationJointNames) {
  // We know that there are no control bones if the number of bones
  // matches the number of deformation bones. Otherwise we throw a
  // descriptive error
  if (allJointNames.length !== deformationJointNames.length) {
    // Let's find the control joint names so that we can report
    // them to the user

    // [joint_1, joint_2] -> {joint_1: true, joint_2: true}
    // We're doing this in order to look up the missing elements
    var deformJoints = deformationJointNames.reduce(function (allJoints, jointName) {
      allJoints[jointName] = true
      return allJoints
    }, {})

    // Create an array of control joint names
    var nonDeformJoints = allJointNames.reduce(function (nonDeformJoints, jointName) {
      if (!deformJoints[jointName]) {
        nonDeformJoints.push(jointName)
      }
      return nonDeformJoints
    }, [])

    // Throw an error with a link to the documentation and the names of their non-deformation bones
    throw new Error(
      `
      It looks like you're trying to parse a model that has ${nonDeformJoints.length} non deformation bone${nonDeformJoints.length > 1 ? 's' : ''}.

        -> ${nonDeformJoints.join(', ')}

      ---

      These could be inverse kinematics bones, control bones, pole targets, or other
      helper bones.

      collada-dae-parser does not support non-deformation bones.

      You might try opening your model in your favorite modeling tool and
      baking the effects of your control bones into your deformation bones.

      ---

      Here's some documentation on how to account for your control bones in Blender:

        -> https://github.com/chinedufn/collada-dae-parser/blob/master/docs/blender-export/blender-export.md#control-joints
      `
    )
  }
}
894797
def is_valid(self):
        
        if len(self.geometry) == 0:
            return True

        try:
            referenced = {self.graph[i][1]
                          for i in self.graph.nodes_geometry}
        except BaseException:
            # if connectivity to world frame is broken return false
            return False

        # every geometry is referenced
        ok = referenced == set(self.geometry.keys())

        return ok
246351
def validate(self, n_viz=9):
        
        iter_valid = copy.copy(self.iter_valid)
        losses, lbl_trues, lbl_preds = [], [], []
        vizs = []
        dataset = iter_valid.dataset
        desc = 'valid [iteration=%08d]' % self.iteration
        for batch in tqdm.tqdm(iter_valid, desc=desc, total=len(dataset),
                               ncols=80, leave=False):
            img, lbl_true = zip(*batch)
            batch = map(datasets.transform_lsvrc2012_vgg16, batch)
            with chainer.no_backprop_mode(), \
                    chainer.using_config('train', False):
                in_vars = utils.batch_to_vars(batch, device=self.device)
                loss = self.model(*in_vars)
            losses.append(float(loss.data))
            score = self.model.score
            lbl_pred = chainer.functions.argmax(score, axis=1)
            lbl_pred = chainer.cuda.to_cpu(lbl_pred.data)
            for im, lt, lp in zip(img, lbl_true, lbl_pred):
                lbl_trues.append(lt)
                lbl_preds.append(lp)
                if len(vizs) < n_viz:
                    viz = utils.visualize_segmentation(
                        lbl_pred=lp, lbl_true=lt,
                        img=im, n_class=self.model.n_class)
                    vizs.append(viz)
        # save visualization
        out_viz = osp.join(self.out, 'visualizations_valid',
                           'iter%08d.jpg' % self.iteration)
        if not osp.exists(osp.dirname(out_viz)):
            os.makedirs(osp.dirname(out_viz))
        viz = utils.get_tile_image(vizs)
        skimage.io.imsave(out_viz, viz)
        # generate log
        acc = utils.label_accuracy_score(
            lbl_trues, lbl_preds, self.model.n_class)
        self._write_log(**{
            'epoch': self.epoch,
            'iteration': self.iteration,
            'elapsed_time': time.time() - self.stamp_start,
            'valid/loss': np.mean(losses),
            'valid/acc': acc[0],
            'valid/acc_cls': acc[1],
            'valid/mean_iu': acc[2],
            'valid/fwavacc': acc[3],
        })
        self._save_model()
1032522
def _validate_nonzero_image_size(self, nrows, ncols, component_index):
        
        if nrows == 0 or ncols == 0:
            # Letting this situation continue would segfault openjpeg.
            msg = "Component {0} has dimensions {1} x {2}"
            msg = msg.format(component_index, nrows, ncols)
            raise IOError(msg)
831444
function validateObjectList( $package, $http, $currentStepID, &$stepMap, &$persistentData, &$errorList )
    {
        if ( count( $persistentData['node_list'] ) == 0 )
        {
            $errorList[] = array( 'field' => ezpI18n::tr( 'kernel/package', 'Selected nodes' ),
                                  'description' => ezpI18n::tr( 'kernel/package', 'You must select one or more node(s)/subtree(s) for export.' ) );
            return false;
        }

        return true;
    }
764273
def surface_is_valid1(surface):
    """"""
    if NO_IMAGES:
        return

    ax = surface.plot(256)
    ax.axis("scaled")
    ax.set_xlim(-0.125, 2.125)
    ax.set_ylim(-0.125, 2.125)
    save_image(ax.figure, "surface_is_valid1.png")
871798
def is_armable(self):
        
        # check that mode is not INITIALSING
        # check that we have a GPS fix
        # check that EKF pre-arm is complete
        return self.mode != 'INITIALISING' and (self.gps_0.fix_type is not None and self.gps_0.fix_type > 1) and self._ekf_predposhorizabs
812285
def validate_target(self, target):
        """"""

        archs = target.split('/')

        for arch in archs:
            if not arch in self.archs:
                return False

        return True
1238868
private function validate()
    {
        if (empty($this->modelName) && empty($this->model)) {
            throw new Exception\ModelNotSetException();
        }

        if (empty($this->model)) {
            $this->model = new $this->modelName();
        }

        if (empty($this->modelName)) {
            $this->modelName = get_class($this->model);
        }

        if (empty($this->db)) {
            $this->db = $this->model->getConnection();
        }
    }
183081
def _validate(self):
        
        # This could be done with a default config

        # Check that specific keys exist
        sections = odict([
                ('catalog',['dirname','basename',
                            'lon_field','lat_field','objid_field',
                            'mag_1_band', 'mag_1_field', 'mag_err_1_field',
                            'mag_2_band', 'mag_2_field', 'mag_err_2_field',
                            ]),
                ('mask',[]),
                ('coords',['nside_catalog','nside_mask','nside_likelihood',
                           'nside_pixel','roi_radius','roi_radius_annulus',
                           'roi_radius_interior','coordsys',
                           ]),
                ('likelihood',[]),
                ('output',[]),
                ('batch',[]),
                ])  

        keys = np.array(list(sections.keys()))
        found = np.in1d(keys,list(self.keys()))

        if not np.all(found):
            msg = 'Missing sections: '+str(keys[~found])
            raise Exception(msg)

        for section,keys in sections.items():
            keys = np.array(keys)
            found = np.in1d(keys,list(self[section].keys()))
            if not np.all(found):
                msg = 'Missing keys in %s: '%(section)+str(keys[~found])
                raise Exception(msg)
716434
def validate_target(target)
      error_message = "You can't specify target (#{target}) as alias because it is real action name"
      raise Error, error_message if aliased_actions.values.flatten.include? target
    end
40076
@SuppressLint("NewApi")
	private void postAnimationInvalidate() {
		if (mScroller.computeScrollOffset()) {
			final int oldX = (int) mOffsetPixels;
			final int x = mScroller.getCurrX();

			if (x != oldX) {
				setOffsetPixels(x);
			}
			if (x != mScroller.getFinalX()) {
				postOnAnimation(mDragRunnable);
				return;
			}
		}

		completeAnimation();
	}
225130
def _validate_platforms_in_image(self, image):
        """"""
        expected_platforms = get_platforms(self.workflow)
        if not expected_platforms:
            self.log.info('Skipping validation of available platforms '
                          'because expected platforms are unknown')
            return
        if len(expected_platforms) == 1:
            self.log.info('Skipping validation of available platforms for base image '
                          'because this is a single platform build')
            return

        if not image.registry:
            self.log.info('Cannot validate available platforms for base image '
                          'because base image registry is not defined')
            return

        try:
            platform_to_arch = get_platform_to_goarch_mapping(self.workflow)
        except KeyError:
            self.log.info('Cannot validate available platforms for base image '
                          'because platform descriptors are not defined')
            return

        manifest_list = self._get_manifest_list(image)

        if not manifest_list:
            raise RuntimeError('Unable to fetch manifest list for base image')

        all_manifests = manifest_list.json()['manifests']
        manifest_list_arches = set(
            manifest['platform']['architecture'] for manifest in all_manifests)

        expected_arches = set(
            platform_to_arch[platform] for platform in expected_platforms)

        self.log.info('Manifest list arches: %s, expected arches: %s',
                      manifest_list_arches, expected_arches)
        assert manifest_list_arches >= expected_arches, \
            'Missing arches in manifest list for base image'

        self.log.info('Base image is a manifest list for all required platforms')
1314936
def geom_check_axis(g, atwts, ax,
        nmax=_DEF.SYMM_MATCH_NMAX,
        tol=_DEF.SYMM_MATCH_TOL):
    

    # Imports
    import numpy as np

    # Store the max found rotation order of the geometry.
    order = geom_find_rotsymm(g, atwts, ax, \
                                        False, nmax, tol)[0]

    # Store the presence/absence of a reflection plane.
    refl = geom_symm_match(g, atwts, ax, 0, True) < tol

    # Return the pair of values for outside handling
    return order, refl
1000007
def validate(self, generator, axesToMove=None, **kwargs):
        # type: (AGenerator, AAxesToMove, **Any) -> AConfigureParams
        
        iterations = 10
        # We will return this, so make sure we fill in defaults
        for k, default in self._block.configure.defaults.items():
            if k not in kwargs:
                kwargs[k] = default
        # The validated parameters we will eventually return
        params = ConfigureParams(generator, axesToMove, **kwargs)
        # Make some tasks just for validate
        part_contexts = self.create_part_contexts()
        # Get any status from all parts
        status_part_info = self.run_hooks(
            ReportStatusHook(p, c) for p, c in part_contexts.items())
        while iterations > 0:
            # Try up to 10 times to get a valid set of parameters
            iterations -= 1
            # Validate the params with all the parts
            validate_part_info = self.run_hooks(
                ValidateHook(p, c, status_part_info, **kwargs)
                for p, c, kwargs in self._part_params(part_contexts, params))
            tweaks = ParameterTweakInfo.filter_values(validate_part_info)
            if tweaks:
                for tweak in tweaks:
                    deserialized = self._block.configure.takes.elements[
                        tweak.parameter].validate(tweak.value)
                    setattr(params, tweak.parameter, deserialized)
                    self.log.debug(
                        "Tweaking %s to %s", tweak.parameter, deserialized)
            else:
                # Consistent set, just return the params
                return params
        raise ValueError("Could not get a consistent set of parameters")
24883
def is_valid_intensity_measure_types(self):
        
        if self.ground_motion_correlation_model:
            for imt in self.imtls:
                if not (imt.startswith('SA') or imt == 'PGA'):
                    raise ValueError(
                        'Correlation model %s does not accept IMT=%s' % (
                            self.ground_motion_correlation_model, imt))
        if self.risk_files:  # IMTLs extracted from the risk files
            return (self.intensity_measure_types is None and
                    self.intensity_measure_types_and_levels is None)
        elif not hasattr(self, 'hazard_imtls') and not hasattr(
                self, 'risk_imtls'):
            return False
        return True
1369360
def validate_claims(options = {})
      validate_exp(options[:max_clock_skew]) unless options[:ignore_exp]
      validate_nbf(options[:max_clock_skew]) unless options[:ignore_nbf]
      validate_iss(options[:valid_iss])
      validate_aud(options[:valid_aud])
      self
    end