自定义博客皮肤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)
  • 问答 (1)
  • 收藏
  • 关注

原创 异常处理

throw:自己无法处理的异常抛出try:把可能抛出异常的代码括起来catch:处理异常面向对象角度:处理完异常,程序可以继续执行,并使得所有的异常可以集中处理异常的栈展开:即就是栈上的子函数有异常抛出时,先在子函数中找是否有相应的catch,如果没有,就逐层往下找,直到找到主函数也没有相应的catch话,那么异常将会被抛给系统,系统会调用terminate函数的abort函数,终止程序。如果找到c

2016-07-11 22:16:29 338

原创 MYSQL运算符

MYSQL运算符算术运算符 1.除法运算和求余运算中,x2不能为0或者NULL,否则运算结果为空。在进行算术运算时,应注x2参数值的合法性。 eg: 比较运算符(看是否符合条件) 1.运算符‘=’ 用来判断数字,字符串,表达式等是否相等,相等返回1,不相等返回0,不能用与对NULL值的判断。 当用来判断两个字符时,是根据字符的ascll码。 eg:

2016-07-09 18:20:07 797

原创 MYSQL----对表中数据进行插入,更新,删除

插入数据 1.为表的所有字段插入数据1)不指定具体字段名insert into 表名 values (值1,值2,……值n),每个值对应表中字段,值的类型要和字段数据类型相符eg: insert into employee values(001,huan,xian);2)列出表中所有字段,进行数据插入。(可以随意设置字段顺序) insert into 表名(字段1,字段2,……,

2016-07-08 21:04:44 735

原创 归并排序

#include <stdio.h> #include <stdlib.h> #include<assert.h> #include<time.h>void Show(int *arr,int len) { for (int i = 0; i < len; i++) { printf("%d ", arr[i]); } printf("\n"); }v

2016-07-07 20:35:05 399

原创 快速排序

#include <stdio.h> #include <stdlib.h> #include<assert.h> #include<time.h>//count用来记录次数 int count1 = 0; int count2 = 0; int count3 = 0; void Show(int *arr,int len) { for (int i = 0; i < len; i++)

2016-07-07 14:18:18 410

原创 插入排序,希尔排序

#include <stdio.h> #include <stdlib.h> #include<assert.h> #include<time.h>//count用来记录次数 int count1 = 0; int count2 = 0; int count3 = 0; void Show(int *arr,int len) { for (int i = 0; i < len; i++)

2016-07-06 22:45:09 289

原创 简单排序(冒泡(改进),交换排序,选择排序)

#include <stdio.h> #include <stdlib.h> #include<assert.h> #include<time.h>//count用来记录次数 int count1 = 0; int count2 = 0; int count3 = 0; int count4 = 0;void Show(int *arr,int len) { for (int i = 0;

2016-07-04 23:02:34 517

原创 MYSQL-----数据查询(续)

3.使用集合函数查询。经常和group by连用1)sum() 字段值的总和sum只能进行数值类型的计算,int,float,double,decimal类型等,如果计算字符类型字段时,结果均为0. eg:select num ,sum(score) from grade where num=’1001’;//学号为1001学生的总成绩2)avg() 字段值的平均值eg:select num

2016-07-01 20:25:25 526

空空如也

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

TA关注的人

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