DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::
上一页 1 ··· 82 83 84 85 86 87 88 89 90 ··· 474 下一页

2021年11月16日

摘要: 在linux系统下,用C++程序执行shell命令有多种方式 管道方式 #include <iostream>#include <unistd.h>#include <sys/types.h> int main(){ FILE *pp = popen("cd /xxxx && ls -l", "r" 阅读全文
posted @ 2021-11-16 17:06 DoubleLi 阅读(1642) 评论(0) 推荐(0)

摘要: Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据 处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一 种非严格意义上 阅读全文
posted @ 2021-11-16 15:31 DoubleLi 阅读(156) 评论(0) 推荐(0)

摘要: 1. append函数 常用的函数原型: basic_string &append( const basic_string &str ); basic_string &append( const char *str ); basic_string &append( const basic_strin 阅读全文
posted @ 2021-11-16 15:13 DoubleLi 阅读(1168) 评论(0) 推荐(0)

2021年11月15日

摘要: 编译程序时,编译器报错error: jump to case label [-fpermissive] , error: crosses initialization of 'xxxx',对相关内容进行简单的梳理 一、问题代码 int main() { int test = 2; switch(te 阅读全文
posted @ 2021-11-15 17:55 DoubleLi 阅读(2827) 评论(0) 推荐(0)

2021年11月11日

摘要: 一. 配置文件的存储位置 Git相关的配置文件有三个 1. /etc/gitconfig:包含了适用于系统所有用户和所有项目的值。 2.~/.gitconfig:只适用于当前登录用户的配置。 3. 位于git项目目录中的.git/config:适用于特定git项目的配置。 对于同一配置项,三个配置文 阅读全文
posted @ 2021-11-11 17:52 DoubleLi 阅读(1049) 评论(0) 推荐(0)

摘要: 在git中,我们使用git config 命令用来配置git的配置文件,git配置级别主要有以下3类: 1、仓库级别 local 【优先级最高】 2、用户级别 global【优先级次之】 3、系统级别 system【优先级最低】 通常: git 仓库级别对应的配置文件是当前仓库下的.git/conf 阅读全文
posted @ 2021-11-11 17:29 DoubleLi 阅读(377) 评论(0) 推荐(0)

2021年11月9日

摘要: 名称 dos2unix - DOS/Mac - Unix文件格式转换器 概要 dos2unix [选项] [文件 …] [-n 输入文件 输出文件 ...] unix2dos [选项] [文件 …] [-n 输入文件 输出文件 ...] 说明 Dos2unix软件包包括工具"dos2unix" 和  阅读全文
posted @ 2021-11-09 11:14 DoubleLi 阅读(1578) 评论(0) 推荐(0)

摘要: 前言 很多时候,我们需要在linux(ubuntu,centos等)、mac和windows之间共享一些文件,但是因为各个平台自带支持的编码不一致,有的是GB2312(window默认),有的是utf-8。导致跨平台无法正确打开文件,比如windows下的GB2312编码文件放到mac下,如果mac 阅读全文
posted @ 2021-11-09 10:31 DoubleLi 阅读(273) 评论(0) 推荐(0)

2021年11月8日

摘要: 今天执行git diff filename ,出现 old mode 100644 new mode 100755 的提示,如下图: 但是发现文件内容并没有发生改变 想起来中间执行过chmod 的操作, 产生这个问题的原因就是: filemode的变化,文件chmod后其文件某些位是改变了的,如果严 阅读全文
posted @ 2021-11-08 17:36 DoubleLi 阅读(191) 评论(0) 推荐(0)

摘要: 情况一:目前本地还没拉代码,直接拉分支代码 git clone -b ac git@gitlab.yopoint.vip:ac/YoPointSwift.git 情况二:本地已经拉取了代码,想拉取远程某一分支的代码到本地 git checkout -b ac_branch origin/ac_bra 阅读全文
posted @ 2021-11-08 17:07 DoubleLi 阅读(2140) 评论(0) 推荐(0)

上一页 1 ··· 82 83 84 85 86 87 88 89 90 ··· 474 下一页