Asks for the application name.

If there is no interaction, we take the folder basename.
175295
private function asksForApplicationName(): string
    {
        if (empty($name = $this->input->getArgument('name'))) {
            $name = $this->ask('What is your application name?');
        }

        if (empty($name)) {
            $name = trim(basename($this->app->basePath()));
        }

        return Str::lower($name);
    }
1055159
public String getApplicationName()
    {
        return ivApplicationDisplayName != null ? ivApplicationDisplayName :
                        ivJ2eeName != null ? ivJ2eeName.getApplication() : null;
    }
493659
protected String getAppName() {
		String appName = this.getProperty("app.name", "");
		if (StrKit.isBlank(appName)) {
			throw new IllegalArgumentException("Please Set Your App Name in Your cfg file");
		}
		return appName;
	}
1030083
def _format_base_path(self, api_name):
        """"""
        name = self.app_name
        if self.app_name != api_name:
            name = '{0}-{1}'.format(self.app_name, api_name)
        return name
601177
def get_app_name():
    """"""
    conf = get_config()
    if is_ec2_instance():
        return conf.app_name_live if hasattr(conf, 'app_name_live') else 'PYMACARON_LIVE'
    else:
        return conf.app_name_dev if hasattr(conf, 'app_name_dev') else 'PYMACARON_DEV'
870272
def get_file(self, filename, dir='static'):
        
        if os.path.exists(filename):
            return filename
        dirs = self.apps
        if dir:
            fname = os.path.join(dir, filename)
        else:
            fname = filename
        for d in reversed(dirs):
            path = pkg.resource_filename(d, fname)
            if os.path.exists(path):
                return path
        return None
901443
def folder_name(self):
        ''''''
        name = self.site_packages_name
        if name is None:
            name = self.name
        return name
1025504
def name(self):
    """"""
    if self._name is None:
      # Directory entries without a location in the path specification
      # are not given a name for now.
      location = getattr(self.path_spec, 'location', None)
      if location is not None:
        self._name = self._file_system.BasenamePath(location)
      else:
        self._name = ''
    return self._name
262986
def filename(self) -> str:
        
        if self._new_path is not None and str(self._new_path) != "/dev/null":
            path = self._new_path
        else:
            path = self._old_path

        return path.name
766998
void setAppName(final String appName) {
        if (clusterId.applicationName != null && !clusterId.applicationName.equals(appName))
            throw new IllegalStateException("Restting the application name on a cluster is not allowed.");
        clusterId = new ClusterId(appName, clusterId.clusterName);
    }
76294
public String getName() {
    Class<? extends AbstractProcessApplication> processApplicationClass = getClass();
    String name = null;

    ProcessApplication annotation = processApplicationClass.getAnnotation(ProcessApplication.class);
    if (annotation != null) {
      name = annotation.value();

      if (name == null || name.length() == 0) {
        name = annotation.name();
      }
    }


    if (name == null || name.length() == 0) {
      name = autodetectProcessApplicationName();
    }

    return name;
  }
162518
public final void setApplicationName(String applicationName) {
        synchronized (lock) {
            if (applicationName == null) {
                serviceProperties.remove(APPLICATION_NAME);
                bundleAnalysingComponentInstantiationListener = null;
            } else {
                serviceProperties.put(APPLICATION_NAME, applicationName);
                bundleAnalysingComponentInstantiationListener =
                    new BundleAnalysingComponentInstantiationListener(bundleContext, injectionSource, factoryTracker);
            }

            if (serviceRegistration != null) {
                serviceRegistration.setProperties(serviceProperties);
            }
        }
    }
310948
def name(self):
        
        try:
            return self.config_parser.get('application', 'name')
        except CONFIGPARSER_EXC:
            return super(IniConfig, self).name
1117001
def guess_filename(obj):
    """"""
    name = getattr(obj, 'name', None)
    if name and name[0] != '<' and name[-1] != '>':
        return os.path.basename(name)
643519
def application_name(self):
        
        if self._application_name is None and self.units:
            self._application_name = self.units[0].unit_name.split('/')[0]
        return self._application_name
591138
public String getApplicationName() {
    String libraryVersion = getLibraryVersion();

    // We have to do the following since underlying layers often do not appreciate User-Agent
    // provided as a normal header and override it or treat setting "application name" as the only
    // way to append something to User-Agent header.
    StringBuilder sb = new StringBuilder();
    String customUserAgentValue = getUserAgent();
    if (customUserAgentValue != null) {
      sb.append(customUserAgentValue).append(' ');
    }
    if (libraryVersion == null) {
      sb.append(getLibraryName());
    } else {
      sb.append(getLibraryName()).append('/').append(libraryVersion);
    }

    return sb.toString();
  }
525930
def appname(path=None):
    
    if path is None:
        path = sys.argv[0]
    name = os.path.basename(os.path.splitext(path)[0])
    if name == 'mod_wsgi':
        name = 'nvn_web'                                                                        # pragma: no cover
    return name