prefix

CentOS安装GIT(亲测ok)

≯℡__Kan透↙ 提交于 2020-01-08 03:18:46
1、安装所需软件包 # sudo su # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel # yum install gcc perl-ExtUtils-MakeMaker 2、下载&安装 # cd /usr/src # wget https://www.kernel.org/pub/software/scm/git/git-2.7.3.tar.gz(git版本,本文章以2.7.3为准) # tar xzf git-2.7.3.tar.gz # cd git-2.7.3 # make prefix=/usr/local/git all # make prefix=/usr/local/git install # echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc # source /etc/bashrc(此处使用需要用到的用户下执行,不在必须要root,如果是root用户那么只能在root下使用git,其它用户会有问题) 3、检查版本 # git --version o、其他 centos自带 Git ,7.x版本自带git 1.8.3.1(应该是,也可能不是),安装新版本之前需要使用yun remove git卸载

Golang中的字符串处理总结

淺唱寂寞╮ 提交于 2020-01-07 16:49:59
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Count (s string, str string) int 计算字符串str在s中的非重叠个数。如果str为空串则返回s中的字符(非字节)个数+1。 Index (s string, str string) int 返回子串str在字符串s中第一次出现的位置。如果找不到则返回-1;如果str为空,则返回0。 LastIndex (s string, str string) int 返回子串str在字符串s中最后一次出现的位置。如果找不到则返回-1;如果str为空则返回字符串s的长度。 IndexRune (s string, r rune) int 返回字符r在字符串s中第一次出现的位置。如果找不到则返回-1。 IndexAny (s string, str string) int 返回字符串str中的任何一个字符在字符串s中第一次出现的位置。如果找不到或str为空则返回-1 LastIndexAny (s string, str string) int 返回字符串str中的任何一个字符在字符串s中最后一次出现的位置。如果找不到或str为空则返回-1。 Contains (s string, str string) bool 判断字符串s中是否包含个子串str。包含或者str为空则返回true。

cakephp3 load plugin for special prefix

主宰稳场 提交于 2020-01-07 06:43:01
问题 I have Cakephp 3 application and i want to load this plugin and the event listener below it just for admin prefix. ( not the entire project ) . how can i achive this? this is my config/bootstrap.php where i load this plugin . (I load these at end of the file ) ... Plugin::load('Josegonzalez/Upload'); \Cake\Event\EventManager::instance()->on(new \App\Controller\Event\AppEventListener()); i want these to line only run on admin prefix 回答1: You can't conditionally run code based upon routing

npm在哪里安装软件包?

百般思念 提交于 2020-01-07 01:20:58
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 有人可以告诉我在哪里可以找到使用 npm 安装的Node.js模块吗? #1楼 在Windows上,我使用 npm list -g 进行查找。 默认情况下,我的(全局)软件包已安装到 C:\\Users\\[Username]\\AppData\\Roaming\\npm 。 #2楼 命令 npm root 将告诉您npm软件包的有效安装目录。 如果您当前的工作目录是节点软件包或节点软件包的子目录,则 npm root 会告诉您本地安装目录。 无论当前工作目录如何, npm root -g 都会显示全局安装根目录。 请参阅文档。 #3楼 最简单的方法是 npm列表-g 列出软件包并查看其安装位置。 我已经通过chololatey安装了npm,所以位置是 C:\\ MyProgramData \\ chocolatey \\ lib \\ nodejs.commandline.0.10.31 \\ tools \\ node_modules C:\\ MyProgramData \\是巧克力回购位置。 #4楼 对于全局安装的模块: 其他答案为您提供特定于平台的响应,但是通用的答案是这样的: 当使用 npm install -g something 安装全局模块时,npm查找配置变量 prefix

IDEA开发spring boot应用时 application.yml 或 application.properties 自定义属性提示

白昼怎懂夜的黑 提交于 2020-01-06 21:55:17
/*--> */ /*--> */ 在使用spring boot开发过程中,经常会定义一些应用自己的属性,直接写到application配置文件中使用@Value注解进行使用,这样使用也没有什么问题。不过我认为更优雅的方式是定义自己的属性类统一管理,这样在idea中,既能自动提示,又能对配置进行分类管理,显得有条不紊,下面是具体的配置步骤。 第一步:添加依赖(分为maven和gradle两种方式) 1.1 如果你使用的是maven 增加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> </dependency> 1.2 如果你使用的是gradle 增加依赖并且配置annotationProcessor compileOnly 'org.springframework.boot:spring-boot-configuration-processor' annotationProcessor ‘org.springframework.boot:spring-boot-configuration-processor’ 第二步:创建配置属性类 @Data

IXmlSerializable and Root Element Prefix

為{幸葍}努か 提交于 2020-01-06 18:32:31
问题 I have looked everywhere and not a single response is valid or the question is just slightly off to the point of not getting me the answer I need. Given all the searches I have looked for there seems to be one MASSIVE flaw in .Net's implementation of xml serialization. Default: [XmlRoot("root", Namespace="http://myclass.org/")] public class MyClass { } void Main() { XmlSerializer ser = new XmlSerializer(typeof(MyClass)); XmlSerializerNamespaces xsn = new XmlSerializerNamespaces(); xsn.Add("mc

SQL schemas - dbo.<tablename> has to go

。_饼干妹妹 提交于 2020-01-06 10:38:13
问题 I'm still pretty new to SQL and all the related issues that resemble mine really don't clarify anything. My problem is this: We have a widely used piece of administration software, which can either use MDB or SQL. Some time ago, I migrated the MDB to a new SQL server instance, this setup has been running smoothly for some time now. I no longer had some of the drawbacks that an Access database has. Now, a new piece of software we're using connects to that same database to append data. It can

Converting Infix to prefix notation in JavaScript

别说谁变了你拦得住时间么 提交于 2020-01-06 05:26:18
问题 (I did ask a similar question in the past, but the documentation was wrong, so this is the correct version of that past question) Please help me in JavaScript: The program that I am coding is one that takes in an expression in prefix notation and outputs the same expression in infix notation. The idea behind this program is as follows: if the user enters + 1 2 the expected output is 1 + 2. All valid symbols are +, -, *, /, and %. The amount of numbers that the user can enter should be

CentOS编译安装GCC 4.9.2成功

孤街醉人 提交于 2020-01-06 01:37:47
在Linux上编译安装gcc是个寻烦恼的活,对于像我这样习惯于在Windows上面使用二进制安装包的人来说,自已编译安装gcc是个相当大的挑战,今天直接挑战最新版的gcc,是4.9.2版本的,做之前查阅了大量的资料,本次安装使用的系统是CentOS6.4,自带的gcc是4.4.7版本,具体折腾过成如下: 准备工作,   到GNU官方FTP下载GCC的源码包 gcc-4.9.2.tar.gz .   下载下面三个依赖的安装包,这三个包的版本在 gcc-4.9.2/contrib/download_prerequisites 脚本文件中有指明,按这个里面指定的版本下载即可:     ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2     http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2     http://www.multiprecision.org/mpc/download/mpc-0.8.1.tar.gz 编译:   首先是编译安装三个依赖库,按以下步骤编译安装:     一:解压gmp-4.3.2.tar.bz2到自已指定的一个目录比如/home/[你的用户名]/gmp-4.3.2,另外在建一个/home/[你的用户名]/gmp-build目录,并进入这个目录,在终端里执行../gmp-4

Linux软件安装管理---源码安装

十年热恋 提交于 2020-01-06 01:32:13
在Linux平台下,软件包的类型可以划分为两类:源码包、二进制包。 源码包: 即程序软件的源代码(一般也叫Tarball,即将软件的源码以tar打包后再压缩的资源包)。 二进制包: 如 Red Hat发行版的.rpm包,Debian发行版的.deb包。 源码安装的主要步骤 : 1)获取源代码文件:一般为压缩包,并解压。 2)执行config: 一般在源代码目录中有install 或 readme等说明。 运行./config --prefix=PREFIX或者 ./config, config是一个可执行文件,其作用是检测操作系统,并生成makefile文件。其检测的内容有:系统中是否有合适的编译器来编译本软件,是否已经存在本软件所需要的函数库或其他相关软件,操作系统版本是否符合要求等。其中,PREFIX为安装位置。 曾经自己编译qt源码时,运行config时,其先生成了qmake,然后qmke根据.pro文件生成makefile文件。 3)执行make命令。 make根据makefile中指定的规则来将源代码编译成可执行文件。但是,这些可执行文件被放在当前目录下,不会安装到预定的安装目录中。 4)执行make install make会根据makefile中关于install的选项,将上一步编译出来的东西(?)搞到指定的安装目录中。 -----------------------