摘要: 1 //内存中唯一(static)的对象,不可以重复新建(new) 2 public class Simple { 3 private static Simple s = new Simple(); //静态声明对象本身,该对象必唯一 4 //1.如何保证不被外部调用,反复新建 5 private 阅读全文
posted @ 2020-05-11 23:36 冰韵不徙 阅读(82) 评论(0) 推荐(0) 编辑
摘要: SELECT `sname` FROM `stu` WHERE `age`+10=30;-- 不会使用索引,因为所有索引列参与了计算 SELECT `sname` FROM `stu` WHERE LEFT(`date`,4) <1990; -- 不会使用索引,因为使用了函数运算,原理与上面相同 S 阅读全文
posted @ 2019-08-07 15:50 冰韵不徙 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 前提:服务全部打开,监听也配置好了! win7 64位 oracle 11g 简单的sql命令: 先登录到sqlplus: sqlplus /nolog; 登录数据库: conn system/manager as sysdba; 然后启动数据库: startup; 发现ora-00119【ora- 阅读全文
posted @ 2018-11-07 22:05 冰韵不徙 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 解决办法:1、用CMD进入命令行2、sqlplus /nolog 3、conn / as sysdba4、startup 然后用sqlplus进入命令 解决办法:1、用CMD进入命令行2、sqlplus /nolog 3、conn / as sysdba4、startup 然后用sqlplus进入命 阅读全文
posted @ 2018-11-06 20:42 冰韵不徙 阅读(682) 评论(0) 推荐(0) 编辑
摘要: /* 通过函数完成对结构体变量的输入输出 */ #include #include void InputStudent(struct Student *); void OutputStudent(struct Student stu); struct Student { int age; char sex; char name[100]; } ;/... 阅读全文
posted @ 2018-11-04 15:23 冰韵不徙 阅读(1320) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> struct Student{ int age; float score; char sex;}; int main(void){ struct Student st = {80, 66.6F, 'F'}; struct Student st2; st2.age 阅读全文
posted @ 2018-11-04 10:47 冰韵不徙 阅读(1023) 评论(0) 推荐(0) 编辑
摘要: /*sizeof(数据类型),返回值就是该数据类型所占的字节数例子: sizeof(int) = 4 sizeof(char) = 1 sizeof(double) = 8sizeof(变量名),返回值就是该变量所占的字节数总结: 一个指针变量,无论它指向的变量占几个字节,该指针变量本身只占4个字节 阅读全文
posted @ 2018-11-03 18:05 冰韵不徙 阅读(1336) 评论(0) 推荐(0) 编辑
摘要: /*指针变量的运算: 指针变量不能相加,不能相乘,不能相除; 如果两个指针变量指向的是同一块连续空间中的不同存储单元,则这两个指针变量才可以相减;*/ #include <stdio.h> int main(void){ int a[5]; int * i = &a[2]; int * j = &a 阅读全文
posted @ 2018-11-03 17:28 冰韵不徙 阅读(771) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> void OutArr(int * p, int len){ int i; for (i = 0; i < len; i++) { printf("%d\n",p[i]); } } int main(void){ int a[5] = {1, 2, 3, 4, 阅读全文
posted @ 2018-11-03 17:20 冰韵不徙 阅读(635) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> void function(int * i, int * j){ * i = 10; * j = 20; } int main(void){ int a = 3; int b = 5; function(&a, &b); printf("a = %d b = % 阅读全文
posted @ 2018-11-03 17:09 冰韵不徙 阅读(227) 评论(0) 推荐(0) 编辑