alias

Compile and build with single command line Java (Linux)

二次信任 提交于 2020-01-13 09:06:14
问题 Is there way to set up an alias in such a way so that I could enter the command, followed by the argument in a single line? For example, instead of javac Program.java && java Program I would be able to go newcommand Program.java //or "newcommand Program", whichever is easier which would do the same commands as the line above. 回答1: An alias is not made to accept parameters, define a function like this: jcar() { javac $1.java && java $1 ; } Then use it: jcar Program ( jcar was intended as an

apache virtual host and “Dynamic” Domains

可紊 提交于 2020-01-13 04:23:46
问题 I have a java application responding multiple domains and uses, for each domain, a specific apache virtual host. This because Apache is faster than tomcat, to serve static resources. The need is to do that at runtime, without restart apache configuration. To perform this action I'm using VirtualDocumentRoot directive, as described below: AddType text/html .html .shtml AddOutputFilter INCLUDES .html .shtml NameVirtualHost *:80 UseCanonicalName Off <VirtualHost *:80> ServerName domain.com

Manjaro安装配置指南

随声附和 提交于 2020-01-13 04:07:15
由于可能会有偶尔重装系统的需要,而每次配置都丢三落四,浪费时间,因此整理了自己需要的配置,一直会继续更新的 1.安装 分区时选择手动分区 挂载点 大小 /boot/efi 500M /boot 1G / 剩余所有 2.更新源 sudo pacman-mirrors -i -c China -m rank //更新镜像排名,选择最快的那一个(延迟小的那个) sudo pacman -Syy //刷新 sudo pacman -S vim //先安装vim,之后用的多 sudo vim /etc/pacman.conf 在这个文件的最后添加几行: [ archlinuxcn ] SigLevel = Optional TrustedOnly Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/ $arch 其中的网址根据之前选择的源来选择最快的: ## CDN (ipv4, http, https) ## aliyun Server = http://mirrors.aliyun.com/archlinux/ $arch ##上海交通大学 Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/ $arch ## 浙江大学 (浙江杭州) (ipv4, ipv6,

Neo4j Fast way to match fuzzy text property

主宰稳场 提交于 2020-01-12 05:28:07
问题 I have a reasonable number of nodes (roughly 60,000) (:Document {title:"A title"}) Given a title, I want to find the matching node, if it exists. The problem is that the title I'm given is not consistent. That is, sometimes the beginning of a new word is Capital, sometimes it is all lower case. Sometimes Key-Words are combined with Kebab case, sometimes they are written normally as key words. To compensate for that I use apoc and the Levenshtein distance between the given title and every node

C++ namespace alias in entire class scope

孤人 提交于 2020-01-11 18:35:29
问题 I expected to be able to use a namespace alias in a class declaration but get a compiler syntax error. struct MyClass { namespace abc = a_big_namespace; void fn() { abc::test(); } }; The only way I can get it to work is to put the alias in every function. void fn() { namespace abc = a_big_namespace; abc::test(); } Additionally I would like to be able to use the alias for function parameters. I haven't found a work-around for that. void fn(abc::testType tt) { abc::test(tt); } Is there a way to

C#: Globally alias a generic class name?

故事扮演 提交于 2020-01-11 06:21:07
问题 in some project we are using Generics, and we get a lot of lines like this: Line<SomeTClass,SomeCClass> myLine = (Line<SomeTClass,SomeCClass>)LineFactory.CreateLine(...) We can declare local alias, with using X = Line<SomeTClass,SomeCClass> . Then we can write, X myLine = (X)LineFactory.CreateLine(...) . We have a lot a combination of <T,C> but we often use the same. Is it possible de declare the using globally, so that we won't have to declare the alias in each file? 回答1: No such thing as a

Column Alias in a WHERE Clause

霸气de小男生 提交于 2020-01-11 05:16:09
问题 Problem I am using alternate column name (alias) in a Query, I can use the alias "given_name" as part of the ORDER BY but am unable to use it as part of the WHERE clause. The WHERE "given_name" is passed in as the result of a request out of my control and I do not know the actual column name that should be used in the WHERE condition. Question It there a way/hack to use a column alias in a WHERE clause? Is there a way to find the column name from an alias? Research After some research it

Escaping double quotes with tcsh alias

江枫思渺然 提交于 2020-01-09 11:39:10
问题 I'm trying to run the following commands: replace -x "must " A2input.txt replace -x " a" -f -s ## A2input.txt replace -x to -s ## -a A2input.txt replace -x faith -f "unequivocal" A2input.txt And it'd be nice if I could just alias it to something short and simple like "a", "b", "c", "d", etc... However, some of those arguments have a quote, which is messing up the alias. Does anyone know how to actually escape the double quotes? I've tried things like '\"' and \" but nothing seems to work. I'm

更优雅地使用命令行

为君一笑 提交于 2020-01-08 23:55:29
工欲善其事,必先利其器,通过武装自己的命令行工具,从而更优雅地使用命令行,可以使工作更加高效并且有趣。本文将以下几个方面来介绍命令行的使用技巧和提效工具 CLI 一键呼入呼出 iterm2 是一款完全免费,为 MacOS 打造的终端工具,特色功能是可以开启热键窗口,达到一键呼入呼出的效果 效果如下: 详细设置如下: 1、首先,进行如下设置 preferences > Keys > HotKey > Create a Dedicated Hotkey Window... 2、接着,设置热键,并选择 Animate showing and hiding 和 Floating window 这两个选项 zsh 目前常用的 Linux 系统和 OS X 系统的默认 Shell 都是 bash。 oh my zsh 是强化版的 Shell 如果是 Mac OS,默认应该自带了 zsh 了,安装之前可以确认一下 cat /etc/shells # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells. /bin/bash /bin/csh /bin/ksh /bin/sh /bin/tcsh /bin/zsh

C#.NET MVC Route Aliasing

旧城冷巷雨未停 提交于 2020-01-07 02:31:15
问题 I've been searching and searching for away to make old URL like we used to do in aspx pages where you could have an alias pointing to a page like www.domain.com/my-great-alias point to www.domain.com/alias.aspx. I want to do the same thing in MVC but can not figure out how to make this happen in the route table. Where www.domain.com/my-great-alias would show up to the end user as such but point to www.domain.com/alias/2 Does this make sense to anyone else what I'm looking for? // router