- ubuntu下使用Live555搭建流媒体服务器
稚肩
音视频开发服务器ubuntulinux
本教程实验环境在64bitubuntuLive555基本介绍,RTSP,以及服务端客户端的编程参考这篇文章:实时流媒体传输开源库——Live555拉取Live555源码到本地文件夹wgethttp://www.live555.com/liveMedia/public/live.2023.11.30.tar.gz解压缩tar-xvflive.2023.11.30.tar.gz解压后的目录文件如下,M
- live555在拉流时应对多路码流传输带宽问题的几种处理思路
稚肩
音视频开发音视频
处理带宽管理和调整的机制Live555库本身并没有直接处理带宽管理和调整的机制,因为它主要是一个用于实现RTSP流媒体服务器和客户端的库,而带宽管理通常是在应用层进行处理的。但Live555支持一些基础协议,这些协议可以在应对带宽问题时进行使用。Live555提供了对RTSP协议的完整实现,包括对RTSP的处理、解析和生成。通过RTSP协议,可以与客户端进行交互,进行带宽管理、流控制等操作。同时L
- 实时流媒体传输开源库——Live555
稚肩
音视频
Live555(LiveMediaLibraries)是一个开源的多媒体流处理库,主要用于实现基于标准网络协议的实时流媒体传输。Live555提供了一套C++类库,可以用于开发支持RTP/RTCP、RTSP、SIP等协议的流媒体服务器和客户端应用程序。它广泛用于视频监控、视频会议、音视频直播等流媒体传输领域。Live555支持多种实时流媒体相关的协议,包括RTP(Real-TimeProtocol
- 交叉编译-16:live555交叉编译(Windows和君正平台)
椰果奶茶加冰
交叉编译liv555交叉编译
一、简介Live555是一个为流媒体提供解决方案的跨平台的C++开源项目,它实现了对标准流媒体传输协议如RTP/RTCP、RTSP、SIP等的支持。Live555实现了对多种音视频编码格式的音视频数据的流化、接收和处理等支持,包括MPEG、H.263+、DV、JPEG视频和多种音频编码。同时由于良好的设计,Live555非常容易扩展对其他格式的支持。目前,Live555已经被用于多款播放器的流媒体
- rtsp时间戳计算方法
lipku
rtsp时间戳rtp
Rtsp的拖放和快放、慢放都是先pause,再play,根据play消息包中的range和scale参数来实现。对应到live555中,pause时调用sendPauseCommand函数。Play时调用unsignedsendPlayCommand(MediaSubsession&subsession,responseHandler*responseHandler,doublestart=0.0
- 基于live555实现rtsp视频直播
lipku
makefileserver编译器flash嵌入式服务器
email:
[email protected]现有的安防监控设备视频传输都是用的各家私有协议,鲜有用标准协议rtsp的。如果能用rtsp来传输,那很多标准的rtsp客户端都能连上观看,真正做到互联互通。Live555是目前实现rtsp协议最短小精悍的开源代码,能很方便的移植到各种嵌入式系统中,而且该开源项目更新速度很快,基本每个月都有更新版本。Live555目前已经实现了基于udp和tcp的传输,
- rtsp报文
lxzlife
协议c++linuxc语言
客户端请求:OPTIONSrtsp://172.29.180.26:8554/liveRTSP/1.0CSeq:2User-Agent:LibVLC/3.0.18(LIVE555StreamingMediav2016.11.28)服务端响应:RTSP/1.0200OKCSeq:2Public:OPTIONS,DESCRIBE,SETUP,TEARDOWN,PLAY客户端请求:DESCRIBErts
- live555对于实时音视频的支持
石头翔子
live555音视频ipcrtspserver
live555本身,可以支持将文件作为源,提供RTSP播放服务器功能。为了使live555能够支持实时流的播放,需要进行改造。有两种方式:1,一个比较简单,可以使用管道文件的方式。缺点是当码流较大时,会明显的卡顿、马赛克。(测试超过80K时会卡得非常厉害)2,再一个,需要自己重载source,submission类。在其中实现数据的对接。下面分别介绍一下这两种方式一、管道方式:1,打开live/t
- 在IPCAM上实现RTSP协议直播-live555
石头翔子
linux嵌入式开发IPCAMcC网络
为了实现网络播放,找协议找开源找破了头。终于找到一个能用的当播出来的时候,震惊了!这也太容易了。列下步骤如下:1,下载live555,网址:http://www.live555.com/liveMedia/2,编译之,在该网站上有说明,基本命令:./genMakefilelinuxmake3,打开live/testProgs/testOnDemandRTSPServer.cpp,修改reuseFi
- 流媒体服务方案
NettyBoy
流媒体服务网络
流媒体该用什么方案实施,看到在知乎的分享记录一下。流媒体解决方案Live555(C++)流媒体平台框架EasyDarwin(C++,国产精品)实时流媒体播放服务器程序DarwinStreamingSrvr(C++)Flash流媒体服务器Red5(Java)流媒体服务器OpenStreamingServer(Java)FMS流媒体服务器(Adobe,收费的)Wowza流媒体服务器(Java)开源流媒
- 嵌入式开发(三):海思Hi3559a交叉编译live555
Yyauun
姓名:范雪元学号:19020100086学院:电子工程学院以下文章来源:https://blog.csdn.net/zh8706/article/details/107735541【嵌牛导读】:海思Hi3559AV100交叉编译live555【嵌牛鼻子】:live555【嵌牛提问】:如何通过海思Hi3559AV100交叉编译live555?【嵌牛正文】:网上很多关于交叉编译live555的教程,但
- live555学习4(转)
oneboyishappy
流媒体
十一h264RTP传输详解(3)书接上回:H264FUAFragmenter又对数据做了什么呢?[cpp]viewplaincopyprint?voidH264FUAFragmenter::doGetNextFrame(){if(fNumValidDataBytes==1){//WehavenoNALunitdatacurrentlyinthebuffer.Readanewone:fInputSo
- live555 RTSP服务器与客户端通信源码分析
abcd552191868
音视频开源软件音视频rtspRTP/RTCP/SIPlive555网络协议
live555RTSP客户端服务器通信本文说明预备知识代码分析服务端主进程消息循环服务器端客户端主进程客户端题外话本文说明live555已经发展了很多年,不过最新的live555版本,笔者没有编译通过,最终选择了2019.8.28的live555代码,如果有需要的同学,可以自行去Indexof/pub/contrib/live555/(videolan.org)去下载,不过需要自己去编译,我的编译
- live555
拥抱不确定
流媒体
Live555学习之(一)-------Live555的基本介绍前一阵子,因为项目需要,研究了一下Live555开源框架,研究的不是很深入,基本上把Live555当做API用了一下,但是毕竟也是本人看的第一个开源框架,在此记录总结一下。Live555是一个实现了RTSP协议的开源流媒体框架,Live555包含RTSP服务器端的实现以及RTSP客户端的实现。Live555可以将若干种格式的视频文件或
- FFmpeg入门详解之116:rtsp live555摄像头直播
福优学苑@音视频+流媒体
福优学苑音视频/流媒体rtsplive555直播音视频流媒体rtsp
rtsp+live555摄像头直播Live555直播流程简介与演示第一步,读取摄像头数据第二步,x264编码第三步,扩展live555第四步,vlc或ffplay播放ffplay-stats-fh264testxxx.264Live555直播代码解析H264LiveVideoServerMediaSubsessionSource:CamH264VideoStreamFramerSink:H264V
- 基于FFmpeg的视频播放器之三:拉取rtsp流
草上爬
基于FFmpeg的视频播放器音视频网络FFmpegrtsp播放器
拉取网络流和打开本地文件流程差不多,详见:基于FFmpeg的视频播放器之二:解复用,下面是不同地方。一.准备一个可用的rtsp流方法有很多,最方便的应该是用VLC串流了,具体步骤如下:https://blog.csdn.net/m0_61353061/article/details/120388230当然也可以使用live555作为rtsp服务器,可参考:https://blog.csdn.net
- 14.live555mediaserver-setup请求与响应
yunhuibin
手把手一起学live555网络tcp/ip网络协议
live555工程代码路径live555工程在我的gitee下(doc下有思维导图、drawio图):live555https://gitee.com/lure_ai/live555/tree/master章节目录链接0.前言——章节目录链接与为何要写这个?https://blog.csdn.net/yhb1206/article/details/127259190?spm=1001.2014.3
- 2.绘图规则
yunhuibin
手把手一起学live555学习网络协议开源
这是[手把手一起学live555]的第3篇(按这个序号看)。live555工程在我的gitee下(doc下有思维导图、drawio图):https://gitee.com/lure_ai/live555/tree/master章节目录链接0.前言——章节目录链接与为何要写这个?https://blog.csdn.net/yhb1206/article/details/127259190?spm=1
- 4.live555mediaserver-第一次select
yunhuibin
手把手一起学live555学习网络协议网络
这是[手把手一起学live555]的第5篇(按这个序号看,请找正确顺序看)。live555工程在我的gitee下(doc下有思维导图、drawio图):https://gitee.com/lure_ai/live555/tree/master章节目录链接0.前言——章节目录链接与为何要写这个?https://blog.csdn.net/yhb1206/article/details/1272591
- 1.学习的线索和姿势
yunhuibin
手把手一起学live555学习网络协议网络开源
这是[手把手一起学live555]的第2篇(按这个序号看)。live555工程在我的gitee下(doc下有思维导图、drawio图):https://gitee.com/lure_ai/live555/tree/master1.学习姿势我强烈建议结合对象图、思维导图和代码看。就是说在我的笔记里有思维导图和对象图,我没有提醒你说这两个结合一块看,但是你自己应该能感受到,我的思维导图和对象图是互相对
- 16.live555mediaserver-保活机制
yunhuibin
手把手一起学live555linuxh.264h.265g711学习
live555工程代码路径live555工程在我的gitee下(doc下有思维导图、drawio图):live555https://gitee.com/lure_ai/live555/tree/master章节目录链接0.前言——章节目录链接与为何要写这个?https://blog.csdn.net/yhb1206/article/details/127259190?spm=1001.2014.3
- srs流媒体服务器性能,srs流媒体服务器 配置
吴炳忠
srs流媒体服务器性能
srs流媒体服务器配置内容精选换一换SRS是一款开源流媒体,适合直播以及低延时流媒体领域,但是从来不设限,可以应用在直播、视频会议、在线教育等场景。同时视频领域还有两大块、广电和视频监控,随着互联网的迅速发展,视频监控设备上云的需求越来越多,以前还可以私有化局域网里面搞一搞,但是随着移动互联网的发展,视频监控有大量的移动端直播需求,来自:博客流媒体解决方案Live555(C++)流媒体平台框架Ea
- 流媒体服务器
狗狗狗乖乖
音视频入门服务器网络音视频
市面上优秀的流媒体服务器解决方案有很多,比如SRS,Red5,EasyDarwin,nginx-rtmp,live555,mediasoup等等。这些服务器框架各有优缺点,没有一款完美的流媒体服务器解决方案,在流媒体选型的时候,需要根据自己的业务选择适合的流媒体服务器。nginx-rtmp的部署RTMP是RealTimeMessagingProtocol(实时消息传输协议)的首字母缩写。该协议基于
- live555交叉编译(ubuntu+arm平台)
桃里桑
项目-网络相机(arm平台)ubuntuarm开发linux
1.下载源码http://live555.com/liveMedia/public/live555-latest.tar.gz2.解压tar-zxvflive555-latest.tar.gz3.修改配置文件1)进入live文件夹2)复制一份配置文件cpconfig.armlinuxconfig.myarmlinuxchmod777config.myarmlinux3)vimconfig.myar
- FFmpeg入门详解之92:Live555学习之(一)-------Live555的基本介绍
福优学苑@音视频+流媒体
福优学苑音视频/流媒体音视频流媒体live555
Live555学习之(一)-------Live555的基本介绍前一阵子,因为项目需要,研究了一下Live555开源框架,研究的不是很深入,基本上把Live555当做API用了一下,但是毕竟也是本人看的第一个开源框架,在此记录总结一下。Live555是一个实现了RTSP协议的开源流媒体框架,Live555包含RTSP服务器端的实现以及RTSP客户端的实现。Live555可以将若干种格式的视频文件或
- FFmpeg基础到工程-多路H265监控录放开发学习笔记
怪我冷i
音视频ffmpeg学习
多路H265监控录放开发学习笔记课程涉及:FFmpeg,WebRTC,SRS,Nginx,Darwin,Live555,等。包括:音视频、流媒体、直播、Android、视频监控28181、等。具体内容包括:一、视频监控的架构和流程二、FFmpeg4.3+SDL2+Qt5开发环境的搭建三、FFmpeg的SDK编程回顾总结并操练四、SDL2.0的编程回顾总结并操练五、颜色空间转换RGB和YUV的原理与
- live555 权限认证代码
little丶Sunshine
c++权限
char*RTSPClient::createAuthenticatorString(charconst*cmd,charconst*url){Authenticator&auth=fCurrentAuthenticator;//alias,forbrevityif(auth.realm()!=NULL&&auth.username()!=NULL&&auth.password()!=NULL){
- ubuntu下搭建rtsp视频推送服务
目标: 实现财富自由
C语言编程ubuntu
公司业务需要使用rtsp服务,搜索了几个rtsp源,但都非常不稳定,并且无法指定特定视频作为源。为了方便开发测试,决定自行建立rtsp服务器。live555编译安装启动编译12345wgethttp://www.live555.com/liveMedia/public/live555-latest.tar.gztarxzflive555-latest.tar.gzcdlive./genMakefi
- android 第三方动态库,Android.mk中引用第3方动态库
weixin_39917090
android第三方动态库
Android.mk文件内容:LOCAL_PATH:=$(callmy-dir)include$(CLEAR_VARS)LOCAL_MODULE_TAGS:=optionalLOCAL_SRC_FILES:=\testH264VideoStreamer.cppLOCAL_MODULE:=live555_streamLOCAL_MODULE_CLASS:=EXECUTABLESLOCAL_STATI
- I帧、P帧,B帧,GOP
泷fyk
live555音视频h.264
doGetNextFrame()在Live555库的FramedSource类中,数据帧的获取位置由doGetNextFrame()函数来设置。这个函数是一个虚函数,子类可以重写它以实现特定类型的数据帧获取逻辑。在FramedSource的子类中,你可以重写doGetNextFrame()函数,以从数据源(例如文件、网络流等)获取下一帧数据。这个函数负责填充FramedSource类的成员变量,包
- 解线性方程组
qiuwanchi
package gaodai.matrix;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner scanner = new Sc
- 在mysql内部存储代码
annan211
性能mysql存储过程触发器
在mysql内部存储代码
在mysql内部存储代码,既有优点也有缺点,而且有人倡导有人反对。
先看优点:
1 她在服务器内部执行,离数据最近,另外在服务器上执行还可以节省带宽和网络延迟。
2 这是一种代码重用。可以方便的统一业务规则,保证某些行为的一致性,所以也可以提供一定的安全性。
3 可以简化代码的维护和版本更新。
4 可以帮助提升安全,比如提供更细
- Android使用Asynchronous Http Client完成登录保存cookie的问题
hotsunshine
android
Asynchronous Http Client是android中非常好的异步请求工具
除了异步之外还有很多封装比如json的处理,cookie的处理
引用
Persistent Cookie Storage with PersistentCookieStore
This library also includes a PersistentCookieStore whi
- java面试题
Array_06
java面试
java面试题
第一,谈谈final, finally, finalize的区别。
final-修饰符(关键字)如果一个类被声明为final,意味着它不能再派生出新的子类,不能作为父类被继承。因此一个类不能既被声明为 abstract的,又被声明为final的。将变量或方法声明为final,可以保证它们在使用中不被改变。被声明为final的变量必须在声明时给定初值,而在以后的引用中只能
- 网站加速
oloz
网站加速
前序:本人菜鸟,此文研究总结来源于互联网上的资料,大牛请勿喷!本人虚心学习,多指教.
1、减小网页体积的大小,尽量采用div+css模式,尽量避免复杂的页面结构,能简约就简约。
2、采用Gzip对网页进行压缩;
GZIP最早由Jean-loup Gailly和Mark Adler创建,用于UNⅨ系统的文件压缩。我们在Linux中经常会用到后缀为.gz
- 正确书写单例模式
随意而生
java 设计模式 单例
单例模式算是设计模式中最容易理解,也是最容易手写代码的模式了吧。但是其中的坑却不少,所以也常作为面试题来考。本文主要对几种单例写法的整理,并分析其优缺点。很多都是一些老生常谈的问题,但如果你不知道如何创建一个线程安全的单例,不知道什么是双检锁,那这篇文章可能会帮助到你。
懒汉式,线程不安全
当被问到要实现一个单例模式时,很多人的第一反应是写出如下的代码,包括教科书上也是这样
- 单例模式
香水浓
java
懒汉 调用getInstance方法时实例化
public class Singleton {
private static Singleton instance;
private Singleton() {}
public static synchronized Singleton getInstance() {
if(null == ins
- 安装Apache问题:系统找不到指定的文件 No installed service named "Apache2"
AdyZhang
apachehttp server
安装Apache问题:系统找不到指定的文件 No installed service named "Apache2"
每次到这一步都很小心防它的端口冲突问题,结果,特意留出来的80端口就是不能用,烦。
解决方法确保几处:
1、停止IIS启动
2、把端口80改成其它 (譬如90,800,,,什么数字都好)
3、防火墙(关掉试试)
在运行处输入 cmd 回车,转到apa
- 如何在android 文件选择器中选择多个图片或者视频?
aijuans
android
我的android app有这样的需求,在进行照片和视频上传的时候,需要一次性的从照片/视频库选择多条进行上传
但是android原生态的sdk中,只能一个一个的进行选择和上传。
我想知道是否有其他的android上传库可以解决这个问题,提供一个多选的功能,可以使checkbox之类的,一次选择多个 处理方法
官方的图片选择器(但是不支持所有版本的androi,只支持API Level
- mysql中查询生日提醒的日期相关的sql
baalwolf
mysql
SELECT sysid,user_name,birthday,listid,userhead_50,CONCAT(YEAR(CURDATE()),DATE_FORMAT(birthday,'-%m-%d')),CURDATE(), dayofyear( CONCAT(YEAR(CURDATE()),DATE_FORMAT(birthday,'-%m-%d')))-dayofyear(
- MongoDB索引文件破坏后导致查询错误的问题
BigBird2012
mongodb
问题描述:
MongoDB在非正常情况下关闭时,可能会导致索引文件破坏,造成数据在更新时没有反映到索引上。
解决方案:
使用脚本,重建MongoDB所有表的索引。
var names = db.getCollectionNames();
for( var i in names ){
var name = names[i];
print(name);
- Javascript Promise
bijian1013
JavaScriptPromise
Parse JavaScript SDK现在提供了支持大多数异步方法的兼容jquery的Promises模式,那么这意味着什么呢,读完下文你就了解了。
一.认识Promises
“Promises”代表着在javascript程序里下一个伟大的范式,但是理解他们为什么如此伟大不是件简
- [Zookeeper学习笔记九]Zookeeper源代码分析之Zookeeper构造过程
bit1129
zookeeper
Zookeeper重载了几个构造函数,其中构造者可以提供参数最多,可定制性最多的构造函数是
public ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolea
- 【Java命令三】jstack
bit1129
jstack
jstack是用于获得当前运行的Java程序所有的线程的运行情况(thread dump),不同于jmap用于获得memory dump
[hadoop@hadoop sbin]$ jstack
Usage:
jstack [-l] <pid>
(to connect to running process)
jstack -F
- jboss 5.1启停脚本 动静分离部署
ronin47
以前启动jboss,往各种xml配置文件,现只要运行一句脚本即可。start nohup sh /**/run.sh -c servicename -b ip -g clustername -u broatcast jboss.messaging.ServerPeerID=int -Djboss.service.binding.set=p
- UI之如何打磨设计能力?
brotherlamp
UIui教程ui自学ui资料ui视频
在越来越拥挤的初创企业世界里,视觉设计的重要性往往可以与杀手级用户体验比肩。在许多情况下,尤其对于 Web 初创企业而言,这两者都是不可或缺的。前不久我们在《右脑革命:别学编程了,学艺术吧》中也曾发出过重视设计的呼吁。如何才能提高初创企业的设计能力呢?以下是 9 位创始人的体会。
1.找到自己的方式
如果你是设计师,要想提高技能可以去设计博客和展示好设计的网站如D-lists或
- 三色旗算法
bylijinnan
java算法
import java.util.Arrays;
/**
问题:
假设有一条绳子,上面有红、白、蓝三种颜色的旗子,起初绳子上的旗子颜色并没有顺序,
您希望将之分类,并排列为蓝、白、红的顺序,要如何移动次数才会最少,注意您只能在绳
子上进行这个动作,而且一次只能调换两个旗子。
网上的解法大多类似:
在一条绳子上移动,在程式中也就意味只能使用一个阵列,而不使用其它的阵列来
- 警告:No configuration found for the specified action: \'s
chiangfai
configuration
1.index.jsp页面form标签未指定namespace属性。
<!--index.jsp代码-->
<%@taglib prefix="s" uri="/struts-tags"%>
...
<s:form action="submit" method="post"&g
- redis -- hash_max_zipmap_entries设置过大有问题
chenchao051
redishash
使用redis时为了使用hash追求更高的内存使用率,我们一般都用hash结构,并且有时候会把hash_max_zipmap_entries这个值设置的很大,很多资料也推荐设置到1000,默认设置为了512,但是这里有个坑
#define ZIPMAP_BIGLEN 254
#define ZIPMAP_END 255
/* Return th
- select into outfile access deny问题
daizj
mysqltxt导出数据到文件
本文转自:http://hatemysql.com/2010/06/29/select-into-outfile-access-deny%E9%97%AE%E9%A2%98/
为应用建立了rnd的帐号,专门为他们查询线上数据库用的,当然,只有他们上了生产网络以后才能连上数据库,安全方面我们还是很注意的,呵呵。
授权的语句如下:
grant select on armory.* to rn
- phpexcel导出excel表简单入门示例
dcj3sjt126com
PHPExcelphpexcel
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
if (PHP_SAPI == 'cli')
die('This example should only be run from a Web Brows
- 美国电影超短200句
dcj3sjt126com
电影
1. I see. 我明白了。2. I quit! 我不干了!3. Let go! 放手!4. Me too. 我也是。5. My god! 天哪!6. No way! 不行!7. Come on. 来吧(赶快)8. Hold on. 等一等。9. I agree。 我同意。10. Not bad. 还不错。11. Not yet. 还没。12. See you. 再见。13. Shut up!
- Java访问远程服务
dyy_gusi
httpclientwebservicegetpost
随着webService的崛起,我们开始中会越来越多的使用到访问远程webService服务。当然对于不同的webService框架一般都有自己的client包供使用,但是如果使用webService框架自己的client包,那么必然需要在自己的代码中引入它的包,如果同时调运了多个不同框架的webService,那么就需要同时引入多个不同的clien
- Maven的settings.xml配置
geeksun
settings.xml
settings.xml是Maven的配置文件,下面解释一下其中的配置含义:
settings.xml存在于两个地方:
1.安装的地方:$M2_HOME/conf/settings.xml
2.用户的目录:${user.home}/.m2/settings.xml
前者又被叫做全局配置,后者被称为用户配置。如果两者都存在,它们的内容将被合并,并且用户范围的settings.xml优先。
- ubuntu的init与系统服务设置
hongtoushizi
ubuntu
转载自:
http://iysm.net/?p=178 init
Init是位于/sbin/init的一个程序,它是在linux下,在系统启动过程中,初始化所有的设备驱动程序和数据结构等之后,由内核启动的一个用户级程序,并由此init程序进而完成系统的启动过程。
ubuntu与传统的linux略有不同,使用upstart完成系统的启动,但表面上仍维持init程序的形式。
运行
- 跟我学Nginx+Lua开发目录贴
jinnianshilongnian
nginxlua
使用Nginx+Lua开发近一年的时间,学习和实践了一些Nginx+Lua开发的架构,为了让更多人使用Nginx+Lua架构开发,利用春节期间总结了一份基本的学习教程,希望对大家有用。也欢迎谈探讨学习一些经验。
目录
第一章 安装Nginx+Lua开发环境
第二章 Nginx+Lua开发入门
第三章 Redis/SSDB+Twemproxy安装与使用
第四章 L
- php位运算符注意事项
home198979
位运算PHP&
$a = $b = $c = 0;
$a & $b = 1;
$b | $c = 1
问a,b,c最终为多少?
当看到这题时,我犯了一个低级错误,误 以为位运算符会改变变量的值。所以得出结果是1 1 0
但是位运算符是不会改变变量的值的,例如:
$a=1;$b=2;
$a&$b;
这样a,b的值不会有任何改变
- Linux shell数组建立和使用技巧
pda158
linux
1.数组定义 [chengmo@centos5 ~]$ a=(1 2 3 4 5) [chengmo@centos5 ~]$ echo $a 1 一对括号表示是数组,数组元素用“空格”符号分割开。
2.数组读取与赋值 得到长度: [chengmo@centos5 ~]$ echo ${#a[@]} 5 用${#数组名[@或
- hotspot源码(JDK7)
ol_beta
javaHotSpotjvm
源码结构图,方便理解:
├─agent Serviceab
- Oracle基本事务和ForAll执行批量DML练习
vipbooks
oraclesql
基本事务的使用:
从账户一的余额中转100到账户二的余额中去,如果账户二不存在或账户一中的余额不足100则整笔交易回滚
select * from account;
-- 创建一张账户表
create table account(
-- 账户ID
id number(3) not null,
-- 账户名称
nam