Check if this module has unactive container
333996
public function hasUnactiveContainer()
    {
        $parent = $this->parent_uid;
        if (preg_match_all('|\{(\d+)\}|', $parent, $matches)) {
            if (!empty($matches[1])) {
                foreach($matches[1] as $nextDbId) {
                    if (!static::isActive($nextDbId)) return true;
                }
            }
        }
        return false;
    }
1203303
function containsExternals(modules) {
                    for (var index = 0, length = modules.length; index < length; index++) {
                        if (modules[index].flags.isExternal)
                            return true;
                    }
                    return false;
                }
1036665
def is_none(entity, prop, name):
    ""
    return is_not_empty(entity, prop, name) and getattr(entity, name) is None
511271
public static boolean checkConfiguredInModules() {

        Boolean result = m_moduleCheckCache.get();
        if (result == null) {
            result = Boolean.valueOf(getConfiguredTemplateMapping() != null);
            m_moduleCheckCache.set(result);
        }
        return result.booleanValue();
    }
1115451
protected function hasMelisCmsModule()
    {
        $modulesSvc = $this->getServiceLocator()->get('MelisAssetManagerModulesService');
        $modules = $modulesSvc->getAllModules();
        $path = $modulesSvc->getModulePath('MelisCms');
        $isExists = 0;

        if (file_exists($path)) {
            $isExists = 1;
        }

        return $isExists;
    }
32443
function requireUnsee(module) {
  if (window.requirejs.has(module)) {
      window.requirejs.unsee(module);
  }
}
1342833
def is_noop(self):
        
        has_operations = [mode.pre_operations or mode.post_operations
                          for mode in self._version_modes.values()]
        has_upgrade_addons = [mode.upgrade_addons or mode.remove_addons
                              for mode in self._version_modes.values()]
        noop = not any((has_upgrade_addons, has_operations))
        return noop
1237524
def _ensure_exists(wrapped):
    '''
    
    '''
    @functools.wraps(wrapped)
    def check_exists(name, *args, **kwargs):
        if not exists(name):
            raise CommandExecutionError(
                'Container \'{0}\' does not exist'.format(name)
            )
        return wrapped(name, *args, **salt.utils.args.clean_kwargs(**kwargs))
    return check_exists
235613
def _is_container_excluded(self, container):
        
        container_name = DockerUtil.container_name_extractor(container)[0]
        return container_name in self._filtered_containers
579399
public function hasActualContainer(): bool
    {
        if (false === $this->environment->isDebug())
        {
            return true === $this->configCache()->isFresh();
        }

        return false;
    }
151468
def is_templatetags_module_valid_constant(node):
    """"""
    if node.name not in ('register', ):
        return False

    parent = node.parent
    while not isinstance(parent, Module):
        parent = parent.parent

    if "templatetags." not in parent.name:
        return False

    return True
299329
function checkInContainer () {
  const fs = require('fs')
  if (fs.existsSync(`/proc/1/cgroup`)) {
    const content = fs.readFileSync(`/proc/1/cgroup`, 'utf-8')
    return /:\/(lxc|docker|kubepods)\//.test(content)
  }
}
1237609
protected function hasModule()
    {
        global $post;

        $postId = null;
        $modules = array();
        $archiveSlug = \Modularity\Helper\Wp::getArchiveSlug();

        if ($archiveSlug) {
            $postId = $archiveSlug;
        } elseif (isset($post->ID)) {
            $postId = $post->ID;
        } else {
            return apply_filters('Modularity/hasModule', false, null);
        }

        $modules = \Modularity\Editor::getPostModules($postId);
        $modules = array_merge($modules, $this->getShortcodeModules($postId));
        $modules = array_merge($modules, $this->getOnePageModules($postId));

        $modules = json_encode($modules);

        $moduleSlug = $this->moduleSlug;
        if (empty($moduleSlug)) {
            $moduleSlug = isset($this->data['post_type']) ? $this->data['post_type'] : null;
        }

        return apply_filters('Modularity/hasModule', strpos($modules, '"post_type":"' . $moduleSlug . '"') == true, $archiveSlug);
    }
285142
def get_class_or_module(container)
      skip_tkspace
      name_t = get_tk

      # class ::A -> A is in the top level
      if name_t.kind_of?(TkCOLON2)
        name_t = get_tk
        container = @top_level
      end

      skip_tkspace(false)

      while peek_tk.kind_of?(TkCOLON2)
        prev_container = container
        container = container.find_module_named(name_t.name)
        if !container
#          warn("Couldn't find module #{name_t.name}")
          container = prev_container.add_module(NormalModule, name_t.name)
        end
        get_tk
        name_t = get_tk
      end
      skip_tkspace(false)
      return [container, name_t]
    end
232324
function isEmptyDir(dir) {
  try {
    return !(fs.readdirSync(dir).length > 0);
  } catch (e) {
    if (e.code === 'ENOENT') {
      // We consider non-existent as empty
      return true;
    }
    throw e;
  }
}
1001651
def instance_contains(container, item):
    """"""
    return item in (member for _, member in inspect.getmembers(container))
1034235
function hasModule (name) {
    // throw error on invalid name
    requireValidName(name)
    // check if module exists
    return defined(immutable.modules[name]) ? true : false
}