周记二

周一:今天学了继承和多态,继承有public继承、protected继承、private继承,多态和虚函数一对,抽象类和纯虚函数一对,还有友元。

周二:今天学到一饿特别酷的c语法:ch = "0123456789ABCDEF"[tmp];ch是一个char型的变量,tmp是一个int型的变量,先初始化ch的范围,根据tmp的值确定ch的值。

今天学习了运算符的重载,可以使除“. , :: , * , -> , ?=”5个运算符之外的运算符进行重载。对于模版,个人认为是对STL的初步了解,若是能够熟悉模版,就能理解STL的调用。顺序容器和关联容器都会涉及迭代器,for (vector::const_iterator p = c.begin(); p < c.end(); p++)  or    for(int i = 0; i < c->size(); i++) 两种循环进行遍历

周三:今天内容很多,没时间写小结,作业还没做完………

周四:今天学习了mysql,首先要说的是安装mysql:sudo apt-get install mysql-server。在安装过程中会有安装错误,需要卸载重装,此刻需要sudo apt-get autoremove --purge mysql-server-5.5,然后dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P,此操作是为了清除所有残留数据。

总结一下今天学到的内容:

1、 mysql -u root -p

2、显示所有数据库:show databases;

3、显示默认数据库中所有表:show tables;

4、退出mysql程序:\q;

5、create database if not exists student;

6、show databases like 'stu%';如果关键字stu在中间,使'%stu%'的形式来查找

7、use student;

8、 drop database if exists student;

-------------------------------------

9、create table class(id int ,name varchar(11),..

10、show columns from student; ==  desc student;显示表格初始化信息

11、增加列:alter table student add age int;

       修改列:alter table student modify age int not null;

        删除列:alter table student drop weight;       似14

12、insert into student(id, name,age)value(1,"aa",10);

       insert student set id =9;

13、查询表格的详细信息:

                     select * from student where id=1;

                   select age, name from student;

                  select * from student order by id desc(降序)/asc(升序);

                 select name from student group by name;(统计数量,重复的不算)

多表查询********* select t1.name as t1name, t1.age as t1age, t2.name as t2name, t2.age as t2age from test01_01 as t1, test01_03 as t2 where t1.name = t2.name;

14、 修改数据:update student set name="tom" where id=2;

15、delete from student where id=9;

周五:

今天学习了mysql的一些函数调用,并且自己写了一个注册登录的小demo,今天老师已经布置了下周项目的要求,分析了一下,此刻的我感觉不简单。但是从以往经验来看,到下一周什么都会over了……

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1. Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语...
    子非鱼_t_阅读 32,252评论 18 399
  • 一. Java基础部分.................................................
    wy_sure阅读 9,281评论 0 11
  • 50个常用的sql语句Student(S#,Sname,Sage,Ssex) 学生表Course(C#,Cname...
    哈哈海阅读 4,999评论 0 7
  • 1 A,快来看这件衣服好看么?刚看了这个宝贝的评价,还蛮好的,老早就想买一件这样的衣服了。 恩恩,确实挺好看的,很...
    肆意奔跑Q阅读 1,702评论 2 3
  • 001读书 读书是学习的主要源头,那么如何有效的从书中过去自己需要的信息呢? 概览,读一本书之前,先通过名字和目录...
    朗月微光阅读 3,424评论 1 39

友情链接更多精彩内容