测试第一个博客 献上基于C语言的数据结构之线性表 //线性表 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <math.h> #define MAXSIZE 100 type ...
分类:
其他好文 时间:
2020-11-27 10:59:10
阅读次数:
5
一、约束 1)主键 主键约束=非空约束+唯一约束 主键可以是一个列或者多个列 1)创表添加多个列作为主键 create table score1( sid int not null, cid int not null, PRIMARY key(sid,cid) ); 2)删除主键约束 alter t ...
分类:
数据库 时间:
2020-11-26 14:30:23
阅读次数:
8
a、尽可能使用更小的整数类型.(mediumint就比int更合适). b、尽可能的定义字段为not null,除非这个字段需要null. c、如果想要清空表的所有记录,建议用truncate table tablename而不是delete from tablename. d、避免出现SELECT ...
分类:
数据库 时间:
2020-11-26 14:28:39
阅读次数:
43
操作系统-操作系统-内核中的屏幕打印(下)接着之前的实现顺序来,对PrintString进行实现intPrintString(constchar*s)//需f要对参数进行判断,如果参数为空,返回-1{intret=0;if(s!=NULL){while(*s){ret+=PrintChar(*s++);//不为空时进行循环,直到遇见结束符结束}}else{ret=-1;}returnret;}//
分类:
其他好文 时间:
2020-11-26 14:25:31
阅读次数:
5
a、尽可能使用更小的整数类型.(mediumint就比int更合适). b、尽可能的定义字段为not null,除非这个字段需要null. c、如果想要清空表的所有记录,建议用truncate table tablename而不是delete from tablename. d、避免出现SELECT ...
分类:
数据库 时间:
2020-11-26 14:21:08
阅读次数:
8
1、Session 的创建和销毁 page 指定的 session 属性: 1). 默认情况下, 第一次访问一个 WEB 应用的一个 JSP 页面时, 该页面都必须有一个和这个请求相关联的 Session 对象. 因为 page 指定的 session 属性默认为 true 2). 若把 sessi ...
分类:
其他好文 时间:
2020-11-26 14:17:36
阅读次数:
7
1、把主键定义为自动增长标识符类型 MySql 在mysql中,如果把表的主键设为auto_increment类型,数据库就会自动为主键赋值。例如: create table customers(id int auto_increment primary key not null, name var ...
分类:
数据库 时间:
2020-11-26 14:09:06
阅读次数:
11
1、冒泡排序 public class Bubble_sort { /** * 公共冒泡排序接口 * @param arr 带排序数组 */ public static void sort(int[] arr) { if (arr == null) return; int len = arr.len ...
分类:
编程语言 时间:
2020-11-25 12:41:09
阅读次数:
6
Comparator比较器 简介 为什么写? comparator 是javase中的接口,位于java.util包下,该接口抽象度极高,有必要掌握该接口的使用 大多数文章告诉大家comparator是用来排序,但我想说排序是comparator能实现的功能之一,他不仅限于排序 接口功能 Compa ...
分类:
其他好文 时间:
2020-11-24 12:59:55
阅读次数:
18
今天的每日一题主要考验了链表的操作和插入排序,综合来说还是简单的,记录一下!! 题目描述: 代码实现如: public ListNode insertionSortList(ListNode head) { if(head==null){ return null; } ListNode headPo ...
分类:
编程语言 时间:
2020-11-24 12:33:53
阅读次数:
9