H2 console.

@return /console/*
354105
@Bean
  public ServletRegistrationBean h2servletRegistration() {
    ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new WebServlet());
    servletRegistrationBean.addUrlMappings("/h2/*");
    return servletRegistrationBean;
  }
133329
def to_h
      {
        code: code,
        app_code: app_code,
        message: message,
        field_errors: field_errors.map(&:to_h),
        debug_info: debug_info.to_h
      }
    end
169651
public function console(ConsoleInterface $value = null)
    {
        if (null === $value) {
            return $this->console;
        }
        $this->console = $value;
        foreach ($this->commands as $name => $command) {
            $command->console = $value;
        }
        return $this;
    }
1013538
public function getHelp()
    {
        print Color::head('Help:') . PHP_EOL;
        print Color::colorize('  Lists the commands available in Console') . PHP_EOL . PHP_EOL;

        $this->run([]);
    }
408445
public JShellTool rawTool() {
        if (prefs == null) {
            prefs = new PreferencesStorage(Preferences.userRoot().node(PREFERENCES_NODE));
        }
        if (vars == null) {
            vars = System.getenv();
        }
        JShellTool sh = new JShellTool(cmdIn, cmdOut, cmdErr, console, userIn,
                userOut, userErr, prefs, vars, locale);
        sh.testPrompt = capturePrompt;
        return sh;
    }
642174
protected function getConsoleFile()
    {
        if (strpos($_SERVER['argv'][0], 'phpunit') !== false) {
            $kernelDir = $this->getContainer()->get('kernel')->getRootDir();
            if (is_file("$kernelDir/console")) {
                return "$kernelDir/console";
            }
            if (is_file("$kernelDir/../bin/console")) {
                return "$kernelDir/../bin/console";
            }
            throw new \Exception("Can not determine the name of the symfony console file in use for running as separate process");
        }

        return $_SERVER['argv'][0]; // sf console
    }
295619
public function getOptionParser(): ConsoleOptionParser
    {
        return parent::getOptionParser()->addSubcommand(
            'all',
            [
                'short' => 'a',
                'help' => __('Searches and precompiles all twig templates it finds.'),
            ]
        )->addSubcommand(
            'plugin',
            [
                'short' => 'p',
                'help' => __('Searches and precompiles all twig templates for a specific plugin.'),
            ]
        )->addSubcommand(
            'file',
            [
                'short' => 'f',
                'help' => __('Precompile a specific file.'),
            ]
        )->setDescription(__('TwigView templates precompiler'));
    }
526470
function(data) {
			if (globalConfig.debug) {
				// We grab console via getGlobal() so we can stub it out in tests
				var globalConsole = this.getGlobal('console');
				if (globalConsole && globalConsole.warn) {
					globalConsole.warn(data);
				}
			} else {
				application.fire('warning', data);
			}
		}
415915
private function getConsolePath()
    {
        if (file_exists($this->rootDir . '/app/console')) {
            return $this->rootDir . '/app/console';
        }

        $finder = new Finder();
        $files  = $finder->files()->depth(1)->name('console')->in($this->rootDir);

        /** @var SplFileInfo $file */
        foreach ($files as $file) {
            return $file->getPathname();
        }

        throw new \UnderflowException('Symfony console application was not found.');
    }
366090
private function processConsole()
	{
		$builder = $this->getContainerBuilder();

		$console = $builder->addDefinition($this->prefix('console'))
			->setClass(Application::class)
			->setArguments(['Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION])
			->addSetup('?->setCatchExceptions(TRUE)', ['@self'])
			->addSetup('$helperSet = ' . ConsoleRunner::class . '::createHelperSet(?)', ['@' . $this->prefix('entityManager')])
			->addSetup('$helperSet->set(new \Andromeda\Doctrine\Console\Helpers\ContainerHelper(?), ?)', ['@Nette\DI\Container', 'container'])
			->addSetup('?->setHelperSet($helperSet)', ['@self'])
			->addSetup(ConsoleRunner::class . '::addCommands(?)', ['@self']);

		$commands = array_merge([
			Commands\SchemaCreateCommand::class,
			Commands\SchemaUpdateCommand::class,
			Commands\SchemaDropCommand::class
		], $this->config['commands']);

		foreach ($commands as $command) {
			$console->addSetup('?->add(?)', ['@self', new Nette\DI\Statement($command)]);
		}
	}
817997
function Parser(stdout) {
  this._name = null;
  this._description = null;
  this._version = "0.0.0";
  this._epilog = null;
  this._commands = { };
  this._short = { };
  this._default = this.showHelp.bind(this);
  this._hooks = { };
  this._width = 0;
  this._out = isFunction(stdout) ? stdout : console.log;
  this.option("H", "help", "show this help information", this.showHelp.bind(this));
  this.option("V", "version", "show version information", this.showVersion.bind(this));
  return this;
}
301817
public function console($messages, $options = ConsoleOutput::VERBOSITY_NORMAL)
    {
        $time = date("Y-m-d H:i:s");

        $wid = 0;
        $processFlag = isset($this->swoole->master_pid) ? '@' : '#';
        $pid = getmypid();
        if (isset($this->swoole->worker_id) && $this->swoole->worker_id >= 0) {
            $wid = $this->swoole->worker_id;
            if ($this->swoole->taskworker) {
                $processFlag = '^'; // taskworker
            } else {
                $processFlag = '*'; // worker
            }
        }
        if (isset($this->swoole->manager_pid) && $this->swoole->manager_pid == $pid) {
            $processFlag = '$'; // manager
        }
        if (isset($this->swoole->master_pid) && $this->swoole->master_pid == $pid) {
            $processFlag = '#'; // master
        }

        $messages = sprintf("[%s %s%d.%d]<info>\tINFO\t</info>%s", $time, $processFlag, $pid, $wid, $messages);

        $this->output->writeln($messages, $options);
    }
444875
def h2i(self, pkt, h):
		""""""
		ip,mask = re.split( '/', h)
		return  int(mask), ip
1171797
public function console($commands)
    {
        $commands->add('me_tools.create_directories', CreateDirectoriesCommand::class);
        $commands->add('me_tools.create_plugins_links', CreatePluginsLinksCommand::class);
        $commands->add('me_tools.create_robots', CreateRobotsCommand::class);
        $commands->add('me_tools.create_vendors_links', CreateVendorsLinksCommand::class);
        $commands->add('me_tools.fix_composer_json', FixComposerJsonCommand::class);
        $commands->add('me_tools.install', RunAllCommand::class);
        $commands->add('me_tools.set_permissions', SetPermissionsCommand::class);

        return $commands;
    }
150602
def interactive_console(self):
        
        if not self.running():
            raise RuntimeError('VM %s is not running' % self._libvirt_.name)
        virsh_command = [
            "virsh",
            "-c",
            config.get('libvirt_url'),
            "console",
            self._libvirt_name(),
        ]
        return utils.run_interactive_command(command=virsh_command, )
155991
public function withConsoleDebug()
    {
        if (!class_exists(ConsoleLogger::class)) {
            throw new RuntimeException("You need to install 'symfony/console' to use this feature");
        }

        $this->logger = new ConsoleLogger(new ConsoleOutput(), [LogLevel::DEBUG => ConsoleOutput::VERBOSITY_NORMAL]);

        return $this;
    }
530650
public static function getPathConsole() {
		
		$console = isset($_SERVER["SCRIPT_NAME"]) ? $_SERVER["SCRIPT_NAME"] : Config::getOption("phpScriptName");
		
		if (!$console) {
			$configPath = Console::getHumanReadablePath(Config::getOption("configPath"));
			Console::writeError("please add the option `phpScriptName` with the path to your console option (e.g. core".DIRECTORY_SEPARATOR."console) to <path>".$configPath."</path> to run this process...");
		}
		
		return Config::getOption("baseDir").$console;
		
	}