自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 ubuntu ifconfig 地址127.0.0.1的解决方法

某一天早晨,重启ubuntu,输入ifconfig查看ip,发现只返回127.0.01.查了资料,需要输入以下dhclient命令 – 动态获取或释放IP地址。再次输入ifconfig,即可得到当前ip地址。

2023-09-09 15:01:52 307

原创 关于无法从github上clone项目到本地问题

error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054error: 36 bytes of body are still expectedfetch-pack: unexpected disconnect while reading sideband packetfatal: early EOFfatal: fetch-pack: invalid index-pack output

2022-09-21 21:36:22 962

转载 获取元素CSS值之getComputedStyle方法熟悉

获取元素CSS值之getComputedStyle方法熟悉by zhangxinxu from http://www.zhangxinxu.com转载自张鑫旭-鑫空间-鑫生活[http://www.zhangxinxu.com]原文地址:http://www.zhangxinxu.com/wordpress/?p=2378一、碎碎念~前言我们都用过jQuery的

2015-11-08 17:07:45 1788

原创 给Array本地对象增加一个原型方法,他的用途是删除数组中重复的条目,并将新的数组返回

Array.prototype.delSameValue=function(){var newarray=new Array;for(var i=0,len=this.length;ivar isRepeat=true;for(var j=0;jthis[j] === this[i] && (isRepeat = false); }isRepeat && new

2015-10-20 23:48:54 772

原创 重载运算符“<<”和“>>”,使其能够输入一件商品的信息和输出这件商品的信息。商品的信息由编号、商品名和价格。

#include#includeclass Merchandise{public: Merchandise(char *,int ,double ); Merchandise(){}; ~Merchandise(){}; friend istream &operator>>(istream& in,Merchandise& s); friend ostream &ope

2013-12-18 20:12:30 2323

原创 编写一个程序,求输入数的平方根。设置异常处理,对输入负数的情况给出提示

#include#includeusing namespace std;class SQRT{private: int num;public: double r; SQRT(int i){ num=i; r=(int)sqrt(i);} int getNum(){return num;} void Show(); void In();};void SQRT::

2013-12-18 20:03:57 9137

原创 对数组进行排序、求最大值和求元素和的算法都编写为函数模板,采用相关数据进行测试

#includeusing namespace std;templatevoid sort(T * a,int n){ for(int i=0;i<n;i++){ int p=i; for(int j=i;j<n;j++) if(a[p]<a[j]) p=j; int t=a[i]; a[i]=a[p]; a[p]=t; }}templatevoid display

2013-12-18 19:56:46 2054

原创 设计一个日期类Date,,要求: (1)包含年(year)、月(month)和日(day)私有数据成员。 (2)包含构造函数,重载关于一日期加上天数的加法运算符+、重载关于一日期减去天数的减加运算符-

#includeclass Date{private: double year,month,day;public: Date(double y=0,double m=0,double d=0):year(y),month(m),day(d){}; Date operator+(Date b); //重载运算符+ Date operator

2013-12-18 19:41:43 22179 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除