体育资讯网

您现在的位置是:首页 > 分类10 > 正文

分类10

heartbeat源码(HEARTBEAT)

hacker2022-06-08 17:55:22分类1065
本文目录一览:1、浮动广告代码2、

本文目录一览:

浮动广告代码

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

head

meta http-equiv="Content-Type" content="text/html; charset=gb2312" /

script type="text/javascript"

!--

lastScrollY = 0;

function heartBeat(){

var diffY;

if (document.documentElement document.documentElement.scrollTop)

diffY = document.documentElement.scrollTop;

else if (document.body)

diffY = document.body.scrollTop

else

{/*Netscape stuff*/}

percent=.1*(diffY-lastScrollY);

if(percent0) percent=Math.ceil(percent);

else percent=Math.floor(percent);

document.getElementById("rightDiv").style.top = parseInt(document.getElementById("rightDiv").style.top)+percent+"px";

lastScrollY=lastScrollY+percent;

}

//下面这段删除后,将不跟随屏幕而移动。

window.setInterval("heartBeat()",1);

//--

/script

style type="text/css"

!--

/* 这里定义滴是页面高度,用来测试跟随效果滴,跟广告无关 */

html,body{height:1500px; background:lightblue;}

#mm{height:1000px;}

/* 这里是设置样式滴 */

#leftDiv,#rightDiv{

width:100px; /* 宽度 */

height:100px; /* 高度 */

position:absolute; /* 绝对定位激活 */

}

--

/style

/head

body

内容在这里输入

!--开始--

div id="rightDiv" style="top:220px; /* 距离顶部220px */ right:2px; /* 距离右侧2px */ "img src="" alt="" width="100" height="150" //div

!--结束--

/body

/html

如何解决源码包安装时的依赖性问题

动态可执行文件使用最初编译和链接程序时使用的库文件的共享对象名称来查找共享对象。它们在少数的几个标准位置查找heartbeat源码,比如在/lib和/usr/lib目录及在LD_LIBRARY_PATH环境变量(主要用于指定查找共享库,比如我们在安装Oracle时指定路径,exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib)指定的目录中。顺便提一下,在这些库目录中找到的共享对象可能不是真正的文件;它们可能是指向位于其heartbeat源码他位置的真实库文件的符号链接(但通常仍旧在标准库目录的一个目录中)。至少从系统管理员的观点是在用于创建共享库文件的共享库软件包的名称和共享库文件的名称之间通常没有什么关系。例如,GLIBC2.3软件包用于创建libc.so.6共享库文件。也从本示例中注意到,添加到共享库文件名结束的版本号(.6)跟用于创建它的版本号(2.3)没有关系。这是由共享库软件包开发人员有意完成的,以便GLIBC的新版本可以重用相同的共享库文件名libc.so.6。这允许您在系统上加载新版本的GLIBC,而不用中断动态链接到lib.so.6共享库文件的所有程序,当然假定新版本的GLIBC向后与动态可执行文件最初所链接的老版本GLIBC兼容。因此,即使库文件或共享对象文件有与它们相关的版本号,这些版本号也不能帮助heartbeat源码你确定他们来自哪个版本的共享软件包。

注意:当将whatprovides选项用于rpm查询命令时,可以获得有关使用rpm软件包加载到系统的现有共享对象的信息。这种混乱是由下面的事实造成的:单个共享库文件可能支持某个范围的共享库软件包版本。例如,要检查soname库文件/lib/libc.so.6支持的GLIBC共享库软件包,运行下面的命令:

#objdump--all-headers/lib/libc.so.6|less

向下滚动此报告,直到到达Versiondefinitions:部分,以便查看libc.so.6共享库文件支持哪些GLIBC版本:

Versiondefinitions:

10x010x0865f4e6libc.so.6

20x000x0d696910GLIBC_2.0

30x000x0d696911GLIBC_2.1

GLIBC_2.0

40x000x09691f71GLIBC_2.1.1

GLIBC_2.1

50x000x09691f72GLIBC_2.1.2

GLIBC_2.1.1

60x000x09691f73GLIBC_2.1.3

GLIBC_2.1.2

70x000x0d696912GLIBC_2.2

GLIBC_2.1.3

80x000x09691a71GLIBC_2.2.1

GLIBC_2.2

90x000x09691a72GLIBC_2.2.2

GLIBC_2.2.1

100x000x09691a73GLIBC_2.2.3

GLIBC_2.2.2

110x000x09691a74GLIBC_2.2.4

GLIBC_2.2.3

120x000x09691a76GLIBC_2.2.6

GLIBC_2.2.4

130x000x0d696913GLIBC_2.3

GLIBC_2.2.6

140x000x09691972GLIBC_2.3.2

GLIBC_2.3

150x000x09691973GLIBC_2.3.3

GLIBC_2.3.2

160x000x09691974GLIBC_2.3.4

GLIBC_2.3.3

170x000x0d696914GLIBC_2.4

GLIBC_2.3.4

180x000x0d696915GLIBC_2.5

GLIBC_2.4

190x000x0963cf85GLIBC_PRIVATE

GLIBC_2.5

200x000x0b792650GCC_3.0

在本示例中,1ibc.so.6共享库文件支持原先为GLIBC版本2.0到2.5而开发的所有动态执行文件。注意:也可以使用objdump命令来从共享库文件中提取soname,命令如下所示:

#objdump--all-headers/lib/libcrypto.so.0.9.8b|grepSONAME

SONAMElibcrypto.so.6

objdump:/lib/libcrypto.so.0.9.8b:norecognizeddebugginginformation

接下来,将讨论rpm软件包是如何生成的,以便在新系统上安装rpm软件包时,这些共库依赖性是己知的。

三、Rpm软件包和共享库依赖性

当程序员生成rpm软件包时,ldd命令用于报告动态可执行文件软件包中所有动态可执行文件使用的所有共享库。另一个混乱是由下面的事实带来的:相同软件包中的不同动态可执行文件可能与相同的共享库软件包的不同版本进行链接。例如,Heartbeat软件包中的不同程序可能已经进行heartbeat源码了开发,并动态链接到libc.so.6sonmae共享库文件的不同GLIBC版本。对rpm命令使用-q和--requires参数,可以看到rpm软件包需要的共享库的完整清单。例如,要看到Heartbeatrpm软件包所有的所需依赖性,请使用命令:

#rpm-q--requires-pheartbeat-1.x.x.i386.rpm

这产生heartbeat源码了下面的报告:

sysklogd

/bin/sh

/bin/sh

/usr/bin/python

ld-linux.so.2

libapphb.so.0

libc.so.6

libc.so.6(GLIBC_2.0)

libc.so.6(GLIBC_2.1)

libc.so.6(GLIBC_2.1.3)

libc.so.6(GLIBC_2.2)

libc.so.6(GLIBC_2.3)

libccmclient.so.0

libdl.so.2

libglib-1.2.so.0

libhbclient.so.0

libpils.so.0

libplumb.so.0

libpthread.so.0

librt.so.1

libstonith.so.0

注意,在此报告中,libc.so.6soname是所需要的,此共享库必须支持使用GLIBC共享软件包版本号2.0、2.1、2.1.3、2.2和2.3进行链接的动态可执行文件。这是由下面的事实决定的:Heartbeat软件包中的不同动态可执行文件是针对不同版本的libc.so.6库的每个版本进行链接的。在了解了动态可执行文件、共享对象、soname和共享库软件包彼此是如何相关的后,下面准备来看这样的一个例子:当尝试安装rpm软件包,并且它由于依赖性错误而失败时,会发生什么。yum能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。

四、手工解决依赖性问题

通常,当尝试安装发行版中没有包括的软件包(及不能由像up2date、apt-get或Yum一样的更新工具自动解决其依赖性的软件包)时,将碰到rpm依赖性错误。例如,如果尝试在老的Linux发行版上使用rpm–ivh*rpm命令,例如所有的Heartbeatrpm包,那么在安装过程中就可能碰到下面的错误:

error:faileddependencies:

libc.so.6(GLIBC_2.3)isneededbyheartbeat-1.x.x

libc.so.6(GLIBC_2.3)isneededbyheartbeat-pils-1.x.x

libcrypto.so.0.9.6isneededbyheartbeat-stonith-1.x.x

libsnmp-0.4.2.6.soisneededbyheartbeat-stonith-1.x.x

注意,rpm命令没有干扰报告所需的每个GLIBC共享库软件包版本号——它只报告所需的最高编号的版本号(GLIBC_2.3)。(假定原来的软件包开发人员不会将相同软件包中的可执行文件链接到不兼容版本的共享库软件包)所有的这些故障都报告所需的共享库名称或soname(而不是文件名称,soname始终以“lib”开始)。但可以删除添加到rpm报告的soname结束的版本号,并快速检查以查看是否在系统中使用locate命令安装这些共享库(假设您的locate数据库是最新的,有关更多信息,请参阅locate或slocate的手册页)。例如,

beaglebone 源码 放在哪

找到heartbeat源码

static struct pinmux_configgpio_led_mux[] = {

{"gpmc_ad4.gpio1_4",OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_ad5.gpio1_5",OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_ad6.gpio1_6",OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_ad7.gpio1_7",OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{NULL, 0},

};

修改成heartbeat源码:static struct pinmux_config gpio_led_mux[] = {

{"gpmc_a5.gpio1_21", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_a6.gpio1_22", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_a7.gpio1_23", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_a8.gpio1_24", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{NULL, 0},

};

找到heartbeat源码

static struct gpio_led gpio_leds[] = {

{

.name = "am335x:EVM_SK:usr0",

.gpio = GPIO_TO_PIN(1, 4), /* D1 */

},

{

.name = "am335x:EVM_SK:usr1",

.gpio = GPIO_TO_PIN(1, 5), /* D2 */

},

{

.name = "am335x:EVM_SK:mmc0",

.gpio = GPIO_TO_PIN(1, 7), /* D3 */

.default_trigger = "mmc0",

},

{

.name = "am335x:EVM_SK:heartbeat",

.gpio = GPIO_TO_PIN(1, 6), /* D4 */

.default_trigger = "heartbeat",

},

};

修改成heartbeat源码

static struct gpio_led gpio_leds[] = {

{

.name = "am335x:EVM_SK:usr0",

.gpio = GPIO_TO_PIN(1,21), /* D1 */

},

{

.name = "am335x:EVM_SK:usr1",

.gpio = GPIO_TO_PIN(1, 22), /* D2 */

},

{

.name = "am335x:EVM_SK:mmc0",

.gpio = GPIO_TO_PIN(1, 23), /* D3 */

.default_trigger = "mmc0",

},

{

.name = "am335x:EVM_SK:heartbeat",

.gpio = GPIO_TO_PIN(1, 24), /* D4 */

.default_trigger = "heartbeat",

},

};

请教linux双机热备软件Heartbeat

有区分heartbeat源码的。

ha.cf、haresources、authkeys这三个文件heartbeat源码,Heartbeat 3.0.5版本heartbeat源码的在如下目录heartbeat源码

Heartbeat-3-0-7e3a82377fa8\Heartbeat-3-0-7e3a82377fa8\doc

【高分求助】求站内高级搜索源码

html

head

meta http-equiv="Content-Language" content="zh-cn"

meta http-equiv="Content-Type" content="text/html; charset=gb2312"

titletest/title

/head

body style="font-size: 10pt"

script language="JavaScript"

var NS4 = (document.layers); // Which browser?

var IE4 = (document.all);

var win = window; // window to search.

var n = 0;

function findInPage(str) {

var txt, i, found;

if (str == "")

return false;

// Find next occurance of the given string on the page, wrap around to the

// start of the page if necessary.

if (NS4) {

// Look for match starting at the current point. If not found, rewind

// back to the first match.

if (!win.find(str))

while(win.find(str, false, true))

n++;

else

n++;

// If not found in either direction, give message.

if (n == 0)

alert("本页没有查到.");

}

if (IE4) {

txt = win.document.body.createTextRange();

// Find the nth match from the top of the page.

for (i = 0; i = n (found = txt.findText(str)) != false; i++) {

txt.moveStart("character", 1);

txt.moveEnd("textedit");

}

// If found, mark it and scroll it into view.

if (found) {

txt.moveStart("character", -1);

txt.findText(str);

txt.select();

txt.scrollIntoView();

n++;

}

// Otherwise, start over at the top of the page and find first match.

else {

if (n 0) {

n = 0;

findInPage(str);

}

// Not found anywhere, give message.

else

alert("本页没有查到此题目,请尝试用下百度的搜索引擎在网上查下.");

}

}

return false;

}

/script

div id="floater" style="position:absolute; width:95px; height:105px; z-index:10; visibility: visible; right: 10px; top: 13px"

div align="center" style="width: 158; height: 245"

script language=JavaScript

self.onError=null;

currentX = currentY = 0;

whichIt = null;

lastScrollX = 0; lastScrollY = 0;

NS = (document.layers) ? 1 : 0;

IE = (document.all) ? 1: 0;

!-- STALKER CODE --

function heartBeat() {

if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }

if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }

if(diffY != lastScrollY) {

percent = .1 * (diffY - lastScrollY);

if(percent 0) percent = Math.ceil(percent);

else percent = Math.floor(percent);

if(IE) document.all.floater.style.pixelTop += percent;

if(NS) document.floater.top += percent;

lastScrollY = lastScrollY + percent;

}

if(diffX != lastScrollX) {

percent = .1 * (diffX - lastScrollX);

if(percent 0) percent = Math.ceil(percent);

else percent = Math.floor(percent);

if(IE) document.all.floater.style.pixelLeft += percent;

if(NS) document.floater.left += percent;

lastScrollX = lastScrollX + percent;

}

}

!-- /STALKER CODE --

!-- DRAG DROP CODE --

function checkFocus(x,y) {

stalkerx = document.floater.pageX;

stalkery = document.floater.pageY;

stalkerwidth = document.floater.clip.width;

stalkerheight = document.floater.clip.height;

if( (x stalkerx x (stalkerx+stalkerwidth)) (y stalkery y (stalkery+stalkerheight))) return true;

else return false;

}

function grabIt(e) {

if(IE) {

whichIt = event.srcElement;

while (whichIt.id.indexOf("floater") == -1) {

whichIt = whichIt.parentElement;

if (whichIt == null) { return true; }

}

whichIt.style.pixelLeft = whichIt.offsetLeft;

whichIt.style.pixelTop = whichIt.offsetTop;

currentX = (event.clientX + document.body.scrollLeft);

currentY = (event.clientY + document.body.scrollTop);

} else {

window.captureEvents(Event.MOUSEMOVE);

if(checkFocus (e.pageX,e.pageY)) {

whichIt = document.floater;

StalkerTouchedX = e.pageX-document.floater.pageX;

StalkerTouchedY = e.pageY-document.floater.pageY;

}

}

return true;

}

function moveIt(e) {

if (whichIt == null) { return false; }

if(IE) {

newX = (event.clientX + document.body.scrollLeft);

newY = (event.clientY + document.body.scrollTop);

distanceX = (newX - currentX); distanceY = (newY - currentY);

currentX = newX; currentY = newY;

whichIt.style.pixelLeft += distanceX;

whichIt.style.pixelTop += distanceY;

if(whichIt.style.pixelTop document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;

if(whichIt.style.pixelLeft document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;

if(whichIt.style.pixelLeft document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;

if(whichIt.style.pixelTop document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;

event.returnValue = false;

} else {

whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);

if(whichIt.left 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;

if(whichIt.top 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;

if( (whichIt.left + whichIt.clip.width) = (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;

if( (whichIt.top + whichIt.clip.height) = (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;

return false;

}

return false;

}

function dropIt() {

whichIt = null;

if(NS) window.releaseEvents (Event.MOUSEMOVE);

return true;

}

!-- DRAG DROP CODE --

if(NS) {

window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);

window.onmousedown = grabIt;

window.onmousemove = moveIt;

window.onmouseup = dropIt;

}

if(IE) {

document.onmousedown = grabIt;

document.onmousemove = moveIt;

document.onmouseup = dropIt;

}

if(NS || IE) action = window.setInterval("heartBeat()",1);

/script

form name="search" onSubmit="return findInPage(this.string.value);"

font size=3font color="#FF0000"br

请输入关键字:br

/fontbr

input name="string" type="text" size=10 onChange="n = 0;"br

/font br

input type="submit" value="查找"

input type="submit" value="继续查"br

/form

/div

/div

script language=JavaScript

self.onError=null;

currentX = currentY = 0;

whichIt = null;

lastScrollX = 0; lastScrollY = 0;

NS = (document.layers) ? 1 : 0;

IE = (document.all) ? 1: 0;

!-- STALKER CODE --

function heartBeat() {

if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }

if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }

if(diffY != lastScrollY) {

percent = .1 * (diffY - lastScrollY);

if(percent 0) percent = Math.ceil(percent);

else percent = Math.floor(percent);

if(IE) document.all.floater.style.pixelTop += percent;

if(NS) document.floater.top += percent;

lastScrollY = lastScrollY + percent;

}

if(diffX != lastScrollX) {

percent = .1 * (diffX - lastScrollX);

if(percent 0) percent = Math.ceil(percent);

else percent = Math.floor(percent);

if(IE) document.all.floater.style.pixelLeft += percent;

if(NS) document.floater.left += percent;

lastScrollX = lastScrollX + percent;

}

}

!-- /STALKER CODE --

!-- DRAG DROP CODE --

function checkFocus(x,y) {

stalkerx = document.floater.pageX;

stalkery = document.floater.pageY;

stalkerwidth = document.floater.clip.width;

stalkerheight = document.floater.clip.height;

if( (x stalkerx x (stalkerx+stalkerwidth)) (y stalkery y (stalkery+stalkerheight))) return true;

else return false;

}

function grabIt(e) {

if(IE) {

whichIt = event.srcElement;

while (whichIt.id.indexOf("floater") == -1) {

whichIt = whichIt.parentElement;

if (whichIt == null) { return true; }

}

whichIt.style.pixelLeft = whichIt.offsetLeft;

whichIt.style.pixelTop = whichIt.offsetTop;

currentX = (event.clientX + document.body.scrollLeft);

currentY = (event.clientY + document.body.scrollTop);

} else {

window.captureEvents(Event.MOUSEMOVE);

if(checkFocus (e.pageX,e.pageY)) {

whichIt = document.floater;

StalkerTouchedX = e.pageX-document.floater.pageX;

StalkerTouchedY = e.pageY-document.floater.pageY;

}

}

return true;

}

function moveIt(e) {

if (whichIt == null) { return false; }

if(IE) {

newX = (event.clientX + document.body.scrollLeft);

newY = (event.clientY + document.body.scrollTop);

distanceX = (newX - currentX); distanceY = (newY - currentY);

currentX = newX; currentY = newY;

whichIt.style.pixelLeft += distanceX;

whichIt.style.pixelTop += distanceY;

if(whichIt.style.pixelTop document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;

if(whichIt.style.pixelLeft document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;

if(whichIt.style.pixelLeft document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;

if(whichIt.style.pixelTop document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;

event.returnValue = false;

} else {

whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);

if(whichIt.left 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;

if(whichIt.top 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;

if( (whichIt.left + whichIt.clip.width) = (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;

if( (whichIt.top + whichIt.clip.height) = (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;

return false;

}

return false;

}

function dropIt() {

whichIt = null;

if(NS) window.releaseEvents (Event.MOUSEMOVE);

return true;

}

!-- DRAG DROP CODE --

if(NS) {

window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);

window.onmousedown = grabIt;

window.onmousemove = moveIt;

window.onmouseup = dropIt;

}

if(IE) {

document.onmousedown = grabIt;

document.onmousemove = moveIt;

document.onmouseup = dropIt;

}

if(NS || IE) action = window.setInterval("heartBeat()",1);

/script

pb题库 /b/p

p请在右边的搜索框中查找在此页面查找br

br

"馒头是谁发明的?","诸葛亮",br

"“蚕蚁”是蚂蚁还是蚕?","蚕",br

"古诗的体制称为“风雅颂”,其中“颂”是指:","宗庙乐歌",br

" 目前,唯有哪个金融机构可在县一级的地方设立分支机构?","中国农业银行",br

"东汉末年我国的一位杰出的医学家是:","华佗",br

"离地面越高空气越稀薄是因为:","空气受到地球引力的影响",br

/P

/body

/html

累啊

也该加分咯

发表评论

评论列表

  • 余安颜于(2022-06-08 21:02:39)回复取消回复

    .1 * (diffX - lastScrollX); if(percent 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) docu

  • 泪灼栖迟(2022-06-08 22:56:00)回复取消回复

    It.clip.height)-17; return false; } return false; } function dropIt() { whichIt = nul

  • 泪灼末屿(2022-06-09 00:16:47)回复取消回复

    hichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17; return

  • 假欢瘾然(2022-06-09 02:31:27)回复取消回复

    cent; } if(diffX != lastScrollX) { percent = .1 * (diffX - lastScrollX); if(percent 0) percent = Math.ceil(percent); else percent = Ma

  • 世味只酷(2022-06-08 18:48:29)回复取消回复

    yId("rightDiv").style.top = parseInt(document.getElementById("rightDiv").style.top)+percent+"px";lastScrollY=lastScrollY+per