遮罩层的弊端(解决不了,求大神)

遮罩层里面的日期如何固定???

开发工具与关键技术: css、js
作者:邱慧敏
撰写时间:2019.01.18

  1. 要制作遮罩层先要给外层设置绝对定位和相对定位
    不然会混乱,(绝对定位和相对定位在HTML中有一定的重要作用)
    在这里插入图片描述

在这里插入图片描述

  1. 遮罩层里面的日期 和跟着鼠标的滚动而滚动???
    正常情况下
    在这里插入图片描述

但实际情况 却却却 这样??? 日期用了插件

在这里插入图片描述

代码

在这里插入图片描述

大神帮助检查错误,小白解决不了了,,,

09-07

我按照书上的程序敲了一个图轮廓线的设计的程序,但是书上给的是一段升程的,我设计的是三段,如下图滚子位移曲线所示。[img=http://img.bbs.csdn.net/upload/201709/07/1504779160_909235.jpg][/img]我对书上程序有一些改动,为了能够运行也改了很多地方。我使用的是VS2017,一些所需库什么的百度也都安了,但是程序运行后却不能得到正常图像,我对C语言的了解几乎为零,求各位帮助,谢谢啦下面是效果图,类似[img=http://img.bbs.csdn.net/upload/201709/07/1504779350_753325.jpg][/img][img=http://img.bbs.csdn.net/upload/201709/07/1504779370_479852.jpg][/img]rn[code=c]  /*REM Design of disk cam profile */rn#includern#includern#includern#includern#include rn#define PI 3.1415926rnvoid sds();rnvoid sdjdj();rnvoid scos();rnvoid ssin();rnvoid zbz(int);rnvoid hds();rnvoid hdjdj();rnvoid hcos();rnvoid hsin();rnvoid dral();rnvoid htl();rnfloat s[360], v[360], a[360], x[360], z[360], x1[360], z1[360];rnfloat r0, e, rr, h, d, d0, ds, d02, ds2, d03, ds3, d01, ds1, pi, p, s0, d1, d2, sn, hn, i, d3, d4, d5;rnfloat maxs, maxv, maxa, yy, ip, d0p, sd, cd, dss, dx, dy, q, ss;rnvoid ingraph();rnvoid ingraph()rnrn int gd = 0, gm, ErrorCode;rn initgraph(&gd, &gm, "");rn ErrorCode = 0;rn if (ErrorCode != 0)rn rn printf("Crahpics System Error:%s\n", "ErrorCode");rn exit(1);rn rn setbkcolor(0);rnrnint SNG(float va)rnrn if (va > 0)return 1;rn if (va == 0)return 0;rn if (va < 0)return -1;rnrnmain()rnrn maxs = 0;maxv = 0;maxa = 0;rn p = PI / 180;rn printf("Design of disk cam profile\n");rn printf("---------------------\n");rn printf("input r0=");scanf("%f", &r0);rn printf("input rr=");scanf("%f", &rr);rn printf("input e= ");scanf("%f", &e);rn printf("input h= ");scanf("%f", &h);rn printf("rise motion law sn=");scanf("%f", &sn);rn printf("input d0=");scanf("%f", &d0);rn printf("input ds=");scanf("%f", &ds);rn printf("input d01=");scanf("%f", &d01);rn printf("input ds1=");scanf("%f", &ds1);rn printf("input d02=");scanf("%f", &d02);rn printf("input ds2=");scanf("%f", &ds2);rn printf("return motion law hn=");scanf("%f", &hn);rn printf("input d03=");scanf("%f", &d03);rn printf("input ds3=");scanf("%f", &ds3);rn s0 = sqrt(r0*r0 - e*e);rn for (i = 0;i <= d0;i++)rn rn int sn = 0;rn switch (sn)rn rn case 1:rn sds();break;rn case 2:rn sdjdj();break;rn case 3:rn scos();break;rn default:rn ssin();break;rn rn zbz(i);rn rn d1 = d0 + ds;rn for (i = d0 + 1;i <= d1;i++)rn rn int i=0;rn s[i] = h;v[i] = 0;a[i] = 0;rn zbz(i);rn rn d2 = d1 + d01 + ds1;rn for (i = d1 + 1;i <= d2;i++)rn rn int i=0;rn s[i] = h+2;v[i]= 0;a[i] = 0;rn zbz(i);rn rn d3 = d2 + d02 + ds2;rn for (i = d2 + 1;i <= d3;i++)rn rn int i=0;rn s[i] = h+4;v[i] = 0;a[i] = 0;rn zbz(i);rn rn d4 = d3 + d03;rn for (i = d3 + 1;i <= d4;i++)rn rn int hn=0;rn switch (hn)rn rn case 1:rn hds();break;rn case 2:rn hdjdj();break;rn case 3:rn hcos();break;rn case 4:rn hsin();break;rn rn zbz(i);rn rn d5 = d4 + ds3;rn for (i = d4 + 1;i <= d5;i++)rn rn int i=0;rn s[i] = 0;v[i] = 0;a[i] = 0;rn zbz(i);rn rn printf("Coodinate of disk cam profile and motion law\n");rn printf("-------------------------------------\n");rn printf(" i\t x\t z\t\t x1\t z1\t s\t v\t a\n");rn for(i=0;i<=360;i=i+30)rn rn int i=0;rn printf("%7.2f %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f\n", rn i, x[i], z[i], x1[i], z1[i], s[i], v[i], a[i]);rn if (fabs(s[i]) > maxs) maxs = fabs(s[i]);rn if (fabs(v[i]) > maxv) maxv = fabs(v[i]);rn if (fabs(a[i]) > maxa) maxa = fabs(a[i]);rn rn _getch();rn ingraph();rn dral();rn _getch();rn closegraph();rn ingraph();rn htl();rn _getch();rn closegraph();rnrnvoid dral()rnrn int i;rn printf(" s");rn printf("\t\tmaxs(mm) =%f\n", maxs);rn printf(" v");rn printf("\t\tmaxv(m) =%f\n,maxv/1000");rn printf(" a");rn printf("\t\tmaxa(m) =%f\n,maxa/1000");rn printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\tdlt\n\n");rn printf(" 0 90 180 ");rn printf(" 270 360\n");rn line(0, 240, 380, 240);rn line(380, 240, 373, 235);rn line(380, 240, 373, 245);rn line(10, 480, 10, 0);rn line(10, 0, 5, 7);line(10, 0, 15, 7);rn putpixel(10, 240 - s[1], 3);rn moveto(10, 240 - s[1]);rn setcolor(YELLOW);rn line(35, 10, 15, 10);rn for (i = 0;i <= 360;i++)rn lineto(i + 10, 240 - s[i] * maxs*0.4);rn putpixel(10, 240 - v[1], 4);rn moveto(10, 240 - v[1]);rn setcolor(RED);rn line(35, 25, 45, 25);rn for (i = 0;i <= 360;i++)rn lineto(i + 10, 240 - v[i] * maxv*0.4);rn putpixel(10, 240 - a[1], 14);rn moveto(10, 240 - a[1]);rn setcolor(BLUE);rn line(35, 40, 45, 40);rn for (i = 0;i <= 360;i++)rn lineto(i + 10, 240 - a[i] * maxa*0.2);rnrnvoid hcos()rnrn int i=0;rn s[i] = 0.5*(h+4)*(1 + cos(PI*(i - d3) / d03));rn v[i] = -0.5*(h+4)*PI*sin(PI*(i - d3) / d03) / (d03*p);rn a[i] = -0.5*(h+4)*PI*PI*cos(PI*(i - d3) / d03) / ((d03*p)*(d03*p));rnrnvoid hdjdj()rnrn int i = 0;rn if (i <= (d3 + d03 / 2))rn rn s[i] = (h + 4)*(1 - 2 * ((i - d3) / d03)*((i - d3) / d03));rn v[i] = -4 * (h + 4)*(i - d3)*p / ((d03*p)*(d03*p));rn a[i] = -4 * (h + 4) / ((d03*p)*(d03*p));rn rn elsern rn s[i] = 2 * (h + 4)*(d03 + d3 - i)*(d03 + d3 - i) / (d03*d03);rn v[i] = -4 * (h + 4)*(d03 + d3 - i)*p / ((d03*p)*(d03*p));rn a[i] = 4 * (h + 4) / ((d03*p)*(d03*p));rn rnrn void hds() rn rn int i=0;rn s[i] = (h + 4)*(1 - (i - d3) / d03);rn v[i] = -(h + 4) / (d03*p);rn a[i] = 0;rn rn void hsin()rn rn int i=0;rn s[i] = (h + 4)*(1 - (i - d3) / d03 + sin(2 * PI*(i - d3) / d03) / (2 * PI));rn v[i] = -(h + 4)*(1 - cos(2 * PI*(i - d3) / d03)) / (d03*p);rn a[i] = -2 * PI*(h + 4)*sin(2 * PI*(i - d3) / d03) / ((d03*p)*(d03*p));rn rn void htl()rn rn line(0, 240, 640, 240);rn line(640, 240, 633, 245);rn line(640, 240, 633, 235);rn line(320, 20, 320, 460);rn line(320, 20, 325, 27);rn line(320, 20, 315, 27);rn circle(320, 240, r0);rn circle(320, 240, 5);rn line(305, 255, 316, 244);rn line(335, 255, 324, 244);rn line(303, 255, 337, 255);rn line(305, 255, 298, 263);rn line(315, 255, 308, 263);rn line(325, 255, 318, 263);rn line(335, 255, 328, 263);rn circle(320, 240, e);rn putpixel(320 + e, 240, 3);rn int yy = 0;rn moveto(320 + e, 240);rn while (yy<240)rn rn line(320 + e, -yy + 240, 320 + e, -yy + 225);rn moveto(320 + e, -yy + 225);rn yy = yy + 20;rn if (yy>r0) lineto(320 + e, -yy + 240);rn rn line(e + 315, 40, e + 315, 90);rn line(e + 325, 40, e + 325, 90);rn line(e + 315, 50, e + 307, 60);rn line(e + 315, 60, e + 307, 70);rn line(e + 315, 70, e + 307, 80);rn line(e + 315, 80, e + 307, 90);rn line(e + 333, 40, e + 325, 50);rn line(e + 333, 50, e + 325, 60);rn line(e + 333, 60, e + 325, 70);rn line(e + 333, 70, e + 325, 80);rn putpixel(320 + x[1], 240 - z[1], 3);rn moveto(x[1] + 320, -z[1] + 240);rn for (i = 0;i<360;i++)rn rn int i=0;rn lineto(x[i] + 320, -z[i] + 240);rn circle(x[i] + 320, -z[i] + 240, rr);rn moveto(x[i] + 320, 240 - z[i]);rn int i;rn putpixel(x1[1] + 320, -z1[1] + 240, 3);rn moveto(x1[1] + 320, -z1[1] + 240);rn for (i = 0;i <= 360; i++)rn lineto(x1[i] + 320, -z1[i] + 240);rn rn void scos()rn rn int i=0;rn s[i] = 0.5*h*(1 - cos(PI*i / d0));rn v[i] = 0.5*h*PI*sin(PI*i / d0) / (d0*p);rn a[i] = 0.5*h*PI*PI*cos(PI*i / d0) / ((d0*p)*(d0*p));rn rn void sdjdj()rn rn int ip, d0p;rn ip = i*p;d0p = d0*p;rn if (i <= d0 / 2)rn rn int i=0;rn s[i] = 2 * h*(i / d0)*(i / d0);rn v[i] = 4 * h*ip / (d0p*d0p);rn a[i] = 4 * h / (d0p*d0p);rn rn elsern rn int i=0;rn s[i] = h - 2 * h*((d0 - i) / d0)*((d0 - i) / d0);rn v[i] = 4 * h*(d0 - i)*p / (d0p*d0p);rn a[i] = -4 * h / (d0p*d0p);rn rn rn void sds()rn rn int i=0;rn s[i] = h*i / d0;rn v[i] = h / (d0*p);rn a[i] = 0;rn rn void ssin()rn rn int i=0;rn s[i] = h*(i / d0 - sin(2 * PI*i / d0) / (2 * PI));rn v[i] = h*(1 - cos(2 * PI*i / d0)) / (d0*p);rn a[i] = 2 * PI*h*sin(2 * PI*i / d0) / ((d0*p)*(d0*p));rn rn void zbz(int j)rn rn ss = s0 + s[j];d = j*p;rn sd = sin(d);cd = cos(d);rn x[j] = ss*sd + e*cd;rn z[j] = ss*cd - e*sd;rn dss = v[j] - e;rn dx = dss*sd + ss*cd;rn dy = dss*cd - ss*sd;rn if (fabs(dy)>1E-10)rn rn q = atan(dx / (-dy));rn q = q - (SNG(-dy) - 1)*PI / 2;rn rn elsern rn q = PI / 2;rn q = q - (SNG(-dy) - 1)*PI / 2;rn rn x1[j] = x[j] - rr*cos(q);rn z1[j] = z[j] - rr*sin(q);rn rn[/code] 论坛

我要疯了,简单问题解决不了,求大神

10-16

android代码[code=java]private class ClickListener implements View.OnClickListenerrn @Overridern public void onClick(View v) rn useridedit = (EditText)findViewById(R.id.userid);rn passedit = (EditText)findViewById(R.id.pass);rn String userid = useridedit.getText().toString();rn String pass = passedit.getText().toString();rn String urlstr = "http://172.18.112.151:8080/chatserver/CheckLogin?userid="+userid+"&pass="+pass;rn try rn URL url = new URL(urlstr);rn HttpURLConnection conn = (HttpURLConnection)url.openConnection();rn Log.i("v", urlstr);rn Toast.makeText(getApplicationContext(), userid+"", 1).show();rn catch (MalformedURLException e) rn e.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn rn /*if(!userid.equals("") && !pass.equals(""))rn if(v.getId()==login.getId())rn if(new CheckLogin().check(userid, pass))rn rn elsern Toast.makeText(getApplicationContext(), R.string.loginerror, Toast.LENGTH_SHORT).show();rn rn else if(v.getId()==cancel.getId())rn MainActivity.this.finish();rn rn elsern Toast.makeText(getApplicationContext(), R.string.loginvalid, Toast.LENGTH_SHORT).show();rn */rn [/code]rnservlet代码:[code=java]public void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn System.out.println("init");rn String userid = request.getParameter("userid");rn String pass = request.getParameter("pass");rn System.out.println(userid+" "+pass);rn rn[/code]rn问题:为嘛我的servlet里面的System.out.println(userid+" "+pass);什么也没油打印 论坛

初学咋练 解决不了大神

03-26

using System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Text;rnusing System.Data;rnrnusing ESRI.ArcGIS.Geometry;rnusing ESRI.ArcGIS.Geodatabase;rnusing ESRI.ArcGIS.DataSourcesFile;rnusing ESRI.ArcGIS.Carto;rnusing ESRI.ArcGIS.ArcMap;rnrnrnnamespace MapControlApplication3rnrn rn class DataOperatorrn rn //保存当前地图对象。rn public IMap m_map;rnrn //用于传入当前地图对象。rn public DataOperator(IMap map)rn rn m_map = map;rn rn public ILayer GetLayerByName(String sLayerName)rn rn //判断图层名或地图对象 是否为空。若为空,函数返回空。rn if (sLayerName == "" || m_map == null)rn rn return null;rn rn //对地图对象中的所有图层进行遍历。若某一图层的名称与指定图层名相同,则返回该图层。rn for (int i = 0; i < m_map.LayerCount; i++)rn rn if (m_map.get_Layer(i).Name == sLayerName)rn rn return m_map.get_Layer(i);rn rn rn //若地图对象中的所有图层名均与指定图层名不匹配,函数返回空。rn return null;rn rn public DataTable GetContinentsNames()rn rn //获取“Continents”图层,利用IFeatureLayer接口访问,并判断是否成功。若失败,rn //函数返回空。rn ILayer layer = GetLayerByName("Continents");rn IFeatureLayer featureLayer = layer as IFeatureLayer;rn if (featureLayer == null)rn rn return null;rn rn //调用IFeatureLayer接口的Seach方法,获取要素指针(IFeatureCursor)接口对象,rn //用于在之后遍历图层中的全部要素,并判断是否成功获取第一个要素。若失败,函数返回空。rn IFeatureLayer feature;rn IFeatureCursor featureCursor = featureLayer.Search(null,false);rn feature = featureCursor.NextFeature();rn if (feature == null)rn rn return null;rn rn //新建DataTable类型对象,用于函数返回。rn DataTable dataTable = new DataTable();rnrn //新建DataColum类型对象,分别保存各个洲的序号和名称。设置完毕后,加入DataTable的列集合(Columns)中。rn DataColumn dataColumn = new DataColumn();rn dataColumn.ColumnName = "序号";rn dataColumn.DataType = System.Type.GetType("System.Int32");rn dataTable.Columns.Add(dataColumn);rnrn dataColumn = new DataColumn();rn dataColumn.ColumnName = "名称";rn dataColumn.DataType = System.Type.GetType("System.String");rn dataTable.Columns.Add(dataColumn);rnrn //对图层中的要素进行遍历。每次获取一个要素,就关联DataTable的下一个DataRow,将要素在序号和名称字段上的值赋给DataRow的对应列中。rn //在“Continents”图层属性表中,序号信息在第0个字段中,名称信息在第2个字段中。相关内容可以通过ArcMap对地图文档进行查看。rn DataRow dataRow;rn while (feature != null)rn rn dataRow = dataTable.NewRow();rn dataRow[0] = feature.get_Value(0);rn dataRow[1] = feature.get_Value(2);rn dataTable.Rows.Add(dataRow);rnrnrn feature = featureCursor.NextFeature();rn rn //返回设置好的数据表。rn return dataTable;rn rn rn rnrnrn错误 2 “ESRI.ArcGIS.Carto.IFeatureLayer”不包含“get_Value”的定义,并且找不到可接受类型为“ESRI.ArcGIS.Carto.IFeatureLayer”的第一个参数的扩展方法“get_Value”(是否缺少 using 指令或程序集引用?) D:\袁\冯瑶-201220791\MapControlApplication3\MapControlApplication3\DataOperator.cs 84 38 MapControlApplication3rn错误 3 “ESRI.ArcGIS.Carto.IFeatureLayer”不包含“get_Value”的定义,并且找不到可接受类型为“ESRI.ArcGIS.Carto.IFeatureLayer”的第一个参数的扩展方法“get_Value”(是否缺少 using 指令或程序集引用?) D:\袁\冯瑶-201220791\MapControlApplication3\MapControlApplication3\DataOperator.cs 85 38 MapControlApplication3rn错误 1 无法将类型“ESRI.ArcGIS.Geodatabase.IFeature”隐式转换为“ESRI.ArcGIS.Carto.IFeatureLayer”。存在一个显式转换(是否缺少强制转换?) D:\袁\冯瑶-201220791\MapControlApplication3\MapControlApplication3\DataOperator.cs 59 23 MapControlApplication3rn错误 4 无法将类型“ESRI.ArcGIS.Geodatabase.IFeature”隐式转换为“ESRI.ArcGIS.Carto.IFeatureLayer”。存在一个显式转换(是否缺少强制转换?) D:\袁\冯瑶-201220791\MapControlApplication3\MapControlApplication3\DataOperator.cs 89 27 MapControlApplication3rn 论坛

没有更多推荐了,返回首页