- 博客(174)
- 收藏
- 关注
原创 axios向后台传递数组作为参数
axios 的post方法向后台传递参数时的代码:var params = new URLSearchParams();params.append('faultNum',this..fault_num); params.append('far',this.far);this.$Axios.post("/test",params) .then(res => { }).cat...
2018-03-30 08:54:49
31346
原创 去除div的滚动条但是依然可以滚动的方法
1、针对谷歌浏览器,css支持#tabl::-webkit-scrollbar {display: none};但是这在火狐浏览器内根本不起任何作用,百度了很多复杂的方法,终于在一个大佬的博客里发现了一个很棒,又简单又实用的方法,在这里整理一下,以便帮助到更多的人。2、在原有的 div外部套一层div,样式内写overflow:hidden; 使这个外部的div宽度小于内部出滚动条的div
2018-01-11 14:59:44
9004
3
原创 解决 vue.js在火狐浏览器报错 "event is not defined" 的问题
在这个vue文件中,我需要用到event事件,但是,这样子写在谷歌浏览器是正常运行的,但在火狐浏览器下却报错为什么会出现这样的错误呢?经过搜索发现,火狐浏览器与谷歌浏览器不同,在firefox中使用了不同的的事件对象模型,用的是W3C Dom,firefox中并无event所以要不将event改为window.event。因为这样依然报错,不起任何作用,那么,在vue文件中应该怎样解决
2018-01-11 10:46:45
10261
原创 字符串匹配问题
问题描述: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all vali
2017-10-26 16:38:55
413
原创 echarts柱状图颜色渐变
series : [ { name:'数量', type:'bar', barWidth: 20, data:[200, 152, 100], itemStyle: { norma
2017-08-31 14:59:52
15513
2
原创 javascript数组去重问题
“` 数组去重 var arr=["1","2","1","3","3","2","2","2","2","2","你好","你好"]; var x=[]; var a={};//i=0,arr.length=10//1.arr[i]=1;a[arr[i]]=a[1],a[1]不存在,=undfined进入if语句内,a{1:true
2017-07-20 15:28:42
315
原创 解读vue生成的文件目录结构
利用node和npm环境我们可以很快的搭建一个vue环境。具体步骤,请看上一篇博客。搭建完成后,我们可以看到生成的文件夹中包括如下文件: 1、build文件夹是保存一些webpack的初始化配置。config文件夹保存一些项目初始化的配置。 2、node_modules是npm加载的项目依赖的模块。 3、src目录是我们要开发的目录,打开是这样的:
2017-07-11 17:08:20
22876
原创 css3字体流光渐变效果
<!DOCTYPE html><html><head> <title>字体</title> <meta charset="utf-8"> <style> .text{ width: 300px; height: 200px; background-image: -webkit-line
2017-07-07 17:37:10
3141
原创 css3 线性渐变和径向渐变
在网页中,经常会用的背景渐变的效果。以前都是用背景图片去实现。但是css3很好的实现了这一效果。 渐变分为线性渐变和径向渐变两种。线性渐变又分为从上到下渐变,从左到右渐变,对角线渐变。 1、从上到下线性渐变 background: linear-gradient(red, blue); 实现效果: 需要注意的是ie9及以前的版本不支持渐变。在这里。我们为了兼容其他的浏览器,需要这样写:ba
2017-07-07 13:04:55
571
原创 利用css清除浮动的方法
在网页搭建过程中,浮动是布局中必不可少的。但是当子元素浮动后,其父级元素就会出现高度不够的情况。这时候,我们需要去清除浮动。下面,我就总结了一些清除浮动的方法。 1、添加一个空的div,给这个空的div设置css属性即:clear:both。这样的方法浏览器兼容比较好,而且比较简单。但是这样做页面中就会出现很多空的div。 2、在包含浮动元素的父元素上增加类。然后在公共样式的css文件中给此类设
2017-07-07 10:30:47
295
原创 利用css的border样式制作图形
在今天之前,我对css的border属性的认知,只停留在border:5px solid red;但是今天发现border并不是一条直线或者矩形。所以跟大家分享下
2017-07-07 09:59:40
555
原创 highcharts制作平面饼图的代码详解
Highcharts是一个用javascript编写的一个图表库,与echarts有诸多相同和不同之处。在此,不一一介绍echarts与highcharts的异同。今天,用highcharts制作了一个基础饼图。虽然官方有代码示例。但是我还是认为,不光要实现效果,还要深入研究,知道每个标签的含义可以提升我们写代码的速度和水平。
2017-07-04 10:25:47
1224
原创 css背景图像问题(background-size)
在网页制作过程中,我们经常会给网页设置背景图片以达到比较美观的效果。我们都知道,背景图片的设置是:background:url(img_flwr.gif);实现的,但是怎样设置背景图片的大小使之符合我们的要求呢?这就用到了我们今天要介绍的background-size属性。
2017-06-12 08:38:57
1286
原创 echarts饼图中间如何放字
在项目需求中,会有在饼图中间加入字体描述的需求。其实仔细查看官方手册会发现,饼图中心不仅可以加字体描述,还可以加入图片,扇形,圆弧,折线等等来达到需求,满足视觉效果。今天,我们就来看一下,如何在饼图中心加上字体描述。代码如下: graphic 是原生图形元素组件。 type指定了想要加入元素的类型。 left和top指定了元素的位置。 实现效果如图所示:
2017-05-24 09:37:58
33628
1
原创 highcharts 制作3D立体饼图
由于公司项目的需求,需要做一个立体的饼图来展示数据,但是翻了很久Echarts的手册,始终找不到解决的方法。于是开始接触了highcharts.发现highcharts可以很轻松的制作一个立体的饼图。而且视觉效果很棒。所以,写下这篇博客,希望可以帮助到同样有3D立体饼图需求的人。draw:function (data) { $("."+this.install.sty).highc
2017-05-24 09:16:35
9221
原创 Echarts柱状图的每个柱子显示不同颜色问题
在使用Echarts制作柱状图的时候,通常在横轴每个标签只有一个柱子的时候,每个柱子的颜色都是一样的,如下图所示: 然而,很多时候我们为了使界面更加美观,通常会有使每个柱子颜色都不相同的需求。那么这时候,我们需要在itemStyle的normal状态下,首先根据柱子的数量设置一个颜色的数组。然后柱子会设定颜色。如果颜色数组少于柱子的数量,则柱子会循环使用设定的颜色。 代码如下: itemS
2017-05-19 10:15:48
29211
原创 vue使用stylus报错解决方法
在项目中的.vue文件中,如果想使用stylus即:如:<style lang="stylus" ><style> 常常会报错如下: 此时不仅仅需要npm install stylus-loader.还需要npm install stylus 。然后在packge.json文件中写入 此时,stylus文件就可用了,项目就可以正常运行了。
2017-04-27 16:11:53
7448
2
原创 vue-cli使用方法
vue-cli使用方法: 1、npm install –g vue-cli //install vue-cli 安装依赖包 2、 使用vue-cli初始化项目 vue init webpack my-project 3 、进入项目目录 cd my-project 4、在项目中安装依赖包 npm install 5、 运行项目 npm run dev 到此为止,一个
2017-04-27 15:57:01
781
原创 OOP版电子词典
#include #include #include using namespace std;class Word{private: string english; string chinese; string word_class;public: void getword(string e,string c,string w) {
2014-07-28 13:18:13
785
原创 oj n
#include #include using namespace std;class Product{ public: Product() {} Product(int m,int q,float p):num(m),quantity(q),price(p){} void total(); static float average(); s
2014-07-26 11:52:18
853
原创 OJ k
#include using namespace std;class Score{public: void get(); bool pass(); int av(); int getnum() { return studnum; } int getchinese() { return Chine
2014-07-26 11:45:27
847
原创 矩形类中的运算符重载
#include #include using namespace std;class Rectangle{public: Rectangle() {} Rectangle(double xx1,double yy1,double xx2,double yy2):x1(xx1),y1(yy1),x2(xx2),y2(yy2) {} void input()
2014-07-25 20:13:18
936
原创 C++练习
#include #include using namespace std;class BirthDate{public: BirthDate(int,int,int); void display(); void setbirthday(int,int,int);private: int year; int month; int day;
2014-07-25 20:05:46
681
原创 OJ J
#include using namespace std;class Q{public: void set_value(); double get_Max();private: int n; int a[100];};void Q::set_value(){ cin>>n; int i; for(i=0;i<n;i++)
2014-07-23 22:32:02
812
原创 职员有薪水了
#include #include using namespace std;class CPerson{protected: char *m_szName; char *m_szId; int m_nSex;//0:women,1:man int m_nAge;public: CPerson(char *name,char * id,int se
2014-07-23 22:23:34
648
原创 逆序输出
/**烟台大学计算机学院学生*All right reserved.*文件名称:逆序输出*作者:孙玲倩*完成日期:2014年7月22日*版本号:v1.0*对任务及求解方法的描述部分:*我的程序:*/#include using namespace std;int main(){ cout << "Hello world!" << endl; retur
2014-07-22 20:11:52
659
原创 OJ 练习 W
#include #include using namespace std;class Student{public: Student(){} Student(int n,string na,char s,float sc):num(n),name(na),sex(s),score(sc){} void display() { cout<<
2014-07-20 22:05:53
709
原创 比较大小-类模板
#include #include using namespace std;templateclass Compare{public: Compare(numtype a,numtype b); numtype max(); numtype min();private: numtype x,y;};templateCompare::C
2014-07-20 21:59:08
983
原创 复数类重载运算符3+
#include #include using namespace std;class Complex{public: Complex(); Complex(double r); Complex(double r,double i); operator double(); void display();private: double re
2014-07-19 21:58:18
717
原创 输入输出公共继承
#include using namespace std;class Student{public: void get_value() { cin>>num>>name>>sex; } void display( ) { cout<<"num: "<<num<<endl; cout<<"name: "<
2014-07-19 21:52:54
677
原创 OJ结构体之统计最高最低分
/**烟台大学计算机学院学生*All right reserved.*文件名称:OJ结构体之统计最高最低分。*作者:孙玲倩*完成日期:2014年7月18日*版本号:v1.0*对任务及求解方法的描述部分:*我的程序:*/#include#includeusing namespace std;struct Student{ string name; dou
2014-07-18 22:43:24
928
原创 OJ E多重继承
/*烟台大学计算机学院学生*All right reserved.*文件名称:OJ E多重继承*作者:孙玲倩*完成日期:2014年7月18日*版本号:v1.0*对任务及求解方法的描述部分:*我的程序:*/#include #includeusing namespace std;class Teacher{ public: Teacher(string n
2014-07-18 22:38:20
697
原创 使用对象数组和指针
/*烟台大学计算机学院学生*All right reserved.*文件名称:使用对象数组和指针*作者:孙玲倩*完成日期:2014年7月17日*版本号:v1.0*对任务及求解方法的描述部分:建立一个对象数组,内放5个学生的数据求5个学生中成绩最高者*我的程序:*/#includeusing namespace std;class Student{ public:
2014-07-17 22:22:35
685
原创 C++练习
/*烟台大学计算机学院学生*All right reserved.*文件名称:*作者:孙玲倩*完成日期:2014年7月17日*版本号:v1.0*对任务及求解方法的描述部分:有10个学生,每个学生的数据包括学号 姓名三门课的成绩,输出3门课平均成绩及最高分学生数据 。*我的程序:*/#include #includeusing namespace std;const int
2014-07-17 22:15:09
674
原创 OJ D
#includeusing namespace std;class Student{ public: void get_value() { cin>>num>>name>>sex; } void display() { cout<<"num="<<num<<endl; cout<<"name="
2014-07-16 21:35:30
672
原创 OJ C
#include#includeusing namespace std;class Complex{ public: Complex():real(0),imag(0){} Complex(double r,double i):real(r),imag(i){} Complex operator+(Complex &); Complex operat
2014-07-16 21:33:38
693
原创 OJ B
/*烟台大学计算机学院学生*All right reserved.*文件名称:OJ b C++继承*作者:孙玲倩*完成日期:2014年7月15日*版本号:v1.0*对任务及求解方法的描述部分:*我的程序:*/#include using namespace std;class A{ protected: int a,b; public: A(
2014-07-15 21:49:30
768
原创 OJ A
/*烟台大学计算机学院学生*All right reserved.*文件名称:OJ A 长方形继承自矩形*作者:孙玲倩*完成日期:2014年7月15日*版本号:v1.0*对任务及求解方法的描述部分:*我的程序:*/#includeusing namespace std;class Rectangle{ private: int length; int
2014-07-15 21:45:35
651
原创 第十五周项目二用文件保存学生名单
/*烟台大学计算机学院学生*All right reserved.*文件名称:用文件保存学生名单*作者:孙玲倩*完成日期:2014年6月7日*版本号:v1.0*对任务及求解方法的描述部分:用文件保存学生名单*我的程序:*/#include #include #include using namespace std;//定义学生类class Student{public
2014-06-08 19:09:40
667
原创 第15周项目一(2)工资数据的输入
/**Copyright (c)2013,烟台大学计算机学院*All rights reserved.*文件名称:test.cpp*作者:孙玲倩*完成日期:2014年6月2日*版本号:v1.0*问题描述:*问题分析:*/a#include #include #include using namespace
2014-06-03 14:55:04
837
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人