xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

mac下卸载了xcode,使用git等命令时就提示错误。invalid active path(Applications/Xcode.app/Contents/Developer),这种情况可以通过xcode-select --switch指定一个xcode安装路径,如果不想安装xcode,那么可以通过重置系统默认开发工具路径.

可以通过xcode-select命令来重置系统默认的CommandLineTools路径,如下

解决方案:

sudo xcode-select -r

xcode-select --switch /Library/Developer/CommandLineTools

xcode-select -p

原文地址

常见的HTTP请求首部

请求首部

HTTP请求方法定义了发送请求的客户端想要执行的动作,而HTTP请求的首部则记录了与请求本身以及客户端有关的信息。请求的首部由任意多个用冒号分隔的纯文本键值对组成,最后以回车(CR)和换行(LF)结尾。

作为HTTP 1.1 RFC的一部分,RFC 7231对主要的一些HTTP请求字段(request field)进行了标准化。过去,非标准的HTTP请求通常以`X-`作为前缀,但标准并没有沿用这一惯例。

大多数HTTP请求首部都是可选的,宿主(Host)首部字段是HTTP 1.1唯一强制要求的首部。根据请求使用的方法不同,如果请求的报文中包含有可选的主体,那么请求的首部还需要带有内容长度(Content-Length)字段或者传输编码(Transfer-Encoding)字段。表1-1展示了一些常见的请求首部。

表1-1 常见的HTTP请求首部

HTTP-HEADER.pngHTTP-HEADER.png

Mysql 查询所有表中是否包含某个字段

查询tablename 数据库中 以"_copy" 结尾的表
select table_name from information_schema.tables where table_schema='tablename' and table_type='base table' and table_name like '%_copy';
information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问
information_schema.tables 指数据库中的表(information_schema.columns 指列)
table_schema 指数据库的名称
table_type 指是表的类型(base table 指基本表,不包含系统表)
table_name 指具体的表名

如查询work_ad数据库中是否存在包含"user"关键字的数据表

select table_name from information_schema.tables where table_schema = 'work_ad' and table_type='base table' and table_name like '%user%';

如果本身是在tablename 这个库里新建的查询,可以去掉 table_schema='tablename ' 这一句
select table_name from information_schema.tables where table_type='base table' and table_name like '%_copy';

在Informix数据库中,如何查询表名中包含某字段的表
select * from systables where tabname like 'saa%'
此法只对Informix数据库有用

查询指定数据库中指定表的所有字段名column_name
select column_name from information_schema.columns where table_schema='csdb' and table_name='xxx'

检查数据库'test'中的某一个表'd_ad'是否存在
select count(1) from information_schema.tables where table_schema = 'test' and table_name = 'd_ad';

如何查询mysql数据库中有多少张表
select count(*) TABLES, table_schema from information_schema.tables where table_schema = 'test' group by table_schema;

mysql中查询到包含该字段的所有表名

SELECT TABLE_NAME FROM information_schema.COLUMNS WHERE COLUMN_NAME='字段名'
如:查询包含status 字段的数据表名

select table_name from information_schema.columns where column_name='status';
来源地址

程序员编程语言修炼等级“了解、熟悉、熟练、精通、大神”注解

实 习 >> 入门 >> 了解
知道此语言的编程语法的使用和特点,可读懂及配合参与开发

一年到三年 >> 初级 >> 熟悉
使用该编程语言开发过小型的项目

三年到五年 >> 中级 >> 熟练
使用该编程语言开发很多项目或大型项目,并能够运用于心、掌握部分算法以及能够处理各种的问题和bug

五年到十年 >> 高级 >> 精通
研究过相关底层,可以独立开发框架及各内插件SDK,有丰富的大型项目经验以及能解决各种疑难杂症

无 限 == 顶级 == 大神
参与该编程语言开发设计

你满级了吗( ^ _ ^ )