欢迎访问我的独立博客
摘要: 关于编译报错“dereferencing pointer to incomplete type... 多是没找到结构体的定义,可以在本地复制其定义试试。 参考: http://my.oschina.net/michaelyuanyuan/blog/68203?fromerr=BcJtRGrT 阅读全文
posted @ 2016-09-30 18:41 github.com/starRTC 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 从本地复制到远程 scp mysql-5.5.29-linux2.6-x86_64.tar.gz 192.168.1.11:/opt 指定端口: scp -P 60022 /opt/ray/nginx-1.5.3.tar.gz 192.168.160.44:/opt/ray/ 如果报错“bash: 阅读全文
posted @ 2016-09-30 18:40 github.com/starRTC 阅读(602) 评论(0) 推荐(0) 编辑
摘要: 主服务器上(注:应该是允许从机访问) GRANT REPLICATION SLAVE ON *.* to ‘rep1’@’192.168.10.131’ identified by ‘password’; 从服务器 将 server-id = 1修改为 server-id = 10,并确保这个ID没 阅读全文
posted @ 2016-09-30 18:40 github.com/starRTC 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 这个好像是nginx故意这样做的。 因为Nginx默认的log_format使用双引号作为间隔符,为了避免日志分析时候出现混乱,所以将双引号解析为x22了。 只能每天日志切割的时候,自己替换日志中的x22字符为双引号了 我的解决方法: sed 's#\\x22#"#g' test.txt 可以把\x 阅读全文
posted @ 2016-09-30 18:40 github.com/starRTC 阅读(1109) 评论(0) 推荐(0) 编辑
摘要: 插入模式 首先执行gg 跳至文件首行 然后执行dG就清空了整个文件 还有一种方法就要退出VIM,然后使用echo > file ,这样也能快速清空文件内容 阅读全文
posted @ 2016-09-30 18:39 github.com/starRTC 阅读(166) 评论(0) 推荐(0) 编辑
摘要: ssh-keygen -t rsa //-t指定算法 将公钥复制到被管理机器上面 ssh-copy-id -i ~/.ssh/id_rsa.pub 172.29.0.89 ssh-copy-id -i ~/.ssh/id_rsa.pub 172.29.0.90 ssh-keygen -t rsa / 阅读全文
posted @ 2016-09-30 18:39 github.com/starRTC 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 在102上访问101上的数据库里,show databases;看不到里面的库, 需要在101上授权就可以了 GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.3.102' IDENTIFIED BY 'password' WITH GRANT OPTIO 阅读全文
posted @ 2016-09-30 18:38 github.com/starRTC 阅读(556) 评论(0) 推荐(0) 编辑
摘要: nginx本身不能处理PHP,它只是个web服务器。当接收到客户端请求后,如果是php请求,则转发给php解释器处理,并把结果返回给客户端。如果是静态页面的话,nginx自身处理,然后把结果返回给客户端。 Nginx下php解释器使用最多的就是fastcgi。一般情况nginx把php请求转发给fa 阅读全文
posted @ 2016-09-30 18:37 github.com/starRTC 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 网络带宽足够,但是手机播放视频很卡,主要原因应该就是手机性能不够了,具体来说的话,可能有以下几个方面:1. 没有使用硬解,而软解的速度又跟不上。 2. 播放的是高清、高码率的视频。3. h264 high profile 编码的视频,解码比较费劲。4. 播放器本身的设计,包括:接收、解码、渲染的并行 阅读全文
posted @ 2016-09-30 18:37 github.com/starRTC 阅读(635) 评论(0) 推荐(0) 编辑
摘要: 将文件当做直播送至live ffmpeg -re -i localFile.mp4 -c copy -f flv rtmp://server/live/streamName re限制输出速率,按照帧率输出 将直播媒体保存至本地文件 ffmpeg -i rtmp://server/live/strea 阅读全文
posted @ 2016-09-30 18:36 github.com/starRTC 阅读(2728) 评论(0) 推荐(0) 编辑
摘要: 如何降低直播App的发热? 个人觉得有如下几点可以参考:1. 尽可能用硬编 2. 适当降低帧率 3. 采用合适的分辨率,尽量减少 Scale 和 剪裁 4. 其实网络不稳定也会加大发热 5. 优化代码,尽量减少不必要的 CPU 消耗。 由于前后摄像头支持的分辨率不完全一样,因此直播过程中切换摄像头, 阅读全文
posted @ 2016-09-30 18:34 github.com/starRTC 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 在使用MySQL时,若表中含自增字段(auto_increment类型),则向表中insert一条记录后,可以调用last_insert_id()来获得最近insert的那行记录的自增字段值 $mdb->lastInsertId(); 但事实上,使用last_insert_id()时有很多注意事项, 阅读全文
posted @ 2016-09-30 18:33 github.com/starRTC 阅读(866) 评论(0) 推荐(0) 编辑
摘要: 需要主键一致 PRIMARY KEY (id) PRIMARY KEY (id, ts) 坑: https://blog.xupeng.me/2013/10/11/mysql-replace-into-trap/ 可以看到 MySQL 说 “2 rows affected”,可是明明是只写一条记录, 阅读全文
posted @ 2016-09-30 18:32 github.com/starRTC 阅读(382) 评论(0) 推荐(0) 编辑
摘要: sharding Vertical Sharding 把数据分散到多台物理机(我们称之为Shard) 实现Sharding需要解决一系列关键的技术问题,这些问题主要包括:切分策略、节点路由、全局主键生成、跨节点排序/分组/表关联、多数据源事务处理和数据库扩容等 因为表多而数据多,这时候适合使用垂直切 阅读全文
posted @ 2016-09-30 18:31 github.com/starRTC 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 一、创建并授权用户 在每一台(主)服务器上创建一个用户,并为之授权,使它们可以互相访问彼此的数据库 在Server-1上: 创建一个充许Server-2来访问的用户server2,密码为:server2 mysql> GRANT REPLICATION SLAVE ON *.* > TO ‘serv 阅读全文
posted @ 2016-09-30 18:31 github.com/starRTC 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Service providers are the central place of all Laravel application bootstrapping. Your own application, as well as all of Laravel's core services are 阅读全文
posted @ 2016-09-30 18:30 github.com/starRTC 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 70多个G的电子书。百度网盘分享了几次被屏蔽了,360网盘每个文件夹最多只能分享2000个文件,所以只能分成多个文件夹分享。如果大家知道更好的分享方式,欢迎留言相告,多谢:http://yunpan.cn/cdSaEEY4EbCv3 访问密码 40d5http://yunpan.cn/cdSa5L8 阅读全文
posted @ 2016-09-30 18:30 github.com/starRTC 阅读(1368) 评论(1) 推荐(0) 编辑
摘要: App\Exceptions\Handler class is where all exceptions triggered by your application are logged and then rendered back to the user. We'll dive deeper in 阅读全文
posted @ 2016-09-30 18:29 github.com/starRTC 阅读(904) 评论(0) 推荐(0) 编辑
摘要: managing class dependencies and performing dependency injection. Dependency injection is a fancy phrase that essentially means this: class dependencie 阅读全文
posted @ 2016-09-30 18:29 github.com/starRTC 阅读(314) 评论(0) 推荐(0) 编辑
摘要: Where Is The Models Directory? app directory by default 其中 app:,core code of your application, almost all of the classes in your application will be i 阅读全文
posted @ 2016-09-30 18:28 github.com/starRTC 阅读(389) 评论(0) 推荐(0) 编辑