小腿足三里这条筋酸痛酸痛是怎么回事 百度拇指医生

有人能解释一下这段代码干什么的吗?
var _hmt = _hmt || [];
(function() {
var hm = document.createElement(&script&);
hm.src = &///hm.js?3d143f0a07bdf&;
var s = document.getElementsByTagName(&script&)[0];
s.parentNode.insertBefore(hm, s);
var s = document.createElement('script');
s.type = 'text/javascript';
s.innerText = &var vglnk = {api_url: '///api', key: '084caf0d8f08bcc'};&;
document.body.appendChild(s);
s = document.createElement('script');
s.type = 'text/javascript';
s.src = '/api/vglnk.js';
document.body.appendChild(s);
自动引入js.
js引入js文件JS进阶篇第10章:谁能用文字讲解一下这段代码的意思?不甚感激
&script type="text/javascript"&
window.onload = function(){
var oTab = document.getElementById("tabs");
var oUl = oTab.getElementsByTagName("ul")[0];
var oLis = oUl.getElementsByTagName("li");
var oDivs= oTab.getElementsByTagName("div");
for(var i= 0,len = oLis.i&i++){
oLis[i].index =
oLis[i].onclick = function() {
for(var n= 0;n&n++){
oLis[n].className = "";
oDivs[n].className = "hide";
this.className = "on";
oDivs[this.index].className = "";
oLis[n].className = &&;这个&&分号是什么意思
将li标签的类名设置为空,也就是暂时删除hide类名
相当于把所有Div的样式设置成display:none的意思,就是把所有Div隐藏
点击展开后面1条评论
写下你的评论...
写下你的评论...
这条说错了,容易引发歧义,作废(回复不能删除真心坑)
写下你的评论...
Copyright (C)
All Rights Reserved | 京ICP备 号-2扫二维码下载作业帮
拍照搜题,秒出答案,一键查看所有搜题记录
下载作业帮安装包
扫二维码下载作业帮
拍照搜题,秒出答案,一键查看所有搜题记录
c++基础 解释下这段代码每句什么意思和计算机选哪个做答案 为什么 int a=0,b=1,c=2,d=3,m,n,k;b=a++&&c++;d=a++||++c;n=b>a;k=n&&(m=a);谁能回答下下面的追问
扫二维码下载作业帮
拍照搜题,秒出答案,一键查看所有搜题记录
&&只能判断0或1么?——不.&&什么也不判断,它是逻辑与操作符.当它前后的两个变量都不为0时结果为“真”,用1表示;当其中一个变量为0时结果为“假”,用0表示.这个a++应该是1吧——当a原来是1时,a++执行后a便为1,但要注意b=a++执行后b=0,a=1,原因是++写在a后面,叫后增1符,要等a的值赋给b后,a的值才加1.n=b>a;是不是这个式子不成立,都会取值为0——不.b=1,而a=0,故b>a是成立的,所以b>a的逻辑结果是“真”,“真”用1表示,所以最后n=1.k=n&&(m=a); 等效于 k=(0&&0)
(0&&0)=1;——又错了.n=1,m=a=0,所以k=1&&0=0,因此最后k=0.希望有所帮助.
为您推荐:
其他类似问题
扫描下载二维码有哪位大神可以帮小弟我解释一下这段代码吗_读书人
有哪位大神可以帮小弟我解释一下这段代码吗
&来源:读书人网&【读书人网():综合教育门户网站】
有哪位大神可以帮我解释一下这段代码吗?//
有哪位大神可以帮我解释一下这段代码吗?//============================================================================//&Name&&&&&&&&:&KinectTouch.cpp//&Author&&&&&&:&/robbeofficial//&Version&&&&&:&0.something//&Description&:&recognizes&touch&points&on&arbitrary&surfaces&using&kinect//&&and&maps&them&to&TUIO&cursors//&&(turns&any&surface&into&a&touchpad)//============================================================================*&*&1.&point&your&kinect&from&a&higher&place&down&to&your&table&*&2.&start&the&program&(keep&your&hands&off&the&table&for&the&beginning)&*&3.&use&your&table&as&a&giant&touchpad&*/#include&&iostream&#include&&vector&#include&&map&using&namespace&//&openCV#include&&opencv/highgui.h&#include&&opencv/cv.h&using&namespace&//&openNI#include&&XnOpenNI.h&#include&&XnCppWrapper.h&using&namespace&#define&CHECK_RC(rc,&what)\if&(rc&!=&XN_STATUS_OK)\{\printf("%s&failed:&%s\n",&what,&xnGetStatusString(rc));\return&\}//&TUIO#include&"TUIO/TuioServer.h"using&namespace&TUIO;//&TODO&smoothing&using&kalman&filter//---------------------------------------------------------------------------//&Globals//---------------------------------------------------------------------------//&OpenNIxn::Context&xnCxn::DepthGenerator&xnDepthGxn::ImageGenerator&xnImgeGbool&mousePressed&=&//---------------------------------------------------------------------------//&Functions//---------------------------------------------------------------------------int&initOpenNI(const&XnChar*&fname)&{XnStatus&nRetVal&=&XN_STATUS_OK;//&initialize&contextnRetVal&=&xnContext.InitFromXmlFile(fname);CHECK_RC(nRetVal,&"InitFromXmlFile");//&initialize&depth&generatornRetVal&=&xnContext.FindExistingNode(XN_NODE_TYPE_DEPTH,&xnDepthGenerator);CHECK_RC(nRetVal,&"FindExistingNode(XN_NODE_TYPE_DEPTH)");//&initialize&image&generatornRetVal&=&xnContext.FindExistingNode(XN_NODE_TYPE_IMAGE,&xnImgeGenertor);CHECK_RC(nRetVal,&"FindExistingNode(XN_NODE_TYPE_IMAGE)");return&0;}void&average(vector&Mat1s&&&frames,&Mat1s&&mean)&{Mat1d&acc(mean.size());Mat1d&frame(mean.size());for&(unsigned&int&i=0;&i&frames.size();&i++)&{frames[i].convertTo(frame,&CV_64FC1);acc&=&acc&+&}acc&=&acc&/&frames.size();acc.convertTo(mean,&CV_16SC1);}int&main()&{const&unsigned&int&nBackgroundTrain&=&30;const&unsigned&short&touchDepthMin&=&10;const&unsigned&short&touchDepthMax&=&20;const&unsigned&int&touchMinArea&=&50;const&bool&localClientMode&=&&//&connect&to&a&local&clientconst&double&debugFrameMaxDepth&=&4000;&//&maximal&distance&(in&millimeters)&for&8&bit&debug&depth&frame&quantizationconst&char*&windowName&=&"Debug";const&Scalar&debugColor0(0,0,128);const&Scalar&debugColor1(255,0,0);const&Scalar&debugColor2(255,255,255);int&xMin&=&110;int&xMax&=&560;int&yMin&=&120;int&yMax&=&320;Mat1s&depth(480,&640);&//&16&bit&depth&(in&millimeters)&&&&&&&&//&&&&&&typedef&Mat_&short&&Mat1s;Mat1b&depth8(480,&640);&//&8&bit&depth&&&//&&&&&&typedef&Mat_&uchar&&Mat1b;//Mat3b&rgb(480,&640);&//&8&bit&depth&&&//&&&typedef&Mat_&Vec3b&&Mat3b;Mat3b&debug(480,&640);&//&debug&visualization&&&//Mat1s&foreground(640,&480);Mat1b&foreground8(640,&480);Mat1b&touch(640,&480);&//&touch&maskMat1s&background(480,&640);vector&Mat1s&&buffer(nBackgroundTrain);initOpenNI("niConfig.xml");////&TUIO&server&object//TuioServer*&//if&(localClientMode)&{//tuio&=&new&TuioServer();
//}&else&{//tuio&=&new&TuioServer("192.168.0.2",3333,false);//}//TuioTime&//&create&some&sliders/*namedWindow(windowName);createTrackbar("xMin",&windowName,&&xMin,&640);createTrackbar("xMax",&windowName,&&xMax,&640);createTrackbar("yMin",&windowName,&&yMin,&480);createTrackbar("yMax",&windowName,&&yMax,&480);*///&create&background&model&(average&depth)for&(unsigned&int&i=0;&i&nBackgroundT&i++)&{xnContext.WaitAndUpdateAll();depth.data&=&(uchar*)&xnDepthGenerator.GetDepthMap();buffer[i]&=&}average(buffer,&background);while&(&waitKey(1)&!=&27&)&{//&read&available&dataxnContext.WaitAndUpdateAll();//&update&16&bit&depth&matrixdepth.data&=&(uchar*)&xnDepthGenerator.GetDepthMap();//xnImgeGenertor.GetGrayscale8ImageMap()//&update&rgb&image//rgb.data&=&(uchar*)&xnImgeGenertor.GetRGB24ImageMap();&//&segmentation&fault&here//cvtColor(rgb,&rgb,&CV_RGB2BGR);//&extract&foreground&by&simple&subtraction&of&very&basic&background&modelforeground&=&background&-&//&find&touch&mask&by&thresholding&(points&that&are&close&to&background&=&touch&points)touch&=&(foreground&&&touchDepthMin)&&&(foreground&&&touchDepthMax);//&extract&ROIRect&roi(xMin,&yMin,&xMax&-&xMin,&yMax&-&yMin);Mat&touchRoi&=&touch(roi);//&find&touch&pointsvector&&vector&Point2i&&&&vector&Point2f&&touchPfindContours(touchRoi,&contours,&CV_RETR_LIST,&CV_CHAIN_APPROX_SIMPLE,&Point2i(xMin,&yMin));for&(unsigned&int&i=0;&i&contours.size();&i++)&{Mat&contourMat(contours[i]);//&find&touch&points&by&area&thresholdingif&(&contourArea(contourMat)&&&touchMinArea&)&{Scalar&center&=&mean(contourMat);Point2i&touchPoint(center[0],&center[1]);touchPoints.push_back(touchPoint);}}//&send&TUIO&cursorstime&=&TuioTime::getSessionTime();tuio-&initFrame(time);for&(unsigned&int&i=0;&i&touchPoints.size();&i++)&{&//&touch&pointsfloat&cursorX&=&(touchPoints[i].x&-&xMin)&/&(xMax&-&xMin);float&cursorY&=&1&-&(touchPoints[i].y&-&yMin)/(yMax&-&yMin);TuioCursor*&cursor&=&tuio-&getClosestTuioCursor(cursorX,cursorY);//&TODO&improve&tracking&(don't&move&cursors&away,&that&might&be&closer&to&another&touch&point)if&(cursor&==&NULL&||&cursor-&getTuioTime()&==&time)&{tuio-&addTuioCursor(cursorX,cursorY);}&else&{tuio-&updateTuioCursor(cursor,&cursorX,&cursorY);}}tuio-&stopUntouchedMovingCursors();tuio-&removeUntouchedStoppedCursors();tuio-&commitFrame();//&draw&debug&framedepth.convertTo(depth8,&CV_8U,&255&/&debugFrameMaxDepth);&//&render&depth&to&debug&framecvtColor(depth8,&debug,&CV_GRAY2BGR);debug.setTo(debugColor0,&touch);&&//&touch&maskrectangle(debug,&roi,&debugColor1,&2);&//&surface&boundariesfor&(unsigned&int&i=0;&i&touchPoints.size();&i++)&{&//&touch&pointscircle(debug,&touchPoints[i],&5,&debugColor2,&CV_FILLED);}//&render&debug&frame&(with&sliders)imshow(windowName,&debug);//imshow("image",&rgb);}return&0;} 我觉得应该是没人给你解释的[解决办法]注释已经写的很清楚了:
//&Description&:&recognizes&touch&points&on&arbitrary&surfaces&using&kinect//&&and&maps&them&to&TUIO&cursors//&&(turns&any&surface&into&a&touchpad)引用://============================================================================//&Name&&&&&&&&:&KinectTouch.cpp//&Author&&&&&&:&/robbeofficial//&Version&&&&&:&0.something//&Description&:&recognizes&touch&points&on&arbitrary&surfaces&using&kinect//&&and&maps&them&to&TUIO&cursors//&&(turns&any&surface&into&a&touchpad)//============================================================================*&*&1.&point&your&kinect&from&a&higher&place&down&to&your&table&*&2.&start&the&program&(keep&your&hands&off&the&table&for&the&beginning)&*&3.&use&your&table&as&a&giant&touchpad&*/#include&&iostream&#include&&vector&#include&&map&using&namespace&//&openCV#include&&opencv/highgui.h&#include&&opencv/cv.h&using&namespace&//&openNI#include&&XnOpenNI.h&#include&&XnCppWrapper.h&using&namespace&#define&CHECK_RC(rc,&what)\if&(rc&!=&XN_STATUS_OK)\{\printf("%s&failed:&%s\n",&what,&xnGetStatusString(rc));\return&\}//&TUIO#include&"TUIO/TuioServer.h"using&namespace&TUIO;//&TODO&smoothing&using&kalman&filter//---------------------------------------------------------------------------//&Globals//---------------------------------------------------------------------------//&OpenNIxn::Context&xnCxn::DepthGenerator&xnDepthGxn::ImageGenerator&xnImgeGbool&mousePressed&=&//---------------------------------------------------------------------------//&Functions//---------------------------------------------------------------------------int&initOpenNI(const&XnChar*&fname)&{XnStatus&nRetVal&=&XN_STATUS_OK;//&initialize&contextnRetVal&=&xnContext.InitFromXmlFile(fname);CHECK_RC(nRetVal,&"InitFromXmlFile");//&initialize&depth&generatornRetVal&=&xnContext.FindExistingNode(XN_NODE_TYPE_DEPTH,&xnDepthGenerator);CHECK_RC(nRetVal,&"FindExistingNode(XN_NODE_TYPE_DEPTH)");//&initialize&image&generatornRetVal&=&xnContext.FindExistingNode(XN_NODE_TYPE_IMAGE,&xnImgeGenertor);CHECK_RC(nRetVal,&"FindExistingNode(XN_NODE_TYPE_IMAGE)");return&0;}void&average(vector&Mat1s&&&frames,&Mat1s&&mean)&{Mat1d&acc(mean.size());Mat1d&frame(mean.size());for&(unsigned&int&i=0;&i&frames.size();&i++)&{frames[i].convertTo(frame,&CV_64FC1);acc&=&acc&+&}acc&=&acc&/&frames.size();acc.convertTo(mean,&CV_16SC1);}int&main()&{const&unsigned&int&nBackgroundTrain&=&30;const&unsigned&short&touchDepthMin&=&10;const&unsigned&short&touchDepthMax&=&20;const&unsigned&int&touchMinArea&=&50;const&bool&localClientMode&=&&//&connect&to&a&local&clientconst&double&debugFrameMaxDepth&=&4000;&//&maximal&distance&(in&millimeters)&for&8&bit&debug&depth&frame&quantizationconst&char*&windowName&=&"Debug";const&Scalar&debugColor0(0,0,128);const&Scalar&debugColor1(255,0,0);const&Scalar&debugColor2(255,255,255);int&xMin&=&110;int&xMax&=&560;int&yMin&=&120;int&yMax&=&320;Mat1s&depth(480,&640);&//&16&bit&depth&(in&millimeters)&&&&&&&&//&&&&&&typedef&Mat_&short&&Mat1s;Mat1b&depth8(480,&640);&//&8&bit&depth&&&//&&&&&&typedef&Mat_&uchar&&Mat1b;//Mat3b&rgb(480,&640);&//&8&bit&depth&&&//&&&typedef&Mat_&Vec3b&&Mat3b;Mat3b&debug(480,&640);&//&debug&visualization&&&//Mat1s&foreground(640,&480);Mat1b&foreground8(640,&480);
Mat1b&touch(640,&480);&//&touch&maskMat1s&background(480,&640);vector&Mat1s&&buffer(nBackgroundTrain);initOpenNI("niConfig.xml");////&TUIO&server&object//TuioServer*&//if&(localClientMode)&{//tuio&=&new&TuioServer();//}&else&{//tuio&=&new&TuioServer("192.168.0.2",3333,false);//}//TuioTime&//&create&some&sliders/*namedWindow(windowName);createTrackbar("xMin",&windowName,&&xMin,&640);createTrackbar("xMax",&windowName,&&xMax,&640);createTrackbar("yMin",&windowName,&&yMin,&480);createTrackbar("yMax",&windowName,&&yMax,&480);*///&create&background&model&(average&depth)for&(unsigned&int&i=0;&i&nBackgroundT&i++)&{xnContext.WaitAndUpdateAll();depth.data&=&(uchar*)&xnDepthGenerator.GetDepthMap();buffer[i]&=&}average(buffer,&background);while&(&waitKey(1)&!=&27&)&{//&read&available&dataxnContext.WaitAndUpdateAll();//&update&16&bit&depth&matrixdepth.data&=&(uchar*)&xnDepthGenerator.GetDepthMap();//xnImgeGenertor.GetGrayscale8ImageMap()//&update&rgb&image//rgb.data&=&(uchar*)&xnImgeGenertor.GetRGB24ImageMap();&//&segmentation&fault&here//cvtColor(rgb,&rgb,&CV_RGB2BGR);//&extract&foreground&by&simple&subtraction&of&very&basic&background&modelforeground&=&background&-&//&find&touch&mask&by&thresholding&(points&that&are&close&to&background&=&touch&points)touch&=&(foreground&&&touchDepthMin)&&&(foreground&&&touchDepthMax);//&extract&ROIRect&roi(xMin,&yMin,&xMax&-&xMin,&yMax&-&yMin);Mat&touchRoi&=&touch(roi);//&find&touch&pointsvector&&vector&Point2i&&&&vector&Point2f&&touchPfindContours(touchRoi,&contours,&CV_RETR_LIST,&CV_CHAIN_APPROX_SIMPLE,&Point2i(xMin,&yMin));for&(unsigned&int&i=0;&i&contours.size();&i++)&{Mat&contourMat(contours[i]);//&find&touch&points&by&area&thresholdingif&(&contourArea(contourMat)&&&touchMinArea&)&{Scalar&center&=&mean(contourMat);Point2i&touchPoint(center[0],&center[1]);touchPoints.push_back(touchPoint);}}//&send&TUIO&cursorstime&=&TuioTime::getSessionTime();tuio-&initFrame(time);for&(unsigned&int&i=0;&i&touchPoints.size();&i++)&{&//&touch&pointsfloat&cursorX&=&(touchPoints[i].x&-&xMin)&/&(xMax&-&xMin);float&cursorY&=&1&-&(touchPoints[i].y&-&yMin)/(yMax&-&yMin);TuioCursor*&cursor&=&tuio-&getClosestTuioCursor(cursorX,cursorY);//&TODO&improve&tracking&(don't&move&cursors&away,&that&might&be&closer&to&another&touch&point)if&(cursor&==&NULL&[解决办法]&cursor-&getTuioTime()&==&time)&{tuio-&addTuioCursor(cursorX,cursorY);}&else&{tuio-&updateTuioCursor(cursor,&cursorX,&cursorY);}}tuio-&stopUntouchedMovingCursors();tuio-&removeUntouchedStoppedCursors();tuio-&commitFrame();//&draw&debug&framedepth.convertTo(depth8,&CV_8U,&255&/&debugFrameMaxDepth);&//&render&depth&to&debug&framecvtColor(depth8,&debug,&CV_GRAY2BGR);debug.setTo(debugColor0,&touch);&&//&touch&maskrectangle(debug,&roi,&debugColor1,&2);&//&surface&boundariesfor&(unsigned&int&i=0;&i&touchPoints.size();&i++)&{&//&touch&pointscircle(debug,&touchPoints[i],&5,&debugColor2,&CV_FILLED);}//&render&debug&frame&(with&sliders)imshow(windowName,&debug);//imshow("image",&rgb);}return&0;}[解决办法]recognizes&touch&points&on&arbitrary&surfaces&using&kinect&&and&maps&them&to&TUIO&cursors&&(turns&any&surface&into&a&touchpad)}

我要回帖

更多关于 足三里痛是怎么回事 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信