var NAMESPACE_DEFAULT = 'default';
349382
function K8sutil() {
    // this.getNamespace();
    podName = os.hostname();
    podGenerateName = podName.substr(0, podName.lastIndexOf('-'));
    logger.debug('k8sutil', 'K8sutil()', 'The pod name: ', podName);
    fetchContainerID();
    try {
        // var kubeconfig = Api.config.fromKubeconfig();
        var kubeconfig = Api.config.getInCluster();
        kubeconfig.promises = true;
        // kubeconfig.namespace = 'default';
        logger.debug('k8sutil', 'K8sutil()', 'Kubeconfig', kubeconfig);
        core = new Api.Core(kubeconfig);
        ext = new Api.Extensions(kubeconfig);
        namespace = core.namespaces.namespace;
        logger.info('k8sutil', 'K8sutil()', 'Current namespace', namespace);
        if (!podJson) {
            core.ns(namespace).pods(this.getPodName()).get().then(parsePodInfo).catch(
                function(err) {
                    logger.error('k8sutil', 'K8sutil()', err.message);
                }
            );
        }

    } catch (e) {
        logger.debug('k8sutil', 'K8sutil()',
            'Failed to load K8S configuration, is not a ICp environment.');
    }
    findIngressSvc();
    setNodeIPs();
}
1057373
protected function set_namespace() {
        if ( empty( $this->options->instance ) || ! empty( $this->options->namespace ) ) {
            return;
        }

        $namespace = $this->options->namespace;
        $namespace = explode( '\\', $namespace );
        array_pop( $namespace );

        $this->options->namespace = implode( '\\', $namespace );
    }
163726
function (namespace, extendSettings) {

    if (typeof namespace !== 'string' || !namespace.trim().length) {
      throw new Error('A valid string namespace is required as first parameter.');
    }

    namespace = namespace.trim();

    var settings = extend({}, globalSettings, extendSettings);
    var history = [];

    /**
     * Update instance settings.
     * @param  {Object} newSettings
     */
    this.update = function (newExtendSettings) {
      settings = extend({}, settings, newExtendSettings);
    };

    /**
     * Return settings.
     * @return {Object}
     */
    this.getSettings = function () {
      return extend({}, settings);
    };

    /**
     * Add a new method level to instance.
     * @param {Object} level - Level description.
     * @param {String} level.name - Level name.
     * @param {Number} [level.priority] - Number priority. Default to 3.
     * @param {String} [level.color] - The console color. Default `null`.
     */
     this.addLevel = function (level) {
      level = addLevel(level);
      this[level.name] = function () {
        this._execute(level, arguments);
      };
    };

    /**
     * Get a copy of the history. Meta objects are referenced.
     * @return {Array}
     */
    this.getHistory = function () {
      return history.map(function (item) {
        return extend({}, item);
      });
    };

    /**
     * Record a log in logger history if configured.
     * @private
     * @param  {Date} date - Date of log.
     * @param  {Object} level - Reference to the level definition.
     * @param  {String} text - The raw message.
     * @param  {Object} [meta] - Metadata.
     */
    this._record = function (date, level, text, meta) {
      if (settings.history) {
        var item = {
          date: date.getTime(),
          level: level.name,
          text: text,
        };
        if (meta) item.meta = meta;
        history.push(item);
      }
    };

    /**
     * Create a log description message by logger configuration.
     * @private
     * @param  {Date} date - Date of log.
     * @param  {Object} level - Reference to the level definition.
     * @return {String} - The description.
     */
    this._prefix = function (date, level) {

      var dtime = '';
      var dlevel = '';
      var dnamespace = '';

      if (settings.displayTime) {
        var hh = formatTime(date.getHours());
        var mm = formatTime(date.getMinutes());
        var ss = formatTime(date.getSeconds());
        var ms = formatTime(date.getMilliseconds(), 3);
        dtime = hh + ':' + mm + ':' + ss + '.' + ms + ' ';
      }

      if (settings.displayLevel) {
        dlevel = level.name.toUpperCase() +' ';
      }

      if (settings.displayNamespace) {
        dnamespace = '['+ namespace +'] ';
      }

      var dmsg = (dtime + dlevel + dnamespace).trim();
      dmsg = dmsg.length ? dmsg : '';

      return dmsg;
    };

    /**
     * Log the message in the console.
     * @private
     * @param  {Array} msgParts - Array of strings to log.
     */
    this._log = function (msgParts) {
      if (settings.display) {
        if (console && console.log) {
          console.log.apply(console.log, msgParts);
        }
      }
    };

    /**
     * Log method definition.
     * @private
     * @param  {Object} level - Reference to the level definition.
     * @param  {Array} args - The arguments received by the log method.
     */
    this._execute = function (level, args) {

      var date = new Date();
      var text = '';
      var meta = void 0;

      args = Array.prototype.slice.call(args, 0);
      for (var i=0; i<args.length; i++) {
        if (typeof args[i] === 'function') {
          // Functions are not used.
        } else if (i === args.length - 1 && Object(args[i]) === args[i]) {
          meta = args[i];
        } else {
          text += ' '+ args[i];
        }
      }
      text = text.trim();

      this._record(date, level, text, meta);

      if (settings.throwErrors && level.priority <= 0) {
        throw new Error(text);
      }

      if (level.priority <= settings.priority) {

        var prefix = this._prefix(date, level);
        var msgParts = [text];

        if (prefix.length) {
          if (settings.colors && level.color) {
            if (isNode) {
              msgParts = [level.color.node + prefix + NODE_COLOR_END +' '+ text];
            } else {
              msgParts = ['%c'+ prefix +' %c'+ text, level.color.browser, BROWSER_COLOR_END];
            }
          } else {
            msgParts = [prefix +' '+ text];
          }
        }

        this._log(msgParts);
      }
    };
  }
1340966
def _get_namespace_tag(self, tag):
        """"""
        if self._namespace is not None:
            tag = "{%s}%s" % (self._namespace, tag)
        return tag
50410
def configure_namespacebrowser(self):
        """"""
        # Update namespace view
        self.sig_namespace_view.connect(lambda data:
            self.namespacebrowser.process_remote_view(data))

        # Update properties of variables
        self.sig_var_properties.connect(lambda data:
            self.namespacebrowser.set_var_properties(data))
762465
public void setDefaultNamespaceURI(String namespaceURI) {
    if (namespaceURI == null)
      throw new IllegalArgumentException("Cannot set default prefix to null namespace URI");

    bindings.put(XMLConstants.DEFAULT_NS_PREFIX, namespaceURI);
  }
600870
function nameSpacedDefine(nameSpace, id, deps, callback) {
  // only add name space for modules in user space
  // also skip any ext: plugin (a dumber-module-loader feature)
  if (currentSpace === userSpace && id.slice(0, 4) !== 'ext:') {
    const parsed = parse(id);
    userSpace.define(parsed.prefix + nameSpace + '/' + parsed.bareId, deps, callback);
  } else {
    currentSpace.define(id, deps, callback);
  }
}
1137670
function normalizeNamespace (fn) {
  return function (namespace, map) {
    if (typeof namespace !== 'string') {
      map = namespace;
      namespace = '';
    } else if (namespace.charAt(namespace.length - 1) !== '/') {
      namespace += '/';
    }
    return fn(namespace, map)
  }
}
1272316
def setdefault(self, name, value):
        ''' '''
        if name in self:
            return self[name]
        self[name] = value
        return self[name]
517498
function (name, default_value) {
	if (l_states.hasOwnProperty(name) === false) {
		LOG.warn('[' + name + '] initialized to: ' + default_value, 'handlers.system');
		l_states[name] = default_value;
	}
}
280907
@Override
    public void writeDefaultNamespace(String nsURI)
    {
        if (mOpenElement == null) {
            throw new IllegalStateException("No currently open START_ELEMENT, cannot write attribute");
        }
        setDefaultNamespace(nsURI);
        mOpenElement.addAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns", nsURI);
    }
53131
def set_default_var(**vars):
    
    for k, v in vars.iteritems():
        current_context.vars.setdefault(k, v)
1137774
function(element, namespace) {
			var Klass = this,
				regexp = new RegExp('^data-' + namespace + '-(.*)'),
				config = {};
			if (element && element.attributes) {
				$.each(element.attributes, function(){
					var match = this.name.match(regexp);
					if (match) {
						var val = this.value,
							name = $.camelCase(match[1]);
						if ($.inArray(name, Klass.functionAttributes) >= 0) {  /* jshint -W054 */
							val = new Function(val);                           /* jshint +W054 */
						} else {
							try { val = JSON.parse(val); }
							catch(e) {}
						}
						config[name] = val;
					}
				});
			}
			return config;
		}
238207
function bindNamespaces() {
  for (var namespace in namespaces) {
    for (var func in namespaces[namespace]) {
      namespaces[namespace][func] = namespaces[namespace][func].bind(this);
    }

    this[namespace] = namespaces[namespace];
  };
}
579068
def namespace(self, value):
        
        if not isinstance(value, str):
            raise ValueError("Namespace must be a string")
        self._namespace = value
1142170
public final void nameSpace (String namespace) {
    if (namespace == null || namespace.equals("")) {
      _namespace = "";
    } else {
      _namespace = namespace + ":";
    }
  }
193937
def default_value(tag)
      name, vr = LIBRARY.name_and_vr(tag)
      conversion = VALUE_CONVERSION[vr]
      case conversion
      when :to_i then return 0
      when :to_f then return 0.0
      else
        # Assume type is string and return an empty string:
        return ''
      end
    end